Skip to content

Bigboss - #380

Open
patr1k wants to merge 3 commits into
zeldaret:mainfrom
patr1k:bigboss
Open

patr1k wants to merge 3 commits into
zeldaret:mainfrom
patr1k:bigboss

Conversation

@patr1k

@patr1k patr1k commented Dec 1, 2026

Copy link
Copy Markdown

d_a_b_bigboss / d_a_b_bigbossbase: partial decompilation

This is a first big pass at the Ghirahim-era Imprisoned boss: the dAcBBigbossbase_c base REL and the dAcBBigBoss_c actor. Both units stay NonMatching.

Unit Fuzzy match Functions matched
d_a_b_bigboss 59.83% 144 / 248
d_a_b_bigbossbase 25.92% 115 / 205

d_a_b_bigbossbase

  • Header layout for the shared base:
    • the model wrapper (dBigBossMdlBase_c)
    • the toes (dBigBossToe_c)
    • joint and hair callbacks
    • path, hit parts and counters
  • Animation core: setAnm, playAnm, bindAnmChr, colour and texture anims
  • Model create helpers, update and updateStoneMdl
  • Helpers for foot tilt, ground slope, rumble and sound
  • Collision callbacks and small per-state hooks

d_a_b_bigboss

  • Model overrides: foot tilt, stomp rumble and effects
  • createHeap, actorCreate, actorExecute and draw
  • Collider source tables, the hit-point table, stomp rumble pickers and foot/leg collision helpers
  • All 104 state functions. The six large execute functions:
State Match
AppearDemo (intro cutscene, title caption, Impa talk) 99.1%
Stun 95.9%
Evacuation (stone breaks away, flies up, lands at the next spot) 94.9%
StunDamage 93.8%
StunRecover 92.4%
StunFrontFall (forward topple, camera slides along walls) 91.6%

Changes outside these units

  • dAcNpc_c::acNpc_vt_0x124 now takes (s32, s32), since the boss calls it with two arguments. Its weak default is renamed in the DOL, d_a_npc_rival_lod and d_a_npc_saltalk symbol files. All three still match.
  • New accessors on dLytMeter_c, dStageMgr_c, dSndBgmMgr_c and dPath_c.
  • Named fields in dAcOgroundCover_c (0x681–0x685).

Notes for review

  • Function-local statics. Several zero-initialised words in .data are function-local statics. They are named @LOCAL@<fn>@<name>@N in symbols.txt, with the surrounding data blobs split around them. The bigboss unit needs #pragma explicit_zero_data to place them.
  • Inlining. actorExecute is compiled under #pragma dont_inline.
  • Placeholder bodies. A few functions in d_a_b_bigbossbase.cpp are empty stubs that keep the vtable and function order (marked with a TODO). They are not decompiled yet.
  • Remaining mismatches. Most are register allocation and instruction scheduling. Known mismatches have TODO comments explaining them.
  • Left for follow-ups. The large unnamed helpers: fn_121_FD10, fn_121_9A90, vt_0xBC, fn_120_B820, dBigBossToe_c::update and others.

The full build passes build/SOUE01/ok, and no other unit regressed in the objdiff report.

Patrick DeLoughry added 3 commits December 1, 2026 09:02
…e functions

d_a_b_bigbossbase:
- Header layout for the shared base: model wrapper (dBigBossMdlBase_c),
  toes (dBigBossToe_c), joint/hair callbacks, path, hit parts, counters
- Animation core (setAnm/playAnm/bindAnmChr, colour/texture anims),
  model create helpers, update/updateStoneMdl
- Foot tilt, ground slope, rumble and sound helpers, collision
  callbacks, small per-state hooks

d_a_b_bigboss:
- Model overrides vt_0x48/4C/5C/60 (foot tilt, stomp rumble and effects)
- createHeap, actorCreate, actorExecute, draw
- Collider source tables, hit-point table, stomp rumble pickers,
  foot/leg collision helpers
- 98 of 104 state functions; the execute functions of AppearDemo,
  Stun, StunRecover, StunDamage, StunFrontFall and Evacuation remain
- Zero-initialised statics need #pragma explicit_zero_data;
  actorExecute is compiled with #pragma dont_inline

Shared header changes:
- dAcNpc_c vt 0x120 takes (s32, s32); symbols renamed in the DOL,
  d_a_npc_rival_lod and d_a_npc_saltalk
- New accessors on dLytMeter_c, dStageMgr_c
  and dSndBgmMgr_c
…all execute

- executeState_Stun (95.9%): collapse camera and ground probe that
  picks the pitch the boss lies at
- executeState_StunRecover (92.4%) and executeState_StunDamage (93.8%):
  camera pull-back from the stone while the boss stands up, then the
  choice between ImpaAdvice, FrontFall and Walk
- executeState_StunFrontFall (91.6%): forward topple, with a camera
  that slides along walls it would clip through
- Event-camera angle fields are mAng (mCamEyeAngle, mWallCamAngle);
  more base/actor fields named
- Five more zero words in .data are function-local statics; named
  @Local@ in symbols.txt with the data blobs split around them
AppearDemo (99.06%) is the intro cutscene: the boss rises out of the
ground with screen shake and a light blend, roars while the BOSS_03
caption shows, then walks off or talks to Impa. A skip handler jumps
to the end state.

Evacuation (94.85%) carries the stone off: the boss roars, the stone
breaks loose and spins, then flies up and lands at the next spot.
It ends in SwordGameEnd or StoneWait depending on story flags. Its
opening camera code is the same block as StunDamage's.

d_a_b_bigboss goes from 48.16% to 59.83% fuzzy.

Supporting changes:
- dAcNpc_c::acNpc_vt_0x124 takes (s32, s32); its symbol is renamed
  in the main, d_a_npc_rival_lod and d_a_npc_saltalk symbol files
- setLightBlend's second parameter is s16; give fn_120_1490,
  fn_120_7B00, fn_120_B570 and fn_120_B6D0 signatures and rename
  their symbols in the bigbossbase REL
- Name new bigboss/bigbossbase fields and ground cover fields
  0x681-0x685
- Name the zero-initialised local statics in AppearDemo and
  Evacuation in the bigboss symbol file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant