EchoesOf8 - A CHIP-8 Emulator
Warning
This emulator does not support the expanded SUPER CHIP/CHIP-48 instruction set.
- Full CHIP-8 support, including quirks, graphics, and sound.
- Quirks can be toggled as needed.
- The speed of the emulator is adjustable (cycles per frame).
- Debug UI (press
h
to toggle it, andspace
to pause/unpause). - Can load ROMs at runtime and reset the emulator's state.
- Support for instruction and memory (read/write) breakpoints.
- Uses recursive descent disassembly and updates it at runtime based on memory
modifications andJMP V0, addr
instructions. - Additional utilities include an assembler, recursive descent and
linear disassemblers, and a hexdumper.
# Install dependencies
## Ubuntu
sudo apt install cmake libsdl2-dev
## Fedora
sudo dnf install cmake SDL2-devel
## macOS
brew install SDL2 cmake
# Build the project
./build.sh
# Run the emulator
./build/eo8 <rom>
# Debug mode
./build/eo8 <rom> --debug
Note
On macOS, you'll likely get a security error about the SDL2 framework.
You can accept the warning by going to Settings > Privacy & Security
,
scrolling down, and clicking Allow
for the security warning.
When you re-run the executable, you'll be allowed to proceed.
The left side of the keyboard has been allocated as the keypad for the CHIP-8, e.g., the following keys on a QWERTY layout:
1 | 2 | 3 | 4 |
---|---|---|---|
Q | W | E | R |
A | S | D | F |
Z | X | C | V |
There are various ROMs you can try in the tests
folder.
- Implement a compiler for a C-like language.
- Write a decompiler that decompiles to the above C-like language.
- Rewrite the assembler to have a proper lexer.
- Include macro and image loading support in the assembler.
- Implement the SUPER CHIP/CHIP-48 instructions.
- Implement dynamic recompilation for fun.
A collection of the resources I used during development that helped a lot.