This repo contains a Chip-8 emulator and supporting development tools.
- Emulator (finished)
- Disassembler (in-progress)
- High-level language and assembler (planned)
- Plugin/editor (tentative)
The emulator is cross-platform with a terminal-based display. You'll need a recent version of Rust (> 1.50.0). To run the emulator, clone the repo and execute the following:
# /path/to/rip8
cargo run --release -- --rom=roms/1-chip8-logo.ch8
________________________________________________________________________________________________________________________________
________________________▇▇▇▇▇▇▇▇▇▇__▇▇________________________________________▇▇____________________▇▇▇▇________________________
____________________________▇▇__________▇▇▇▇__▇▇______▇▇▇▇____▇▇▇▇▇▇______▇▇▇▇▇▇__▇▇____▇▇____▇▇▇▇____▇▇________________________
____________________________▇▇______▇▇__▇▇__▇▇__▇▇__▇▇____▇▇__▇▇____▇▇__▇▇____▇▇__▇▇____▇▇__▇▇__________________________________
____________________________▇▇______▇▇__▇▇______▇▇__▇▇▇▇▇▇▇▇__▇▇____▇▇__▇▇____▇▇__▇▇____▇▇____▇▇________________________________
____________________________▇▇______▇▇__▇▇______▇▇__▇▇________▇▇____▇▇__▇▇____▇▇__▇▇____▇▇______▇▇______________________________
____________________________▇▇______▇▇__▇▇______▇▇____▇▇▇▇▇▇__▇▇____▇▇____▇▇▇▇▇▇____▇▇▇▇▇▇__▇▇▇▇________________________________
________________________________________________________________________________________________________________________________
________________________________________________________________________________________________________________________________
______________________▇▇▇▇▇▇▇▇▇▇______▇▇▇▇______________▇▇▇▇____▇▇▇▇▇▇▇▇▇▇______________________▇▇▇▇▇▇▇▇▇▇▇▇▇▇__________________
____________________▇▇▇▇▇▇▇▇▇▇▇▇▇▇__▇▇▇▇▇▇____________▇▇▇▇▇▇__▇▇▇▇▇▇▇▇▇▇▇▇▇▇__________________▇▇▇▇▇▇______▇▇▇▇▇▇________________
__________________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇____________▇▇▇▇▇▇__▇▇▇▇▇▇____▇▇▇▇▇▇______________▇▇▇▇▇▇__________▇▇▇▇________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇____________________▇▇▇▇▇▇______▇▇▇▇______________▇▇▇▇▇▇__________▇▇▇▇________________
________________▇▇▇▇▇▇____▇▇__▇▇____▇▇▇▇▇▇______________▇▇▇▇__▇▇▇▇▇▇______▇▇▇▇______________▇▇▇▇▇▇__________▇▇▇▇________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇▇▇▇▇▇▇______▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇▇▇________________▇▇▇▇▇▇______▇▇▇▇__________________
________________▇▇▇▇▇▇__▇▇______▇▇__▇▇▇▇▇▇▇▇▇▇▇▇▇▇____▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇▇▇________▇▇▇▇▇▇▇▇▇▇▇▇____________________
________________▇▇▇▇▇▇____▇▇▇▇▇▇____▇▇▇▇▇▇____▇▇▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇____▇▇▇▇▇▇__▇▇▇▇▇▇▇▇______▇▇▇▇▇▇____▇▇▇▇▇▇__________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇▇▇▇▇▇▇▇▇________________▇▇▇▇▇▇________▇▇▇▇▇▇________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇▇▇▇▇▇▇________________▇▇▇▇▇▇____________▇▇▇▇________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇______________________▇▇▇▇▇▇____________▇▇▇▇________________
________________▇▇▇▇▇▇______________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇__▇▇__▇▇______▇▇▇▇▇▇__▇▇▇▇▇▇____________▇▇▇▇________________
__________________▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇__▇▇__▇▇▇▇▇▇▇▇________▇▇▇▇▇▇________________
____________________▇▇▇▇▇▇▇▇▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇______▇▇__▇▇____▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇__________________
______________________▇▇▇▇▇▇▇▇▇▇____▇▇▇▇▇▇______▇▇▇▇__▇▇▇▇▇▇__▇▇▇▇▇▇______▇▇__▇▇__▇▇▇▇▇▇______▇▇▇▇▇▇▇▇▇▇▇▇▇▇____________________
________________________________________________________________________________________________________________________________
________________________________________________________________________________________________________________________________
__________________________▇▇▇▇▇▇____▇▇▇▇______▇▇▇▇__▇▇______________▇▇▇▇____________▇▇__▇▇________▇▇▇▇__________________________
____________________________▇▇____▇▇____▇▇__▇▇______▇▇▇▇▇▇________▇▇______▇▇____▇▇______▇▇▇▇▇▇__▇▇____▇▇________________________
____________________________▇▇____▇▇▇▇▇▇▇▇____▇▇____▇▇______________▇▇____▇▇____▇▇__▇▇__▇▇______▇▇▇▇▇▇▇▇________________________
____________________________▇▇____▇▇____________▇▇__▇▇________________▇▇__▇▇____▇▇__▇▇__▇▇______▇▇______________________________
____________________________▇▇______▇▇▇▇▇▇__▇▇▇▇______▇▇▇▇________▇▇▇▇______▇▇▇▇▇▇__▇▇____▇▇▇▇____▇▇▇▇▇▇________________________
________________________________________________________________________________________________________________________________(press space to shut it down)
-
Windows: any
-
Linux/MacOS: the terminal should support Kitty's keyboard protocol (specifically key release and key repeat). On Linux, this includes at least the following terminals/libraries:
footWezTermnotcursescrosstermVimNeovimEmacsviakkpkakounedteHelixfar2lawrit
The Chip8 keyboard is mapped to the top-left corner of a QWERTY keyboard:
// ----Chip8---- ---QWERTY----
// 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
Pressing space shuts down the emulator.