Git Product home page Git Product logo

gbemu's Introduction

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

gbemu's People

Contributors

alban098 avatar

Stargazers

ngy avatar Larson T. avatar Blaine Mason avatar Federico Berti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.