A Gameboy (DMG-01) emulator, implemented in Go.
References used include:
- The Gameboy CPU Manual
- The Nesdev Forum
- Gameboy Opcodes
- Gameboy Emulation in Javascript
- Blargg Gameboy Test Roms
Graphics and keyboard input are implemented using Pixel.
This project is very much a work in progress. Current milestones reached:
- Successfully runs the DMG-01 boot rom
- Passes tests in the cpu instruction roms from the Blargg test set.
- Tetris is playable
Key remaining work:
- Sound support
- Cartridge bank switching
Some prerequisite libraries are needed for Pixel, see Pixel requirements for more details.
You can build and install this emulator using go get
:
$ go get -u github.com/theothertomelliott/gameboy/cmd/gameboy
Assuming $GOPATH/bin is on your PATH, once installed, you can run the gameboy
binary at the commandline, specifying a cartridge ROM filename as argument:
$ gameboy path/to/rom.gb
You may also optionally provide a path to the Gameboy boot ROM.
By default, the emulator serves a debugger web app on port 8080. Visit http://localhost:8080 once the emulator is running to debug.