(back to project list)
Asteroids is a 2D shooter first released in 1979. It became Atari's most successful coin-operated game, selling over 70,000 units. The vector graphics display was the same used for the earlier Lunar Lander, and when the popularity of Asteroids exploded some Lunar Lander cabinets were repurposed for Asteroids (including some 300 units that still had Lunar Lander artwork on them).
This disassembly is based on the work of two earlier efforts:
Those sites go into great detail on the hardware and the function of the Digital Vector Generator system, so I won't re-explain it here. It should be noted that DVG (also used in Lunar Lander, Asteroids Delxue, and Omega Race) is related to but different from the Analog Vector Generator (AVG) system used in Battlezone, Tempest, and many other games.
This disassembly includes the 6502 code and the vector graphics commands in ROM. I used "Asteroids (rev 4)" ROMs for MAME (which you can find easily on the web), but you can also use data extracted from ROM chips. A simple DVG disassembler was used to generate comments for the source listing.
Asteroids is copyright 1979 Atari, Inc.
The easiest way to play is via emulation on a computer. Once you have the Asteroids ROM set (probably called "asteroid.zip"), save it in the MAME "roms" folder. When you start the MAME UI front-end, it will find the game automatically. Select it from the list and hit Enter. When the system summary displays, hit Enter again. (If this doesn't work for you, please visit one of the many MAME help sites.)
While the game is running, you can get a list of keys by hitting Tab, selecting "Input (this Machine)" with the arrow keys, and hitting Enter. The most important are:
The Tab menu also has a "DIP Switches" sub-menu that will let you set the machine for free play so you can stop inserting virtual quarters.
The game is simple: destroy asteroids without colliding with them. Shooting a big asteroid (20 pts) splits it into two medium asteroids; shooting a medium asteroid (50 pts) splits it into two small asteroids; shooting a small asteroid (100 pts) simply destroys it.
Occasionally a flying saucer will appear and start shooting. Their shots can destroy asteroids, and they can be destroyed by colliding with an asteroid. Large saucers shoot randomly, but small saucers target the player. As the game progresses the small saucer appears more frequently, and after 35,000 points it becomes more accurate. Destroying the large saucer is worth 200 points, while the small saucer is worth 990 points.
When all asteroids and ships have been cleared, the next wave starts.
If destruction is imminent, hitting the hyperspace button will teleport the ship to a new location and set the ship velocity to zero. This has a random chance of instant death.
The first wave starts with 4 large asteroids. Each subsequent wave adds two more, to a maximum of 11. The game allows up to 27 asteroids on screen.
When jumping into hyperspace, a random number from 0-31 is generated. If it's 24-31 (25%), the jump fails and the ship is destroyed. The random value is reduced to 0-7, doubled, and increased by 4 (4 - 18). If that value is less than the current number of asteroids on screen, the jump fails, which means the chance of failure increases as the screen gets more crowded. If the jump succeeds, the game will wait until there are no asteroids in the immediate vicinity of the spawn-in point. The position is random, but limited so that the ship doesn't appear near the edges of the screen.
The game holds the score in two BCD bytes, and adds a zero on the end when displaying it, so the game turns over at 99,990 points.
The 4th exploding shrapnel pattern, at $51a0, was re-used as an explosion effect in Battlezone.
Copyright 2021 by Andy McFadden