Skip to content

connnnor/GBcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GBcon

GBcon is an Original GameBoy emulator for unix-like platforms written in c++.

Written for fun.

Building

GBcon requires SDL2

git clone https://github.com/connnnor/GBcon
cd GBcon
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=..
make && make install

Usage

$ ./GBcon --help
Allowed options:
  --help                  Display help message
  -b [ --bios ] arg       path to bios
  -r [ --rom ] arg        path to rom
  -l [ --log ] arg        log directory
  -d [ --dbg ]            start emu in debugger
  -s [ --scale ] arg (=2) display scale. 1, 2, 4

$ ./GBcon --bios gb_bios.gb --rom tetris.gb

keys are up, down, left, right, a, s, enter, and right shift

Features

  • Passes most of blargg's cpu_instr test roms. Currently fails 02-interrupts.gb since the timer is not implemented.
  • Memory Bank Controllers: MBC1, MBC3, MBC5.
  • Text based debugger
  • Cartridge save support

Missing features

  • Sound
  • Memory Bank Controllers: MBC2, MBC6, MBC7, MM01, RTC support
  • Accurate intra cycle timing

Running tests

Automated tests use rspec to launch GBcon, load a test rom (blargg's) and interact with the debugger to exit when the test ROM is complete. blargg's test roms can be found here. Blargg's roms print their console output to the GameBoy serial port which GBcon dumps upon exit.

The tests require a few binaries are placed in the test/resources directory. like:

tests/resources/
├── blarggs
│   ├── cgb_sound.gb
│   ├── cpu_instrs.gb
│   ├── dmg_sound.gb
│   ├── instr_timing.gb
│   ├── interrupt_time.gb
│   ├── mem_timing.gb
│   └── oam_bug.gb
└── gb_bios.bin

To run rspec tests, do:

rspec

Known Issues

  • Broken random number generation
  • Choppy horizontal scrolling graphics

Screenshots

cpu_instr

FlappyBoy

Link to FlappyBoy game in second screenshot

References

About

Gameboy emulator for unix-like platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published