Skip to content

v-pun215/chocoboy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chocoboy

A Game Boy (DMG) emulator written in C++ (WIP)

Usage

Download the latest release from the Releases page.

Obtain a boot ROM from here (dmg_boot.bin).

Run a ROM using ./path/to/chocoboy path/to/boot_rom path/to/rom.gb

Make sure to use a valid boot rom when running chocoboy, otherwise it WILL crash.

Building manually

Make sure you have libSDL installed (through brew on macOS or through your favorite package manager on Linux).

Build with make. Depending on your system, you may need to edit the Makefile (as I haven't thoroughly tested the Makefile).

Controls

Joypad Input
DPAD UP W
DPAD LEFT A
DPAD DOWN S
DPAD RIGHT D
A O
B P
SELECT K
START L

Notes

  • Passes most of Blargg's test roms
  • Passes all SM83 single step tests
  • Passes dmg-acid2
  • Does not support audio yet
  • Joypad works (as far as tested)
  • Does not support saving yet
  • Not every game works, mostly because of MBC.
  • Instruction-accurate, not cycle-accurate at the moment.
  • Synced to audio, although there are some audio glitches (pops and other things) at the moment
  • Supports saving, RTC with MBC3 also works (for games like Pokemon Red!)
  • Stereo audio (Channel 1,2,3,4) implemented, albeit with some bugs.

Games tested

  • Super Mario Land
  • Super Mario Land 2
  • The Legend of Zelda: Link's Awakening
  • Pokemon Red
  • Tetris
  • Metroid II
  • Donkey Kong
  • Dr. Mario
  • Final Fantasy Adventure (audio messed up) fixed

Known Issues

  • Audio is still rough - there are still some bugs.
  • In Final Fantasy Adventure (1991), there is a loud ringing noise during the first boss fight and cutscenes. fixed!

Technicals

  • I used SDL2 to display the framebuffer on screen.
  • There is a "debugger" implemented, but its commented out at the moment.

Plan

I plan to 3D print a Game Boy (DMG) shell and design a custom PCB with a microcontroller, an LCD, speakers, and an SD card slot (?) for putting game cartridges in.

I also think I might expand the scope of this to include Game Boy (CGB) as well.

Credits

Pan Docs for technical reference.

SameBoy for comparing emulator output and debugging.

Screenshots

Super Mario Land

The Legend of Zelda: Link's Awakening

Kirby's Dream Land

Tetris

About

A Game Boy emulator written in C++

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors