Recover 64-bit SD notice signatures and match two callers #817

Merged
coah80 merged 1 commits from agent/bittle/sd-notice-title-id into main 2026-10-02 15:10:09 +00:00
coah80 commented 2026-10-02 15:08:32 +00:00 (Migrated from github.com)

Correct enqueueChannelNotice/enqueueStateNotice from an unused controller plus two 32-bit title halves to a single u64 title ID. Shared header changed; all 1,027 native objects were clean-rebuilt and audited.

ABI evidence

  • The original member callees consume the title from r5/r6 and the final value/state from r7, with this in r3. r4 is unused, consistent with the alignment hole before the 64-bit argument.
  • Original callers do not initialize r4. The old four-u32 prototype forced a spurious li r4,0 and changed argument scheduling.
  • The corrected two-argument signatures preserve both callees byte-for-byte (23/23 instructions each), while both callers now match exactly: startCopyProgress 86/86 and updateCopyStart 76/76.
  • Update the two symbols.txt manglings to FUxUl; addresses 813DB41C/813DB4D4 and sizes 0x5C are unchanged. This is an ABI correction, not a rename-only matching gain. Other notice APIs are untouched.

Verification on 1c974dbd49

  • SDChannelTitle: 66/69 -> 68/69 exact functions; matched code 17,828 -> 18,476 (+648). Data remains 1,976/1,976. The final 148-byte flushSaveBeforeExit is still nonmatching.
  • SDChannelSelect stays 120/129 exact, 28,152 matched code and 2,960/2,960 data. Both units remain NonMatching; no linkage gain claimed.
  • Full clean 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • Pools identical: title 55/55, selector 101/101. Literal audit: 188 exact functions, 126 arguments, no candidates/errors/skips.
  • Across all 1,027 objects only SDChannelTitle .text changes (20,096 -> 20,088 bytes, the two removed instructions and corresponding scheduling). Selector allocated bytes/relocations unchanged. All allocated data unchanged; zero previously exact-function or unit code/data regressions after accounting for the two renamed callees.
  • Link-address audit zero differences. Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass; fresh fetch confirmed base remained origin/main.
  • Published tree 3bdd7bdbea equals tested local tree.

Draft for review; no merge performed.

Note

Restore 64-bit title IDs in SDChannelSelect notice methods

  • Changes enqueueChannelNotice and enqueueStateNotice to take a full 64-bit title ID plus a 32-bit value/state, replacing the controller/page/index parameters, in iplSDChannelSelect.h and iplSDChannelSelect.cpp
  • The notice command now copies the supplied title ID directly instead of rebuilding it from page and index
  • Updates the two callers in iplSDChannelTitle.cpp to pass mTitleId and temporaryTitle directly, dropping the high/low 32-bit split
  • Updates the mangled symbol names in symbols.txt to match the new two-argument signatures

Macroscope summarized cc35159.

Correct enqueueChannelNotice/enqueueStateNotice from an unused controller plus two 32-bit title halves to a single u64 title ID. Shared header changed; all 1,027 native objects were clean-rebuilt and audited. ## ABI evidence - The original member callees consume the title from r5/r6 and the final value/state from r7, with this in r3. r4 is unused, consistent with the alignment hole before the 64-bit argument. - Original callers do not initialize r4. The old four-u32 prototype forced a spurious li r4,0 and changed argument scheduling. - The corrected two-argument signatures preserve both callees byte-for-byte (23/23 instructions each), while both callers now match exactly: startCopyProgress 86/86 and updateCopyStart 76/76. - Update the two symbols.txt manglings to FUxUl; addresses 813DB41C/813DB4D4 and sizes 0x5C are unchanged. This is an ABI correction, not a rename-only matching gain. Other notice APIs are untouched. ## Verification on 1c974dbd492c2551e7f7478fcecaa9e34bf1e96d - SDChannelTitle: 66/69 -> 68/69 exact functions; matched code 17,828 -> 18,476 (+648). Data remains 1,976/1,976. The final 148-byte flushSaveBeforeExit is still nonmatching. - SDChannelSelect stays 120/129 exact, 28,152 matched code and 2,960/2,960 data. Both units remain NonMatching; no linkage gain claimed. - Full clean 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - Pools identical: title 55/55, selector 101/101. Literal audit: 188 exact functions, 126 arguments, no candidates/errors/skips. - Across all 1,027 objects only SDChannelTitle .text changes (20,096 -> 20,088 bytes, the two removed instructions and corresponding scheduling). Selector allocated bytes/relocations unchanged. All allocated data unchanged; zero previously exact-function or unit code/data regressions after accounting for the two renamed callees. - Link-address audit zero differences. Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass; fresh fetch confirmed base remained origin/main. - Published tree 3bdd7bdbea34abf20b2df44608a52195132eaeaf equals tested local tree. Draft for review; no merge performed. <!-- 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 64-bit title IDs in `SDChannelSelect` notice methods > - Changes `enqueueChannelNotice` and `enqueueStateNotice` to take a full 64-bit title ID plus a 32-bit value/state, replacing the controller/page/index parameters, in [iplSDChannelSelect.h](https://github.com/coah80/wii-ipl/pull/817/files#diff-22fde3ca4c8d88212ba9d0af78753c5dab245b25868dc7bf6ef8524172c45a4b) and [iplSDChannelSelect.cpp](https://github.com/coah80/wii-ipl/pull/817/files#diff-e53501e65bee666a9170934feea187bf6eca90a50d75b60f63ea84bc4af67569) > - The notice command now copies the supplied title ID directly instead of rebuilding it from page and index > - Updates the two callers in [iplSDChannelTitle.cpp](https://github.com/coah80/wii-ipl/pull/817/files#diff-d140de445093e46f6a07456c41323b579bbd0d658fa896b087fac0133d388fda) to pass `mTitleId` and `temporaryTitle` directly, dropping the high/low 32-bit split > - Updates the mangled symbol names in [symbols.txt](https://github.com/coah80/wii-ipl/pull/817/files#diff-92f49dd4754762deffc0a2c26a42d508945e86a4db65a437b06cd7a740fab114) to match the new two-argument signatures > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized cc35159.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 15:10:07 +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.