Skip to main content

parse_nsf

Function parse_nsf 

Source
pub fn parse_nsf(bytes: &[u8]) -> Result<Nsf, MapperError>
Expand description

Parse an NSF-family music file — classic NESM or extended NSFE.

Dispatches on the container magic; both fill the same Nsf. NSFe carries its play rate through the region flags (no µs divider), so its Nsf::play_speed_ntsc/Nsf::play_speed_pal stay 0 and Nsf::effective_speed_us resolves them to the region default.

§Errors

Returns a MapperError::Invalid when the magic is wrong, the file is truncated/short, or the header/chunks are internally inconsistent.