Trace post-skip tilt and gate gameplay changes on original lifecycle recovery

This commit is contained in:
UnixNight committed 2026-11-05 22:14:49 -05:00
1 parent a2e89c625a
commit 68154dffce
15 files changed
+752 -6

No files matched your search

+6 -2
View File
@@ -38,8 +38,12 @@ other agents' active changes. Keep updates concise, save detailed evidence to di
Use bounded endian-aware parsers, portable paths, clear C#, deterministic tests, Use bounded endian-aware parsers, portable paths, clear C#, deterministic tests,
and explicit unmanaged ownership. Build frequently. Update `docs/progress.md`, and explicit unmanaged ownership. Build frequently. Update `docs/progress.md`,
`docs/tasks.md`, `docs/decisions.md`, and compatibility evidence before transitions. `docs/tasks.md`, `docs/decisions.md`, and compatibility evidence before transitions.
Current priority (2026-11-05): user pauses gadget expansion and returns to Jimmy Current direction (2026-11-05): user requests decompilation before further
movement stabilization. Preserve current movement as baseline; do not substitute implementation. Keep runtime/package baseline a2e89c6/dae13ac unchanged while
recovering Carl's skip-to-idle lifecycle; current entry reset does not close the
post-skip tilt bug. Trace original state ownership/update order before another
movement reset or scheduler change. See docs/gameplay/jimmy-cutscene-decompilation.md.
The broader priority remains Jimmy movement stabilization, with gadgets paused. Preserve current movement as baseline; do not substitute
JN-Engine native/Godot movement. Use its original decompiler index only as leads, JN-Engine native/Godot movement. Use its original decompiler index only as leads,
verified with REA/authoritative originals. See docs/gameplay/jimmy-movement-stabilization.md. verified with REA/authoritative originals. See docs/gameplay/jimmy-movement-stabilization.md.
The prior collision work is resumed where needed for movement; preserve the The prior collision work is resumed where needed for movement; preserve the
+6
View File
@@ -1,5 +1,11 @@
# Core architecture coverage map # Core architecture coverage map
2026-11-05 follow-up: camera-entry reset is verified, but post-skip neutral idle
remains a port bug. CONTROL/INPUT/skip coverage is reopened around Carl's full
lifecycle;48 port traces and additional original boundaries are documented in
[the focused decompilation checkpoint](../gameplay/jimmy-cutscene-decompilation.md).
No further gameplay change is made before its source-ownership gate is closed.
2026-11-05 handoff correction: CAM/MCA destination state at game+274 is now reset 2026-11-05 handoff correction: CAM/MCA destination state at game+274 is now reset
along with current Euler (20 original-component cases; managed/native Linux along with current Euler (20 original-component cases; managed/native Linux
handoff checks). Neutral ground input separately retains residual bank in seven handoff checks). Neutral ground input separately retains residual bank in seven
+8
View File
@@ -1,5 +1,13 @@
# Compatibility and validation # Compatibility and validation
Post-skip tilt is still open (2026-11-05). User original comparison specifically
identifies skipping Carl; the previous validation covered entry and held movement
on resume, not subsequent idle. A48-case managed port diagnostic isolates stale
mode/turn republishing a bank target in fresh order. New original skip/control/
registration evidence is documented, with its causal gap explicit. Gameplay
changes are paused; packages remain dae13ac. See
[focused decompilation](gameplay/jimmy-cutscene-decompilation.md).
Rotation handoff feedback (2026-11-05): CAM/MCA clear both live and destination Rotation handoff feedback (2026-11-05): CAM/MCA clear both live and destination
pitch/bank while preserving current yaw/dirty.20 isolated original cases compare; pitch/bank while preserving current yaw/dirty.20 isolated original cases compare;
managed real banked-jump handoffs and native Linux control restoration pass. managed real banked-jump handoffs and native Linux control restoration pass.
+8
View File
@@ -356,3 +356,11 @@ assets and generated packages stay excluded.
residual destination bank in seven source trajectories; no unproven universal residual destination bank in seven source trajectories; no unproven universal
landing snap is added. Another whole-frame writer or original quirk remains landing snap is added. Another whole-frame writer or original quirk remains
open. See gameplay/jimmy-rotation-handoff.md and its two source reports. open. See gameplay/jimmy-rotation-handoff.md and its two source reports.
52. **Recover full cutscene lifecycle before further symptom fixes.**
User redirects work to decompilation first after confirming a distinct
post-skip idle bank. Preserve the current runtime/packages; diagnose and
document original entry/contact/skip/control/input ordering before resetting
movement fields or changing the scheduler. Current source/component findings
do not yet explain the whole-original upright return. See
gameplay/jimmy-cutscene-decompilation.md for the recovery gate.
@@ -0,0 +1,65 @@
# Laboratory trigger and skip callback order
2026-11-05. Static original source/data recovery; gameplay changes are paused.
Original EXE identity and retained REA Evidence are recorded in
[jimmy-cutscene-return-source.md](jimmy-cutscene-return-source.md).
`tools/binary/jimmy_cutscene_chain.py` verifies PE-mapped offsets, calls, virtual
bindings and supplied GAM fields; generated output is
artifacts/jimmy-cutscene-return/source-contracts/chain.json.
## Actual lab records
| Record / file offset | Source chain |
|---|---|
|3MCA neutron1a, GAM index7, E0B|Five active targets, beginning with JIM1, then Carl, Carl, Jimmy, Carl. PlayerControlledJIM1 is the completion target; DeactivateInv1; TargetDeactAnimSTOP; NextTriggercarlwalk.|
|3AIT Carlwalk, index10,1AFD|AITargetC3DCARL, AIState3, no new position/yaw, PlayerControllednone, NextTriggerdefault. This record does not restore an old Jimmy transform.|
|3AIT teleportexplanation,index34,6756|Touch activation byjim1, SCENE30 invokes te1; PlayerControllednone; te1→te2→TE3→te4→te5→default. This is a different entry path from Carl's friend talk.|
GAM hash316fff40db565c2add5b07cbccdef640ddb67c64d6625fea1429ce2a0542a234.
All tags are looked up case-insensitively as in the existing bounded parser.
## Original partial order
Viewport47E554 calls global physics479BC0 before registry473740 at47E582.
Physics invokes dynamic pair processing47A430 at479C83. Its enter callbacks
47A555/47A578 dispatch slot40 before the later registry traversal.
- An AI trigger's interface is complete+C8:48F8C0+40→40C200, then40C21F
synchronously dispatches40C300. A trigger can therefore activate a camera
during the contact pass, before the game's ordinary input callback.
- Carl's interface is complete+C0:495364+40→40A3C0. Its AI contact state may
become0. The friend update41B950 first calls408000, then41B972..41B988
invokes talk when the resulting state is0. In the fresh registry partial
order, Carl follows Jimmy. Contact and actual conversation activation are
separate boundaries.
- Talk41B7B0 obtains a matching trigger, invokes Carl's progress callback,
then41B7D8 dispatches the chosen trigger. Carl413E50 calls41B810 first
(+100 score and **Carl's**410 preparation), then advances SCENE50→60.
This does not by itself establish a Jimmy movement reset.
- MCA update is game interface+C8 table4A8F64+3C4→430DA0. Natural completion
and skip have different branches; skip writes Jimmy's action latch and
shared skip flag before completing through4A93C8+E4→4311F0.
- Source registry473740 dispatches each object's slot10 at473758. Actor
insertion order matters for same-frame control changes. Fresh and retained
routes must not be collapsed into a single assumed order.
The port's director.Touch/SceneInteractions calls occur after the combined
player update in Program. This is a documented scheduling approximation; it
cannot prove the original starts a conversation with identical support/mode/
turn state. The original dynamic admission/support and callback positions need
comparison before that difference can be called the tilt's source cause.
## Missing proof and next trace
The user specifically reports **skipping Carl**, not a measured natural-end
comparison. The diagnostic also reproduces natural-end failures in the port,
but that is not evidence about original natural completion. Required original
trace points are: physical contact, final Jimmy callback before activation,
MCA entry, accepted skip, completion/DEFAULT, next game input and next Jimmy
update. At each point record raw owner, support, mode, turn, current/target
Euler, dirty and input suppression/latches. This will distinguish an entry-state
mismatch from a return/scheduling mismatch.
Current static conclusions and managed traces are useful evidence, but neither
supplies a source-justified reset location. No gameplay change is introduced by
this report or its read-only guard.
@@ -0,0 +1,80 @@
# Focused decompilation checkpoint: cutscene lifecycle
2026-11-05. User redirects work toward understanding the original before further
implementation. Preserve runtime baseline a2e89c6 and packaged runtime dae13ac.
No src/, regression test, build script, original or packaged binary changes are
part of this checkpoint. New work is read-only diagnostics and source findings.
## Confirmed requirement and corrected coverage
User comparison confirms ordinary landing can leave Jimmy banked in the original.
The reported port-only failure is specifically after **skipping Carl's lab
conversation**: Jimmy must remain upright when control returns, including idle.
The earlier correction proved camera-entry current/destination flattening and
locked continuation. It did not prove resumed **neutral** input stays upright.
Its held movement/jump resumption check cannot certify that missing boundary.
The post-skip bug is open; do not classify it as the original landing quirk.
## Findings this pass
- [48-case port trace](jimmy-cutscene-port-trace.md): all24 fresh-order cases
republish a stale air-bank target on the first neutral input; all24 retained-
order cases remain upright. The player is grounded by return. This isolates
the first port writer, not a source-justified fix.
- [Original return/skip boundaries](jimmy-cutscene-return-source.md): raw control
grants, DEFAULT and no-selection cleanup do not supply the hypothesized mode/
turn reset. Original skip does write Jimmy's shared input latch and a global
skip flag, with per-camera completion/resource behavior absent from the port's
immediate fast-forward model. Its causal role in upright return is unproven.
- [Source chain and registration order](jimmy-cutscene-chain-order.md): the actual
GAM chain is neutron1a→Carlwalk→default. AI trigger contact can dispatch during
physics; Carl contact first sets state, with conversation activation in his
later actor update. The port's post-player contact grouping is an approximation.
- Three fresh REA/Ghidra pseudocode results and the existing full instruction
Evidence corroborate the focused source contracts. DEFAULT's unrecognized
procedure remains an explicit provider gap; assembly/byte guards support the
bounded statements. Complete Evidence is retained locally and sessions closed.
These findings improve the interaction model. They do not establish that the
original enters/ends the scene with the same support/mode/turn values as the port.
No additional rotation reset or blanket ordering switch is implemented.
## Recovery gate before implementation
1. Trace the original Carl route from physical enter to talk activation, then
accepted Escape/Space skip, completion/DEFAULT and the first idle callbacks.
Record support, raw owner, current/destination Euler, dirty, movement mode,
turn, shared skip, action latch and relevant input suppression at each boundary.
2. Close source actor/input ordering for the observed fresh and retained route,
including deferred callbacks and contact/support eligibility. Explain where
the source avoids the demonstrated first stale write. A local no-reset finding
or a synthetic component outcome does not substitute for that explanation.
3. Compare a bounded original composition/runtime trace with the reproducible
port failure. Keep original instructions, inference and user observation
separate. Cover skip and natural end independently; user observation here
specifically concerns skip.
4. Implement only the directly supported missing owner/transition/order after
this gate closes. Verify first idle frame and sustained idle after skip in
both orders, held-input resumption, normal landing bank, and existing scene/
body/fire behavior. Preserve original state rather than clamping every frame.
This is a focused investigation pass, not a requirement to decompile every
level before resuming implementation. Broader movement/contact/animation recovery
continues after its state and verification boundaries are made explicit.
## Verification and remaining work
The source guards for return and chain complete against the original identity;
the managed diagnostic compiles and records48 port cases. Its sources and traces
have SHA256 provenance under artifacts/jimmy-cutscene-return/port-trace/.
Original hashes and production-source identity are verified before publishing
this research checkpoint. Existing packages remain the earlier baseline.
The original skip-to-idle causal explanation remains unresolved; no full original
frame or new native Windows parity is claimed.
Final checkpoint verification: chain guard passes6 direct calls,11 instruction
sites,6 virtual slots,11 ranges and8 actual GAM records; return guard passes12
sites,12 slots and13 ranges. The48-case diagnostic's recorded source/output
hashes match.539 original files remain unchanged. A diff against a2e89c6 confirms
no changes under src/, tests/ or scripts/. These checks do not certify the missing
original skip-to-idle frame; that remains the next source-recovery task.
+106
View File
@@ -0,0 +1,106 @@
# Post-cutscene tilt: existing-port trace
2026-11-05. User confirms ordinary landing tilt also occurs in the original,
but Jimmy must remain upright after a cutscene. The earlier camera-entry fix
does not cover that resumed-idle boundary. Gameplay implementation is on hold
while the full original lifecycle is investigated.
## Scope and reproduction
This is **port runtime evidence**, not execution of original functions or a
decompilation claim. Baseline is `a2e89c6`, with unchanged production sources.
The read-only diagnostic at `tools/recon/cutscene-handoff-trace/` compiles the
existing Assets/Game sources into its own managed executable. It creates the
same synthetic flat-floor player as DirectorTests and runs either a synthetic
CAM or the actual supplied lab `neutron1a` MCA chain with a deterministic
two-second-per-speech clock. There is no GPU, SDL, full original scene collision,
or original executable execution in this diagnostic.
All48 cases complete successfully:
| Input/player order | Cases | Retilt after300 neutral ticks |
|---|---:|---:|
|Input before player update (fresh order)|24|24, approximately ±10 degrees|
|Input after player update (retained order)|24|0|
Each order covers both camera types, Left/Right bank, natural completion/Skip/
explicit DEFAULT, and jump/movement held or released during control lock. Each
case creates eight real controlled banked-jump ticks, triggers the camera,
waits until the body is grounded while control remains NULL, completes the
camera, then supplies **neutral** input for300 ticks. Held input during the lock
does not change the result because input/controller phases remain gated there.
The native camera source recovery belongs to
[camera orientation ownership](jimmy-cutscene-rotation-source.md), not this
managed probe. Its original addresses are not substituted for port execution.
## First stale writer
Representative actual lab MCA case: fresh order, Left bank, natural completion,
released controls during the scene:
| Boundary | Current Euler | Destination Euler | Mode / turn |
|---|---|---|---|
|Before trigger|(343.17676,1.3944445,357.05692)|(-40,1.2,-11.666668)|1 /11.666668|
|After camera preparation|(0,1.3944445,0)|(0,1.3944445,0)|1 /11.666668|
|Grounded during scene and after control returns|(0,1.3944445,0)|(0,1.3944445,0)|1 /11.666668|
|First neutral input publishes|(0,1.3944445,0)|(0,1.3944445,-10.000001)|1 /10.000001|
|End of first resumed player tick|(0,1.3944445,360)|(0,1.3944445,-10.000001)|0 /0|
|End of300 neutral ticks|(0,1.3944445,350.00018)|(0,1.3944445,-10.000001)|0 /0|
The first old-angle write is the resumed input phase, observed through the
existing `InputActions` event after `StepInput` publishes its target. It is not
an old current-Euler vector restored by the director. The director grants
control with the player still upright and facing clean.
In `LabSimulation.Step`, line279 dispatches fresh input before the player update
at line290. `StepInput` selects the air branch using the retained mode1 at
lines481–507, decays the old keyboard turn, and publishes the negative turn as
destination roll. Only later does the supported/released `StepPlayer` reset
mode/turn at lines555–560. Neutral mode0 input then retains the stale destination
because it has no accepted heading update (lines487–491). Consequently the
independent facing phase converges to that bank indefinitely. The first resumed
tick's intermediate360-degree representation is preserved in the trace; the
next tick visibly rotates toward the retained target.
With retained input-after-player ordering, `StepPlayer` resets mode/turn before
input dispatch. That input sees mode0 and retains the already upright target;
the bank never returns. This is a diagnostic distinction, **not evidence that
all scenes should be forced into retained ordering**.
## Evidence files and commands
`artifacts/jimmy-cutscene-return/port-trace/observations.json` retains the48 full
cases and selected boundary snapshots, including current/target/dirty, mode,
turn, speed, support, raw owner, current camera, root, controller and physics
counts. `summary.json` records per-order outcomes, baseline commit, source/harness
SHA256 identities and the observation-file hash. `run.log` records successful
completion. All are local generated outputs.
From GamePort:
```sh
source scripts/env.sh
dotnet run --project tools/recon/cutscene-handoff-trace/CutsceneHandoffTrace.csproj \
-p:NuGetAudit=false -- ../Original \
artifacts/jimmy-cutscene-return/port-trace/observations.json
```
No runtime, regression test, build script, original file or packaged binary is
changed. Parent owns integration and any eventual implementation decision.
## Implication and unresolved original questions
The confirmed port cause is a stale **air turn/movement mode** surviving camera
preparation, then being consumed by the first fresh neutral input. An additional
upright Euler write on DEFAULT alone would not explain or remove this first
writer unless its timing/state ownership also changed. The correct original
boundary must be established before implementing a reset or scheduling change.
Remaining questions belong to the independent original investigations: whether
source control return lets the player update run before input in that same
registry pass; whether camera activation/cleanup changes turn/mode through an
unrecovered callback; and whether the actual trigger/registry ordering differs
from the port's post-player interaction phase. This diagnostic does not answer
those questions or certify that the original returns with the same retained
state. Ordinary landing-idle tilt remains a separate confirmed behavior.
@@ -0,0 +1,99 @@
# Cutscene completion and first resumed input: original boundaries
2026-11-05. User comparison: ordinary landing tilt occurs in the original;
**skipping Carl's laboratory conversation must leave Jimmy upright**. Gameplay
changes are paused for source recovery. The previous camera-entry correction is
preserved; it did not verify neutral input after the scene ended.
Original EXE SHA256:
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
Retained REA full-instruction Evidence:
`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`.
VA400000 is the preferred base; the guard uses PE sections for file offsets
(the cited text offsets equal VA minus400000). Originals are read-only.
## Recovered state owners
| Boundary / VA (file offset) | Original facts |
|---|---|
|Control118→475A40 (75A40)|Load argument, store raw controlled pointer5099E4, return. No actor, movement-mode, turn or orientation reset.|
|DEFAULT447D34..447FC5 (47D34..47FC5)|Restores raw owner through118; handles shared camera eye/UI/music and clears shared skip. Inspected code has no direct Euler/mode/turn reset or Jimmy Init.|
|MCA completion4311F0..43127F (311F0..3127F)|Resolves named PlayerControlled/NULL/none, grants through118, cleans resources and dispatches the next trigger. A grant is not initialization.|
|Jimmy cleanup42AE00..42AE29 (2AE00..2AE29)|Calls complete178, sets game1D65 and global4F8182. No direct movement-mode/turn reset.|
|Selected-gadget cleanup427FF0 (27FF0)|Raw-1 is rejected by the unsigned range guard428027; raw3's table entry also reaches common tail42882F. That tail only restores selected-gadget sentinel-1 and returns. Bubble/vehicle branches have separate policies.|
|Menu prelude405FB0/406590 (5FB0/6590)|The inspected selection/close callbacks manipulate menu resources. They do not dispatch a recovered Jimmy movement reset.|
|Player input438A60 (38A60)|Dispatches by retained game704, after raw-owner and camera-bump gates. Complete124 is ground438BC0;128 is air439900; no derived Jimmy air override supplies a hidden reset.|
|Air target439DB7..439E33 (39DB7..39E33)|Accepted pitch/current yaw/negative stored turn become destination Euler. This is a writer, not a render-only cache.|
|Grounded released controller437BA5/437BAC (37BA5/37BAC)|Clears mode704 and turn614 after the raw-ownership gate. Null ownership therefore leaves these fields retained.|
Jimmy complete object is game interface+C0. Game704/614 correspond to complete
7C4/6D4. Current and destination Euler retain their previously recovered separate
owners. Complete table4A3BDC slots124/128/12C/130/134/140 resolve438BC0/439900/
43A120/437C40/437F90/429910 respectively.
Input callback426030 has independent gates:407060 reads global4F8198,475CA0,
raw owner,4F8430 and game1D2D precede438A60. The bounded camera/default paths do
not establish a special first-resume write to4F8430 or1D2D. Known1D2D writes
belong to hit lock (complete1DED, set42A820/clear42567F). Camera bump7C8 can
suppress dispatch, but no inspected camera/default write proves it is seeded
here. These are ruled-out local explanations, not whole-program absence proofs.
## Skip is a distinct source path
The actual MCA update430DA0 tests a playing sound before entering its skip branch
430EED..431027. Escape509853, Space509858, controller509AC4 or shared skip4F83E4
can request it; nonzero4F8182 suppresses it. The accepted path resolves JIM1,
sets **complete1E00=1 at430F37**, sets **shared4F83E4=1 at430F3E**, stops the
sound, performs target-class/animation cleanup, deactivates the MCA, dispatches
completionE4 at431012, and resets its shot index. CAM has the analogous latch/
flag writes at41613B/416142 and its own completion order.
The Jimmy byte is the shared input-action/menu debounce latch recovered in
[gadget controls](gadget-controls.md), not a recovered orientation-reset flag.
No claim is made that copying this latch alone fixes the tilt. DEFAULT clears
shared skip at447D91 or447F89. The port's immediate SceneDirector.Skip/Drain
fast-forward does not represent these per-actor/registry/input-latch boundaries.
Its earlier comment labeling it an original chain skip overstates that coverage.
## New REA pseudocode and limits
A generated EXE copy was opened by local REA/Ghidra12.1.4. Complete replies,
Evidence export and closed snapshot are in
artifacts/jimmy-cutscene-return/rea-completion/. New successful pseudocode:
| Procedure | Evidence |
|---|---|
|475A40 raw owner setter|ev_3e6ebc517bdc52a7c2cd8af4475b837f2e7126f5a54a45e147356784b4e93eb7|
|438A60 retained-mode input dispatch|ev_77ee22e6d49adc0c983af92ba74273faf5f4daf697ab520ea45d22b08bc11bcb|
|42AE00 cleanup wrapper|ev_2ee50b10018363378445be32df38ab4f6b2125247b69485304867674d5d484da|
DEFAULT entry447CF0 did not resolve to a Ghidra procedure; the provider then
reported the numeric selector as an unmapped file offset. Its complete error is
retained as00.json; no pseudocode is attributed to it. The guarded retained REA
instructions support the DEFAULT statements above. No unchanged retry or claim
that the whole original was executed follows from that provider result.
## Port cause versus original explanation
[The port diagnostic](jimmy-cutscene-port-trace.md) reproduces48 cases. On fresh
input-before-player order, a grounded player returns with retained mode1/turn;
first neutral air input republishes the old bank before the controller clears
mode/turn. On retained order, the controller clears those fields first, avoiding
that writer. This identifies a port cause. It does **not** prove that changing
all scheduling or resetting turn on every control grant matches the original.
The complete original skip-to-idle frame has not been executed or fully closed.
Remaining explanations include exact skip/input suppression, actor callback
placement, contact/support state when the conversation starts and unmodeled
wrappers. User observation takes precedence over assuming the local component
composition describes the whole game. Further source recovery must explain why
the original avoids the stale writer before another runtime patch is made.
## Verification
`tools/binary/jimmy_cutscene_return.py` checks original identity,12 source sites,
12 virtual bindings and13 bounded spans. `jimmy_cutscene_chain.py` independently
checks skip/contact/frame boundaries and actual lab records. Complete generated
reports are under artifacts/jimmy-cutscene-return/source-contracts/.
These are static byte/data checks. The48-case harness is managed port execution;
no new original full-frame or native Windows observation is claimed.
+5
View File
@@ -1,5 +1,10 @@
# Jimmy rotation at script and ground handoffs # Jimmy rotation at script and ground handoffs
Follow-up: the entry fix below does not resolve neutral idle **after skipping
Carl**. User reports that separate port bug and confirms original landing bank
is normal. See [decompilation checkpoint](jimmy-cutscene-decompilation.md) for the
48-case reproduction, original skip findings and the implementation pause.
2026-11-05. User reports jumping at an angle into cutscene triggers leaves Jimmy 2026-11-05. User reports jumping at an angle into cutscene triggers leaves Jimmy
tilted, and a slight tilt can also remain after landing and standing still. tilted, and a slight tilt can also remain after landing and standing still.
+22
View File
@@ -3,6 +3,28 @@
Workflow update: the user authorizes pushing completed, verified commits to the Workflow update: the user authorizes pushing completed, verified commits to the
existing `Gitea/main` upstream from now on. See docs/decisions.md and AGENTS.md. existing `Gitea/main` upstream from now on. See docs/decisions.md and AGENTS.md.
## Decompilation first: Carl skip-to-idle remains open
User reports the remaining tilt after skipping Carl and confirms original landing
bank is normal. Further gameplay changes are paused for a focused decompilation
checkpoint. Runtime a2e89c6/package dae13ac is preserved. The earlier correction
covers entry/locked state; its moved-input resume check missed neutral return.
A read-only48-case port trace isolates the first stale target write: all24 fresh
input-before-player cases retilt, all24 retained-order cases stay upright. Original
control/default/cleanup boundaries do not prove a reset; source skip writes a
Jimmy action latch plus shared skip state absent from the current fast-forward
model. Three new REA/Ghidra pseudocode results and guarded actual GAM/contact/
registry findings are retained. No gameplay fix is inferred from these local facts.
See [decompilation gate](gameplay/jimmy-cutscene-decompilation.md),
[port trace](gameplay/jimmy-cutscene-port-trace.md), and its source reports.
Research checkpoint checks: both source guards and all48 recorded diagnostic
cases/provenance verify,539 originals unchanged, no src/tests/scripts changes.
Source explanation of upright return after original skip is still open. This
checkpoint preserves the reproducible failure and narrowed investigation;
it does not mark the post-skip bug fixed or authorize speculative gameplay fixes.
## Jump tilt at cutscene and landing handoffs ## Jump tilt at cutscene and landing handoffs
Recovered CAM/MCA direct writes flatten both current and destination Euler to Recovered CAM/MCA direct writes flatten both current and destination Euler to
+12 -4
View File
@@ -46,15 +46,23 @@ compile, runtime and original-fidelity verification are separate.
## Immediate continuation ## Immediate continuation
- [x] User airborne cutscene tilt: reproduce and recover CAM/MCA current plus - [ ] Current user direction: decompile the complete Carl skip-to-idle state
lifecycle before further gameplay implementation. Preserve a2e89c6/dae13ac.
Close original support/mode/turn/input/skip ownership and same-frame ordering;
see gameplay/jimmy-cutscene-decompilation.md.
- [x] Reproduce the remaining post-skip bug with48 managed port traces: all24
fresh-order cases retilt, all24 retained-order cases stay upright. This is
diagnostic evidence, not a source-justified scheduling or reset correction.
- [x] User airborne cutscene ENTRY tilt: reproduce and recover CAM/MCA current plus
destination reset with dirty preserved; implement and verify20 original native destination reset with dirty preserved; implement and verify20 original native
cases, both player/input orders and native Carl handoff/resumption. See cases, both player/input orders and native Carl handoff/resumption. See
gameplay/jimmy-rotation-handoff.md. gameplay/jimmy-rotation-handoff.md.
- [x] Investigate landing-idle tilt: seven original-component trajectories retain - [x] Investigate landing-idle tilt: seven original-component trajectories retain
neutral residual bank and active steering levels. No supported universal snap. neutral residual bank and active steering levels. No supported universal snap.
- [ ] Whole-original landing-to-idle frame comparison: determine whether any other - [x] User confirms landing-idle residual bank also occurs in the original.
writer levels the actor or residual bank is an original quirk. Preserve the Preserve it. The post-cutscene bank is a separate port bug; complete original
documented component evidence and keep this separate from the camera fix. frame comparison remains a fidelity gate for the skip path.
- [x] User feedback: restore original left/right turning animations and fix jetpack - [x] User feedback: restore original left/right turning animations and fix jetpack
fire following pitch/roll as well as yaw. Source guards, visual/pose tests and fire following pitch/roll as well as yaw. Source guards, visual/pose tests and
+106
View File
@@ -0,0 +1,106 @@
#!/usr/bin/env python3
"""Read-only source ordering and actual lab camera graph; no gameplay mutation."""
import argparse
import hashlib
import json
from pathlib import Path
import re
import struct
from checkpoint_script_state import EXE_SHA256, find_case, read_va, rel_call_target
from pe_inspect import PE
import gam
REA_ID = 'ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904'
CALLS = (('physics before registry', 0x47e554, 0x479bc0),
('registry callbacks', 0x47e582, 0x473740),
('dynamic contact notification', 0x479c83, 0x47a430),
('AI trigger base contact', 0x40c209, 0x470a90),
('AI trigger synchronous action', 0x40c21f, 0x40c300),
('Carl inherited AI before talk', 0x41b95d, 0x408000))
SITES = (('first dynamic enter', 0x47a555, 'ff5040'),
('second dynamic enter', 0x47a578, 'ff5240'),
('registry per-object update', 0x473758, 'ff5010'),
('Carl talk in ordinary actor update', 0x41b988, 'ff9240010000'),
('MCA shot complete', 0x430ed8, 'ff92e4000000'),
('MCA skip input-latch write', 0x430f37, 'c680001e000001'),
('MCA shared skip flag', 0x430f3e, 'c605e4834f0001'),
('MCA skip finish', 0x431012, 'ff90e4000000'),
('CAM skip input-latch write', 0x41613b, 'c680001e000001'),
('CAM shared skip flag', 0x416142, 'c605e4834f0001'),
('DEFAULT clears shared skip', 0x447f89, 'c605e4834f0000'))
SLOTS = (('AI trigger enter, game interface+C8', 0x48f8c0, 0x40, 0x40c200),
('Carl enter, game interface+C0', 0x495364, 0x40, 0x40a3c0),
('Carl update', 0x495364, 0x3c4, 0x41b950),
('CAM update, game interface+C8', 0x497bfc, 0x3c4, 0x415f90),
('MCA update, game interface+C8', 0x4a8f64, 0x3c4, 0x430da0),
('MCA finish, complete table', 0x4a93c8, 0xe4, 0x4311f0))
RANGES = ((0x47e554, 0x47e58c), (0x479c7e, 0x479c8c),
(0x47a488, 0x47a57c), (0x40c200, 0x40c227),
(0x41b950, 0x41b98e), (0x41b7b0, 0x41b810),
(0x473740, 0x473768), (0x430da0, 0x430ef2),
(0x430eed, 0x431027), (0x4160f1, 0x4161cd),
(0x447f73, 0x447fc5))
FIELDS = {'ObjectTag','NextTrigger','PlayerControlled','DeactivateInv','AITarget',
'AIAnim','AIState','AINewPos','AINewRotY','AIHideObj','ActivateBy',
'ActivateByAnim','TaskName','TimesToTrigger','TouchActivated',
'TargetActAnim','TargetDeactAnim','FaceObject'}
def collect(original, rea=None):
original = Path(original)
pe = PE(find_case(original, 'Neutron.exe'))
if hashlib.sha256(pe.data).hexdigest() != EXE_SHA256:
raise ValueError('Unexpected original executable')
calls=[]
for name, va, target in CALLS:
if rel_call_target(pe,va) != target:
raise ValueError(name)
calls.append(dict(name=name,va=hex(va),file_offset=hex(pe.offset(va-pe.base)),target=hex(target)))
sites=[]
for name,va,expected in SITES:
if read_va(pe,va,len(bytes.fromhex(expected))).hex()!=expected:
raise ValueError(name)
sites.append(dict(name=name,va=hex(va),file_offset=hex(pe.offset(va-pe.base)),bytes=expected))
slots=[]
for name,table,slot,target in SLOTS:
if struct.unpack('<I',read_va(pe,table+slot,4))[0]!=target:
raise ValueError(name)
slots.append(dict(name=name,table=hex(table),slot=hex(slot),target=hex(target),
file_offset=hex(pe.offset(table+slot-pe.base))))
gam_path=find_case(original,'gam/level1b.gam')
level=gam.parse(gam_path.read_bytes())
by={}
for index,e in enumerate(level.entities):
by.setdefault(str(e.values().get('ObjectTag','')).casefold(),(index,e))
route=[]
pending=['teleportexplanation','neutron1a'];seen=set()
while pending:
tag=pending.pop(0).casefold()
if tag in seen or tag in ('none','default'):continue
seen.add(tag)
index,e=by[tag];v=e.values()
route.append(dict(index=index,kind=e.kind,offset=hex(e.offset),fields={k:x for k,x in v.items()
if k in FIELDS or k.startswith(('ActivateState','ActivateObject','CameraTarget','TargetAnim'))}))
pending.extend(str(x) for k,x in v.items() if k=='NextTrigger' or k.startswith('ActivateObject'))
result=dict(source_sha256=EXE_SHA256,rea_evidence_id=REA_ID,calls=calls,sites=sites,slots=slots,
ranges=[dict(va=hex(a),file_offset=hex(pe.offset(a-pe.base)),length=b-a,
sha256=hashlib.sha256(read_va(pe,a,b-a)).hexdigest()) for a,b in RANGES],
gam_sha256=hashlib.sha256(gam_path.read_bytes()).hexdigest(),route=route,
scope='Static source and data partial order; no runtime chain, full registry or causal fix proven.')
if rea:
record=next(r for r in json.loads(Path(rea).read_text())['records'] if r['evidence_id']==REA_ID)
if record['subject']['digest']['sha256']!=EXE_SHA256:raise ValueError('REA identity mismatch')
rows=[]
for line in record['raw_result']['stdout'].splitlines():
m=re.match(r'\s*([0-9a-f]+):',line)
if m:rows.append((int(m[1],16),line))
result['rea_extracts']={hex(a):'\n'.join(l for va,l in rows if a<=va<b)+'\n' for a,b in RANGES}
return result
if __name__=='__main__':
cli=argparse.ArgumentParser(description=__doc__)
cli.add_argument('original',type=Path)
cli.add_argument('--rea-disassembly',type=Path)
args=cli.parse_args()
print(json.dumps(collect(args.original,args.rea_disassembly),indent=2))
+111
View File
@@ -0,0 +1,111 @@
#!/usr/bin/env python3
"""Read-only guards for cutscene completion and the first resumed Jimmy input.
This inventories exact original boundaries. It does not project a hypothetical
state reset or certify the original whole-frame schedule.
"""
import argparse
import hashlib
import json
from pathlib import Path
import re
import struct
from checkpoint_script_state import EXE_SHA256, find_case, read_va
from pe_inspect import PE
REA_ID = 'ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904'
RANGES = (
('control pointer setter', 0x475a40, 0x475a4c),
('DEFAULT Jimmy control and camera restore', 0x447d34, 0x447fc5),
('MCA completion', 0x4311f0, 0x43127f),
('Jimmy script cleanup', 0x42ae00, 0x42ae29),
('gadget cleanup prelude', 0x427ff0, 0x428037),
('gadget cleanup common epilogue and dispatch table', 0x42882f, 0x428864),
('menu selection callback', 0x405fb0, 0x4061a0),
('menu resource close', 0x406590, 0x406645),
('Jimmy active input guards', 0x426030, 0x4260a6),
('movement input dispatch', 0x438a60, 0x438ba2),
('player raw identity and movement dispatch', 0x437a15, 0x437c33),
('neutral keyboard air-turn recovery', 0x439989, 0x439a69),
('ordinary air target publication', 0x439db7, 0x439e33),
)
SITES = (
('control pointer store', 0x475a44, 'a3e4995000'),
('DEFAULT control grant', 0x447e27, 'ff9018010000'),
('MCA named control grant', 0x431222, 'ff9218010000'),
('cleanup unsigned raw-mode rejection', 0x428027, '83f8070f87ff070000'),
('cleanup common selected-gadget reset', 0x428832, '66c70588054f00ffff'),
('input-global suppression', 0x426062, 'a030844f00'),
('input-actor suppression', 0x42606f, '8a862d1d0000'),
('camera-bump dispatch gate', 0x438ab3, 'd986c8070000'),
('input dispatch reads stored movement mode', 0x438b1e, '0fbf8604070000'),
('air input dispatch', 0x438b76, 'ff9228010000'),
('grounded mode reset', 0x437ba5, '66899e04070000'),
('grounded turn reset', 0x437bac, '899e14060000'),
)
SLOTS = (
('Jimmy ground input', 0x4a3bdc, 0x124, 0x438bc0),
('Jimmy air input', 0x4a3bdc, 0x128, 0x439900),
('Jimmy alternate input', 0x4a3bdc, 0x12c, 0x43a120),
('Jimmy ground apply', 0x4a3bdc, 0x130, 0x437c40),
('Jimmy air apply', 0x4a3bdc, 0x134, 0x437f90),
('Jimmy landing helper', 0x4a3bdc, 0x140, 0x429910),
('Jimmy active input callback', 0x4a373c, 0x3cc, 0x426030),
('Jimmy frame callback', 0x4a373c, 0x3c4, 0x424600),
('Jimmy cleanup', 0x4a373c, 0x438, 0x42ae00),
('Lab control setter', 0x4c3cd0, 0x118, 0x475a40),
('VR04 control setter', 0x4ce910, 0x118, 0x475a40),
('Outside control setter', 0x4c5a80, 0x118, 0x475a40),
)
def collect(original, rea=None):
pe = PE(find_case(Path(original), 'Neutron.exe'))
if hashlib.sha256(pe.data).hexdigest() != EXE_SHA256:
raise ValueError('Unexpected original executable')
sites = []
for name, va, expected in SITES:
actual = read_va(pe, va, len(bytes.fromhex(expected))).hex()
if actual != expected:
raise ValueError(f'Changed {name} at {va:#x}: {actual}')
sites.append(dict(name=name, va=hex(va), file_offset=hex(pe.offset(va-pe.base)), bytes=actual))
slots = []
for name, table, slot, expected in SLOTS:
actual, = struct.unpack('<I', read_va(pe, table+slot, 4))
if actual != expected:
raise ValueError(f'Changed {name} binding')
slots.append(dict(name=name, table=hex(table), slot=hex(slot), target=hex(actual),
file_offset=hex(pe.offset(table+slot-pe.base))))
dispatch, = struct.unpack('<I', read_va(pe, 0x428844 + 3*4, 4))
if dispatch != 0x42882f:
raise ValueError('Jetpack cleanup no longer targets common epilogue')
result = dict(source_sha256=EXE_SHA256, rea_evidence_id=REA_ID, sites=sites, slots=slots,
raw3_cleanup_target=hex(dispatch),
ranges=[dict(name=name, va=hex(a), file_offset=hex(pe.offset(a-pe.base)), length=b-a,
sha256=hashlib.sha256(read_va(pe, a, b-a)).hexdigest())
for name, a, b in RANGES],
scope='Static exact boundaries; no original completion-frame execution or proven remedy for post-cutscene tilt.')
if rea:
records = json.loads(Path(rea).read_text())['records']
record = next(r for r in records if r['evidence_id'] == REA_ID)
if record['subject']['digest']['sha256'] != EXE_SHA256:
raise ValueError('Retained REA subject mismatch')
rows = []
for line in record['raw_result']['stdout'].splitlines():
match = re.match(r'\s*([0-9a-f]+):', line)
if match:
rows.append((int(match[1], 16), line))
result['rea_extracts'] = {name: '\n'.join(line for va, line in rows if a <= va < b) + '\n'
for name, a, b in RANGES}
if any(not value.strip() for value in result['rea_extracts'].values()):
raise ValueError('Retained REA lacks an inspected boundary')
return result
if __name__ == '__main__':
cli = argparse.ArgumentParser(description=__doc__)
cli.add_argument('original', type=Path)
cli.add_argument('--rea-disassembly', type=Path)
args = cli.parse_args()
print(json.dumps(collect(args.original, args.rea_disassembly), indent=2))
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs"/>
<Compile Include="../../../src/GamePort/Assets/*.cs"/>
<Compile Include="../../../src/GamePort/Game/*.cs"/>
</ItemGroup>
</Project>
@@ -0,0 +1,104 @@
// Diagnostic composition of the existing port. No original code execution or
// production state-policy change; snapshots expose the first returning writer.
using System.Buffers.Binary;
using System.Numerics;
using System.Text;
using System.Text.Json;
using GamePort.Assets;
using GamePort.Game;
var originals = Path.GetFullPath(args.Length > 0 ? args[0] : "../Original");
var output = Path.GetFullPath(args.Length > 1 ? args[1] : "artifacts/jimmy-cutscene-return/port-trace/observations.json");
var level = GamLevel.Load(AssetPath.Resolve(originals,"gam/level1b.gam"));
var save = OriginalSave.Load(AssetPath.Resolve(originals,"NewGame.tsk"));
var cases = new List<object>();
foreach (var camera in new[]{"CAM", "CarlMCA"})
foreach (var inputAfterPlayer in new[]{false,true})
foreach (var left in new[]{false,true})
foreach (var finish in new[]{"natural","skip","default"})
foreach (var heldDuringScene in new[]{false,true})
{
var scene = camera == "CarlMCA"
? new SceneDirector(level,new TaskStates(save.Tasks),(_,_)=>2)
: new SceneDirector(new("LV1B", [Entity("3JIM","JIM1"),
Entity("3CAM","camera",("PlayerControlled","NULL"),("CameraTarget","JIM1"),
("SoundDatabase","voice"),("SoundIndex",1),("NextTrigger","default"))]),new TaskStates([]),(_,_)=>2);
var body=FlatBody();
body.InputAfterPlayerUpdate=inputAfterPlayer;
using var binding=new PlayerSceneBinding(scene,body,new SceneInventory(new int[19]),"JIM1");
var rows=new List<object>();
var phase="entry";
var tick=0;
var recordInput=false;
body.InputActions+=_=>{if(recordInput)Snapshot("input-published");};
var jumpInput=new PlayerInput(true,false,left,!left,true);
for(var i=0;i<8;i++)binding.Step(jumpInput);
if(body.Grounded || !body.FacingDirty || body.TurnRate==0)
throw new InvalidOperationException("Trace did not establish a banked jump");
Snapshot("before-trigger");
scene.Trigger(camera=="CarlMCA"?"neutron1a":"camera");
Snapshot("after-trigger");
phase="locked";
if(finish=="natural")
{
for(tick=0;tick<5000 && (!scene.Controlled || scene.Playing);tick++)
{
binding.Step(heldDuringScene?jumpInput:default);
scene.Step(FixedStepClock.Step);
if(tick==0 || tick==59 || scene.Controlled)Snapshot("after-step");
}
if(tick==5000)throw new InvalidOperationException("Natural camera chain did not complete");
}
else
{
for(tick=0;tick<180;tick++)binding.Step(heldDuringScene?jumpInput:default);
Snapshot("before-finish");
if(finish=="skip")scene.Skip();else scene.Trigger("default");
}
Snapshot("after-finish");
if(!body.Grounded || !scene.Controlled)
throw new InvalidOperationException("Trace must return idle after grounding during the camera");
phase="neutral-resumption";
recordInput=true;
for(tick=1;tick<=300;tick++)
{
if(tick>3)recordInput=false;
binding.Step(default);
if(tick<=3 || tick==30 || tick==300)Snapshot("after-step");
}
cases.Add(new {camera,inputAfterPlayer,left,finish,heldDuringScene,rows,
finalCurrent=Vector(body.Rotation),finalTarget=Vector(body.FacingTarget)});
void Snapshot(string boundary)=>rows.Add(new {phase,tick,boundary,
current=Vector(body.Rotation),target=Vector(body.FacingTarget),dirty=body.FacingDirty,
mode=body.CaptureLevelState(-1)!.MovementMode,turn=body.TurnRate,speed=body.Speed,
grounded=body.Grounded,control=scene.AuthoredControlledTag,script=scene.CurrentTag,
playing=scene.Playing,controller=body.ControllerSteps,physics=body.PhysicsSteps,
root=Vector(body.ActorRoot)});
}
Directory.CreateDirectory(Path.GetDirectoryName(output)!);
File.WriteAllText(output,JsonSerializer.Serialize(new {
scope="Existing-port managed diagnostic; synthetic flat-floor body, actual original Carl GAM chain or synthetic CAM and 2-second sound clock. No original execution, GPU or gameplay modification.",
cases},new JsonSerializerOptions{WriteIndented=true}));
Console.WriteLine($"Recorded {cases.Count} port-only handoff cases: {output}");
static float[] Vector(Vector3 v)=>[v.X,v.Y,v.Z];
static LabSimulation FlatBody()
{
var points=new[]{new Vector3(-10000,0,-10000),new(-10000,0,10000),new(10000,0,10000),new(10000,0,-10000)};
var floor=new Mesh(points.Select(p=>new MeshVertex(p,Vector2.Zero,Vector3.One)).ToArray(),[0,1,2,0,2,3]);
var standing=new Mesh([new(new(-20,-20,-20),Vector2.Zero,Vector3.One),new(new(20,80,20),Vector2.Zero,Vector3.One)],[]);
return new(new SceneCollision(floor),standing,new(0,25,0),0);
}
static GamEntity Entity(string kind,string tag,params (string Name,object Value)[] values)
{
var properties=new Dictionary<string,GamProperty>();
foreach(var(name,value) in values.Prepend(("ObjectTag",(object)tag)))
{
uint type;byte[] raw;
if(value is string text){type=1;raw=Encoding.Latin1.GetBytes(text);}
else{raw=new byte[4];type=value is float?3u:6u;BinaryPrimitives.WriteInt32BigEndian(raw,value is float f?BitConverter.SingleToInt32Bits(f):(int)value);}
properties[name]=new(name,type,raw);
}
return new(kind,0,properties,new byte[4]);
}