Commodore 64 BASIC can be very fun, even if it lacks commands. In this article I explained my way of creating a scrolling chessboard with BASIC 2.0. Now, I am going to show you an updated version of this program that scrolls a bigger chessboard, made up of 4 x 4 characters squares. It may seem intimidating, and you may think I am cheating. Actually, it’s still a realtime scrolling with no ML aid. And, the code is more or less the same for the 1 x 1 characters chessboard. You only have to set up things in a slightly different way, but the concept is the same. And, again, two pokes on each frame are enough to perform the scroll.
You can download the program here.
To stop the program, use RUN/STOP and RESTORE.
The explanation for this program adds only a few things on what has been explained on this article.
For a 1 x 1 characters square chessboard, 2 programmable characters are required. This time, as it is a 4 x 4 characters chessboard that it is being scrolled, we need a total of 8 programmable characters. Notice that 16 characters are not required, as each 1 x 4 characters vertical stripe of a square just looks like the other stripes.
On the 1 x 1 chessboard, at the beginning we had to modify the first byte of the first character, and the first byte of the second character. This time, we have to change the first byte of the first character, and the first byte of the fifth character. And, before we swap the values to be poked in the characters RAM, this time we have to wait until character 4 for one color, and character 8 for the other color, are reached. Then, the values to poke in the character RAM are swapped and the process can start again.
So, in line 13, now the limit for the variable Y is 31, and no longer 7. We now have to scroll by 4 characters, as the chessboard is 4 x 4.
This little program shows that even with a very simple BASIC the Commodore 64 can do nice things. Additional commands for graphics would have been nearly useless to code such a program. Plotting lines on a bitmapped screen with an expanded BASIC simply is not fast enough to achieve these results. Again, this program just makes the illusion of moving many dots, but still, it does take advantage of the way the VIC-II chip works, charging it of most of the work.
And, it doesn’t use scroll registers. So, you are free to expand the program by adding static elements, like a characters made logo for example. No screen split is needed for that. The chessboard will scroll, but any other information you write on the screen will be stationary.
With little program changes, it is possible to scroll a chessboard with squares of different sizes. So, it is flexible.
I have tested this program on a real Commodore 64 with a CRT TV set and the movement is smooth. Much better than what you can see by using an emulator and on a LCD monitor.