Skip to content

william-swy/chip-8-emulator

Repository files navigation

chip-8-emulator

A C++ emulator for Chip8

Samples

IBM-logo Figure 1. IBM logo

pong Figure 2. The game pong

Keyboard Bindings

Original Chip 8 Key Set

1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F

Key Set Mapping To A Modern Keyboard

1 2 3 4
Q W E R
A S D F
Z X C V

Build instructions

It is recommended to use vcpkg as the package manager as it will easily resolve dependencies. Also an in source build is prohibited as it pollutes the source directory

With vcpkg

mkdir build
cmake -Bbuild -DCMAKE_TOOL_CHAIN_FILE=<vcpkg_install_dir/scripts/buildsystems/vcpkg.cmake>

Without vcpkg

mkdir build
cmake -Bbuild

However the caveat is that you must provide the dependencies. The dependencies can be found in vcpkg.json

Run instructions

The binary chip8_emulator is the application that will run and should be used like so: ./chip8_emulator <path to rom to be loaded>. The rom folder in the source directory provides some sample roms that can be tested out.

The binary chip8_emulator_tests is the test suite for the emulation logic and can be simply run like so: ./chip8_emulator_tests. All tests should pass.

References