tchipi8

A CHIP-8 emulator (interpretor).

This program is able to execute a number of CHIP-8 programs. Almost all functionality is implemented except audio. From this awesome test suite, this implementation is able to run the first 6 tests (with some bugs here and there). More roms that have been tested available here.

Installation / Building

sudo zypper install SDL2-devel # On opensuse

sudo apt install libsdl2-dev # Debian/Ubuntu
shards install && crystal build --release src/tchipi8.cr
cp tchipi8 ~/bin/ # Assuming ~/bin is in $PATH

Usage

./tchipi path-to-rom

Plenty of ROMs available on the Internet, just make sure that they are compatible with COSMAC VIP CHIP-8 (avoid SUPER-CHIP or any other CHIP with a fancy prefix).

The CHIP-8 Keypad is mapped to the Keyboard as follows:

1   2   3   4       1   2   3   C
q   w   e   r   =>  4   5   6   D
a   s   d   f       7   8   9   E
z   x   c   v       A   0   B   F

Development

shards install
crystal spec
DEBUG=1 crystal run src/tchipi8 -- path-to-rom

Contributing

  1. Fork it (https://gitlab.com/ntumbuka/tchipi8/-/forks/new)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors