Asteroids fully resurrected

In Greg Egan's Permutation City the dead live on as accurate brain simulations. You can call your departed relatives and talk to them any time. The catch is that the simulations run quite slowly; even the richest people run 30 times slower than they did when they were alive. A copy of you can live on after your death, but the world of the living becomes an impossibly fast blur to you.

What brought this to mind? The excellent work, first by the Visual 6502 project, who accurately scanned the wiring of a 6502 and published the transistor-level netlist. And then by AHolme who transformed that netlist into a Verilog equivalent, the Verilog 6502. The final product is an exact copy of a 6502 in Verilog that can run on an FPGA. It's not a replica of a 6502, made to mimic the function like a 6502. It's a simulation of the gates of a 6502.
This image was deleted by MailChimp when they shut down TinyLetter.
The downside is that it runs (clock-for-clock) 16X slower than a 6502. The strict simulation of the transistors of the 6502 takes a long time. So a 24 MHz clock is necessary to simulate a 1.5 MHz 6502.

What to do with this 6502? Atari Asteroids of course! Yes, the Gameduino Dazzler can run an authentic Asteroids game, completely standalone. Controls are the Wii classic ports that plug into the Dazzler. It runs at a smooth 60 Hz, and certaintly feels quite authentic.

This image was deleted by MailChimp when they shut down TinyLetter.

I have hacked on Asteroids a lot this year. Others have reverse-engineered the old arcade machine, so I'm following a well-trodden path. There are (of course) many other Asteroids simulators, but this one has (1) a "genuine replica" 6502, as described above and (2) a quite decent vector display simulator.

The 6502 runs the game code, of course. But Atari vector machines used a second processor called the DVG to control the vector display. This was actually a second CPU that executed a display list and controls the CRT. Every element on the screen is actually a subroutine for the DVG:

This image was deleted by MailChimp when they shut down TinyLetter.
The Dazzler authentically runs a 6502 simulation, but for the DVG it resorts to emulation. Some code on the Dazzler's J1 CPU interprets the (ancient) DVG opcode set and translates it to (modern) BT81x drawing opcodes. (This is written in ANS standard Forth; I wrote and tested it using gforth on the PC, then loaded it onto the Dazzler). Similarly, a loop translates from the Wii gamepad controls and sets the button inputs to the 6502. (Audio is not done yet - if anyone has a pointer to prior work on the audio, please let me know.)

This image was deleted by MailChimp when they shut down TinyLetter.
The Asteroids FPGA image will be available for download shortly. If you have ordered the Dazzler Python Game Pack (shipping next week), you can install it and play an extremely accurate replica of Atari Asteroids. If you ordered the Dazzler alone, you can pick up a single or double Wii controller and get playing.

Thanks for reading.