# The ov071 data SCUTTLEBUG names -- the spider-legged Scuttlebug, daSpd_c
# (actor 255), and the state machine its two dispatchers drive.
#
# ov071 is an ACTOR overlay (base 0x0211f000) carrying four classes -- Scuttlebug
# (255), MrI/BigMrI (198/199, the eyeball), MrI_Projectile (262?) and Coffin
# (218) -- of which THIS gate hosts only Scuttlebug. Its id and its SpawnInfo's
# own +4 halfword were read from the arm9 ACTOR_SPAWN_TABLE (0x02090864): entry
# 255 (0x02090864 + 255*4 = 0x02090c60) relocates to g_profile_SPIDER at
# 0x02122c08, and that record's +4 halfword reads 0x00ff = 255. Its +0 word
# relocates to daSpd_c_classInit (0x02120618).
#
# This is the per-symbol mount (the gate-83/gate-50 ov095/ov080 shape):
# SCUTTLEBUG reaches its SpawnInfo, the two SharedFilePtr statics its
# InitResources loads and CleanupResources releases (data_ov071_02122f80 model,
# data_ov071_02122f88 anim, plus their aux blocks f90/f9c the sinit wires), the
# eighteen state-record SOURCE PMFs the sinit copies, and the bss state array
# that copy lands in, all BY NAME. --pack keeps the bss run (f80..fa8) at the
# ROM's own spacing so the SharedFilePtr handles and the state array stay one
# contiguous object.
#
# THE VTABLE IS LEFT OUT, the ov095/ov080 rule: _ZTV10Scuttlebug (= _ZTV7daSpd_c,
# 0x02122c2c) carries the vtable signature (its +4 word relocates to
# Actor::BeforeInitResources, arm9 0x02011268) and is a HOST array the registry
# fills (hal/actor_classes_scuttlebug.cpp).
#
# THE STATE TABLE. Scuttlebug_SetState stores &data_ov071_02122fa8[idx] (16-byte
# stride, ADD r1,r2,r1,LSL#4) into this+0x380; two dispatchers read that stored
# pointer as an mwcc {fn, delta} PMF -- func_ov071_021202b4 reads record+0 (the
# state's ENTER half), func_ov071_02120278 reads record+8 (the state's MAIN
# half, called by Behavior every frame). The bss array data_ov071_02122fa8 (0x90
# = 9 records of 16 bytes, an {enter, main} pair each) is FILLED by
# __sinit_ov071_021226ac, which copies the eighteen 8-byte SOURCE PMFs at
# data_ov071_02122b60..02122be8 into it. Those SOURCE words hold DS CODE
# ADDRESSES, so the seat (Scuttlebug_StateDispatch.cpp) rewrites each SOURCE PMF
# with its host body BEFORE the sinit copies it -- the MontyMole/Crate treatment,
# ROM-checked. The source PMFs and the bss destination are both in this mount.
#
# data_ov071_02122f80 / _02122f88 are the model and anim SharedFilePtr handles;
# _02122f90 / _02122f9c are the aux blocks the sinit passes to their
# constructors (0x020731dc). All bss; --pack keeps the delta-sized run contiguous.
#
# g_profile_SPIDER is pinned to the record's real 0x1c so the +4 id halfword
# the registry cross-checks reads out of the right bytes (255); the next-symbol
# delta (0x24, into the vtable) would over-size it into a host/ROM gap.
g_profile_SPIDER:0x1c
# the eighteen SOURCE state PMFs the sinit copies, address order (each 8 bytes,
# {fn, 0}); the seat rewrites their fn words before the copy
data_ov071_02122b60 data_ov071_02122b68 data_ov071_02122b70 data_ov071_02122b78
data_ov071_02122b80 data_ov071_02122b88 data_ov071_02122b90 data_ov071_02122b98
data_ov071_02122ba0 data_ov071_02122ba8 data_ov071_02122bb0 data_ov071_02122bb8
data_ov071_02122bc0 data_ov071_02122bc8 data_ov071_02122bd0 data_ov071_02122bd8
data_ov071_02122be0 data_ov071_02122be8
# the model/anim SharedFilePtr handles and their aux blocks (bss), and the live
# state array the sinit fills and the seat rewrites in place
data_ov071_02122f80 data_ov071_02122f88 data_ov071_02122f90 data_ov071_02122f9c
data_ov071_02122fa8:0x90
# Two bss words __sinit_ov071_021228c8 writes that the first cut of this mount
# missed (the link named them): the sinit's own registration pair.
data_ov071_02123050 data_ov071_02123058
# The rest of the closure's data, named by the link after the first cut: the
# post-vtable record run (ca8..cd0), the aux source blocks (e74..e8c, ecc),
# and the bss registration/file-pointer words the four sinits write
# (02123038..021230ec). data_ov071_021230ec is the overlay's LAST bss symbol,
# pinned to its real span (bss ends 0x02123100) so func_020731dc's node write
# has room -- the data_ov002_02111190 lesson.
data_ov071_02122ca8 data_ov071_02122cb0 data_ov071_02122cb8 data_ov071_02122cc0
data_ov071_02122cc8 data_ov071_02122cd0
data_ov071_02122e74 data_ov071_02122e7c data_ov071_02122e84 data_ov071_02122e8c
data_ov071_02122ecc
data_ov071_02123038 data_ov071_02123040 data_ov071_02123048
data_ov071_02123064 data_ov071_02123070 data_ov071_0212307c data_ov071_02123088
data_ov071_021230b8 data_ov071_021230c4 data_ov071_021230d0 data_ov071_021230d8
data_ov071_021230e0 data_ov071_021230ec:0x14
# run linkw wave 5 (lane w5-A): COFFIN (64) joins. Its record is config-named
# and `ambiguous` (the shared ov070/071/073/074 window); settled by the raw
# readback in overlay_0071.bin: w0 = 0x02122670 = daObjCasket_c_classInit, +4 reads 64.
# Span 0x1c by the next symbol (data_ov071_02122ecc, the state table).
g_profile_CASKET

# ---------------------------------------------------------------------------
# run linkw wave 7 (lane w7b): THE MR. I FAMILY joins -- MR_I (262), BIG_MR_I
# (263) and MR_I_PROJECTILE (264).
#
# THE HEADER COMMENT AT THE TOP OF THIS FILE IS WRONG about the ids and is left
# in place only so this correction has something to point at. It says ov071
# carries "MrI/BigMrI (198/199, the eyeball), MrI_Projectile (262?)". Re-derived
# from the ROM by the double test the shared ov070/071/073/074 window makes
# mandatory -- the spawnFunc must land INSIDE ov071 AND the record's +4 id
# halfword must match -- the real map is:
#
#   id  spawn-table slot        SpawnInfo   word[0]                  +4 reads
#   262 0x02090c7c -> 0x02122cf0 MrI        0x02121a1c daEykn_c_classInit_EYEKUN          262
#   263 0x02090c80 -> 0x02122d0c BigMrI     0x021219cc daEykn_c_classInit_EYEKUN_BOSS       263
#   264 0x02090c84 -> 0x02122dc4 MrI_Proj   0x02121f9c MrI_Projectile_S.  264
#
# Ids 198 and 199 DO point at records inside this overlay's window, but their
# word[0] spawnFuncs land OUTSIDE ov071 -- another module sharing the window,
# which is precisely the trap the double test exists for.
#
# Each record is pinned to its real 0x1c. g_profile_EYEKUN would take 0x1c from the
# next symbol anyway; the other two would take 0x24 (the next symbol is the
# class's VTABLE, which is a HOST array deliberately left out of this mount) and
# would over-size into a host/ROM gap -- the g_profile_SPIDER lesson.
g_profile_EYEKUN:0x1c
g_profile_EYEKUN_BOSS:0x1c


# The .rodata pointer table MrI's InitResources and CleanupResources index, the
# only data this lane adds. .rodata is 0x021226a0..0x021226ac (3 words) and the
# config names only the first two of them:
#   021226a0 -> 0x02123048  the anim SharedFilePtr   (Animation::LoadFile)
#   021226a4 -> 0x02123038  the texseq SharedFilePtr }  CleanupResources walks
#   021226a8 -> 0x02123040  the texseq SharedFilePtr }  (&data..21226a4)[i], i<2
# so data_ov071_021226a4 must carry BOTH words as one object -- it is indexed as
# a two-element array by both methods. Its next-symbol delta would run to
# 0x02122b30 (the .ctor section, past all four sinit bodies), so it is pinned to
# its real 0x8. All three pointees (02123038/40/48) were already mounted above.
data_ov071_021226a0
data_ov071_021226a4:0x8


# RETIRED at ALIAS2 (wave 8, the main -> port sync). Each symbol below was
# hosted here as a ROM data blob AND is now defined by a translation unit the
# build compiles, so the link reported it twice (LNK2005). The generator input
# is the place to fix that: build/port/host-src/ov071_syms.c is its output and is
# regenerated from this list on every configure.
#   g_profile_EYEKUN_BEAM                      now defined by d_a_ey_bm.cpp.obj
