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

#72 in Emulators

23 downloads per month



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.


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).


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()?;


~42K SLoC