Trace Carl lifecycle and add read-only original state observer
This commit is contained in:
1 parent
c642b69849
commit
4cd62d3627
28 files changed
+2387
-5
No files matched your search
@@ -0,0 +1,84 @@
|
||||
# Carl contact and conversation entry
|
||||
|
||||
2026-11-05. This investigation closes the local contact/admission boundary. It does **not** identify a source-supported fix for the bank returning after skipping Carl. Physical collision admission, the complete task callback graph, and the complete skip/resume frame remain separate boundaries.
|
||||
|
||||
## Evidence and reproduction
|
||||
|
||||
Original `Neutron.exe` SHA-256: `f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`. Retained REA disassembly: `artifacts/jimmy-movement-audit/rea-original-disassembly.json`, evidence `ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`. JN-Engine was used as an index; executable bytes and actual GAM fields establish the statements below.
|
||||
|
||||
Read-only guard/generator: `tools/binary/jimmy_carl_entry.py`. It checks the executable identity, direct calls, virtual bindings and instruction sites, records original file offsets/range hashes, and can retain bounded REA extracts. All addresses here are preferred-base VAs. For the cited executable text/data sites, raw file offset is VA minus `0x400000`; the helper calculates offsets from PE sections rather than assuming this mapping.
|
||||
|
||||
```sh
|
||||
python3 tools/binary/jimmy_carl_entry.py ../Original \
|
||||
--rea-disassembly artifacts/jimmy-movement-audit/rea-original-disassembly.json \
|
||||
--generate-probe artifacts/jimmy-carl-entry/native \
|
||||
> artifacts/jimmy-carl-entry/source.json
|
||||
i686-w64-mingw32-gcc -O0 -Wall -Wextra \
|
||||
-o artifacts/jimmy-carl-entry/native/probe.exe \
|
||||
artifacts/jimmy-carl-entry/native/jimmy_carl_entry_probe.c
|
||||
python3 tools/recon/reference_capture.py --asset-probe \
|
||||
--probe-executable artifacts/jimmy-carl-entry/native/probe.exe \
|
||||
--probe-success JIMMY_CARL_ENTRY_COMPLETE --seconds 12 \
|
||||
--output artifacts/jimmy-carl-entry/probe
|
||||
```
|
||||
|
||||
The generator compiled without warnings. The copied-original component ran under Wine in the existing network-disabled namespace, with `Original/` unmounted. `artifacts/jimmy-carl-entry/probe/wine.log` reports 96 passing cases and `JIMMY_CARL_ENTRY_COMPLETE`; `capture.json` records exit 0. This is **isolated original component execution**, not native Windows/full original gameplay verification. Originals were not executed in place or changed.
|
||||
|
||||
## Recovered contact and talk ownership
|
||||
|
||||
Carl's game interface is complete-object `+0xC0`. Its game vtable `0x495364` binds contact slot `0x40` to `0x40A3C0`, ordinary actor update `0x3C4` to `0x41B950`, and velocity preparation `0x410` to `0x40A6B0`. Its complete vtable `0x495804` binds state setter `0x124` to `0x4089B0`, talk `0x140` to `0x41B7B0`, trigger resolution `0x17C` to `0x41BB20`, and progress callback `0x180` to `0x413E50`.
|
||||
|
||||
| Boundary | Original evidence | State and dependencies |
|
||||
|---|---|---|
|
||||
| Physical notification gates | `47A46E/47A48F`, `47A4AA/47A4BD` | Both actors' game220 bind471A30 (own byte140 collision-enable); both game3A0 bind472F80 (`mov al,1; ret4`). Thus these pair-permission callbacks contain no raw-control, current-action or support admission check. Game178 on both binds471720 (own collision-kind124); kind2 selects47A5E0, otherwise47B3E0. Geometry/actual values remain a separate boundary. |
|
||||
| Contact prelude | `40A3CD→470A90` | Own slot `3C→470A60` checks duplicate membership in own contact list. Own deletion byte `+6` can suppress list append. Appends contacted pointer to own `+260` list and increments `+264`. Own `+408` may receive current-game callback `144`; lab complete table `4C3CD0+144→475D40` is exactly `or eax,-1; ret8`, with no actor side effects. |
|
||||
| Target admission | `40A44C..40A460` | Reads **Carl game+600** target; requires non-null and exact identity with incoming contacted game pointer. This is not a raw-controlled-pointer requirement. |
|
||||
| Talk-ready transition | `40A676..40A693` | Requires **Carl game+608 == 6**; invokes **Carl complete slot124(0)**. No support getter, Jimmy mode/turn write, target velocity/root/Euler store, distance threshold, or vertical threshold occurs in this branch. |
|
||||
| State ownership | `4089E5..408A04` | Setter copies own complete `+6C8` to `+6CC`, then writes requested state to `+6C8` (game+608). Complete byte `+970` can suppress state0/6 assignment. State0 tail `408B44..408B90` prepares/animates the NPC if its own flags permit it. |
|
||||
| AI before talk | `41B95D→408000`; `41B972..41B988` | Friend update runs inherited AI, increments own timer, then reads **resulting own AI state**. State0 dispatches complete140. It is not a test for a null target pointer. |
|
||||
| AI state0 dependencies | `408438..4084FC` | Reads target's **game+49D** targetability/invisibility flag at `40847C`; uses own facing/AI helpers and own distance/range data; can restore own state6/2. This is not Jimmy's support flag. The inherited update includes gates and indirect own AI callbacks; the native probe below does not execute this whole update. |
|
||||
| Conversation trigger selection | `41BB20..41BC1F` | Up to five named trigger lookups through `474070`; TalkState must not be `-1` and must equal own complete+554 task state or wildcard `-2`. No Jimmy support query. |
|
||||
| Progress before activation | `41B7CD→Carl413E50→41B810` | Base awards score100 through `42ADC0`, then invokes **Carl game410→40A6B0**, which sets **Carl velocity** to zero through own game2C4. It does not prepare Jimmy. Carl then advances `SCENE50→60` (other paths65→70,270→280) through `45F990`. Task notifications remain a separate dependency. |
|
||||
| Synchronous camera activation | `41B7D3..41B7D8` | Invokes resolved trigger's game slot5C with that trigger as argument. Only after it returns, `41B7DD..41B7FA` increments NPC talk counter, clears own elapsed timer, sets own AIstate9, and stops own animation. |
|
||||
| Jimmy counterpart contact | game table `4A373C+40→422D30`; `422D50→470A90` | Jimmy also receives a contact callback. Its subsequent concrete-type ladder tests pendulum, vehicles, projectile/enemy classes, button, AIT and load-level. It has no Carl/friends/AI generic test. Carl matches none of those concrete classes, so the C3DLOADLEVEL false branch `4232D0→423563` finishes without mode/turn/Euler preparation. This is static path analysis, not execution of the counterpart in the finite probe. |
|
||||
|
||||
The optional marker logic earlier in contact (`40A3E7..40A44C`, own game+8CD) has raw-controlled/Goddard identity handling and NPC marker/animation writes. It is separate from the state6 exact-target admission branch and supplies no Jimmy grounding gate. The state4 branch transforms relative positions/directions into **NPC-owned** fields; state6 does not execute it.
|
||||
|
||||
Actual `level1b.gam`, SHA-256 `316fff40db565c2add5b07cbccdef640ddb67c64d6625fea1429ce2a0542a234`, binds Carl at raw `0x1455` to target `Jim1`, TaskName `SCENE`, initial AIState9, and TalkState0=50/TalkTrigger0=`neutron1a`. Jimmy at raw `0x8` has TaskName `none`, RequiredLevel0, ExactLevel/RemoveLevel `-1`. `neutron1a` MCA at raw `0xE0B` names PlayerControlled=`JIM1`, NextTrigger=`carlwalk`. Carlwalk AIT at raw `0x1AFD` targets `C3DCARL`, sets AIState3 and chains `default`; it does not change Jimmy root/yaw. The helper retains these actual entity fields and entity file offsets.
|
||||
|
||||
## Finite component result
|
||||
|
||||
`jimmy_carl_entry_probe.c` executes complete original contact `40A3C0`, base `470A90`, actual duplicate-list predicate `470A60`, state setter `4089B0` and lab callback `475D40`. It uses synthetic complete objects/vtables, a native allocator adapter, a false-returning incoming type-query adapter, and NPC animation/preparation adapters. Original constructors, dynamic collision admission, AI update, task callbacks, trigger resolution, camera activation and skip are outside the probe.
|
||||
|
||||
Across 96 combinations of incoming target identity, own AIState6/3, raw-controlled identity, Jimmy mode0/1, Jimmy turn `-12/0/+12`, and synthetic support0/1:
|
||||
|
||||
- Actual base contact appends one contact node.
|
||||
- Own state becomes0 exactly when contacted target matches and own state was6.
|
||||
- Own state0 idle preparation/animation callbacks occur in those cases.
|
||||
- The entire `0x1F00`-byte synthetic Jimmy object remains unchanged, including mode, turn, bank and Euler destination.
|
||||
- Jimmy support virtual218 is never queried. The synthetic support value is a callback experiment, not a claim about a recovered physical-support field.
|
||||
|
||||
This confirms the local source reading: adding a grounded-only Carl-talk gate or resetting Jimmy mode/turn in the contact callback has no support in this recovered boundary. It does **not** prove the physical pair engine admits every airborne trajectory or that the full conversation activation frame leaves Jimmy unchanged; camera activation itself has its recovered orientation suffix.
|
||||
|
||||
## Startup/reuse hypothesis audit
|
||||
|
||||
A proposed explanation for the original/port difference was that original New Game might preload the lab behind the main menu, leaving a reusable Jimmy before the first playable lab controller. The inspected startup gives no positive support for that explanation:
|
||||
|
||||
| Source chain | Observation |
|
||||
|---|---|
|
||||
| `46A641→46B160`; `46A654` | Constructs application and stores global509980. |
|
||||
| `46A65B` pushes MAIN; `46A660→46A310→46A33D/44D0E0` | Startup selects a constructed MAIN controller. |
|
||||
| `44D122→459110→459168/44D2B0→44D306/4745A0` | Constructs CMainMenu using Jimmy-game/generic-game base constructors. Installs complete4D1070/game4D0C0C; class literal4F291C is `CMAINMENU`. This is not a level1b GAM load. |
|
||||
| `4591C3→4749A0→completeB4/44D3D0` | Menu InitGame clears task list through45F4C0, initializes world/camera defaults through474A10, sets own lifetime fields; no direct Jimmy constructor or lab request here. |
|
||||
| `44D139` app118→46F760; `44D149` app12C(3)→46F830 | Opens resource database and creates a 2D image from it, respectively. These bounded bodies do not load a lab or construct Jimmy. |
|
||||
| `404B4F..404B54` | Actual menu New Game item pushes string4EC71C (`NewGame.tsk`) and calls460E70. It then changes own menu/current-game state. |
|
||||
| `40D089..40D08E` | The other executable reference to NewGame.tsk is the script RESTARTGAME action. |
|
||||
| `45B1E2→422160` | Sole direct `C3DJimmy` constructor call in retained executable disassembly is inside the generic object factory. |
|
||||
|
||||
**Inference limit:** this is a positive constructor/initialization chain and a bounded negative result for preload. Menu-frame event/deferred-task behavior and any attract/demo route have not been exhaustively executed here. The result does not certify initial full registry order, and does not justify changing the port's fresh/retained ordering. Existing loader reuse facts remain valid when a prior Jimmy actually exists.
|
||||
|
||||
## Remaining questions and implementation comparison
|
||||
|
||||
The current port approximates contact using a broad sphere and starts Carl talk from its actor update after player processing. Original physical contact notifications occur through47A430 before ordinary registry updates; Carl's own talk then occurs from41B950 after its inherited AI update. Their relationship to Jimmy's update depends on actual registry order, collision state, and callback ownership; this report does not replace that schedule with a guessed global order.
|
||||
|
||||
Still unresolved: exact physical admission at the actual jumping contact; complete entry frame with task callbacks and source bodies; full MCA skip→Carlwalk→DEFAULT→first resumed input composition; and original first-play registry order at the user-observed case. No runtime implementation was changed by this investigation. Ordinary landing bank must remain until directly contradicted by evidence; contact preparation supplies no basis for a global upright clamp.
|
||||
Reference in new issue
Block a user