An accurate gameboy emulator written in C from scratch.
In order to run the emulator, you need to have cmake
, a build system like
ninja
and a C compiler. SDL2
is included as a submodule and will be compiled
along with the project.
- Clone the repository
git clone --recurse-submodules [email protected]:Jabolol/gameboy.git .
- Add the
ROMs
directory with the ROMs to be loaded in the web version
mkdir ROMs && cp /path/to/rom.gb ROMs
- Compile the project
cmake -B build -G Ninja && cmake --build build
- Run the emulator
./build/gameboy /path/to/rom.gb
- Bus (Memory Management)
- CPU
- PPU (Graphics)
- Input (Joypad)
- Timer
- Interrupts (V-Blank, LCD, Timer, Serial, Joypad)
- MBC1 (Memory Bank Controller 1)
- Save States (.sav files)
- Web version at gameboy.deno.dev
Arrow Keys
- D-PadA
- AB
- BEnter
- Start
The emulator is also available as a web version using emscripten
and deno
.
In order to run the web version, you need to have deno
installed.
Some games are preloaded in the web version, just append ?game=${game}
to the
url to load a different game. The supported games are shown
here.
The web version will bundle the ROMs available at ROMs
directory and serve
them at http://localhost:8000
.
deno task --cwd www start
- Gameboy CPU Manual: A comprehensive guide to the Gameboy CPU.
- Gameboy Opcodes: List of all opcodes for the Gameboy CPU.
- Gameboy Pan Docs: A detailed guide to the Gameboy hardware.
This project is licensed under the MIT License - see the LICENSE file for details.