A CHIP-8 emulator written in the Rust programming language.
To build the emulator you need a Rust toolchain and the SDL2 bindings available on your system.
Once installed, run the build using Cargo:
$ git clone https://github.com/alberto-re/chip8-emu-rust
$ cd chip8-emu-rust
$ cargo build --release
$ ./target/release/chip8-emu-rust --version
chip8-emu-rust 1.0.0
Running the emulator is pretty straightforward, just specify using the --rom option the ROM to load at startup:
./target/release/chip8-emu-rust --rom roms/INVADERS
You can tweak the emulation speed and display scaling factor if needed. Add the --help option to see all the options available:
./target/release/chip8-emu-rust --help
A CHIP-8 emulator
Usage: chip8-emu-rust [OPTIONS] --rom <ROM>
Options:
-r, --rom <ROM>
--speed <SPEED> [default: 1000]
--scale <SCALE> [default: 16]
-h, --help Print help
-V, --version Print version
The original CHIP-8 specification had a 16 key hexadecimal keypad with the following layout:
1 | 2 | 3 | c |
---|---|---|---|
4 | 5 | 6 | d |
7 | 8 | 9 | e |
a | 0 | b | f |
The layout has been remapped onto a standard keyboard this way:
1 | 2 | 3 | 4 |
---|---|---|---|
q | w | e | r |
a | s | d | f |
z | x | c | v |
There are plenty of information about CHIP-8 available, here are the sources that I consulted the most: