Recover and verify static collision traversal and body contracts
This commit is contained in:
1 parent
7c0d1a4b0c
commit
df0263b26e
34 files changed
+1962
-17
No files matched your search
@@ -33,6 +33,12 @@ C4 continuation: [sphere response](collision-response.md),
|
||||
[ceiling wrapper](ceiling-wrapper.md) and [physical re-registration](body-root-registration.md).
|
||||
The source kernel is isolated/probed; live capsule replacement remains gated.
|
||||
[Shared camera handoff](camera-handoff.md) records the next C5 state correction.
|
||||
The next C4 chunk adds [grid traversal](collision-grid-traversal.md),
|
||||
[contact/material/friction ownership](collision-contact-callbacks.md) and
|
||||
[dispatcher/body component probes](collision-body-probe.md). The source dispatcher
|
||||
is implemented and compared with isolated original outputs; whole-body/live
|
||||
integration and special contacts remain gated. [Independent review](collision-integration-review.md)
|
||||
records corrections and remaining limits.
|
||||
|
||||
Evidence labels used throughout:
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
# C4 dispatcher and ordinary-body component evidence
|
||||
|
||||
2026-10-26 continuation, verified2026-10-27 UTC. Original EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
Originals remain unchanged. This report separates copied-code component execution
|
||||
from the playable port, full original game behavior and native Windows testing.
|
||||
|
||||
## Recovered contracts and evidence
|
||||
|
||||
The [grid report](collision-grid-traversal.md) recovers47B4B0 recursion, frozen
|
||||
query bounds, repeated FIFO cell visits and terminal callback ownership. The
|
||||
[contact report](collision-contact-callbacks.md) recovers370/374/37C, special
|
||||
material identity, separate published speed and friction. Those reports retain
|
||||
addresses, file offsets, byte guards, callers, structures and REA Evidence.
|
||||
|
||||
Additional closed/exported REA sessions in artifacts/collision-integration/:
|
||||
|
||||
| Procedure | Evidence | Contract |
|
||||
|---|---|---|
|
||||
|47A330|ev_8be4a538fe941bcf0ba77ce64f552d4f0e17969ea87713cec5d37d39bc560735|Supported/nonzero-linear friction; published160 gates caller.|
|
||||
|47C6E0|ev_ad96a93792dcf00534130fbd428fb52fa25e2cf9c2492df43f89f425b80c3f08|All-grid strict nearest support reduction, initial segment magnitude.|
|
||||
|471120|ev_90314124d5ab1c88911198ef9e8d43ad7cc9e096ca075757d29c5e15cf1f86eb|Authored float8 writes live suppression scale through234.|
|
||||
|470540|ev_c16f95e608194a8f9fb029430f1c6a01512d34099ebf447cf944946c79631166|Init copies authored flags/scalars through virtual setters.|
|
||||
|
||||
Body479D20 remains anchored by ev_5439072b32ae9f9208795ad2b07bc524e2407b46da487072fb3dfd8c10e7c4b0
|
||||
in artifacts/collision-response/rea-response/. Generated source.json reports
|
||||
PE-mapped offsets; the five added body hashes cover479D20/47A330/47B890/47C6E0/
|
||||
469A10, alongside ten existing dispatcher/kernel bodies. Hashes and relocation
|
||||
sites are checked by test_body_step_evidence.py; no arbitrary scan of executable
|
||||
values is used at execution time. Short accessor recognition failures in rea-body
|
||||
are retained beside successful replies, not represented as decompilation success.
|
||||
|
||||
## Isolated execution boundary
|
||||
|
||||
tools/binary/collision_dispatch_probe.c and body_step_probe.c map a generated,
|
||||
hash-checked EXE copy into their own32bit process. Preferred-base mapping was
|
||||
unavailable; existing guarded mapper rebases only explicit in-memory operands.
|
||||
Fixtures supply synthetic grids, shape/polygon/corner arrays and virtual methods;
|
||||
the body fixture supplies ordinary flags, radius60, factor1.265, friction0.8,
|
||||
suppression scale0.5 and gravity(0,−800,0). No game entry point, full Jimmy
|
||||
instance, source window/input/audio/script lifecycle or dynamic body pass runs.
|
||||
Landing37C is an observer fixture; real ordinary Jimmy37C is a no-op.
|
||||
|
||||
reference_capture.py runs a separate generated Wine prefix/copy with no network
|
||||
and no original-directory mount. Sources/header/identity metadata and logs are
|
||||
under artifacts/collision-integration/dispatch/ and body-probe/. Initial fixture
|
||||
failures are preserved: a missing Euler328 virtual was diagnosed and supplied,
|
||||
and direct member42C has allocated zero storage. Those were harness omissions,
|
||||
not original game defects. Automatic approval review temporarily failed due its
|
||||
usage limit; after its stated reset time, a normal reviewed retry succeeded.
|
||||
|
||||
## Observed dispatcher results
|
||||
|
||||
All seven original fixtures completed with DISPATCH_COMPONENT_COMPLETE. Managed
|
||||
OriginalStaticCollision regressions compare these positions and exact counts.
|
||||
|
||||
| Fixture | RootXYZ | Passes / primitive visits | Terminal callback |
|
||||
|---|---|---|---|
|
||||
|face retry|0,20,10|2 /4|wall0|
|
||||
|edge retry|107.071068,100,7.07106781|2 /2|wall0|
|
||||
|edges disabled|105,100,5|1 /1|none|
|
||||
|zero motion|0,20,20|0 /0|none|
|
||||
|forced zero/member42C|0,20,20|1 /2|none|
|
||||
|corner retry|5,20,10.000001|2 /8|wall0|
|
||||
|ceiling retry|0,90,0|2 /8|ceiling0|
|
||||
|
||||
## Observed body results
|
||||
|
||||
All ten copied479D20/support fixtures completed with BODY_COMPONENT_COMPLETE;
|
||||
finite-output assertions pass. These are observations for the next body adapter,
|
||||
not claims that a managed full-body equivalent already exists. dt is float1/60;
|
||||
all unspecified vectors are zero. Initial previous support is false except jump.
|
||||
|
||||
| Fixture | Initial distinction | Observed result |
|
||||
|---|---|---|
|
||||
|floor support|RootY75.9|Y75.9000015, supported, callback sees Vy−13.333334/support=false.|
|
||||
|spawn settle|RootY26|Same support root/landing observation.|
|
||||
|pending jump|Supported, impulseY550, accelerationY−264|Y84.7711105, Vy532.266663, unsupported; impulse consumed.|
|
||||
|fall above floor|Y100, Vy−200|Y96.4444427, Vy−213.333328, unsupported.|
|
||||
|fall land|Y76, Vy−200|Y75.9000015, Vy0; callback sees old Vy−213.333328/support=false.|
|
||||
|ground friction|V(100,0,50), angularY12, published speed0|Root(1.66666675,75.9000015,0.833333373); V(98.6666641,0,49.3333321), angularY11.8400002.|
|
||||
|published speed|Same vectors, published speed100|Same root; V(100,0,50), angularY12, no friction.|
|
||||
|stationary angular|Linear0, angularY12|AngularY12 remains; zero linear magnitude skips angular friction.|
|
||||
|small motion|Vx0.125|RootX0.00208333344 then velocity suppressed to0.|
|
||||
|geometry disabled|Vy200, accelerationY−264|Y75.9000015, Vy0, accelerationY800, supported, no landing callback.|
|
||||
|
||||
The geometry-disabled branch479DF7..479E54 sets supported, anchor and acceleration
|
||||
before impulse/integration. It does not test prior grounded state. This corrects
|
||||
the earlier C3 support-cancellation interpretation. With geometry enabled, the
|
||||
jump fixture applies acceleration and gravity normally.
|
||||
|
||||
## Implementation and remaining gate
|
||||
|
||||
OriginalStaticCollision is currently an isolated source dispatcher/support-grid
|
||||
component, invoked by tests. It preserves duplicate visits, retry state, negative
|
||||
Z upper-bound quirk and terminal publication. Its explicit geometry-enable input
|
||||
skips primitive calls but preserves terminal callback. TraceSupport uses strict
|
||||
nearest reduction. The256-pass rejection is a defensive port boundary; original
|
||||
recursion has no recovered depth limit. Double cell intermediates/modern quick
|
||||
magnitude tables do not promise exact x87 boundary equivalence. Triangular route
|
||||
metadata is required; general polygon fans are rejected by duplicate identity.
|
||||
|
||||
Prepared scenes now include signed3DMa archive IDs. Mesh keeps an explicit
|
||||
identity-completeness flag; source grid construction rejects old prepared metadata.
|
||||
Camera behavior is unchanged. Lab/outside contain special fence/climb/ladder IDs;
|
||||
VR04 contains none. This is a scene-data fact, not proof every lab trajectory
|
||||
contacts one or that all Player374 policies are implemented.
|
||||
|
||||
Next coherent implementation: combine the proven dispatcher with ordinary body
|
||||
integration, negative-Y horizontal-first split, callback370, support/landing order,
|
||||
published160 friction and suppression, comparing the ten references above. Start
|
||||
with an explicit ordinary-contact subset (VR04); reject unsupported special policy
|
||||
rather than silently discarding it. Then test model/root support, airborne input,
|
||||
ceiling and tutorial/RETURN through the live adapter. Lab/outside require recovered
|
||||
special160/164/FENCE/LADDER policies and dynamic shared nearest/last-polygon/reclip
|
||||
ownership before replacement. Whole-scene registry/base transforms, camera shared
|
||||
eye, original end-to-end comparison and native Windows validation remain open.
|
||||
@@ -0,0 +1,253 @@
|
||||
# C4 contact callbacks, landing and friction
|
||||
|
||||
2026-10-26. Static recovery for original EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
Addresses below are preferred VAs; these text offsets are VA−400000. The helper
|
||||
maps PE sections independently and retains exact bytes, offsets, 20 virtual
|
||||
targets and six complete callback hashes in
|
||||
`artifacts/collision-integration/contacts/source-contract.json`.
|
||||
|
||||
## Recovered dispatch and state ownership
|
||||
|
||||
The game-interface pointer is complete object+C0. Slots below are relative to
|
||||
that interface, not the complete-object movement slots130/134.
|
||||
|
||||
| Class/interface table |370|374|378|37C|
|
||||
|---|---|---|---|---|
|
||||
|C3DObject4D3154|472690|458890|472750|472970|
|
||||
|C3DAnimated48FE1C|472690|458890|472750|472970|
|
||||
|C3DPlayer4AF6C4|472690|43AA40|472750|472970|
|
||||
|C3DJimmy4A373C|472690|42A660|472750|472970|
|
||||
|
||||
Static traversal47B4B0 publishes its candidate current root at47B7B1..BD,
|
||||
then reads last-hit polygon695D4C. If present, it copies polygon+8..14 normal
|
||||
and dispatches374 at47B80F if normal.Y is strictly greater than float32−0.7
|
||||
(4A3148, bytes333333BF); otherwise370 at47B82E. Equality dispatches370.
|
||||
The arguments are a by-value four-float normal and polygon pointer. This occurs
|
||||
after grid/triangle response, before the body's later support/friction phase;
|
||||
the supplied original stored normal is not derived from triangle winding.
|
||||
|
||||
370→472690 (raw72690, lengthBA) independently reads live velocity2BC and
|
||||
acceleration270. A strictly positive Y is set to zero through2C0/274;
|
||||
nonpositive Y and X/Z/W are preserved. It does not project against the supplied
|
||||
normal or change movement mode, jump latch, fire timer or horizontal speed.
|
||||
|
||||
Generic374→458890 (raw58890, length3D) checks interface1D8, then forwards the
|
||||
four-float normal to378→472750. Jimmy overrides374:42A660 (raw2A660,lengthB4)
|
||||
forwards to Player43AA40 at42A70B on the ordinary path. It does **not** enter
|
||||
generic374/378 on that path. Therefore generic reflection/projection must not be
|
||||
attached to every Jimmy wall contact merely because base378 exists.
|
||||
No-selection−1 and selected-jetpack3 both take this ordinary branch because
|
||||
neither equals7 (selection identities recovered in retained-return-cleanup.md).
|
||||
For a nonspecial metadata ID, neither state adds velocity, position, orientation,
|
||||
mode, jump or gadget-side effects through374. This bounds the route's supported
|
||||
states; it does not imply every material on the route is nonspecial.
|
||||
|
||||
Jimmy's gadget7 branch additionally checks global4F8210. When set, it invokes
|
||||
Player contact, zeros global4F82BC/C0, tests their prior two-component magnitude
|
||||
against60, and may invoke complete-object204 and set interface1D65. Those
|
||||
gadget effects remain outside ordinary-contact integration.
|
||||
|
||||
## Player material handler
|
||||
|
||||
43AA40 (raw3AA40,length5A3) first requires interface774 elapsed>3.0. The signed
|
||||
discriminator comes from polygon+4 → material+0C → database chunk+8; missing
|
||||
records produce no ordinary effect. The follow-up below proves this is the
|
||||
3DMa archive resource ID, not an additional custom payload flag. It remains
|
||||
distinct from a merged render-array index or texture resource ID.
|
||||
|
||||
| Metadata ID | Effect after elapsed gate |
|
||||
|---|---|
|
||||
|120..129|Calls complete-object160 with supplied normal.|
|
||||
|110..119|Calls complete-object164.|
|
||||
|60..69, only mode704==0|Additional rays/orientation/root/action handling ending in FENCE.|
|
||||
|180, only mode704==0|Additional rays/orientation/root/action handling ending in LADDER.|
|
||||
|Others|Returns without generic velocity projection or mode/jump reset.|
|
||||
|
||||
These are dispatch facts, not complete recovery of the four special policies.
|
||||
Complete160/164 effects and all ray success/failure transitions need separate
|
||||
tracing before implementation. The ordinary callback has no raw-control5099E4
|
||||
gate; controller ownership alone cannot justify suppressing contact effects.
|
||||
|
||||
## Material database identity and actual route coverage
|
||||
|
||||
OMT2.dll SHA256 is
|
||||
`3ec41ead011adf56387a6dbd4580e5b5a9721b5f8020c8a56420f42824354943`.
|
||||
The EXE chain above reaches OMediaDBObject's inherited database association:
|
||||
|
||||
| DLL VA / raw offset | Proven role |
|
||||
|---|---|
|
||||
|10030070 /30070, exported db_link|Arguments are database, OMediaFSChunk*, type.1003007F stores that chunk pointer in material/object+0C; chunk+0C is the reciprocal object pointer.|
|
||||
|10030260 /30260, DBObjectStreamLink::read_class|Reads link fourcc through100302B3 and signed long ID through100302BF;100302EE calls database get_object(type,ID), stores resulting material pointer in temporary streamlink+4.|
|
||||
|10003E20 /3E20, Polygon::read_class|10003F56 reads a temporary stream link;10003F5B obtains its pointer at temporary+4;10004277 calls set_material100043F0.10004408 publishes it in polygon+4, with material reference-count bookkeeping. The legacy-version path10004252..5E also uses set_material.|
|
||||
|1002DEF0 /2DEF0, DataBase::get_object(type,long)|Looks up the requested chunk through formatted-stream slots6C/74, then passes that chunk to object's virtual18/db_link at1002E0B0.|
|
||||
|10045B70 /45B70, FormattedStream::get_chunk(node,long)|Looks up signed ID in the chunk map, returns the corresponding chunk record (list-node+8).|
|
||||
|100464C0 /464C0, FormattedStream::load_header|100465A7 reads ID into stack58;100465B4/C1 read offset/size into stack50/54;10046638..46 insert record starting stack50. Thus ID is chunk record+8.|
|
||||
|
||||
The on-disk source is the 0MF2 resource-table entry's big-endian32 identity,
|
||||
not a field inside the 3DMa material payload. The payload parser's trailing BE16
|
||||
is3 for every used material in all three archives, including special and
|
||||
ordinary contacts. The helper records each material's exact table ID byte offset,
|
||||
separate payload offset/size/hash, archive hash, and source shape/polygon identity.
|
||||
Negative on-disk IDs require signed32 interpretation for policy comparisons;
|
||||
all special route IDs below are positive.
|
||||
|
||||
| Archive | Special ID | Non-NC polygons using ID | Wall-grid polygons eligible for374 |
|
||||
|---|---:|---:|---:|
|
||||
|level1b.omt|61|23|20|
|
||||
|level1b.omt|62|24|24|
|
||||
|level1b.omt|63|4|4|
|
||||
|level1b.omt|120|4|4|
|
||||
|level1b.omt|121|32|20|
|
||||
|level1b.omt|122|3|3|
|
||||
|level1b.omt|180|6|6|
|
||||
|VR04.omt|none|0|0|
|
||||
|level1.omt|60|62|62|
|
||||
|level1.omt|61|51|38|
|
||||
|level1.omt|62|38|26|
|
||||
|level1.omt|180|32|20|
|
||||
|
||||
Eligibility means registered shape and strictly−0.7<stored normal.Y<0.7:
|
||||
the lower test dispatches374; the upper test is wall-grid registration. Route
|
||||
checkpoint-name exclusions are zero (camera-ray-predicate.md). Counts do not
|
||||
prove a particular player trajectory hits these polygons. LV1B examples are
|
||||
crates/topcrate shapes76/77 with ID61, Box25/83 with62, Object07/91 with63,
|
||||
Plane41/51 and Object03/73 with120, Cylinder13/22 andCylinder14/23 with121,
|
||||
Object03/73 with122, Box31/93 with180. Level1 has fence/bush/blocks/ladder-class
|
||||
polygons; names are explanatory labels, not policy evidence.
|
||||
|
||||
The route cannot be declared ordinary-only. Preserve linked3DMa identity in
|
||||
CollisionPolygons, retain unsupported special callback boundaries, and test any
|
||||
ordinary-only integration against the actual contacted polygon's ID. Resource
|
||||
identity is now justified by the loader trace, rather than assumed from naming.
|
||||
|
||||
## Landing order
|
||||
|
||||
Support47B890's successful branch calls these virtuals in order:
|
||||
|
||||
1. 47BB32: publish root318.
|
||||
2. 47BB4B: acceleration278, Y=0, retaining original X/Z.
|
||||
3. 47BB5E: landing37C only if previous-support695D49 was false.
|
||||
4. 47BB74: velocity2C4, Y=0, retaining original X/Z.
|
||||
5. 47BB80: support21C=true.
|
||||
6. 47BB91/47BBA1: contact shape34C and polygon33C.
|
||||
|
||||
Jimmy37C→472970 (raw72970) is exactly `C3`/return. Thus the landing callback
|
||||
would observe the new root/zero vertical acceleration but old velocity/support;
|
||||
Jimmy itself adds no mode/jump/fire reset here. Controlled movement and the
|
||||
independent fire callback own their later grounded transitions. Do not merge
|
||||
these source phases into a universal landing-mode reset.
|
||||
|
||||
## Friction and speed publication
|
||||
|
||||
479D20 calls support47B890 at47A235 when interface1C8 permits it. It then reads
|
||||
268 at47A241 and calls47A330 at47A25A only if the returned scalar equals0.
|
||||
268→471B50 reads interface160. The controlled movement tail437C22 reads its
|
||||
current scalar speed608, pushes it at437C2A and publishes through26C at437C2D;
|
||||
26C→471B60 writes160. Publication follows ground/air apply and is skipped by
|
||||
the earlier ownership/modal gates. Treat published160 and controller608 as
|
||||
separate state with that copy point, not a fresh input query during friction.
|
||||
|
||||
47A330 (raw7A330,lengthF1) requires a nonnull body, support218=true and strictly
|
||||
positive imported quick_magnitude of the full linear XYZ vector. It reads
|
||||
friction248→471AD0/live150. It adds these deltas through2CC and2B8:
|
||||
|
||||
```
|
||||
linear delta = (-vx * friction * dt, 0, -vz * friction * dt)
|
||||
angular delta = (-wx * friction * dt, -wy * friction * dt, -wz * friction * dt)
|
||||
```
|
||||
|
||||
No multiplier clamp is present. Zero linear velocity skips angular friction too;
|
||||
pure vertical linear motion permits angular friction but leaves vertical speed.
|
||||
No controller pointer, movement mode, jump or animation state gates this helper.
|
||||
|
||||
The enclosing body's later suppression is distinct:230→471A70/live144 scales
|
||||
quick_magnitude. Angular magnitude×144 <=float32(0.1) zeros angular velocity;
|
||||
linear magnitude×144 <=0.1 zeros linear velocity only when268==0. The finite
|
||||
equality boundary is included by the AH&41 tests at47A2C5/47A2FA. The semantic
|
||||
name of144 is not established by this bounded contact investigation. Follow-up
|
||||
REA471120 and constructor46FE01..08 recover the default0.5; this is called a
|
||||
suppression scale in the implementation plan without assigning physical units.
|
||||
|
||||
Constructor byte confirmation: generic46FDC8→470FA0 sets1C8/live13B true;
|
||||
46FDD1→470FD0 sets1D0/live13C true;208/live13A starts false at46FDBF but
|
||||
Player43740D→470F70 overrides it true (EDI=1).220/live140 defaults true through
|
||||
46FDF4→4710C0 (authored18);228/live141 defaults false through46FDFC→4710F0
|
||||
(authored19). Generic46FFB1 writes interface42C=BL=0, with EBX zero at46FC08.
|
||||
These are constructor defaults, not invariants after property/script changes.
|
||||
|
||||
## Evidence and verification
|
||||
|
||||
Own REA CLI sessions used only the generated
|
||||
`artifacts/uncontrolled-phases/rea/Neutron.exe`, Ghidra provider. Complete open,
|
||||
procedure replies, exported evidence, close and snapshot files are preserved in
|
||||
`artifacts/collision-integration/contacts/rea-callbacks/` and
|
||||
`rea-offset-followup/`. Both sessions closed. Session analysis errors are also
|
||||
preserved;42A660 and472750 were unrecognized by both VA and corrected raw-offset
|
||||
selectors. This is a REA procedure-recognition limitation, not evidence of an
|
||||
absent function. Their bounded conclusions use reviewed source instructions and
|
||||
fixed byte/vtable guards; no pseudocode is attributed to those failed queries.
|
||||
|
||||
| Procedure | REA Evidence ID |
|
||||
|---|---|
|
||||
|472690|ev_122849f87121b02fefe6a3a443f75c7f02fee30c59c816b617d30e1f98fc2cff|
|
||||
|43AA40|ev_4f2a6aa666451db831efd46f5c587573e22d8072315626b8bc2f844f9c6f0cae|
|
||||
|47A330|ev_8be4a538fe941bcf0ba77ce64f552d4f0e17969ea87713cec5d37d39bc560735|
|
||||
|472970|ev_1af0165b36fee8d2c680091bdaa560a63092016b1010baa947b0fe672f790520|
|
||||
|458890|ev_2e4ec83ea68f06777162a80ab45793cff068e973dc248556d4a408932d24c85a|
|
||||
|
||||
Caller/traversal evidence is reused from collision-response.md, especially
|
||||
479D20 `ev_5439072b32ae9f9208795ad2b07bc524e2407b46da487072fb3dfd8c10e7c4b0`
|
||||
and47B4B0 `ev_d45e078c585d3773494c0e0dfb1696178dd0b8ce8b696caf133892ff070e552e`.
|
||||
Reviewed instruction cache: `artifacts/retained-lifecycle/exe-disassembly.txt`.
|
||||
|
||||
`python3 -m unittest discover -s tests -p test_collision_contact_callbacks.py -v`
|
||||
passes eight tests: original identity/50 sites/20 virtuals/six complete bodies,
|
||||
normal threshold equality, independent positive-Y clearing, material branch
|
||||
boundaries, no-selection/jetpack gadget exclusion, friction gates/no clamp, and
|
||||
landing callback observation order;11 DLL linkage/header/publication byte guards plus
|
||||
decoded route special-ID coverage and payload/table distinction.
|
||||
The helper fixtures are explicit source projections, not original execution or
|
||||
x87 numeric identity. No original process ran during the independent callback
|
||||
investigation; primary's later isolated dispatcher/body executions are documented
|
||||
separately in collision-body-probe.md.
|
||||
Confidence is high for guarded targets, finite-input gates and write order;
|
||||
special callback policy and native runtime equivalence remain unverified.
|
||||
|
||||
Follow-up own closed REA sessions and complete exports are in
|
||||
`artifacts/collision-integration/contacts/rea-material-identity/` and
|
||||
`rea-material-chunks/` and `rea-polygon-material-link/`, using the generated
|
||||
asset-probe/game/OMT2.dll copy. All three sessions closed and exported evidence.
|
||||
|
||||
| Procedure | REA Evidence ID |
|
||||
|---|---|
|
||||
|10030070 db_link|ev_68d90891887ea6865b9caa01929af4c321701bd7c4a2812727fdf42c75cc4007|
|
||||
|1002DEF0 get_object|ev_81d436d02d94e725815b1f09da5e5a70d12a65a699580a4f4d766fd637e25c9a|
|
||||
|10030260 stream link|ev_a36a19b371e3f9202b8e7b44f6756593081a18da9f24dcb3a23fcdd92836ad9a|
|
||||
|10001490 material read|ev_f592b625a60ec683a17627d671c47d78d722eb39d5eb407744d53a283ee2586d|
|
||||
|10045B70 get_chunk|ev_1eef58e78dd2025953bfc6d29d750992ad031eff3ade40848b565b70493a51af|
|
||||
|100464C0 load_header|ev_25667da3ab34f3e3a238282bf667878fa957db0b59501f737178637dd8fe2d61|
|
||||
|100451E0 create_chunk|ev_bb9a4656bc3b4cc1ebd2ce7da540b2f5d633632cc70b9548f30942e52c806868|
|
||||
|10003E20 polygon read|ev_a611c0c32859d598bd4f02c071cc8f57dec8e85c821593187d3ea6d0b2db18cb|
|
||||
|100043F0 set_material|ev_66c8163e76d1c4621dd75dbad433b6810d7dc6f69da84d4bdcd6644df935736b|
|
||||
|10073E00 stream operator|ev_01e2fb540f6adee163371853f0823abcd4a67553b0dc7d067ef88a448ce87740|
|
||||
|
||||
## Minimal implementation contract and limits
|
||||
|
||||
OriginalSphereResponse currently implements only the bounded triangle kernel;
|
||||
LabSimulation still calls its capsule adapter at inspection time. Integration
|
||||
should retain the original traversal's final contact polygon and stored normal,
|
||||
publish the root before contact dispatch, apply inherited370 positive-Y clearing,
|
||||
and preserve ordinary374's material-policy boundary. Then run support in its
|
||||
source order, friction using persisted published160, and separate small-motion
|
||||
suppression. Contact callbacks are eligible when Jimmy is uncontrolled if the
|
||||
body phase itself runs; they do not grant input ownership.
|
||||
|
||||
Do not add generic horizontal velocity projection, automatic jump/mode reset,
|
||||
or unconditional friction to compensate for adapter symptoms. Static geometry
|
||||
order/duplicate visits, dynamic reclipping, negative-Y split and support query
|
||||
coverage belong to the separate body integration trace. Generic378's complete
|
||||
reflection arithmetic, special materials, gadget7, runtime-mutated flags,
|
||||
144 semantics, NaNs and x87 threshold identity remain explicit gaps. Native
|
||||
Windows gameplay and the lab→tutorial→lab→outside route still require runtime
|
||||
comparison after integration; these static fixtures do not claim that proof.
|
||||
@@ -0,0 +1,142 @@
|
||||
# C4: static grid traversal and retry ownership
|
||||
|
||||
2026-10-26. Recovered from EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
These are source facts, with local algorithm fixtures; this investigation did not
|
||||
execute the original grid dispatcher. VAs below map to EXE offsets by subtracting
|
||||
400000; uninitialized globals have no file-backed offset. The helper reports PE
|
||||
mapped offsets and raw bytes independently.
|
||||
|
||||
## Dispatcher contract
|
||||
|
||||
47B4B0(actor interface, mutable previous-root Vec4 pointer, delta Vec4 by value,
|
||||
edge-enable byte) computes quick_magnitude(delta) at47B4BB. Actor **member byte
|
||||
+42C**, not a virtual method, forces processing. Otherwise magnitude below
|
||||
FLT_EPSILON(1.1920928955078125e-7;4D5E40) returns without moving the root.
|
||||
Equality processes. Candidate XYZ starts as previous+delta, W=1. Actor virtual260
|
||||
returns radius. Bounds use extent E=radius+quick_magnitude(delta).
|
||||
|
||||
For C(v)=signed16(truncate(v*float(0.002)+130)), the frozen bounds are:
|
||||
|
||||
| Bound | Source expression |
|
||||
|---|---|
|
||||
|xmin|min(C(previousX−E), C(candidateX−E))|
|
||||
|xmax|max(C(previousX+E), C(candidateX+E))|
|
||||
|zmin|min(C(previousZ−E), C(candidateZ−E))|
|
||||
|zmax|**min**(C(previousZ+E), C(candidateZ+E))|
|
||||
|
||||
The asymmetric zmax is explicit:47B61B `cmp di,ax`;47B61E stores DI;
|
||||
47B624 `jl` keeps DI if smaller, otherwise47B626 stores AX. xmax uses the
|
||||
opposite comparison at47B59B. Do not substitute a conventional swept-AABB union.
|
||||
Scale4D6A04 is float0.0020000000949949026; origin49B1FC is130.
|
||||
|
||||
X increases in the outer loop, Z in the inner, both inclusive. Coordinates outside
|
||||
0..259 are skipped. Wall grid509B24 cell record is12bytes at
|
||||
grid+12*(260*x+z). Its pointer is the circular-list sentinel. Nodes contain next0,
|
||||
previous4, registration8. Registration contains polygon pointer0 and shape pointer4.
|
||||
Traversal follows next pointers in insertion order; the same polygon in several
|
||||
cells is visited repeatedly. Bounds stay frozen while the candidate mutates.
|
||||
|
||||
47B6B2 checks global collision-enable4F69E5 per node. A disabled visit still
|
||||
increments counters and advances the node; dispatcher position publication still
|
||||
occurs. Before47BBB0, member42C sets695D74=1 when nonzero;47B742 unconditionally
|
||||
clears it after the wrapper. This is the primitive's lower-edge override, separate
|
||||
from the caller's edge-enable flag, forwarded unchanged at47B6FE.
|
||||
|
||||
47BBB0 receives the previous root **by value**, the shared mutable candidate
|
||||
pointer, radius, stored polygon normal and edge flag. The first three source
|
||||
corners are fetched by477F10. A successful47BD80 result stores this polygon in
|
||||
695D4C and writes the caller's local retry byte at47BD65..47BD6B. Nearest face
|
||||
695D5C, nearest edge5CFBE0, hit point5CFBE8..5CFBF4 and695D4C persist across all
|
||||
visits; dispatcher entry does not clear them.
|
||||
|
||||
## Retry, publication and callbacks
|
||||
|
||||
REA/Ghidra00.pseudo.txt incorrectly reports47B83C unreachable. Missing output
|
||||
parameter types hide47BBB0's retry-byte mutation. Instruction evidence is decisive:
|
||||
47B535 clears local byte;47B799 tests it and47B79F branches to47B83C after a hit.
|
||||
47B83C..47B867 replaces the by-value delta with candidate−*previousRoot.
|
||||
47B877 pushes the **same previous-root pointer**, then actor, and47B879 recursively
|
||||
calls47B4B0 with the same edge flag. This body has no explicit recursion-depth
|
||||
guard;695D78 is an incremented statistic, not a limit. Do not infer dead code or
|
||||
a depth cap from decompiler output.
|
||||
|
||||
The previous-root pointer is not overwritten before retry. Only the deepest pass
|
||||
with no newly accepted contact writes candidate XYZ and W=1 to it
|
||||
(47B7A5..47B7BD). If695D4C is nonnull, that final pass reads the **last accepted
|
||||
polygon** normal+8/+C/+10/+14, even if this pass accepted no contact. It invokes
|
||||
actor virtual374 when normal.Y>−0.7, otherwise370; equality selects370.
|
||||
Both callbacks receive normal Vec4 and polygon pointer. Actor logical position
|
||||
is written later by the enclosing movement caller's virtual314, so publication
|
||||
through a stack vector does not itself prove the actor transform has changed.
|
||||
|
||||
The body integrator479D20 clears last polygon at47A038, initializes face distance
|
||||
to **130000** at47A03E (bits47FDE800), and edge distance to radius at47A062.
|
||||
The isolated primitive's −1 face sentinel is not the body-entry initialization.
|
||||
Dynamic reclip47B364 calls this same dispatcher with edges=false (47B30B), then
|
||||
publishes actor root through314 at47B399. It inherits nearest state: dynamic
|
||||
entry separately sets edge=radius at47AB3F and face=−1 at47AB4B. No dynamic clear
|
||||
of695D4C was found; identified absolute writes are47A038 and47BD65. Its caller
|
||||
schedule remains relevant when interpreting retained last-polygon callbacks.
|
||||
|
||||
## Registration and source layout
|
||||
|
||||
479140 walks shape polygon array begin+88/end+8C in48byte strides; it applies
|
||||
checkpoint4794C0 and game-specific4797A0 filters before registration. Existing
|
||||
[camera-ray evidence](camera-ray-predicate.md) establishes scene44DBF0's ascending
|
||||
shape resource-index traversal. No new decorative/material rule is inferred here.
|
||||
Game filter4797A0 calls the game's virtual134 at4797EC.
|
||||
|
||||
Each polygon's **all-corner** X/Z extrema determine registration cells using the
|
||||
same conversion and inclusive X-outer/Z-inner order. Registration upper Z is a
|
||||
conventional maximum, unlike query zmax. A28byte registration allocation stores
|
||||
polygon0, shape4, centerXYZ8/C/10, W14 and radius18; bounds/candidate traversal do
|
||||
not use this center/radius as a per-visit cull. Record is shared across its cells.
|
||||
479800 rejects a duplicate polygon pointer within one cell (47985E..479866),
|
||||
irrespective of shape pointer. New nodes append FIFO to all-grid5CFC7C
|
||||
(47989F..4798A8), and wall-grid509B24 only when stored normal.Y<0.7
|
||||
(4798B3..4798CF); equality is excluded. There is no query-wide deduplication.
|
||||
|
||||
477F10(out,shape,polygon,signed-short corner) reads polygon+24 corner records,
|
||||
20bytes each. Their first DWORD is a vertex index into shape+68 Vec4 vertices,
|
||||
16bytes each. It copies the selected Vec4 without transforming it. The wrapper
|
||||
uses corners0/1/2 even though registration bounds use all corners.
|
||||
|
||||
## Evidence and implementation boundary
|
||||
|
||||
Owned REA CLI session used a generated copy, closed normally and retained complete
|
||||
replies/export/snapshot in artifacts/collision-integration/grid/rea/:
|
||||
|
||||
| Procedure | Evidence ID |
|
||||
|---|---|
|
||||
|47B4B0|ev_f39128dafc2a3a20b5768613ce22b3c3168fe8653908837d92ad9a69ef5f2ad8|
|
||||
|479140|ev_c6bffe721e0751327ecdb5e62c27137752574be6624c190a833c5b2c0f5be7b0|
|
||||
|4797A0|ev_277ddc7e6b8383ea4245072e395a3dda51cd530c56fb160b917823803f55d33f|
|
||||
|
||||
dispatcher.instructions.txt retains the reachable retry instructions;
|
||||
source-anchors.json records raw anchors, offsets, constants and four function-body
|
||||
hashes. tests/test_collision_grid_traversal.py guards source bytes plus five
|
||||
fixture groups: asymmetric bounds, clipped/inclusive order, per-cell duplicate
|
||||
rules, mutable candidate and retained nearest/last-polygon across passes.
|
||||
|
||||
Minimal integration: build source-order wall cells; pass an explicit shared nearest
|
||||
state into existing OriginalSphereResponse; scan frozen bounds with a mutable
|
||||
candidate; retry revised displacement against unchanged previous root; then publish
|
||||
and dispatch the last-polygon normal callback once. Reuse this dispatcher for
|
||||
dynamic reclip without adding implicit state resets. A defensive port recursion
|
||||
limit would be a documented implementation deviation, not recovered behavior.
|
||||
|
||||
Follow-up original dispatcher execution completed seven synthetic grid cases;
|
||||
see collision-body-probe.md for outputs, fixture boundaries and managed comparison.
|
||||
OriginalStaticCollision implements the bounded traversal as an isolated component;
|
||||
it is not yet the live player solver. Geometry-disabled traversal preserves
|
||||
terminal publication and retained callback; it skips primitive calls per visit.
|
||||
TraceSupport initializes its strict nearest limit to quick_magnitude(end−start).
|
||||
Prepared route geometry carries signed archive material IDs and rejects missing
|
||||
identity metadata before special-contact coverage is assessed.
|
||||
|
||||
Unresolved: x87 cell
|
||||
conversion at integer boundaries and extreme signed-short wrap; full scheduler
|
||||
ownership of global collision toggles and retained dynamic last-polygon state.
|
||||
The local projection does not establish numerical identity at those boundaries
|
||||
or runtime correctness of the integrated port.
|
||||
@@ -0,0 +1,64 @@
|
||||
# C4 static dispatcher review
|
||||
|
||||
2026-10-26. Independent source review of the uncommitted static dispatcher,
|
||||
its managed fixtures, saved REA replies and retained original-component output.
|
||||
No original code was executed and no new REA session was opened by this review.
|
||||
File ownership for this report only; primary owns integration and corrections.
|
||||
|
||||
## Findings and disposition
|
||||
|
||||
- **Corrected during review:** `TraceSupport` initially accepted its first
|
||||
triangle hit without the source's initial nearest-distance limit. Retained
|
||||
REA support reply `artifacts/collision-integration/rea-support/00.json`,
|
||||
Evidence `ev_ad96a93792dcf00534130fbd428fb52fa25e2cf9c2492df43f89f425b80c3f08`,
|
||||
initializes47C6E0's nearest distance to quick_magnitude(end−start), then
|
||||
requires a strictly smaller hit magnitude. The kernel's parameter-distance
|
||||
check is separate from the returned hit's magnitude. Primary added that
|
||||
initial limit and strict comparison. This closes a source-contract omission;
|
||||
no original numeric boundary probe is claimed.
|
||||
- **Corrected during review:** old prepared meshes could omit material IDs and
|
||||
appear ordinary-only. Primary added explicit material-identity completeness
|
||||
metadata and a `FromRouteScene` rejection requiring newly prepared scenes.
|
||||
Resolved null-material identity remains distinct from missing metadata.
|
||||
- **Corrected after review:** `Move` now accepts the source geometry-enable state.
|
||||
Source47B4B0 reads4F69E5 per node, while its final publication and retained
|
||||
last-polygon callback can still occur when geometry is disabled. A caller
|
||||
must not equate disabling geometry with skipping `Move` when it reuses a
|
||||
context. The added regression checks publication and retained callback without
|
||||
primitive visits. Dynamic shared-state/reset timing remains a live gate.
|
||||
- **Live integration gate:** the dispatcher returns a candidate and terminal
|
||||
polygon; it does not publish the logical actor transform or execute callback
|
||||
370/374, support, friction or speed publication. Jimmy ordinary374 must retain
|
||||
the special-material boundary. LV1B/LEV1 contain such materials; VR04's
|
||||
absence of them is a bounded route-data result, not a general player policy.
|
||||
- **Documented port limits:** iterative retry rejection after256 passes,
|
||||
finite inputs, triangular polygons and approximate x87 cell conversion are
|
||||
explicit boundaries. Do not promote this component to whole-body identity
|
||||
or claim the source has a recursion cap.
|
||||
|
||||
## Verification
|
||||
|
||||
`source scripts/env.sh && dotnet run --project
|
||||
tests/GamePort.StaticCollisionTests` passed seven groups during review. The
|
||||
seven printed copied-original dispatcher cases in
|
||||
`artifacts/collision-integration/dispatch/wine.log` match the managed fixtures'
|
||||
positions, pass/visit counts and terminal polygon observations. The retained
|
||||
marker is `DISPATCH_COMPONENT_COMPLETE`; the reviewer did not rerun that probe.
|
||||
This verifies a bounded original component comparison, not live port gameplay.
|
||||
Primary's subsequent focused run passes eleven groups, adding actual prepared
|
||||
route material coverage, legacy metadata rejection, geometry-disabled retained
|
||||
context, equal support ties and zero-length limits. Full integration passes122
|
||||
Python checks plus HUD/managed/GPU/audio/hash checks; see progress.md for scope.
|
||||
|
||||
Registration sorting, X-outer/Z-inner traversal, per-cell duplicate visits,
|
||||
frozen bounds including source MIN upper-Z, unchanged previous root across
|
||||
retries, persistent nearest state and terminal-only callback selection agree
|
||||
with collision-grid-traversal.md and its retained instruction/REA evidence.
|
||||
|
||||
Before enabling live body response, extend regression coverage to inherited
|
||||
nearest/last-polygon state across separate dynamic reclip calls, equal-distance
|
||||
support ties, and callback ownership/order after publication. Complete the
|
||||
source contact policies and route/root checks identified by the implementation
|
||||
ledger. After the stated review reset time, primary retried through normal
|
||||
approval review and completed the ten-fixture isolated body probe. This closes
|
||||
that execution blocker, but does not establish live whole-body equivalence.
|
||||
@@ -16,7 +16,7 @@ runtime comparison. Coverage does not mean implementation completeness.
|
||||
| INPUT | Game interface+8C slot3C4→44DF80→475A70 reads controlled5099E4 and calls3CC; Jimmy interface+C0→426030. | SDL arrows/jump aliases; control gate, modern debug override; mouse/controller incomplete. | S/M/R, user Windows route. Input occurs in object traversal after physics; device sampling/focus and latency open. | Trace event pump, key/mouse and focus gates alongside retained registry order. |
|
||||
| MOVE |437940/439900 ground/air arithmetic; physics479D20 consumes queued impulse once before acceleration/gravity. | Player body/fire continue without ownership; input/controller gated; fresh/retained input order explicit. Root overhead wrapper now runs before movement/fire. Fixed dt and custom yaw/model conventions remain. | S/P/M/R. Bounded phases/ceiling implemented; complete base/registry and body response open. | Continue C4 traversal/callback/support integration and C3 base transforms. |
|
||||
| JET |437F90 controller;421FB0 effect; fresh constructor order places fire after Jimmy, both after global physics. States0..5, hold>.4,8s, energy. | Explicit state table with post-collision effect ticking and VR immunity. | S/M/R. Fresh same-pass countdown recovered; retained child lifecycle, sound and expiry→animation open. | Trace retained Jimmy/fire resets and phase end events before scheduler integration. |
|
||||
| COLL |479D20/47BD80 body response; face/edge nearest state and helpers; root+150 overhead bounce/cancel; support and quick magnitude; dynamic boxes; NC exclusion. | Isolated source sphere kernel with original component references; route overhead wrapper integrated. Live swept24-unit capsule/feet and dynamic response remain provisional. | S/P/M/R. Ten isolated original kernel cases; byte/managed checks. Grid/normal callbacks/support/friction, masks/stairs/root render remain open; radius60 is not capsule24. | C4: integrate traversal/callback/support order before replacing live adapter; doorway/corner is first route case. |
|
||||
| COLL |479D20/47BD80 body;47B4B0 FIFO grid/retries;370/374/37C; signed material IDs; separate160 friction gate; support/suppression; overhead; dynamic boxes. | Source sphere and static dispatcher/support grid implemented as isolated components; route overhead wrapper live. Prepared IDs retained. Live24-unit capsule/feet and dynamic response remain provisional. | S/P/M/R. Ten original kernel, seven dispatcher and ten ordinary-body observations; managed dispatcher comparisons. Special contacts, live body composition, dynamic shared context and root rendering open. | C4: compose ordinary-body adapter against ten references, then explicit VR04 live subset. Lab/outside need special160/164/FENCE/LADDER and dynamic reclip ownership. |
|
||||
| ANIM | Engine morph10002DB0; linear interpolation10002F9A; game logical→OMT sync4624B0. | ASE sample timing, unconditional loop closure, pose/action aliases,1/60 advance. | S/P/M/R. Playback flags, rate, completion callbacks, transition order open. | Recover one-shot/loop/end notifications before more aliases. |
|
||||
| SCRIPT | Source AI/CAM/MCA dispatch and chains; task45F990 objective406F50 BEFORE records BEFORE per-entity424. | Pre-assignment objective selection and per-actor Carl override implemented; bounded synchronous director. | S/M/R. Script callbacks recovered for route; generic class coverage and reentrancy incomplete. | Continue other class-specific callbacks and reentrancy under the recovered owner/phase boundaries. |
|
||||
| CONTROL | Global5099E4 null during valid CAM/MCA; PlayerControlled completion target; DEFAULT447D..447F restores camera/UI/music. | Director raw ownership plus explicit debug effective override; eligible player body/fire continue; only input/controller tail is gated. | S/M/R. Raw/effective control and ordered preparation are implemented; full base/class wrappers and scheduler remain incomplete. | Continue full wrapper/base and collision contact phases around deferred LOAD. |
|
||||
|
||||
@@ -155,3 +155,19 @@ allowed where it resolves a core-system question, without waiting for every leve
|
||||
nondefault tutorial/RETURN checks. Release validation unavailable, enabled
|
||||
source/native checks separate. Package logs in artifacts/collision-response/;
|
||||
baseline untouched and Windows cross-published only.
|
||||
- C4 static composition: independent REA grid/contact investigations recover
|
||||
FIFO duplicate traversal, reachable retries, normal/landing ownership, signed
|
||||
material archive IDs, separate published160 speed and friction/suppression.
|
||||
Seven isolated original dispatcher fixtures match the managed component's
|
||||
positions/counts/callbacks. Ten copied479D20/support fixtures completed; no
|
||||
managed whole-body equivalent is claimed yet. Reports: collision-body-probe.md,
|
||||
collision-grid-traversal.md, collision-contact-callbacks.md and independent review.
|
||||
- Prepared scenes now retain material IDs and completeness; legacy metadata cannot
|
||||
masquerade as ordinary-only. Actual VR04 has no special contacts; LV1B/LEV1 do.
|
||||
Geometry-disabled publication/retained callback and strict initial support
|
||||
distance are explicit. Original geometry-off branch supersedes C3's earlier
|
||||
support-hit gravity-cancellation inference. Playable body remains baseline.
|
||||
- Next C4 chunk: ordinary-body composition and ten numeric comparisons, negative-Y
|
||||
horizontal-first split,370, landing-before-velocity-clear, published160 friction
|
||||
and suppression; then VR04 live root/input/ceiling/RETURN checks. Trace special
|
||||
callbacks and dynamic reclip/global context before lab/outside replacement.
|
||||
@@ -47,11 +47,12 @@ navigation still reaches SCENE35→50→60 and the outside LOAD. This is port ev
|
||||
not original timing/latency fidelity. Source nominal frame rate remains unproven;
|
||||
the port keeps its explicit60Hz policy.
|
||||
|
||||
The existing capsule/gravity adapter remains. Source479DF7..479E54 can cancel
|
||||
gravity on a support hit before a queued jump, giving a different first takeoff
|
||||
velocity. Applying that cancellation to the provisional capsule's prior support
|
||||
flag caused false support transitions in the port; it must be integrated with
|
||||
the recovered pre-integration support/response in C4, not bolted onto that flag.
|
||||
The existing capsule/gravity adapter remains. C4 follow-up corrects the earlier
|
||||
support-hit interpretation: source479DF7..479E54 cancels gravity and clears
|
||||
vertical velocity only when global geometry4F69E5 is disabled. It is not a
|
||||
prior-grounded or support-hit branch. The isolated body probe confirms the normal
|
||||
pending-jump fixture consumes550 impulse and applies both−264 acceleration and
|
||||
−800 gravity, producing Vy532.266663 at dt1/60. See collision-body-probe.md.
|
||||
No source-fidelity claim is made for jump apex, stairs, wall response or visual
|
||||
pivot. The underground replay checks clearance of the recovered radius60 body,
|
||||
not raw209-unit standing-mesh bounds, which are a separate provisional render
|
||||
|
||||
Reference in new issue
Block a user