nmarshall commited on
Commit
39918b9
·
1 Parent(s): 3655587

qvm: firing request and burst counter

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -445,3 +445,6 @@ Research progress: RE-585 [report](research/QVM_FIRE_POSE_PRIORITY.md); remainin
445
 
446
 
447
  Research progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
445
 
446
 
447
  Research progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.
448
+
449
+
450
+ Research progress: RE-587 [report](research/QVM_FIRE_COUNTER.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -803,3 +803,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
803
 
804
 
805
  **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).
 
 
 
 
803
 
804
 
805
  **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).
806
+
807
+
808
+ **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).
docs/PROVISIONAL_TODO.md CHANGED
@@ -761,3 +761,6 @@ Research progress: RE-585 [report](research/QVM_FIRE_POSE_PRIORITY.md); remainin
761
 
762
 
763
  Research progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
761
 
762
 
763
  Research progress: RE-586 [report](research/QVM_FIRE_POSE.md); remaining native/content/runtime/platform scope stays open.
764
+
765
+
766
+ Research progress: RE-587 [report](research/QVM_FIRE_COUNTER.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -623,3 +623,8 @@ RE-580 additional regression: all19 reports from RE-560–569 and RE-571–579 r
623
  ## 2026-10-20 — RE-586 Complete firing animation class tag and gait dispatch (separate task commit)
624
 
625
  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.
 
 
 
 
 
 
623
  ## 2026-10-20 — RE-586 Complete firing animation class tag and gait dispatch (separate task commit)
624
 
625
  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.
626
+
627
+
628
+ ## 2026-10-20 — RE-587 Firing request publication burst counter and selected delay (separate task commit)
629
+
630
+ 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.
docs/REVERSE_ENGINEERING_TODO.md CHANGED
@@ -802,3 +802,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
802
 
803
 
804
  - [x] RE-586 Complete firing animation class tag and gait dispatch ([report](research/QVM_FIRE_POSE.md)).
 
 
 
 
802
 
803
 
804
  - [x] RE-586 Complete firing animation class tag and gait dispatch ([report](research/QVM_FIRE_POSE.md)).
805
+
806
+
807
+ - [x] RE-587 Firing request publication burst counter and selected delay ([report](research/QVM_FIRE_COUNTER.md)).
docs/research/QVM_FIRE_COUNTER.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Firing request publication burst counter and selected delay
2
+
3
+ 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.
4
+
5
+ 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.
6
+
7
+ 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.
8
+
9
+ 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.
10
+
11
+ 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.
docs/research/README.md CHANGED
@@ -362,3 +362,6 @@ The extension collector adds five focused tests for native tail calls, command-r
362
 
363
 
364
  [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`.
 
 
 
 
362
 
363
 
364
  [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`.
365
+
366
+
367
+ [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`.
docs/research/qvm-fire-counter.json ADDED
The diff for this file is too large to render. See raw diff
 
scripts/analyze_qvm_fire_counter.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """52730..52872 per-frame request publication, burst reload and delay selection."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source
6
+ from qvm_firing_support import seed,segment
7
+ from analyze_qvm_weapon_prefix import LOCAL
8
+ from analyze_qvm_acceleration import PS
9
+ from analyze_qvm import write_json
10
+
11
+ def counter(ins,m,cmd=(0,0,0),preserve_locals=False):
12
+ m,p=segment(ins,m,52730,[52873],cmd,preserve_locals);p['selected_delay']=m[LOCAL+20]&0xffffffff;return m,p
13
+
14
+ def main():
15
+ q,raw,h,ins=source();rows=[]
16
+ for count,burst,delays in itertools.product([-1,0,1,2,3,0x7fffffff],[0,1,2,3,0xffffffff],[(100,25),(0,-1),(-1,100)]):
17
+ 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])
18
+ chain=[];m=seed(raw,h);m.update({4244+432*22+48:3,4244+432*22+8:100,4244+432*22+44:25})
19
+ for _ in range(4):m,p=counter(ins,m);chain.append(p)
20
+ 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.'})
21
+ if __name__=='__main__':main()
scripts/test_qvm_fire_counter.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest,copy
2
+ from pathlib import Path
3
+ from test_qvm_torso_selector import signed
4
+
5
+ def counter_state(p):
6
+ 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']
7
+ if count==0 and cfg['burst_count']!=0:count=signed(cfg['burst_count'])
8
+ if count>1:delay=cfg['burst_delay'];count-=1
9
+ elif count>0:count-=1
10
+ a['counter204']=count&0xffffffff;return a,delay,52873
11
+ class FireCounterTests(unittest.TestCase):
12
+ @classmethod
13
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-fire-counter.json').read_text())
14
+ def test_exact_publication_counter_and_delay(self):
15
+ self.assertEqual(len(self.r['probes']),90)
16
+ 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)
17
+ def test_burst_reload_and_terminal_delay(self):
18
+ 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])
19
+ for a,b in zip(rows,rows[1:]):self.assertEqual(a['final'],b['initial'])
20
+ def test_negative_counter_is_not_reloaded_or_decremented(self):
21
+ rows=[p for p in self.r['probes'] if p['initial']['counter204']==0xffffffff];self.assertTrue(rows)
22
+ for p in rows:self.assertEqual(p['final']['counter204'],0xffffffff);self.assertEqual(p['selected_delay'],p['config']['delay'])
23
+ def test_no_native_event_ammo_or_timer_addition_yet(self):
24
+ 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'])
25
+ if __name__=='__main__':unittest.main()