Decompile the effect_025 overlay - #82
Merged
Merged
Conversation
Cura's 137 functions are C, so the overlay owns its source outright. It runs the same engine as effect_001, so the types both copies need move up into effect.h, and the GTE macros its emitters use join the rest in inline_c.h. What is left is Cura's own: eight prim emitters, two UV-scroll walkers, the pose walker and the scripts that drive them. D_801EEA0C, the draw-mode word those emitters write with, gets a declaration beside the other draw-state words. MulMatrix0 and SetDrawMode were being called with no prototype in scope. Both are declared where the rest of their SDK header lives. The overlay's integer divisions carry the range checks the original build emitted with $at free, so it needs maspsx --expand-div. ASPSX chose those checks per assembler invocation, so whether a `div` carries them belongs to the object rather than to a filename. Counted over the shipped code, every effect overlay is uniform -- 198 expanding and 70 not -- so those are keyed by binary; every other overlay is bare, and SLUS_008.92 is the one binary whose own objects disagree, so its sources take a per-source override instead. A list of source paths cannot express that: one engine source is linked into overlays from both sets, ten functions already ship in both spellings, and a split source would inherit nothing. The rule runs in both toolchain branches, so a PsyQ 4.3 source in the mixed binary cannot lose the flag silently. The battle screen tint gets a type on the way. D_800EF738 is four 0x2C-byte entries the battle loop steps every frame; bc_object10 and bc_object14 walked them with hand-written offsets and now go through a BattleTint struct in battle.h. D_800EEC5C was declared three times in two types, and the two array spellings reached it through a cast at four sites -- one declaration in battle.h drops the casts, and the three bits the C sources test get placeholder names.
Report for SLUS_008.92 (61c4ec3 - a484402)Total code: 1212520 bytes (+33540 bytes) ✅ 140 new matches
...and 110 more new matches |
Signed-off-by: rengstrom <engstrom.robin@gmail.com>
The objdiff generator was extended on both sides. main gave it --expected and the target_path() fallback, so the report keeps working on a tree with no expected/; this branch gave it effect_categories(), so the report covers every effect overlay the build produced rather than a hand-kept list. They touch the same two places without contradicting each other, so both stay: target_path() decides what a unit points at, effect_categories() decides which binaries the report covers.
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.
Decompile all functions for the Cura effect