Asteroids in JavaScript by Static Binary Translation

The arcade game Asteroids is a true arcade classic and was originally written by Ed Logg of Atari Inc. in 1979. It was the first arcade game I ever played.

This JavaScript version was created 35 years later by the method of static binary translation. That means, that the program code originally written in the machine language of the 6502 CPU of the Asteroids machine is converted one-to-one to JavaScript. The translation was automized by a Java program, which generates semantically equivalent JavaScript code for each 6502 instruction and applies some optimization techniques to the generated program (e.g., removal of redundant flag calculations). The outcome is an exact simulation of the original, first Asteroids game.

The graphics interface and the emulation of the Asteroids arcade machine's vector generator hardware were directly coded in JavaScript and rely on HTML5 and the Canvas element. So you should have a quite recent browser version supporting these features to be able to play the game.

Click here to play Asteroids now..