Recover actor normal callbacks and late collision reads

This commit is contained in:
UnixNight committed 2026-11-07 19:36:26 -05:00
1 parent bf876e9c3c
commit bdca29d3aa
19 files changed
+963 -1

No files matched your search

+210
View File
@@ -0,0 +1,210 @@
# Original normal callbacks and late scalar reads
2026-11-07. Continues [populated reclip](dynamic-reclip.md). Thirty complete
emitted original/C# fixture snapshots now match exact float32 values and event
order. `OriginalNormalContacts` implements the bounded inherited ceiling/wall/
reflection callbacks as a standalone component. Live actor admission and the
current body/profile wiring are unchanged.
## Evidence, layout and class coverage
Canonical Neutron.exe SHA-256:
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
Retained complete REA instruction Evidence:
`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`.
`tools/binary/actor_contact.py` guards17 complete bodies,139 relocation operands,
13 actual VR04 interfaces/182 method bindings and5 scalar getters. Source hashes,
table/file offsets and pointer displacements are local in
`artifacts/actor-contact/native/source.json`. Text offsets below equal VA−400000;
the helper uses actual PE mapping.
| Callback VA / file offset | Owner / complete span |
|---|---|
|42A660 /2A660|Jimmy374, through42A714.|
|43AA40 /3AA40|Player material policy, through43AFE3.|
|472690 /72690|Inherited370 positive-Y response, through47274A.|
|458890 /58890|Inherited374 reflection gate, through4588CD.|
|472750 /72750|Inherited378 reflection/heading impulse, guarded through472970.|
|409590 /9590|Soldier374 override, through4095EE.|
Prior REA pseudocode is reused for472690
(`ev_122849f87121b02fefe6a3a443f75c7f02fee30c59c816b617d30e1f98fc2cff`),
458890 (`ev_2e4ec83ea68f06777162a80ab45793cff068e973dc248556d4a408932d24c85a`)
and43AA40 (`ev_4f2a6aa666451db831efd46f5c587573e22d8072315626b8bc2f844f9c6f0cae`).
The new REA/Ghidra requests for409590 and4098C0 both report unrecognized
procedures. Their complete failures, export and closed-session snapshot are
retained under `artifacts/actor-contact/rea/`; no successful pseudocode is
attributed to them. Existing REA instructions, canonical bytes and new copied-code
execution support the bounded caller findings instead. Earlier unrecognized
42A660/472750 requests were not repeated.
Jimmy game table4A373C selects374→42A660; soldier4C19C4 selects409590;
Rocketship4B25AC selects43E8D0 and its separate370→43EB70. The other10 serialized
VR04 interfaces use374→458890. All13 bind378→472750. Tables and complete-object
displacements are recorded separately: some interfaces are+C8 rather than+C0.
Class bindings do not establish active physical membership or constructor defaults.
The sampled offsets are class-specific beyond the shared base. Soldier608 is an
integer state; Jimmy608 is its controller speed float. Player704 movement mode
is separate from physical collision mode178. The composition fixes178 to0;
the direct `jimmy_mode2` fixture changes704, not box-vs-box collision mode.
Snapshot labels do not define a universal actor structure or shared mode enum.
All13 share these pure live-field getters:
| Slot → function VA / file offset | Interface-relative field / use |
|---|---|
|1D0→4718F0 /718F0|byte13C, per-body geometry permission.|
|1D8→471910 /71910|byte13D, inherited wall-reflection gate.|
|1E0→471930 /71930|byte137, box response inhibition.|
|248→471AD0 /71AD0|float150, wall damping.|
|260→471B30 /71B30|float15C, live radius.|
These are source field/read facts. The native fixtures supply explicit accessor
stubs so they can log reads and inject changes; they do not execute these getters
on constructor-created actors. Scene global4F69E5 is a different owner from1D0.
The constructor/property/Init lifetimes of these fields are not established by a
vtable binding alone.
## Recovered policies and state transitions
**Jimmy:**42A660 forwards to43AA40 on ordinary selections, including−1 and
jetpack3.43AA65 explicitly accepts a null polygon, using material sentinel−1.
Neither ordinary/null contact nor rejected elapsed<=3 material contact reaches
generic reflection378. Test modes0/1/2 and raw-control NULL preserve velocity,
acceleration, angular state and root; no control query occurs in this handler.
VR04 has no special material IDs, as previously established in
[material contacts](collision-contact-callbacks.md). Actual lab/outside hazard,
FENCE and LADDER success remain separate gates.
The additional gadget7/active branch zeros globals4F82BC/C0, tests their prior
two-component magnitude **strictly greater than60**, then invokes complete204
and sets interface1D65.36/48 is equality and issues no204;36/49 does. Our204 is a
record-only endpoint, not the actual429C10 cleanup. This does not change live
grappler behavior or recover every cleanup effect.
**Inherited ceiling370:**472690 reads velocity, clears strictly positive Y
through2C0, then independently reads acceleration and clears its positive Y
through274. Negative channels survive independently. There is no generic
position, movement-mode, jump or control reset. The adapter distinguishes full
Vec4 writes from the wall callback's XYZ setter.
**Inherited wall374/378:**458890 first reads1D8; false returns before velocity
normalization.472750 snapshots horizontal velocity, stores its quick magnitude,
normalizes with the retained quotient and reflects using the supplied normal.
It reads velocity again for live Y, then248 damping, then publishes XYZ through
2C4. Damping is not clamped:1.25 reverses the damped horizontal result.
After publication, the source calls copied OMT `angles` twice: old normalized
horizontal direction, then normalized reflected horizontal direction **before
damping**. It wraps oldHeading−newHeading once at strict±180 and adds angular Y:
```
heading delta degrees × old horizontal quick magnitude × float32(0.001)
```
The factor is4D5FD8; angles import48D108 is
`?angles@OMedia3DVector@@QAEXAAF0@Z`. The source's raw yaw uses the14-bit circle,
e.g.9870 and14706 for the oblique fixture. `OriginalHeading.Angles` is a signed
consumer view; masking yaw with16383 recovers that raw circle. Its behavior is
unchanged; its comment now makes the distinction explicit.
Axis velocity(0,7,−40), normal+Z, damping.25 gives velocity(0,7,30) and angular
Y9.20000076 from initial2. Oblique(30,7,−40) gives velocityX22.5000019 and
angularY−3.31300402. Angular response remains independent of damping. A synthetic
second velocity getter returningY99 proves that the second read owns the
published Y; it is an accessor-order test, not observed spontaneous actor mutation.
**Soldier:**409590 calls generic458890 first. It then checks interface608==10
and, independently of reflection being enabled, calls complete174 with force500
and the supplied normal. Complete table4C1E64+174 targets4098C0. That callee
begins by advancing RNG through509A40 twice, then reaches target/action-dependent
branches. Its complete policy is not executed here. The fixture records174 and
optionally changes scalar fields to test the enclosing caller, not to claim
that the real soldier naturally performs those changes.
## Dynamic composition and late ownership
Three cases invoke complete original47A5E0 with real Jimmy/generic/soldier normal
callbacks. Four more use the soldier's record-only174 endpoint to change one
dependency after its dynamic callback:
| Injected change | Original/C# result |
|---|---|
|Box inhibition=true|Contact remains true; root staysZ15, radius reads[10], no static pass or314.|
|Radius10→20|Reclip reads[10,20,20], rootZ55 against wallZ35; cached10 would give45.|
|Scene geometry=false|Static primitive is skipped but retained polygon still gives a second normal callback; rootZ20.|
|Sphere42C=true|Static force flag is visible to reclip; rootZ45, radius reads[10,10,10].|
Static callbacks can therefore run the full generic/soldier chain again. In
these fixtures, the second reflection gives velocityZ−22.5 and angularY3.80000067.
The final local root still publishes after callbacks. There is no added implicit
context reset or root-changed guard.
The C# dynamic composition remains test-only. Its static getters are fixed
between primitive passes; the fixture records repeated identical radius reads
before the sole terminal callback. This is not a reusable live getter/reentrant
dispatcher, linked-list mutation policy or proof of real actor registry ordering.
## Probe correction and implementation boundary
The initial numeric relocation scan selected bytes4095BE..C1 (`8B C4 68 00`)
spanning `mov eax,esp` and `push500`, misreading them as pointer68C48B. It also
selected other cross-instruction sequences. This corrupted the **private probe
image**, causing a derived-dispatch fault. Those partial runs are invalid source
behavior evidence and are retained as diagnostic failures only. Originals were
never patched. The corrected generator uses37 individually reviewed callback
operands within complete REA instructions:139 total rather than152. A regression
explicitly rejects4095BE and guards the original seven bytes. The final30-case
capture exits0 with all source/probe hashes verified.
`OriginalNormalContacts` and `IOriginalNormalBody` preserve the recovered getter/
setter order, XYZ/full-vector distinction, reflection and angular tail. The
standalone component is not substituted into the live Baseball, Jimmy or NPC
profiles. Zero horizontal normalization remains an explicit unsupported source
arithmetic boundary; the component throws rather than silently admitting a new
policy. A disabled reflection gate returns before that boundary. General x87,
arbitrary normals and zero/degenerate cases are not certified by these fixtures.
`tests/GamePort.ActorContactTests` keeps30 fixed snapshots and can compare the
generated native observations with `--native`; `--dump` plus the Python helper's
`--managed` produces complete exact-float32 differences. Snapshots include roots,
velocity/acceleration/angular XYZW, two modes, marker/tether, derived endpoint
calls/arguments, flags, radius samples, raw angle arguments/results, context
counters/limits and the full emitted accessor event order. Jimmy no-effect paths
and the two derived endpoints are bounded fixture logic, not complete new Player,
grappler or soldier implementations.
## Next chunk
Recover the soldier174 policy and helper cleanup/activation/physical order across
LOAD/RETURN; retain special Jimmy material and gadget gates. The next response
adapter must preserve post-callback1E0, live radius/42C and per-node scene-geometry
ownership, and may admit only explicitly supported actor states. Keep lab/outside
capsule and current VR04 static body while those dependencies remain. Final tests,
build identities and runtime limits are recorded in progress.md/compatibility.md
and `artifacts/actor-contact/validation.json`.
Reproduce after preparing and fully copying the disposable Wine prefix:
```sh
python3 tools/binary/actor_contact.py ../Original --output artifacts/actor-contact/native
i686-w64-mingw32-gcc -O0 -Wall -Wextra -Wno-unused-function -o artifacts/actor-contact/native/probe.exe artifacts/actor-contact/native/actor_contact_probe.c
python3 tools/recon/reference_capture.py --asset-probe --probe-executable artifacts/actor-contact/native/probe.exe --probe-success ACTOR_CONTACT_COMPLETE --seconds 45 --output artifacts/actor-contact/probe
python3 tools/binary/actor_contact.py ../Original --output artifacts/actor-contact/native --capture artifacts/actor-contact/probe
source scripts/env.sh
dotnet run --project tests/GamePort.ActorContactTests -- --native artifacts/actor-contact/native/observations.json
```
Normal response is separate from pair enter/stay/leave notifications and their
game/task effects; those real consumers remain an admission gate too. In
particular, an inhibited position response does not cancel pair membership.
Verification:352 Python checks,30 native/fixed managed snapshots,5 sphere groups,
11 static groups,20 ordinary-body groups,100 complete body-ownership comparisons
plus6 bounded state cases,28 pair cases,17 prior context cases and14 populated
reclip/12 kernel steps pass. Linux Debug builds with zero warnings/errors;
Windows x64 self-contained cross-publish succeeds. All539 originals and both
924ad2f packaged DLLs/BUILD-INFO remain unchanged. No new SDL/Vulkan or Windows
execution is claimed; the latest integrated render/native SDL evidence belongs
to bf876e9. This unused component does not change live profile wiring.