JSRF HANDOVER -- THE BLACK SCREEN WAS A LOST `pop esi`, AND THE TITLE NOW
                 REACHES THE CORN TUTORIAL UNATTENDED
Date: 2026-09-13 (Europe/London), morning
From: Claude.

Supersedes CLAUDE_HANDOVER_2026-09-12_THE_IDLE_LOOP_FREEZE.txt on its central
claim. That handover's task list was right and its diagnosis was not.


0. THE ONE-LINE ANSWER
======================
Nothing ever set m_bFatal. CActMan::Idle's `this` was a CODE ADDRESS, because
a switch dispatcher's arms were never translated and the arm's `pop esi` never
ran. Three translator fixes later the title reaches the Corn tutorial with
nobody at the machine, zero ABI violations, rendering and presenting.


1. WHAT LANDED (three commits on main)
======================================
68569e8  RECOMP_PAD_SCRIPT -- a timed press schedule.
    "12:START 13.5:START 15:A", or @file. t is measured from xbox_InputInit,
    not the first poll. MERGES with a live controller rather than replacing it,
    and reports port 0 connected with no hardware attached.
    run_scripted.sh drives it; JSRF_BIN selects the binary.

b8abfea  RECOMP_SEQ_TRACE -- the title's own top-level state, by name.
    CActSequence::m_dwNextMethod at +0x48, dispatched through the 64-entry
    table at guest 0x0020D2B8. All 64 names come from the decompilation and are
    CHECKED against the live table on the first poll; a mismatch suppresses the
    names rather than lying. One host thread, 100 Hz, prints on change only.

d013f03  A function must contain its own switch arms.
    Two defects, both stopping a dispatcher absorbing its arms. See section 3.


2. THE FREEZE, AND WHY 12 SEP GOT IT WRONG
==========================================
12 Sep concluded "so m_bFatal is set" from /usr/bin/sample finding the guest in
CActMan::Idle's readInput/Sleep arm. The sample was right. The inference was
not: the arm runs when MEM32(esi+0x24) is nonzero, and esi was not the object.

Probes on BOTH arms, the healthy one as the positive control:

    00013F97 this=040D3A70 field=00000000 calls=2792   healthy
    00013FA0 this=00013B24 field=6AF88B00 calls=6385   freeze

0x00013B24 is the return address pushed for the call at 0x00013B1F. With
RECOMP_ABI_CHECK armed the cascade falls out in one run, innermost first:

    [ABI/I] sub_0006D770: esp(epilogue never ran)
    [ABI/C] sub_00011070: esi 0492E2F0 -> 0001108A
    [ABI/C] sub_000123E0: esi 040D3A70 -> 000124C3
    [ABI/C] sub_00013A80: esi 040D3A70 -> 00013B24

THE LESSON, and it is the same one as 12 Sep's section 4: a counter that says
"the flag is set" is only as good as the pointer it was read through. The fix
was to probe both branches and record `this`, not the field.


3. THE TRANSLATOR DEFECTS
=========================
(a) LATER ARMS OF A CARVED RUN. 289f21f drops a switch's first arm. That alone
    leaves the dispatcher ending at the jump, so arm 1 is owned by arm 0, arm 2
    by arm 1, and the dispatch is outside every one of those owners. New test:
    walking back from the arm to the function holding the dispatch, everything
    crossed is an entry of the SAME table. Asked in the classifier AND in the
    interior gate -- a seed the gate turns away is never classified.
        switch_arm drops 533 -> 1333; carves 35 -> 17, all 17 16-aligned.

(b) STALE ALIAS EXTENTS. Every pass recording an alias extent runs before
    _pass_demote_interior_seeds rebuilds the function set. A body is
    re-measured only when its end is PROVABLY wrong: it contains a
    `jmp [reg*4+table]`, the table resolves, and arms lie outside the body
    dispatching them. A function cannot end at its own switch and exclude its
    own cases -- and while it does, _analyze_switch_table refuses the table
    (it needs func_start <= arm < func_end), so the arms are never translated.

THREE THINGS I GOT WRONG IN (b), each settled by measurement:
  * The clamp counted ALIASES as boundaries. An alias is an alternate ENTRY
    into a body, not a boundary -- _build_alias_entries overlaps them
    deliberately. Cost: 198 of 200 dispatches lost their arms.
  * With no clamp at all the walk ran away, exactly as 289f21f documents:
    49 of 124 bodies crossed a real start and became overlapping duplicates.
  * The trigger looked only at the body's LAST instruction. A body cut AFTER
    its dispatch and still short of its arms is skipped entirely. That left
    156 of 161 cases untouched, sub_00114A80 among them.


4. WHERE THE TITLE IS NOW
=========================
Unattended, one schedule, no human:

    logos -> title -> New Game -> Corn tutorial (live=61), HELD for 250 s
    ABI violations reaching the tutorial:  4 -> 0
    dispatches whose arms fall outside:  276 -> 154
    framebuffer: presenting ~202,000 nonzero, changing
    +7930/+7934 = FFFFFFFF (in-tutorial marker), m_bFatal=0, not paused

sub_0006D770  22 -> 488 bytes    sub_0007E550  37 -> 314
sub_000F8B10  68 -> 1408         sub_00114A80  692 -> 1296

CONTROL PRESERVED, read-only, with CONTROL_README.txt:
    gen.freeze-repro/          pre-regeneration tree
    jsrf_first_fault.CONTROL   its binary
    build-ab/                  its build dir


5. THE OPEN ITEM
================
The tutorial does not advance. It holds live=61 (cutscene) and never reaches
65 (gameplay). On screen the prompt reads "Press the" and stops; the strings in
the XBE are COMPLETE ('Press the A Button!' at 0x001D2758), so the truncation
is in rendering or in a progressive reveal, not the data. Dialogue DOES advance
-- a scripted A every 8 s walked through several lines -- so input reaches the
tutorial. 13,876 nonneutral polls with a human on the pad did not move it.

THAT MEASUREMENT IS NOW DONE, and it came back CLEAN.

JSRF_STARTUP_ABI_CHECK arms ONLY recomp_0000.c, so every violation seen earlier
in another chunk was an INDIRECT call caught by the armed kernel layer, and
direct-call clobbers outside chunk 0 had been invisible all session. Rebuilt
with JSRF_ABI_CHECK_ALL=ON and run to the tutorial, the whole path reports FOUR
violations and all four are the CRT signatures already called expected on
12 Sep:

    sub_0017CAB0  esp delta -6032          __chkstk's stack probe
    sub_0017D1F8  esp(epilogue never ran)  __SEH_prolog
    sub_0017D231  ebx esi edi, esp +140    __SEH_epilog
    sub_001816B0  ebx, esp +20             icall targets all FE0000xx

So there is NO unexplained register clobber left on the path to the tutorial.
The 154 remaining dispatches whose arms fall outside their body are either not
executed here or do not clobber. Do not spend the next session on them
expecting the tutorial to move.

AND THE GUEST IS NOT HUNG. Kernel calls climb 913,139 -> 921,107 between two
reports and the pusher keeps acking (12,896 -> 13,055). The frame loop runs and
re-presents the same image. This is a state the title will not leave, not a
stall in our translation.

SO THE TUTORIAL IS A GAME-LOGIC OR RENDERING PROBLEM, and it is very likely the
one already on file: the CPlayer animation gate (Corn is object id 45, id 44 is
static by design) and the 17x update asymmetry between the two CPlayers. Those
leads were recorded when reaching the tutorial cost a human playthrough. They
are now reachable unattended, in about 50 seconds, with one schedule.


6. RULES PAID FOR THIS SESSION
==============================
  * A predicate over a function body must consider the WHOLE body. I reasoned
    from the last instruction twice and was wrong twice.
  * An A/B is only an A/B if one variable moved. I attributed a dead title
    screen to the gen tree when the controller had been unplugged at the same
    moment; the correlation held over five runs and was still a coincidence.
  * "Only real starts clamp" is not a heuristic, it is the definition of an
    alias. Deriving it from the concept would have been faster than the 198/200
    measurement that eventually forced it.


7. THE TUTORIAL STALL, TRACED (added later the same day)
========================================================
Reaching the tutorial unattended made this cheap, so it was worked properly.
Every measurement below had a control run against the untouched binary first
and was REJECTED if progression to the tutorial differed. Three were.

WHAT THE FRAME IS DOING
    Corn's exec virtual keeps being dispatched -- 2550, 2815, 3081, 3348 over
    successive reports -- so this is not an update-selection gate above
    CPlayer. 16 of 27 registered objects change every report, both CPlayers
    among them, and the changing set is identical each time. "Corn is frozen"
    was wrong; only the state indices and the pose blocks are pinned.

THE STRUCTURE, from the binary rather than from memory
    CPlayer vtable      0x001CCFF8
    slot 1 (exec)       sub_00080340       <- what the walker dispatches
    slots 4,7,8,10,11,13,14 = 0x00011C90   <- every non-Default mode IS a nop

THE TWO PREDICATES, both inside sub_00080340
    0x00080340:  eax = [this+0xE50]
                 if (eax <  0x14) <timer path>
                 if (eax <= 0x1A) skip          <- taken, every frame
    0x00080407:  eax = [this+0x2D0]
                 if ([eax+0x38] == 0) goto 0x0008066E
                                                <- taken, every frame; jumps
                    past +0xCB0, +0xCA4, +0x13C.. and the +0xCE0 loop

    Measured from the first frame the tutorial scene exists:
        id=44  e50=23  r2d0=04839950  r38=0
        id=45  e50=25  r2d0=04846280  r38=0
    The resource pointer is VALID; the field inside it is zero and stays zero.

WHAT IS ACTUALLY ABSENT, at 64-byte resolution
    id 44 changes exactly blocks 0C80 and 1340 -- which is where xemu's
    reference puts its only two moving dwords (+0xC94, +0x134C). The control
    behaves correctly, so the instrument is not dead.
    id 45 changes 0C80, 11C0, 1440, 1600..17C0 and NOT 0CC0..0DC0, NOT
    12C0..13C0, NOT 1480..14C0 -- the +0x0CE0..+0x0DE4, +0x12C0.. and
    +0x1484.. groups the 11 Sep xemu differential named. Positive control for
    the absence: 0C80 moves on the same object, 96 bytes below a block that
    never does.

WHAT THE SKIPPED LOOP IS, and why the first reading was too strong
    sub_0014C340 is a three-float VECTOR ADD, not a copy:
        for (i = 0; i < 21; i++)
            (this+0xCE0 + i*12).xyz += ([this+0x2D0]+0x3C).xyz;
    So +0xCE0..+0xDDC is 21 positions translated by ONE delta, and [res+0x38]
    gates whether the delta is applied. Zero there is consistent with "this
    character is not moving", which in a cutscene may be CORRECT. The pose gate
    is therefore probably a SYMPTOM of the parked state, not a second defect.

THE STATE BAND
    +0xE50 in 0x14..0x1A is written by one contiguous family, and nothing else
    writes those values:
        sub_0009C4D0 0x14   sub_0009C550 0x15   sub_0009C600 0x16
        sub_0009B2D0 0x17   sub_0009B350 0x18   sub_0009B3E0 0x19
        sub_0009B4B0 0x1A
    The 0x17 and 0x19 setters -- the two parked values -- are both called from
    sub_000A76E0, a 3000-byte function at .rdata vtable slot 0x001CD574, i.e. a
    virtual on a class OTHER than CPlayer. +0x11C reads 170/171 for ids 44/45,
    the same pair recorded on 10 Sep.

NEXT, AND IT IS A REFERENCE QUESTION NOT A STATIC ONE
    Ask xemu what +0xE50 is for Corn at the same moment.
      * If xemu also shows 25, the state is right and the fault is in what the
        state's handler does -- keep going down from sub_000A76E0.
      * If xemu shows something outside 0x14..0x1A, the fault is in how the
        state was chosen, and the 0x09/0x0A family is where it should have
        gone instead.
    +0xE50 is now a cheap proven marker readable from the existing hook at
    0x00011083, so this is one run per side.

STILL OPEN, and deliberately not answered: whether Draw is called for Corn. It
needs a second walker hook, which the one-probe discipline ruled out. The
vector-add reading makes a pure render fault unlikely, but that is an inference.

INSTRUMENT NOTES, because two of these cost runs
  * jsrf_func_arg does a LINEAR SCAN of up to 384 entries per call. At two hot
    CPlayer sites it perturbed the guest enough that the title stopped
    responding. jsrf_func_hit is a direct-mapped O(1) increment; prefer it.
  * RECOMP_OBJECT_DUMP writes a JSON file per report. At any cadence fast
    enough to bracket the stall the I/O stalls the title (live=157, not 61 --
    twice). Its 128-file cap was also spent before the tutorial loaded, on
    EMPTY dumps, because it carried its own bare-range root check instead of
    the low-16 rule. Both fixed, but for "what is still changing" use
    RECOMP_OBJECT_ACTIVITY / RECOMP_OBJECT_BLOCKS, which write nothing.


8. G1 ANSWERED BY XEMU, AND IT KILLS THE LEADING HYPOTHESIS
===========================================================
xemu, US ISO, at the Corn tutorial on the "This is the GG's Garage" beat, read
through the GDB stub with diagnostics/jsrf_first_fault/xemu_cplayer_state.py.

FIELD FOR FIELD, XEMU IS IDENTICAL TO US:

                  ours                        xemu
    scene         live=61 seq=30              live=61 seq=30
    id 44         e50=23 s11c=AA r38=0        e50=23 s11c=AA r38=0
    id 45         e50=25 s11c=AB r38=0        e50=25 s11c=AB r38=0

and static across three samples over six seconds on BOTH sides -- while Corn is
visibly animating in xemu (two screenshots, different arm poses).

So both of the predicates found in section 7 are CORRECT BEHAVIOUR:
  * +0xE50 parked in 0x14..0x1A is what the real console does here.
  * [[this+0x2D0]+0x38] == 0, skipping the sub_00080340 pose writes, is what
    the real console does here.
Neither is the fault. The 0x14..0x1A band and sub_000A76E0 are exonerated, and
the plan in JSRF_GOALS_2026-09-13 branch one is dead.

WHERE THE ANIMATION ACTUALLY COMES FROM, same beat, 64-byte blocks, 3 s apart:

    xemu id=45   30/96 changed: 09C0 0C80 0CC0 0D00 0D40 0D80 0DC0 0E80
                                11C0 1200 12C0 1300 1340 1380 13C0 1400
                                1440 1480 14C0 1540 1580 15C0 1600 1640
                                1680 16C0 1700 1740 ...
    ours id=45   10/96 changed: 0C80 11C0 1440 1600 1640 1680 16C0 1700
                                1780 17C0
    xemu id=44   26/96 changed (including 0CC0..0DC0)
    ours id=44    5/96 changed: 0C80 1240 1280 12C0 1340

xemu writes +0x0CE0..+0x0DC0 -- the transform block -- WITH r38 == 0 and e50 in
the skip band. The loop at 0x000804A1 is therefore correctly skipped on both
sides, and A SECOND, SEPARATE WRITER OF +0xCE0 EXISTS THAT RUNS IN XEMU AND
NEVER RUNS IN OURS. Both CPlayers animate there; neither does here.

That second writer is the target. It is not reachable by grepping for a literal
"+ 0xCE0" -- section 7 already showed no RECOMP_MEM_WRITE32 targets it, and the
known 0x804A1 loop writes through a computed pointer via sub_0014C340.

HOW I BROKE THE ORACLE, so the next session does not
    A GDB write watchpoint (Z2) on Corn's +0xCE0 was accepted with OK and then
    never trapped in 20 s. Reading registers while the guest was running
    desynchronised the stream, and the stub then refused new connections --
    exactly the failure xemu_rsp.py's own docstring warns about in its first
    paragraph. The port stays LISTENing with a dead peer; xemu must be
    restarted and the tutorial replayed.

    Do not send `g` or any register read unless a stop reply has actually been
    received. Probe with a memory read first, and if a watchpoint does not trap
    within a few seconds, remove it with z2 BEFORE touching anything else.
    Better: the block-delta method above needs no watchpoints at all and got
    the whole answer.
