isl: rename built-ins 8/9/93 to stopwatch_start/_elapsed/_stop

They are start / read / stop of one of 32 per-phase stopwatches, not
flag operations.  123-127 keep timer_* -- that is the mission timer,
five scalars at [phase+304..320], a different clock.

Artefact check: 84 lines changed across 5 files and all 84 pair
exactly with their old-name partners once column padding is
normalised (0 removed lines without an old name, 0 added lines
without a new one).  data/isl-timers.txt reproduces the same
675/675, 11.2 % control, 82/1 and identical histograms, which is
what shows the rename is cosmetic.

Also withdraws a label from the previous commit: sub_8230C398 is NOT
the message pump.  It runs every frame but drains nothing -- a state
machine on [0x828E1F8C] that only allocates, builds strings, looks up
and PUSHES.  And bus+8216 is weak evidence: sub_82254A08 is a generic
map find with ~120 sites, and the key looked up is a pointer, not a
tag.  The open handle is now the ring buffer at bus+4, not bus+8216.
This commit is contained in:
Sylpheed RE agent
2026-08-27 09:21:04 +00:00
parent bf17f19f67
commit b86c8c82ba
10 changed files with 153 additions and 106 deletions

View File

@@ -1,12 +1,14 @@
# The 32 per-phase stopwatches -- set_flag / read_freg / clear_flag vs the timeline
# The 32 per-phase stopwatches -- stopwatch_start / _elapsed / _stop vs the timeline
Written by hand from tools/re-capture/isl.py; see docs/re/structures/isl-timers.md.
(Built-ins 8 / 9 / 93; the corpus called them set_flag / read_freg / clear_flag
until the reading below showed they are a stopwatch bank.)
Claim under test: `[phase+88][i]` only advances while `[phase+120][i] == 1`,
and built-in 8 is the only thing that sets that flag. So every timeline
entry's `kind` must be an index its own phase starts, or the entry is dead.
file phase set_flag(i) started read_freg(i) timeline kinds
file phase stopwatch_start(i) stopwatch_elapsed(i) timeline kinds
Stage01.ssb 1 [0, 5, 14] [0] {0: 27, 5: 3}
Stage01.ssb 2 [0, 5, 14] [0] {0: 24, 5: 3}
Stage02.ssb 1 [0, 5, 8] [0, 8] {0: 21, 5: 4}
@@ -54,8 +56,8 @@ Stage29.ssb 1 [0, 5] [0] {
timeline entries whose kind is started in the same phase : 675 / 675 = 100.0%
entry-weighted control (a random index in 0..31) : 11.2%
read_freg indices started in the same phase : 82 yes / 1 no ['Stage06.ssb ph1 read_freg(15)']
stopwatch_elapsed indices started in the same phase : 82 yes / 1 no ['Stage06.ssb ph1 stopwatch_elapsed(15)']
set_flag argument histogram: {0: 44, 1: 10, 2: 1, 4: 2, 5: 38, 6: 2, 7: 2, 8: 5, 9: 2, 10: 4, 11: 2, 12: 1, 13: 1, 14: 21, 15: 24, 16: 1, 17: 3, 18: 3, 19: 2, 20: 2, 21: 2}
read_freg argument histogram: {0: 105, 1: 13, 2: 2, 4: 1, 6: 2, 7: 2, 8: 5, 9: 2, 10: 3, 11: 2, 12: 3, 13: 1, 14: 5, 15: 28, 16: 1, 17: 3, 18: 3, 19: 2, 20: 2, 21: 2, None: 31}
clear_flag argument histogram: {-1: 133}
stopwatch_start argument histogram: {0: 44, 1: 10, 2: 1, 4: 2, 5: 38, 6: 2, 7: 2, 8: 5, 9: 2, 10: 4, 11: 2, 12: 1, 13: 1, 14: 21, 15: 24, 16: 1, 17: 3, 18: 3, 19: 2, 20: 2, 21: 2}
stopwatch_elapsed argument histogram: {0: 105, 1: 13, 2: 2, 4: 1, 6: 2, 7: 2, 8: 5, 9: 2, 10: 3, 11: 2, 12: 3, 13: 1, 14: 5, 15: 28, 16: 1, 17: 3, 18: 3, 19: 2, 20: 2, 21: 2, None: 31}
stopwatch_stop argument histogram: {-1: 133}