Skip to content

GameCube Decomp Harness Session 02a80f9b - #3223

Draft
fjooord wants to merge 855 commits into
doldecomp:masterfrom
fjooord:orchestrator/cycle/02a80f9b-1045-481b-88cf-d32b7a673afe
Draft

GameCube Decomp Harness Session 02a80f9b#3223
fjooord wants to merge 855 commits into
doldecomp:masterfrom
fjooord:orchestrator/cycle/02a80f9b-1045-481b-88cf-d32b7a673afe

Conversation

@fjooord

@fjooord fjooord commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Work in Progress AI Decomp Session

Please use this to improve upon other matches and whatnot for your work.

Note for users and AI agents: Please mention this PR when pulling from it so there is a canonical record and maintainers know that any work came from this PR and are careful so slop code does not get merged in.

@decomp-dev

decomp-dev Bot commented Aug 27, 2026

Copy link
Copy Markdown

Report for GALE01 (db7e341 - 7caf1c4)

📈 Matched code: 93.92% (+1.19%, +46252 bytes)
📈 Linked code: 76.63% (+0.10%, +3864 bytes)
📈 Matched data: 96.77% (+0.03%, +404 bytes)
📈 Linked data: 80.90% (+0.03%, +376 bytes)

✅ 36 new matches
Unit Item Bytes Before After
main/melee/if/ifstock ifStock_802F89F8 +121 87.39% 100.00%
main/melee/gr/grbigblue grBigBlue_801ECB50 +113 96.08% 100.00%
main/sysdolphin/baselib/hsd_3B5C fn_803B61B4 +54 96.75% 100.00%
main/melee/gm/gmmain_lib gmMainLib_8015EA80 +36 93.63% 100.00%
main/melee/gm/gm_16F1 fn_8016FAD4 +19 98.55% 100.00%
main/melee/gm/gmregtyfall gm_Scene_ToyFall_OnEnter +19 99.24% 100.00%
main/melee/gm/gmresult fn_80175DC8 +14 99.59% 100.00%
main/sysdolphin/baselib/hsd_3B34 fn_803B376C +12 99.15% 100.00%
main/melee/mn/mninfo mnInfo_80251AFC +9 98.65% 100.00%
main/melee/if/ifstatus ifStatus_802F5EC0 +9 98.87% 100.00%
main/melee/gm/gmregclear fn_8017FF1C +8 99.38% 100.00%
main/melee/gm/gmtou_1 fn_8019A158 +8 99.47% 100.00%
main/melee/gr/grbigblue grBigBlue_801E93D8 +8 99.75% 100.00%
main/melee/mn/mnnamenew mnNameNew_KeySetup +8 99.53% 100.00%
main/melee/gr/grkongo grKongo_801D7134 +7 99.58% 100.00%
main/melee/gm/gm_1832 .rodata +6 90.62% 100.00%
main/melee/gr/grzebes grZebes_801D99E0 +6 99.57% 100.00%
main/melee/mn/mnruleplus mn_802327A4 +6 99.60% 100.00%
main/melee/gr/grmaterial fn_801C8EF8 +5 99.56% 100.00%
main/melee/mn/mnmainrule mn_80230274 +5 99.67% 100.00%
main/sysdolphin/baselib/hsd_3B34 hsd_803B51C8 +5 99.84% 100.00%
main/melee/if/ifstatus ifStatus_802F61FC +4 99.51% 100.00%
main/melee/gm/gmregclear gm_8017CE34 +2 99.93% 100.00%
main/melee/gm/gmstaffroll fn_801AAB74 +2 99.89% 100.00%
main/melee/gr/granime grAnime_801C6A54 +2 99.68% 100.00%
main/melee/mn/mnstagesw fn_80236998 +2 99.78% 100.00%
main/melee/if/ifstock ifStock_802FAEC4 +2 99.89% 100.00%
main/sysdolphin/baselib/generator extab +2 99.11% 100.00%
main/melee/ft/chara/ftCommon/ftCo_0A01 ftCo_800A7AAC +1 99.96% 100.00%
main/melee/gm/gm_1601 fn_80169000 +1 99.86% 100.00%

...and 6 more new matches

📈 78 improvements in unmatched items
Unit Item Bytes Before After
main/melee/gr/grkongo grKongo_801D6AFC +284 81.36% 99.21%
main/melee/mn/mnsnap .data +103 89.70% 99.71%
main/melee/mn/mnnamenew mnNameNew_MainInput +71 92.65% 95.71%
main/melee/mn/mnsnap mnSnap_80257F24 +61 94.00% 96.34%
main/sysdolphin/baselib/hsd_3A94 fn_803B0120 +60 97.82% 99.55%
main/melee/gm/gmclassic gm_Mode_Classic_OnLoad +56 95.81% 99.96%
main/sysdolphin/baselib/generator hsd_8039DAD4 +56 98.38% 99.51%
main/melee/gm/gm_19EF fn_8019F9C4 +52 98.65% 99.90%
main/sysdolphin/baselib/generator hsd_8039F05C +44 97.32% 99.98%
main/sysdolphin/baselib/hsd_3B5C fn_803B6820 +44 88.25% 92.77%
main/sysdolphin/baselib/particle hsd_8039930C +42 94.87% 95.14%
main/melee/ft/ftcpuattack ftCo_800B52AC +36 98.25% 99.98%
main/melee/gm/gmtoulib fn_8018AA74 +34 97.69% 99.83%
main/melee/mn/mnsnap fn_802545C4 +33 99.60% 99.83%
main/melee/gm/gmstaffroll fn_801AB200 +31 98.77% 99.36%
main/melee/mn/mnvibration mnVibration_HandleInput +29 96.55% 97.52%
main/melee/if/ifstock ifStock_802F98E8 +28 97.09% 98.78%
main/melee/gr/grbigblue grBigBlue_801E6C60 +21 98.93% 99.25%
main/melee/gr/grzebes grZebes_801D881C +20 98.71% 99.60%
main/melee/lb/lbsnap lbSnap_8001DA5C +19 63.34% 67.65%
main/melee/mn/mnruleplus mn_80233218 +15 97.31% 98.05%
main/melee/mn/mndiagram3 mnDiagram3_PopulateRankings +15 96.89% 97.86%
main/melee/if/ifstatus ifStatus_802F4EDC +15 99.47% 99.93%
main/sysdolphin/baselib/hsd_3B5C hsd_803B6BE4 +15 98.96% 99.90%
main/melee/lb/lbcollision lbColl_80006E58 +12 97.29% 97.77%
main/melee/ft/chara/ftCommon/ftCo_ItemThrow ftCo_80095EFC +12 97.76% 99.85%
main/melee/gm/gmregclear fn_80180630 +12 97.87% 98.89%
main/melee/gm/gmtoulib fn_8018B090 +12 99.50% 99.69%
main/melee/if/ifstock ifStock_802F8298 +12 95.87% 96.51%
main/melee/mn/mndiagram3 mnDiagram3_HandleInput +10 99.39% 99.73%

...and 48 more improvements in unmatched items

@fjooord fjooord changed the title GCD decomp session 02a80f9b GCD Session Aug 27, 2026
@fjooord
fjooord force-pushed the orchestrator/cycle/02a80f9b-1045-481b-88cf-d32b7a673afe branch from 3263adb to 63439be Compare August 27, 2026 17:43
@ribbanya ribbanya added the ai-assisted Utilizes a LLM to do the heavy lifting label Aug 27, 2026
@fjooord fjooord changed the title GCD Session GCD decomp session 02a80f9b Aug 28, 2026
fjooord added 24 commits August 28, 2026 15:42
fjooord added 15 commits August 30, 2026 09:07
Epoch-Integration: ee50e6ee-4a0f-45a9-ab02-a07a5fbfca5e
…UST_MATCH (clang-tidy self-assign; upstream tactic, MWCC code unchanged)
…ator/cycle/02a80f9b-1045-481b-88cf-d32b7a673afe
…): restore worker-improved function bodies clobbered by the -X theirs merge (110 keep-ours functions), take upstream's matched/better functions, apply doldecomp#3260/doldecomp#3262 symbol renames tree-wide, guard matching self-assign/volatile locals with MUST_MATCH, drop unused carried helpers
…): keep our part-1 bodies where they beat doldecomp#3264's improvements (ifStock_802FAEC4, ifStatus_802F5EC0, _tyDisplay_80318CB4/80319994), adapt VsModeData.data→.start, take upstream's gm_801B5324 and grBigBlue_801EC6C0, clang-format pass

Host-verified on the merged tree (origin/master db7e341): ninja -k 0 clean, main.dol OK, report 93.91659 (pre-merge 93.90165, upstream 92.72515), clang-tidy clean on all 201 changed files.
…' of https://github.com/fjooord/melee into orchestrator/cycle/02a80f9b-1045-481b-88cf-d32b7a673afe
@fjooord fjooord changed the title GCD decomp session 02a80f9b GameCube Decomp Harness Session 02a80f9b Aug 30, 2026
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
The three `int[1]` counter arrays were standing in for loop bodies that the
original had in helpers: hoisting the two slot-clearing loops into one
`ifStock_ClearGObjSlots` and the stock-GObj creation plus the multi-man block
into `ifStock_CreateStockGObjs` gives the target's 0x30 frame and register
assignment. `ifStock_802FA5BC` still has to stay out of line, so the
file-scope `dont_inline` pragma becomes the `_noinline` wrapper idiom already
used elsewhere in the tree.

`ifStock_804A1ACC.x108` holds the proc GObj, so it is typed `HSD_GObj*`
rather than `int`; `ifStock_804A1774.x108` is a real int and is unchanged.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
Both the joint load and the digit-JObj lookup come from inline helpers in the
original: each site bills its own stack slot, which accounts for the 0x18 ->
0x10 pad and moves the whole r26-r30 band onto the target's assignment.
`tobj` is declared ahead of the loop counter to finish the ordering.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
97.01% -> 99.95%. The command-list entry is re-read through the global at
every field instead of being pooled into a local `HSD_PSCmdList***`, which is
what the target's reload-per-store shape asks for; `psTexGroupArray` is
addressed by name rather than by subtracting 0x30C from that pointer; and the
rect case writes the scale matrix's diagonal (xx/yy/zz) rather than
xx/zx/zy — the target's store offsets confirm the diagonal.

`ptclref_804D0E5C` is typed `HSD_PSCmdList**` to match how both this function
and the target use it, so the 32 casts that spelling would otherwise need go
away. particle.c's four index-remap sites keep their old reading with a cast
and are byte-identical.

The only rows left are the bound check's relocation: the target reads the
array symbols.txt calls `psCmdListArray`, not `psNumCmdList`.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
99.47% -> 99.93%. The colour update, the digit animation setup, and the
stored-translation read come from inline helpers; splitting them out gives the
target's call and frame shape. The two branch-local `GXColor`s copied into the
shared one are load-bearing — writing the shared local directly costs 16
points.

Two rows remain: one callee-saved web (r28 vs r24) and the staged colour's
stack slot (0x14 vs 0x40).

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
97.23% -> 97.34%. The vertex buffer holds 152 entries, not 151 plus a
PAD_STACK, which puts the staging slots at the target's displacements.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
95.39% -> 98.78%. The per-player user data is reached by walking a
`struct IfStockData*` cursor the way ifStock_802F7EFC already does in this
file, and the state struct is re-mentioned in full at each use rather than
staged in `r26`. The embedded `+=` in the first store is load-bearing:
splitting it into a typed pointer plus a store costs 3 points, and a typed
`ifStock_804A1378_x204*` costs 2.9.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
98.38% -> 99.51%. The velocity magnitude is `sqrtf`, not a hand-expanded
Newton-Raphson; the JObj matrix is `gen->jobj->mtx` rather than a raw +0x44
byte offset; and the matrix-column normalise block stages through the same
local as the velocity output, which is what the target's frame shows.

Remaining rows are stack-slot ordering for three staging floats.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
MarkMcCaskey added a commit to MarkMcCaskey/melee that referenced this pull request Aug 30, 2026
97.29% -> 97.77%, mostly by reordering the segment-dot and length-squared
accumulations to the target's operand order and by moving three float decls.

Also drops a hack: the 1.0 used across the parameter-clamp branches was being
read out of the global `lbColl_804D7A08` to keep it in a callee-saved
register. A plain `1.0F` gives the same code, so the global read and the
comment explaining it are gone.

Source taken from doldecomp#3223.

Co-authored-by: Ford Lascari <ford.lascari@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Utilizes a LLM to do the heavy lifting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants