Project update 3 of 7
For several years now, I’ve wanted to duplicate the original vector-display Atari Asteroids on the Gameduino. There’s something about the this early monochrome vector game that I find very pleasing. This Summer finishing Dazzler presented the perfect excuse.
I followed the MAME-to-oscilloscope instructions and got MAME built so it outputs a vector list. The Asteroids hardware had a clean split: the CPU generated a list of line segments, and the CRT controller drew the segments. There’s no sprites, background, or even colors to think about. Just a list of lines, each with an 8-bit brightness. Once that was extracted from MAME it was just a matter of making some code to draw that vector list on the Dazzler.
Taking the line list and rendering them on the Dazzler gave something that immediately looked promising:
The Atari’s vector display technology was additive: the screen started off dark and the beam painted the phosphor. Places that got painted twice became twice as bright. (At least in principle; nonlinearities throughout the system make the perceived brightness curve more complicated.) The EVE can be set up to do additive blending, very like in OpenGL:
Note how the spots where the vectors meet are double-brightness from being painted twice.
It’s looking a bit too flat and perfect for a CRT. So the next step is to add barrel distortion, a characteristic artefact of CRTs. This is a simple scale of each point’s (x,y) based on its distance from the center. Here I’ve rendered the display edges to make the barrel distortion clear.
Another important CRT artifact is glow. By drawing a slight glow around each point, the accumulated brightness increase gives a suitable glowy effect.
This isn’t very physically accurate - you’d need some desktop-GPU power to duplicate the actual gaussian glow effect. But it’s close enough:
Adding an image of an original Asteroids screen surround completes it:
Gives the finished look. In real-life, on the LCD, it looks really authentic. It’s very tempting to build a 6502 simulator to get the whole game running on Teensy, which is easily powerful enough to run the Arcade code in simulation and do the vector conversion.