GameboyCore is a Gameboy/Gameboy Color emulator library written in C++.
GameboyCore is a dependency free C++11 library. It does not open a window to render frames, it does not collect user input or play audio. GameboyCore emulates the Gameboy system and provides the audio/video output through the GameboyCore API.
This means the emulation logic and GUI logic of an emulator are separate. As long as the target platform has a C++11 compiler that platform can run GameboyCore.
GameboyCore running as:
- A desktop application
- A libretro core in RetroArch
- Python bindings, usable with pygame
- An Android App
- In the Web
The above application are somewhat incomplete however they all demonstrate GameboyCore working for the given environment.
The GameboyCore
library does not have any dependencies and can be compiled using any C++11 compiler. The tools contained in this repo, however, do have additional dependencies that need to be installed. All dependencies should be findable by CMake.
Fetch source:
git clone https://github.com/nnarain/gameboycore
cd gameboycore
git submodule update --init --recursive
To build the library, simply run cmake
.
mkdir build && cd build
cmake ..
cmake --build . --target gameboycore
Building Tests
Install gtest
and build with BUILD_TESTS=ON
. Optionally you can setup benchmarks by installing google-benchmark
.
cmake .. -DBUILD_TESTS=ON
cmake --build . --target check
cmake --build . --target bench
A few test ROMs can be run as well.
cmake --build . --target run_test_roms
Building Tools
Enable building tools by specifying BUILD_TOOLS=ON
. If building tools is enabled, all will be built by default. Disable building tools with WITH_<tool name>=OFF
.
All tools are compiled with the latest C++ standard.
Debugger:
- Used for running Gameboy ROMs and inspecting the core
- Depends on SFML
RomInfo
- Used for printing the information in the ROM header