A Gameboy (DMG-01) emulator, implemented in Go.
References used include:
- The Gameboy CPU Manual
- The Nesdev Forum
- Gameboy Opcodes
- 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 individual tests in the Blargg cpu instruction roms (does not pass the combined tests due to need for bank switching).
- 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 -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.