Skip to content

sturdy-robot/sturdygb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SturdyGB

An experimental GameBoy emulator written in Rust.

Plans

The plan is to be a fully compatible GameBoy emulator that runs GB and GBC games.

Checklist of (not yet) implemented features:

  • CPU
  • PPU
  • Timer
  • Emulate all versions of the GameBoy (DMG, SGB, MGB, GBC)
  • Disassembly
  • Cartridge
    • ROMONLY
    • MBC1
    • MM01
    • MBC2
    • MBC3
    • MBC5
    • MBC7
  • Memory Bus
  • Serial
  • Interrupts
  • Audio
  • Joystick and input
  • Save states
  • Windowing and display
  • Debugger
  • Cheats and GameShark
  • Rewind
  • Libretro core
  • Android port
  • Frontend

Reference material

This project is based on the research and documentation made by giants on the GameBoy reverse-engineering scene.

Thanks to all the following documentation and repos, I was able to test and debug my emulator properly:

  • GameBoy Opcodes tables: https://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html and https://gbdev.io/gb-opcodes/optables/
  • GameBoy CPU Manual
  • The Cycle-Accurate GameBoy Docs
  • Emulation of the Nintendo GameBoy (DMG-01) (PyBoy)
  • SameBoy: the SameBoy emulator is incredibly accurate and was a great resource for learning and testing my own emulator and test my implementation. Much of the implementation details in the opcodes were based on SameBoy's implementation.
  • Rboy: this project helped me out early on to understand how to implement a GameBoy emulator. I started this project with this implementation in mind, but later I decided to rewrite everything from scratch, taking what I learned about Rust and the GameBoy from this repo.
  • Gambatte: seeing how others implemented the same thing was a great source of inspiration. Gambatte is also pretty accurate, and helped me understand a few things that I could not grasp from SameBoy.
  • mGBA: mGBA is not only a GBA emulator, but it also contains a GameBoy core inside it, and it was pretty helpful overall.
  • BGB: the BGB emulator, although not open source, has an awesome debugger. Not only it can emulate several GameBoy versions, but the debugger allows me to see every register and values in real-time. It was an awesome resource for comparing implementations and testing my emulator's accuracy.
  • GameBoy-Online: I discovered this emulator when looking at the GB-Studio project. This is the emulator they used for GB-Studio, and when I was implementing some opcodes originally, I was looking at this implementation to understand what the hell I was doing.
  • LLD GameBoy development series: The implementation and explanations of some GameBoy features here were very useful. It helped me a lot with Timer.
  • GameBoy Doctor: This utility helped me to debug my wrong implementations. It's a God's sent tool for someone that is developing a GameBoy emulator for the first time.

License

Copyright © 2022-2023 Pedrenrique G. Guimarães

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

The project is licensed under MIT.

About

Experimental game boy emulator in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages