File size: 8,062 Bytes
a297661 136f298 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | # Game-QVM slide preparation, first trace and clear caller chain
RE-473–475 / F-214–216. [qvm-slide-prefix.json](qvm-slide-prefix.json) retains complete helper57714 instructions,384 first-trace exit probes,122 partial contact probes and20 clear slide/wrapper/mode chains. Reproduce with `python3 scripts/analyze_qvm_slide_prefix.py`; verify with `python3 scripts/test_qvm_slide_prefix.py`.
This follows [step/wrapper recovery](QVM_STEP_COLLISION.md), which supplied57714 outputs. The new batch evaluates its preparation and complete first-trace fraction1/allsolid branches. Contact cases stop at instruction58312, **before plane solving and subsequent bumps**, with no claimed function return. A supplied finite sqrt and native trace record remain external. No original executable, full QVM, native collision, physics or rendering executes. Native trace legality/ABI, real configuration/state producers and full movement/runtime compatibility remain open.
## SLIDE-001 — Gravity midpoint, ground clipping and seed planes (RE-473)
Helper57714 starts with zero auxiliary/end-velocity words, a four-bump limit, and a saved copy of PS velocity. With a nonzero incoming gravity argument:
1. Copy initial velocity into an end-velocity vector and subtract rounded float(gravity PS+48) × float timestep global35023928 from its Z.
2. Replace working PS velocity Z with the rounded midpoint of original and end Z.
3. Replace the saved copy's Z with end Z as well. The saved vector is therefore not an untouched original velocity in gravity cases.
4. If global35023940 is nonzero, clip the working velocity against supplied normal globals35023968/35023972/35023976 using the previously observed sign-dependent biased dot constants1.00100005/0.999001026.
All float operations round to binary32. With gravity disabled, the end vector stays zero, working velocity is unchanged, and no ground clip occurs here. A nonzero plane word still adds the supplied normal as a seed plane regardless of gravity.
The helper then measures the working full3D norm through encoded target-107 and appends the working unit direction to the seed-plane array; zero norm appends a zero vector. Initial plane count is1 without the supplied ground plane or2 with it. It initializes remaining time from the float timestep and enters bump0.
Independent tests verify every working/end/saved vector, root argument/return, normalized seed direction and plane count. Probes combine gravity0/1, plane0/1, four velocities, two ground normals, timestep0/0.016/0.125 and movement timer0/16. Ground normal/legal-domain and native sqrt behavior are supplied, not established by these synthetic finite cases.
## SLIDE-002 — First trace exits and partial contact policy (RE-474)
The first endpoint is `origin + working_velocity × remaining_time`, rounded per component. The callback at frame+224 receives a local56-byte trace destination, PS origin pointer, frame min/max pointers, local endpoint, PS+140 and frame mask+28. In these fixtures bounds are min(-15,-15,-24)/max(15,15,45), identity7 and mask0x2010001.
The analyzer supplies one trace record. Its end position follows an explicit interpolation model from origin toward that requested endpoint; this is not native trace generation. Complete exit branches are:
| Supplied trace | Evaluated effects |
| --- | --- |
| allsolid nonzero | Set working velocity Z=0, retain X/Y and origin; return1 immediately |
| allsolid zero, fraction1 | Copy supplied trace end to origin, leave bump loop before bump count increments, then execute common exit; return0 |
Allsolid bypasses the common exit: it does not apply the end-velocity copy, movement-timer restoration or flag2048 cleanup. For the clear path, gravity copies the end vector into PS velocity; a nonzero PS+16 movement timer then copies the saved vector over it. In these first-clear cases those two gravity vectors have identical values, but the source ordering matters for future contact cases. The clear exit clears flag2048 because no qualifying contact was recorded. It does not clear the stored normal words or alter the movement timer itself.
For fraction0/0.5 contact probes, positive fraction copies the supplied trace endpoint to origin. The first-contact prefix sets PS flag2048 and stores hit normal X/Y at PS+96/+100 only when all conditions hold:
- Hit normal Z is strictly between binary32-0.3 and+0.3.
- The gravity argument is nonzero.
- Trace surface word at offset44 has neither bit2 nor4.
- Trace contents word at offset48 lacks33554432.
It records39253(trace entity at offset52); this batch evaluates that recovered touch-list helper, including the1022 sentinel versus accepted1023. It then computes rounded remaining time `time - time × fraction`. Contact cases stop at58312 before plane-count checks/clipping, so the reported words describe this prefix, not final slide results. Their `completed` field is false and `return_word` is null.
The122 contact fixtures isolate exact±0.3 boundaries, inside values, gravity/surface/contents gates, zero/half fraction and entity sentinels. Some supplied normals intentionally isolate flag arithmetic rather than represent legal unit contact normals. Plane solving, repeated contacts, real contact callbacks and later flag/timer behavior remain unresolved.
## SLIDECHAIN-001 — Evaluated clear slide through60091 and41768 (RE-475)
Twenty chains execute41768's flag32-clear prefix,60091's original-state snapshots and first57714 request, the actual evaluated clear-slide path,60091's zero-result bypass, and41768's gravity tail. Shared selected PS/frame words and separate synthetic local frames preserve caller data. The actual slide return replaces the wrapper's call-result local before its branch; no supplied slide return/position/velocity is used in this clear path.
As recovered above, the slide returns0 after its first clear trace, so60091 returns1 without requesting59710. Its origin/velocity/flags match the evaluated slide result. The later41768 tail applies its own gravity subtraction to that resulting velocity and clears mask192/movement timer only if the new Z is negative. Thus the slide end vector already reflects one source gravity subtraction before the separate mode tail applies another; this describes the conditional source sequence, not an asserted gameplay bug or complete physics implementation.
Fixtures vary initial vertical velocity-1/0/12.8/30/100, movement timer0/16 and initial mode flags160/2208. The mode prefix removes32, and the clear slide removes2048 if present. Supplied plane word0, gravity800, timestep0.016 and a native first-clear record define this chain's domain. The surrounding main loop, contact/step branches, entity/global/native effects and exceptional/alias/legal domains remain uncomposed.
## Validation and next tasks
Eight tests independently verify all preparation/plane words and sqrt requests, first endpoint/bounds/ABI,384 full exit policies,122 explicitly partial contact results and touch-list effects, strict normal thresholds,20 actual clear caller chains, source hash/complete partition and scope. The direct step-collision report regenerates unchanged; the new report reproduces twice byte-identically. Full-suite/storage/link/whitespace outcomes are recorded in the ledger.
RE-472 remains open for full slide physics. RE-476 tracks post58312 plane deduplication/capacity/clipping/crease/gravity/end-vector behavior, repeated bumps/time/contact mutations and all remaining returns; actual native collision/ABI/legal records and producers; complete contact/step/wrapper/mode/main shared state and gameplay/macOS/Linux/Rust/Bevy/Solari validation. Other modes/actions/suffix/resource/playback/packet/entity/player/snapshot/rendering milestones remain open.
Follow-up: [plane gate/candidate recovery](QVM_SLIDE_PLANES.md) continues40 contact-prefix states beyond58312 through capacity/dedup/append and first approach-selected candidates. No crease/secondary-plane resolution, velocity commit or subsequent bump is claimed (RE-477–480).
|