Files
Neutron/docs/gameplay/original-state-observer.md
T

12 KiB

Read-only original process-state observer

2026-11-06. This investigation tool is separate from the modern runtime. It is intended to establish actual startup registry state and narrow the unresolved Carl skip-to-idle discrepancy. It does not supply a gameplay fix or certify exact callback order. No original execution is claimed by the initial compile/guard checks below.

Execution boundary

tools/recon/original_state_observer.c launches one explicitly attested generated game copy with CreateProcessA, samples it with ReadProcessMemory, then requests ordinary WM_CLOSE on that process's own visible window. It never writes target memory, installs breakpoints, invokes target functions, forces actor state, or terminates another process. If ordinary close does not succeed, the child remains running; the caller must handle its own isolated environment. Existing Wine capture infrastructure cleans up only its private wineserver afterward.

The first argument must be --copied-game=<path>. This is the caller's explicit attestation that the target is a generated copy. Both the absolute path and the handle-resolved final path reject a case-insensitive Original path component. The tool accepts only the three exact hashes below and the original1019904-byte file size. It holds an authenticated read handle without write/delete sharing through process creation. The flag is not a cryptographic proof of provenance; use the existing generated-copy wrapper, never a hard link to an original file.

Alternatively, --attach-copied-pid=<PID> explicitly attests that an already running process uses a generated copy. This mode acquires only PROCESS_VM_READ | PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE, obtains its actual image path with QueryFullProcessImageNameA, and applies the same final path, size, file hash and live instruction guards. PID is a strict positive 32-bit decimal value; malformed/overflowed values are rejected. The process handle binds the selected process throughout validation/sampling, rather than reopening a potentially reused PID. Attach mode never calls CreateProcess, focuses a window, sends input, requests WM_CLOSE, or terminates the target. --menu-keys is rejected before opening the process. Sampling ends while the original session remains under the user's control.

No network API is used. Run under tools/recon/reference_capture.py for its existing no-network/no-original-mount boundary. Native Windows execution must likewise use a generated directory containing copies of the game and its assets. Game-created settings/saves then remain in that generated environment.

Supported subjects and evidence

Profile Exact executable SHA256
canonical f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8
hd-resolution b6675b7e7f3fc37512185ddb4d6ce1fbe9a36c8b83f3b4b3ed6979a56db3d2d4
hd-nocd 8cd5d21997835a40978b8b83e344c97c92217bf6cd6858f7458b76935d64dedb

Canonical instruction Evidence is ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904, retained in artifacts/jimmy-movement-audit/rea-original-disassembly.json. The HDnoCD subject has separate complete REA instruction Evidence ev_23555fac476985c913a80805a12b25c26c25347c6e8210ee188471dd815c276d, retained in artifacts/jimmy-skip-original-sw/rea-hdnocd-disassembly.json. The supplied HD resolution variant preserves the observed operands. The HDnoCD profile is independently identified; its observation is not automatically a canonical-original behavior claim. Other supplied variants are rejected.

2026-11-06 follow-up: the supplied standard-resolution NoCD image is now a fourth exact profile, SHA256 5e1d3bed2d649d16ec62ead02514119a16590380d4d5a6a73103db900a15c62e. Its eight live global operands match the HDnoCD profile; independent source checks verify32 anchors across four subjects. The two NoCD images differ only at three resolution bytes; canonical-equivalence is still not assumed. Source checks are in artifacts/original-state-observer/profiles-4.json. Standard-subject REA Evidence and perturbed startup observations are in the startup diagnostic.

Each global address is independently guarded by its actual live instruction operand before sampling. Runtime inspection is refused if those anchors do not match within5s. This avoids assuming that the other variant has identical data addresses. Preferred-base VAs and PE file offsets follow:

Read role Instruction VA / file offset canonical and HD global HDnoCD global
Raw control owner 475A40..475A4B /75A40..75A4B setter 5099E4 509A04
Registry sentinel pointer 473740 /73740 load 50999C 5099BC
Viewport seconds 47374F /7374F load 696030 696050
Current game complete pointer 46E360 /6E360 store 509948 509968
Shared skip 430F3E /30F3E store 4F83E4 4F8404
Input block 426062 /26062 load 4F8430 4F8450
Modal gate 407060 /7060 load 4F8198 4F81B8
Skip suppression 430F11 /30F11 compare 4F8182 4F81A2

Registry nodes are {next,previous,payload} at offsets0/4/8, from the recovered 46FF4A..46FF7F insertion and473740 traversal. Traversal stops at the sentinel, 1024 nodes, an unreadable node or a repeated payload. complete:false means the sample cannot establish the whole list; mutation during a read is possible. Jimmy is recognized by game-interface vtable4A373C. The current game registry payload is its complete pointer+8C. A successful full-list sample records their actual indices without executing either actor or inferring constructor order.

Jimmy samples use the game interface: current Euler224..230, destination274..280, dirtyA, movement mode704, stored turn614, and action latch1D40 (=complete1E00). Support fields13F and4A0 are reported separately as cached and force-support bytes: actual458960 reads4A0 first, otherwise471A10 reads13F. They are not an executed support query. The source addresses are code-field contracts, not guessed layouts or corresponding fields from the modern simulation.

Output and ordinary input

Output is bounded JSONL on stdout: authenticated identity, registry changes, nominal10ms state samples, optional normal input events, finish and completion marker. Sleep(10) is a sampling request, not a guaranteed interval or a game clock. Each record includes actual elapsed wall-clock milliseconds. Floating point NaN/infinity is written as JSON null. Narrow Win32 path/title bytes outside ASCII are escaped so the output remains valid JSON; use ASCII generated paths for reliable cross-machine reproduction.

valid_mask uses bits0..3 for readable skip/input/modal/suppression bytes, bit4 for readable viewport delta, and bit5 for a readable full Jimmy field block. Zero values without the corresponding valid bit are placeholders, not evidence that the game state was zero. Jimmy fields are omitted without bit5.

By default no keys are sent. --menu-keys explicitly opts into ordinary Return presses at approximately3/6/9s, each held100ms while sampling continues. It finds only the child process's visible unowned window, requests normal window focus, and uses SendInput only when that window is foreground. Records include title, window/foreground handles, press/release and events accepted by SendInput. Accepted events do not prove that the game's input system consumed them or that a particular menu item was selected. This sequence is not a recovered New Game macro. --copied-game-menu=<path> is an explicit single-argument equivalent for the existing capture wrapper, which passes one --probe-model argument.

Samples consist of multiple independent reads without suspending the game. They can miss transitions shorter than the interval and can mix adjacent callbacks. They establish observed retained state and list membership; they cannot alone prove the first writer, same-frame control order, exact input/controller order, physics chronology, or the complete Carl skip lifecycle. A black screenshot is still not a usable visual reference even if process state can be read.

Build and use

From GamePort:

mkdir -p artifacts/original-state-observer
i686-w64-mingw32-gcc -std=c11 -O2 -Wall -Wextra -Werror \
  tools/recon/original_state_observer.c -lbcrypt \
  -o artifacts/original-state-observer/observer.exe
python3 tools/recon/reference_capture.py --asset-probe \
  --probe-executable artifacts/original-state-observer/observer.exe \
  --probe-model=--copied-game=NeutronHDnoCD.exe \
  --probe-success ORIGINAL_STATE_OBSERVER_COMPLETE --seconds 24 \
  --output artifacts/original-state-observer/capture

The observer itself defaults to15s and accepts --seconds=1..120 on native Windows. For normal input opt-in, substitute --probe-model=--copied-game-menu=NeutronHDnoCD.exe above. Original variants with a CD prompt may not proceed to gameplay in this environment; no prompt bypass or executable modification is implemented by this tool.

On native Windows, first start an ordinary generated copy and reach the desired Carl/tutorial route. Obtain that game's process ID, then start the observer from a separate terminal, redirecting stdout to a local trace:

observer.exe --attach-copied-pid=1234 --seconds=60 > carl-original.jsonl

Replace1234 with the copied game's actual PID. The existing session is left running and receives no observer-generated input or close request. --help prints usage without opening a file or process. The same process path/hash restrictions apply even if another executable is named Neutron.exe.

Initial verification: MinGW32 compilation with all warnings treated as errors passes. All24 independently PE-mapped source anchors (8 per supported subject) match; artifacts/original-state-observer/source-guards.json records original hashes, exact bytes, addresses and file offsets. These are compilation/static checks only. The primary investigator owns subsequent isolated runtime captures, integration, additional evidence and any commit.

Integrated Wine32 observation

The primary's generated-copy launch and focus/Return checks reach MAIN only: game-interface table4D0C0C, no Jimmy, black captures. An isolated xfwm4 desktop does not produce a usable gameplay reference. Viewport delta0 here does not prove the menu selected New Game or that menu/engine clocks share the gameplay clock.

The final attach revision is exercised by tools/recon/original_observer_smoke.c. This Wine-only driver requires the wrapper's generated Z:\work\game directory, launches the supplied HDnoCD copy, then attaches the observer for10s. It verifies observer exit0 and that the original remains active afterward, before sending its own child's ordinary close. The observer itself sends no input or close in attach mode.928 JSON samples parse, the exact live guards pass, and capture wineExit0 plus both completion markers are present. MAIN only is observed; this is API/tool validation, not a Carl trace.

The tested observer source/build hashes, driver identity, logs/capture metadata and parsed summary are in artifacts/original-state-observer/attach-runtime/observations.json. The initial launch capture lacked a pre-recorded observer executable hash and includes a Wine diagnostic interleaved with JSON; it is retained separately as a limited functional observation. The final attach capture has explicit build provenance and928 intact samples. Native Windows execution remains unverified.

Reproduce after building the observer and driver, using the already prepared generated Wine copy/prefix (no source original is mounted):

i686-w64-mingw32-gcc -std=c11 -O2 -Wall -Wextra -Werror \
  tools/recon/original_observer_smoke.c -o artifacts/original-state-observer/attach-smoke.exe
cp artifacts/original-state-observer/observer.exe artifacts/jimmy-skip-original-sw/observer-under-test.exe
python3 tools/recon/reference_capture.py --asset-probe \
  --probe-executable artifacts/original-state-observer/attach-smoke.exe \
  --probe-success ORIGINAL_OBSERVER_ATTACH_COMPLETE --seconds 18 \
  --output artifacts/jimmy-skip-original-sw

Primary's launch observation, before attach support: separate HDnoCD profile passes all live guards; normal focused menu input and an isolated window manager still yield only MAIN (game index0, interface vtable4D0C0C), no Jimmy, and delta0. The final run recorded2042 samples across22.02s. This validates the observer's bounded launch/read path under Wine, not original gameplay or Carl's return. Attach support was added for a reference machine where the user can reach the route before starting a bounded trace. Its strict compilation/source checks are separate from native Windows attach execution, which remains unverified here.