Intel 8080 Emulator for the Taito Space Invaders game implemented in golang
A version of this emulator transpiled to Javascript using GopherJS is available here. It runs pretty slow due to the many layers of abstraction, but is still playable. (Works best in Google Chrome - runs very slow in Firefox)
There is source code for two executables here:
-
test - A barebones implementation of the KR580VM80A processor that can run all of the "i8080-core" ROMs (https://github.com/begoon/i8080-core/). This emulator can connect to a local server (server.rb) that can compare the output of this emulator against other emulators to detect differences in the register values. The code for the i8080-core will need to be updated to provide this output over port 5679.
-
space_invaders - A superset of 'test,' but with additional functionality to emulate the Taito Space Invaders game as faithfully as possible.
Controls for space invaders:
- Enter - Insert Credit
- Key 1 - Start a 1 player game (1 credit required)
- Key 2 - Start a 2 player game (2 credits required)
- Left Arrow - Move ship left (P1)
- Right Arrow - Move ship right (P1)
- Space - Fire (P1)
- Key A - Move ship left (P2)
- Key D - Move ship right (P2)
- Key W - Fire (P2)
- Key T - Tilt
- Key 3 - Toggle DIP Switch 3 (set number of lives; 00=3, 10 = 5)
- Key 4 - Toggle DIP Switch 4 (some sort of power on self test)
- Key 5 - Toggle DIP Switch 5 (set number of lives; 01 = 4, 11 = 6)
- Key 6 - Toggle DIP Switch 6 (0 = extra ship at 1500, 1 = extra ship at 1000)
- Key 7 - Toggle DIP Switch 7 (0 = display coin info on demo screen, 1=don't?)
Dependencies:
- Ebiten 2D library (https://github.com/hajimehoshi/ebiten)
Built in GO with lots of help from the following resources:
- http://www.computerarcheology.com/Arcade/SpaceInvaders/Code.html
- http://www.emulator101.com/reference/8080-by-opcode.html
- http://www.pastraiser.com/cpu/i8080/i8080_opcodes.html
- https://github.com/begoon/i8080-core/
- http://typedarray.org/wp-content/projects/Intel8080/index.html (Javascript version)
- #ebiten on gopher.slack.com
Known Issues:
- UFO sound does not play correctly (wontfix)
- Some of the sounds are not implemented - extra ship, cocktail mode (wontfix)
- GopherJS version runs very slow (wontfix)
- Source code is not very pretty (wontfix)