Skip to main content

parse

Function parse 

Source
pub fn parse(bytes: &[u8]) -> Result<(Cartridge, Box<dyn Mapper>), RomError>
Expand description

Parse an iNES 1.0 / NES 2.0 ROM file.

Validates the magic, detects the format, applies the appropriate sizing rules, slices out the trainer (if any), PRG-ROM, and CHR-ROM, and returns a fully populated Cartridge plus a constructed dyn Mapper ready for the bus to consume.

ยงErrors