Match, split, and link gm_1832 - #3303
Merged
Merged
Conversation
Delete a duplicate unused "ScItrAllstar_scene_data" array, move the "IrRdMap" definition ahead of the first " " literal, and order the .sbss statics by their DOL addresses. .data and .sdata now match byte-for-byte and every data symbol lands at its target offset.
Report for GALE01 (8107feb - 76227fd)📈 Matched code: 95.43% (+0.04%, +1368 bytes) ✅ 33 new matches
...and 3 more new matches 🥀 16 broken matches
📈 1 improvement in an unmatched item
📉 2 regressions in unmatched items
|
The 115-float blob at 0x803D9248 is exactly one ClassicCharData (scale[28], offset[28], samus_extra), so define it with that type instead of casting an f32 array. Byte-identical .data, and fn_801851C0 is unchanged.
gm_1884's fn_801891F4 is the only referrer of that .sdata2 entry, and an MWCC literal pool is per-translation-unit, so it cannot belong to gm_1832. The split boundary put it in gm_1832, which a MUST_MATCH seed then reproduced; flipping gm_1832 to Matching therefore failed to link with "undefined: 'lbl_804DA5F8'". Move the boundary and drop the seed. The DOL stays byte-identical.
The .sdata pool holds two copies each of "jobj.h", "jobj" and "IrAls", and .data holds two copies of "ScItrAllstar_scene_data" — with -str reuse a single TU cannot emit any of those twice. The .sbss also has 4-byte holes at 0x804D660C and 0x804D6624 that are exactly the 8-byte inter-unit alignment padding, and each intro scene owns a disjoint .bss object. Split at the scene boundaries: gm_1832.c keeps Classic/Easy, gm_186E.c takes All-Star, gm_1879.c takes Normal. This drops the duplicate-literal arrays and most of the .sdata2 ordering seeds that only existed to fake a merged pool, and every section is byte-exact against its new split range. The DOL is unchanged.
All eight All-Star intro functions and every data section match, so flip the unit to Matching and record the compiler's literal-pool names from `ninja apply`. The DOL stays byte-identical.
The split unit needs 24 bytes of padding, not 16, to reach retail's 0x48 frame.
The All-Star unit inherited the merged file's full include list; drop the twelve headers it does not need (object stays byte-identical). Reading the late stage index through a pooled `&data->x36` also recovers retail's addressing there, leaving gm_Scene_IntroNormal_OnEnter differing only in register assignment.
The 0x1CC blob at 0x803D9248 is three adjacent statics — a 28-entry scale table, a 28-entry offset table and Samus's extra offset — not one struct behind a pointer. Spelled that way MWCC roots every access at the first array with the field offsets as displacements, which is retail's addressing, and the address web then ranks below the .bss root instead of above it. Flip the unit to Matching; the DOL stays byte-identical and `ninja apply` records the compiler's literal-pool names.
The camera setup was split into a helper inline that retail does not have; expanding it and declaring gobj before cobj takes gm_Scene_IntroNormal_OnEnter from 98.28% to 99.73%, leaving twelve rows that differ only in register assignment.
The 0xD8 blob at 0x803D9750 was declared as one char* array, which forced `&table[48]`, `table[stage_index + 12]` and `((u64*) &table[24])[stage_index]` at the use sites and spelled "ScItrNormal_scene_data" out as six (char*) word casts. It is four objects: twelve archive names, twelve bgm ids, twelve u64 audio masks and the scene-data name. Byte-identical .data and identical code.
Reading it into a block-local for the archive/BGM group instead of reusing the outer local matches retail's register assignment there; five rows left.
`x0` was declared `DynamicModelDesc***` and then cast to `SceneDesc*` for its camera and light lists; it is a SceneDesc, and `models` sits at offset 0 so `(*x0)[i]` and `x0->models[i]` compile identically. `x4` is likewise one SceneCameraDesc, whose `desc` and `anims` the old `*x4` / `*(HSD_CameraAnim**) x4[1]` spellings were reaching by offset. Every object is unchanged.
The first intro model's anim setup is expanded at its call site rather than routed through fn_80187AB4_LoadAnim, so its locals live in the caller's block scope instead of the inline's temp band.
clang-tidy's misc-include-cleaner is enabled repository-wide and the CI hook runs with --fix, so an unused include fails the Ninja (GALE01, clang) job.
MarkMcCaskey
marked this pull request as ready for review
September 3, 2026 23:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.