Game Boy emulator
gameboy runs original Game Boy (DMG) programs in a window on your desktop, with sound and keyboard controls. It is built to be correct first: its CPU, timing and graphics are checked by published test ROMs.
What it does
- Runs
.gbROMs in an SDL2 window in the classic four shades of green. - Plays sound: both pulse channels, the wave channel and the noise channel, in stereo.
- Supports the common cartridge types: ROM-only, MBC1, and MBC3 banking (without the real-time clock).
- Has a turbo mode, held on a key or switched on for the whole run.
- Includes a headless runner,
gb_run_rom, that runs a ROM without a window, reads test results, scripts button presses and saves screenshots and audio. - Is tested by ROMs, not by eye. It passes blargg's
cpu_instrs,instr_timing,mem_timingandhalt_bugtests and rendersdmg-acid2pixel for pixel.
Who it is for
- Students learning how an emulator is put together, after the smaller CHIP-8 interpreter.
- Homebrew developers who want a second emulator to run their ROM on.
- People who want to play their own cartridge dumps of simple early games.
Use ROMs you have the right to use
No ROMs are bundled. Use homebrew released by its author, the test ROMs the repository's script downloads, or dumps you made from cartridges you own. Downloading commercial games you do not own is copyright infringement in most countries.
Limits
This is a version 1 emulator with a deliberately narrow scope:
- Original Game Boy only. No Game Boy Color mode and no link cable.
- No battery saves: progress stored on the cartridge is lost when you quit.
- No MBC3 real-time clock, and no MBC5 or later cartridge types.
- Graphics are drawn a whole line at a time, so a few games that change the picture mid-line show shearing.
- The controls cannot be remapped.
Platforms
Linux and Windows, on x64 and ARM64. You build it from source with CMake. See Install.