bjoernh / Gearboy

Game Boy / Gameboy Color emulator for iOS, macOS, Raspberry Pi, Windows, Linux, BSD and RetroArch.

Home Page:http://twitter.com/drhelius

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gearboy

Gearboy CI

Gearboy is a cross-platform Game Boy / Game Boy Color emulator written in C++ that runs on Windows, macOS, Linux, BSD, iOS, Raspberry Pi and RetroArch.

This is an open source project with its ongoing development made possible thanks to the support by these awesome backers.

Please, consider sponsoring and following me on Twitter for updates.

If you find a bug or want new features, you can help me openning an issue.


Downloads

Features

  • Accurate CPU emulation, passes cpu_instrs.gb from blargg's tests.
  • Accurate instruction and memory timing, passes instr_timing.gb and mem_timing.gb from blargg's tests.
  • Supported cartridges: ROM, ROM + RAM, MBC1, MBC2, MBC3 + RTC, MBC5, HuC-1 and MBC1M (multicart).
  • Accurate LCD controller emulation with correct timings and priorities including mid-scanline effects.
  • Game Boy Color support.
  • LCD screen ghosting effect as seen in the original Game Boy.
  • LCD dot matrix effect.
  • Sound emulation using SDL Audio and Gb_Snd_Emu library.
  • Battery powered RAM save support.
  • Save states.
  • Compressed rom support (ZIP).
  • Bootrom (bios) support.
  • Game Genie and GameShark cheat support.
  • Supported platforms (standalone): Windows, Linux, BSD, macOS, Raspberry Pi and iOS.
  • Supported platforms (libretro): Windows, Linux, macOS, Raspberry Pi, Android, iOS, tvOS, PlayStation Vita, PlayStation 3, Nintendo 3DS, Nintendo GameCube, Nintendo Wii, Nintendo WiiU, Nintendo Switch, Emscripten, Classic Mini systems (NES, SNES, C64, ...), OpenDingux, RetroFW and QNX.
  • Full debugger with just-in-time disassembler, cpu breakpoints, memory access breakpoints, code navigation (goto address, JP JR and CALL double clicking), debug symbols, memory editor, IO inspector and VRAM viewer including tiles, sprites, backgrounds and palettes.
  • Windows and Linux Portable Mode by creating a file named portable.ini in the same directory as the application binary.
  • Support for modern game controllers through gamecontrollerdb.txt file located in the same directory as the application binary.

Build Instructions

Windows

  • Install Microsoft Visual Studio Community 2019 or later.
  • Open the Gearboy Visual Studio solution platforms/windows/Gearboy.sln and build.
  • You may want to use the platforms/windows/Makefile to build the application using MinGW.

macOS

  • Install Xcode and run xcode-select --install in the terminal for the compiler to be available on the command line.
  • Run these commands to generate a Mac app bundle:
brew install sdl2
cd platforms/macos
make dist

Linux

  • Ubuntu / Debian:
sudo apt-get install build-essential libsdl2-dev libglew-dev
cd platforms/linux
make
  • Fedora:
sudo dnf install @development-tools gcc-c++ SDL2-devel glew-devel
cd platforms/linux
make

BSD

  • NetBSD:
su root -c "pkgin install gmake pkgconf SDL2 glew"
cd platforms/bsd
gmake

iOS

  • Install latest Xcode for macOS.
  • Build the project platforms/ios/Gearboy.xcodeproj.
  • Run it on real hardware using your iOS developer certificate. Make sure it builds on Release for better performance.

Libretro

  • Ubuntu / Debian:
sudo apt-get install build-essential
cd platforms/libretro
make
  • Fedora:
sudo dnf install @development-tools gcc-c++
cd platforms/libretro
make

Raspberry Pi 4 - Raspbian (Desktop)

sudo apt install build-essential libsdl2-dev libglew-dev
cd platforms/raspberrypi4
make

Raspberry Pi 2 & 3 - Raspbian (CLI)

  • 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 ~
wget https://www.libsdl.org/release/SDL2-2.0.12.tar.gz
tar zxvf SDL2-2.0.12.tar.gz
cd SDL2-2.0.12 && 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/x64/ folder to build the project.
  • Use export SDL_AUDIODRIVER=ALSA before running the emulator for the best performance.
  • Gearboy generates a gearboy.cfg configuration file where you can customize keyboard and gamepads. Key codes are from SDL.

Accuracy Tests

Compared to other emulators: see here.

Tests from blargg's test roms:

cpu_instrs.gbinsrt_timing.gblcd_sync.gbdmg_sound.gbcgb_sound.gbmem_timing.gb

Screenshots

ScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshotScreenshot

Contributors

Thank you to all the people who have already contributed to Gearboy!

Contributors

License

Gearboy is licensed under the GNU General Public License v3.0 License, see LICENSE for more information.

About

Game Boy / Gameboy Color emulator for iOS, macOS, Raspberry Pi, Windows, Linux, BSD and RetroArch.

http://twitter.com/drhelius

License:GNU General Public License v3.0


Languages

Language:C 73.5%Language:C++ 13.5%Language:HTML 5.6%Language:Shell 1.7%Language:Objective-C 1.5%Language:TeX 1.3%Language:Lua 0.7%Language:CMake 0.4%Language:Objective-C++ 0.4%Language:JavaScript 0.3%Language:M4 0.3%Language:Java 0.3%Language:Perl 0.2%Language:Makefile 0.2%Language:CSS 0.1%Language:Batchfile 0.1%Language:Roff 0.0%Language:Python 0.0%