mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
audio: update audio_demo golden, revert unrelated main.rs mapper fix
Two CI fixes for the audio subsystem PR: 1. Update `tests/emulator/goldens/audio_demo.audio.hash` from the old driver's hash (`ace0df78`) to the new driver's hash (`6a3efe63`). Sample count is unchanged (132084) — this is exactly the expected side effect of rewriting how `play` and `start_music` talk to the APU. The WAV bytes now reflect a real 6-frame envelope on `play coin` and a real 6-note loop on `start_music Theme` instead of the old static-tone output. 2. Revert the incidental `Linker::new` -> `Linker::with_mapper` swap in `src/main.rs`. That change fixed a pre-existing bug where the CLI always wrote NROM (mapper 0) into the iNES header regardless of the source's `mapper:` declaration, which shifted jsnes's interpretation of MMC3 programs and produced 9 extra audio samples for `mmc3_per_state_split` and `scanline_split`. The fix is correct but it's unrelated to audio, and bundling it into this PR would have required updating goldens for two other programs. I'll file that as a separate PR with its own golden update. The remaining call site still passes `&sfx, &music` into `link_with_all_assets`, so the audio pipeline works exactly as before. Full CI green locally: 381 unit tests, 43 integration tests, 19/19 emulator goldens match. https://claude.ai/code/session_015WfaDttE3DpWn9rpyfpQd8
This commit is contained in:
parent
d42540f45e
commit
a3b0ea34a0
2 changed files with 8 additions and 3 deletions
|
|
@ -313,8 +313,13 @@ fn compile(input: &PathBuf, opts: &CompileOptions) -> Result<Vec<u8>, ()> {
|
|||
}
|
||||
|
||||
// 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue