Keep the ADPCM delta-N low byte when it is written first - #22
Merged
Merged
Conversation
The 256 floor on delta-N was written back into the register pair. A low byte written while the high byte was still 0x00 became 0x0100, which drops the low byte. fmgen floors only the value it derives from the two registers, so the floor now lives in updateADPCMPlaybackDelta() alone. あたしのぱ・ぴ・ぷ・ぺ・ぽ writes 0x09=0xDD then 0x0A=0x24 once after reset and got 0x2400 instead of 0x24DD, so its 66-second ADPCM stream played 2.3% slow and fell behind the RTC-paced animation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks done
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.
Summary
updateADPCMPlaybackDelta()の派生値にだけ適用するよう修正。Test plan
YM2608ADPCMDeltaNTestsを追加(書き込み順 2 通り、256 未満のペアの扱い)swift test全 PASS(928 tests)scripts/regression_compare.py20/20 PASS🤖 Generated with Claude Code