CHIP-8 emulator/interpreter made in C and C++, with SDL2 for graphics.
Makefile specified for ARM based macOS with SDL2.
Inspect include directives in
display.cfor SDL2 implementation.
Supports usage of bytes.hex to convert hex digits into a machine instruction program tests/test.bin, using make test.
Specifications of emulation, in which some vary from the original CHIP-8/SUPER-CHIP design components.
- Direct program access to 4 kilobytes of contiguous RAM.
- Display is 64 x 32 pixels (adjustable) monochrome.
- 16 8-bit adjacent general purpose registers & 1 16-bit register for indexing RAM.
- 128 bytes of upwards growing Stack on a separate memory space from RAM (practically implies "unlimited" stack)
- Two 8-bit timers (delay & sound).
- Fonts loaded from
0x050on RAM. - Programs loaded from
0x200on RAM. - Post 1990s instruction set execution for
0x6and0xEop half-bytes. - Prioritization of
BNNNoverBXNNinstruction formats. - Big-endian opcodes.
- Single 16-bit instruction cycle.
An article for understanding the instruction set for the CHIP-8.
Sufficient background information about the architecture can be found on Wikipedia