Decompile sound effect stopping #707

Merged
coah80 merged 1 commits from agent/bittle/sound-stop-cpp into main 2026-10-02 01:12:48 +00:00
coah80 commented 2026-10-02 01:10:50 +00:00 (Migrated from github.com)

Replace System::stopSE's assembly with C++ that checks the handle, finds the matching sound-effect block, stops it and clears its name/ID. Declaration order preserves the original loop registers.

Shared-header correction: stopSE returns void rather than int. The original routine sets no return value; all nine C++ call sites ignore the result. This avoids introducing an uninitialized/fabricated C++ return value. No virtual slot or parameter change.

Fresh verification on 589bee2b:

  • stopSE: 42/42 instructions (168 bytes), exact-name objdiff 100%
  • Compiled C++ instruction bytes and all four relocations are exactly identical to the former assembly source object
  • ctxdiff retains two pre-existing representation differences: undefined source _seBlk symbol versus original object's defined .bss+0xC. The reference ELF defines that same global at .bss+0xC; no destination changed
  • Pools identical (0 strings); no owned data changes
  • Deleted every source object and clean rebuilt after the header change; all unit/global report measures identical to fresh main, including every caller
  • Full all_source/progress/report/ok; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d
  • Workflow tests 7/7, pool tests 8/8, jump-table tests 20/20; diff/worktree checks pass
  • Disclosed local ctxdiff adapter; tested local/remote tree 7f3dc1eb27

The sound unit remains NonMatching, 56/57 exact functions, with its missing initializer and data/link work unresolved. No aggregate score gain or whole-unit completion claim. Left for Cole's review and merge.

Note

Decompile ipl.snd.System::stopSE into C++

  • Replaces the hand-written PowerPC assembly for System::stopSE in iplSound.cpp with a C++ implementation. It checks the handle is non-null and attached, scans the 16 sound-effect blocks for a match, stops it via SoundHandle::Stop(frames), and clears its name and ID.
  • Updates the declaration in iplSound.h to return void instead of int.
  • Behavioral Change: System::stopSE no longer returns an integer result through the C++ interface.

Macroscope summarized 2416764.

Replace System::stopSE's assembly with C++ that checks the handle, finds the matching sound-effect block, stops it and clears its name/ID. Declaration order preserves the original loop registers. Shared-header correction: stopSE returns void rather than int. The original routine sets no return value; all nine C++ call sites ignore the result. This avoids introducing an uninitialized/fabricated C++ return value. No virtual slot or parameter change. Fresh verification on 589bee2b: - stopSE: 42/42 instructions (168 bytes), exact-name objdiff 100% - Compiled C++ instruction bytes and all four relocations are exactly identical to the former assembly source object - ctxdiff retains two pre-existing representation differences: undefined source _seBlk symbol versus original object's defined .bss+0xC. The reference ELF defines that same global at .bss+0xC; no destination changed - Pools identical (0 strings); no owned data changes - Deleted every source object and clean rebuilt after the header change; all unit/global report measures identical to fresh main, including every caller - Full all_source/progress/report/ok; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d - Workflow tests 7/7, pool tests 8/8, jump-table tests 20/20; diff/worktree checks pass - Disclosed local ctxdiff adapter; tested local/remote tree 7f3dc1eb277917218fbc2739fdda68df6266342f The sound unit remains NonMatching, 56/57 exact functions, with its missing initializer and data/link work unresolved. No aggregate score gain or whole-unit completion claim. Left for Cole's review and merge. <!-- 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] > ### Decompile `ipl.snd.System::stopSE` into C++ > - Replaces the hand-written PowerPC assembly for `System::stopSE` in [iplSound.cpp](https://github.com/coah80/wii-ipl/pull/707/files#diff-7714533da12a3972eeb530c07525eeaa8431626dd951d08ba0a241474ddd3659) with a C++ implementation. It checks the handle is non-null and attached, scans the 16 sound-effect blocks for a match, stops it via `SoundHandle::Stop(frames)`, and clears its name and ID. > - Updates the declaration in [iplSound.h](https://github.com/coah80/wii-ipl/pull/707/files#diff-8b8879cc5c2733c8f3c81c76fef5d335fb015b6f3ab451afc857b4a01bf4d690) to return `void` instead of `int`. > - Behavioral Change: `System::stopSE` no longer returns an integer result through the C++ interface. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 2416764.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 01:12:46 +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.