This is a CHIP-8 emulator written in Rust and compiled to WebAssembly. You can try it here.
- Select and load a ROM from the list of built-in ROMs, or upload a ROM from your computer.
- Click
Start Game
- Either use the on-screen keyboard, or use the QWERTY keyboard mapping available when hovering over
Hex Keyboard(?)
- (Optional:) If the ROM is not functioning correctly and it was written for the original CHIP-8 interpreter, try changing the options under
Advanced Settings
The actual CHIP-8 CPU emulation is written entirely in Rust, at src/lib.rs
, and is a port of my C++ CHIP-8 Emulator that I wrote to practice Rust.
I also wrote some JS glue code (static/index.js
) to handle the interface and canvas/audio, but I am not a web developer, so it might not be quality JS code.
To compile you'll need the standard Rust toolchain (rustup, rustc, cargo).
You also need wasm-pack
which automatically generates JS bindings for exported Rust functions.
To compile run:
wasm-pack build --target=web --no-typescript --out-dir=static/pkg --release
This repository contains ROMs from badlogic's repo that can be selected in the website.