Just a tiny chip8 emulator using ncurses for it's TUI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Seth Stubbs 668c66ab35 Added SDL renderer 1 month ago
img added demo gif 6 months ago
roms added space invaders rom 6 months ago
src Added SDL renderer 1 month ago
.gitignore Added .gitignore 6 months ago
LICENSE.md Added MIT license 6 months ago
Makefile Added SDL renderer 1 month ago
README.md added demo gif 6 months ago

README.md

C8

C8 is a minimal Chip8 emulator written in C99. It's specification was based off of this pdf. The emulator was written in a day and tries to be as close to the specification as possible. The actual emulator is located in 2 files (src/chip.h & src/chip.c) and is designed to be modular in design and can easily be reused in another project with minor modifications.

DEMO

Compiling

Simply run make to compile using the CLang compiler.

make clean && make

or you can use a different C compiler by specifying CC, eg. to use the GNU C compiler

make CC=gcc

the output binary will be located at bin/c8

Usage

Pass the rom as the only argument to the binary, eg. to run the maze rom do

./bin/c8 roms/maze.ch8

The controls are mapped to the keyboard, here is a side by side for comparison

Chip-8:
╔═══╦═══╦═══╦═══╗
║ 1 ║ 2 ║ 3 ║ C ║
╠═══╬═══╬═══╬═══╣
║ 4 ║ 5 ║ 6 ║ D ║
╠═══╬═══╬═══╬═══╣
║ 7 ║ 8 ║ 9 ║ E ║
╠═══╬═══╬═══╬═══╣
║ A ║ 0 ║ B ║ F ║
╚═══╩═══╩═══╩═══╝

Keyboard:
╔═══╦═══╦═══╦═══╗
║ 1 ║ 2 ║ 3 ║ 4 ║
╠═══╬═══╬═══╬═══╣
║ Q ║ W ║ E ║ R ║
╠═══╬═══╬═══╬═══╣
║ A ║ S ║ D ║ F ║
╠═══╬═══╬═══╬═══╣
║ Z ║ X ║ C ║ V ║
╚═══╩═══╩═══╩═══╝