Skip to content

flylai/gameboy

Repository files navigation

Gameboy Emulator

This is a another Gameboy emulator written in C++. Try Live Demo!

All the core components are implemented, including the CPU, PPU, APU, and MBCs, with cycle-accurate timing(not highly accurate though).

Super Mario Land1 Super Mario Land2 Super Mario Land3

Build

Tested on Linux, but should work on other platforms.

Requirements

Build

git clone --recursive https://github.com/flylai/gameboy.git
cd gameboy
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
# If you want to build to WASM, use the following command
# emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel $(nproc)

Usage

General

./gameboy path/to/rom

WASM

Python3 is Required.

# Copy the `simple_server.py` to your build folder
cp tools/simple_server.py ./build
python3 simple_server.py

Open your browser and visit http://127.0.0.1:8000, enjoy it!

Controls

Key Action
A Left
W Up
D Right
S Down
J A
K B
Enter Start
Space Select

Screenshots

Games

Tetris castlevania super_robot_taisen game_boy_gallery donkey_kong

Accuracy Tests

cpu_instrs instr_timing mem_timing mem_timing-2 dmg_acid2

Tests

The test report is generated by CI and can be found on test_report branch.

References & Credits

Releases

No releases published

Packages

No packages published