urt-rs / docs /research /QVM_SLIDE_LOOP.md
nmarshall's picture
qvm: repeated contacts
6e240e0
|
Raw History Blame Contribute Delete
5.97 kB

QVM bump gate, common exit and second trace

This batch completes bounded RE-485–487 / F-223–225 in shipped qagame helper57714. It extends the secondary-plane solver through a real second callback request and complete supplied-clear/allsolid exits. It also isolates the counter gate and common-exit policy. Native collision and repeated contact solving remain open.

Reproduce with python3 scripts/analyze_qvm_slide_loop.py; validate with python3 scripts/test_qvm_slide_loop.py. The machine report records verified source identity, counter/exit instructions, exact words, request arguments and bounded trace hashes. No original executable, full QVM, native collision, physics or rendering executes.

LOOP-001 — Increment and strict cap (RE-485)

The helper initializes local244 to literal4 and local240 to0. Initial entry jumps to the counter comparison. Normal contact continuation at59637 increments local240, then the signed comparison counter < cap at59647 branches back to58086. Failure continues into the common exit at59648. The gate itself tests no velocity or remaining-time word. This source structure permits at most four trace iterations under the initialized cap, but does not establish four physically consistent contacts.

Twelve isolated probes vary counter0/1/3/4 and supplied cap0/1/4, including the equality boundary. Supplied nondefault caps test the local comparison only; the actual helper initialization remains4. Counter rollover, exceptional state and arbitrary counter provenance are outside these finite fixtures.

EXIT-001 — Gravity, timer override, flag cleanup and return (RE-486)

The common exit first copies the end vector into PS velocity when the gravity argument is nonzero. Next, any nonzero PS movement timer copies the saved vector over PS velocity, taking precedence over both solver output and the gravity end vector. A zero local248 clears PS flag2048; a nonzero value retains it. This local is initialized0 and conditionally set by the earlier contact-normal/gravity policy; its broad gameplay meaning remains unverified.

Finally, return is1 exactly when local240 is nonzero, otherwise0. A later clear trace therefore returns1 after a preceding contact advanced the counter, even though the same fraction1 branch on the first iteration returns0. Earlier capacity/third-plane/allsolid returns bypass this common exit, so their vector and flag behavior must remain distinct.

Twenty-four suffix probes independently vary gravity, timer, local248 and counter. They use distinct supplied current/end/saved vectors to establish copy order and both flag outcomes. These isolated values demonstrate source policy, not legal runtime producer combinations.

LOOPCHAIN-001 — Contact solver to second trace and complete exit (RE-487)

Forty-eight chains vary gravity0/1, timer0/16, first fraction0/0.5, incoming normals X/-X/Z and second allsolid0/1. They evaluate the earlier gravity/plane preparation, first supplied trace, contact flags/touch registration, remaining-time reduction, plane gate and complete secondary-plane solver where requested. Memory then resumes at59637 in the same local frame. The source increments the actual counter to1 and computes the next endpoint from actual current origin/solver velocity and reduced remaining time.

The second request retains callback58198/trap-25, trace destination local164, start PS+20, bounds frame+184/+196, endpoint local228, PS+140 entity selector and frame+28 mask. Endpoint components follow ordered binary32 origin + velocity * remaining_time. A zero first fraction retains the original origin/time;0.5 advances/interpolates the supplied endpoint and shrinks time. The first trace interpolation model and both callback records remain supplied.

The supplied second fraction is1. Clear records copy that endpoint to PS origin and complete the common exit with return1, applying gravity/timer/flag policy to the actual vectors. Allsolid records instead zero only PS Z and return1 before endpoint copying or common-exit cleanup. They preserve pre-second origin, X/Y and flags, including with an active timer. The fixture deliberately also supplies fraction1 when allsolid is set: source priority is tested, while physical consistency of those records is unverified. Neither path registers a second touch or changes remaining time again.

All48 chains complete helper57714 for their supplied second-record branch. They do not execute a second contact solver, third/fourth trace, native callback effects, impact reset/consumers or full step/wrapper/mode/main state. Existing contact solver state is evaluated once with supplied initial impact0; no claim of an accumulated impact maximum across multiple contacts is made.

Validation and next work

Eight tests check12 increment/cap cases and literal initialization,24 suffix copy/flag/return cases,48 exact endpoint/state transfers, prior solver outputs against its independent oracle, callback arguments, no extra touch, clear/allsolid priority and output words, source provenance/boundaries and explicit supplied-effect limits. Reproducibility/full-suite/storage/link/whitespace outcomes are recorded in the research ledger.

RE-484 remains open for its broad repeated-contact/native/runtime scope. RE-488 tracks repeated contact solves through trace3/4 and exhaustion; shared plane/time/touch/impact accumulation; native collision/trace legality, actual callback side effects and impact producers/consumers; complete slide-to-step/wrapper/mode/main composition and macOS/Linux Rust/Bevy/Solari gameplay. Other game, asset, rendering and protocol milestones remain open.

Follow-up: continuous repeated-contact recovery completes bounded RE-489–491: source solver/trace3/4, accumulated planes/time/touch/impact and actual exhaustion. Native collision/legal records/full caller/runtime scope remains open under RE-488/492.