Skip to content

kstardust/KameBoyColor

Repository files navigation

A GameBoyColor Emulator

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.

screenshot
Screenshot 2024-10-02 at 09 08 17 Screenshot 2024-10-02 at 09 39 40
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.

MBC

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.

Build

macOS

  1. Install SDL2 and SDL2_image via Homebrew
brew install sdl2
  1. Clone the project
git clone https://github.com/kstardust/KameBoyColor.git
cd KameBoyColor
git submodule update --init
  1. Build the project You may need to edit the HOMEBREW_PATH in CMakeLists.txt to point to your Homebrew installation path.
cmake .
make

Linux

I do not have a Linux machine on hand, but it should be similar to macOS.

Windows

You need MSYS2 to build as I used some POSIX functions.

  1. Install MSYS2
  2. Clone the project
git clone https://github.com/kstardust/KameBoyColor.git
cd KameBoyColor
git submodule update --init
  1. 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
  1. Set the MSYS2_PATH in CMakeLists.txt to your MSYS2 installation path
set(MSYS2_PATH "C:\\MyPrograms\\msys2")
  1. Build the project (This step is supposed to be done in MSYS2 shell. DO NOT USE Git Bash shell!!)
cmake -G 'Unix Makefiles'
make

Controls

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

About

A GameBoyColor Emulator

Resources

Stars

Watchers

Forks

Packages

No packages published