Decomp effect overlays 052, 039 & 036 - #86
Merged
Merged
Conversation
X-Potion runs the engine Curaga already carries, so 99 of its 118 functions are the library: nineteen units, listed in its own link order, and a symbol file that maps their names onto its addresses. Deriving that map is the whole of the work -- align unit by unit and position by position, because two functions of one unit can hash alike when they differ only in which sibling they call, and pair the relocation streams off against each other. 244 addresses paired with nothing left in conflict. What is X-Potion's own is the entry, a root dispatcher and seventeen script functions, and all but one of those are byte-identical to Curaga's or Cure's, so they came across with the addresses rewritten. Only the bank carve was written here. Its rings are Curaga's sizes, so its parameter header is the same two counts; what differs is the pool: X-Potion has no trailing-spark pool, which is why its entry sets up three where Curaga sets up four and its dispatcher drains three. Three things the overlay needed from its config. splat does not carve out a lone `jr ra` no-op, and three of them sit between script functions, so they are named in the symbol file or the binary comes out short and every later address shifts. The asset blob was declared from 0x9BF0, which swallowed the script dispatch tables; it starts at 0x9C68. And the jump tables carry the tail pad ASFLAGS suppress, so the pad between particlestep's and list's is declared.
The port left the entry taking its prototype from effect_028_entry.h, the overlay it was copied from. Both overlays declare the same signature under the same name, so it compiled and the binary matched -- nothing but reading the include would have shown it. X-Potion's entry now owns its declaration, the way the other three overlays' do.
Drain runs Curaga's engine at Curaga's own offsets: all twenty library units land where they do there, and 276 addresses pair off the aligned relocation streams with nothing in conflict. Its script block lines up with Curaga's function for function, so twenty-eight of its thirty came across by position with the addresses rewritten. One function is Drain's own. Its take-model dispatcher spawns a screen tint at frame 4 as well as frame 20, each from its own step table, where Curaga spawns one. The bank carve looked new too but is not: it differs only in the addresses and the emitter bank's size, which its parameter header supplies -- Drain runs thirty-nine emitters where Curaga runs eighty-nine. That difference found a bug in the library. Both pool allocators bounded their search with a literal, `n < 0x5A`, which is Curaga's ring size rather than the ring's, so Drain built one byte wrong at the emitter's wrap test. The bound is the ring's own size now, and the doc says why it is one more than the ring holds: the search starts where the last one left off, so the slot it began on is the last it examines.
…rces effect_050, effect_051 and effect_056 are byte-identical to effect_001, effect_025 and effect_039, so each yaml entry names the twin's own source files at the twin's offsets. They need only a symbol file of their own, and effect_056 a parameter header. No new C. effect_036 (Confuse) links the same nineteen library units as effect_039 in the same order, four bytes along. 99 of its 121 functions come from src/effect/lib, and 16 of the remaining 21 are bodies already written for effect_001, effect_025 and effect_028 -- five of them the same handler that consumes an opcode and does nothing else. lib/bankclear is 84 bytes here against effect_039's 88 because Confuse's particle bank fits a 16-bit immediate where Drain's needs lui and ori. Both ring sizes fall out of those two immediates: 0x1D emitters and 0x31 particles. func_800C2BD0 had no declaration and one parameter, but its only caller passes two, and its sibling func_800C2B88 has the same shape with two. An unused parameter emits no code, so the definition takes the second one and types the first as the slot it is handed; the pointer the flags hang off is named on BattleEffectSlot rather than reached at 0x74.
Report for SLUS_008.92 (e3acf06 - 1c686e0)Total code: 1466412 bytes (+213192 bytes) ✅ 944 new matches
...and 914 more new matches |
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.