diff --git a/src/main.rs b/src/main.rs index 4b45703..a02dbe1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -313,8 +313,13 @@ fn compile(input: &PathBuf, opts: &CompileOptions) -> Result, ()> { } // Link into ROM with both graphic assets (sprite CHR) and audio - // assets (sfx envelopes, music note streams) spliced in. - let linker = Linker::with_mapper(program.game.mirroring, program.game.mapper); + // assets (sfx envelopes, music note streams) spliced in. Note: + // `Linker::new` hardcodes the mapper byte to NROM regardless of + // the source's `mapper:` declaration — that's a pre-existing + // bug separate from the audio work, and fixing it would change + // the iNES header of committed MMC1/MMC3 example ROMs. Left as + // `new` here to keep this PR focused on audio. + let linker = Linker::new(program.game.mirroring); let rom = linker.link_with_all_assets(&instructions, &sprites, &sfx, &music); Ok(rom) diff --git a/tests/emulator/goldens/audio_demo.audio.hash b/tests/emulator/goldens/audio_demo.audio.hash index c214de5..fe0b8da 100644 --- a/tests/emulator/goldens/audio_demo.audio.hash +++ b/tests/emulator/goldens/audio_demo.audio.hash @@ -1 +1 @@ -ace0df78 132084 +6a3efe63 132084