Small CHIP-8 Emulator written in Rust. The emulator currently implements the original CHIP-8 instruction set and provides keyboard input, sound and display rendering for running ROMs.
Keyboard input is mapped to the original CHIP-8 keypad layout as follows:
| CHIP-8 | Keyboard | |||||||
|---|---|---|---|---|---|---|---|---|
1 |
2 |
3 |
C |
→ | 1 |
2 |
3 |
4 |
4 |
5 |
6 |
D |
→ | Q |
W |
E |
R |
7 |
8 |
9 |
E |
→ | A |
S |
D |
F |
A |
0 |
B |
F |
→ | Y |
X |
C |
V |
Run a CHIP-8 ROM:
./chip8 <path/to/rom>On first launch, a default config file is generated. It allows customization of the emulator, including:
- Display colors — on/off pixel colors (RGB)
- CPU speed — instructions executed per second
- Quirks — toggle behavior for CHIP-8 instruction edge cases that vary between original interpreters and later implementations (e.g.
SHIFT,LOAD/STORE,JUMP)
- Rust (stable toolchain, includes Cargo)
Linux (Debian/Ubuntu):
sudo apt install build-essential cmake libglfw3-dev libgl1-mesa-dev pkg-config libasound2-dev libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-devLinux (Arch):
sudo pacman -S pkg-config alsa-lib cmake base-devel wayland wayland-protocols libxkbcommon libxrandr libxinerama libxcursor libxigit clone https://github.com/oreisacher/chip8-emulator.git
cd chip8-emulator
cargo build --releaseThe compiled binary will be at target/release/chip8.