Daft coding ideas

A while ago on Atari Age, there was a side discussion in the C64 versus Atari war thread about the game Zybex; initially, I’d assumed it was working at the resolution the developers had used in order to get the entire play area working with a single LMS command in the display list (which is essentially a pointer to tell the display hardware where it’s going to read screen data from) for speed, but after some prodding around within the code that turned out not to be the case – instead it relied on LMS commands on every one of the pixel lines of the display, which made good sense all under the circumstances but for some reason felt inefficient.

And that still set me thinking, would it be possible to produce a scrolling game of some kind that handles the same screen resolution using just a single LMS command in the display list? The answer at least seems to “sort of”, the final resolution has been locked down to a 128 to 80 pixel area due to a restriction caused by the display list working in 4K blocks (which is presumably why Zybex wasn’t handled this way) but it trundles along at a pixel every second frame, churning out tile data correctly in the process.

Of course, just getting scrolling proves close to bugger all and as a proof of concept it needed to draw some sprites in over that scrolling, so currently there are nine objects being written in and out with EOR, each at 9×9 pixels and moving every frame (eight automatically, one under joystick control). All in all, it’s rather surprising but the damned thing actually works despite the horrific state of the code…!

Leave a Reply

Your email address will not be published. Required fields are marked *