qvm: firing request and burst counter
Browse filesFiles changed (10)
- docs/ASSET_PIPELINE_TODO.md+3
- docs/FINDINGS.md+3
- docs/PROVISIONAL_TODO.md+3
- docs/RESEARCH_LEDGER.md+5
- docs/REVERSE_ENGINEERING_TODO.md+3
- docs/research/QVM_FIRE_COUNTER.mdAdded+11
- docs/research/README.md+3
- docs/research/qvm-fire-counter.jsonAdded
- scripts/analyze_qvm_fire_counter.pyAdded+21
- scripts/test_qvm_fire_counter.pyAdded+25
444 unmodified lines445446447444 unmodified linesResearch progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.444 unmodified lines445446447448449450444 unmodified linesResearch progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.Research progress: RE-587 [report](research/QVM_FIRE_COUNTER.md); remaining native/content/runtime/platform scope stays open.
802 unmodified lines803804805802 unmodified lines**RE-586 — Complete firing animation class tag and gait dispatch:** 52253..52729 completes firing pose selection: the class jump table combines running-leg membership with tag22/tag25 exceptions, after the recovered earlier priority routes. [Evidence](research/QVM_FIRE_POSE.md).802 unmodified lines803804805806807808802 unmodified lines**RE-586 — Complete firing animation class tag and gait dispatch:** 52253..52729 completes firing pose selection: the class jump table combines running-leg membership with tag22/tag25 exceptions, after the recovered earlier priority routes. [Evidence](research/QVM_FIRE_POSE.md).**RE-587 — Firing request publication burst counter and selected delay:** 52730..52872 publishes FRAME260=1/264=0 and weapon state3, reloads a zero counter from mode+48, selects mode+44 burst delay while counter>1 and otherwise mode+8 delay, then decrements positive counters. [Evidence](research/QVM_FIRE_COUNTER.md).
760 unmodified lines761762763760 unmodified linesResearch progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.760 unmodified lines761762763764765766760 unmodified linesResearch progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.Research progress: RE-587 [report](research/QVM_FIRE_COUNTER.md); remaining native/content/runtime/platform scope stays open.
622 unmodified lines623624625622 unmodified lines## 2026-10-20 — RE-586 Complete firing animation class tag and gait dispatch (separate task commit)52253..52729 completes firing pose selection: the class jump table combines running-leg membership with tag22/tag25 exceptions, after the recovered earlier priority routes. 112 independent probes check classes−1..8, tags22/25/99, masked running legs, weapon/button priority, exact helper kind/timer/duration effects and initialized jump targets. Full suite: 859 tests pass. Report regenerates byte-identically (827171 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.622 unmodified lines623624625626627628629630622 unmodified lines## 2026-10-20 — RE-586 Complete firing animation class tag and gait dispatch (separate task commit)52253..52729 completes firing pose selection: the class jump table combines running-leg membership with tag22/tag25 exceptions, after the recovered earlier priority routes. 112 independent probes check classes−1..8, tags22/25/99, masked running legs, weapon/button priority, exact helper kind/timer/duration effects and initialized jump targets. Full suite: 859 tests pass. Report regenerates byte-identically (827171 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.## 2026-10-20 — RE-587 Firing request publication burst counter and selected delay (separate task commit)52730..52872 publishes FRAME260=1/264=0 and weapon state3, reloads a zero counter from mode+48, selects mode+44 burst delay while counter>1 and otherwise mode+8 delay, then decrements positive counters. 90 independent counter/config/delay probes plus four chained slice entries check exact publication, signed comparisons, burst terminal delay and retained ammo/event/timer state. Full suite: 863 tests pass. Report regenerates byte-identically (317156 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
801 unmodified lines802803804801 unmodified lines- [x] RE-586 Complete firing animation class tag and gait dispatch ([report](research/QVM_FIRE_POSE.md)).801 unmodified lines802803804805806807801 unmodified lines- [x] RE-586 Complete firing animation class tag and gait dispatch ([report](research/QVM_FIRE_POSE.md)).- [x] RE-587 Firing request publication burst counter and selected delay ([report](research/QVM_FIRE_COUNTER.md)).
1234567891011# Firing request publication burst counter and selected delay
RE-587. Reproduce with `python3 scripts/analyze_qvm_fire_counter.py`; check with `python3 scripts/test_qvm_fire_counter.py`. The [machine report](qvm-fire-counter.json) retains source identity and bounded fixtures.
This body publishes a firing request by writing FRAME260=1, FRAME264=0 and PS148=3. Local20 starts from mode record+8. When PS204 is zero and mode+48 is nonzero it loads that configured count. Count>1 selects mode+44 and decrements; count1 decrements to0 with the original delay. Negative counts are neither reloaded nor decremented.
90 fixtures cover signed boundaries and supplied delays, with a four-entry isolated chain demonstrating counts2/1/0/2 and delays25/25/100/25 from configured count3. These entries are repeated slices, not full ticks or proven legal burst schedules. Selected delay remains in the existing parent local20 for the later timer addition.
No native projectile/hitscan is executed here. Request consumers must still be located and validated; request publication is not proof of a shot outcome. Ammo and event queue are untouched by this particular slice, and the delay has not yet been added to PS44.
No original executable/full QVM/native collision/physics/rendering executes. Native responses and legal input domains are supplied or unverified where stated; full runtime/macOS/Linux Rust/Bevy/Solari gameplay remains open.361 unmodified lines362363364361 unmodified lines[RE-586: Complete firing animation class tag and gait dispatch](QVM_FIRE_POSE.md). Reproduce with `python3 scripts/analyze_qvm_fire_pose.py`; check with `python3 scripts/test_qvm_fire_pose.py`.361 unmodified lines362363364365366367361 unmodified lines[RE-586: Complete firing animation class tag and gait dispatch](QVM_FIRE_POSE.md). Reproduce with `python3 scripts/analyze_qvm_fire_pose.py`; check with `python3 scripts/test_qvm_fire_pose.py`.[RE-587: Firing request publication burst counter and selected delay](QVM_FIRE_COUNTER.md). Reproduce with `python3 scripts/analyze_qvm_fire_counter.py`; check with `python3 scripts/test_qvm_fire_counter.py`.
123456789101112131415161718192021#!/usr/bin/env python3"""52730..52872 per-frame request publication, burst reload and delay selection."""import itertoolsfrom pathlib import Pathfrom qvm_research_support import sourcefrom qvm_firing_support import seed,segmentfrom analyze_qvm_weapon_prefix import LOCALfrom analyze_qvm_acceleration import PSfrom analyze_qvm import write_json
def counter(ins,m,cmd=(0,0,0),preserve_locals=False): m,p=segment(ins,m,52730,[52873],cmd,preserve_locals);p['selected_delay']=m[LOCAL+20]&0xffffffff;return m,p
def main(): q,raw,h,ins=source();rows=[] for count,burst,delays in itertools.product([-1,0,1,2,3,0x7fffffff],[0,1,2,3,0xffffffff],[(100,25),(0,-1),(-1,100)]): m=seed(raw,h);m.update({PS+204:count,4244+432*22+48:burst,4244+432*22+8:delays[0],4244+432*22+44:delays[1]});rows.append(counter(ins,m)[1]) chain=[];m=seed(raw,h);m.update({4244+432*22+48:3,4244+432*22+8:100,4244+432*22+44:25}) for _ in range(4):m,p=counter(ins,m);chain.append(p) write_json(Path('docs/research/qvm-fire-counter.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'slice_repetition':chain,'limits':'Finite52730..52872 only; request260/264 is a published frame contract, not native shot execution. Burst/delay overrides and repeated slice entries are supplied, not complete ticks.'})if __name__=='__main__':main()12345678910111213141516171819202122232425import json,unittest,copyfrom pathlib import Pathfrom test_qvm_torso_selector import signed
def counter_state(p): a=copy.deepcopy(p['initial']);a['request260']=1;a['request264']=0;a['weapon_state']=3;count=signed(a['counter204']);cfg=p['config'];delay=cfg['delay'] if count==0 and cfg['burst_count']!=0:count=signed(cfg['burst_count']) if count>1:delay=cfg['burst_delay'];count-=1 elif count>0:count-=1 a['counter204']=count&0xffffffff;return a,delay,52873class FireCounterTests(unittest.TestCase): @classmethod def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-fire-counter.json').read_text()) def test_exact_publication_counter_and_delay(self): self.assertEqual(len(self.r['probes']),90) for p in self.r['probes']+self.r['slice_repetition']:a,delay,stop=counter_state(p);self.assertEqual(p['final'],a);self.assertEqual(p['selected_delay'],delay);self.assertEqual(p['execution']['stop'],stop) def test_burst_reload_and_terminal_delay(self): rows=self.r['slice_repetition'];self.assertEqual([p['final']['counter204'] for p in rows],[2,1,0,2]);self.assertEqual([p['selected_delay'] for p in rows],[25,25,100,25]) for a,b in zip(rows,rows[1:]):self.assertEqual(a['final'],b['initial']) def test_negative_counter_is_not_reloaded_or_decremented(self): rows=[p for p in self.r['probes'] if p['initial']['counter204']==0xffffffff];self.assertTrue(rows) for p in rows:self.assertEqual(p['final']['counter204'],0xffffffff);self.assertEqual(p['selected_delay'],p['config']['delay']) def test_no_native_event_ammo_or_timer_addition_yet(self): for p in self.r['probes']:self.assertEqual(p['execution']['calls'],[]);self.assertEqual(p['initial']['weapons'],p['final']['weapons']);self.assertEqual(p['initial']['weapon_timer'],p['final']['weapon_timer']);self.assertEqual(p['initial']['queue'],p['final']['queue'])if __name__=='__main__':unittest.main()docs/ASSET_PIPELINE_TODO.md+3
docs/FINDINGS.md+3
docs/PROVISIONAL_TODO.md+3
docs/RESEARCH_LEDGER.md+5
docs/REVERSE_ENGINEERING_TODO.md+3
docs/research/QVM_FIRE_COUNTER.mdAdded+11
docs/research/README.md+3
docs/research/qvm-fire-counter.jsonAdded
scripts/analyze_qvm_fire_counter.pyAdded+21
scripts/test_qvm_fire_counter.pyAdded+25