This is a GameBoyColor emulator written in my favorite language C
. I use SDL2+Dear ImGui for
sounds, graphics and input. So it can run on any platform that supports SDL2. And the GUI part is totally separated from the core emulator, so you can easily
replace it with your own GUI. Check the gui/gui.h
.
Test | Status |
---|---|
cgb_sound | ✅ |
cpu_instrs | ✅ |
instr_timing | ✅ |
interrupt_time | ✅ |
mem_timing | ❌ |
mem_timing-2 | ❌ |
oam_bug | ❌ |
halt_bug.gb | ❌ |
I'll gradually fix the failed tests.
Type | Status | Games I tested |
---|---|---|
MBC1 | ✅ | Tetris DX |
MBC5 | ✅ | Super Mario Bros. Deluxe The Legend of Zelda: Oracle of Ages Metal Gear Solid (USA) |
I'll add more MBCs in the future.
- Install SDL2 and SDL2_image via Homebrew
brew install sdl2
- Clone the project
git clone https://github.com/kstardust/KameBoyColor.git
cd KameBoyColor
git submodule update --init
- Build the project
You may need to edit the
HOMEBREW_PATH
inCMakeLists.txt
to point to your Homebrew installation path.
cmake .
make
I do not have a Linux machine on hand, but it should be similar to macOS.
You need MSYS2 to build as I used some POSIX functions.
- Install MSYS2
- Clone the project
git clone https://github.com/kstardust/KameBoyColor.git
cd KameBoyColor
git submodule update --init
- Open
MSYS2 shell
and install the necessary packages
pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-SDL2
- Set the
MSYS2_PATH
inCMakeLists.txt
to your MSYS2 installation path
set(MSYS2_PATH "C:\\MyPrograms\\msys2")
- Build the project (
This step is supposed to be done in MSYS2 shell. DO NOT USE Git Bash shell!!
)
cmake -G 'Unix Makefiles'
make
Its in the gui/main_sdl2.cpp
file. You can change it to whatever you like.
Keyboard | Gameboy |
---|---|
A | A |
B | B |
Enter | Start |
S | Select |
↑ | Up |
↓ | Down |
← | Left |
→ | Right |