decomp(bs2): restore disk-presence read before cover reset #1077

Merged
coah80 merged 1 commits from agent/bittle/bs2-presence-lifetime into main 2026-10-03 07:37:39 +00:00
coah80 commented 2026-10-03 07:36:30 +00:00 (Migrated from github.com)

Source-grounded partial

BS2Tick case 0 now reads the existing volatile BS2NoDisk into the existing status local before resetting AudioBufferUnconfigured and CoverBlock.state, then uses that captured value. This restores the actual original load/store order at offsets +0xC8 through +0xD4. No new local, qualifier, dummy state, assembly, shared-header, or linking change. The value is immediately assigned and genuinely consumed; case 0 always breaks and other status uses retain their preceding assignments.

Independent parent verification on d170fbb8

  • BS2Tick fuzzy: 98.639175% → 98.73196%; unit: 99.09658% → 99.138985%
  • Still 1937/1940 instructions, not an exact match
  • All 25 exact functions preserved; matched code5112 and data155504 unchanged; other1026 unit reports identical
  • Eleven changed instructions confined to the initialization slice, three relocation positions move within it; all1461 relocation identities/count preserved, callback registrations and other instruction streams unchanged
  • Raw original DOL corroborates all29 instructions in the affected slice and201 original direct-call targets
  • Parent independently rebuilt and reran a bounded three-object interpreter over10036 flag pairs, including signed boundaries and deterministic full-width samples; final memory/state agree and candidate disk/audio/cover/state access trace matches target. All29 slice instructions covered; wrong signed-test negative control detected. This is a bounded slice audit, not whole-function/runtime equivalence
  • Pool91/91 identical; literal audit97 arguments across28 functions, no candidates/errors; BS2Tick remains a pre-existing unequal-size skip
  • Full43U all_source/progress/report/ok passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
  • Full-report and allocated-section comparisons preserve existing exact/code/data; diff checks pass

Uploaded tree9f6a66d0b9c0682b28f2ff7563d02a8956b47827 equals locally tested tree. Attempts evidence records historical partial, current measurements and limitations. No merge or auto-merge requested.

Note

Restore disk-presence read before cover reset in BS2Tick case 0

In case 0 of BS2Tick, the disk-presence value is now captured into the local status before the audio-buffer and cover-state resets. The no-disk branch then uses that captured value instead of reading BS2NoDisk after the resets. This restores the original access order to match the source binary. Risk: the value used for the state transition can differ from the previous post-reset read of BS2NoDisk. Adds a validation report in bs2-presence-lifetime-20261003.md.

Macroscope summarized 93c6c9f.

## Source-grounded partial BS2Tick case 0 now reads the existing volatile BS2NoDisk into the existing status local before resetting AudioBufferUnconfigured and CoverBlock.state, then uses that captured value. This restores the actual original load/store order at offsets +0xC8 through +0xD4. No new local, qualifier, dummy state, assembly, shared-header, or linking change. The value is immediately assigned and genuinely consumed; case 0 always breaks and other status uses retain their preceding assignments. ## Independent parent verification on d170fbb8 - BS2Tick fuzzy: 98.639175% → 98.73196%; unit: 99.09658% → 99.138985% - Still 1937/1940 instructions, not an exact match - All 25 exact functions preserved; matched code5112 and data155504 unchanged; other1026 unit reports identical - Eleven changed instructions confined to the initialization slice, three relocation positions move within it; all1461 relocation identities/count preserved, callback registrations and other instruction streams unchanged - Raw original DOL corroborates all29 instructions in the affected slice and201 original direct-call targets - Parent independently rebuilt and reran a bounded three-object interpreter over10036 flag pairs, including signed boundaries and deterministic full-width samples; final memory/state agree and candidate disk/audio/cover/state access trace matches target. All29 slice instructions covered; wrong signed-test negative control detected. This is a bounded slice audit, not whole-function/runtime equivalence - Pool91/91 identical; literal audit97 arguments across28 functions, no candidates/errors; BS2Tick remains a pre-existing unequal-size skip - Full43U all_source/progress/report/ok passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d - Full-report and allocated-section comparisons preserve existing exact/code/data; diff checks pass Uploaded tree9f6a66d0b9c0682b28f2ff7563d02a8956b47827 equals locally tested tree. Attempts evidence records historical partial, current measurements and limitations. No merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Restore disk-presence read before cover reset in `BS2Tick` case 0 > In case 0 of `BS2Tick`, the disk-presence value is now captured into the local `status` before the audio-buffer and cover-state resets. The no-disk branch then uses that captured value instead of reading `BS2NoDisk` after the resets. This restores the original access order to match the source binary. Risk: the value used for the state transition can differ from the previous post-reset read of `BS2NoDisk`. Adds a validation report in [bs2-presence-lifetime-20261003.md](https://github.com/coah80/wii-ipl/pull/1077/files#diff-148df5e461919db7c90fe1fb2c365d340eeb2dba625d37e9c1f2f609a4a289cb). > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 93c6c9f.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 07:37:37 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.