nmarshall commited on
Commit
638d56b
·
1 Parent(s): 7a05936

qvm: history angle interpolation

Browse files
docs/ASSET_PIPELINE_TODO.md CHANGED
@@ -595,3 +595,6 @@ Research progress: RE-637 [report](research/QVM_REWIND_HISTORY_SELECT.md); remai
595
 
596
 
597
  Research progress: RE-638 [report](research/QVM_HISTORY_VECTOR_LERP.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
595
 
596
 
597
  Research progress: RE-638 [report](research/QVM_HISTORY_VECTOR_LERP.md); remaining native/content/runtime/platform scope stays open.
598
+
599
+
600
+ Research progress: RE-639 [report](research/QVM_HISTORY_ANGLE_LERP.md); remaining native/content/runtime/platform scope stays open.
docs/FINDINGS.md CHANGED
@@ -944,3 +944,6 @@ Bounded qagame paths recover bomb-plant/inactivity correction requests, direct f
944
 
945
 
946
  **RE-638 — Exact weighted history vector interpolation and aliases:** 143031 computes(1−fraction)×a+fraction×b in source f32 order, with no clamp; generic subtract/add lerp can differ. [Evidence](research/QVM_HISTORY_VECTOR_LERP.md).
 
 
 
 
944
 
945
 
946
  **RE-638 — Exact weighted history vector interpolation and aliases:** 143031 computes(1−fraction)×a+fraction×b in source f32 order, with no clamp; generic subtract/add lerp can differ. [Evidence](research/QVM_HISTORY_VECTOR_LERP.md).
947
+
948
+
949
+ **RE-639 — History angle interpolation and strict half-turn correction:** 63746 corrects differences strictly beyond±180 by one360 step, then interpolates without normalizing the result or weight. [Evidence](research/QVM_HISTORY_ANGLE_LERP.md).
docs/PROVISIONAL_TODO.md CHANGED
@@ -915,3 +915,6 @@ Research progress: RE-637 [report](research/QVM_REWIND_HISTORY_SELECT.md); remai
915
 
916
 
917
  Research progress: RE-638 [report](research/QVM_HISTORY_VECTOR_LERP.md); remaining native/content/runtime/platform scope stays open.
 
 
 
 
915
 
916
 
917
  Research progress: RE-638 [report](research/QVM_HISTORY_VECTOR_LERP.md); remaining native/content/runtime/platform scope stays open.
918
+
919
+
920
+ Research progress: RE-639 [report](research/QVM_HISTORY_ANGLE_LERP.md); remaining native/content/runtime/platform scope stays open.
docs/RESEARCH_LEDGER.md CHANGED
@@ -862,3 +862,8 @@ Whole291641 now follows supplied world/entity traces through retry, ordered reli
862
  ## 2026-10-20 — RE-638 Exact weighted history vector interpolation and aliases (separate task commit)
863
 
864
  143031 computes(1−fraction)×a+fraction×b in source f32 order, with no clamp; generic subtract/add lerp can differ. 72 finite vector/weight/alias fixtures match independent exact weighted sums and demonstrate an inequivalent generic lerp. Full suite: 1029 tests pass. Report regenerates byte-identically (52742 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
 
 
 
 
 
 
862
  ## 2026-10-20 — RE-638 Exact weighted history vector interpolation and aliases (separate task commit)
863
 
864
  143031 computes(1−fraction)×a+fraction×b in source f32 order, with no clamp; generic subtract/add lerp can differ. 72 finite vector/weight/alias fixtures match independent exact weighted sums and demonstrate an inequivalent generic lerp. Full suite: 1029 tests pass. Report regenerates byte-identically (52742 bytes). Storage/filter, links and whitespace checks pass. No assets/Rust runtime/shared VM evaluator changed; native/reference/legal/full platform scope remains open.
865
+
866
+
867
+ ## 2026-10-20 — RE-639 History angle interpolation and strict half-turn correction (separate task commit)
868
+
869
+ 63746 corrects differences strictly beyond±180 by one360 step, then interpolates without normalizing the result or weight. 50 exact f32 boundary/wrap/extrapolation cases match an independent numeric oracle and show large differences remain outside a single turn. Full suite: 1032 tests pass. Report regenerates byte-identically (23452 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
@@ -958,3 +958,6 @@ Purpose: turn the supplied installation into an evidence-backed specification of
958
 
959
 
960
  - [x] RE-638 Exact weighted history vector interpolation and aliases ([report](research/QVM_HISTORY_VECTOR_LERP.md)).
 
 
 
 
958
 
959
 
960
  - [x] RE-638 Exact weighted history vector interpolation and aliases ([report](research/QVM_HISTORY_VECTOR_LERP.md)).
961
+
962
+
963
+ - [x] RE-639 History angle interpolation and strict half-turn correction ([report](research/QVM_HISTORY_ANGLE_LERP.md)).
docs/research/QVM_HISTORY_ANGLE_LERP.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # History angle interpolation and strict half-turn correction
2
+
3
+ RE-639. Reproduce with `python3 scripts/analyze_qvm_history_angle_lerp.py`; check with `python3 scripts/test_qvm_history_angle_lerp.py`. The [machine report](qvm-history-angle-lerp.json) retains source identity and bounded fixtures.
4
+
5
+ Complete63747–63792 first subtracts360 from the second angle if its rounded difference exceeds180, then adds360 if the resulting rounded difference is below−180. Equality at either half-turn does not adjust. The return is firstAngle+fraction×(adjustedSecond−firstAngle) in source f32 order. A1080-degree input can return720, so this is not a general modulo or shortest-angle library replacement for arbitrary inputs. Tests cover strict boundaries, ordinary wraps, large differences and weights−1..2. The finite helper has no native children; legal live angle domains remain unverified.
6
+
7
+ 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
@@ -516,3 +516,6 @@ The extension collector adds five focused tests for native tail calls, command-r
516
 
517
 
518
  [RE-638: Exact weighted history vector interpolation and aliases](QVM_HISTORY_VECTOR_LERP.md). Reproduce with `python3 scripts/analyze_qvm_history_vector_lerp.py`; check with `python3 scripts/test_qvm_history_vector_lerp.py`.
 
 
 
 
516
 
517
 
518
  [RE-638: Exact weighted history vector interpolation and aliases](QVM_HISTORY_VECTOR_LERP.md). Reproduce with `python3 scripts/analyze_qvm_history_vector_lerp.py`; check with `python3 scripts/test_qvm_history_vector_lerp.py`.
519
+
520
+
521
+ [RE-639: History angle interpolation and strict half-turn correction](QVM_HISTORY_ANGLE_LERP.md). Reproduce with `python3 scripts/analyze_qvm_history_angle_lerp.py`; check with `python3 scripts/test_qvm_history_angle_lerp.py`.
docs/research/qvm-history-angle-lerp.json ADDED
@@ -0,0 +1,941 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "limits": "Complete63747\u201363792 finite numeric return. At most one\u00b1360 correction per comparison; no general angle/fraction normalization. Nonfinite inputs and original engine legal angle ranges unverified.",
3
+ "probes": [
4
+ {
5
+ "adjusted_b": 1127481344,
6
+ "arguments": {
7
+ "8": 0,
8
+ "12": 1127481344,
9
+ "16": 3212836864
10
+ },
11
+ "execution": {
12
+ "byte_writes": [],
13
+ "calls": [],
14
+ "children": [],
15
+ "return": -1020002304,
16
+ "trace": null,
17
+ "trace_length": 34,
18
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
19
+ },
20
+ "result": 3274964992
21
+ },
22
+ {
23
+ "adjusted_b": 1127481344,
24
+ "arguments": {
25
+ "8": 0,
26
+ "12": 1127481344,
27
+ "16": 0
28
+ },
29
+ "execution": {
30
+ "byte_writes": [],
31
+ "calls": [],
32
+ "children": [],
33
+ "return": 0,
34
+ "trace": null,
35
+ "trace_length": 34,
36
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
37
+ },
38
+ "result": 0
39
+ },
40
+ {
41
+ "adjusted_b": 1127481344,
42
+ "arguments": {
43
+ "8": 0,
44
+ "12": 1127481344,
45
+ "16": 1056964608
46
+ },
47
+ "execution": {
48
+ "byte_writes": [],
49
+ "calls": [],
50
+ "children": [],
51
+ "return": 1119092736,
52
+ "trace": null,
53
+ "trace_length": 34,
54
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
55
+ },
56
+ "result": 1119092736
57
+ },
58
+ {
59
+ "adjusted_b": 1127481344,
60
+ "arguments": {
61
+ "8": 0,
62
+ "12": 1127481344,
63
+ "16": 1065353216
64
+ },
65
+ "execution": {
66
+ "byte_writes": [],
67
+ "calls": [],
68
+ "children": [],
69
+ "return": 1127481344,
70
+ "trace": null,
71
+ "trace_length": 34,
72
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
73
+ },
74
+ "result": 1127481344
75
+ },
76
+ {
77
+ "adjusted_b": 1127481344,
78
+ "arguments": {
79
+ "8": 0,
80
+ "12": 1127481344,
81
+ "16": 1073741824
82
+ },
83
+ "execution": {
84
+ "byte_writes": [],
85
+ "calls": [],
86
+ "children": [],
87
+ "return": 1135869952,
88
+ "trace": null,
89
+ "trace_length": 34,
90
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
91
+ },
92
+ "result": 1135869952
93
+ },
94
+ {
95
+ "adjusted_b": 3274899456,
96
+ "arguments": {
97
+ "8": 0,
98
+ "12": 1127546880,
99
+ "16": 3212836864
100
+ },
101
+ "execution": {
102
+ "byte_writes": [],
103
+ "calls": [],
104
+ "children": [],
105
+ "return": 1127415808,
106
+ "trace": null,
107
+ "trace_length": 40,
108
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
109
+ },
110
+ "result": 1127415808
111
+ },
112
+ {
113
+ "adjusted_b": 3274899456,
114
+ "arguments": {
115
+ "8": 0,
116
+ "12": 1127546880,
117
+ "16": 0
118
+ },
119
+ "execution": {
120
+ "byte_writes": [],
121
+ "calls": [],
122
+ "children": [],
123
+ "return": 0,
124
+ "trace": null,
125
+ "trace_length": 40,
126
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
127
+ },
128
+ "result": 0
129
+ },
130
+ {
131
+ "adjusted_b": 3274899456,
132
+ "arguments": {
133
+ "8": 0,
134
+ "12": 1127546880,
135
+ "16": 1056964608
136
+ },
137
+ "execution": {
138
+ "byte_writes": [],
139
+ "calls": [],
140
+ "children": [],
141
+ "return": -1028456448,
142
+ "trace": null,
143
+ "trace_length": 40,
144
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
145
+ },
146
+ "result": 3266510848
147
+ },
148
+ {
149
+ "adjusted_b": 3274899456,
150
+ "arguments": {
151
+ "8": 0,
152
+ "12": 1127546880,
153
+ "16": 1065353216
154
+ },
155
+ "execution": {
156
+ "byte_writes": [],
157
+ "calls": [],
158
+ "children": [],
159
+ "return": -1020067840,
160
+ "trace": null,
161
+ "trace_length": 40,
162
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
163
+ },
164
+ "result": 3274899456
165
+ },
166
+ {
167
+ "adjusted_b": 3274899456,
168
+ "arguments": {
169
+ "8": 0,
170
+ "12": 1127546880,
171
+ "16": 1073741824
172
+ },
173
+ "execution": {
174
+ "byte_writes": [],
175
+ "calls": [],
176
+ "children": [],
177
+ "return": -1011679232,
178
+ "trace": null,
179
+ "trace_length": 40,
180
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
181
+ },
182
+ "result": 3283288064
183
+ },
184
+ {
185
+ "adjusted_b": 3274964992,
186
+ "arguments": {
187
+ "8": 0,
188
+ "12": 3274964992,
189
+ "16": 3212836864
190
+ },
191
+ "execution": {
192
+ "byte_writes": [],
193
+ "calls": [],
194
+ "children": [],
195
+ "return": 1127481344,
196
+ "trace": null,
197
+ "trace_length": 34,
198
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
199
+ },
200
+ "result": 1127481344
201
+ },
202
+ {
203
+ "adjusted_b": 3274964992,
204
+ "arguments": {
205
+ "8": 0,
206
+ "12": 3274964992,
207
+ "16": 0
208
+ },
209
+ "execution": {
210
+ "byte_writes": [],
211
+ "calls": [],
212
+ "children": [],
213
+ "return": 0,
214
+ "trace": null,
215
+ "trace_length": 34,
216
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
217
+ },
218
+ "result": 0
219
+ },
220
+ {
221
+ "adjusted_b": 3274964992,
222
+ "arguments": {
223
+ "8": 0,
224
+ "12": 3274964992,
225
+ "16": 1056964608
226
+ },
227
+ "execution": {
228
+ "byte_writes": [],
229
+ "calls": [],
230
+ "children": [],
231
+ "return": -1028390912,
232
+ "trace": null,
233
+ "trace_length": 34,
234
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
235
+ },
236
+ "result": 3266576384
237
+ },
238
+ {
239
+ "adjusted_b": 3274964992,
240
+ "arguments": {
241
+ "8": 0,
242
+ "12": 3274964992,
243
+ "16": 1065353216
244
+ },
245
+ "execution": {
246
+ "byte_writes": [],
247
+ "calls": [],
248
+ "children": [],
249
+ "return": -1020002304,
250
+ "trace": null,
251
+ "trace_length": 34,
252
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
253
+ },
254
+ "result": 3274964992
255
+ },
256
+ {
257
+ "adjusted_b": 3274964992,
258
+ "arguments": {
259
+ "8": 0,
260
+ "12": 3274964992,
261
+ "16": 1073741824
262
+ },
263
+ "execution": {
264
+ "byte_writes": [],
265
+ "calls": [],
266
+ "children": [],
267
+ "return": -1011613696,
268
+ "trace": null,
269
+ "trace_length": 34,
270
+ "trace_sha256": "97147b5f9b057252ae80fa5454f7d76578880e2e4671d694b00fb0ea72793fef"
271
+ },
272
+ "result": 3283353600
273
+ },
274
+ {
275
+ "adjusted_b": 1127415808,
276
+ "arguments": {
277
+ "8": 0,
278
+ "12": 3275030528,
279
+ "16": 3212836864
280
+ },
281
+ "execution": {
282
+ "byte_writes": [],
283
+ "calls": [],
284
+ "children": [],
285
+ "return": -1020067840,
286
+ "trace": null,
287
+ "trace_length": 40,
288
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
289
+ },
290
+ "result": 3274899456
291
+ },
292
+ {
293
+ "adjusted_b": 1127415808,
294
+ "arguments": {
295
+ "8": 0,
296
+ "12": 3275030528,
297
+ "16": 0
298
+ },
299
+ "execution": {
300
+ "byte_writes": [],
301
+ "calls": [],
302
+ "children": [],
303
+ "return": 0,
304
+ "trace": null,
305
+ "trace_length": 40,
306
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
307
+ },
308
+ "result": 0
309
+ },
310
+ {
311
+ "adjusted_b": 1127415808,
312
+ "arguments": {
313
+ "8": 0,
314
+ "12": 3275030528,
315
+ "16": 1056964608
316
+ },
317
+ "execution": {
318
+ "byte_writes": [],
319
+ "calls": [],
320
+ "children": [],
321
+ "return": 1119027200,
322
+ "trace": null,
323
+ "trace_length": 40,
324
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
325
+ },
326
+ "result": 1119027200
327
+ },
328
+ {
329
+ "adjusted_b": 1127415808,
330
+ "arguments": {
331
+ "8": 0,
332
+ "12": 3275030528,
333
+ "16": 1065353216
334
+ },
335
+ "execution": {
336
+ "byte_writes": [],
337
+ "calls": [],
338
+ "children": [],
339
+ "return": 1127415808,
340
+ "trace": null,
341
+ "trace_length": 40,
342
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
343
+ },
344
+ "result": 1127415808
345
+ },
346
+ {
347
+ "adjusted_b": 1127415808,
348
+ "arguments": {
349
+ "8": 0,
350
+ "12": 3275030528,
351
+ "16": 1073741824
352
+ },
353
+ "execution": {
354
+ "byte_writes": [],
355
+ "calls": [],
356
+ "children": [],
357
+ "return": 1135804416,
358
+ "trace": null,
359
+ "trace_length": 40,
360
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
361
+ },
362
+ "result": 1135804416
363
+ },
364
+ {
365
+ "adjusted_b": 1136197632,
366
+ "arguments": {
367
+ "8": 1135542272,
368
+ "12": 1092616192,
369
+ "16": 3212836864
370
+ },
371
+ "execution": {
372
+ "byte_writes": [],
373
+ "calls": [],
374
+ "children": [],
375
+ "return": 1134886912,
376
+ "trace": null,
377
+ "trace_length": 40,
378
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
379
+ },
380
+ "result": 1134886912
381
+ },
382
+ {
383
+ "adjusted_b": 1136197632,
384
+ "arguments": {
385
+ "8": 1135542272,
386
+ "12": 1092616192,
387
+ "16": 0
388
+ },
389
+ "execution": {
390
+ "byte_writes": [],
391
+ "calls": [],
392
+ "children": [],
393
+ "return": 1135542272,
394
+ "trace": null,
395
+ "trace_length": 40,
396
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
397
+ },
398
+ "result": 1135542272
399
+ },
400
+ {
401
+ "adjusted_b": 1136197632,
402
+ "arguments": {
403
+ "8": 1135542272,
404
+ "12": 1092616192,
405
+ "16": 1056964608
406
+ },
407
+ "execution": {
408
+ "byte_writes": [],
409
+ "calls": [],
410
+ "children": [],
411
+ "return": 1135869952,
412
+ "trace": null,
413
+ "trace_length": 40,
414
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
415
+ },
416
+ "result": 1135869952
417
+ },
418
+ {
419
+ "adjusted_b": 1136197632,
420
+ "arguments": {
421
+ "8": 1135542272,
422
+ "12": 1092616192,
423
+ "16": 1065353216
424
+ },
425
+ "execution": {
426
+ "byte_writes": [],
427
+ "calls": [],
428
+ "children": [],
429
+ "return": 1136197632,
430
+ "trace": null,
431
+ "trace_length": 40,
432
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
433
+ },
434
+ "result": 1136197632
435
+ },
436
+ {
437
+ "adjusted_b": 1136197632,
438
+ "arguments": {
439
+ "8": 1135542272,
440
+ "12": 1092616192,
441
+ "16": 1073741824
442
+ },
443
+ "execution": {
444
+ "byte_writes": [],
445
+ "calls": [],
446
+ "children": [],
447
+ "return": 1136852992,
448
+ "trace": null,
449
+ "trace_length": 40,
450
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
451
+ },
452
+ "result": 1136852992
453
+ },
454
+ {
455
+ "adjusted_b": 3240099840,
456
+ "arguments": {
457
+ "8": 1092616192,
458
+ "12": 1135542272,
459
+ "16": 3212836864
460
+ },
461
+ "execution": {
462
+ "byte_writes": [],
463
+ "calls": [],
464
+ "children": [],
465
+ "return": 1106247680,
466
+ "trace": null,
467
+ "trace_length": 40,
468
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
469
+ },
470
+ "result": 1106247680
471
+ },
472
+ {
473
+ "adjusted_b": 3240099840,
474
+ "arguments": {
475
+ "8": 1092616192,
476
+ "12": 1135542272,
477
+ "16": 0
478
+ },
479
+ "execution": {
480
+ "byte_writes": [],
481
+ "calls": [],
482
+ "children": [],
483
+ "return": 1092616192,
484
+ "trace": null,
485
+ "trace_length": 40,
486
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
487
+ },
488
+ "result": 1092616192
489
+ },
490
+ {
491
+ "adjusted_b": 3240099840,
492
+ "arguments": {
493
+ "8": 1092616192,
494
+ "12": 1135542272,
495
+ "16": 1056964608
496
+ },
497
+ "execution": {
498
+ "byte_writes": [],
499
+ "calls": [],
500
+ "children": [],
501
+ "return": 0,
502
+ "trace": null,
503
+ "trace_length": 40,
504
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
505
+ },
506
+ "result": 0
507
+ },
508
+ {
509
+ "adjusted_b": 3240099840,
510
+ "arguments": {
511
+ "8": 1092616192,
512
+ "12": 1135542272,
513
+ "16": 1065353216
514
+ },
515
+ "execution": {
516
+ "byte_writes": [],
517
+ "calls": [],
518
+ "children": [],
519
+ "return": -1054867456,
520
+ "trace": null,
521
+ "trace_length": 40,
522
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
523
+ },
524
+ "result": 3240099840
525
+ },
526
+ {
527
+ "adjusted_b": 3240099840,
528
+ "arguments": {
529
+ "8": 1092616192,
530
+ "12": 1135542272,
531
+ "16": 1073741824
532
+ },
533
+ "execution": {
534
+ "byte_writes": [],
535
+ "calls": [],
536
+ "children": [],
537
+ "return": -1041235968,
538
+ "trace": null,
539
+ "trace_length": 40,
540
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
541
+ },
542
+ "result": 3253731328
543
+ },
544
+ {
545
+ "adjusted_b": 1144258560,
546
+ "arguments": {
547
+ "8": 0,
548
+ "12": 1149698048,
549
+ "16": 3212836864
550
+ },
551
+ "execution": {
552
+ "byte_writes": [],
553
+ "calls": [],
554
+ "children": [],
555
+ "return": -1003225088,
556
+ "trace": null,
557
+ "trace_length": 40,
558
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
559
+ },
560
+ "result": 3291742208
561
+ },
562
+ {
563
+ "adjusted_b": 1144258560,
564
+ "arguments": {
565
+ "8": 0,
566
+ "12": 1149698048,
567
+ "16": 0
568
+ },
569
+ "execution": {
570
+ "byte_writes": [],
571
+ "calls": [],
572
+ "children": [],
573
+ "return": 0,
574
+ "trace": null,
575
+ "trace_length": 40,
576
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
577
+ },
578
+ "result": 0
579
+ },
580
+ {
581
+ "adjusted_b": 1144258560,
582
+ "arguments": {
583
+ "8": 0,
584
+ "12": 1149698048,
585
+ "16": 1056964608
586
+ },
587
+ "execution": {
588
+ "byte_writes": [],
589
+ "calls": [],
590
+ "children": [],
591
+ "return": 1135869952,
592
+ "trace": null,
593
+ "trace_length": 40,
594
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
595
+ },
596
+ "result": 1135869952
597
+ },
598
+ {
599
+ "adjusted_b": 1144258560,
600
+ "arguments": {
601
+ "8": 0,
602
+ "12": 1149698048,
603
+ "16": 1065353216
604
+ },
605
+ "execution": {
606
+ "byte_writes": [],
607
+ "calls": [],
608
+ "children": [],
609
+ "return": 1144258560,
610
+ "trace": null,
611
+ "trace_length": 40,
612
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
613
+ },
614
+ "result": 1144258560
615
+ },
616
+ {
617
+ "adjusted_b": 1144258560,
618
+ "arguments": {
619
+ "8": 0,
620
+ "12": 1149698048,
621
+ "16": 1073741824
622
+ },
623
+ "execution": {
624
+ "byte_writes": [],
625
+ "calls": [],
626
+ "children": [],
627
+ "return": 1152647168,
628
+ "trace": null,
629
+ "trace_length": 40,
630
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
631
+ },
632
+ "result": 1152647168
633
+ },
634
+ {
635
+ "adjusted_b": 1135869952,
636
+ "arguments": {
637
+ "8": 1149698048,
638
+ "12": 0,
639
+ "16": 3212836864
640
+ },
641
+ "execution": {
642
+ "byte_writes": [],
643
+ "calls": [],
644
+ "children": [],
645
+ "return": 1155596288,
646
+ "trace": null,
647
+ "trace_length": 40,
648
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
649
+ },
650
+ "result": 1155596288
651
+ },
652
+ {
653
+ "adjusted_b": 1135869952,
654
+ "arguments": {
655
+ "8": 1149698048,
656
+ "12": 0,
657
+ "16": 0
658
+ },
659
+ "execution": {
660
+ "byte_writes": [],
661
+ "calls": [],
662
+ "children": [],
663
+ "return": 1149698048,
664
+ "trace": null,
665
+ "trace_length": 40,
666
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
667
+ },
668
+ "result": 1149698048
669
+ },
670
+ {
671
+ "adjusted_b": 1135869952,
672
+ "arguments": {
673
+ "8": 1149698048,
674
+ "12": 0,
675
+ "16": 1056964608
676
+ },
677
+ "execution": {
678
+ "byte_writes": [],
679
+ "calls": [],
680
+ "children": [],
681
+ "return": 1144258560,
682
+ "trace": null,
683
+ "trace_length": 40,
684
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
685
+ },
686
+ "result": 1144258560
687
+ },
688
+ {
689
+ "adjusted_b": 1135869952,
690
+ "arguments": {
691
+ "8": 1149698048,
692
+ "12": 0,
693
+ "16": 1065353216
694
+ },
695
+ "execution": {
696
+ "byte_writes": [],
697
+ "calls": [],
698
+ "children": [],
699
+ "return": 1135869952,
700
+ "trace": null,
701
+ "trace_length": 40,
702
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
703
+ },
704
+ "result": 1135869952
705
+ },
706
+ {
707
+ "adjusted_b": 1135869952,
708
+ "arguments": {
709
+ "8": 1149698048,
710
+ "12": 0,
711
+ "16": 1073741824
712
+ },
713
+ "execution": {
714
+ "byte_writes": [],
715
+ "calls": [],
716
+ "children": [],
717
+ "return": -1011613696,
718
+ "trace": null,
719
+ "trace_length": 40,
720
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
721
+ },
722
+ "result": 3283353600
723
+ },
724
+ {
725
+ "adjusted_b": 1135869919,
726
+ "arguments": {
727
+ "8": 1127481344,
728
+ "12": 3129152111,
729
+ "16": 3212836864
730
+ },
731
+ "execution": {
732
+ "byte_writes": [],
733
+ "calls": [],
734
+ "children": [],
735
+ "return": 981729280,
736
+ "trace": null,
737
+ "trace_length": 40,
738
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
739
+ },
740
+ "result": 981729280
741
+ },
742
+ {
743
+ "adjusted_b": 1135869919,
744
+ "arguments": {
745
+ "8": 1127481344,
746
+ "12": 3129152111,
747
+ "16": 0
748
+ },
749
+ "execution": {
750
+ "byte_writes": [],
751
+ "calls": [],
752
+ "children": [],
753
+ "return": 1127481344,
754
+ "trace": null,
755
+ "trace_length": 40,
756
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
757
+ },
758
+ "result": 1127481344
759
+ },
760
+ {
761
+ "adjusted_b": 1135869919,
762
+ "arguments": {
763
+ "8": 1127481344,
764
+ "12": 3129152111,
765
+ "16": 1056964608
766
+ },
767
+ "execution": {
768
+ "byte_writes": [],
769
+ "calls": [],
770
+ "children": [],
771
+ "return": 1132920816,
772
+ "trace": null,
773
+ "trace_length": 40,
774
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
775
+ },
776
+ "result": 1132920816
777
+ },
778
+ {
779
+ "adjusted_b": 1135869919,
780
+ "arguments": {
781
+ "8": 1127481344,
782
+ "12": 3129152111,
783
+ "16": 1065353216
784
+ },
785
+ "execution": {
786
+ "byte_writes": [],
787
+ "calls": [],
788
+ "children": [],
789
+ "return": 1135869919,
790
+ "trace": null,
791
+ "trace_length": 40,
792
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
793
+ },
794
+ "result": 1135869919
795
+ },
796
+ {
797
+ "adjusted_b": 1135869919,
798
+ "arguments": {
799
+ "8": 1127481344,
800
+ "12": 3129152111,
801
+ "16": 1073741824
802
+ },
803
+ "execution": {
804
+ "byte_writes": [],
805
+ "calls": [],
806
+ "children": [],
807
+ "return": 1141309407,
808
+ "trace": null,
809
+ "trace_length": 40,
810
+ "trace_sha256": "213616589f08849fbdc1a5402a9b99dd3e2b677ac714dd20fb5544d90f42ce82"
811
+ },
812
+ "result": 1141309407
813
+ },
814
+ {
815
+ "adjusted_b": 3283353567,
816
+ "arguments": {
817
+ "8": 3274964992,
818
+ "12": 981668463,
819
+ "16": 3212836864
820
+ },
821
+ "execution": {
822
+ "byte_writes": [],
823
+ "calls": [],
824
+ "children": [],
825
+ "return": -1165754368,
826
+ "trace": null,
827
+ "trace_length": 40,
828
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
829
+ },
830
+ "result": 3129212928
831
+ },
832
+ {
833
+ "adjusted_b": 3283353567,
834
+ "arguments": {
835
+ "8": 3274964992,
836
+ "12": 981668463,
837
+ "16": 0
838
+ },
839
+ "execution": {
840
+ "byte_writes": [],
841
+ "calls": [],
842
+ "children": [],
843
+ "return": -1020002304,
844
+ "trace": null,
845
+ "trace_length": 40,
846
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
847
+ },
848
+ "result": 3274964992
849
+ },
850
+ {
851
+ "adjusted_b": 3283353567,
852
+ "arguments": {
853
+ "8": 3274964992,
854
+ "12": 981668463,
855
+ "16": 1056964608
856
+ },
857
+ "execution": {
858
+ "byte_writes": [],
859
+ "calls": [],
860
+ "children": [],
861
+ "return": -1014562832,
862
+ "trace": null,
863
+ "trace_length": 40,
864
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
865
+ },
866
+ "result": 3280404464
867
+ },
868
+ {
869
+ "adjusted_b": 3283353567,
870
+ "arguments": {
871
+ "8": 3274964992,
872
+ "12": 981668463,
873
+ "16": 1065353216
874
+ },
875
+ "execution": {
876
+ "byte_writes": [],
877
+ "calls": [],
878
+ "children": [],
879
+ "return": -1011613729,
880
+ "trace": null,
881
+ "trace_length": 40,
882
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
883
+ },
884
+ "result": 3283353567
885
+ },
886
+ {
887
+ "adjusted_b": 3283353567,
888
+ "arguments": {
889
+ "8": 3274964992,
890
+ "12": 981668463,
891
+ "16": 1073741824
892
+ },
893
+ "execution": {
894
+ "byte_writes": [],
895
+ "calls": [],
896
+ "children": [],
897
+ "return": -1006174241,
898
+ "trace": null,
899
+ "trace_length": 40,
900
+ "trace_sha256": "ee45f2b83580291799592ba3671a6771fdfbe4a5a687fca1e0c256c7fb21320e"
901
+ },
902
+ "result": 3288793055
903
+ }
904
+ ],
905
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
906
+ "source": {
907
+ "archive": "zUrT43_qvm.pk3",
908
+ "archive_sha256": "b59bf0c5bedf11d50e0edd220da7eade96de40601e98ae14c54c819047df0796",
909
+ "member": {
910
+ "bytes": 983300,
911
+ "comment_hex": "",
912
+ "compressed_bytes": 246560,
913
+ "compression": 8,
914
+ "crc32": "98ea1768",
915
+ "create_system": 0,
916
+ "create_version": 63,
917
+ "date_time": [
918
+ 2018,
919
+ 6,
920
+ 18,
921
+ 22,
922
+ 11,
923
+ 50
924
+ ],
925
+ "directory": false,
926
+ "entry_index": 2,
927
+ "external_attr": 32,
928
+ "extra_hex": "0a0020000000000001001800d1e24e974007d40116dcbf962f1fd20116dcbf962f1fd201",
929
+ "extract_version": 20,
930
+ "flags": 0,
931
+ "header_offset": 221309,
932
+ "internal_attr": 0,
933
+ "occurrence": 0,
934
+ "output": "assets/extracted/zUrT43_qvm.pk3/members/000002/vm/qagame.qvm",
935
+ "path": "vm/qagame.qvm",
936
+ "sha256": "a589351dfe517470a1b121dd2164714987d9e4577bf00c6486e1540035d7a79d",
937
+ "type": "member",
938
+ "volume": 0
939
+ }
940
+ }
941
+ }
scripts/analyze_qvm_history_angle_lerp.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """63746 one-step angle correction and numeric f32 interpolation return."""
3
+ import itertools
4
+ from pathlib import Path
5
+ from qvm_research_support import source,execute
6
+ from analyze_qvm_acceleration import word
7
+ from analyze_qvm import write_json
8
+ LOCAL=0x79e00000
9
+
10
+ def angle(ins,m,args):
11
+ m=dict(m)
12
+ for o,v in args.items():m[LOCAL+16+o]=v
13
+ m,_,e=execute(ins,63747,63793,m,(0,0,0),LOCAL);return m,{'arguments':args,'adjusted_b':m[LOCAL+28]&0xffffffff,'execution':e,'result':e['return']&0xffffffff}
14
+
15
+ def main():
16
+ q,raw,h,ins=source();rows=[]
17
+ for (a,b),fraction in itertools.product([(0,180),(0,181),(0,-180),(0,-181),(350,10),(10,350),(0,1080),(1080,0),(180,-.001),(-180,.001)],[-1,0,.5,1,2]):rows.append(angle(ins,{}, {8:word(a),12:word(b),16:word(fraction)})[1])
18
+ write_json(Path('docs/research/qvm-history-angle-lerp.json'),{'source':q['source'],'sha256':q['sha256'],'probes':rows,'limits':'Complete63747–63792 finite numeric return. At most one±360 correction per comparison; no general angle/fraction normalization. Nonfinite inputs and original engine legal angle ranges unverified.'})
19
+ if __name__=='__main__':main()
scripts/test_qvm_history_angle_lerp.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json,unittest
2
+ from pathlib import Path
3
+ from test_qvm_ground import word,n,f
4
+
5
+ def expected(a,b,t):
6
+ if f(b-a)>180:b=f(b-360)
7
+ if f(b-a)<-180:b=f(b+360)
8
+ return word(b),word(f(a+f(t*f(b-a))))
9
+ class HistoryAngleLerpTests(unittest.TestCase):
10
+ @classmethod
11
+ def setUpClass(cls):cls.r=json.loads(Path('docs/research/qvm-history-angle-lerp.json').read_text())
12
+ def test_independent_exact_f32_angle_result(self):
13
+ self.assertEqual(len(self.r['probes']),50)
14
+ for p in self.r['probes']:
15
+ a=p['arguments'];self.assertEqual((p['adjusted_b'],p['result']),expected(n(a['8']),n(a['12']),n(a['16'])));self.assertEqual(p['execution']['calls'],[])
16
+ def test_half_turn_boundaries_are_strict(self):
17
+ for p in self.r['probes']:
18
+ a=p['arguments']
19
+ if n(a['8'])==0 and abs(n(a['12']))==180:self.assertEqual(p['adjusted_b'],a['12'])
20
+ def test_large_difference_is_not_fully_normalized(self):
21
+ p=next(p for p in self.r['probes'] if n(p['arguments']['8'])==0 and n(p['arguments']['12'])==1080 and n(p['arguments']['16'])==1);self.assertEqual(p['result'],word(720))
22
+ if __name__=='__main__':unittest.main()