THE SCENE BOOT SPINE: how the port enters a mode of the game that is not a
level, what it costs, and where the star select stops. Run link60, lane S1.

Baseline this was measured against: 4bba244fd, walk_window 4871/11243 linked
(43.3%), battery ALL GREEN, gate skips []. No exe hash is quoted on purpose --
the link embeds build-location state, so a sha256 from one worktree is not
something another worktree reproduces. The attestation is the gate manifest's
git_sha plus git_dirty.


1. WHAT WAS TRUE BEFORE THIS LANE
---------------------------------

The port had entered exactly one mode of the game. walk_window mounts ov002,
constructs a Stage, runs a level's entrance record and spawns a Player. Every
other mode of SM64DS lives in one of the other three occupants of the shared
overlay slot at DS 0x020ad660 -- ov003 (the three menu scenes), ov004 (the
minigame framework) and ov007 (the title and file select) -- and none of them
had ever come up. port/ov004_ov007_2d_map.txt section 8 says so and names the
cheapest proof that one can: "ov003 (star select, 36 TUs, 0 linked) is the same
shape as ov007 but twenty times smaller, reached by actor ids 2, 4 and 8, and
ov003 is ALREADY MOUNTED for the debug level select's row list. If someone
wants the cheapest proof that a non-ov002 scene can be brought up in the port,
ov003 is it, not ov007."

This is that.


2. THE CHAIN, AND WHAT THE PORT CONTRIBUTES TO IT
-------------------------------------------------

A scene is an ACTOR. There is no separate scene machinery: the title screen,
the star select, the game-over screen, every minigame and the level itself are
all actors spawned through one spine, and what makes one a "scene" is that its
class derives from Scene and that its actor id is one the arm9 loads an overlay
for. So hosting a scene is the ORDINARY REGISTRY SHAPE the port already uses
for a hundred actor classes.

    Scene::SetSceneToSpawn(4, 0)          0x0202e36c  matched
      data_02092664 = 4, data_0209f5b8 = 0
    Scene::SpawnIfNecessary()             0x0202e26c  matched
      -> func_02013edc(4, 0, 1)           0x02013edc  matched, a veneer
      -> func_02042fe4(4, 0, 1)           0x02042fe4  matched
      -> func_02043098(4, 0, 0, 1)        0x02043098  matched, the spine
           data_020a4b50 = 4
           func_02043060(4)               the pre-spawn hook
           func_02043180(4, 0, 0, 1)      the spawn context
           (*data_020a4bb8[4])()          dScStarSel_c_classInit, ov003 0x020b04f0
           func_020433b8(obj)             thread it onto the init list

Every step is a matched arm9 TU. THE PORT ADDS NOTHING TO THE CHAIN:
port_scene_boot (hal/scene_boot.cpp) calls the first two functions and prints.
It does not spawn anything itself, does not write data_02092664 by hand and
does not call any ov003 function directly.

What the port supplies is what it supplies for every other class:

  - the ROM's own SpawnInfo record, mounted (port/ov003_syms.txt), with ONLY
    its +0 factory word repointed at the host compilation of the same factory.
    The arm9 ACTOR_SPAWN_TABLE at 0x02090864 really does relocate slot 4 to
    0x020b16b4, and that record's +4 halfword reads back 4, which is the
    registry's own cross-check and is asserted at seat time.
  - the class vtable as a host array, filled with the ROM's own eighteen slot
    contents, read out of extracted/overlays/overlay_0003.bin.

THE OVERLAY LOAD IS NOT SKIPPED, IT DOES NOT EXIST ON THE HOST. On the DS the
spine's pre-spawn hook is func_0201a694, which calls GetSceneOverlayID(id) and
then func_0201a754/func_0201a798 -- the unload-before-load discipline. The
port's occupant of that hook slot is port_prespawn_hook (the registry gate),
which returns the same 2/3 the ROM's hook returns. That is not a stand-in for
the overlay load: the port has no overlay loader because every overlay it hosts
is a static host array mounted at build time, and ov003 is mounted the way
ov009 or ov016 is.


3. THE VTABLE, EVERY SLOT
-------------------------

data_ov003_020b1704, eighteen words, read at (addr - 0x020ad660) out of
extracted/overlays/overlay_0003.bin -- whose length 0x4240 equals the OVT's
ram_size for ov003, so the read is exact; the dsd export is a different file
and is not the RAM image. Cross-checked against ov003's relocs.

     0  InitResources           _ZN12dScStarSel_c13InitResourcesEv   ov003  (NONMATCHING)
     1  BeforeInitResources     Scene::               0x0202e638
     2  AfterInitResources      Scene::               0x0202e62c   VENEER
     3  CleanupResources        _ZN12dScStarSel_c16CleanupResourcesEv   ov003
     4  BeforeCleanupResources  Scene::               0x0202e5f0
     5  AfterCleanupResources   Scene::               0x0202e5d0
     6  Behavior                _ZN12dScStarSel_c8BehaviorEv   ov003  (NONMATCHING)
     7  BeforeBehavior          Scene::               0x0202e3d4
     8  AfterBehavior           Scene::               0x0202e3c8   VENEER
     9  Render                  _ZN12dScStarSel_c6RenderEv   ov003  (NONMATCHING)
    10  BeforeRender            Scene::               0x0202e3a4
    11  AfterRender             Scene::               0x0202e398   VENEER
    12  OnPendingDestroy        _ZN12dScStarSel_c16OnPendingDestroyEv   ov003
    13  Virtual34               ActorBase::           0x0204357c
    14  Virtual38               ActorBase::           0x0204349c
    15  OnHeapCreated           ActorBase::           0x02043494
    16  D2                      _ZN12dScStarSel_cD1Ev   ov003
    17  D0                      _ZN12dScStarSel_cD0Ev   ov003

THE THREE SLOTS MARKED VENEER ARE THE ONE REAL ABI PROBLEM IN THE FILL, and
they are worth reading before anyone seats a second scene class. Each is a
0xc-byte tail-call veneer in the ROM (`ldr ip, [pc]; bx ip; .word <target>`),
so the arguments ride through in r0/r1 and the decomp writes all three as
`void f(void)` calling `void g(void)` -- a faithful transcription of three
instructions. Under MSVC's __cdecl a (void) caller pushes nothing and the
(void) callee reads whatever was on the stack, so the scene object and the
vfSuccess code both arrive as garbage, and AfterInitResources' garbage decides
whether the actor is marked for destruction on its first frame. The fill
dispatches STRAIGHT TO EACH VENEER'S TARGET with both arguments, which is what
the three ROM instructions mean; hal/scene_actor_faces.cpp carries the four
faces and the derivation, and the three src veneer TUs are deliberately not in
the slice.


4. THE RESULT, MEASURED
-----------------------

    walk_window.exe, SM64DS_SCENE=4 SM64DS_SCENE_FRAMES=300
    SM64DS_FAULTS_FATAL=1 SM64DS_SCENE_SLOT9=0, exit 0:

      [scene] 1 scene classes registered (ov003)
      [scene] sublevel 6 -> course 0
      [scene] 4 = SCENE_STAR_SELECT
      [scene] spawned 307FFEC4, vptr 00B38A20
      [scene] tree root 307FFED8, scene node 307FFED8 (the scene IS the root),
              pending id 0x187, latch 1
      [scene] ov003 slot hits: init 1, behavior 299, render 0, cleanup 0,
              pending-destroy 0  [RENDER SLOT NO-OP'd: SM64DS_SCENE_SLOT9=0]
      [scene] 300 frames of scene 4 (SCENE_STAR_SELECT), clean

READ THE "tree root" AND "slot hits" LINES, NOT THE "spawned" ONE. "spawned"
only says an object exists, which would be true of an object nothing ever
ticked. What says the chain is LIVE is (a) the tree root coming back as the
scene's own SceneNode -- func_0203b438's no-parent branch writes the first node
it is handed into data_020a4b6c[0], and on a level run that slot holds the
Stage, because on the DS the Stage IS scene 3 -- and (b) the slot-hit counters:
the ROM's init Process entered dScStarSel_c::InitResources once and the ROM's
behaviour Process entered dScStarSel_c::Behavior on 299 of the 300 frames.

The pending id reading 0x187 and the latch reading 1 is Scene::SpawnIfNecessary
having done its own bookkeeping, so a second call would decline: the scene
spawns exactly once, the way the ROM arranges.


5. WHERE IT STOPPED: THE RENDER SLOT -- FIXED, AND IT WAS NOT THE MODEL
------------------------------------------------------------------------

RESOLVED by run link60 lane L1. The rest of this section is kept because the
LOCATION it measured was right and is worth reading, but its CAUSE was wrong
and is corrected in "WHAT IT ACTUALLY WAS" below. The scene now renders bare:
SM64DS_SCENE=4 SM64DS_SCENE_FRAMES=300 runs 300 frames with slot-hit counts
init 1, behavior 299, RENDER 300, clean, exit 0, on sublevel 6 and sublevel 7
alike. No SM64DS_SCENE_SLOT9=0.

With slot 9 on its real body the run NEVER FINISHED FRAME 0. Not a fault -- a
hang, which leaves nothing behind, so it was caught with the harness's own
watchdog (PORT_WATCHDOG=25, tests/fault_probe.h) and symbolized with
port/tools/faultmap.py. The main thread, innermost first:

    +0x0014b7ca  memcpy
    +0x00146b36  ntr::io_read                        ntr_2x:io.cpp.obj
    +0x000dc8ec  func_0205a358 +0x3c
    +0x0001d2b5  func_01ffde98 +0x15                 model_host.cpp.obj
    +0x000dd4aa  func_0204488c +0x24a
    +0x000dcd7c  func_02044b30 +0x25c
    +0x0003e8f1  ModelComponents::Render +0xd1
    +0x0003e809  Model::Render(Vector3 const *) +0x39
    +0x0001ea3b  mv_render +0x1db                    cxxname_bridge.cpp.obj

func_0204488c is the ordinary part walk -- port/tools/hostgen.py's header names
it as such ("the ordinary part walk, and the one place a model's scale is
spent"). dScStarSel_c::InitResources loads two models,
Model::LoadAndSetFile(this + 0x64, 0x8015, 1, -1) and (this + 0xB4, 0x8017, 1,
-1) -- the filled star and the empty one -- and the Render draws whichever of
the two IsStarCollectedInLevel picks, through the object's own slot-5 dispatch.

WHAT THIS SECTION USED TO CONCLUDE, AND WHY IT WAS WRONG. It read the stack as
"the walk is reading a runaway command count out of a Model that LOADED but did
not BUILD", called it a model-loader blocker, and pointed at hal/level_boot
.cpp's ROCK_PILLAR block as the same shape. Every step of that was inference
from the stack; none of it was measured, and the entry in port/tools/battery.py
said so in capitals. It was wrong. THE MODEL IS FINE.

WHAT IT ACTUALLY WAS. Instrumenting the submit (a temporary SM64DS_MODEL_TRACE
in the HAL, since removed) shows the walk makes exactly ONE display-list submit
before it stops, and that submit is correct in every field:

    dl#1 ch=3 src=3001ccd4 size=692

Parsing handle 0x8017 straight off disk -- ARCHIVE/arc0.narc member 23, the
NARC walk hal/fs.cpp does, then the BMD_File layout of include/BMD_File.h --
gives one part record whose dlptr is file offset 0x58 and whose dlsize is 692.
The trace has the file loaded at base 3001cc7c, and 3001cc7c + 0x58 = 3001ccd4.
Loaded right, rebased EXACTLY ONCE, submitted with the right pointer and the
right length. There is no runaway count, and there never was one.

The hang is one level down, in func_0205a358, and it is a HOST HARDWARE-MODEL
bug rather than anything to do with models:

    while (((*(volatile unsigned int *)0x4000600 & 0x7000000) >> 0x18 & 2) == 0) ;

That is a wait for GXSTAT bit 25, "command FIFO less than half full". GXSTAT
measured 0x80008000 at the submit -- bits 25 and 26 both clear -- so the wait
could never fall through. ntr modelled GXSTAT as a plain latch, and
func_0205583c (Initialise3dGraphics, which Scene::Initialise3dGraphics calls)
opens by storing 0 to it and then ORs in 0x8000 and bit 31, which on a latch
produces exactly 0x80008000. On real hardware bits 16..27 are geometry-engine
owned and read-only, so that store cannot touch them and the FIFO keeps
reporting empty. Fixed in port/ntr/io.cpp by normalising the read-only field;
see the note above the GXSTAT constants there.

WHY THE READ OF THE STACK MISLED. "+0x3c" inside func_0205a358 is the spin
loop, and the loop's operand is MMIO, so its read goes through ntr::io_read and
memcpy. Those two frames looked like a bulk copy driven by a huge length. They
were a two-instruction busy-wait being sampled. The section's own observation
that the two runs differed only in sampled eip (memcpy on one, func_0205a358
+0x32 on the other) was the clue and was read as noise: +0x32 and +0x3c are
both inside that same wait.

THE LEVEL-8 ROCK_PILLAR ENTRY IS NOT THIS BUG, and on this tree it does not
reproduce at all. Level runs never clobber GXSTAT: a traced level 8 reads
GXSTAT=06000000 on all 200 of its display-list submits, so the fix is a no-op
there. Standing Mario on a pillar (SM64DS_LEVEL=8
SM64DS_SPAWN=-1371,-2800,-4586 SM64DS_WINDOW_SELFTEST=900 SM64DS_FAULTS_FATAL=1)
runs 900 frames clean and exits 0 BOTH WITH AND WITHOUT the GXSTAT fix, at a
bit-identical end position, with Mario on the first of the six pillars the
census reports. SM64DS_ACTOR_PROBE=1 on that run prints ROCK_PILLAR with a
non-null file AND non-null transforms, so the Model is fully built and the
class reaches its Render -- the opposite of what the original entry claimed.
The heap trample fixed in f5d936503 / d241d27bb, both descending from the
gate-188 commit that wrote the entry, explains the original fault without any
model-build defect.

THE FULL WRITE-UP NOW LIVES WITH THE CODE, in hal/level_boot.cpp's ov016 block,
amended in place rather than left contradicting this file. It is downgraded to
"not reproducible on this tree", NOT retired, because nobody has confirmed the
pillar rasterizes: reaching Render with a built Model is not pixels on screen.

WHAT RULES OUT THE OTHER CANDIDATES, so the next lane does not re-derive them:

  - It is not the slot-5 shadow-class collision (the Whomp / RotatingFirebar /
    JRB family, port/unmatched/Jrb_Renders.cpp). The Render dispatches its
    Model through a local six-virtual shadow whose slot 5 would land on the
    wrong host method if _ZTV5Model were singly filled -- but it is DUAL-filled
    (Render sits in both slot 4 and slot 5, hal/cxxname_bridge.cpp), and the
    stack proves the dispatch arrived: mv_render is that thunk, and it called
    the real Model::Render.
  - It is not a missed OAM template rebase (the unbounded OamAttr walk
    hal/oam_lists.cpp exists for). Two things say so, and the second is the
    strong one: the generated mount patches every pointer word in the tables
    this scene indexes, read out of build/port/host-src/ov001_syms.c
    (_ZN3OAM10LIFE_ICONSE's four words, data_ov001_020abb18's seven, and the
    rest of the twelve); and the watchdog stack never enters OAM::Render at
    all, which is where an unbounded attr walk would be sitting.
    THE BOOT'S "[oam] sprite templates: 0 bad entries" LINE IS NOT EVIDENCE
    FOR THIS, and an earlier version of this file wrongly cited it as if it
    were. hal/oam_lists.cpp checks a FIXED LIST of ten tables -- the minimap's,
    the HUD's and OAM::NUMBERS -- and not one of the twelve templates the star
    select indexes is on it. The line is true and says nothing about this
    scene. Someone adding those twelve to kTables would turn it into evidence;
    until then it is not.
  - It is not the sublevel. See section 6; that WAS a real bug and it is fixed.

NOT A STAR-STATE ARTIFACT. Review asked whether the hang depends on which
stars the save says are collected, since that is what picks the Model the
Render draws. It does not: SM64DS_SCENE_SUBLEVEL=7 (course 1 rather than
course 0) hangs with the SAME STACK, frame for frame and at the same offsets --
func_0204488c +0x24a, func_02044b30 +0x25c, ModelComponents::Render +0xd1,
Model::Render +0x39, mv_render +0x1db. Only the sampled eip differs (memcpy
inside ntr::io_read on one run, func_0205a358 +0x32 on the other), which is the
watchdog catching the same loop at two arbitrary instants and not a difference
in the hang.

THE A/B THAT PINNED IT was SM64DS_SCENE_SLOT9=0, which leaves the Render slot
on a no-op and is counted separately so a run can never read the no-op as the
real body having run. It stays available as a diagnostic, but it is no longer
needed: port/tools/battery.py's SCENE_SKIPS entry for scene 4 was retired when
the GXSTAT fix landed, exactly the way that mechanism is meant to end, and
scene 4 is now covered by the battery BARE.


6. A BUG THIS LANE FOUND AND FIXED: THE SCENE HAS AN INPUT
-----------------------------------------------------------

dScStarSel_c is a scene ABOUT a course. Every branch in its InitResources, its
Behavior and its Render is gated on SublevelToLevel(data_02092110) -- the arm9
SUBLEVEL_LEVEL_TABLE (0x02075298) lookup that turns the current sublevel into a
course number -- and the ROM never reaches the scene without one: you pick a
course, the game latches the sublevel, and the star select comes up for it. So
the sublevel is an INPUT the way SM64DS_LEVEL is an input to a level boot.

A run that does not supply one is not neutral, it is INVALID, and the shape of
the failure is worth recording because it is a general trap. data_02092110
starts at 0 and SUBLEVEL_LEVEL_TABLE[0] is 0xff, which through its own
declaration (include/decl_common.h: `extern signed char SUBLEVEL_LEVEL_TABLE[]`)
is -1, the "not a level" sentinel. InitResources' star block is guarded by an
UNSIGNED compare, `(u32)level <= 0xE`, which 0xff fails -- so the star count at
+0x114 is never written. Render's loops are guarded by the SIGNED compare,
`SublevelToLevel(...) <= 0xE`, which -1 PASSES -- so they walk that
uninitialised count. One sentinel, two readings, and the scene reads its own
uninitialised field.

SM64DS_SCENE_SUBLEVEL=<n> supplies it, default 6 (SUBLEVEL_LEVEL_TABLE[6] = 0,
Bob-omb Battlefield -- the smallest real answer: course 0 with a zeroed save
gives a one-entry star grid). Fixing it did NOT fix the render hang, which is
how section 5's blocker was isolated from this one.


7. THE 2D QUESTION, MEASURED
-----------------------------

port/ov004_ov007_2d_map.txt section 7 lists six gaps in what port/ntr models of
the DS 2D hardware and asks the next lane to measure which of them a real scene
needs. dScStarSel_c is a 2D-heavy scene, so here is that measurement, in the
same clusters. Read it as "what the star select POKES", from its own source and
from the run, not as a survey of the hardware.

  a. OBJ WINDOW (WIN0/WIN1/WINOUT). NOT NEEDED by this scene -- conclusion
     unchanged, but ONE STEP OF THE ARGUMENT BELOW WAS WRONG and is corrected
     here rather than left for the next reader. See port/ppu_gap_audit.txt.

     dScStarSel_c::InitResources writes DISPCNT (0x04000000) twice, clearing
     0x00300010 and then setting bits 0x08000000 / 0x00001f00 through
     data_0209d45c -- BG and OBJ enables only. Nothing in the closure touches
     0x04000040..0x0400004a.

     THE OAM STEP DID NOT SAY WHAT IT MEANT TO. It read: none of the THIRTY
     OAM::Render / OAM::RenderSub call sites (21 in the Render, 3 each in the
     three emitters under it) passes objMode 3. The OBJ window is mode 2, not
     mode 3 -- mode 3 is the prohibited/bitmap encoding -- so that test rules
     out the wrong value and cannot support the conclusion it was under.

     THE CONCLUSION SURVIVES, re-derived from a run instead of from call sites:
     over 300 frames of SM64DS_SCENE=4 the OAM census finds zero objects in
     mode 1, mode 2 or mode 3 on either engine, and DISPCNT bits 13, 14 and 15
     are all clear on every frame, so no window of any kind is armed. The star
     select does not need the OBJ window. ov004 and ov007 stay unmeasured.

     ONE FURTHER MEASUREMENT WORTH HAVING HERE, since this file is about the
     scene path: in a scene-4 run engine B's OAM is 128 ALL-ZERO entries, while
     engine A's holds 101 parked at y=192 plus 27 live sprites. In a level run
     it is the other way round. Engine B's OAM never gets OAM::Reset on the
     scene path, which is a real defect in the scene bring-up and is routed as
     its own lane, not a 2D-hardware gap. THAT LANE HAS SINCE RUN: section 12
     is its answer, and the 128-all-zero above reproduces there as the A side
     of a same-binary A/B.

  b. SEMI-TRANSPARENT SPRITES AND COLOUR SPECIAL EFFECTS (BLDCNT/BLDALPHA).
     NOT NEEDED. The scene's only fade is Scene::StartSceneFade(3, 0, 0) at the
     end of its Behavior, which the port already drives through the brightness
     registers (hal/fader_wipes.cpp, G2x::SetBlendBrightness). No BLDCNT write
     anywhere in ov003.

  c. AFFINE AND ROTATION/SCALING BACKGROUNDS. NOT NEEDED for the BGs. The
     scene sets BG2 and BG3 through BG2CNT/BG3CNT (0x0400000c / 0x0400000e) to
     0x1610 / 0x1700 with the low two bits forced to 1 and 2 -- text and
     extended-text priorities, both of which ppu.cpp scans out. It DOES use
     AFFINE SPRITES (OAM::Render's Matrix2x2 overload, and
     Matrix4x3_ApplyInPlaceToRotationY / ApplyInPlaceToScale on the selected
     star), and ppu.cpp already models the four OAM matrix halfwords.

  d. THE 3D FONT. NOT REACHED. The scene calls LoadFont(0), not LoadFont3D, so
     hal/sub_screen.cpp's documented 3D-font exception does not gate it.

  e. TOP-SCREEN BG2 TEXT. REACHED, AND SOMETHING COMES OUT. The scene loads
     its own BG2 character/palette/screen data by file id (0x23F/0x240/0x241 on
     the >= 0xF path, 0x24A..0x24C plus the four language variants otherwise)
     straight into G2::GetBG2CharPtr() / GetBG2ScrPtr() with DecompressLZ16,
     which is a different path from LoadControllerModeText's, and it runs:
     InitResources completes. The frame the run writes is NOT the bare clear
     (section 11 has the pixel counts), so either this BG path or the engine-B
     sub-screen present is drawing. WHICH ONE, AND WHETHER IT IS RIGHT, IS
     UNMEASURED -- nobody has looked at the frame, and separating the two is
     one A/B somebody should run rather than a sentence anybody should write.

  f. TOUCH. NOT NEEDED for the boot. dScStarSel_c::Behavior reads
     IsButtonInputValid and the pad words (data_020a0e58 / data_020a0e5a), not
     the touch panel; the touch-driven half is dScTitle_c's and ov004's.

  THE ONE GAP THIS SCENE ACTUALLY HITS is none of the six. It is the MODEL
  DISPLAY-LIST WALK in section 5, which is 3D, not 2D. That is the finding: the
  2d map's cluster list is accurate about the hardware and it is not what stops
  the first non-level scene. The mode was the wall, and past the mode the wall
  is the model loader.


8. WHAT LINKS NOW
-----------------

    baseline 4bba244fd   4871 / 11243   43.3%
    this lane            4914 / 11243   43.7%   +43

THE SLICE ACCOUNTING FIRST, because the headline hides it. port/slice_scene1.txt
lists SIXTY src TUs. FORTY-TWO of them link and EIGHTEEN are /OPT:REF-dropped,
and the +43 is those 42 plus one TU that is not in the slice at all
(OAM::RenderSub, below). Split of the 42: fifteen ov003, twenty-seven arm9.

  THE EIGHTEEN DROPPED, all of them, because a slice that lists a TU and does
  not say it was dropped is a count nobody can check:

    func_ov003_020adc74  func_ov003_020adcbc      reached only from
      func_ov003_020ad6ec, which is dScTitle_c's, so both link when that class
      is seated and not before.
    func_0205cb68  func_0205cbe4  func_0205cc80  func_0205cd34  func_0205d23c
    func_0205d2b0  func_0205d2dc  func_0205d304  func_0205d4a0  func_0205d518
    func_0205d568  func_0205d644  func_0205d714                 the Vram__Map
      family, thirteen TUs. See the correction below.
    func_0204ee40  func_0204ef9c                 two more of the same family's
      closure.
    _ZN2G212GetBG0ScrPtrEv                       reached only from
      func_ov003_020adc74, which is itself dropped.

  A CORRECTION THIS FILE OWES: THE Vram__Map FAMILY CONTRIBUTES ZERO. An
  earlier version of this section credited the +43 with "the VRAM bank-map
  family (fourteen matched TUs under Vram__Map that no port target had ever
  reached)". That is wrong twice over. Thirteen of those TUs are compiled into
  the slice and then /OPT:REF-dropped, so they are in the build and not in the
  binary. The only two family symbols in the map at all are func_02059fa8 (a
  tools/hostgen.py GATE*_SYMS entry, never a slice line here) and Vram__Map
  itself, and both were linked at base -- measured as a map diff on review, and
  corroborated by the arithmetic above, since the enumerated 28 already
  exhausts the arm9 half of the +43 and a newly linked Vram__Map would make it
  29. The GX::SetBankFor* setters DO link, and they do end in Vram__Map on the
  ROM, but the implementation under them does not come with them. Nothing about
  the bank map is new in this binary.

  THE TWENTY-EIGHT arm9 TUs THAT ARE NEW, enumerated rather than described:

    3   the chain            Scene::SpawnIfNecessary, func_02013edc,
                             func_02042fe4
    9   the bank setters     GX::SetBankForTex, SetBankForOBJ,
                             SetBankForTexPltt, SetBankForSubBG,
                             SetBankForSubOBJ,
                             SetBankForSubOBJExtPltt, and GXS::
                             BeginLoadOBJExtPltt, LoadOBJExtPltt,
                             EndLoadOBJExtPltt
    1   G3X::SetFog
    1   func_020540f0        GXS::BeginLoadOBJExtPltt's own callee
    7   3D engines and the   Enable3dEngines, func_020190b8, func_02019018,
        VRAM globals         InitialiseVramGlobals, func_02053e1c,
                             func_02053e34, func_02053e4c
    1   LoadTextNarcs
    1   SetBg2Offset
    1   CountStarsCollectedInLevelToDisplay
    2   the two Message      Message::DisplayCourseNameForStarSelect,
        ForStarSelect bodies Message::DisplayStarNameForStarSelect, which exist
                             for this scene and nothing else
    1   Sound::UnsetPlayerVoiceGroup
    1   OAM::RenderSub       NOT IN THE SLICE. It is a matched arm9 TU the port
                             already compiled, and the scene's Render is the
                             first caller to reach it, so /OPT:REF stopped
                             dropping it. The one TU in the +43 that no slice
                             line asks for.
    --
    28

  15 ov003 + 28 arm9 = 43, and the 27 arm9 above that ARE slice lines, plus
  the 15 ov003, make the 42.

  ov003 15 of 36, from 0. The other 21 are dScTitle_c's and dScGameOver_c's and
  are deliberately unlinked; see section 9.

  ov001 6 of 23, UNCHANGED. Ten more of its sprite-template symbols joined the
  mount this lane, but a mounted DATA symbol is not a linked TU and the mount
  growth moves no count here.

  FOUR OF THE FIFTEEN ov003 TUs ARE NONMATCHING (020ae358, 020ae6f4 the Render,
  020af038 the Behavior, 020af8a0 the InitResources). They carry the decomp's
  own NONMATCHING header, they count as decompiled rather than matched, and
  linkage.py counts them the way it counts any slice TU. A reader comparing
  this delta against the CONVERTED tier should subtract those four.

  /OPT:REF IS THE REFEREE AND NOTHING HERE IS A LINK ROOT. No /include:, and
  the only aliases this lane adds are name-spelling faces onto symbols that
  already exist (section 10). The ov003 bodies link because the ROM's own
  ACTOR_SPAWN_TABLE record names the factory and the ROM's own vtable names the
  seven methods -- the same edges every other actor class in the port links on.
  The eighteen drops are that referee working: eighteen TUs this lane put in
  front of the linker that the star select does not reach.


9. THE OTHER TWO ov003 SCENES, AND WHAT ACTUALLY BLOCKS THEM
-------------------------------------------------------------

dScTitle_c (id 2, the debug level select) and dScGameOver_c (id 8) are derived
to exactly the same depth as the star select: SpawnInfo 0x020b1380 / 0x020b1750
(each record's +4 halfword reads back its own id), factories
dScTitle_c_classInit / dScGameOver_c_classInit, vtables data_ov003_020b1650 /
data_ov003_020b179c with all eighteen slots read and recorded in
port/ov003_syms.txt, and every body has a src TU. Neither is seated, and
neither blocker is the mount or the chain:

  1. ELEVEN of their fourteen slot bodies carry the marker "recovered from
     vtable slot identity", so port/tools/inferred_stub_guard refuses them. The
     remedy is the documented one: disassemble each out of
     extracted/overlays/overlay_0003.bin, compare instruction for instruction
     against src/, and record the ruling in
     port/tools/inferred_stub_adjudicated.txt. This lane did that for the star
     select's three (020ae6f0, 020af86c, 020ade54 -- all three REAL DECOMP,
     evidence inline in that file). Eleven more is mechanical, not hard.
       dScTitle_c:    020ada9c 020ada80 020ad814 020ad7a4 020ad7a0 020ad69c
       dScGameOver_c: 020b0b3c 020b0b34 020b0814 020b0810 020b05bc

  2. THREE of the dtor TUs spell their vptr writes as PER-TU PLACEHOLDERS
     rather than symbols: src/_ZN10dScTitle_cD1Ev.cpp writes _ZTV10dScTitle_c /
     _ZTV8dScene_c / _ZTV7dBase_c, src/actors/dScGameOver_c.cpp writes
     _ZTV13dScGameOver_c and the same two, and src/actors/dScGameOver_c.cpp writes
     VT0 / VT1 / VT2 and deallocates against G0. None of those six names exists
     in any config. The ROM words at the three sites are 0x020b1650 /
     0x02092680 / 0x0208e4b8 (and 0x020a0eac for G0), read out of the image --
     the same values the star-select pair spells correctly. Seating them needs
     the port's per-TU placeholder treatment, which is its own gate.

Adding either class after that is a row in port_scene_classes and a block in
the slice, and nothing else. The chain, the mount and the harness are shared.

ov007 (the title and file select, 528 TUs) and ov004+ov006 (the minigames) are
the same shape at twenty and sixty times the size, and their own map file
(port/ov004_ov007_2d_map.txt sections 4 and 8) already costs them. What this
lane changes about that estimate is step 4 of its ov007 list, "the boot path...
Making it RUN needs a scene-switch entry point in the harness plus the gaps in
section 7." The scene-switch entry point now exists and is generic: seat the
record, fill the vtable, add the row. Steps 1 through 3 -- the actor-registry
row, the whole-overlay data mount and the 123-symbol external closure -- are
unchanged.


10. THE SEAMS THIS LANE ADDED, ALL OF THEM
-------------------------------------------

Two host bodies, and no others:

  LoadArchive              PORT_HOST_ABI, hal/scene_boot.cpp. The ROM walks
                           data_0208ecf4, the 13-entry archive-mount table, and
                           pulls a whole NARC into the game heap. The port
                           resolves archive-interior file IDs (>= 0x8000)
                           LAZILY instead -- hal/fs.cpp's port_fs_archive_fill
                           over port_archive_map, the host-shaped copy
                           romdata.py generates from that same ROM table -- so
                           on the host an archive is never mounted and never
                           not mounted. The mount call's only observable is its
                           return value, "is archive N available", and the
                           answer is yes. Linking the matched TU instead would
                           need the ROM table hosted with its DS string
                           pointers plus the four-TU card-loader chain under
                           it, to produce a mount the fs seam then ignores.

  Scene::AfterCleanup      A STORAGE-PLACEMENT host copy,
  Resources                port/unmatched/Scene_AfterCleanupResources.cpp. Not
                           an ABI workaround and not tagged as one. The matched
                           TU DEFINES data_02092660 (a namespace-scope
                           `unsigned char` inside extern "C", which in C++ is a
                           definition), that byte is mutable DS state, and
                           port/tools/dsstate_guard refuses a hosted DS global
                           outside .dsstate because a save state would not
                           capture it. The definition cannot be bracketed
                           inside src/, so it moved to hal/scene_boot.cpp
                           inside the bracket and the body is copied verbatim
                           with the global declared extern.

Twenty-three /alternatename faces, every one a NAME-SPELLING fix onto a symbol
that already exists, none a stand-in for a body:

  - nine C-named globals that src/_ZN12dScStarSel_c8BehaviorEv.cpp declares outside an
    extern "C" block, so MSVC mangles the references;
  - two functions two ov003 TUs reach through a locally-declared namespace
    (G2::GetBG0ScrPtr, Sound::UnsetPlayerVoiceGroup) rather than the mangled C
    name the matched TU defines;
  - twelve OAM sprite-template tables the closure declares as
    `extern void *func_020abXXXX[]`. No func_020ab* symbol exists in any
    config: the addresses are ov001 DATA and the "func_" prefix is a
    decomp-side guess. Four TUs name seventeen such spellings between them
    (thirteen in the Render alone); FIVE of the seventeen were already aliased
    in hal/sub_actors.cpp's ov001 block, because the HUD's render TUs carry the
    same defect, so twelve is what is left.

  WHY THOSE ADDRESSES ARE ov001'S AND NOT ov000'S, since dsd tags every
  relocation into that window "overlays(0,1)": co-residency settles it. ov000
  spans 0x020aa420..0x020bf4e0, which COVERS ov003's whole window
  (0x020ad660..0x020b18a0), so ov000 and ov003 can never be loaded together.
  ov001 spans 0x020aa420..0x020ad660, ending exactly at ov003's base. The
  overlay a star-select render can reach is ov001.

Three C-name forwarding definitions (the cxxname_bridge pattern) for
GX::SetBankForTex, GX::SetBankForOBJ and G3X::SetFog, whose matched TUs define
the function inside a C++ namespace while ov003 calls the C name. Their four
siblings are .c TUs that already export the C name, which is why only three are
there.

Three arm9 .data words joined romdata.py (data_0208ee00 and the two 16-byte
records data_0208eb8c / data_0208eb9c) and seven arm9 BSS words are hosted in
hal/scene_boot.cpp, each SIZED BY ROM SPAN rather than by the width the one
caller touches.


11. WHAT IS NOT PROVEN
-----------------------

  - THE SCENE'S OWN RENDER NOW RUNS (300 of 300 frames, section 5), but WHAT IT
    DRAWS HAS STILL NOT BEEN LOOKED AT. Everything in section 4 is the tick, and
    section 7's 2D reading is from the SOURCE and from register writes, not from
    pixels. Reaching the end of the render walk without hanging is not evidence
    that the frame is right.
    A FRAME DOES COME OUT, THOUGH, and it is not blank, which is worth stating
    because it is the opposite of what a no-op'd render slot sounds like. The
    SM64DS_SCENE_SLOT9=0 run with SM64DS_SCENE_BMP set writes a 512x384 frame
    whose last frame has 63058 of 196608 pixels DIFFERENT from the harness's
    clear colour, in 25 distinct colours, spanning x 0..511 and y 8..383. So
    something is drawing with dScStarSel_c::Render switched off, and the two
    candidates are the engine-A 2D compositor over the BG character, palette
    and screen data InitResources loaded by file id, and the engine-B
    sub-screen present. Which of the two, and whether what it draws is RIGHT,
    is a visual question. NOBODY HAS LOOKED AT THE FRAME. This lane measured
    it and did not judge it, and the honest next step is a human looking at
    build/port/scene4_selftest.bmp, not a sentence here describing it.
  - The four NONMATCHING bodies are decompiled, not matched. Their control flow
    is the decomp's reading of the ROM, and this lane did not re-verify it.
  - dScStarSel_c::CleanupResources (slot 3) and OnPendingDestroy (slot 12) are
    seated and adjudicated but NEVER ENTERED in any run here: the hit counters
    read 0 for both. The scene is never torn down, because nothing in the
    harness asks it to. A scene-to-scene handoff would be the first exercise of
    those two slots and of the D2/D0 pair under them.
  - The Behavior ran 299 times and its observable effects were not inspected.
    It ends in Scene::StartSceneFade(3, 0, 0) on confirm -- the star select's
    own handoff back into the level -- and no run pressed confirm.
  - Seating the scene record in EVERY walk_window boot (the
    port_scene_registry_install call at the tail of port_stage_a2_seat) was
    chosen so the ROM's own spawn-table edge is real for /OPT:REF on every
    target, level runs included. The claim that it cannot change a level is
    measured, not argued: the whole 46-level battery is green with the row
    seated. But it is ONE row, id 4, so the measurement covers that id and
    says nothing about ids 2 and 8 when someone seats them.


12. THE BOTTOM SCREEN ON THE SCENE PATH: WHAT SECTION 7a ROUTED, CLOSED
------------------------------------------------------------------------

Section 7a ends by routing one defect out of the 2D measurement and into its
own lane: "engine B's OAM never gets OAM::Reset on the scene path, which is a
real defect in the scene bring-up." This is that lane's answer. Run link60
Stage 4, branch s4-subscreen off 1179692bc.

WHERE THE BRING-UP BELONGS, AND WHY IT IS NOT THE SAME INIT MOVED EARLIER.
Each scene owns its own sub display. src/_ZN12dScStarSel_c13InitResourcesEv.cpp is
dScStarSel_c::InitResources and it configures the bottom screen itself: POWCNT1
bit 15 at line 110, its own sub BG / OBJ / OBJExtPltt banks at 118-120,
GXS::SetGraphicsMode(0) at 124, display mode 1 at 128, its own sub OBJ tiles
and palettes at 230-248, and data_0209d454 = 0x10 at 419.
Stage::InitResources answers differently at every one of those points: mode 3
for the minimap's extended affine BG3, mask 0x18, and Stage::LoadGraphics2D for
the level's 2D asset set. So hal_sub_screen_init is split at the boot/Stage
seam. The shared half (host wiring, func_02053c40's once-per-boot POWCNT1 and
affine identity, the dual-OAM plumbing) runs on both paths; the Stage half
stays on the level path at its existing call site in its existing order.

The measurement that settles it: a scene-4 run reaches DISPCNT_B 00011000 with
mask 10 with no help from hal/sub_screen.cpp at all. The sub DISPLAY was never
what was missing.

WHAT WAS MISSING IS ONE FLAG, AND IT IS THE PORT'S, NOT THE DS'S.
config/arm9/symbols.txt has data_0209e660 kind:bss, so the DS boots it to zero,
and zero is the two-engine value: OAM::Load's e660 == 0 branch uploads
0x07000000 and 0x07000400, the e660 != 0 branch uploads engine A and returns,
and OAM::Render's "!sub || data_0209e660 == 1" sends every sub sprite into the
main shadow. hal/model_host.cpp:91 pins the global at 1. The level path had
always covered that by calling OAM::EnableSubOAM; the scene path reached
neither half.

  MEASURED, ONE BINARY, ONE .dsstate BASE, SM64DS_SUB_NO_SCENE_INIT=1 as the
  A-side (its output is byte-identical to the pre-change build on both screens,
  so the switch is faithful rather than assumed):

                        A (pre-fix)          B (fixed)
    sub OAM 07000400    0/1024 nonzero       189/1024
    OAM engine A        101 parked, 27       114 parked, 14 placed
    OAM engine B        128 ALL-ZERO         115 parked, 13 placed
    sub OBJ VRAM        7433 bytes nonzero   7433, unchanged
    sub OBJ palette     158 bytes nonzero    158, unchanged
    sub BMP             6 colours            68 colours

  The 27 that becomes 14 + 13 is the proof and it is exact: those 13 sprites
  were being drawn onto the top screen. Nothing was created, the routing was
  corrected. Section 7a's 128-all-zero reproduces on the A side.

THE PRE-FIX BOTTOM SCREEN, ACCOUNTED FOR IN FULL. It was the ROM's own white
backdrop plus one 8x8 smudge in the corner. All 40 non-white pixels of the
A-side BMP fall inside x 0..7, y 0..7, because an all-zero OAM entry decodes as
y=0, x=0, 8x8, tile 0, palette 0 -- an ENABLED sprite at the origin -- so
engine B's 128 zeroed entries were drawing 128 stacked copies of tile 0.

THE WHITE IS THE GAME'S OWN BACKDROP, AND THE DERIVATION IS BRANCH-CONDITIONAL.
Measured backdrop is sub BG palette[0] = 0x7fff in both runs. On the branch
these runs take -- SublevelToLevel(data_02092110) < 0xF, which is the default
SM64DS_SCENE_SUBLEVEL=6 mapping to course 0 -- line 181 hands GXS::LoadBGPltt
the two bytes at &data_ov003_020b1698, and those bytes read ff 7f at offset
0x4038 of extracted/overlays/overlay_0003.bin. THE >= 0xF BRANCH IS A DIFFERENT
SOURCE: line 148 loads file 0x240 and hands GXS::LoadBGPltt its first two
bytes, which this lane did not read. So "the backdrop is 0x7fff because of
0x4038" is true on the < 0xF branch only and must not be quoted flat.
(Do not derive this from extracted/dsd/arm9_overlays/ov003.bin either: that
file is 16192 bytes and stops short of offset 0x4038, which reads as though the
symbol were bss. The full 16960-byte overlay carries it.)

HASHES HERE ARE WORKTREE-LOCAL, the same caveat this file's header already
makes for exe sha256. The level-1 selftest md5 this lane used to prove no
regression, dbd49e0c7c120ed58362574da25d2217, is an INTERNAL A/B ANCHOR for the
worktree it was measured in and nothing else: an independent clean pair in
another worktree agrees with ITSELF at a different hash on the same .dsstate
base. Never quote it as a cross-worktree constant. What travels is the shape of
the claim -- two builds, equal .dsstate base, byte-identical to each other --
not the digits.

  The .dsstate base for that pair is 0xb36000, virtual size 0xE58F9, on both
  the pre-change and the fixed build. CORRECTION TO COMMIT 432b33393, whose
  message says 0x736000: that figure is the RVA out of dumpbin, not the base.
  The message stands as history; this is the corrected figure.

  Scene 4's BARE top frame MOVES across this change and is re-baselined. The
  cause is in the table above plus one more term: hal_sub_screen_present
  composites the bottom screen into the corner of the SAME framebuffer the top
  BMP is written from, so a panel that gained 62 colours takes the top frame
  from 62 distinct colours to 485. Anyone byte-comparing scene 4 across this
  commit is comparing the wrong thing.

THE FAIL-OPEN FOCUS GATE IS NOW LOAD-BEARING IN TWO PLACES. hal_window_focused
returns 1 on a null g_hwnd on purpose, so a binary that opens no window is
never locked out of its own input. Two things now depend on that:

  1. hal/sub_screen.cpp's TAB latch. Splitting the init made a scene run load
     user32 with hwnd == nullptr, so GetAsyncKeyState_ went live, the gate said
     yes, and a TAB held anywhere on the machine could have toggled the panel
     mid-run and moved the BMP. Closed by treating a null hwnd as headless.
  2. port/tests/walk_window.cpp:3030, key_live. It is safe ONLY BY CALL
     ORDERING: it runs after g_hwnd has been set from the real window, so the
     gate is a true focus test there rather than a fail-open. NOTHING IS FIXED
     HERE -- it is recorded so that a future reordering of the window creation,
     or a windowless caller reaching that lambda, is understood to break it
     silently rather than loudly.

STILL OPEN OUT OF THIS LANE

  - WHAT THE BOTTOM SCREEN NOW DRAWS HAS NOT BEEN LOOKED AT. 68 colours and
    10.3% non-white coverage is a measurement, not a verdict. Whether that is
    the course name, the star grid and the character portraits drawn CORRECTLY
    is a visual question and this lane did not judge it, for the same reason
    section 11 gives about the top frame.
  - SUB OBJ EXTENDED PALETTES ARE OFF, and it newly matters now that sub
    sprites draw at all. InitResources calls GX::SetBankForSubOBJExtPltt(0x100)
    at line 120 and GXS::Begin/Load/EndLoadOBJExtPltt at 246-248, but measured
    DISPCNT_B is 0x00011000: bit 31 (OBJ extpal) clear, bit 30 (BG extpal)
    clear. Nothing in the port sets bit 31 on either path. First place to look
    if the sprite colours are wrong.

    CLOSED by run link60 lane SUB2, and it WAS where the colours were wrong.
    This item pointed at the right bit and stopped one step short of why. The
    bit was not un-set, it was set at line 120 and then cleared again at 248:
    GX::SetBankForSubOBJExtPltt records its bank at data_020a6088 + 0x18, which
    on the DS IS the symbol data_020a60a0 that GXS::BeginLoadOBJExtPltt reads,
    clears and hands to EndLoadOBJExtPltt to restore. The port hosted those two
    as separate objects, so Begin read zero and End restored bank 0. Measured
    DISPCNT_B is 0x80011000 with the band laid out in ROM order.
    The screen's own numbers, 300 frames: four 64x64 sprites in colour mode 256
    at palette 0 and tiles 512/516/576/580 -- 512 x 32 bytes is the 0x4000 the
    character portrait is decompressed to -- against nine 16-colour sprites for
    the star and the text. 473 nonzero bytes of extended palette were sitting
    at 0x068a0000 unused. ntr/ppu_sub.cpp now decodes them.
    See port/ppu_gap_audit.txt section 11 for the full derivation, the two new
    instrument rows that found it, and the A/B on the frame.
  - THE data_0209e660 PIN IS THE ACTUAL ROOT CAUSE and is still in place.
    Hosting the DS's bss zero as 1 is what makes OAM::EnableSubOAM necessary at
    all. Pulling it is hal/model_host.cpp's change, with hal_oam_layout_check's
    adjacency as a hard precondition and port/tests/smoke_oam.cpp:42 (which
    asserts == 1) to update with it.
  - ONLY SCENE 4 WENT THROUGH THIS. The bring-up lives in port_scene_run and is
    scene-agnostic by construction, but scene 1 is BLOCKED on the ov007 decomp,
    so no second scene has exercised it.
