136 lines
8.9 KiB
Markdown
136 lines
8.9 KiB
Markdown
# Contact-owned Vec4 root publication
|
||
|
||
2026-11-05. Follow-up to [body composition](collision-body-composition-source.md)
|
||
and [special contacts](jimmy-special-contact.md). This closes one body-state
|
||
boundary; it does not enable special contacts or replace the lab/outside capsule.
|
||
Original Neutron.exe SHA256:
|
||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||
|
||
## Source structures and phases
|
||
|
||
All VAs below are independently PE-mapped; raw offsets equal VA−400000 for these
|
||
ranges. REA's retained complete EXE disassembly is
|
||
`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`,
|
||
artifacts/jimmy-movement-audit/rea-original-disassembly.json. Earlier body Evidence
|
||
`ev_5439072b32ae9f9208795ad2b07bc524e2407b46da487072fb3dfd8c10e7c4b0`
|
||
and its prototype limitations remain in the composition report. No unchanged
|
||
failed Ghidra selector was repeated. Instructions establish the following facts;
|
||
original component execution corroborates their numeric consequences below.
|
||
|
||
Jimmy uses the game interface at complete+C0. **Data** previous-root Vec4 is
|
||
interface1F4/1F8/1FC/200 (complete2B4..2C0); current-root Vec4 is
|
||
interface214/218/21C/220 (complete2D4..2E0). These are not same-numbered virtual
|
||
slots. Vtable4A373C binds previous getter2F8→4721E0, previous setter2FC→472240,
|
||
live getter310→472300 and Vec4 setter314→472360. Each getter copies all four
|
||
floats into the caller buffer.314 is a plain four-float store; unlike XYZ318's
|
||
472330 wrapper, it does not immediately call3DC. Full logical/render publication
|
||
ownership therefore remains distinct from the body-state store.
|
||
|
||
| VA / raw offset | Recovered operation |
|
||
|---|---|
|
||
|47A084 /7A084|After integration and before world dispatch, copy current full Vec4 into previous2FC. A stale initial previous root does not survive this boundary.|
|
||
|47A0D6 /7A0D6|Positive displacementY:47B4B0 receives fullXYZ.|
|
||
|47A10F..47A11F /7A10F..7A11F|NonpositiveY:47B4B0 receives XZ/zeroY, then add the original already-computed fallingY to the **candidate**, after dispatcher/contact returns.|
|
||
|47B80F /7B80F;47B82E /7B82E|Dispatcher terminal374/370 receives actor/normal/polygon, not the candidate pointer. The bounded dispatcher call closure has no actor310/314/2FC root publication before those callbacks. It modifies the separate candidate.|
|
||
|47A12C /7A12C;47A13D /7A13D|After dispatch/contact, read fresh previous2F8 and then fresh current310 into separate stack buffers.|
|
||
|47A143..47A181 /7A143..7A181|Compare X,Y,Z,W. Only equality through all four comparisons reaches candidate publication.|
|
||
|47A187..47A1C4 /7A187..7A1C4|Only the permitted candidate has Y clamped to−25000, then full Vec4 is stored through314. A rejected callback-owned live root is neither displaced nor clamped here.|
|
||
|47A22A..47A235 /7A22A..7A235|Support eligibility is read afterward. Support47B890 can run even when publication was rejected; it reads current/previous afresh.|
|
||
|
||
For admitted finite values, the useful projection is:
|
||
|
||
```
|
||
previous = live // world branch entry
|
||
candidate = dispatch(entry, full or XZ delta)
|
||
if falling: candidate.Y += precontactDelta.Y
|
||
previousNow = getPrevious(); liveNow = getLive()
|
||
if previousNow.XYZW == liveNow.XYZW:
|
||
candidate.Y = max(candidate.Y, -25000)
|
||
setLive(candidate) // candidate W, not callback W
|
||
supportIfEnabled() // uses current/previous now
|
||
frictionAndSuppression() // source state remains independently owned
|
||
```
|
||
|
||
This is not `callback changed Position => skip`: changing **both** previous and
|
||
live to equal values permits the old candidate to overwrite that change. Changing
|
||
only previous can reject publication even when live XYZ stayed at entry. Changing
|
||
only W can reject it even when all XYZ match. The initial entry root remains a
|
||
useful diagnostic, but must not substitute for the fresh source previous record
|
||
when the support phase runs.
|
||
|
||
## Original execution and observations
|
||
|
||
The generated probe executes full copied479D20, real47B4B0/grid/kernel and, in two
|
||
cases, real47B890/support. It reuses the independently guarded
|
||
body_step_probe.c mapper and synthetic virtual/body/grid contracts. A broad
|
||
synthetic vertical wall produces one actual terminal374 contact per case.
|
||
The custom contact mutates body records; it is not a recovered climb/hazard
|
||
mechanic. A wrapper at the support CALL either logs/no-ops to isolate candidate
|
||
publication or calls the unchanged original47B890. No game entrypoint, script,
|
||
animation, audio or GPU is executed. Original files are not modified/executed in
|
||
place; the existing reference_capture sandbox mounts only a separate copied
|
||
installation, disables networking and uses a generated Wine32 prefix.
|
||
|
||
19 final cases exit0 and print BODY_ROOT_PUBLICATION_COMPLETE. Native output,
|
||
capture.json, generated source/header and source hashes are under
|
||
artifacts/body-root-publication/. The committed fixture is
|
||
`tests/body-root-publication-reference.json`; its input/flag schemas and source,
|
||
shared harness, probe executable and output hashes are recorded. Build output is
|
||
kept in build/ separately from the Wine prefix: output-symlink protection
|
||
intentionally rejects generating over a directory containing prefix symlinks.
|
||
|
||
Representative observations (entry=(0,20,20,1), radius10, factor1.265,
|
||
velocity=(0,−120,−900), dt1/60):
|
||
|
||
| Contact action | Final live / previous effect | Publication |
|
||
|---|---|---|
|
||
|None|Live(0,17.7777786,10,1)|Allowed; original gravity and old falling delta applied.|
|
||
|Change liveX to100|Live(100,20,20,1), previous remains entry|Rejected; no old fallingY is added to live.|
|
||
|Change previousX to100|Live remains entry|Rejected even though live itself did not move.|
|
||
|Change liveW to2 or previousW to2|XYZ remains entry; changed W is retained|Rejected.|
|
||
|Set both XYZ to(101,250,303)|Old candidate overwrites live; previous remains(101,250,303,1)|Allowed because fresh roots are equal.|
|
||
|Set both W to2|Old candidateW1 overwrites liveW; previousW2 remains|Allowed; retaining callback liveW would be incorrect.|
|
||
|Set liveY to−30000|Callback-owned liveY remains−30000 in isolated-support case|Rejected, so candidate clamp does not clamp live.|
|
||
|EntryY−26000, no root mutation|LiveY−25000|Allowed candidate is clamped.|
|
||
|Entry previous=(999,999,999,3)|Contact sees entry previous=(0,20,20,1)|World branch resets previous before callback.|
|
||
|
||
The unchanged upward case endsY23.1111107; upward liveX/W mutations reject just
|
||
as downward ones do. `callback_motion` consumes an initial impulse30 before the
|
||
contact (seenVy≈−103.3333), then the contact writes velocity(9,8,7),
|
||
acceleration(4,5,6), pendingImpulseY77. Those new fields survive. The root still
|
||
uses the precontact falling delta and endsY18.2777786; the new positiveVy8 is not
|
||
integrated again during this pass.
|
||
|
||
Event strings corroborate ownership: C=terminal contact, R=fresh previous read,
|
||
L=fresh live read, P=candidate Vec4 publication, S=support CALL. Permitted cases
|
||
are `CRLPS`; rejected cases `CRLS`. The two original-support cases continue
|
||
`CRLSRL`, proving support reads both records after rejection. With contact-owned
|
||
live=(101,5,303,1), real support raises rootY12.6499996, zeros Vy, sets support
|
||
and emits one landing. Therefore rejection is not a blanket return from physics.
|
||
|
||
## Verification and implementation boundary
|
||
|
||
Four Python groups pass: original identity/ranges/12 publication anchors/four
|
||
bindings/four root leaves; all19 saved boundaries and call ordering; generator/
|
||
shared-harness provenance; original/output/symlink isolation. Commands:
|
||
|
||
```
|
||
python3 -m unittest discover -s tests -p test_body_root_publication.py -v
|
||
python3 tools/binary/body_root_publication.py ../Original --generate-probe artifacts/body-root-publication/build
|
||
i686-w64-mingw32-gcc -O0 -I tools/binary -I artifacts/body-root-publication/build artifacts/body-root-publication/build/body_root_publication_probe.c -o artifacts/body-root-publication/build/body_root_publication_probe.exe -lm
|
||
python3 tools/recon/reference_capture.py --asset-probe --probe-executable artifacts/body-root-publication/build/body_root_publication_probe.exe --probe-success BODY_ROOT_PUBLICATION_COMPLETE --seconds 15 --output artifacts/body-root-publication/probe
|
||
```
|
||
|
||
Parent owns runtime integration and managed conformance. Preserve live Vec4 W and
|
||
fresh previous Vec4; call a contact with live root state rather than candidate.
|
||
After it returns, compare those records before applying candidate/clamp. Keep
|
||
callback velocity/acceleration/queued impulse, and pass fresh previous into
|
||
support. A legacy entry-position diagnostic may remain a distinct output.
|
||
|
||
Confidence is high for these guarded finite component cases. Nonfinite/x87
|
||
unordered comparisons, arbitrary callback-driven flag/radius/material mutations,
|
||
actual special animation handlers and their root/previous policies, real dynamic
|
||
pairs/shared context, whole-original movement and native Windows gameplay remain
|
||
separate gates. This report makes no lab/outside source-body admission claim and
|
||
changes no runtime/shared documentation or existing fixtures/tests.
|