Skip to content
binjgb

binjgb

GAME BOY COLOR EMULATOR

binjgb

binjgb is an open-source Game Boy / Game Boy Color emulator written in C with a WebAssembly build for running in the browser. It emphasizes cycle-accurate timing, supports many MBC types, save states, rewinding, an optional debugger, and can be embedded as a web player.

game boy colorPRIMARY SYSTEM
2010sPROJECT BEGAN
Open sourcePROJECT MODEL

WHY IT MATTERS

Why binjgb matters

binjgb is a compact, accuracy-focused GB/GBC emulator that was explicitly written to be small, easy to embed in web pages (via WebAssembly), and to experiment with features such as deterministic save states and rewind. It is useful for developers and hobbyists who want a readable C codebase with both native and browser targets.

BEST FOR

Best for

Developers, educators, and hobbyists who want a lightweight, cycle-accurate Game Boy / Game Boy Color emulator that can be built natively or as a WebAssembly module and embedded into webpages for demos or testing.

The people behind binjgb

History and status

binjgb is maintained by the GitHub user binji. The project source, build instructions and documentation are hosted on GitHub and a demo/docs site. The author has written about features such as rewind, and the repository shows active history (commits, issues) and packaged releases. The codebase was developed in the 2010s and the author posted a detailed blog entry about adding rewind on December 31, 2017. The project remains available and buildable from source; releases are published on the repository's Releases page. Exact ongoing maintenance activity should be checked on the project's GitHub for the latest commit and release dates.

What binjgb supports

  • Game Boy (DMG)
  • Game Boy Color (CGB)
  • Super Game Boy (partial/hinted as mostly-there)
  • MBC support: MBC1, MBC1M, MMM01, MBC2, MBC3, MBC5, HuC1

Download and availability

OFFICIAL DOWNLOADS

Get binjgb

Official source and binaries (when provided) are available from the project's GitHub repository Releases page. For browser usage the project provides prebuilt docs/binjgb.wasm and accompanying JS under the docs/ directory.

Get binjgb ↗

DOCUMENTATION

Official documentation

Read the official configuration, compatibility, and troubleshooting material before changing advanced options.

Read official documentation ↗
Broken or missing download? Emulator projects move and official links sometimes change. Please contact Retro Replay so the source can be verified and updated.

binjgb setup guide

Setup note: This guide shows how to obtain, build, and run binjgb for native desktop and as a WebAssembly build for embedding. It concentrates on verified steps from the project's documentation and README.

  1. 1) Get the source: Clone the official repository with submodules (the project uses git submodules for some third-party components). Use a recursive clone to ensure submodules are initialized: git clone –recursive https://github.com/binji/binjgb
  2. 2) Native build prerequisites: Install CMake and SDL2. On Linux that typically means installing cmake and the development package for SDL2 (for example libsdl2-dev). On macOS use Homebrew (brew install cmake sdl2) or equivalent. On Windows, install CMake and SDL2 and note the README's guidance about pointing CMake to your SDL2 directory when invoking the generator for Visual Studio.
  3. 3) Native build (Linux/macOS): From the repo root you can run make which calls CMake and builds into bin/. Alternately use a manual CMake workflow: mkdir build; cd build; cmake ..; make. The produced executable is bin/binjgb. Run it as: bin/binjgb <path-to-file.gb|.gbc>. The README documents a binjgb-debugger binary as well.
  4. 4) Native build (Windows): Create a build directory, run cmake .. with an appropriate generator and point CMake at SDL2 if required (for example -G "Visual Studio 15 2017" -DSDL2_ROOT_DIR="C:\path\to\SDL\"). Open the generated solution in Visual Studio and build the INSTALL target so executables are placed in the bin directory.
  5. 5) Build WebAssembly (browser) target: To build the wasm/web player you need an emscripten toolchain. The README expects an emscripten checkout or build to be symlinked into an emscripten directory inside the repo or referenced via Makefile variables. Typical steps: install emscripten, put a symlink at ./emscripten to your emscripten checkout, then run make wasm. The docs/ directory contains prebuilt docs/binjgb.wasm and docs/binjgb.js for embedding if you prefer not to build yourself.
  6. 6) Running and basic controls: Run the native executable with a ROM filename: bin/binjgb foo.gb. The README lists keyboard defaults (Z = B, X = A, Enter = Start, Tab = Select, arrow keys for D-PAD, Backspace = Rewind, Space = Pause, F6/F9 to save/load state). See README for toggles to disable audio channels or layers and for INI configuration options.
  7. 7) Embedding the web player: Copy docs/binjgb.js, docs/binjgb.wasm, docs/simple.html, docs/simple.js, docs/simple.css and your .gb/.gbc file to a web server and edit simple.js to point ROM_FILENAME at your ROM path. The README documents configuration constants such as ENABLE_REWIND, ENABLE_PAUSE, palette settings and touch onscreen gamepad behavior.
  8. 8) Configuration and INI: binjgb reads binjgb.ini on startup if present. The README enumerates keys such as autoload, audio-frequency, audio-frames, builtin-palette, force-dmg, and others. Use the INI to set an autoload ROM or tweak audio/builtin palette options without changing source.

Software reminder: binjgb does not include commercial game ROMs, console BIOS files, firmware, or other copyrighted content. You must supply your own ROM files and any required system firmware per your local laws and the emulator's README. Verify compatibility of specific games and BIOS usage on the project's docs or issue tracker.

Sources and further reading

Detailed guides and tutorials

Explore step-by-step guides for binjgb as they are published.