Recover dynamic box shared-context ownership and kernel winding
This commit is contained in:
1 parent
346d350176
commit
135ff3642a
18 files changed
+640
-1
No files matched your search
@@ -128,3 +128,18 @@ actual lab bars closed/open passage using the existing provisional swept-sphere
|
||||
SceneCollision adapter. The latter verifies port integration, not original47BD80
|
||||
or original runtime behavior. Full edge/vertex sphere response, static reclipping,
|
||||
door pushing/crushing and native original comparison remain unresolved.
|
||||
|
||||
## Shared response continuation — 2026-11-07
|
||||
|
||||
[Dynamic context](../checkpoint/dynamic-context.md) now supplies17 complete
|
||||
original mode2/static-reclip observations and a test-only C# composition. Twelve
|
||||
captured kernel calls establish A,C,B argument winding relative to the construction
|
||||
topology above, with the construction normal retained. Do not reverse live
|
||||
construction topology indiscriminately. The injected live adapter is unchanged.
|
||||
|
||||
The original retains hit/last polygon, can invoke a stale static callback after
|
||||
the dynamic hit, and publishes its local root after callbacks unless inhibited.
|
||||
Empty-grid tests close that finite ownership contract, not nonempty shared-world
|
||||
behavior, real actor responses or broad live admission. The source kernel itself
|
||||
has since been recovered in collision-response/body reports; the older unresolved
|
||||
wording above describes this report's original implementation checkpoint.
|
||||
@@ -1,5 +1,14 @@
|
||||
# Core architecture coverage map
|
||||
|
||||
2026-11-07: [dynamic/shared context](dynamic-context.md) adds17 complete original/
|
||||
C# test-composition cases and12 captured kernel argument matches (S/P/M).
|
||||
Hit/last-polygon retention, old static callback and final local-root publication
|
||||
are recovered under empty-grid/non-reentrant fixtures. Original kernel A,C,B
|
||||
arguments differ from construction topology; final position alone hid that error.
|
||||
Jeep's default deletion predicate is guarded; full active cleanup remains open.
|
||||
Live collision, nonempty shared reclip, real actor callbacks and retained helper
|
||||
order remain gated. No new R/whole-original/native Windows coverage is claimed.
|
||||
|
||||
2026-11-06 TSK-entry correction: [menu/player lifetime](../gameplay/main-menu-player-lifetime.md)
|
||||
establishes backgroundJimmy construction and reuse before the first playable
|
||||
story scene. Input is now after Jimmy for that TSK path, while direct fresh-GAM
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
# Dynamic box response and shared static context
|
||||
|
||||
2026-11-07. Continues [pair lifecycle](pair-lifecycle.md) and
|
||||
[physical registration](physical-registration.md). This checkpoint executes the
|
||||
complete original mode2 box query and composes existing C# source kernels in a
|
||||
**test fixture**, without admitting dynamic pairs to live gameplay.
|
||||
|
||||
## Evidence and scope
|
||||
|
||||
Canonical Neutron.exe SHA-256:
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
REA instruction Evidence:
|
||||
`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`.
|
||||
New REA/Ghidra mode2 pseudocode:
|
||||
`ev_76827fca086933b7c48a9036a5a4a0a0f86d714935de6373eca4a3530fd231c5`.
|
||||
Jeep PostLoad4217D0:
|
||||
`ev_72e727e980c8ad114b46c1f23905088233e2925ff8bf8a9420d3b81bddccda27`.
|
||||
The request for teardown46DFF0 remains an unrecognized-procedure error; no full
|
||||
cleanup decompilation or execution is claimed. Complete replies, export and
|
||||
closed-session snapshot are local under `artifacts/dynamic-context/rea/`.
|
||||
|
||||
`tools/binary/dynamic_context.py` guards11 copied bodies and102 relocated
|
||||
operands, including the complete47A5E0..47B3DC query/switch-table span
|
||||
(file7A5E0, lengthDFC, SHA-256
|
||||
`9bb2c187d12f73a73f4ac2f31e19072d9010f919ce93fb6884e2be35b2fac894`).
|
||||
It uses the prior dispatcher/kernel mapper and a copied original OMT2.dll.
|
||||
Actor getters, contact callbacks, root setter and box point transform are
|
||||
synthetic. The source static grid is empty, with a deliberately seeded old
|
||||
polygon. This is original component execution under isolated Wine32, not an
|
||||
original scene, live Jimmy callback or native Windows observation.
|
||||
|
||||
## Recovered call order and ownership
|
||||
|
||||
Text file offsets below equal VA−400000; the tools verify actual PE mapping.
|
||||
The box query is reached from ordered pair47A430. Its other actor geometry gate,
|
||||
source radius broadphase and other-mode2 shortcut precede triangle processing.
|
||||
Those early paths preserve the seeded nearest/hit/last-polygon context.
|
||||
|
||||
| Original VA / file offset | Recovered operation |
|
||||
|---|---|
|
||||
|47AB3F / 7AB3F|Write sphere radius to edge limit5CFBE0.|
|
||||
|47AB4B / 7AB4B|Set nearest face695D5C to−1. Do not clear hit5CFBE8 or last polygon695D4C.|
|
||||
|47B277 / 7B277|Call47BD80 for each of12 transformed box triangles, updating the shared nearest state and local candidate.|
|
||||
|47B29B / 7B29B|Each accepted kernel result invokes sphere virtual374 with a **null polygon**. This is not a normal-Y choice between370/374.|
|
||||
|47B2EF / 7B2EF|Read box virtual1E0 after triangle callbacks. If inhibited, return contact without world reclip or sphere root setter.|
|
||||
|47B364 / 7B364|Call47B4B0 from source previous root with candidate−previous displacement; edge checking is disabled. Reuse current hit/nearest/last state.|
|
||||
|47B399 / 7B399|Publish the clipped local candidate through sphere314 after the static callback; there is no live-root comparison before publication.|
|
||||
|
||||
After all triangles, face−1 and edge>=radius means no contact. An accepted
|
||||
query resets the nearest limits even when it misses, while old hit and last
|
||||
polygon survive. The chained fixture verifies this across two successive calls.
|
||||
Its callback/setter/pass counters are cumulative, not reset for the second call.
|
||||
|
||||
With an empty grid,47B4B0 can still issue its terminal callback for the seeded
|
||||
old polygon, including when static geometry4F69E5 is disabled. An uninhibited
|
||||
dynamic hit therefore gives a null-polygon dynamic callback followed by an
|
||||
old-polygon static callback. A callback's live-root mutation is overwritten by
|
||||
the final local candidate; inhibition leaves that mutation intact, including W2.
|
||||
Do not replace this with a root-changed suppression rule.
|
||||
|
||||
The global primitive mode695D74 is a separate owner.47B6F4 sets it to1 around
|
||||
an individual static primitive when sphere42C is set, then47B742 clears it.
|
||||
Our empty-grid fixture starts and ends with mode0, including42C=true. That case
|
||||
does not establish general mode reset, recursive queries or arbitrary callback
|
||||
mutations. Parent static-body479D20 normally initializes its own query state;
|
||||
the later dynamic phase can see another body's last polygon. Explicit seeding
|
||||
tests state retention, not which real actor supplied it in a complete frame.
|
||||
|
||||
## Kernel winding: a meaningful failed comparison
|
||||
|
||||
The first C# composition used `DynamicSceneCollision.Triangles` construction
|
||||
order directly. Its first fixture reached the same root(0,0,20,1), but reported
|
||||
face−1/edge5 instead of original face40/edge10. The passing interpretation uses
|
||||
kernel arguments **A,C,B**, with the normal retained from construction A,B,C.
|
||||
|
||||
To test that interpretation, the generated private mapped kernel entry is
|
||||
instrumented to record its first12 triangle/normal arguments. The hook restores
|
||||
the original five bytes before invoking the actual source kernel and reinstalls
|
||||
it afterward. All12 complete arguments match the C# fixture; each captured
|
||||
cross(B−A,C−A) points opposite its supplied normal. The original files and copied
|
||||
on-disk EXE are not patched. This validates the kernel boundary, not a blanket
|
||||
change to construction topology or the provisional live collision adapter.
|
||||
|
||||
The intentionally wrong construction-winding run remains a failing diagnostic
|
||||
(`--construction-winding`), with its first divergence and nonzero exit saved in
|
||||
`artifacts/dynamic-context/construction-winding-failure.json`. Matching final
|
||||
positions alone would have missed the shared-state error.
|
||||
|
||||
## Implemented comparison and verification
|
||||
|
||||
`tests/GamePort.DynamicContextTests` composes the existing source sphere and
|
||||
static kernels with this bounded control flow. No production solver or gameplay
|
||||
actor is added. Fixed references run without generated artifacts; `--native`
|
||||
also compares every emitted field and all12 captured kernel arguments.
|
||||
|
||||
The17 observations cover old/null polygon, inhibition, geometry-off and
|
||||
broadphase rejection, other-box overlap/rejection, triangle miss, root-mutating
|
||||
callbacks with/without inhibition, static-geometry-off,42C force-static flag,
|
||||
Y45 face contact, translated/90-degree box and a two-call hit→away sequence.
|
||||
Each compares contact, XYZW, nearest face/edge/hit, retained polygon identity,
|
||||
dynamic/static callback counts, setter count, static passes and global mode.
|
||||
The Y45 case is not proof of a successful geometric edge/corner response.
|
||||
|
||||
Verification: all17 full native/C# observations and12 kernel arguments match;
|
||||
fixed references pass;345 Python tests,11 static-dispatcher groups,10 dynamic-box
|
||||
groups and28 pair lifecycle cases pass. All539 original files remain unchanged.
|
||||
Both packaged DLLs and BUILD-INFO remain identical to the924ad2f baseline.
|
||||
No new GPU, audible, whole-original or native Windows comparison is claimed.
|
||||
|
||||
Reproduction from GamePort (probe execution uses a separate copied game):
|
||||
|
||||
```sh
|
||||
python3 tools/binary/dynamic_context.py ../Original --output artifacts/dynamic-context/native
|
||||
i686-w64-mingw32-gcc -O0 -Wall -Wextra -Wno-unused-function -o artifacts/dynamic-context/native/probe.exe artifacts/dynamic-context/native/dynamic_context_probe.c
|
||||
python3 tools/recon/reference_capture.py --asset-probe --probe-executable artifacts/dynamic-context/native/probe.exe --probe-success DYNAMIC_CONTEXT_COMPLETE --seconds 12 --output artifacts/dynamic-context/probe
|
||||
python3 tools/binary/dynamic_context.py ../Original --output artifacts/dynamic-context/native --capture artifacts/dynamic-context/probe
|
||||
source scripts/env.sh
|
||||
dotnet run --project tests/GamePort.DynamicContextTests -- --native artifacts/dynamic-context/native/observations.json
|
||||
```
|
||||
|
||||
## Helper teardown follow-up
|
||||
|
||||
`tools/binary/helper_teardown.py` guards13 sites and5 Jeep bindings at table
|
||||
4A2AEC (fileA2AEC). Constructor42129A (file2129A) pushes1, and4212A8 calls
|
||||
470F40: authored predicate+11 is stored and dispatched through204 to live+139.
|
||||
Generic Init4705B3/4705BC restores the authored predicate through8C→204.
|
||||
Table slots8C/200/204 target470F30/4719B0/4719C0. Default Jeep is therefore
|
||||
eligible for ordinary deletion, unlike the retained Jimmy default; pointer
|
||||
clearing in Jimmy PostLoad is not itself evidence of a retained old Jeep.
|
||||
|
||||
Teardown re-reads200 at46E032,46E06F and46E0AC (files6E032/6E06F/6E0AC),
|
||||
with virtual20/34 cleanup between reads, then marks+6 at46E0CA before the
|
||||
473710 sweep. Jeep20 targets4213E0→462390;34 targets458C50, whose game+4B0
|
||||
condition can invoke430. Callback/active-vehicle mutations can affect those
|
||||
re-reads. This closes the **default eligibility** question, not complete active
|
||||
cleanup, child deletion, sweep execution or final retained registry order.
|
||||
|
||||
## Remaining admission gates and next chunk
|
||||
|
||||
1. Exercise static geometry after a dynamic hit, rather than only empty-grid
|
||||
reclip. Compare shared nearest/last ownership across two real primitive
|
||||
candidates and ordered bodies, including face/edge ties and flag transitions.
|
||||
2. Trace actual Jimmy/door/VR04 actor callbacks and their root, mode, activation
|
||||
and polygon requirements. Synthetic callbacks do not establish these owners.
|
||||
3. Finish constructor-only helper re-entry/deletion and physical order across
|
||||
ordinary LOAD/RETURN, including cleanup mutations between the three reads.
|
||||
|
||||
Then implement a bounded shared-context response component and integrate only
|
||||
the evidenced VR04 actor set. Keep lab/outside capsule and current playable
|
||||
movement while these gates remain. Preserve ordinary landing bank; this report
|
||||
adds no rotation reset and does not reopen the completed TSK-entry order fix.
|
||||
@@ -35,6 +35,14 @@ fresh/retained helper membership. See [registration](physical-registration.md).
|
||||
Next resolve helper re-entry/deletion/activation and dynamic shared reclip state;
|
||||
keep live scene admission unchanged until those dependencies close.
|
||||
|
||||
2026-11-07 continuation: [dynamic context](dynamic-context.md) executes17 original
|
||||
mode2/reclip cases and captures12 kernel triangle/normal arguments. Test-only C#
|
||||
composition matches complete snapshots, including retained old polygon and
|
||||
callback publication. Jeep default deletion eligibility is guarded, while cleanup
|
||||
mutations/children/order remain open. Next extend to nonempty static reclip and
|
||||
ordered-body context, then real actor callbacks and retained helper cleanup.
|
||||
Keep the current live solver and924ad2f packages while those gates remain.
|
||||
|
||||
## Objective
|
||||
|
||||
Establish the original ownership and timing of player state across gameplay,
|
||||
|
||||
@@ -66,6 +66,13 @@ then calls the wheel-construction hook; existing Scooter documentation covers it
|
||||
four wheel objects. Old Jeep teardown/deletion and complete retained ordering
|
||||
remain open; no leak or new carry/reset policy is inferred.
|
||||
|
||||
2026-11-07 [teardown follow-up](dynamic-context.md#helper-teardown-follow-up):
|
||||
Jeep constructor42129A pushes1 into470F40, storing authored+11 and live+139;
|
||||
Init restores that value. Default Jeep is eligible for ordinary deletion.
|
||||
Thirteen guarded sites/five bindings also establish three live-predicate reads
|
||||
around cleanup20/34. This narrows default eligibility, while active callback
|
||||
mutations, child cleanup, deletion sweep and final retained order remain open.
|
||||
|
||||
## Implementation consequence
|
||||
|
||||
The live port reconstructs selected actors and bounded body records per scene.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Compatibility and validation
|
||||
|
||||
2026-11-07 dynamic-context checkpoint:17 copied-original mode2/static reclip
|
||||
observations match the C# test composition in full, including XYZW, shared
|
||||
nearest/hit/old polygon, callback/setter/pass counts and mode. All12 instrumented
|
||||
kernel triangle/normal arguments also match. A retained diagnostic intentionally
|
||||
fails with construction winding despite the same final position. The source
|
||||
static grid is empty, transforms/callbacks are synthetic and mode starts0;
|
||||
nonempty/reentrant/live actor behavior is not established. All345 Python tests,
|
||||
17 fixed context cases,11 static groups,10 dynamic groups and28 pair cases pass.
|
||||
539 originals and both924ad2f packaged DLLs/BUILD-INFO are unchanged. No runtime
|
||||
code, package refresh, new GPU run or native Windows execution is claimed.
|
||||
See [shared context and helper follow-up](checkpoint/dynamic-context.md).
|
||||
|
||||
2026-11-06 physical-registration continuation:12 copied-code registration/loader
|
||||
cases pass with complete emitted callback/order/count/flag/transform checks.
|
||||
All72 VR04 records/13 class interfaces are inventoried, with a bounded catalogue
|
||||
|
||||
@@ -403,3 +403,12 @@ assets and generated packages stay excluded.
|
||||
neither visibility nor an exposed InitPhysics method establishes membership.
|
||||
Do not synthesize a full live body count or retained re-entry from the72-record
|
||||
serialized partition. See checkpoint/physical-registration.md.
|
||||
57. **Preserve shared context and validate kernel arguments before live admission.**
|
||||
Full47A5E0 execution retains old hit/last polygon and can issue its static
|
||||
callback after a dynamic hit. Final local-root publication overwrites callback
|
||||
changes unless inhibited. Seventeen complete comparisons pass in a test-only
|
||||
composition. Kernel A,C,B/retained construction normal is confirmed by all12
|
||||
captured arguments; a same-position match with wrong nearest state was rejected.
|
||||
Keep source topology and kernel boundary distinct. Empty-grid/synthetic actor
|
||||
results do not admit live scene collision. Guard default Jeep deletion while
|
||||
leaving cleanup-mutated active lifetime open. See checkpoint/dynamic-context.md.
|
||||
+21
-1
@@ -1,4 +1,4 @@
|
||||
# Progress — 2026-11-06
|
||||
# Progress — 2026-11-07
|
||||
|
||||
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.
|
||||
@@ -7,6 +7,26 @@ Next-work plan: [recover interactions, then implement verified changes](checkpoi
|
||||
It defines the Carl source/differential gate, the bounded implementation step,
|
||||
movement/contact/animation recovery and the end-to-end platform checkpoint.
|
||||
|
||||
## Dynamic response and shared context
|
||||
|
||||
[Dynamic context](checkpoint/dynamic-context.md) adds17 complete original/C#
|
||||
component comparisons and12 captured kernel triangle/normal argument matches.
|
||||
The original box query retains old hit/last-polygon state, can issue an old
|
||||
static callback after a dynamic hit, and overwrites callback root mutations at
|
||||
final publication unless box response is inhibited. A same-position/wrong-state
|
||||
comparison exposed kernel A,C,B winding relative to construction A,B,C; captured
|
||||
arguments confirm it. The composition is test-only, not live scene collision.
|
||||
|
||||
The helper follow-up guards13 sites/5 Jeep bindings: default Jeep is eligible
|
||||
for ordinary deletion, with three live-predicate reads around cleanup hooks.
|
||||
Active cleanup, child lifetime and retained physical ordering remain open.
|
||||
Two new REA pseudocode results and complete instruction Evidence support this
|
||||
chunk;46DFF0 remains an unrecognized-procedure error. All345 Python checks,
|
||||
17 context,11 static,10 dynamic and28 pair cases/groups pass;539 originals and
|
||||
both924ad2f packages remain unchanged. No new platform runtime claim is made.
|
||||
Next: nonempty static reclip/ordered-body context, real actor callbacks, and
|
||||
retained helper cleanup before bounded live admission.
|
||||
|
||||
## VR04 registration and generated-helper continuation
|
||||
|
||||
[Physical registration](checkpoint/physical-registration.md) now covers all72
|
||||
|
||||
@@ -5,6 +5,12 @@ offsets, virtual addresses, API symbols or observed behavior. Decompiled output
|
||||
evidence, not original source. Original gameplay has not yet been observed successfully; isolated original DLL
|
||||
probes and modern runtime checks are recorded separately.
|
||||
|
||||
- [Dynamic box/shared context](checkpoint/dynamic-context.md): full47A5E0 plus
|
||||
static reclip/kernel execution,17 complete C# composition comparisons and12
|
||||
captured kernel triangle/normal arguments. Nearest reset, retained hit/last
|
||||
polygon, callback effects and publication are bounded source/component facts.
|
||||
Jeep default deletion eligibility has13 guarded sites/5 bindings; complete
|
||||
cleanup and live actor/shared-world integration remain open.
|
||||
- [Physical registration](checkpoint/physical-registration.md) and
|
||||
[generated helpers](checkpoint/vr04-generated-bodies.md): all72 VR04 serialized
|
||||
records/13 RTTI interfaces;12 original registration/loader cases;21 helper
|
||||
|
||||
@@ -81,6 +81,13 @@ Execution order and acceptance criteria: [next work plan](checkpoint/next-work-p
|
||||
owner-driven fire/Baseball re-entry from constructor-only or conditional helpers.
|
||||
Full live body counts and retained helper cleanup remain open. See
|
||||
checkpoint/physical-registration.md and vr04-generated-bodies.md.
|
||||
- [x] Execute complete dynamic-box query/shared static reclip in17 bounded
|
||||
original cases; match full C# snapshots and12 captured kernel arguments.
|
||||
Preserve old polygon/hit, post-callback publication and kernel winding.
|
||||
Guard Jeep default teardown eligibility separately from full cleanup. See
|
||||
checkpoint/dynamic-context.md; no live pair admission is enabled.
|
||||
- [ ] Extend dynamic reclip to nonempty static geometry/ordered bodies, real
|
||||
actor callbacks and cleanup-mutated helper lifetime before live integration.
|
||||
|
||||
- [x] Expand original lifecycle coverage:96 Carl contact,8 composed input/
|
||||
controller/skip-prefix,48 task/objective and140 base/STOP cases; recover complete
|
||||
|
||||
Reference in new issue
Block a user