Skip to content
This repository was archived by the owner on Mar 2, 2024. It is now read-only.

EthanPlant/RustyBoy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustyBoy

Tests

A Gameboy emulator written in Rust. It is currently WIP. The end goal at the moment is to get the first generation Pokemon games playable. This project was mostly written for fun and as a learning opportunity and so an emphasis is placed on clean code and usability over cycle accuracy.

Running RustyBoy

./rustyboy --rom <ROM>

Two optional flags may also be specified:

  • -o, --objects - Show the sprite data
  • -t, --tiles - Show the tilemap

Project Structure

RustyBoy is split up into two seperate Rust crates in order to keep the emulator itself seperate from any frontend implementation. All code pertaining to the emulation itself is found in rustboy-core, while the frontend is contained within rustyboy.

Tests

RustyBoy is developed with a comprehensive test suite to ensure correctness and avoid regression. These tests are ran on every commit, and can be ran automaticall with cargo test

Logging

RustyBoy uses env-logger to output logs. By default INFO, WARN, and ERROR logs will be shown. The RUST_LOG environment variable can be set to modify the log level.

Setting RUST_LOG to trace will cause RustyBoy to output all logs (this will flood the console with a lot of text), setting RUST_LOG to off can be used to disable logging entirely if desired. For more information on possible log settings see the env-logger documentation.

Building

After cloning the repository, simply run cargo build in the workspace directory.

Roadmap

  • CPU
    • Registers and flags
    • Implement instructions
    • Interrupts
    • Pass the boot ROM
    • Pass all Blargg test ROMs
    • Implement STOP instruction
  • Memory
    • Proper memory map
    • Memory mapped IO
    • OAM DMA
  • Timer
  • Cartridges
    • No MBC
    • MBC-1
    • MBC-5
  • Input
  • Graphics
    • Draw Background
    • Background scrolling
    • Draw window
    • Draw sprites
    • Handle flipped sprites
    • Handle 8x16 sprites
    • Correct ordering of sprite and background tiles
    • Pass DMG-acid test
  • Audio
    • Square channels
    • Volume envelope
    • Frequency sweeping
    • Wave channel
    • Noise channel
  • Frontends
    • Desktop frontend
    • WASM frontend
  • QoL Features
    • Savestates
    • Rewind
    • Speed up
    • Debugger

Working Games

  • Tetris
  • Dr. Mario
  • Link's Awakening
  • Kirby's Dream Land
  • Super Mario Land
  • Pokemon Red/Blue

Working Test ROMs

  • Gameboy boot ROM
  • Blargg cpu_instrs
  • Blargg instr_timing
  • Mooneye daa

About

A Gameboy emulator written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages