Workprint – September 2018

I spent the previous weekend visiting family dahn sarf and, after a particularly harrowing coach trip home, had to spend a few days “recovering” so this post is a bit later than expected… on the plus side, I picked up a copy of Compute’s First Book Of Atari Graphics from the lovely folks at Level Up in Canterbury…

…which I hope is not too advanced for me! It even came with a hand-written page – poking out of the book in the picture above – of display lists as decimal from a previous owner which seems to have been used as a bookmark since it’s a few pages into the chapter titled Introduction To Player/Missile Graphics, one of the few places where the display list isn’t particularly relevant.

Sorry, drifted off a little there… so I’ve been working on the project I’m still not really talking about, although it’s probably safe to say I’ve been a little lazy recently; the intro is done and there’s two complete parts still waiting to be linked, but I haven’t found the time for a prolonged coding session to get any of that done and it’s one of those jobs I don’t want to stop halfway through for fear of losing my place. I also have a list of potential ideas which is coming along nicely and a couple of existing prototypes which can be improved and re-purposed so stuff is still happening.

I did find a couple of hours to doodle some code whilst away though; an interesting thread at the Plus/4 World forums mentioned using the registers $FF1A and $FF1B to scroll a bitmapped screen around in a form similar to AGSP on the C64 except without the “dead air” at the top of the screen, so I spent some time experimenting to get my head around it. The code I wrote works but this method only affects the bitmap itself so colour data would need to be moved by brute force, a bit of an ask considering the Plus/4 uses 2K for bitmapped graphics regardless of mode. It’s something to experiment with later, although I’m seeing an odd, almost FLI-like glitch in the version I wrote which added splits for a character-based scrolling message and can’t think for the life of me why it’d be there!

How our CD5 part works

So… erm yes, I said over at the Plus/4 World forums that I’d write a “how it works” for the Cosine contribution to Crackers’ Demo 5 and here it is girls and boys, only six months late! Generally speaking there are two actual effects in play, the forty by five byte luminance scroller running through the middle of the bitmapped logo and a sixteen by ten pixel DYCP which works in the regular 39 by 6 character workspace but splits it into two blocks which are four characters high at the top and bottom of the screen.

The DYCP isn’t doing anything majorly different to the other single character routines I’d released around the same time – the loops are all unrolled and there’s specially formatted character data for speed which was originally drawn with ProMotion (I’m actually using an older version) before being converted using my cheap and cheerless bitmap to raw data converter – except that it has two distinct versions of the clear and draw code; one starts from the left hand half of the first character and proceeds to draw across to the right whilst the other begins from the right hand half; the code then flips back and forth whenever the hardware scroll finishes a cycle. During what I’ll refer to as the “design phase” for want of a better term, I settled on wanting the four character high areas so the redraw has to happen during the logo and there was only enough time to render ten pixel high characters.

And since I mentioned the logo, it was originally drawn using C64-specific tool Project One (again, I’m using an older version… one of these days I’ll update all my tools) with the colours used representing luminances; that data was then converted for the Plus/4 with a small assembly language routine on the C64 (all it actually did was translate the C64 colour data and dump it into memory so I could save the results out with a virtual Action Replay cartridge) and all of the colour data was manually created as an included source file. Here’s the logo’s “before” picture when it was still on the C64:

Finally there’s the large luminance scroller; the TED keeps luminance and colour data separately for bitmap-based displays like the logo so one eight by eight pixel attribute cell has two bytes of information, one containing two nybbles of colour (values from $0 to $f for sixteen possible colours) and the other holding two nybbles of luminance data (this time values from $0 to $7 for eight possible brightnesses). The “trick” here is that the luminance has been limited to a maximum of $5 for every cell in the picture where the scroller can pass over it, so when that is added to the scroller’s buffer which is either $0 or $2 for each nybble there’s a noticeable hike in brightness. To keep things simple there’s a second copy of that luminance data used for reference.

And, apart from mentioning that the music was created by aNdy using Knaecketraecker, pretty much covers everything I think. The source code is available online for those brave enough to go prodding around it and I’ll have a go at answering questions if any arise.

Workprint – July 2016

Wow, I somehow seem to have missed the workprint post for a couple of months without either realising or knowing how it even happened! Since I’m currently blaming everything on the result of the EU referendum, so that can be the scapegoat for this situation as well even if it’s demonstrably not the case. In truth, free time has been more scarce than usual so releasing a demo at Sundown has, along with plans to actually show up in Budleigh Salterton for once, sadly fallen by the wayside. It might still be possible to get a monthly demo release together to contribute, although the ideas pile is a little sparse and I doubt a multi-platform audience would “get” what .

So instead I’ll be focusing on a Plus/4 part to contribute for the Cracker’s Demo 5 deadline; it’ll be started from scratch – I can’t test the code being written previously – and my current mantra of “if in doubt, DYCP” is almost certain to apply, that’s doable. I mean, it’s not as though I have problems with meeting deadlines is it… oh.

Here’s some news that isn’t mine though, Sokurah has just released his ZX Spectrum conversion of my C64 game Vallation! It can be downloaded from the relevant page of his website and features some lovely graphics from Craig Stevenson as well.