Watching Snata (C64)

Released in 2002, Snata was an entry into the Christmas Demo Competition and not in the slightest bit cynical or sarcastic. Well, okay it was because the “inspiration” was a SuperCPU-specific demo called Coca Cola Santa Claus – the original seems to be lost to the mists of time – which used the 65816 to brute force a full screen width FLI image out of the VIC-II… and then displayed one of the worst-looking wired pictures I’ve ever seen! So on a particularly dreary winter evening I was making a nuisance of myself on IRC and ended up in a little “competition” with Groepaz where we amused ourselves by taking said image and trying but failing to produce something similarly terrible by throwing it through whatever converters we had to hand.

A year or so before this evening of entertainment happened I’d noticed in passing that the tunes from Zeppelin’s Amiga game Santa’s Xmas Caper were all written in the same general, annoyingly jolly style so, pretty much on a whim that I was probably at a loss to explain even then, I spent an evening unceremoniously mangling them into a single piece with Goattracker. So now I had a piece of music and a fairly reasonable wired picture, so all that was needed for a Christmas competition entry was a little code to glue it together and that was actually donated by a previous release.

But once that had been congealed I had a moment of what we’ll have to call “inspiration”; since the picture had been based on a demo which required a hardware expansion to run it seemed sort of appropriate to add a similar but in this case optional overhead to mine and I already had just the thing lying around, a routine which leant on a RAM expansion to produce an effect similar to the FLI-based one in Charlatan – appropriate considering Coca Cola Santa Claus – but in the borders rather than on screen.

The routine uses the REU’s DMA to transfer colour data back and forth between the base 64K and expansion RAM, moving everything around at an impressively fast one byte per cycle. There are two shifts of the colour data during the screen to update it but the important part happens during the upper and lower borders where transfers are triggered with the destination set to $D020 and the DMA told not to update that address with each write; the result is that the border colour register is updated once per cycle with around 48 being visible but 63 writes actually taking place since there’s that many cycles per scanline.

Of course, the competition was just for fun and meant to be just standard C64 code so the colour bars were only there as a hidden bonus, but hey ho ho ho…

Crack Intro (C64)

It’s been noted on a few occasions previously that I’m not particularly fond of the “festive season”, so here I am on the day itself applying WordPress updates and releasing another intro for the CSDb Intro Creation Competition. This one is rather literally called Crack Intro and was inspired by a couple of ICC-related releases with the same name from nomiStake. They all rely on the same “pun” – the idea that it’s an intro with some kind of crack on the screen – so the only real distinction is that mine actually fits within the competition’s rules, although I had to check beforehand that using a copyright symbol counted as a Cosine logo.

Writing the scrolling message for this one was pretty uncomfortable; the trick being used for the scroller relies on there being eight possible versions of each character so they can arbitrarily roll around within their own eight pixel wide cell, but that means there can only be thirty two characters. That means I get a space, 26 letters and five punctuation marks which are full stop, comma, question mark, exclamation mark and an asterisk so I could highlight phrases in a similar way to the C64’s power up message. This rolling font is generated when the code starts up, using the ROM character set to save a little space even though I have more than enough room left for some bespoke characters.

For anyone wondering, the copyright symbol is built from sprites and uses five in total and recycles the top row of three for the bottom whilst the middle two are being displayed. The cracks are built from characters apart from where they have to overlap the scrolling message; that’s where the spare sprites take over and the fractured parts of the power up message are using sprites for the text. The music is by Sean Connolly and a cover of the tune from Star Trooper by Melbourne House, and originally composed in 1984 by Clifford Ramshaw; it has a lovely, slightly manic quality that I felt blended well with what was happening on screen.

Stercore 64 (C64)

Time to push another release off the C64CD pile and this time it’s Stercore 64 which is a scrolling shoot ’em up for the C64 that is an almost direct port from the Spectrum version that was released last week. There’s very few tweaks apart from a SID rendition of the original beeper soundtrack for which I can only apologise on a loop during play and the backgrounds being tweaked for the C64 palette. Oh, and it gained a “64” at the end of the title just like publishers used to do in the early 1980s.

After those changes and the higher resolution of the C64’s screen in the display mode being used it’s pretty much the same game, hammering along at ludicrous speed just like the original by moving the attribute data to scroll the background – this is now an unrolled loop which replaces the LDIR commands in the Spectrum code – and rendering all of the moving objects for the player, bullet and enemies to the bitmap with software. It was quite a pleasant surprise to find that, although my Z80 software sprite routine isn’t exactly optimal, the 6510-powered equivalent kept up with it and I didn’t have to spend any serious time optimising the C64 code to get it running at the same speed.

Before sitting down with the assembler I considered doing a re-imagined version of the game for the C64 which took advantage of the hardware sprites and how their background priorities work with multicolour characters – have a look at the game Implosion, the sprites can pass between background elements without software-based clipping – but eventually decided to keep things as close as possible to the original in part for the programming challenge that route presented. For anyone who fancies digging around further, there’s source code at GitHub,+