6 releases (3 breaking)
0.4.0 | Jul 6, 2023 |
---|---|
0.3.0 | Dec 23, 2019 |
0.2.2 | Jun 29, 2019 |
0.1.0 | Jun 19, 2019 |
#157 in Emulators
45 downloads per month
49KB
1K
SLoC
GameBoy ROM parser
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
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
Basic usage:
let rom = gameboy_rom::GameBoyRom::new(rom_buffer.as_slice());
let rom_header = rom.parse_header()?;
Dependencies
~1.1–2MB
~41K SLoC