A simple Chip-8 interpreter written as an exercise in learning more about emulation, Git(Hub), and the C++ language in general. The project uses SFML for graphics/audio and cxxopts for option parsing.
Currently, only base Chip-8 programs are supported (i.e. no Super Chip-8).
Building the project requires the following:
$ git clone --recurse-submodules https://github.com/sambrla/chip-8.git
$ cd chip-8
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=Release ..
$ make
> git clone --recurse-submodules https://github.com/sambrla/chip-8.git
> cd chip-8
> mkdir build
> cd build
> cmake -D SFML_ROOT=<path\to\SFML> ..
> cmake --build . --config Release
Run the interpreter by passing it a ROM file, e.g.
$ ./chip8 roms/myRom.ch8
Optional arguments may be specified to control execution speed (IPC), support high DPI displays, and toggle compatibility.
-i, --ipc IPC Instructions to execute per cycle (default: 9)
-r, --high-dpi Scale window for high DPI displays
-c, --compat Enable alternative shift and load behaviour. May be
required for some ROMs to work correctly
-h, --help Print help
The hex-based keypad used on OG hardware has been mapped as follows:
1 2 3 C 1 2 3 4
4 5 6 D Mapped to Q W E R
7 8 9 E --> A S D F
A 0 B F Z X C V
The interpreter can be paused by pressing Ctrl+P and reset by pressing Ctrl+R.
