128 lines
7.7 KiB
Markdown
128 lines
7.7 KiB
Markdown
# Practice RETURN position and independent Jimmy checkpoint
|
|
|
|
Read-only static recovery, 2026-10-25. Neutron.exe SHA-256:
|
|
f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8.
|
|
Text/data VAs below map to file offsets VA-0x400000. The distinction between
|
|
Jimmy's complete object and its interface at complete+C0 is essential here.
|
|
|
|
## Three separate pieces of state
|
|
|
|
| Complete-object fields | Recovered purpose | Evidence |
|
|
| --- | --- | --- |
|
|
|+724/+774|Current/requested STRT and secondary saved string|43B6A7..43B6E0, TSK writer460057..46006F|
|
|
|+88C/+8F0|RETURN level filename and STRT strings|43B6F8..43B758, LOAD457FB9..45815C|
|
|
|+9A8/+9AC/+9B0/+9B4|Saved departure root, fourth vector component; first three floats serialized as TSK StoredVector|43B7B1..43B7CC, writer46008B..4600B0, reader460B9E..460BBA|
|
|
|+954|Suppress the matching STRT's initial trigger once|RETURN458014, STRT4427F2..44282A/442887..4428AD|
|
|
|+9A5|Preserve saved departure root during RETURN staging and restore it on PostLoad|RETURN458028, transition43B78E..43B7CF, Jimmy423A90..423B24|
|
|
|+1E38..+1E47 and+1E48|Independent Jimmy checkpoint root and level FourCC|42AF00..42AF4E and42AF50..42AFB7|
|
|
|
|
The earlier unknown TSK StoredVector can now be identified as the saved transition
|
|
departure root. It is not Jimmy42AF00's+1E38 checkpoint and is not an arbitrary
|
|
full save of the current player position. Existing wire names and layout remain
|
|
unchanged; unknown values still round-trip without normalization.
|
|
|
|
## Ordinary departure captures the live root
|
|
|
|
Jimmy complete vtable4A3BDC+168 points to Player43B5A0. After staging all four
|
|
level/start strings,43B78E checks byte[complete+9A5]. If zero,43B798..43B7A9 invokes
|
|
the player interface's virtual310 root getter.43B7B1..43B7CC copies its16 bytes to
|
|
complete+9A8. If9A5 is nonzero, the branch jumps directly to43B7CF and retains the
|
|
previous root. The routine then schedules level loading through game virtual100
|
|
at43B7E1..43B7F1. No yaw, camera or full physics state is captured by this block.
|
|
|
|
The practice Yes branch4046AF stages VR04/PHONEBOOTH with current level/STRT as
|
|
return strings. The saved root must therefore be captured when accepting the
|
|
practice transition, from the live player root at that point. Merely keeping
|
|
the original STARTEXP coordinates cannot reproduce RETURN placement.
|
|
|
|
## RETURN preserves and restores that root
|
|
|
|
LOAD's RETURN branch calls Jimmy's gadget cleanup slot178 at457FF7, sets
|
|
complete+954 to1 at458014 and complete+9A5 to1 at458028. It resolves the stored
|
|
return strings and calls the same transition virtual168 at45815C. Since9A5 is
|
|
already set,43B5A0 does not replace the lab's saved root with the tutorial exit.
|
|
|
|
Jimmy PostLoad first applies the requested STRT's authored position and rotation.
|
|
At423A90 it tests interface+8E5 (=complete+9A5). When nonzero it clears the byte
|
|
at423A9E, passes interface+8E8/8EC/8F0 (=complete+9A8/9AC/9B0) to the root setter
|
|
virtual16C at423ABF, and updates the attached companion root at423AE3..423B1E.
|
|
The pending return flag is consumed. The requested STRT's authored yaw remains;
|
|
there is no separate saved departure yaw in this path.
|
|
|
|
The companion receives the **identical saved root**, with no added offset. At
|
|
423AE3..423B09 the16-byte stack argument is copied directly from
|
|
interface+8E8/+8EC/+8F0/+8F4. The receiver at[interface+95C] is Jimmy complete+A1C,
|
|
the Goddard complete pointer created by423C98->41C810 and stored at423CAE.
|
|
423B12 addsC0 and423B1E calls Goddard interface+168. Goddard's vtable49F480+168
|
|
is471680, which forwards the XYZ components unchanged to virtual16C=471630,
|
|
the ordinary root setter. No rotation is passed. Restore the available Goddard
|
|
actor to the same saved root as Jimmy; let his own130*.3 support settle his Y
|
|
afterward rather than adding a gstart/forward offset. Goddard follow-state4
|
|
behavior remains independently incomplete.
|
|
|
|
STRT PostLoad compares its tag with player complete+724 and checks complete+954.
|
|
When that flag is set,4427F2..44280D clears it without scheduling the initial
|
|
trigger or clearing player control. Without the flag,442819 sets its deferred
|
|
trigger byte and44282A clears control. The alternate no-valid-trigger path also
|
|
clears954 at442887..4428A4. Returning to STARTEXP must suppress LABEXP entirely;
|
|
fast-forwarding the intro would still execute its authored actor/task effects.
|
|
|
|
## Why the TSK vector is the same departure root
|
|
|
|
The writer45FEE0 finds JIM1 with474070 at460043. That lookup returns the animated
|
|
interface, so its three float writes from+8E8/+8EC/+8F0 at46008B..4600B0 correspond
|
|
to complete+9A8/+9AC/+9B0. The loader explicitly converts controlled interface to
|
|
complete by subtractingC0 at460A79, reads three floats at460B6F..460B9C, and writes
|
|
complete+9A8/+9AC/+9B0 at460BA3/460BAD/460BBA. This resolves the apparent different
|
|
offsets on the two sides of the wire format.
|
|
|
|
The wire format does not serialize954/9A5. An explicit scan of the supplied EXE's
|
|
9A5 and interface8E5 operands finds constructor reset4376C8, staging check43B78E,
|
|
RETURN setter458028 and PostLoad test/clear423A90/423A9E. Direct TSK loader4603F0
|
|
does not itself set the pending-return flag. The current fresh --load-save STRT
|
|
spawn policy therefore stays separate from a live RETURN continuation; a stored
|
|
nonzero vector alone must not force player placement or suppress scene triggers.
|
|
Broader menu/load paths and original runtime comparison remain unverified.
|
|
|
|
## The independent pickup checkpoint remains separate
|
|
|
|
Jimmy complete vtable+1E8 points to42AF00. It captures the current game level
|
|
FourCC at complete+1E48 and root at complete+1E38.42AF50 repeats that capture and
|
|
calls an attached effect callback. The lab jet pack pickup invokes42AF00 before
|
|
SCENE35->50 and opening practice. No consumer of those two capture fields has
|
|
been established by this recovery. Their exact future use must not be invented
|
|
from the name checkpoint or conflated with RETURN/TSK departure state.
|
|
|
|
## Implementation and tests
|
|
|
|
Game/RuntimeCheckpoint.Stage(storedRoot,currentRoot,returning) selects the live
|
|
root for an ordinary departure and preserves the stored root for RETURN. Its
|
|
Returning and ActivateStartTrigger flags describe only that transition; they are
|
|
not serialized. Finite input checks reject invalid runtime state while preserving
|
|
all finite original coordinates. Source consumers still own scene loading,
|
|
root/companion placement and trigger scheduling.
|
|
|
|
```
|
|
source scripts/env.sh
|
|
dotnet run --project tests/GamePort.CheckpointTests -- ../Original
|
|
```
|
|
|
|
The test checks decisive original instruction bytes/vtable addresses, independent
|
|
checkpoint versus return offsets, a lab->serialized VR04->RETURN lifecycle, and
|
|
all12 original TSK byte round-trips. Runtime integration now carries RETURN identity
|
|
through SceneContinuation, captures live roots when requesting ordinary transitions
|
|
and writes them into TSK snapshots. LabSimulation restores exact XYZ without floor
|
|
snapping; SceneDirector suppresses the STRT trigger rather than fast-forwarding it.
|
|
Goddard receives the same root with his rotation retained.
|
|
|
|
`dotnet run -- --headless --smoke-practice-return` exercises lab -> VR04 -> lab with
|
|
three actual renderer initializations. It walks45 input steps before departure,
|
|
then uses explicit source pickup/exit contacts (not a navigation replay). The saved
|
|
departure differs from STARTEXP by more than100 horizontal units; RETURN must
|
|
restore that exact root and the companion, retain yaw155 and have control with no
|
|
active intro. These assertions occur before the returned scene's first physics
|
|
tick, keeping placement distinct from support settling. Movement/director tests
|
|
also check unsupported-root settling and one-time trigger suppression.
|
|
Static recovery and managed/headless checks do not establish original or native
|
|
Windows runtime fidelity. Complete companion follow-state behavior remains open.
|