fix(jpeg): correct remaining-MCU column in restart C fallback #1355

Merged
coah80 merged 1 commits from agent/fix/jpeg-restart-fallback into main 2026-10-09 18:03:51 +00:00
coah80 commented 2026-10-09 18:00:00 +00:00 (Migrated from github.com)

Summary

Correct one inactive C fallback expression: the remaining-MCU result subtracts posX after subtracting posY * maxX. It previously subtracted posY twice. Original instructions load offset 0 (posX), and the normal decoder uses the same row-major formula.

The active MWCC assembly placeholder and inventory are unchanged. This is not a claimed exact-C conversion.

Verification

Independently reviewed; rebased on 8e47db4a27 and parent build/test rerun.

  • Complete rebuilt jdec_main.o byte-identical to retained production baseline.
  • All 13 unit functions and target code/data exact; normalized relocations preserved.
  • Full 43U build and explicit ok pass; original DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • All 35 current workflow guard tests pass.
  • Previous fresh f2006bdd all-unit comparison showed all 1,028 report records unchanged; later rebase adds only unrelated code/guard changes.
  • Three assembly placeholders remain; no completion claim or reclassification.

Evidence: tools/decomp-assist/jpeg-restart-status-lifetime.attempts.md. Rejected nonexact source trials were restored, and reference assembly remains local.

Note

Fix remaining-MCU column in TMCJPEGDEC_err_restart C fallback

Corrects the fallback return calculation in jdec_main.c: the final subtraction now uses posX instead of subtracting posY a second time. Adds an investigation report documenting the candidate structures and validation for this correction. The retained assembly path is unchanged; only the non-assembly fallback differs at runtime.

Macroscope summarized 4359969.

## Summary Correct one inactive C fallback expression: the remaining-MCU result subtracts posX after subtracting posY * maxX. It previously subtracted posY twice. Original instructions load offset 0 (posX), and the normal decoder uses the same row-major formula. The active MWCC assembly placeholder and inventory are unchanged. This is not a claimed exact-C conversion. ## Verification Independently reviewed; rebased on 8e47db4a275d21d574950f506a4f0d8b1d4e22cb and parent build/test rerun. - Complete rebuilt jdec_main.o byte-identical to retained production baseline. - All 13 unit functions and target code/data exact; normalized relocations preserved. - Full 43U build and explicit ok pass; original DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - All 35 current workflow guard tests pass. - Previous fresh f2006bdd all-unit comparison showed all 1,028 report records unchanged; later rebase adds only unrelated code/guard changes. - Three assembly placeholders remain; no completion claim or reclassification. Evidence: tools/decomp-assist/jpeg-restart-status-lifetime.attempts.md. Rejected nonexact source trials were restored, and reference assembly remains local. <!-- 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 remaining-MCU column in `TMCJPEGDEC_err_restart` C fallback > Corrects the fallback return calculation in [jdec_main.c](https://github.com/coah80/wii-ipl/pull/1355/files#diff-5ab25caff90d6b669def5ba3ff60be90fcac357bf86ecb43b0afb947f56bc4d2): the final subtraction now uses `posX` instead of subtracting `posY` a second time. Adds an investigation report documenting the candidate structures and validation for this correction. The retained assembly path is unchanged; only the non-assembly fallback differs at runtime. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 4359969.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-09 18:03:48 +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.