A CHIP-8 emulator written in C++.
Future extensions:
- Add sound
- Create basic GUI taskbar, for loading ROMs etc.
- Create debugger
Referenced from the following links:
- https://austinmorlan.com/posts/chip8_emulator/
- https://tobiasvl.github.io/blog/write-a-chip-8-emulator/
- C++17 compatible compiler (clang, g++, MSVC)
- CMake 3.16 or later
- SDL2
Install SDL2 via Homebrew:
brew install sdl2sudo apt-get install libsdl2-devDownload SDL2 development libraries from libsdl.org
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildIf CMake can't find SDL2, specify the path:
cmake -S . -B build -DSDL2_DIR=/opt/homebrew/lib/cmake/SDL2 -DCMAKE_BUILD_TYPE=ReleaseThe emulator requires three command-line arguments:
./build/mayochip8 <scale> <delay> <rom_path>scale: Window scale factor (e.g., 10 for 10x zoom)delay: Cycle delay in milliseconds (e.g., 2)rom_path: Path to a CHIP-8 ROM file
./build/mayochip8 10 2 roms/test_opcode.ch8X→ 01-3→ 1-3Q-E→ 4-6A-D→ 7-9, A-CZ-C→ D-E, FESC→ Quit