Skip to main content

build_nsf

Function build_nsf 

Source
pub fn build_nsf(
    rom: &[u8],
    proposal: &Proposal,
    region: Region,
    info: &NsfInfo,
) -> Result<(Vec<u8>, Option<NoOpInit>), RipError>
Expand description

Write an NSF (version 1, one song) that drives proposal over the cartridge rom’s PRG.

When the proposal has no init routine, the init address is a $60 (RTS) byte found in the image, so init returns at once; the returned NoOpInit says where. region sets the file’s timing byte and speed word.

§Errors

RipError::Unsupported for a board this cannot image (see the module docs), or an image with no RTS byte to use as a no-op init.