Files
Neutron/docs/reviews/jn-engine-capture.md
T

20 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# jn-engine capture, tooling and oracle review
2026-11-03. Read-only source/artifact inspection; no friend code, scripts, legacy binaries, network services or Ghidra jobs executed. Paths below beginning `J/` mean `../../../jn-engine-master/` relative to this document. Confidence is high for source/artifact inventory; reported historical measurements remain provenance claims until independently replayed.
**Useful now:** capture-derived Level 1 fixtures, bounded algorithm reference tests, and address/naming tools. Preserve GamePort's C#/.NET 10, SDL3 and Vulkan architecture; translate selected evidence rather than importing the C/SDL2/OpenGL runtime.
**Binary scope.** Local SHA-256 recomputation confirms `Original/Neutron.exe` matches `J/docs/binaries.sha256:12` (`f5281076…1aea8`). However our `Original/OMT2.dll` is `3ec41ead…54943`; friend declares `a94f13e1…b0fea` (`:14`). Executable addresses can be cross-indexed; DLL addresses, helper semantics and captured renderer behavior need version reconciliation. No friend original DLL is included for byte comparison. This difference is not evidence that its captures are wrong.
**Instrumentation exists, state tracing does not.** `J/instrument/proxy/ddraw_proxy.c:4` implements a replacement `ddraw.dll` forwarding through `ddraw_orig.dll`; COM wrappers hook scene boundaries, draws and state changes (`com_wrappers.c:202–234,389`). `protocol.h:12–83` specifies packed little-endian OMTC v4, accepting v1–4: transforms, viewport, textures, render/texture-stage states, light/material, draws; v3 adds pixels, v4 masks/color keys. Commands include capture controls, frame marks and camera changes (`:62–71`). Capture uses a 32 MiB producer/consumer buffer; overflow drops whole frames (`capture.c:43,596–616`). Frame time is `GetTickCount`, **not the simulation dt** (`:581–584`). No proposed state-tap addresses or gameplay-state record exist in this instrumentation.
**Included evidence has limits.** `assets/capture/` contains 390 files, 13,512,573 bytes. `level1_hudfix/frame_meta.json:4–31` attributes anchor frame 8881 to a 2026-05-25 capture, 640×480, 3,523 draws and 342 textures. Local `draws.json` actually contains 3,523 entries; textures, HUD reconstruction, `scene.bin`, `scene_reproject.bin` and `scene_world.bin` are present. The world fixture combines seven accepted keyframes; three rejected registrations are recorded (`scene_world_summary.json:5–32`). These are useful rendering fixtures, not continuous movement/physics evidence. No `.omtc`, original screenshot named by the manifest, original executable tree, `.gpr` or `.gzf` project is supplied. `validate_replay_fixture.py:34–39` requires absent raw artifacts, so its accepted-frame replay cannot currently be reproduced directly.
**Renderer claims deserve targeted calibration.** `PROJECT_HISTORY.md:1242–1259` records unusual projection `[3][3]=1`, zero vertex-alpha caveats, no fog in that capture, billboard tags, HUD FVF `0x152`/orthographic projection and `canvas_id=Canv+1`. Treat these as scoped capture/source findings. Do not infer universal no-fog or force every Vulkan material opaque. Verify matrix storage/transposition explicitly: wire schema says row-major (`protocol.h:92`) while architectural math uses column vectors. Historical histogram improvements are not image parity (`history/native_vs_capture_8881_phase5_report.md:94–117`). Particularly, `tools/check_oracle_diff.py:41–74` checks fixture counts/magic, player presence and FOV/clip values; it does **not** compare images or trajectories.
**Oracles: 16 substantive Python scripts plus one template**, rather than the survey's 15. All substantive scripts build/run repository-specific C dumpers. Reuse expected-value functions, corpus enumeration and protocol formats with a C# adapter; no existing generic external-runtime CLI makes them drop-in tests. Strong cases include 3CAM clamp-order/branch precedence with real authored counterexamples (`C3DCutSceneCamera.py:8–35`) and animation mutation tests (`C3DAnimated_dispatch.py:460–498`). Scope remains narrow: 3MCA excludes six out-of-range entries (`C3DMultiCutSceneCamera.py:20–26`); walk-camera uses synthetic inputs/tolerances and documents omitted paths (`C3DPlayer_walkcam.py:29–43`); AI-trigger bypasses activation gates (`C3DAITrigger.py:21–25`). These prove translations against recovered models, not independent original runtime fidelity.
**Adoption route.** First compare shared corpus/hashes, then adapt one camera/parser oracle and selected Level 1 render-state fixtures. Ghidra markup/dump scripts exist, but markup creates/replaces structures (`ApplyRttiClassMarkup.java:154–170`); apply only to a copied project with explicit paths. The analysed project remains an offer. State tapping is feasible future instrumentation: require pre/post-update phase, dt, input snapshot, stable actor identity, initial save/state/RNG, collision/camera state and dropped-frame reporting before replay comparisons. Begin with VR04 walking/jumping/jetpack traces.
Keep execution local: receiver defaults to all interfaces (`receive.py:392`) with control enabled (`:501`); deployment uploads remotely (`deploy_xp.py:144–145`). Do not run those defaults or remote workflows. Use reviewed offline readers/local fixtures and separate generated directories. No new implementation or runtime validation is claimed here.