joshgamer474 / GBCEmulator

A WIP C++ GB/GBC emulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GBCEmulator

Build Status

A WIP Gameboy (Color) emulator written in C++ and packaged in Conan

Progress

The emulator currently passes all of blargg's cpu instruction tests and runs a decent amount of GB/GBC games.

The Qt wrap includes variety of interactive GUI debug tools:

  • A fully-featured CPU debugger with step in, step over, step out, etc.
  • A real-time video RAM (VRAM) viewer
  • A real-time audio channel viewer

Issues

  • Some GBC games do not boot up
  • Qt wrap needs some improvement

How to build

Prerequisites

Prerequisite Commands

pip3 install conan --user

conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan

Building

git clone https://github.com/joshgamer474/GBCEmulator.git

cd GBCEmulator

conan install . -if=build --build=outdated -s compiler.cppstd=17

conan build . -bf=build

Building Qt wrapped GBCEmulator

git clone https://github.com/joshgamer474/GBCEmulator.git

cd GBCEmulator

conan export conanfile.py josh/testing

cd qt_wrap

conan install . -if=build --build=outdated -s compiler.cppstd=17

conan build . -bf=build

Building Android (Linux env only)

git clone https://github.com/joshgamer474/GBCEmulator.git

cd GBCEmulator

conan export . josh/testing

mkdir android && cd android

conan install GBCEmulator/<version>@josh/testing --build=outdated --profile:host=../profiles/android --profile:build=/home/<username>/.conan/profiles/default -s arch=<desired build arch> -o shared=True -s compiler.cppstd=17

Now you should have built .so Android library files in android/lib/

How to use

Open the built GBCEmulator.exe or GBCEmulator_qt.exe and drag and drop your favorite rom in.

TODO

Implement some Core features

  • GPU Sprite Rendering
  • Input handling using SDL
  • Add timing and sleeping to core while() loop so the emulator runs at its proper speed
  • Sound
  • Controls
  • Create a GUI (maybe Qt?)
  • Linux build support
  • Android build support

Organization

  • Implement Conan.io packaging for libraries
  • Implement Conan.io package for this repo
  • Include CMake building

Testing

Core feature testing and correctness

  • Memory Bank Controllers
  • Interrupt handling correctness
  • GPU background rollover testing
  • Get a game to actually boot

Create automated unit testing using GTest

  • Implement for blargg's cpu_instrs
  • Implement for blargg's dmg_sound
  • Implement for blargg's instr_timing
  • Implement for blargg's interrupt_time
  • Implement for blargg's oam_bug
  • Implement for blargg's mem_timing
  • Implement for blargg's mem_timing-2
  • Implement for blargg's cgb_sound

About

A WIP C++ GB/GBC emulator


Languages

Language:C++ 96.5%Language:CMake 1.5%Language:Python 1.2%Language:C 0.3%Language:Assembly 0.3%Language:Shell 0.2%