Skip to content

abchouhan/chip-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chip-8

A simple CHIP-8 emulator/interpreter that can be played on the terminal!

Chip8TerminalTetrisDemo Chip8TerminalHiddenDemo

Usage

chip-8 [OPTIONS] [INPUT FILE]

with options:
-t, --terminal-mode
Use this option if the emulated display is to be output in the terminal.
-f, --font PATH
Path to custom font file (max 80 bytes).
-c, --clock-speed VALUE
Number of instructions the CPU executes per second (Hz). Default is 900 Hz.
-r, --refresh-rate VALUE
How often the display is updated in Hz. Default is 60 Hz.

Input

CHIP-8 Keypad Keyboard
123C
456D
789E
A0BF
1234
QWER
ASDF
ZXCV

Fonts

This emulator comes with a number of fonts that were used in some of the early interpreters.

CHIP-48 (Default) COSMAC VIP DREAM 6800 ETI-660

Building

Requirements:

  • A compiler supporting C++17
  • CMake

In the root folder of the repo, create a subfolder called 'build' and navigate into it:

mkdir build && cd build

Then setup the build process by generating a Makefile using CMake:

cmake ..

Finally, finish the build process using a compiler of choice:

make

The executable will be located in the 'build' subfolder.

TODO

  • Add audio for sound timer
  • Implement SUPER-CHIP instructions and allow user to toggle between them