diff --git a/src/scene/address/iplAddressEdit.cpp b/src/scene/address/iplAddressEdit.cpp index 8c40f08a..a5d202a9 100644 --- a/src/scene/address/iplAddressEdit.cpp +++ b/src/scene/address/iplAddressEdit.cpp @@ -1704,6 +1704,9 @@ void ipl::scene::AddressEdit::stt_wait_btn_fadein() { } void ipl::scene::AddressEdit::stt_wait_btn_fadeout() { + nw4r::lyt::Pane* label; + const wchar_t* message; + ipl::utility::FrameController* animator; bool friendFinished; if (mpFriendCache->getInfo(mSelectedFriend).attr.status == 2) { friendFinished = !mpCodeLayout->getAnim(0x15)->isPlaying(); @@ -1715,11 +1718,11 @@ void ipl::scene::AddressEdit::stt_wait_btn_fadeout() { friendFinished &= !mpCodeLayout->getAnim(0x17)->isPlaying(); if (friendFinished) { - nw4r::lyt::Pane* label = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); - const wchar_t* message = ipl::System::getMessage(0x30); + label = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true); + message = ipl::System::getMessage(0x30); set_textbox(label, message); ipl::System::getDialog()->callS2Btn2(0x142, 0x141, true); - ipl::layout::Animator* animator = mpCodeLayout->getAnim(0x1c); + animator = mpCodeLayout->getAnim(0x1c); animator->initFrame(); animator->restart(); mState = 4; diff --git a/tools/decomp-assist/fz16.attempts.md b/tools/decomp-assist/fz16.attempts.md new file mode 100644 index 00000000..b8e5e36a --- /dev/null +++ b/tools/decomp-assist/fz16.attempts.md @@ -0,0 +1,396 @@ +# fz16 attempts +Baseline origin/main ae5f904c0b95d2c8811b3eb5f0e409bd8389fdd0 + +src/scene/address/iplAddressEdit POOL IDENTICAL up to 57 (mine=57 base=57) + +src/scene/sdChannelSelect/iplSDChannelSelect POOL IDENTICAL up to 101 (mine=101 base=101) + +libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var POOL IDENTICAL up to 0 (mine=0 base=0) + +libs/RVL_SDK/src/kpad/KPAD POOL IDENTICAL up to 0 (mine=0 base=0) + +## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv +Fetch origin/main 36d651fe72c2aeca7ca08982f3df16d6409def4f. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820 + +## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv +Fetch origin/main 36d651fe72c2aeca7ca08982f3df16d6409def4f. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820 +- declare layout and event locals before construction: (19, 323) structural/positional; instructions 820/820; restored. +- use member layout for first label lookup: (19, 323) structural/positional; instructions 820/820; restored. +- reuse bLayout variable for second layout: (19, 323) structural/positional; instructions 820/820; restored. + +## src/scene/address/iplAddressEdit stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv +Fetch origin/main 36d651fe72c2aeca7ca08982f3df16d6409def4f. Initial assembly diagnosis: (0, 5) structural/positional differences; instructions 94/94 +- cache animation before testing branch: (0, 5) structural/positional; instructions 94/94; restored. +- split remaining animation completion temporaries: (0, 5) structural/positional; instructions 94/94; restored. +- declare final animator before completion boolean: (0, 5) structural/positional; instructions 94/94; restored. + +## src/scene/address/iplAddressEdit start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (8, 166) structural/positional differences; instructions 181/182 +- split grouped button cases: (8, 166) structural/positional; instructions 181/182; restored. +- explicit negative button case: (19, 69) structural/positional; instructions 185/182; restored. +- use unsigned switch discriminant: (8, 166) structural/positional; instructions 181/182; restored. + +## src/scene/address/iplAddressEdit start_left_event__Q33ipl5scene11AddressEditFPCc +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (8, 82) structural/positional differences; instructions 95/96 +- split grouped button cases: (8, 82) structural/positional; instructions 95/96; restored. +- explicit negative button case: (21, 36) structural/positional; instructions 99/96; restored. +- use unsigned switch discriminant: (8, 82) structural/positional; instructions 95/96; restored. + +## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84 +- hoist display string pointers before cache copy: (10, 68) structural/positional; instructions 82/84; restored. +- evaluate source cache entry before memcpy destination: (10, 68) structural/positional; instructions 82/84; restored. +- single union for mutually exclusive text buffers: build failed e\address\iplAddressEdit.cpp # --------------------------------------------- # 314: return; # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 2863: e::AddressEdit::wiiid_utf16(ipl::scene::sFriendInfo.addr.wiiId, wiiNo); # Error: ^^^^^ # (10140) undefined identifier 'wiiNo' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. + +## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38 +- cache mii id source before memcpy: (2, 2) structural/positional; instructions 38/38; restored. +- copy mii id through typed assignment: build failed ess\iplAddressEdit.cpp # --------------------------------------------- # 314: return; # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 2881: ipl::scene::sFriendInfo.attr.fdId = mCreateID; # Error: ^ # (10209) illegal implicit conversion from 'RFLCreateID' to # 'unsigned long long' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. +- hoist name source before destination clear: (2, 2) structural/positional; instructions 38/38; restored. + +## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75 +- remove redundant server case assignment: (17, 27) structural/positional; instructions 72/75; restored. +- network condition instead of switch: (12, 29) structural/positional; instructions 67/75; restored. +- assign message in all switch branches: (4, 22) structural/positional; instructions 77/75; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146 +- split elapsed tick subtraction temporary: (6, 20) structural/positional; instructions 146/146; restored. +- hoist start tick declaration: (4, 39) structural/positional; instructions 145/146; restored. +- separate bs2 manager lookup: build failed \mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 244: BS2Manager* manager = System::getBS2Manager(); # Error: ^^^^^^^^^^ # (10140) undefined identifier 'BS2Manager' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171 +- switch result with shared success cases: (8, 143) structural/positional; instructions 172/171; restored. +- swap result comparison order: (6, 143) structural/positional; instructions 170/171; restored. +- declare added flag before loop indices: (4, 143) structural/positional; instructions 170/171; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101 +- increment count with compound assignment: (2, 4) structural/positional; instructions 101/101; restored. +- increment count using explicit value assignment: (2, 4) structural/positional; instructions 101/101; restored. +- read usage threshold before count increment: (2, 5) structural/positional; instructions 101/101; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102 +- increment count with compound assignment: (2, 4) structural/positional; instructions 102/102; restored. +- increment count using explicit value assignment: (2, 4) structural/positional; instructions 102/102; restored. +- read usage threshold before count increment: (2, 5) structural/positional; instructions 102/102; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126 +- increment count with compound assignment: (2, 22) structural/positional; instructions 126/126; restored. +- increment count using explicit value assignment: (2, 22) structural/positional; instructions 126/126; restored. +- read usage threshold before count increment: (2, 23) structural/positional; instructions 126/126; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361 +- increment count with compound assignment: (8, 16) structural/positional; instructions 361/361; restored. +- increment count using explicit value assignment: (8, 16) structural/positional; instructions 361/361; restored. +- read usage threshold before count increment: (8, 20) structural/positional; instructions 361/361; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35 +- cache flush heap before save manager: (2, 2) structural/positional; instructions 35/35; restored. +- cache save manager before flush heap: build failed ojects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 1649: SaveDataManager* saveData = System::getSaveData(); # Error: ^^^^^^^^^^^^^^^ # (10140) undefined identifier 'SaveDataManager' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. +- split flush result assignment: (2, 2) structural/positional; instructions 35/35; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (4, 89) structural/positional differences; instructions 109/108 +- explicit null opt-out handler: (4, 89) structural/positional; instructions 109/108; restored. +- named initialized opt-out handler: (4, 89) structural/positional; instructions 109/108; restored. +- split scene lookup and button cast: (4, 89) structural/positional; instructions 109/108; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect initializeNormalPage__Q33ipl5scene15SDChannelSelectFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (3, 47) structural/positional differences; instructions 95/94 +- explicit null opt-out handler: (3, 47) structural/positional; instructions 95/94; restored. +- named initialized opt-out handler: (3, 47) structural/positional; instructions 95/94; restored. +- split scene lookup and button cast: (3, 47) structural/positional; instructions 95/94; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect selectChannel__Q33ipl5scene15SDChannelSelectFii +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (1, 19) structural/positional differences; instructions 60/59 +- explicit null opt-out handler: (1, 19) structural/positional; instructions 60/59; restored. +- named initialized opt-out handler: (1, 19) structural/positional; instructions 60/59; restored. +- split scene lookup and button cast: (1, 19) structural/positional; instructions 60/59; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233 +- declare projection before position: (46, 216) structural/positional; instructions 234/233; restored. +- declare scales before initializing: (23, 68) structural/positional; instructions 233/233; restored. +- load vertical scales before horizontal: (38, 72) structural/positional; instructions 233/233; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (9, 57) structural/positional differences; instructions 144/144 +- guard nonzero event with early return: build failed s\data- # d5\include\scene\iplSceneManager.h:14 # Z:\mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 3508: } else { # Error: ^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. +- reuse state temporary after special case dispatch: (9, 57) structural/positional; instructions 144/144; restored. +- invert state and preserve nested block: (9, 57) structural/positional; instructions 144/144; restored. + +## libs/RVL_SDK/src/kpad/KPAD reset_kpad +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 117/117 +- load reference distance before constants: (0, 10) structural/positional; instructions 117/117; restored. +- divide direct reference field for distance: (0, 10) structural/positional; instructions 117/117; restored. +- move distance quotient before initialization stores: (8, 110) structural/positional; instructions 118/117; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19 +- match multiplication operand order: (0, 10) structural/positional; instructions 19/19; restored. +- declare scale last after scalar temporaries: build failed de/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 360: f64 scaled = 0.908 * scale; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. +- compute double scale first with matching operands: (0, 14) structural/positional; instructions 19/19; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52 +- compute diagonal square before zero store: (0, 7) structural/positional; instructions 52/52; restored. +- declare square temporaries after widths: (0, 10) structural/positional; instructions 52/52; restored. +- derive squared diagonal at sqrt call: (0, 4) structural/positional; instructions 52/52; restored. + +## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101 +- separate magnitude computation from declaration: (2, 35) structural/positional; instructions 101/101; restored. +- declare normalized axes before magnitude: (2, 35) structural/positional; instructions 101/101; restored. +- compute vertical target before product: build failed DEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 500: f32 productY = targetY * normalizedY; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. + +## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400 +- declare previous vector before raw vector: (32, 82) structural/positional; instructions 400/400; restored. +- split core speed delta assignments: (16, 66) structural/positional; instructions 400/400; restored. +- name core squared magnitude before sqrt: build failed src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 613: f32 squaredMagnitude = kpad->status.acc.z * kpad->status.acc.z + (kpad->status.acc.x * kpad->status.acc.x + kpad->status.ac # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. + +## libs/RVL_SDK/src/kpad/KPAD select_1obj_first +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109 +- declare end pointer before current object: (4, 27) structural/positional; instructions 109/109; restored. +- initialize scan pointer after offsets: (4, 27) structural/positional; instructions 109/109; restored. +- for loop over objects instead of do loop: (14, 113) structural/positional; instructions 115/109; restored. + +## libs/RVL_SDK/src/kpad/KPAD select_1obj_continue +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (0, 17) structural/positional differences; instructions 93/93 +- declare direction components before scalar inputs: (2, 14) structural/positional; instructions 93/93; restored. +- calculate tangent products before axis products: (6, 17) structural/positional; instructions 93/93; restored. +- compute direction assignment before offset scaling: (0, 17) structural/positional; instructions 93/93; restored. + +## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250 +- declare delta vector before point: (40, 71) structural/positional; instructions 250/250; restored. +- separate horizon products into temporaries: (14, 49) structural/positional; instructions 250/250; restored. +- explicit negative distance branch: (14, 45) structural/positional; instructions 250/250; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADRead +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459 +- defer inside pointer lookup until status checked: (23, 105) structural/positional; instructions 459/459; restored. +- declare sample before status output: (11, 89) structural/positional; instructions 459/459; restored. +- declare channel pointer after integer locals: (11, 146) structural/positional; instructions 459/459; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADInit +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185 +- declare matrix and channel before float locals: (9, 81) structural/positional; instructions 185/185; restored. +- initialize loop pointer before matrix: (9, 81) structural/positional; instructions 185/185; restored. +- defer constant initialization to loop scope: (34, 155) structural/positional; instructions 184/185; restored. + +## libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var TMCJPEGDEC_IdctBlock4x4 +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (19, 93) structural/positional differences; instructions 136/136 +- load odd coefficients and emit output in index order: (39, 93) structural/positional; instructions 136/136; restored. +- interleave odd butterfly with row stores and reuse coefficient locals: (37, 93) structural/positional; instructions 136/136; candidate kept. +- odd rotation sum operand order reversed: (37, 93) structural/positional; instructions 136/136; restored. + +## libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var TMCJPEGDEC_IdctBlock4x4_Col +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (33, 134) structural/positional differences; instructions 139/137 +- load odd coefficients and emit output in index order: (33, 134) structural/positional; instructions 139/137; restored. +- interleave odd butterfly with row stores and reuse coefficient locals: (38, 136) structural/positional; instructions 139/137; candidate kept. +- odd rotation sum operand order reversed: (38, 136) structural/positional; instructions 139/137; restored. + +Data audit: AddressEdit 2560/2560, SDChannelSelect 2960/2960, KPAD 8032/8032; JPEG has no data. No symbol rename or extent correction needed. +SDK C89 build failures require declarations at block start; failed candidates restored. +SDButton handler target omits initialization of optOutEvent r5 in calcCommon, initializeNormalPage, selectChannel. Keeping initialized calls rather than fabricating an uninitialized argument. + +## src/scene/address/iplAddressEdit stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (0, 5) structural/positional differences; instructions 94/94 +- separate first combined completion result: (11, 15) structural/positional; instructions 94/94; restored. +- hoist label and message locals before boolean: (0, 2) structural/positional; instructions 94/94; restored. + +## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv +Fetch origin/main d8937f9e82e1531440b8a15d4e38d0fe19a46b7e. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84 +- combine textbox calls with nested pane lookup: (10, 68) structural/positional; instructions 82/84; restored. +- use one text buffer for mutually exclusive conversion: (19, 71) structural/positional; instructions 82/84; restored. + +## src/scene/address/iplAddressEdit stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv +Fetch origin/main 72cf3991b21de46366320f26bce5fbdf81392394. Initial assembly diagnosis: (0, 5) structural/positional differences; instructions 94/94 +- declare pane message and animator before completion: (0, 2) structural/positional; instructions 94/94; candidate kept. +- use FrameController play inline boundary: (0, 2) structural/positional; instructions 94/94; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos +Fetch origin/main c31af38e0e6ba02e457c527950fb14e76e54b9eb. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19 +- separate scalar declarations with target multiplication operand order: (0, 11) structural/positional; instructions 19/19; candidate kept. + +## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface +Fetch origin/main c653415d7727c951163de0f9415f5d697b4ebed2. Initial assembly diagnosis: (9, 57) structural/positional differences; instructions 144/144 +- flatten nonzero event guard: build failed s\data- # d5\include\scene\iplSceneManager.h:14 # Z:\mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 3508: } else { # Error: ^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored. +- reuse state temporary after special state switch: (9, 57) structural/positional; instructions 144/144; restored. +- flatten normal state guard: (9, 57) structural/positional; instructions 144/144; restored. + +## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos +Fetch origin/main d0a9514c9b9fe8ce0f7e891d570ca93b3cda79f1. Initial assembly diagnosis: (0, 10) structural/positional differences; instructions 19/19 +- height then half-height multiplier operand order: (0, 10) structural/positional; instructions 19/19; candidate kept. +- inline double scale in final projection product: (0, 10) structural/positional; instructions 19/19; restored. +- evaluate double scale before projection components: (0, 14) structural/positional; instructions 19/19; restored. + +## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface +Fetch origin/main d0a9514c9b9fe8ce0f7e891d570ca93b3cda79f1. Initial assembly diagnosis: (9, 57) structural/positional differences; instructions 144/144 +- switch dispatch for normal button event: (9, 60) structural/positional; instructions 145/144; restored. +- valid early return for nonzero button event: (9, 57) structural/positional; instructions 144/144; restored. + +## src/scene/address/iplAddressEdit stt_wait_btn_fadeout__Q33ipl5scene11AddressEditFv +Fetch origin/main d0a9514c9b9fe8ce0f7e891d570ca93b3cda79f1. Initial assembly diagnosis: (0, 2) structural/positional differences; instructions 94/94 +- direct inline play on animation lookup: (0, 2) structural/positional; instructions 94/94; restored. +- use base frame controller pointer for animation: (0, 0) structural/positional; instructions 94/94; candidate kept. +- limit final animation local scope: (0, 2) structural/positional; instructions 94/94; restored. +- minimal base-controller type change without declaration hoisting: (0, 3) structural/positional; instructions 94/94; restored. + +Register searches after structural trials: reset_kpad 71 declaration-order builds, best structural 0/positional 10, restored; stt_wait_btn_fadeout 13 builds, best 0/2, followed by base FrameController pointer reaching 0/0. KPADGetProjectionPos 26 builds, best 0/10 after operand-order changes; restored. +JPEG interleaved butterfly candidates and projection partials were restored to HEAD: no exact gain. + +AddressEdit clean full gate: +``` +full build: ok +main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d +[src/scene/address/iplAddressEdit] pool: IDENTICAL +[src/scene/address/iplAddressEdit] objdiff: code 21932/27112 data 2560/2560 functions 88/94 fuzzy 99.4923 linked code 0 +[src/scene/address/iplAddressEdit] instruction-exact functions: 88/94 +[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0 +[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0 +[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0 +[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0 +[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0 +[src/scene/address/iplAddressEdit] section .text size 27112 match 99.492325 +[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.44634 +[src/scene/address/iplAddressEdit] below 100: start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface 99.34066 +[src/scene/address/iplAddressEdit] below 100: start_left_event__Q33ipl5scene11AddressEditFPCc 98.958336 +[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571 +[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105 +[src/scene/address/iplAddressEdit] below 100: set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664 +[src/scene/address/iplAddressEdit] baseline: code 21556/27112 data 2560 functions 87 fuzzy 99.4886 +regressions vs baseline: 0 +global matched_code_percent: 89.13947 -> 89.15202 +global fuzzy_match_percent: 99.52161 -> 99.52165 +global complete_code_percent: 66.03058 -> 66.03058 +global matched_data_percent: 99.36508 -> 99.36508 +forbidden patterns added (net, per file): 0 +readability warnings (net, per file; must be 0 in the final result): 0 +GATE PASS +``` + +## Final remaining-function audit +Final fetch detected a concurrent remote JPEG _Col source change after these trials began. It was not imported. AddressEdit differs from remote only by this candidate; SDChannelSelect and KPAD remain unchanged. Gate baseline is the branch merge-base snapshot, as implemented by gate.py. Three distinct source-level attempts logged for every initially open function; failed compilations are marked and restored. +- create__Q33ipl5scene11AddressEditFv: 97.44634%; 3 logged attempts; equal 820 instructions; constant/base register allocation and instruction scheduling. +- start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface: 99.34066%; 3 logged attempts; 181/182 instructions; missing unconditional default-dispatch branch. +- start_left_event__Q33ipl5scene11AddressEditFPCc: 98.958336%; 3 logged attempts; 95/96 instructions; missing unconditional default-dispatch branch. +- get_friendinfo__Q33ipl5scene11AddressEditFv: 88.03571%; 5 logged attempts; 82/84 instructions; display-string pointer lifetimes and cache-copy argument setup. +- update_friendinfo__Q33ipl5scene11AddressEditFv: 99.42105%; 3 logged attempts; 38/38 instructions; memcpy source/destination address setup order. +- set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err: 98.666664%; 3 logged attempts; 76/75 instructions; redundant server message-id load. +- create__Q33ipl5scene15SDChannelSelectFv: 97.73972%; 3 logged attempts; 145/146 instructions; tick-duration arithmetic setup and scheduling. +- handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv: 99.15205%; 3 logged attempts; 170/171 instructions; result-dispatch branch and compaction counter allocation. +- collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: 97.81188%; 3 logged attempts; 101/101 instructions; count store versus usage-threshold load scheduling. +- collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: 97.833336%; 3 logged attempts; 102/102 instructions; count store versus usage-threshold load scheduling. +- collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: 97.29365%; 3 logged attempts; 126/126 instructions; page/order register allocation and count/threshold scheduling. +- collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: 97.55125%; 3 logged attempts; 361/361 instructions; four count-store versus threshold-load schedules. +- flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv: 99.65714%; 3 logged attempts; 35/35 instructions; save-manager/flush-heap argument load order. +- calcCommon__Q33ipl5scene15SDChannelSelectFv: 99.07407%; 3 logged attempts; 109/108 instructions; target has no initialized opt-out-handler r5 argument, initialized source retained. +- initializeNormalPage__Q33ipl5scene15SDChannelSelectFv: 98.93617%; 3 logged attempts; 95/94 instructions; target has no initialized opt-out-handler r5 argument, initialized source retained. +- selectChannel__Q33ipl5scene15SDChannelSelectFii: 98.305084%; 3 logged attempts; 60/59 instructions; target has no initialized opt-out-handler r5 argument, initialized source retained. +- setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj: 93.4721%; 3 logged attempts; 233/233 instructions; float local allocation, load scheduling and multiplication operands. +- onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface: 98.541664%; 8 logged attempts; 144/144 instructions; event-dispatch branch direction and nested condition scheduling. +- TMCJPEGDEC_IdctBlock4x4: 85.625%; 3 logged attempts; 136/136 instructions; integer butterfly reassociation, row-store scheduling and register allocation. +- TMCJPEGDEC_IdctBlock4x4_Col: 83.240875%; 3 logged attempts; 139/137 instructions; extra saved-register pair plus butterfly scheduling and allocation. +- reset_kpad: 99.48718%; 3 logged attempts; 117/117 instructions; float-register allocation, 71 declaration-order builds made no improvement. +- KPADGetProjectionPos: 96.57895%; 7 logged attempts; 19/19 instructions; floating-point operands and register allocation; declaration search plateau. +- KPADSetSensorHeight: 99.23077%; 3 logged attempts; 52/52 instructions; diagonal-square temporary and inside-array register allocation. +- calc_acc_horizon: 97.27723%; 3 logged attempts; 101/101 instructions; floating-point allocation and product scheduling. +- read_kpad_acc: 98.15%; 3 logged attempts; 400/400 instructions; smoothing-helper floating-point allocation and operand scheduling. +- select_1obj_first: 98.348625%; 3 logged attempts; 109/109 instructions; scan pointer and floating-point local allocation. +- select_1obj_continue: 98.49462%; 3 logged attempts; 93/93 instructions; tangent/direction floating-point allocation. +- calc_dpd_variable: 94.82%; 3 logged attempts; 250/250 instructions; smoothing floating-point temporary scheduling and allocation. +- KPADRead: 97.52723%; 3 logged attempts; 459/459 instructions; inline-helper boundaries, ring state and register allocation. +- KPADInit: 96.51351%; 3 logged attempts; 185/185 instructions; array-base registers and initialization-store scheduling. + +No remaining data gaps in the owned units; no data renames or extent edits. Final instruction counts are measured independently by the full gate. No claim that a register-only plateau is impossible to solve. + +Final full gate over all four units: +``` +full build: ok +main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d +[src/scene/address/iplAddressEdit] pool: IDENTICAL +[src/scene/address/iplAddressEdit] objdiff: code 21932/27112 data 2560/2560 functions 88/94 fuzzy 99.4923 linked code 0 +[src/scene/address/iplAddressEdit] instruction-exact functions: 88/94 +[src/scene/address/iplAddressEdit] section .bss size 320 match 100.0 +[src/scene/address/iplAddressEdit] section .data size 2152 match 100.0 +[src/scene/address/iplAddressEdit] section .rodata size 40 match 100.0 +[src/scene/address/iplAddressEdit] section .sdata size 24 match 100.0 +[src/scene/address/iplAddressEdit] section .sdata2 size 24 match 100.0 +[src/scene/address/iplAddressEdit] section .text size 27112 match 99.492325 +[src/scene/address/iplAddressEdit] below 100: create__Q33ipl5scene11AddressEditFv 97.44634 +[src/scene/address/iplAddressEdit] below 100: start_point_event__Q33ipl5scene11AddressEditFPCcPQ33ipl10controller9Interface 99.34066 +[src/scene/address/iplAddressEdit] below 100: start_left_event__Q33ipl5scene11AddressEditFPCc 98.958336 +[src/scene/address/iplAddressEdit] below 100: get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571 +[src/scene/address/iplAddressEdit] below 100: update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105 +[src/scene/address/iplAddressEdit] below 100: set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664 +[src/scene/address/iplAddressEdit] baseline: code 21556/27112 data 2560 functions 87 fuzzy 99.4886 +[src/scene/sdChannelSelect/iplSDChannelSelect] pool: IDENTICAL +[src/scene/sdChannelSelect/iplSDChannelSelect] objdiff: code 27108/33828 data 2960/2960 functions 117/129 fuzzy 99.5051 linked code 0 +[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 117/129 +[src/scene/sdChannelSelect/iplSDChannelSelect] section .data size 2736 match 100.0 +[src/scene/sdChannelSelect/iplSDChannelSelect] section .rodata size 64 match 100.0 +[src/scene/sdChannelSelect/iplSDChannelSelect] section .sdata size 80 match 100.0 +[src/scene/sdChannelSelect/iplSDChannelSelect] section .sdata2 size 80 match 100.0 +[src/scene/sdChannelSelect/iplSDChannelSelect] section .text size 33828 match 99.50514 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: create__Q33ipl5scene15SDChannelSelectFv 97.73972 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: calcCommon__Q33ipl5scene15SDChannelSelectFv 99.07407 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: initializeNormalPage__Q33ipl5scene15SDChannelSelectFv 98.93617 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: selectChannel__Q33ipl5scene15SDChannelSelectFii 98.305084 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721 +[src/scene/sdChannelSelect/iplSDChannelSelect] below 100: onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface 98.541664 +[src/scene/sdChannelSelect/iplSDChannelSelect] baseline: code 27108/33828 data 2960 functions 117 fuzzy 99.5051 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] pool: IDENTICAL +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] objdiff: code 712/1804 data None/None functions 4/6 fuzzy 90.5743 linked code 0 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] instruction-exact functions: 4/6 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] section .text size 1804 match 90.57428 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] below 100: TMCJPEGDEC_IdctBlock4x4 85.625 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] below 100: TMCJPEGDEC_IdctBlock4x4_Col 83.240875 +[libs/RVLMiddleware/TMC_JPEG/src/reschange/idct_resolution_change_var] baseline: code 712/1804 data None functions 4 fuzzy 90.5743 +[libs/RVL_SDK/src/kpad/KPAD] pool: IDENTICAL +[libs/RVL_SDK/src/kpad/KPAD] objdiff: code 5916/13056 data 8032/8032 functions 19/29 fuzzy 98.5983 linked code 0 +[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 19/29 +[libs/RVL_SDK/src/kpad/KPAD] section .bss size 7680 match 100.0 +[libs/RVL_SDK/src/kpad/KPAD] section .data size 88 match 100.0 +[libs/RVL_SDK/src/kpad/KPAD] section .sbss size 32 match 100.0 +[libs/RVL_SDK/src/kpad/KPAD] section .sdata size 112 match 100.0 +[libs/RVL_SDK/src/kpad/KPAD] section .sdata2 size 120 match 100.0 +[libs/RVL_SDK/src/kpad/KPAD] section .text size 13056 match 98.59834 +[libs/RVL_SDK/src/kpad/KPAD] below 100: reset_kpad 99.48718 +[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADGetProjectionPos 96.57895 +[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADSetSensorHeight 99.23077 +[libs/RVL_SDK/src/kpad/KPAD] below 100: calc_acc_horizon 97.27723 +[libs/RVL_SDK/src/kpad/KPAD] below 100: read_kpad_acc 98.15 +[libs/RVL_SDK/src/kpad/KPAD] below 100: select_1obj_first 98.348625 +[libs/RVL_SDK/src/kpad/KPAD] below 100: select_1obj_continue 98.49462 +[libs/RVL_SDK/src/kpad/KPAD] below 100: calc_dpd_variable 94.82 +[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADRead 97.52723 +[libs/RVL_SDK/src/kpad/KPAD] below 100: KPADInit 96.51351 +[libs/RVL_SDK/src/kpad/KPAD] baseline: code 5916/13056 data 8032 functions 19 fuzzy 98.5983 +regressions vs baseline: 0 +global matched_code_percent: 89.13947 -> 89.15202 +global fuzzy_match_percent: 99.52161 -> 99.52165 +global complete_code_percent: 66.03058 -> 66.03058 +global matched_data_percent: 99.36508 -> 99.36508 +forbidden patterns added (net, per file): 0 +readability warnings (net, per file; must be 0 in the final result): 0 +GATE PASS +``` + +Before -> after instruction-exact: AddressEdit 87 -> 88; SDChannelSelect 117 -> 117; JPEG 4 -> 4; KPAD 19 -> 19. +Before -> after matched code bytes: AddressEdit 21556 -> 21932; SDChannelSelect 27108 -> 27108; JPEG 712 -> 712; KPAD 5916 -> 5916. Data remains 2560/2560, 2960/2960, none, 8032/8032 respectively. +Source commit: 7e34636b.