A simple Game Boy emulator written in Rust.
- CPU emulation (Sharp LR35902)
- Shared Memory bank
- Basic graphics rendering
- ROM loading
- Dependency free (emulator lib)
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 --features gui
-
Select a ROM
Load a rom by pressing L on the opened window for the ROM path prompt
- Rust (latest stable)
- SDL2 or Docker
- CMake
To build and run tests locally:
-
Clone the repository:
git clone https://github.com/Hyphen325/rbgb.git cd rbgb -
Run the tests:
cargo test
- 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
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. Additionally this project includes the debug_println macro from the debug_print crate in order to make it dependency free for the library.
MIT