An emulator of the popular Chip-8 interpreter from the mid 1970s It is made using the C programming language and the SDL2 graphics library It supports all games made for it. It was compiled and tested using the 32-bit mingw32 compiler on a windows 10 machine
To compile the code, go to the Chip8 directory and run the command:
mingw32-make
Then to start the emulator, change into the directory and start the main.exe file by also specifying the ROM you want to play, for example:
main.exe .\INVADERS
This emulator works with every Chip-8 game, and there is a Space Invaders ROM included with the repository for testing
On the original Chip-8 the keys were mapped as follows:
1 | 2 | 3 | C |
4 | 5 | 6 | D |
7 | 8 | 9 | E |
A | 0 | B | F |
In the emulator, the keys are mapped as:
1 | 2 | 3 | 4 |
Q | W | E | R |
A | S | D | F |
Y | X | C | V |
The keys can be remapped by changing the values of the keyboard_map
array located at the start of the src\main.c
file
As the Chip-8 does not define any clock cycles, the emulation speed is defined by the user/hardware.
Use the key O
to increase the delay and the key P
to decrease it.
By default, the delay is set to 0ms. The current delay is shown in the command prompt.