Sega Master System / Game Gear emulator for iOS, Mac, Raspberry Pi, Windows and Linux
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Copyright © 2013 by Ignacio Sanchez

Build Status

Gearsystem is a Sega Master System / Game Gear emulator written in C++ that runs on iOS, Raspberry Pi, Mac, Windows and Linux.

Follow me on Twitter for updates:


  • iOS (Jailbreak): Cydia. You can open rom files from other apps like Safari or Dropbox. They can be placed in /var/mobile/Media/ROMs/Gearsystem too. Save files are placed in /var/mobile/Library/Gearsystem
  • iOS: Build Gearsystem with Xcode and transfer it to your device. You can open rom files from other apps like Safari or Dropbox, or use iTunes file sharing.
  • Mac OS X: brew install gearsystem
  • Windows: (NOTE: You may need to install the Microsoft Visual C++ Redistributable)
  • Linux: Gearsystem-2.2-Linux.tar.gz
  • Raspberry Pi: Build Gearsystem from sources. Optimized projects are provided for Raspberry Pi 1, 2 and 3.


  • Highly accurate Z80 core, including undocumented opcodes and behaviour like R and MEMPTR registers.
  • Multi-Mapper support: SEGA, Codemasters, and ROM only cartridges.
  • External RAM support with save files.
  • Automatic region detection: NTSC-JAP, NTSC-USA, PAL-EUR.
  • Highly accurate VDP emulation including timing and SMS2 only 224 mode support.
  • Internal database for rom detection.
  • Audio emulation using SDL Audio and Sms_Snd_Emu library.
  • Saves battery powered RAM cartridges to file.
  • Save states.
  • Integrated disassembler. It can dump the full disassembled memory to a text file or access it in real time.
  • Compressed rom support (ZIP deflate).
  • Game Genie and Pro Action Replay cheat support.
  • Multi platform. Runs on Windows, Linux, Mac OS X, Raspberry Pi, iOS and as a libretro core (RetroArch).

Build Instructions


  • 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 & 3 - Raspbian

  • Install and configure SDL 2 for development:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake
cd ~
tar zxvf SDL2-2.0.8.tar.gz
cd SDL2-2.0.8 && 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
  • Install libconfig library dependencies for development: sudo apt-get install libconfig++-dev.
  • Use make -j 4 in the platforms/raspberrypi3/Gearsystem/ folder to build the project.
  • Use export SDL_AUDIODRIVER=ALSA before running the emulator for the best performance.
  • Gearsystem generates a gearsystem.cfg configuration file where you can customize keyboard and gamepads. Key codes are from SDL.


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 commands:
sudo make install


  • Ubuntu / Debian:
sudo apt-get install build-essential qt5-default qttools5-dev-tools freeglut3-dev libsdl2-dev libglew-dev
cd platforms/linux/Gearsystem
qmake && make
  • Fedora:
sudo dnf install qt5-devel freeglut-devel SDL2-devel glew-devel
cd platforms/linux/Gearsystem
qmake-qt5 && make

Accuracy Tests

Zexall Z80 instruction exerciser (from SMS Power!)

Gearsystem passes all tests in Zexall, including undocumented instructions and behaviours.


SMS VDP Test (from SMS Power!)



ScreenshotScreenshot ScreenshotScreenshot ScreenshotScreenshot ScreenshotScreenshot ScreenshotScreenshot ScreenshotScreenshot ScreenshotScreenshot


Gearsystem - Sega Master System / Game Gear Emulator

Copyright (C) 2013 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