A cycle-accurate Intel 8080 CPU emulator running Space Invaders in the browser.
Play it: https://8080.mus.sh
- Full Intel 8080 instruction set emulation
- Cycle-accurate timing with interrupt handling (RST 1 at mid-screen, RST 2 at vblank)
- Space Invaders hardware: shift register, input ports, 1-bit video output
- Debug panel showing CPU state, disassembly, and memory view
- Mobile touch controls
Requires Rust and the wasm32-unknown-unknown target.
rustup target add wasm32-unknown-unknown
# Build for web
./build-web.sh
# Run locally
python3 -m http.server 8080./deploy-cloudflare.sh
npx wrangler pages deploy dist --project-name=intel-8080-emu| Key | Action |
|---|---|
| C | Insert coin |
| 1 / 2 | Start 1P / 2P |
| A/D or Arrows | Move |
| Space or W | Fire |
| P | Pause |
| N | Step (when paused) |
| R | Reset |
The emulator runs at 2MHz (the original 8080 clock speed). The Space Invaders hardware generates two interrupts per frame at 60Hz:
- RST 1 (0xCF) at mid-screen (~96 scanlines)
- RST 2 (0xD7) at vblank (~224 scanlines)
Video RAM at 0x2400-0x3FFF is rendered as a 256x224 1-bit framebuffer, rotated 90° CCW to match the original arcade cabinet orientation.
- Rust + WebAssembly
- Macroquad for graphics/input
- Cloudflare Pages for hosting
