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 explicitly disable testing (via setting BUILD_TESTING=OFF), you'll also need these:
- Unity Test
- cJSON
- Ruby (for running some build scripts)
You can clone, compile and run the project with these commands:
git clone https://github.com/Grazen0/gemu.git
cd gemu
cmake . -B build
cmake --build build
build/gemu path/to/rom.gbYou can install Gemu on your system by choosing the install CMake target.
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 (still needs support for wrapping)
- 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)
Some other notes:
- The graphics system right now is very, very fragile. A rewrite would be well-suited.
- Also, a major rework of the timing system should be coming soon™.
- Raddad772's sm83 instruction tests, which are used in this project.
- gbdev.io and the Pan Docs for their incredible help.