A Chip-8 emulator written in Rust using SDL2 for graphics (and input).
Chip-8 hex keyboard (0x0–0xF) is mapped to your keyboard as follows:
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 -> Z X C V
-
Install Rust (recommended via rustup)
-
Install SDL2 development libraries:
Ubuntu / Debian
sudo apt update && sudo apt install libsdl2-devFedora
sudo dnf install SDL2-devel
Arch
sudo pacman -S sdl2
macOS
brew install sdl2
Windows
Use vcpkg or download SDL2 from the official site and set SDL2_LIB_DIR environment variable.
git clone https://github.com/zaarov/CHIP8VirtualMachine
cd CHIP8VirtualMachine
cargo build --release
cargo run --release -- path/to/your/rom.ch8The project includes a flake.nix with a full devShell that provides Rust, SDL2, and all required dependencies.
nix developcargo build --release
cargo run --release -- path/to/your/rom.ch8- Contributions are welcome! Feel free to open issues or pull requests.



