I moved this repository over to my new GitHub account. You can find the old repo here.
This is a small learning project to get familiar with emulator development, the Rust programming language and the SDL2 library.
Disclaimer: As I am still learning Rust, my code is probably pretty terrible and full of bugs ... so you are forewarned.
If you want to try the emulator yourself, just follow the steps below:
- download the latest version here
- unpack the archive
- run
chip-8-emulator.exe
- when asked if you want to continue with the default configuration, input
y
for yes - done!
Of course, my welcome program is pretty boring so just grab some programs from the internet and have fun. I've linked to
a few programs that I've tried myself below. Before you can actually run other programs you need to
change the program_path
attribute in the config file (./config/chip8-emulator.toml
) either via the menu or by
editing the file directly.
If you want to use other fonts, (again) just grab some from the internet. As with the program, you need to change
the font_path
attribute in the config. I've linked some fonts below that I could find.
Note: The fonts are often provided as text files. In order for the emulator to be able to interpret them, you need to convert to binary first. The result should be an 80 byte (1 byte per row * 5 rows per char * 16 chars) long binary file.
The original keypad was organized like this:
1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F
I've mapped these keys to the following:
1 2 3 4
Q W E R
A S D F
Z X C V
You can also use Y
instead of Z
.
Thanks to all the authors of these resources for their great effort!
- Rust in Action
- Guide to making a CHIP-8 emulator - Tobias V. Langhoff
- CHIP-8 emulator in Rust. Part 1 - Dhole's blog
- Simple DirectMedia Layer - Wikipedia
- CHIP-8 - Wikipedia
Thanks to zZeck for collecting all of these fonts!
Thanks to all the people who wrote these programs!
but can it run crysis?
Source code in this repository is licensed under the MIT license. For more information, see the included LICENSE file.