Skip to content
A chip-8 emulator written in Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
assets
roms
screenshots
.gitignore
LICENSE
README.md
cpu.go
cpu_test.go
main.go

README.md

CircleCI

go-8

A chip-8 emulator written in Go. I am trying to learn go-lang for fun and I have always been fascinated with emulators, so I decided to write one in Go. I am using the following manual as reference.

You'll need the drivers required by ebiten and you can find the relevant installation instructions here.

I wrote a blog post about this project which you can find here

Screen Shot

Test Instructions

- git clone http://github.com/h4ck3rk3y/go-8
- cd go-8
- go get -v -t -d ./...
- go test --cover

Build Instructions

You can build the program by

- git clone http://github.com/h4ck3rk3y/go-8
- cd go-8
- go get -v -t -d ./...
- go build main.go cpu.go

Run Instructions

Build the code and then

- ./main

Key Configuration

The original chip-8 consisted of a hexa decimal gamepad. I use the following mappings.

  • Your Key Board --> Chip 8
  • 1 --> 1
  • 2 --> 2
  • 3 --> 3
  • 4 --> C
  • Q --> 4
  • W --> 5
  • E --> 6
  • R --> D
  • A --> 7
  • S --> 8
  • D --> 9
  • F --> E
  • Z --> A
  • X --> 0
  • C --> B
  • V --> F

To Do

  • Make roms passable as command line arguments
  • Key board mapping in a configuration file
  • Configurable colors
  • Better unit tests for main.go. cpu.go has 98.8% coverage but overall the coverage drops significantly
You can’t perform that action at this time.