Posts Tagged ‘Plus/4’

How our CD5 part works

Monday, February 20th, 2017

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

Wednesday, July 6th, 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.

Workprint – July 2015

Monday, July 6th, 2015

I’m well and truly in “demo mode” right now so, apart from a small fix for Hammer Down to hopefully prevent an extremely rare but annoying raster overrun, most of my coding time has been spent doing demo-ish things including getting my head around some $D011 “features” that I haven’t really played with previously – if this code’ll escape into the wild is anyone’s guess at this point.

Workprint posts are going to be a tad sparse though because, although it probably sound pretentious, to my mind at least demos are about “the show” and posting screenshots of the code before release would spoil that. But there is at least the option of putting up some graphics, for example here’s an AFLI logo for the C64…

…but it looks a bit square because the shape was defined by what I plan to have happening around it. For something more rounded, here’s the first draft of the tile-based character set I built to go with the Plus/4 logo that was posted previously

…and yes, that’s a very old version of Char Pad because, although the latest beta versions seem to work without breaking my existing projects (there still seem to be some features missing but hopefully that’ll be dealt with for the release version) and the new tile sizes are on the “fun tool to play with” list, the venerable but surprisingly unclunky format converter I wrote years ago for stripping character, tile and map data out from CTM files is going to need a major overhaul because it doesn’t support the more recent versions!