CHIP-8 / CHIP-8 HIRES / SCHIP Emulator writen in GO with simple code to be easy to be studied and understood.
| CHIP-8 Space Invaders Game | Superchip (SCHIP) Spacefight 2091! |
|---|---|
![]() |
![]() |
| Blinky (Color theme) | Single Dragon (Color Theme) |
|---|---|
![]() |
![]() |
| CHIP-8 HiRes Astro Dodge (Color theme) | On-screen Debug (Color theme) |
|---|---|
![]() |
![]() |
Pause and resume emulation
Reset emulation
Step Forward CPU Cycles for Debug
Step Back (Rewind) CPU Cycles for Debug (Need to be activated on command line with -Rewind)
On-screen Debug mode
Increase and Decrease CPU Clock Speed
Color Themes
Save States
Fullscreen
Binary and Hexadecimal rom format
Emulation Status from all games I have to test
-
Run:
$./chip8 [options] ROM_NAME
-
Options:
-DebugEnable Debug Mode-DrawFlagEnable Draw Graphics on each Drawflag instead @60Hz-Rewind ModeEnable Rewind Mode-SchipHackEnable SCHIP DelayTimer hack mode to improve speed-helpShow Command Line Interface options
- Keys
-
Original COSMAC Keyboard Layout (CHIP-8):
123C456D789EA0BF -
Original HP48SX Keyboard Layout (SuperChip):
789/456*123-0._+ -
Keys used in this emulator:
1234QWERASDFZXCVP: Pause and Resume emulationI: Step back (rewind) one CPU cycle in Pause ModeO: Step forward one CPU cycle in in Pause ModeK: Create Save StateL: Load Save State6: Change Color Themes7: Decrease CPU Clock Speed8: Increase CPU Clock Speed9: Enable / Disable Debug Mode0: ResetJ: Show / Hide FPS CounterH: Switch DrawMode (@DrawFlag OR @60Hz)N: Enter / Exit Fullscreen modeM: Change resolutionESC: Exit emulator
-
Install GO:
brew install go -
Compile:
go build -ldflags="-s -w" chip8.go
GO allows to create a Windows executable file using a MacOS:
brew install mingw-w64
- 32 bits:
env GOOS="windows" GOARCH="386" CGO_ENABLED="1" CC="i686-w64-mingw32-gcc" go build -ldflags="-s -w"
- 64 bits:
env GOOS="windows" GOARCH="amd64" CGO_ENABLED="1" CC="x86_64-w64-mingw32-gcc" go build -ldflags="-s -w"
-
If you receive the message when running the executable, you need to ensure that the video drivers supports OpenGL (or the virtual driver in the case of virtualization).
-
If you receive this message : "APIUnavailable: WGL: The driver does not appear to support OpenGL", please update your graphics driver os just copy the Mesa3D library from https://fdossena.com/?p=mesa/index.frag (opengl32.dll) to the executable folder (really slow).
brew install upx
upx <binary_file>
Instructions to build using Ubuntu.
sudo apt install pkg-config libgl1-mesa-dev licxi-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev mesa-utils build-essential xorg-dev libasound2-dev upx
- 32 bits:
env GOOS="linux" GOARCH="386" CGO_ENABLED="1" go build -ldflags="-s -w"
- 64 bits:
env GOOS="linux" GOARCH="amd64" CGO_ENABLED="1" go build -ldflags="-s -w"
upx <binary_file>
Cowgod's Chip-8 Technical Reference
How to write an emulator (CHIP-8 interpreter) — Multigesture.net
Thomas Daley Wiki (Game Compatibility)





