Archive for the ‘Jason’s News’ Category

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 – February 2017

Friday, February 10th, 2017

Well it’s been quite a while… but here’s a workprint post with almost no real information in it!

First off, after the “blip” at the end of 2016 I’m back to doing the Monthly Demo series and a couple of candidates are being prodded at for this month; I do want to expand the reach of that series a little as regards platforms, but will have to do a little “organising” since I don’t currently own the appropriate hardware for testing in some of those cases! I’ve been writing code using cross assemblers and emulators for over fifteen years now, and the most important lesson that’s taught me is to “metal test” everything before it goes out the door.

There’s a spot of learning that needs doing for some of the potential projects as well – my Z80 is still very weak and a few of the systems under consideration don’t have music editors available, so a probably half-arsed solution needs to be constructed which will allow someone with musical talent (so just to be clear, not me)to compose for for those cases. There’s a fairly substantial collection of half finished parts and routines for a range of platforms that could do with some attention so that they can escape into the wild. And yes, I know this is all rather painfully vague but at the moment I’m not sure which of these more out there ideas is even viable so I’m keeping my cards reasonably well hidden at least for now.

I am also, to hugely understate things for comedic effect, just a teensy bit behind with the “how it works” posts and will try to get onto that at some point soon; the two that I feel are most urgent are for the Cracker’s Demo 5 part and Koalatro since they’ve raised a few questions; the latter’s memory footprint seems to be surprising seasoned C64 coders, so I’ve been irritatingly smug about that for a while now despite having kept quiet about it actually taking 1K less than they think it does.

MD201701 (Atari 8-bit)

Sunday, January 1st, 2017

Here comes the second release of the day (and yes, it feels extremely weird “saying” that ), this time called MD201701 and for the Atari 8-bit; raster-flavoured code and the character set are mine, with the music this time being a conversion of an old Adlib tracker song produced by Adam “Sack” Hay.

The bars are a combination of colour splits to set the base hue and sixteen possible lines of bitmap data for the luminance, so any entry in the full 256 colour GTIA palette is available on each scanline – the majority of raster bar demos only use the 128 colour CTIA colours – although I’m only using 240 in total because two sixteen shade sets of brown are so close that one might as well be skipped. There are only two bars plotted for each frame, but an “infinite rasters” routine which cycles through six buffers and rotates the palette on each pass makes things look busier than they are in reality.

Oh, the scrolling messages both have eight colour splits per scanline which was a nightmare to get timed correctly and required quite a bit of hoop jumping in the process! This release was part of the New Years Disc 2017 and organised through the Atari 8-bit section of the Atari Age forums, grab the entire package because it’s worth it!