4 releases
Uses new Rust 2024
| 0.2.0 | Jan 7, 2026 |
|---|---|
| 0.1.2 | Jan 7, 2026 |
| 0.1.1 | Jan 7, 2026 |
| 0.1.0 | Jan 7, 2026 |
#170 in Emulators
140KB
4K
SLoC
rbgb
A simple Game Boy emulator written in Rust.
Features
- CPU emulation (Sharp LR35902)
- Shared Memory bank
- Basic graphics rendering
- ROM loading
Repo Basics
Before running this project ensure SDL2 is installed if you are not running with docker otherwise these steps will fail.
-
Clone the repository:
git clone https://github.com/Hyphen325/rbgb.git cd rbgb -
Build the project:
cargo build --release -
Run the emulator:
cargo run --release -
Select a ROM
Load a rom by pressing L on the opened window for the ROM path prompt
Requirements
- Rust (latest stable)
- SDL2 or Docker
- CMake
Running Tests
To build and run tests locally:
-
Clone the repository:
git clone https://github.com/Hyphen325/rbgb.git cd rbgb -
Run the tests:
cargo test
Outstanding Work
- Implement handling of poisoned Mutexes
- Implement full multithreading
- Modify register system to allow them to be set more gracefully
- Implement library features for emulator and drop sdl to allow for apps to implement on top of the emulator
Acknowledgements
Much of this was written and based off of Codeslinger Gameboy. I needed this guide to get through most of this. Additionally, I learned about how the RZ80 worked from RZ80 and modified the CPU implementation of the LR35902 from rboy. Getting the CPU emulation to work was the hardest part of this project.
License
MIT
Dependencies
~17MB
~366K SLoC