re: name the five mission-banner built-ins from call-site structure

77, 78, 81, 82 and 135 were unnamed. The engine has five contiguous strings
-- MISSION_START_PRT at 0x820A83F0, then _END_, _UPDATE_, _FAILED_,
_RESTART_ -- and five sequential ScriptPhase fields at +388/+392/+396/+400/
+404, stored in ascending order by one constructor region. Five names, five
fields, five unnamed built-ins.

Which is which is decided by call-site structure, measured over all 28
stages, and it is exact:

  39 MARK_LAST_PHASE   89 sites  -> 82 in 89/89
  82 banner_mission_failed        <- 39 in 89/89, then wait_s 89/89
  40 mark_not_last     50 sites  -> 78 (27) + 81 (17) + END_PHASE (6) = 50
  78 banner_mission_complete      <- 40 in 27/27
  81 banner_objective_update      <- 40 in 17/17
  77 banner_mission_start         22 sites in 22 stages, one per stage,
                                  after play_bgm
  135 banner_mission_restart      16 sites, after play_bgm, phase >= 2

39 -> 82 is a perfect pairing and 40's sites partition exactly three ways.

Stated as inferred rather than read: the string-to-field pairing itself comes
from both sequences ascending in the same order; my operand tracker did not
catch the string loads in that constructor. The ROLES above do not depend on
it.

76 is left unnamed on purpose. It has 38 sites = 22 + 16, exactly 77's count
plus 135's, and precedes them; its body sets [phase+332] = 1 and nothing in
the image reads that field. Suggestive arithmetic is not a name.

Flagged as a consequence: MARK_LAST_PHASE is followed by the FAILED banner in
89 of 89 sites and mark_not_last by END or UPDATE. So [phase+300] = 2 reads
less like "this is the last phase" than "end the mission now,
unsuccessfully" -- the existing names for that pair may be mis-framing it.

Artifact regenerated: docs/re/data/isl-stage02.txt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMRJjbxLqZtsb5Vb7KunPE
This commit is contained in:
Sylpheed RE agent
2026-08-26 00:44:38 +00:00
parent ede9a26150
commit f41ef43fa4
3 changed files with 49 additions and 1 deletions

View File

@@ -140,6 +140,46 @@ and spread checks but its maximum *exceeds* the table — flag indices run 0..31
against symbol tables as small as 40 — so it is excluded, and the disassembler
now declines to resolve it rather than printing an invented name.
### ✅ Five built-ins are the mission banners — named from usage, not from a guess
`77`, `78`, `81`, `82` and `135` were unnamed. The engine has five contiguous
strings — `MISSION_START_PRT` (`0x820A83F0`), `_END_`, `_UPDATE_`, `_FAILED_`,
`_RESTART_` — and five sequential `ScriptPhase` fields at `+388/+392/+396/+400/
+404`, stored in ascending order by one constructor region
(`0x82262D30 … 0x82263340`). Five names, five fields, five unnamed built-ins.
What decides *which is which* is the call-site structure, and it is exact:
| built-in | sites | stages | preceded by | followed by |
|---|---|---|---|---|
| **39** `MARK_LAST_PHASE` | 89 | 22 | 118 (89/89) | **82 (89/89)** |
| **82**`banner_mission_failed` | 89 | 22 | **39 (89/89)** | `wait_s` (89/89) |
| **40** `mark_not_last` | 50 | 28 | 118 (43) | **78 (27) + 81 (17) + `END_PHASE` (6) = 50** |
| **78**`banner_mission_complete` | 27 | 22 | **40 (27/27)** | `wait_s` (27/27) |
| **81**`banner_objective_update` | 17 | 12 | **40 (17/17)** | `wait_s` (17/17) |
| **77**`banner_mission_start` | 22 | **22 — one per stage** | `play_bgm` (15) | `end_coroutine` (21) |
| **135**`banner_mission_restart` | 16 | 12 | `play_bgm` (16/16) | `end_coroutine` (16/16) |
`39 → 82` is a perfect 89/89 pairing, and `40`'s 50 sites partition *exactly*
into 78 / 81 / `END_PHASE`. One banner per stage after the music starts is a
mission-start banner; one after `mark_not_last` in a non-final phase is an
objective update.
🟡 The string↔field pairing itself is **inferred from ordering** — both sequences
ascend in the same order — not read directly; my operand tracker did not catch
the string loads in that constructor. The *roles* above do not depend on it.
**76 is left unnamed**, deliberately. It has **38 sites = 22 + 16**, exactly
`77`'s count plus `135`'s, and it precedes them; its body sets `[phase+332] = 1`
and nothing in the image reads that field. The arithmetic is suggestive but a
name would be a guess.
🟡 **A consequence worth flagging:** `MARK_LAST_PHASE` is followed by the
**FAILED** banner in 89 of 89 sites, and `mark_not_last` by the END or UPDATE
banner. So `[phase+300] = 2` reads less like "this is the last phase" and more
like "end the mission now, unsuccessfully". The names in this file are the
original ones and may be mis-framing that pair.
### ✅ A symbol operand is a two-word pair: a **tag**, then the index
This is why the unit indices sit at slots 4/12/20 and never at 0/8/16 — the even