CHIP-8 interpreter written in C using SDL2.
SDL2 is used to render the graphics and handle the input. This library can be installed by:
- using a package manager (e.g.
brew
,apt
,pacman
,dnf
) - downloading one of the precompiled binaries
- downloading the source code and compiling it
git clone https://github.com/jacob-thompson/chip-8.git
cd chip-8
make
./chip8 <rom> <rate>
For roms in the roms/
directory, you can omit the rom's file path and extension:
./chip8 spockpaperscissors
Note
<rom>
is the path to the ROM file<rate>
is the rate at which instructions should be executed (in Hz)- The default and maximum instruction rate is 1000 Hz
- The instruction rate is rounded to the nearest divisor of 1000 Hz (e.g. 500 Hz, 250 Hz, 125 Hz, ...)
The controls are mapped to the following keys:
1 2 3 4
Q W E R
A S D F
Z X C V