The text scroller. The single most used demo effect of all time. An effect that always fascinated me on the C64 back in the day, but (like with the colour cycle effect) something I could never get my head around all those years ago. I have often thought to revisit coding on the C64 JUST to successfully produce this, but never got around to it. Now is the time.
The time spent diving back into assembly language over the last two weeks has been quite fruitful. The lessons learned and knowledge gained will come in handy here. The goal is to create a simple, 1×1 character scroller. Once I can do that, it shouldn’t be too difficult to expand it further in the future to jazz it up.
A simple effect I remember seeing in many intros & demos was what I always called a “Widescreen” effect. This is where the top and bottom borders extended all the way to the edge of the screen. It gives the impression of parts of the side border being removed. There are methods for actually removing both the top and bottom borders, but that’s more complicated and something I will look at in the future. For now, I will look at using the raster bar to toggle the screen and border colours at specific scan lines to give the impression of a wide screen display.
Having settled on the use of the win2c64 compiler for now, I wanted to push ahead and continue getting my hands dirty with the 6502/6510 instruction set. I decided to write a simple routine that would clear the screen.
The first step I figured would be to write the basic version. It’s quite a straight forward routine. The default screen memory location starts at $0400 (or 1024 in decimal) and is 1024 bytes long. The first 1000 bytes is allocated for the screen characters (40×25) and these are the bytes I need to modify when clearing the screen.
For this routine, I figured I’d simply populate the screen with spaces to “clear” it. All the routine needs to do is poke the decimal value for space (32) into each screen character location.