Gemu is a neat little Game Boy emulator written in C as a personal exercise to learn the language.
Name idea blatantly stolen inspired by QEMU.
If you have Nix, you already know what to do.
Otherwise, you'll need the following dependencies:
If you don't specify -Dtests=false when running meson setup, you'll also need:
- Unity Test
- cJSON
- Ruby (for running some build scripts)
You can clone, compile and run the project with these commands:
git clone https://codeberg.org/Grazen0/gemu
cd gemu
meson setup build -Dfrontend=sdl3 # One of sdl3, raylib, opengl, sfml. Defaults to "sdl3".
meson compile -C build
build/gemu path/to/rom.gbNote that you can choose the frontend (sdl3, raylib, opengl, or sfml) with -Dfrontend.
Note
Gemu does not support any mappers as of now, so only games with no mapper (like Tetris) will work.
- CPU emulation
- Custom boot ROM support
- Graphics
- Background tiles
- Objects
- Window drawing
- Scrolling
- Proper OAM transfer timing
- Timers
- Mappers
- MBC1
- MBC2
- MBC3
- MBC4
- MBC5
- MBC6
- MBC7
- MMM01
- M161
- HuC1
- HuC-3
- Other (?)
- Interrupts
- VBlank
- STAT
- Timer
- Serial
- Joypad
- Serial transfer
- Audio
- CGB support
- Gamepad support (via SDL)
- Raddad772's sm83 instruction tests, which are used in this project.
- gbdev.io and the Pan Docs for their incredible help.