All Projects → binji → Binjgb

binji / Binjgb

Licence: mit
Gameboy emulator implemented in C

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Binjgb

Wasmboy
Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀Demos built with Preact and Svelte. ⚛️
Stars: ✭ 963 (+333.78%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Gbemu
A Gameboy emulator in modern C++
Stars: ✭ 149 (-32.88%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Gearboy
Game Boy / Gameboy Color emulator for iOS, macOS, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 528 (+137.84%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Cryboy
A Game Boy (Color) emulator written in Crystal
Stars: ✭ 68 (-69.37%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Goboy
Multi-platform Nintendo Game Boy Color emulator written in Go
Stars: ✭ 2,403 (+982.43%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Elmboy
A Nintendo™ Game Boy™ Emulator written in Elm.
Stars: ✭ 285 (+28.38%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Coffee Gb
Gameboy emulator in Java 8.
Stars: ✭ 953 (+329.28%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Hades
🔥 A Nintendo Game Boy Advance emulator
Stars: ✭ 44 (-80.18%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gbemu
WebAssembly based Gameboy Emulator
Stars: ✭ 120 (-45.95%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Vba M Nx
WIP full featured port of VBA-M for Nintendo Switch
Stars: ✭ 11 (-95.05%)
Mutual labels:  gameboy, gameboy-emulator, emulator
khedgb
Experiments in Game Boy emulation
Stars: ✭ 15 (-93.24%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Jitboy
A Game Boy emulator with dynamic recompilation (JIT)
Stars: ✭ 190 (-14.41%)
Mutual labels:  gameboy, gameboy-emulator, emulator
rusty-boy
Gameboy emulator in Rust
Stars: ✭ 20 (-90.99%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Pyboy
Game Boy emulator written in Python
Stars: ✭ 3,326 (+1398.2%)
Mutual labels:  gameboy, gameboy-emulator, emulator
gameboyGO
Gameboy emulator in go
Stars: ✭ 24 (-89.19%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Mooneye Gb
A Game Boy research project and emulator written in Rust
Stars: ✭ 557 (+150.9%)
Mutual labels:  gameboy, gameboy-emulator, emulator
awesome-emu-resources
A curated list of emulator development resources
Stars: ✭ 26 (-88.29%)
Mutual labels:  emulator, gameboy, gameboy-emulator
SkyEmu
Game Boy, Game Boy Color, and Game Boy Advanced Emulator
Stars: ✭ 59 (-73.42%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gameboy
🎮 Game Boy emulator written in Rust
Stars: ✭ 17 (-92.34%)
Mutual labels:  gameboy, gameboy-emulator, emulator
Metroboy
MetroBoy - A playable, circuit-level simulation of an entire Game Boy
Stars: ✭ 169 (-23.87%)
Mutual labels:  gameboy, gameboy-emulator, emulator

Travis AppVeyor

binjgb

A simple GB/GBC emulator.

Features

  • Runs in the browser using WebAssembly
  • Hacky-but-passable CGB support!
  • Cycle accurate, passes many timing tests (see below)
  • Supports MBC1, MBC1M, MMM01, MBC2, MBC3, MBC5 and HuC1
  • Save/load battery backup
  • Save/load emulator state to file
  • Fast-forward, pause and step one frame
  • Rewind and seek to specific cycle
  • Disable/enable each audio channel
  • Disable/enable BG, Window and Sprite layers
  • Convenient Python test harness using hashes to validate
  • (WIP) Debugger with various visualizations (see below)

DMG Screenshots

Bionic Commando Donkey Kong Kirby's Dreamland 2 Mole Mania Mario's Picross Trip World Wario Land Game Boy Wars Is That a Demo in Your Pocket?

CGB Screenshots

Dragon Warrior Hamtaro Metal Gear Solid It Came From Planet Zilog Survival Kids Aevilia Toki Tori Wario 3

Debugger Screenshots

Debugger OBJ Map Tile Data Breakpoints

Cloning

Use a recursive clone, to include the submodules:

$ git clone --recursive https://github.com/binji/binjgb

If you've already cloned without initializing submodules, you can run this:

$ git submodule update --init

Building

Requires CMake and SDL2. Debugger uses dear imgui, (included as a git submodule).

Building (Linux/Mac)

If you run make, it will run CMake for you and put the output in the bin/ directory.

$ make
$ bin/binjgb foo.gb

You can also just use cmake directly:

$ mkdir build
$ cd build
$ cmake ..
$ make

Building (Windows)

When building on Windows, you'll probably have to set the SDL2 directory:

> mkdir build
> cd build
> cmake .. -G "Visual Studio 15 2017" -DSDL2_ROOT_DIR="C:\path\to\SDL\"

Then load this solution into Visual Studio and build it. Make sure to build the INSTALL target, so the exectuables are built to the bin directory.

Building WebAssembly

You can build binjgb as a WebAssembly module. You'll need an incoming build of emscripten. See https://github.com/kripken/emscripten/wiki/WebAssembly and http://kripken.github.io/emscripten-site/docs/building_from_source/index.html#installing-from-source.

Put a symlink to Emscripten in the emscripten directory, then run make.

$ ln -s ${PATH_TO_EMSCRIPTEN} emscripten
$ make wasm

Changing the Build Configuration

If you change the build config (e.g. update the submodules), you may need to run CMake again. The simplest way to do this is to remove the out/ directory.

$ rm -rf out/
$ make

Running

$ bin/binjgb <filename>
$ bin/binjgb-debugger <filename>

Keys:

Action Key
DPAD-UP
DPAD-DOWN
DPAD-LEFT
DPAD-RIGHT
B Z
A X
START Enter
SELECT Tab
Quit Esc
Save state F6
Load state F9
Toggle fullscreen F11
Disable audio channel 1-4 1-4
Disable BG layer B
Disable Window layer W
Disable OBJ (sprites) O
Fast-forward Lshift
Rewind Backspace
Pause Space
Step one frame N

Running tests

Run scripts/build_tests.py to download and build the necessary testsuites. This works on Linux and Mac, not sure about Windows.

scripts/tester.py will only run the tests that match a filter passed on the command line. Some examples:

# Run all tests
$ scripts/tester.py

# Run all tests mooneye tests
$ scripts/tester.py mooneye

# Run all gpu tests
$ scripts/tester.py gpu

Test status

See test results

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].