3 ms·
The book "Racing the Beam" has a great survey of how the 2600 worked and it's a pretty quick and breezy book to read through. But basically you set various dis
by bane 12y ago
The book "Racing the Beam" has a great survey of how the 2600 worked and it's a pretty quick and breezy book to read through.
But basically you set various display registers as the scan-line was being drawn. Then you have the time it takes for the electron beam to move down and across to the next scanline to do some setup and calculations and so on. And then at the bottom of the display you have the time it takes for the scanline to get back up to the start position for a frame to do more number crunching.
Basically instead of RAM, you read right out of ROM and fiddle with various display registers either between lines of while lines are being drawn.
It's an old 8-bit "trick" as most people assume the registers get set and then you do something not knowing that you can play with them while things are going on.
- Someone 12y agoThat trick wasn't limited to 8-bit. The original Macintosh used a variant of this to generate sound and to adjust the rotation speed of floppy disks. Just past the bitmap for the screen, it had two 740-byte buffers. It read a single byte from those buffer at the end of each horizontal scan line, and fed it into the sound system/as a PWM signal for the motor of the floppy drive (http://en.m.wikipedia.org/wiki/Macintosh_128K/512K_technical_details#Sound http://en.m.wikipedia.org/wiki/Macintosh_128K/512K_technical.... I think the section on the floppy drive is incorrect; the original Mac didn't have a IWM; it was all done in software) If you wanted to generate continuous, non-repetitive sound, you had to fill the sound buffer with new values at the end of each vertical blank interrupt. Quite a bit easier than on the 2600, as the update frequency is only 60 Hz and the CPU a lot faster, but the same principle, and still quite a challenge at the time, if you wanted to do something in the screen at the same time.