Skip to content
/ nchip8 Public

CHIP-8/SCHIP interpreter powered by SDL2 & Dear ImGui.

License

Notifications You must be signed in to change notification settings

inunix3/nchip8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nCHIP-8

A CHIP-8/SCHIP interpreter, written in C++17 with the use of SDL2 and Dear ImGui for UI. It's customizable and has debug capabilities!

Video

Screenshots

Written just for fun.

Features

  • Full SCHIP support
  • Sound support (Waveforms: sine, square and saw)
    • Changeable frequency and dB level
  • Display colors are in RGB and they can be changed
  • Two keypad mappings: the original COSMAC VIP and the modern one (which is used by most other interpreters)
  • You can set custom CPU frequency value
  • You can change the RANDOM seed (useful for debugging)
  • If some games don't have mood to function properly, you can try to make them feel better by touching these quirks:
    • BNNN: use V0 as the offset
    • DXYN: horizontal wrapping
    • DXYN: vertical wrapping
    • 8XY6 & 8XYE: set VX to VY
    • 8XY1, 8XY2 and 8XY3: reset VF
    • FX55 & FX65: increment the I register
    • DXY0: draw 8x16 sprite in lo-res mode
  • Debug capabilities:
    • Disassembler
    • Set, edit and remove breakpoints (they can also be named)
    • View stack
    • View and modify registers
    • Instruction executor
    • Keypad, in which buttons are held until they are released by second click (useful in the STEP mode)

Building

You can build simply by creating build directory, going to it and calling the cmake (e.g. cmake ..)

Optionally, you can install nchip8 by typing sudo cmake --install .

Usage

Just type ./nchip8 (or nchip8 if you've installed it)!

For certain games you may like to change the amount of cycles per second, colors, etc.

Todo

  • Ability to optionally disable flickering
  • Add pixel fading to smooth out the flickering
  • Support for SCHIP
  • Support for XO-CHIP
  • More debug features
    • Watch window
    • Memory view (and editor)
    • Logger
    • Add more controls to the existing tools
  • CLI options
  • Some kind of library that has a list of games, and for each game one can specify quirks and other options.

Used resources

Tobias' guide

Wikipedia article

CHIP-8 test suite

Instruction set reference

List of most known CHIP-8 extensions

Collections of ROMs for CHIP-8

CHIP-8 Archive

Mastering SuperChip

SuperChip investigations

Original SCHIP spec