All Projects → emrsmsrli → gameboi

emrsmsrli / gameboi

Licence: MIT license
An Original GameBoy emulator?

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to gameboi

Goboy
Multi-platform Nintendo Game Boy Color emulator written in Go
Stars: ✭ 2,403 (+11915%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Binjgb
Gameboy emulator implemented in C
Stars: ✭ 222 (+1010%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gearboy
Game Boy / Gameboy Color emulator for iOS, macOS, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 528 (+2540%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Metroboy
MetroBoy - A playable, circuit-level simulation of an entire Game Boy
Stars: ✭ 169 (+745%)
Mutual labels:  emulator, gameboy, gameboy-emulator
jsGBC-core
jsGBC Core Emulator
Stars: ✭ 14 (-30%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Jitboy
A Game Boy emulator with dynamic recompilation (JIT)
Stars: ✭ 190 (+850%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Rustyboy
A Gameboy emulator written in Rust.
Stars: ✭ 224 (+1020%)
Mutual labels:  emulator, gameboy, gameboy-emulator
khedgb
Experiments in Game Boy emulation
Stars: ✭ 15 (-25%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Coffee Gb
Gameboy emulator in Java 8.
Stars: ✭ 953 (+4665%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Vba M Nx
WIP full featured port of VBA-M for Nintendo Switch
Stars: ✭ 11 (-45%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gbemu
A Gameboy emulator in modern C++
Stars: ✭ 149 (+645%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Cryboy
A Game Boy (Color) emulator written in Crystal
Stars: ✭ 68 (+240%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Pyboy
Game Boy emulator written in Python
Stars: ✭ 3,326 (+16530%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gopher Boy
🎮 A Game Boy emulator written in Go
Stars: ✭ 206 (+930%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Elmboy
A Nintendo™ Game Boy™ Emulator written in Elm.
Stars: ✭ 285 (+1325%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Mooneye Gb
A Game Boy research project and emulator written in Rust
Stars: ✭ 557 (+2685%)
Mutual labels:  emulator, gameboy, gameboy-emulator
gameboyGO
Gameboy emulator in go
Stars: ✭ 24 (+20%)
Mutual labels:  emulator, gameboy, gameboy-emulator
rusty-boy
Gameboy emulator in Rust
Stars: ✭ 20 (+0%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Gameboy
🎮 Game Boy emulator written in Rust
Stars: ✭ 17 (-15%)
Mutual labels:  emulator, gameboy, gameboy-emulator
Wasmboy
Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀Demos built with Preact and Svelte. ⚛️
Stars: ✭ 963 (+4715%)
Mutual labels:  emulator, gameboy, gameboy-emulator

gameboi

Build Status GitHub license Github Release Code Coverage

gameboi is a Gameboy Color emulator written in Modern C++. Main goals of this project are writing understandable, modern C++ and not sacrificing performance, and learning about software & hardware architectures while doing so. This emulator does not have the best accuracy, but things mostly work.

Features

gameboi does not aim to be the perfect emulator, so features are limited compared to other emulators.

  • CPU, PPU and APU emulation
  • Accurate internal timer
  • Cartridge save-load capability
  • Cartridge RTC support
  • Link support
  • Debugger and disassembler

Screenshots

Code example

gameboi-core library can be easily integrated to your own frontend implementation:

#include <gameboy/gameboy.h>

// automatically defined with cmake argument -DWITH_DEBUGGER=ON
#if WITH_DEBUGGER
#include <debugger/debugger.h>
#endif //WITH_DEBUGGER

void on_render_line(const uint8_t line_number, const gameboy::render_line& line) noexcept;
void on_vblank() noexcept;
void on_audio(const gameboy::apu::sound_buffer& sound_buffer) noexcept;

int main(int argc, char** argv) 
{
    // gameboy writes cartridge save files to disk 
    // when it goes out of scope
    gameboy::gameboy gb{"file/path/to/rom.gbc"};

#if WITH_DEBUGGER
    gameboy::debugger debugger{gb};
#endif //WITH_DEBUGGER

    gb.on_render_line(gameboy::connect_arg<&on_render_line>);
    gb.on_vblank(gameboy::connect_arg<&on_vblank>);
    gb.on_audio_buffer_full(gameboy::connect_arg<&on_audio>);

    while(true) {
        // gb.press_key(gameboy::key::a);
        // gb.release_key(gameboy::key::start);

        gb.tick_one_frame();
        // or gb.tick(); which executes only one instruction every iteration

#if WITH_DEBUGGER
        debugger.tick();
#endif //WITH_DEBUGGER
    }

    return 0;
}

Build Instructions

Dependencies

Install dependencies however you like. Though, vcpkg or conan might come in handy. This is an example script for Ubuntu, using vcpkg:

  • CMake (required version is 3.12.4)
  • GTest (required if building tests)
  • spdlog
  • fmt
  • SFML
  • SDL2
  • magic-enum
  • cxxopts
$ git clone https://github.com/Microsoft/vcpkg.git
$ cd vcpkg
$ ./bootstrap-vcpkg.sh -disableMetrics
$ ./vcpkg integrate install
$ ./vcpkg install gtest spdlog fmt sfml sdl2 magic-enum cxxopts
$ sudo apt install cmake ninja-build

Building from source

gameboi uses CMake and can be easily built with a script like below.

$ mkdir build
$ cd build
$ cmake -G Ninja --config Release ..
$ cmake --build -- -j $(nproc)

CMake arguments

gameboi offers several CMake flags for build configuration. Check out FLAGS.md for more detailed information.

WITH_DEBUGGER

Enables debugger project to be built. Debugger currently depends on SFML so you need to supply it.

ENABLE_TESTING

Enables test project to be built. gameboi uses blargg's and mooneye's test roms to verify correctness of the emulation. Currently most tests fail but games mostly work.
You can run tests with ctest after building.
You can also add more tests to the path gameboycore/test/executable/path/res if you want.

Known Issues

Check Issues tab.

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].