A simple CHIP-8 emulator written in C++ using SDL2. This emulator loads and runs CHIP-8 ROMs, such as the classic IBM Logo, with support for basic opcode interpretation, input handling, and graphics rendering.
- β 64x32 monochrome display
- β SDL2-based rendering
- β Keyboard input support (mapped to CHIP-8 keys)
- β Basic instruction set implemented
- β IBM Logo ROM runs and displays correctly
- π οΈ Easy to extend with sound or debugger support
chip8-emulator/
βββ src/ # All source files
β βββ main.cpp
β βββ cpu.cpp/h # Core CPU emulation
β βββ display.cpp/h # Graphics output
β βββ input.cpp/h # Input handling
βββ README.md # This file
βββ .gitignore- C++17 or newer
- SDL2
CHIP-8 uses a 16-key hexadecimal keypad:
mathematica Copy Edit Original: Mapped to Keyboard:
1 2 3 C 1 2 3 4
4 5 6 D Q W E R
7 8 9 E A S D F
A 0 B F Z X C V
You can adjust key mappings in input.cpp if needed.
- Add sound (FX18, FX07)
- Add full instruction set
- Add debugging options (step mode, disassembler)
- Add unit tests
This project is open-source and licensed under the MIT License.
- Cowgod's CHIP-8 Technical Reference
- SDL2 for graphics/input
- Community contributions to CHIP-8 documentation and ROMs