VGBoy (Virtual Game Boy): A Game Boy (DMG) emulator written fully in C, with SDL2 frontend to manage graphics and audio. This is a perrsonal project that served as a learning opportunity for me to get into emulator development.
- Game Boy (DMG) emulation support
- MBC1, MBC2, MBC3, and MBC 5 ROM support
- ROM Battery save
- RTC support
- PPU Rendering with pixel pipeline
- Audio emulation
- Game state snapshot / rewind feature
- MBC6, MBC7, HuC-1 ROM support
- Higher timing accuracy
- CMake: Building
- Simple DirectMedia Layer (SDL) 2.0: Graphics, audio, and keyboard input
- ZLib: File compression
- Ceedling + gcovr: Unit testing
# Setup
git clone https://github.com/Kadinata/VGBoy.git
cd VGBoy
mkdir bin
# Build
cd bin
cmake ..
make clean
make
./VGBoy path/to/game_rom.gb
./run_test.sh # Runs all tests
./run_test.sh path/to/test_file.c # Runs a single test file
Keyboard | Game Boy |
---|---|
W |
UP |
A |
LEFT |
S |
DOWN |
D |
RIGHT |
K |
B |
L |
A |
ENTER |
START |
BACKSPACE |
SELECT |
Keys | Function |
---|---|
CMD + 0...9 |
Snapshot game state and save it to slot 0 ... 9 |
CTRL + 0...9 |
Same as CMD + 0...9 |
SHIFT + 0...9 |
Load snapshot from slot 0 ... 9 |
- Game Boy Pan Docs
- Game Boy CPU opcode table
- Game Boy Development Wiki
- NightShade's Game Boy Sound Emulation Primer
- Hacktix's Game Boy PPU Primer
- Low-Level Devel's Game Boy Emulator Dev Series
Special thanks to the super helpful folks at the EmuDev Discord!