Recover sphere response and correct Jimmy ceiling cancellation
This commit is contained in:
1 parent
6a7a53c90d
commit
57dfcc64bb
37 files changed
+1324
-18
No files matched your search
@@ -0,0 +1,109 @@
|
||||
# C4: original sphere/triangle response
|
||||
|
||||
2026-10-26. Original EXE SHA256
|
||||
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
|
||||
Preferred VAs are used below; EXE text file offsets are VA minus400000.
|
||||
The helper independently maps PE sections and guards six complete function bodies.
|
||||
|
||||
## Recovered contract
|
||||
|
||||
479D20 integrates body motion, invokes static response47B4B0, then support47B890
|
||||
and friction47A330. Static47B4B0 traverses the wall grid, invoking47BBB0 for each
|
||||
candidate.47BBB0 fetches the first three source polygon vertices through477F10,
|
||||
then invokes47BD80. Dynamic mode2's twelve box triangles also invoke47BD80
|
||||
(dynamic-collision.md). Stored polygon normals and winding are independent inputs.
|
||||
|
||||
47BD80 takes five by-value four-float records (triangle A/B/C, stored normal,
|
||||
previous root), a mutable current-root pointer, radius, and an edge-enable byte.
|
||||
It uses shared nearest state:695D5C face distance,5CFBE0 edge distance,
|
||||
5CFBE8..5CFBF4 hit point,695D74 lower-edge override. Callers initialize/retain this
|
||||
state; component tests deliberately supply explicit initial values.
|
||||
|
||||
| Path / source range | Recovered transition |
|
||||
|---|---|
|
||||
|47BD86..47BE34|Compute normal×radius and endpoint=current−offset, retaining max(currentY,endpointY); build segment469530 from previous root to endpoint.|
|
||||
|47BEBA..47BFAD|One-sided469B70 triangle ray. A strictly nearer hit updates695D5C and hit point. Root becomes hit+offset in X/Z; Y changes only for normal.Y<−0.7. A farther/equal face returns false without edge fallback.|
|
||||
|47BFAE..47BFED|Only a failed face query may enter edges. Requires edge flag and strictly −0.7<normal.Y<0.7.|
|
||||
|47C048..47C08C|4695B0 finds nearest point among the three edge segments, including endpoints. Without695D74, an edge below current root is rejected.|
|
||||
|47C092..47C150|Normalize root-to-edge using quick_magnitude; require dot(direction,storedNormal)<0 and strictly nearer than5CFBE0 (−1 sentinel allowed).|
|
||||
|47C194..47C1F8|Write edge point−direction×radius in X/Z, preserve root Y, update edge distance and hit point.|
|
||||
|
||||
469880 projects onto a segment using its quick_magnitude-normalized direction,
|
||||
clamping to either endpoint.4695B0 compares edge distances with quick_magnitude;
|
||||
ties prefer BC over AB, then CA over either.47B4B0 finally publishes the candidate
|
||||
and dispatches normal callbacks370/374. The inspected function does not implement
|
||||
the previously inferred generic recursive capsule slide. That older description
|
||||
in original-collision.md is superseded by this bounded trace.
|
||||
|
||||
## REA evidence
|
||||
|
||||
Complete replies, exports and closed-session snapshots are in
|
||||
artifacts/collision-response/rea-response/ and rea-kernels/.
|
||||
|
||||
| Procedure | Evidence ID |
|
||||
|---|---|
|
||||
|47BD80|ev_28147145c0fee39c39936e4180890f321711688d6617d1b8314a12bf45a2e565|
|
||||
|479D20|ev_5439072b32ae9f9208795ad2b07bc524e2407b46da487072fb3dfd8c10e7c4b0|
|
||||
|47BBB0|ev_6e0dbae6267e87abbd0e4816b613923549b0f0787a26d7003d1a0e38fc733809|
|
||||
|47B4B0|ev_d45e078c585d3773494c0e0dfb1696178dd0b8ce8b696caf133892ff070e552e|
|
||||
|469530|ev_4fef4d32d2c8b30c306cd742fb9daeb93aa1fa36d4edf0ecaa87497e314dc50e|
|
||||
|4695B0|ev_5e39f2668d04b1fdd2c91b298a28413327dc3879e6b8bbffe0a14bc1dcbc1128|
|
||||
|
||||
REA/Ghidra has incomplete C++ parameter/stack types here; apparent uninitialized
|
||||
locals and missing arguments were resolved against instructions and the copied
|
||||
component probe. The47B9F0 interior query resolved to47B890, not a new function.
|
||||
Pseudocode is static evidence, separate from the execution below.
|
||||
|
||||
## Isolated original execution
|
||||
|
||||
collision_response_probe.c maps a copied EXE without its entry point/import
|
||||
initialization, binds only quick_magnitude to copied OMT2.dll, disables debug
|
||||
drawing, and executes47BD80 on synthetic geometry. Six callgraph bodies and all
|
||||
selected absolute memory operands are guarded by collision_response.py. Because
|
||||
the preferred base was occupied in Wine, only these explicit operands are
|
||||
rebased in the generated in-memory copy. This fixture relocation is not recovered
|
||||
source loader behavior. No on-disk original is patched.
|
||||
|
||||
The existing reference_capture.py namespace exposes generated copies only, with
|
||||
no network and no Original mount. Final wine.log records ten cases and
|
||||
COLLISION_COMPONENT_COMPLETE, exit0. An initial incomplete-prefix attempt failed
|
||||
to load kernel32; a complete copied prefix fixed that. Two preferred-base attempts
|
||||
failed before any source execution; guarded rebasing resolved that host issue.
|
||||
|
||||
Observed references: wall face/crossing roots(0,20,10), departing contact false,
|
||||
edge root(107.071068,100,7.07106781), edge flag disabled false; lower-edge mode0
|
||||
rejects while mode1 yields(105.77375,105,5.7737484); ceiling root(0,90,0).
|
||||
These are isolated kernel results, not full original gameplay or native Windows.
|
||||
|
||||
Reproduction after preparing the isolated copied installation/prefix described in
|
||||
docs/reference-testing.md (wait for copy completion before starting Wine):
|
||||
|
||||
```sh
|
||||
python3 tools/binary/collision_response.py ../Original \
|
||||
--target-copy artifacts/collision-response/original-probe/game/Neutron.exe \
|
||||
--probe-header artifacts/collision-response/collision_response_relocations.h
|
||||
i686-w64-mingw32-gcc -O0 -Wall -Wextra -Iartifacts/collision-response \
|
||||
-Wl,--image-base,0x14000000 tools/binary/collision_response_probe.c \
|
||||
-o artifacts/collision-response/collision_response_probe.exe
|
||||
python3 tools/recon/reference_capture.py --asset-probe \
|
||||
--probe-executable artifacts/collision-response/collision_response_probe.exe \
|
||||
--probe-success COLLISION_COMPONENT_COMPLETE --seconds 9 \
|
||||
--output artifacts/collision-response/original-probe
|
||||
```
|
||||
|
||||
## Implementation and remaining gate
|
||||
|
||||
OriginalSphereResponse.cs translates this bounded kernel, with explicit nearest
|
||||
state and contact type. Five managed groups cover original numeric references,
|
||||
winding, edge/lower-edge switches, ceiling Y, nearest/ties and finite input.
|
||||
Zero-distance edge normalization is explicitly outside the bounded contract; the
|
||||
port returns no contact instead of propagating the source's undefined arithmetic.
|
||||
Modern arithmetic is not an x87 boundary oracle.
|
||||
|
||||
The live player and dynamic response still use the provisional capsule adapter.
|
||||
Integration requires original grid bounds/order/duplicate visits, negative-Y
|
||||
motion split, previous-root writes, normal/landing callbacks, support/friction
|
||||
and dynamic reclipping. Replacing only a radius would not satisfy that gate.
|
||||
The narrow lab doorway snapshot from control-phase-implementation.md remains
|
||||
the first integrated response case. No claimed recovery of stairs or complete
|
||||
body response follows from this kernel alone.
|
||||
Reference in new issue
Block a user