Repository navigation
The sound check records what the CPU sends to the sound CPU - #99
Merged
Merged
Conversation
…49C5)
sound.txt no longer lists the DSP writes the SPC700 makes, but the messages
the 65816 sends: the bytes uploaded through the boot code ("aram H") and
every message to the driver with port 1 below $80, a DSP write it passes on.
Krautrecker's driver writes the DSP on its own timer, which Rachael does
not run, so only the CPU's side can match on all three.
dampf's emulator reports the messages from Apu.cpuWrite and hashes only
the CPU's uploads; Mesen's script decodes the boot protocol from the CPU's
writes to $2140-$2143; Rachael logs in sfx_dsp, not in her DSP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skerkewitz
approved these changes
Nov 30, 2026
skerkewitz
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
sound.txt, which the checks compare between dampf's emulator, the desktop and Mesen, now records what the 65816 sends to the sound CPU instead of the DSP writes the SPC700 makes. This prepares the ground for SNES music: Krautrecker's driver writes the DSP on its own timer, and Rachael doesn't run it, so only the CPU's side can match on all three. You chose this option when we planned the music.The decision is a new record: the sound check compares what the CPU sends to the sound CPU (ADR-6G3E49C5). It amends the record on sound effects (ADR-6F60ZC7C) and the one on the Krautrecker driver (ADR-6FYT4Z4T). It also records your other decision: for now the desktop plays nothing for a Krautrecker song.
How
The file format stays the same:
aram Haftergame_init, theninit/tick, register, value. Only where the lines come from changes:aram His the FNV-1a of the bytes the CPU sent through the boot code (to$0200and up), with their addresses.$80, a DSP write the driver passes on: port 1 is the register, port 2 the value. The forwarding driver and Krautrecker's driver both read such a message this way. The commands of Krautrecker's driver ($80and up) will get lines of their own with the music.Where each side takes them:
Apu.onMessagereports every port-0 write after the jump. The upload hash comes only from the boot code's decoding, no longer from the SPC700's writes.onDspWriteis gone.dev/example_check.lua): decodes the boot protocol itself from the CPU's writes to$2140-$2143, the same rules asApu. It no longer hooks the SPC700.sfx_dspcalls the log where the CPU hands the write over, no longersdevkit__dsp_write.Verified
./gradlew build: 1280 tests, 0 failed.ExamplesTestcompares the emulator'ssound.txtwith the desktop's for all nine examples.dev/compare_example.shagainst Mesen:What follows
sound.txtchecks: the check no longer sees what the SPC700 does with the messages. dampf's SPC700 is checked against SingleStepTests (A complete SPC700 in dampf's emulator, with its timers and I/O registers #97), and Krautrecker checks its driver against Mesen.sound.txtfiles keep their contents. No entry indocs/game-findings.md.docs/sound.md, "The checks". It also mentioned the old, incomplete SPC700, which is now fixed.docs/testing.md,dev/README.md,lib/README.md, and the comments in the check scripts andlib/desktop/main.c.sound.txtwithout describing its lines, so nothing goes stale.🤖 Generated with Claude Code