Chip-8C is a Chip-8 emulator written in C by Jonathon Orsi.
$ git clone https://github.com/orsi/chip8c
$ cd chipc
$ make
make
will compile to ./build/chip8c
$ ./build/chip8c path/to/chip8roms/file.name
Chip8C uses the SDL2 library for both graphics and audio output. You can download the library here. You will most likely have to edit the makefile
and change the LDFLAGS
path to where your version of SDL2 is installed. You may also have to change -framework SDL2 -F /Library/Frameworks/
to -l SDL2 -L /Library/Frameworks/
, i.e. changing the compiler flags to recognize SDL2 as a library rather than framework, depending on your installation.
FILES = ./src/*.c
FLAGS = -o ./build/chip8c
LDFLAGS = -framework SDL2 -F /Library/Frameworks/ -I /Library/Frameworks/SDL2.framework/Headers
chip8c:
clang $(FILES) $(FLAGS) $(LDFLAGS)
- Chip-8 Wikepedia
- cookerlyk/Chip8 - C code reference
- How to write an emulator (CHIP-8 interpreter) - Lawrence Muller - More in-depth details on opcode functionality
- BC_test.ch8 and BC_test.txt for validating each opcode