A cross-platform CHIP-8 interpreter/emulator written in Odin using raylib. CHIP-8 is considered by many to be a good entry point into emulator development.
Tetris (debug display enabled)
Ensure Odin is installed and available on system PATH.
roms/TETRIS can be replaced with any CHIP-8 ROM path. A few test ROMs and games are included in this repository.
git clone https://github.com/oliverbaileysmith/chip8-odin.git
cd chip8-odin
odin build ./src -out:chip8.exe
chip8 roms/TETRIS
git clone https://github.com/oliverbaileysmith/chip8-odin.git
cd chip8-odin
odin build ./src -out:chip8
./chip8 roms/TETRIS
I chose to implement the COSMAC VIP keypad layout at right, which I've mapped to the QWERTY keyboard at left:
QWERTY keyboard: COSMAC VIP keypad:
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
Debug controls:
ito toggle debug displaypto toggle emulation pausetwhen paused to decrement delay and sound timersspacewhen paused to advance program counter by one instruction
[to decrease instructions executed per frame]to increase instructions executed per frameescto quit
