From 40 Raster Lines to 1
Posted on
By Kodiak
If you've read my Commodore 64 assembly tech article, Bank-Switched Scrolling,
you will remember how
I had to find a way to compress Parallaxian's scroll code for the distant mountains in the parallax
landscape down from the original approximately 40 raster lines, and ended up getting it squeezed into a much more compact 9.
That was achieved using double-buffering, a staple Commodore 64 coding trick, to spread the time-consuming software (char) scrolling over several screen frames of hardware scrolling
(a full explanation is in the article).
However, after musing upon comments from another coder on my recent article, Wild Wood Deconstructed,
I thought it would be possible to have Parallaxian's main loop do the heavy lifting of the double-buffer scrolling when the interrupts are idle.
Sure, it's not an ideal solution for every layer of the parallaxed landscape, and yes, the main loop is filling up with more and more tasks, but for now there is enough cumulative
interrupt idle time spread across the frames consumed between char scroll events for that slowest scrolling layer to allow the char-shifting components of its double-buffering
to be removed from the interrupt schema altogether.
This was done, of course, with one eye on a possible NTSC version of the game, most likely to manifest in the form of the
planned native Commodore 128 version, which may come in both NTSC and
PAL flavours...
subscribe to my 100% free NEWSLETTER to be kept up to date on this.
____
If you value my work and want to support me, a small donation via PayPal would be nice (and thanks if you do!)