Animation on the Homebrew 6502 Computer
In this second part on outputting a VGA signal from my homebrew 6502 breadboard computer, we’ll take a look at getting some motion onto the screen. If you missed the first part, you can catch up on the progress so far here.
I’ve posted a new video to YouTube, which shows the computer in action while it is running a small animation demo. You can watch the video below, with the second half showing the actual output (filmed off the monitor, hence slightly washed out colors). And if you find this sort of thing interesting, feel free to subscribe to my channel.
What happens under the hood is actually very straightforward. The only time pixels in the framebuffer are manipulated is after initialization. Pixel data is copied from main memory into VRAM. Everything else is extremely lightweight. Incrementing or decrementing the VRAM start address by one allows scrolling horizontally. Adding or subtracting the length of a full line allows scrolling vertically.
When the image reaches the top, the stretch effect is achieved by changing the GFX_LRPT
register (see previous post). By default, each scan line is drawn four times, which is increased to a maximum of eleven times. All movement is achieved by either updating the GFX_LRPT
or the three VRAM start address registers.
Nothing too spectacular, but at least something is moving. Next step: 256 colors.
Subscribe via RSS