CHIP8 is an interpreted language that runs on a virtual machine. It was invented in the mid 1970s to allow video games to be more easily programmed for computers at that time. You can view the CHIP8 instruction set here.
This CHIP8 interpreter was written in C using the ncurses library. Additionally, it comes with a DEBUG mode where you can view the state of the virtual machine while running a CHIP8 program.
This interpreter passes all of the opcode tests.
In order to build the project, you will need to have ncurses installed.
sudo apt-get install libncurses5-dev libncursesw5-dev
Once ncurses is installed, you can run use the following command to build the project.
make build
There are some test ROMs in the /roms
folder. Once the project has been compiled, you can use the following command to run it with a ROM.
chip8 ./path/to/rom.ch8
Additionally, you can pass the -d
flag to run the the interpreter in debug mode to step through the ROM in a debug mode.
chip8 -d ./path/to/rom.ch8