[Media] I wrote my own Intel 8080 emulator in Rust (with SDL + WebAssembly port)

241 points Tale_Blizzard 11 comments
[Media] I wrote my own Intel 8080 emulator in Rust (with SDL + WebAssembly port)

So I decided to dive into Rust by building an Intel 8080 CPU emulator completely from scratch.

  • Uses SDL2 for graphics(desktop build)
  • Still need to work on audio (It's WIP)
  • Ported to WebAssembly + HTML Canvas, so it runs in the browser
  • Can run Space Invaders (and potentially other 8080 games)
  • Main goal: learn Rust while working on something low-level and performance-oriented
  • Side note: For wasm I purposely made it so that it updates the last cpu instructions and state after every 10 frames hence why slower updates.

This was a huge learning experience for me, and I’d love feedback or suggestions on what I could add next.

Disclaimer: Before I get grilled for the frontend (it was made by v0, everything else was written by me from scratch).

Controls for the WASM demo:

  • Tab → Start
  • 1 → Player 1
  • Arrow Keys → Move
  • Space → Shoot

Link (Check it out for yourself): https://8080-emulator-rust.vercel.app/