/chip8-emu

Primary LanguageCGNU General Public License v3.0GPL-3.0

CHIP-8 Emulator written in C

What is CHIP-8

CHIP-8 is a interpreted programming language which was first used for DIY computer systems in the late 1970s and early 1980s. Fifteen years after CHIP-8 was introduced, the language was revived by Andreas Gustafsson, who created a CHIP-8 interpreter for the HP48 graphing calculator.

CHIP-8 specifications

  • 4KB RAM from location 0x000 to location 0xfff.
  • 16 general 8-bit registers, usually refered to as Vx, where x is a hexadecimal digit (0 through F).
  • I register: 16-bit register used to store memory addresses, so only the lowest 12 bits are usually used.
  • 2 special purpose 8-bit registers for delay and sound timers.
  • IP, SP 8-bit registers
  • 64x32-pixel monochrome display

Dependencies

For Debian-based sistems:

  • make
  • gcc
  • libsdl2-dev

Building from source

Clone the repository and go into the folder. There, run the following commands:

$ make -j$(nproc)
$ sudo make install

Running

In order to run the emulator you have to provide a CHIP-8 rom file. You can find some CHIP-8 rom files in the rom folder or on the internet:

$ chip8 UFO