Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
chip8/README.md
2022-03-30 10:33:26 -04:00

2.4 KiB

chip8

sourcehut GitHub
mirror ryne.moe
mirror

This is a CHIP-8 emulator that I implemented in C++!

Right now it only emulates the SCHIP instruction set, but it can already play many modern roms found online. There's a basic memory viewer and debugger available as well.

My goal is not to create an extremely fast or optimized emulator, but be easy to read and understand for those who wish to create their own CHIP-8 emulator.

example result

Usage

It should compile out of the box on Windows, macOS and Linux and it includes a basic dear imgui interface. There's also some ROMs included in the repository for convenience. Once you click on a ROM, it will start immediately.

Debugger

Using the debugger you can step instruction by instruction, stop or restart the program and see the instruction being executed and the surrounding program. Unfortunately it's not very advanced at the moment.

Compiler

This emulator also comes with a basic compiler that takes a C-style language as input and can spit out valid CHIP-8 code:

var count = 3;
label(main);
count += 3;
draw_char(0, 5, count)
jump(main);