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 a32c00057e
commit cb830e233e
3 changed files with 49 additions and 1 deletions

View File

@@ -110,6 +110,7 @@ Generated by `tools/re-capture/isl_report.py calls`.
115 named_event 9
48 squadron_escort 8
39 MARK_LAST_PHASE 8
82 banner_mission_failed 8
17 wait_frames 6
10 random 6
123 timer_resume 5
@@ -118,6 +119,10 @@ Generated by `tools/re-capture/isl_report.py calls`.
52 play_stream 3
14 play_bgm 3
62 FORCE_END_PHASE 3
81 banner_objective_update 2
135 banner_mission_restart 2
78 banner_mission_complete 2
77 banner_mission_start 1
127 timer_set 1
## phase code bases
@@ -180,7 +185,7 @@ resync from 0x5058
0052B0: 00000C13 call len=12 k=00,00 0000005D 00000257 clear_flag(0xFFFFFFFF)
0052BC: 00000C13 call len=12 k=00,00 00000076 00000258 builtin118
0052C8: 00000C13 call len=12 k=00,00 00000027 0000025A MARK_LAST_PHASE
0052D4: 00000C13 call len=12 k=00,00 00000052 0000025B builtin82
0052D4: 00000C13 call len=12 k=00,00 00000052 0000025B banner_mission_failed
0052E0: 01021001 set.f len=16 k=01,02 00000000 40100000 00000000 special[0] = imm 4
0052F0: 02030C01 set.f len=12 k=02,03 00000000 00000000 local[0] = special[0]
0052FC: 00000C13 call len=12 k=00,00 00000004 0000025C wait_s(4)