/gbemulator

A simple emulator written in C++

Primary LanguageC++MIT LicenseMIT

gbemulator

This is a simple GB emulator written in C++. The CPU emulation is extensively unit-tested.

Features

  • Runs basic games
  • Passes all of Blargg's CPU instruction tests
  • Input handling
  • ESP32 port (in development)

Screenshots

Passing CPU tests

How to clone

Clone the repository recursively to get the submodules:

git clone --recurse-submodules https://github.com/narfg/gbemulator

If you have already cloned the repository and forgot the --recurse-submodules flag you can initialize the submodules with the following command:

git submodule update --init

How to build

The project uses the CMake build system and can be built like most CMake-based projects.

mkdir build
cd build/
cmake ..
make
make test

How to run

cd build/
./emulator rom.gb

Dependencies

  • Catch2: Unit testing framework (used as a submodule)
  • SDL 2.0: Simple DirectMedia Layer

On a fresh installation of Ubuntu 18.04 you will need the following packages:

sudo apt install cmake g++ git libsdl2-dev