5 unstable releases

0.3.0 Dec 23, 2019
0.2.2 Jun 29, 2019
0.2.1 Jun 29, 2019
0.2.0 Jun 29, 2019
0.1.0 Jun 19, 2019

#8 in #rom

Apache-2.0

47KB
1K SLoC

GameBoy ROM parser

Build Status Crates.io Version

A parser to get data out of GB ROMs and perform basic validation. It provides a streaming opcode parser as well as high-level types for inspecting the Gameboy ROM's header.

Demonstration

cargo run --bin gb2json --features="serde_json" -- /path/to/rom/data
cargo run --bin gbstats -- /path/to/rom/data

And here's it in use in a real emulator (rusty-boy).


lib.rs:

A parser for Gameboy ROMS.

This crate provides a streaming Gameboy instruction parser as well as some high-level types like RomHeader and RomType.

Basic validation is provided through the validate method on RomHeader.

Header logic based on info from the GB CPU Manual.

Opcode parsing logic was created with this opcode table as a reference.

Information from other places is and other places is called out in comments in the relevant files

Dependencies

~1–1.7MB
~37K SLoC