Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Game Boy / Gameboy Color emulator for iOS, Mac, Raspberry Pi, Windows and Linux
Failed to load latest commit information.
platforms Added support for Raspberry Pi 2
src fixed audio latency
.gitignore gitignore updated
LICENSE added license Update


Copyright © 2012 by Ignacio Sanchez

Gearboy is a Nintendo Game Boy / GameBoy Color emulator written in C++ that runs on iOS, Raspberry Pi, Mac, Windows and Linux.

The main focus of this emulator is readability of source code with very high compatibility.

Follow me on Twitter for updates:

If you want new features ask for them but don't forget donating, thanks :)

PayPal - The safer, easier way to pay online!



  • Highly accurate CPU emulation, passes from blargg's tests.
  • Accurate instruction timing, passes from blargg's tests.
  • Memory Bank Controllers (MBC1, MBC2, MBC3 with RTC, MBC5), ROM + RAM and multicart cartridges.
  • Accurate LCD controller emulation. Background, window and sprites, with correct timings and priorities.
  • Mix frames: Mimics the LCD ghosting effect seen in the original Game Boy.
  • Sound emulation using SDL Audio and Gb_Snd_Emu library.
  • Game Boy Color support.
  • Integrated disassembler. It can dump the full disassembled memory to a text file or access it in real time.
  • Saves battery powered RAM cartridges to file.
  • Compressed rom support (ZIP deflate).
  • Multi platform. Runs on Windows, Linux, Mac OS X, Raspberry Pi and iOS.

Todo List

Save Files Note

If you don't have access to an Apple developer account and are using older versions of Gearboy (such as from emu4ios), you can use a hex editor to convert between a .gearboy file and a .sav file. In particular, a .gearboy file has about 40 extra bytes at the beginning of the file. If you remove these 40 bytes and rename to a .sav extension the file should be compatible with other emulators. You can also reinsert the 40 bytes to convert a .sav file to .gearboy. This should work for Pokemon RBY. If you are still having problems, see if you can find an SRAM map for your game and double check that the offset matches.

Compiling Instructions

The best way of compiling Gearboy is by using one of the IDE projects provided for each platform.

For all desktop platforms you will need SDL 2 and Qt 5 SDKs installed and configured.


  • Install Xcode for Mac OS X. You need iOS SDK 8 or later.
  • Build the project.
  • Run it on real hardware using your iOS developer certificate. Make sure it compiles on Release for extra optimizations.
  • For jailbroken devices use the jailbreak branch.

Raspberry Pi 2 - Raspbian

  • Install and configure SDL 2 for development:
sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg8-dev libtiff5-dev libwebp-dev automake
cd ~
tar zxvf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3 && mkdir build && cd build
../configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl --host=armv7l-raspberry-linux-gnueabihf
make -j 4
sudo make install
  • Use make -j 4 to build the project.
  • Use export SDL_AUDIODRIVER=ALSA before running the emulator for the best performance.


  • You need Visual Studio 2010 (Express Edition will do but you won't be able to install the Qt Add-in).
  • Install the Qt 5 SDK for Windows.
  • Install the Qt 5 Visual Studio Add-in and point it to the Qt SDK.
  • Install and configure SDL 2 for development.
  • In order to use OpenGL extensions I used GLEW. This is because of a bug in QGLFunctions. Make sure the GLEW headers and libs are configured within VC++.
  • Open the Gearboy Visual Studio project and build.

Mac OS X

  • You need Qt Creator, included in the Qt 5 SDK.
  • Install Xcode and run xcode-select --install in the terminal for the compiler to be available on the command line.
  • Install the Qt 5 SDK for Mac OS.
  • Download SDL 2 source code. Then run this three commands .configure make sudo make install on the terminal.
  • Open the Gearboy Qt project and build.


  • You need Netbeans 7.3 or later.
  • Install Qt 5 development dependencies (Ubuntu: sudo apt-get install qt5-default qttools5-dev-tools).
  • Install OpenGL development dependencies (Ubuntu: sudo apt-get install freeglut3-dev).
  • Install SDL 2 development dependencies (Ubuntu: sudo apt-get install libsdl2-dev).
  • In order to use OpenGL extensions I used GLEW dependencies (Ubuntu: sudo apt-get install libglew1.8-dev). This is because of a bug in QGLFunctions.
  • Open the Gearboy Netbeans project and build.
  • Alternatively you can use make -f nbproject/ SUBPROJECTS= .build-conf to build the project.
  • In Ubuntu 13.10 I had to export SDL_AUDIODRIVER=ALSA before running the emulator for the sound to work properly.

Accuracy Tests

Compared to other emulators: see here.

Tests from blargg's test roms:




Gearboy - Nintendo Game Boy Emulator

Copyright (C) 2012 Ignacio Sanchez

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Something went wrong with that request. Please try again.