urt-rs / docs /research /QVM_POSTURE.md
nmarshall's picture
qvm: main posture
238dc89
|
Raw History Blame Contribute Delete
7.29 kB
# Game-QVM posture bounds, transitions and consumers
RE-441–443 / F-190–192. [qvm-posture.json](qvm-posture.json) retains the complete shipped qagame helper47422 instruction partition, 420 bounded posture probes and 48 scalar/bounds bridges. Reproduce with `python3 scripts/analyze_qvm_posture.py`; check with `python3 scripts/test_qvm_posture.py`.
This follows [content and ground recovery](QVM_GROUND.md). Synthetic instruction evaluation starts after ENTER and ends before the return epilogue. No full QVM, original executable, native trace or collision executes. The trace's first output word and square-root return are supplied; helper39525 requests are recorded without effects. Posture, animation, resource and flag semantic names remain provisional. Tested finite values do not establish all legal gameplay domains or native floating-point behavior.
## POSTURE-001 — Bounds and height selection (RE-441)
Helper47422 initializes frame bounds at +184 through +204 to min(-15,-15,-24), max(15,15,45), as binary32 words. Player-state type word+4 equal3 or nonzero frame+240 selects an early return: player-state+164 becomes -16, the initialized bounds remain, and transition/sqrt/final entity-flag work is skipped.
Otherwise final player-state+12 bit1 selects maxZ24 and height word+164=20. With that bit clear, animation word+76 after clearing bit128 equal25 selects maxZ10 and height-5; animation153 therefore selects the same path. All other sampled animations select maxZ45 and height38. Horizontal bounds and minZ remain unchanged in every evaluated path.
These are concrete bounds and height policies; physical posture/type/animation meanings require producer and runtime confirmation. The content sampler consumes the height word, while the ground trace consumes the two bounds pointers.
## POSTURE-002 — Transition guards, resource and callbacks (RE-442)
Entry is eligible when signed command up byte is negative or PS flags include bit2, flags exclude mask12, frame level+212 is at most1, and PS timer+72 is zero. Eligible entry sets bit1. If bit1 was initially clear, it also records helper39525(36) and writes timer200. With ground word+68 other than1023, this first entry converts integer resource word+184 to binary32, subtracts3000, converts back with truncation and clamps a negative result to zero. Existing bit1 bypasses this charge/request/timer assignment. Airborne-sentinel1023 bypasses the resource deduction.
When entry is ineligible, exit is considered only with bit1 set, timer zero, and either ground word other than1023 or level greater than1. The helper requests the callback stored at frame+224 (supplied target-25) with:
| Slot | Request |
| --- | --- |
| 8 | Local trace destination at local-base+44 |
| 12/24 | Same PS position pointer, PS+20 |
| 16/20 | Frame+184 / frame+196 bounds pointers |
| 28 | PS+140 word, supplied7 |
| 32 | Frame+28 mask, supplied0x2010001 |
At this request, maxZ is the tentative standing45. A supplied nonzero first trace word keeps bit1 and ultimately selects maxZ24. A zero first word clears bit1, clears PS+92, records helper39525(37), and writes timer200. Other trace fields are zero-seeded but not consumed by this helper. The actual callback, contact legality and animation-helper mutations remain unknown.
Finally, excluding the early return, the helper requests sqrt of rounded VX²+VY² through encoded target-107. PS+104 bit1 survives only when the supplied horizontal speed is at least300 and signed up is at most-10; otherwise it is cleared. Other bits survive. Fixtures include299/300, -11/-10/-9, a180/240 vector and vertical-only velocity400. Native sqrt execution is omitted; supplied finite square roots match these exact-square inputs.
## POSTURE-003 — Bounds, content, ground and scale bridges (RE-443)
Eight posture variants combine with three supplied content patterns and two supplied ground normals for48 bridges. Evaluated height feeds helper47217 content sample coordinates; resulting content level and posture flags feed helper46773 classification; evaluated six-word bounds are retained at its trace request; evaluated resource feeds helper40397 command scaling. Ground's analyzer now accepts optional bounds while its default report remains byte-identical.
A grounded first entry with resource2999 yields zero and the prior scale helper's normal220 speed policy; the otherwise matching ground-sentinel1023 entry retains2999 and permits its340 policy under supplied forward81/right0/button256. Command scale itself includes the recovered127 normalization and strict resource>10 gate. This establishes selected producer/consumer arithmetic, not full physical simulation. The fixtures seed separate states and transfer selected values rather than preserving all PS/frame/callee effects.
## Validation and next tasks
Eight tests check all420 transitions against an independent branch/arithmetic oracle, tentative trace bounds and arguments, early-return exclusions, resource clamping and animation toggles, horizontal speed/up equality boundaries,48 consumer handoffs and prior ground/scale oracles, source hash/instruction partition and explicit limitations. The direct ground dependency is regenerated unchanged and the new posture report reproduces twice byte-identically. Full suite and storage/link/whitespace checks are recorded in the research ledger.
RE-440 remains open for native collision and full state composition. RE-444 tracks actual overlap-trace ABI/results, helper39525 effects, resource producers/reset/ranges, animation/type/flag/height meanings, complete frame/PS/content/ground/friction composition and gameplay/macOS/Linux validation before Rust/Bevy/Solari compatibility claims. Packet/entity/player/snapshot and rendering milestones remain open.
Follow-up: [animation-helper recovery](QVM_ANIMATION_CONTACTS.md) evaluates39525 and its guarded child at ten selected posture request boundaries, then applies the caller timer200 store (RE-446). Other native/collision/resource/full-state effects remain open under RE-444/448.
Follow-up: [shipped animation definitions](QVM_ANIMATION_TABLES.md) name25 as LEGS_SWIM and36/37 as LEGS_STANDCR/LEGS_CRSTAND. The loader derives480/360 for those transition rows; this does not change the posture caller's explicit timer200 stores. Full state/playback remains open.
Follow-up: [resource producer recovery](QVM_RESOURCE.md) evaluates helper39595 and transfers selected resource outputs into posture and command-scale fixtures (RE-453–455). This recovers one producer of PS+184; complete ordering, semantic/configuration producers and native/state effects remain open under RE-456.
Follow-up: [timer/main-path recovery](QVM_TIMERS_DISPATCH.md) places53048 after posture/ground in the main body and ages selected posture/animation timer outputs using recovered clock elapsed. A new200 timer becomes184 with dt16, conditional on omitted intervening effects. Complete composition remains open under RE-460.
Follow-up: [actual main posture and animation ordering](QVM_MAIN_POSTURE.md) completes bounded RE-505–507, evaluating39525/39383 inside the posture body before final height selection and carrying actual outputs through live main consumers. Earlier isolated probes retain their omitted-child scope.