In this repository you will find an emulator for the CHIP-8 console, written from scratch in C++.
Thanks to Austin Morlan for the excellent guide on how to develop it. You can read it here.
- C++17 compatible compiler (e.g., GCC or Clang)
- CMake (3.10 or higher)
- SDL2 for graphics and input handling
You can build the project easily using CMake. Open your terminal in the project's root folder and run:
mkdir build
cd build
cmake ..
makeOnce compiled, you can run the emulator by providing the window width, window height, and the path to a CHIP-8 ROM file.
./chip8_emulator <width> <height> <path_to_rom.ch8>Here! CHIP-8 Archive - Games for CHIP-8
The original CHIP-8 used a 16-key hexadecimal keypad (0-F). This emulator maps the original keys to the left side of your keyboard as follows:
| Keyboard | CHIP-8 Hex Key |
|---|---|
| 1, 2, 3, 4 | 1, 2, 3, C |
| Q, W, E, R | 4, 5, 6, D |
| A, S, D, F | 7, 8, 9, E |
| Z, X, C, V | A, 0, B, F |
- ESC: Close the emulator.