chip-8

chip-8 emulator
Contents

Clone

git clone https://git.jun.sh/chip-8.git

This is a CHIP-8 Virtual Machine implementation in C, utilizing SDL for graphical output. It supports running validw .ch8 files, with the resolution scaled to 20x over the original for better usability.

Timer and sound are not yet implemented, but adding them is straightforward. The original CHIP-8 system produced a simple 1 bit beep sound.

Usage

You do need to install SDL on your system. So on something like fedora this would be.

sudo dnf install SDL2-devel -y

The Makefile just links against that. There is a breakout.ch8, it’s specifically “Breakout” by Caremlo Cortez, 1979. More roms can easily be found on the interwebs.

git clone git clone git://git.arjunchoudhary.com/chip8_c
make
./chip8 /path/to/rom_file.ch8

Resources

This was only done as a learning exercise to implement the fundamental opcode fetch -> decode -> execute lifecycle. Do not use this as a reference implementation. Resources I used for this project were:-