Correct memory-card conversion constant ownership #697

Merged
coah80 merged 1 commits from agent/bittle/memorycard-float-boundary into main 2026-10-02 00:35:49 +00:00
coah80 commented 2026-10-02 00:22:01 +00:00 (Migrated from github.com)

Relocation-backed boundary correction

Move the MemoryCard/MemoryCardBase .sdata2 boundary from 0x81694A80 to 0x81694A78. The eight-byte double at 0x81694A78 (4330000080000000, signed integer conversion bias) is used by MemoryBase::set_textbox at function +0x4C (SDA21 relocation). It belongs to the base unit, not MemoryCard.

After correction:

  • MemoryCard .sdata2: 16/16 bytes identical
  • MemoryCardBase .sdata2: source 12 bytes exactly match reference prefix, followed by four existing alignment zeros
  • MemoryBase::set_textbox: 36/36 instructions, ctxdiff 0
  • Units retain 100% code, respectively 41/41 and 34/34 functions
  • MemoryCard matched data 2640/2664 → 2656/2656 (100%)
  • MemoryCardBase matched data 144/152 → 160/160 (100%)
  • Aggregate matched data +32 bytes from corrected ownership/re-attribution; total data unchanged

Verification

Rebased and fully rebuilt on a81b7c36fe. Only two adjacent boundaries in config/43U/splits.txt change; symbol addresses/sizes and C/C++ sources are untouched. All affected source .text bytes remain identical. Full 43U all_source/progress/report/ok passes; DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d. Workflow guards 7/7, pool tests 8/8, jump-table tests 20/20; worktree checks pass. ctxdiff uses the disclosed local pyelftools/Capstone compatibility adapter. No new padding, assembly or weak-vtable changes. No code/link percentage gain claimed; affected units were already linked. Left for Cole's review and merge.

Note

Fix .sdata2 split boundary between iplMemoryCard.cpp and iplMemoryCardBase.cpp

Shifts the file boundary in splits.txt so iplMemoryCard.cpp ends 8 bytes earlier and iplMemoryCardBase.cpp starts at that address. The overall .sdata2 section range is unchanged. Risk: symbols near the boundary in iplMemoryCard.cpp / iplMemoryCardBase.cpp may move between objects; verify the 8 bytes now belong to the base file.

Macroscope summarized a371d48.

## Relocation-backed boundary correction Move the MemoryCard/MemoryCardBase .sdata2 boundary from 0x81694A80 to 0x81694A78. The eight-byte double at 0x81694A78 (`4330000080000000`, signed integer conversion bias) is used by MemoryBase::set_textbox at function +0x4C (SDA21 relocation). It belongs to the base unit, not MemoryCard. After correction: - MemoryCard .sdata2: 16/16 bytes identical - MemoryCardBase .sdata2: source 12 bytes exactly match reference prefix, followed by four existing alignment zeros - MemoryBase::set_textbox: 36/36 instructions, ctxdiff 0 - Units retain 100% code, respectively 41/41 and 34/34 functions - MemoryCard matched data 2640/2664 → 2656/2656 (100%) - MemoryCardBase matched data 144/152 → 160/160 (100%) - Aggregate matched data +32 bytes from corrected ownership/re-attribution; total data unchanged ## Verification Rebased and fully rebuilt on a81b7c36fe25993fac3ad2a3009f16839aed40ec. Only two adjacent boundaries in config/43U/splits.txt change; symbol addresses/sizes and C/C++ sources are untouched. All affected source .text bytes remain identical. Full 43U all_source/progress/report/ok passes; DOL SHA1 is 26116613f624061ba99c8d1a299aaa6efa85670d. Workflow guards 7/7, pool tests 8/8, jump-table tests 20/20; worktree checks pass. ctxdiff uses the disclosed local pyelftools/Capstone compatibility adapter. No new padding, assembly or weak-vtable changes. No code/link percentage gain claimed; affected units were already linked. 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] > ### Fix `.sdata2` split boundary between `iplMemoryCard.cpp` and `iplMemoryCardBase.cpp` > Shifts the file boundary in [splits.txt](https://github.com/coah80/wii-ipl/pull/697/files#diff-d5132efbf4d83cc6fc61c89e9d57150d270f1361827760236aeab4e594f19366) so `iplMemoryCard.cpp` ends 8 bytes earlier and `iplMemoryCardBase.cpp` starts at that address. The overall `.sdata2` section range is unchanged. Risk: symbols near the boundary in `iplMemoryCard.cpp` / `iplMemoryCardBase.cpp` may move between objects; verify the 8 bytes now belong to the base file. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized a371d48.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 00:32:55 +00:00 (Migrated from github.com)

Rebased the unchanged boundary correction onto 7a24a5c1 after #698. Fresh all_source/progress/report/ok passes and the DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d. Tested local tree 85911bc753 equals the new remote tree. Head a371d4842f.

Rebased the unchanged boundary correction onto 7a24a5c1 after #698. Fresh all_source/progress/report/ok passes and the DOL SHA1 remains 26116613f624061ba99c8d1a299aaa6efa85670d. Tested local tree 85911bc753ed2c328ad1a6deac20838822a25c22 equals the new remote tree. Head a371d4842fce097d3af078d6ff64294e0660608f.
coah80 commented 2026-10-02 00:35:45 +00:00 (Migrated from github.com)

Reviewed and merged: relocation-backed split boundary correction, splits.txt only. The gate's complete_data drop is the bytes moving to the adjacent unit (total unchanged, both units' matched data now 100%). Full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d. Good evidence.

Reviewed and merged: relocation-backed split boundary correction, splits.txt only. The gate's complete_data drop is the bytes moving to the adjacent unit (total unchanged, both units' matched data now 100%). Full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d. Good evidence.
Sign in to join this conversation.