Skip to content
/ GBemu Public

Experimental GB Emulator

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
license-header
Notifications You must be signed in to change notification settings

Alban098/GBemu

Repository files navigation

GBemu

An experimental Game Boy Emulator written in Java

Game Boy Color Game Boy
Zelda : Link's Awakening DX Zelda : Link's Awakening
Pokemon Silver Pokemon Red
Bootstrap DX Bootstrap


Table of Contents


Features

Core

  • CPU Emulation with decompiler and debugger (with execution and memory breakpoints)
  • PPU Emulation
  • APU Emulation with 2 Pulse Channels, a Wave Channel and a Noise Channel (no stereo output yet)
  • Persistent RAM when supported by the cartridge
  • Basics MBCs:

User Interface

Main Window

  • Load a ROM
  • Pause / Resume emulation
  • Reset

Settings Window

  • Change emulation speed
  • Enable / Disable RTC
  • Enable / Disable Bootstrap
  • Specify Bootstrap ROMs (for DMG and CGB)
  • Edit Gamma factor for color correction (Only in CGB Mode)
  • Select an existing DMG palette or customize it yourself
  • Choose audio output
  • Change master volume
  • Enable / Disable audio channels
  • Input customization (No gamepad support yet)

GameShark Window

  • Enable/Disable cheats
  • Add/Remove cheats

Debug Window

  • Enter step by step code execution
  • Display flags and CPU registers (as 8bit and merge as 16bit)
  • Display the current code execution
  • Manage breakpoints (Execution, Memory access ...)

Memory Window

  • Display one page of memory (256 bytes)
  • Search for a specified address
  • Display RAW memory as ASCII and hexadecimal
  • Display which sector a RAM address belongs to
  • Display RAM with color gradient to help spot patterns
  • Display a formatted view of the I/O registers

PPU Window

  • Display the tilemaps and current viewport and tile information
  • Display the tileset with tile information
  • Display the palettes with color details
  • Display OAM as list and as a rendered layer

APU Window

  • Display waveforms of all Audio Channels and the master DAC
  • Display the state of the Audio Registers and the Wave data

Serial Window

  • Display the serial output of the Game Boy as a String

Console Window

  • Display emulator information (Emulation reset, Breakpoint reached ...)
  • Enable user to enter commands (type help for list of commands)

Multithreading

Each of the following features run on a dedicated thread :

  • Gameboy core hardware (CPU, APU, PPU, MMU, Timers, Cartridge)
  • Windows rendering routines (Screen rendering, ImGui Layers, Input capture, Console command (Forwarded to the Console Thread))
  • Debugger (CPU and MMU snapshots, breakpoint system, PPU Debug rendering, APU Visualizer and Serial Output)
  • Console interpreter

How to Use

Launch

To launch the Emulator set the Main Class to Main.java


Screenshots


Roadmap

  • CPU implementation
  • Memory Management Unit implementation
  • OpenGL and ImGui layers
  • PPU implementation
  • Cartridge implementation
  • APU with all channels implementation
  • Debugger, PPU and APU visualization
  • Console and breakpoints
  • MBC1
  • MBC2
  • MBC3
  • MBC5
  • Game Boy Color features
  • Settings pannel (Inputs, Audio, Graphics ...)
  • Multithreading
  • GameShark cheats
  • Input customization (W.I.P.)
    • Keyboard support
    • Extended key range
    • Gamepad support
  • Add modular post-processing pipeline
  • Javadoc

Known Issues

  1. Pokémon Red and Blue run but render at half speed, even though audio run mostly as intended
  2. Pokémon Yellow not booting at all, it loops reading screen registers LCDC or STAT

Resources

  • GBDev Pan Docs A very comprehensive documentation on the Game Boy's inner workings
  • Gameboy CPU Manual A complete document explaining the CPU's inner workings (opcodes, timing, registers ...)
  • gbops A list of the opcodes of the Gameboy's custom CPU
  • Gameboy OPCODES Another list of the opcodes of the Game Boy's custom CPU, known to have some mistakes regarding some instruction sizes

Libraries


License

This project is licensed under the MIT license

About

Experimental GB Emulator

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
license-header

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published