README.md

August 14, 2026 ยท View on GitHub

oxGBC

A Game Boy & Game Boy Color emulator written in Rust.

๐Ÿ•น๏ธย ย Play online ย ย ย  ๐Ÿ“ฅย ย Download


Tests Release License Dependencies

oxGBC (oxide + Game Boy Color) is built around a single portable emulation core powering Windows, macOS, Linux, Android, and WebAssembly. It aims for high accuracy through sub-instruction CPU timing and dot-level PPU emulation while providing modern features such as save states, rewind, shaders, and configurable controls.

The emulator passes a wide range of community test suites and is continuously validated against them in CI, including Blargg, Mooneye, SameSuite, DMG-acid2, CGB-acid2, CGB-acid-hell, and Magen.

Screenshots

ShelfListCarouselCartridge
The library as a shelf of cartridges, each one drawn from its header and carrying its cover art on the labelThe same library as a list: one game per row, its cart beside the title and the play time behind itThe same library as a carousel: one cart held in front, its neighbours standing back on either side, its name underneathWhat one cartridge offers besides playing it โ€” rename and cover โ€” over the dimmed game
PauseSave statesSettingsKey bindings
The pause overlay, titled by the game it suspended: resume, save states, restart, library, settings and quitThe save-state slots, each with the screen it was saved with and how long agoThe settings page: palette, video, audio, emulation and input rows with the value each is set toEvery action and the keys it answers to โ€” the d-pad, the buttons, the diagonals and the shortcuts โ€” each one rebindable from here

Demos

Passing the CGB-acid2 and CGB-acid-hell PPU tests ย ย  Prehistorik Man

Features

Gameplay

  • Save States โ€” Multiple save slots with optional automatic save and restore
  • Rewind โ€” Configurable rewind for undoing gameplay actions
  • Speed Control โ€” Adjustable emulation speed with configurable Slow and Turbo modes
  • Custom Controls โ€” Rebindable controls for keyboard and gamepad with support for button combinations

Video & Rendering

  • Shader Support โ€” Optional OpenGL backend with custom GLSL shaders.
  • Visual Filters โ€” Grid, subpixel, scanline, dot-matrix, and vignette effects
  • Frame Blending โ€” Configurable LCD ghosting simulation with multiple blending modes
  • Palettes โ€” Multiple built-in palettes with support for user-defined palettes via palettes.json

Interface & Tooling

  • GUI & Configuration โ€” Full graphical configuration with optional manual editing of config.json
  • File Browser โ€” Browse and launch ROMs directly from the emulator
  • ROM Library โ€” Automatic ROM directory scanning with menu-based launching
  • WebAssembly Build โ€” Runs entirely in the browser with no installation required
  • Tile Viewer โ€” Real-time inspection of background and sprite tiles (SDL2 renderer)

Emulation

  • CPU โ€” Sharp LR35902 with sub-instruction timing
  • PPU โ€” Dot-level LCD controller emulation synchronized with the CPU
  • APU โ€” All four Game Boy audio channels
  • Cartridge Hardware โ€” MBC0, MBC1, MBC1M, MBC2, MBC3, and MBC5
  • Real-Time Clock โ€” Battery-backed MBC3 RTC
  • Battery-backed SRAM โ€” Persistent cartridge save data

๐ŸŽฎ Controls

Every binding is customizable from the in-app settings menu (or by editing config.json), for both keyboard and gamepad.

Default control mappings (click to expand)
ActionโŒจ๏ธ Keyboard๐ŸŽฎ Gamepad
D-pad UpArrow UpD-pad Up
D-pad DownArrow DownD-pad Down
D-pad LeftArrow LeftD-pad Left
D-pad RightArrow RightD-pad Right
BZB
AXA
StartEnter or SStart
SelectBackspace or ASelect
Rewind (hold)RY
Turbo mode (hold)TabRB
Slow mode (hold)SpaceLB
Main menuEsc or QSelect + Start
Screen scale Up and Down+ (Equals) and - (Minus)
Fullscreen ToggleF11
Mute audioM
Invert paletteISelect + X
Next palettePX
Load save state (1โ€“4)F1โ€“F4RT or Select + RB
Create save state (1โ€“9)1โ€“9LT or Select + LB
Volume Up and DownPageUp and PageDownStart + D-pad Up and Start + D-pad Down
Prev and Next Save State SlotStart + D-pad Right and Start + D-pad Left
Prev and Next Shader[ and ]Select + B and Select + A
Pause/Stepping modeF5
Step frameF6
Step scanlineF7
Clear screenF10
Toggle debugger (In debug build)~

๐Ÿ“ฆ Installing

Grab the latest build for your platform โ€” Windows, macOS, Linux (x86-64 and ARM for retro handhelds), or Android โ€” from the Releases page, or play online with nothing to install.

macOS first launch

Because the app is only ad-hoc signed (no paid Apple Developer ID), Gatekeeper blocks the first launch with an "unidentified developer" warning. To open it:

  • macOS 15 (Sequoia) and later: go to System Settings โ†’ Privacy & Security, scroll to the message about oxGBC, and click Open Anyway.
  • macOS 14 (Sonoma) and earlier: right-click oxGBC โ†’ Open โ†’ Open.

Or clear the quarantine flag from a terminal (works on every version):

xattr -dr com.apple.quarantine /Applications/oxGBC.app

๐Ÿ› ๏ธ Building

First, make sure you have Rust installed. If you don't, install it with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then install the SDL2 development libraries for your platform:

# Arch Linux
sudo pacman -S sdl2

# Debian / Ubuntu
sudo apt install libsdl2-dev

# Fedora
sudo dnf install SDL2-devel

# macOS (Homebrew)
brew install sdl2

No system SDL2 (e.g. Windows)? Compile it from source with the bundled feature: cargo build --release -p desktop --features sdl2-bundled

After that, build the release binary:

cargo build --release

Running

Launch with a ROM:

cargo run --release -p desktop -- path/to/game.gb

Or run without arguments and use the built-in file browser / ROM scanner to pick a game from the GUI:

cargo run --release -p desktop

Support the project โญ

Bug reports, and feature requests are welcome. If a game misbehaves, please open an issue with the ROM title and what went wrong โ€” accuracy reports are especially valuable.

If you find the project useful, please give it a star on GitHub. It helps others discover it and keeps development going.

License

This project is licensed under the terms of the GNU General Public License v3.0 (GPLv3). See the LICENSE file for the full text.

References

Here are some useful resources for Game Boy development and emulation:

Acknowledgments

This project was possible because of homebrew and emulation community. Huge thanks to everyone who wrote the documentation and test suites that make accurate emulation possible.

Test suites โ€” bundled in roms/:

Many of these are packaged through c-sp's game-boy-test-roms collection.

Code & assets:

  • SameBoy โ€” used as a reference for cross-checking behavior (especially the APU), and the source of the shaders (modified for GLES compatibility)

The web demo also bundles open-source homebrew games and test ROMs โ€” see ROM credits & licenses.