An implementation of the Chip-8 emulator written in Rust.
Technically, it is an interpreter and not an emulator.
The famous IBM rom on full display.
Test rom for digits all passing
A simple video game rom
Space Invader ROM
Space Invader ROM Gameplay
Pull the repo, cd into the directory on your CLI.
git pull https://github.com/morukele/Chip-8
cd file/path/to/chip-8
To run the CHIP-8 emulator, use the command-line interface. Below are examples of how to use the emulator with various options.
cargo run -- -r ROM-NAME
This runs the emulator with default settings and loads the specified CHIP-8 ROM file.
Here are the options available
-r
,--rom
Name of CHIP-8 ROM file (remember to specify the extension) [default: 1-chip8-logo]-s
Set the scale of the display [default: 10]-h
,--help
Print help-V
,--version
Print version
cargo run -- -r ROM-NAME -s 10
This runs the emulator with the specified ROM file and the specified scale factor of 1O
The CHIP-8 was designed for AZERTY keyboards.
The CHIP-8 has a hexadecimal keypad with 16 keys (0x0 to 0xF). This layout is mapped to an AZERTY keyboard as follows:
CHIP-8 Key | AZERTY Key |
---|---|
1 |
& |
2 |
é |
3 |
" |
C |
' |
4 |
a |
5 |
z |
6 |
e |
D |
r |
7 |
q |
8 |
s |
9 |
d |
E |
f |
A |
w |
0 |
x |
B |
c |
F |
v |
- CHIP-8 keys are mapped to the AZERTY keyboard as closely as possible.
- The keys are chosen to approximate a physical arrangement similar to the CHIP-8 keypad.