Skip to content
master
Go to file
Code

README.md

CHIP-8 / CHIP-8 HIRES / SCHIP Emulator

CHIP-8 / CHIP-8 HIRES / SCHIP Emulator writen in GO with simple code to be easy to be studied and understood.

Optional GUI (Graphical user interface) made with fyne.io.

CHIP-8 Space Invaders Game Superchip (SCHIP) Spacefight 2091!
invaders invaders
Blinky (Color theme) Single Dragon (Color Theme)
blinky singledragon
CHIP-8 HiRes Astro Dodge (Color theme) On-screen Debug (Color theme)
astro debug
Optional GUI Game selector screen
MainDark GamesDarkSchip

Features

  • 100% Pause and resume emulation
  • 100% Reset emulation
  • 100% Step Forward CPU Cycles for Debug
  • 100% Step Back (Rewind) CPU Cycles for Debug (Need to be activated on command line with -Rewind)
  • 100% On-screen Debug mode
  • 100% Increase and Decrease CPU Clock Speed
  • 100% Color Themes
  • 100% Save States
  • 100% Fullscreen
  • 100% Binary and Hexadecimal rom format
  • 100% Emulation Status from all games I have to test
  • 70% Optional GUI

EMULATOR Build Instructions

  1. MAC
  • Install GO:

    brew install go

  • Install library requisites:

    go get github.com/faiface/pixel/pixelgl

    go get github.com/faiface/beep

    go get github.com/faiface/beep/wav

    go get github.com/faiface/beep/speaker

  • Compile:

    go build -ldflags="-s -w" chip8.go

  1. Windows
  • Install GO (32 bits):

    https://golang.org/dl/

  • Install GCC / mingw-w64

    https://mingw-w64.org/doku.php/download/mingw-builds

  • Add GO and Mingw-64 bin folder in PATH variable

  • Install requisites:

    go get github.com/faiface/pixel/pixelgl

    go get github.com/faiface/beep

    go get github.com/faiface/beep/wav

    go get github.com/faiface/beep/speaker

  • If you receive some glfw missing file error, download the zip file from https://github.com/go-gl/glfw and extract the archive into the folder $GOPATH\vendor\github.com\go-gl\glfw\v3.2

  • Compile:

    go build -ldflags="-s -w" chip8.go

EMULATOR Usage

  1. Run:

    $./chip8 [options] ROM_NAME

  • Options:

    -Debug Enable Debug Mode

    -DrawFlag Enable Draw Graphics on each Drawflag instead @60Hz

    -Rewind Mode Enable Rewind Mode

    -SchipHack Enable SCHIP DelayTimer hack mode to improve speed

    -help Show Command Line Interface options

  1. Keys
  • Original COSMAC Keyboard Layout (CHIP-8):

    1 2 3 C

    4 5 6 D

    7 8 9 E

    A 0 B F

  • Original HP48SX Keyboard Layout (SuperChip):

    7 8 9 /

    4 5 6 *

    1 2 3 -

    0 . _ +

  • Keys used in this emulator:

    1 2 3 4

    Q W E R

    A S D F

    Z X C V

    P: Pause and Resume emulation

    I: Step back (rewind) one CPU cycle in Pause Mode

    O: Step forward one CPU cycle in in Pause Mode

    K: Create Save State

    L: Load Save State

    6: Change Color Themes

    7: Decrease CPU Clock Speed

    8: Increase CPU Clock Speed

    9: Enable / Disable Debug Mode

    0: Reset

    J: Show / Hide FPS Counter

    H: Switch DrawMode (@DrawFlag OR @60Hz)

    N: Enter / Exit Fullscreen mode

    M: Change resolution

    ESC: Exit emulator

GUI Build Instructions

  1. MAC
  • Install GO:

    brew install go

  • Install requisites:

    go get gopkg.in/ini.v1

    go get golang.org/x/image/colornames

    go get fyne.io/fyne

  • Compile:

    go build -ldflags="-s -w" Chip8GUI.go

  1. Windows

GUI Usage

  1. Open the program, configure emulator ROM paths

  2. Restart the program to update the Games Tab

Documentation

Chip-8

Cowgod's Chip-8 Technical Reference

How to write an emulator (CHIP-8 interpreter) — Multigesture.net

Wikipedia - CHIP-8

trapexit chip-8 documentation

Thomas Daley Wiki (Game Compatibility)

David Winter Documentation

Chip-8 Database

Archive chip8.com

Columbia University - Columbia University

Tom Swan Documentation

Superchip (SCHIP)

HP48 Superchip

SCHIP

Chip-8 Reference Manual

Chip-8 Extensions

CHIP‐8 Extensions Reference

CHIP‐8 Extensions (Github)

Chip8 Hybrids

EMMA02 Opcodes Documentation

MegaChip

GUI

Fyne.io

Go-ini

Emulator TODO LIST:

  1. Correct minor problems reported in Emulation Status
  2. Emulate CHIP-8X
  3. Emulate MEGA-CHIP

GUI TODO LIST:

  1. Games Tab: Show image of the games
  2. Reload game list when update paths
  3. Add support for Hex roms
  4. Finish options (Debug, Pause...) in config screen
  5. Its currently not running on windows, apparently others are having same issues

About

Chip-8 / Chip8 HiRes / SuperChip (SCHIP) Emulator writen in GO language.

Resources

Packages

No packages published
You can’t perform that action at this time.