Put sound in the packed container, and find the padding is a rate error
ROADMAP P6b, FINDINGS 67. DLXP2: a 64-byte header and then groups -- one audio lump of A sectors, then F records -- so record i is at off_frm + i*rec + (i//F)*A*512 and lump k at off_aud + k*(F*rec + A*512). Still no index and still none needed, which is the packed branch's whole claim surviving the one change that could have ended it. The player carries the third term in six instructions once a frame and zero parsing, and 120 of 120 records are still pixel-exact off a real MB89352 volume with the interleave in, against a silent control that says no picture byte moved. The finding is what 65.3 called padding. A lump is 7,168 B of SPACE; eleven frames of audio is 7,161.4583... B, so the payload alternates 7,161 and 7,162 and the rest is zero. A player that fed the chip the whole lump -- which is what "14 sectors every 11 frames" invites -- runs 0.09% fast, and that is not waste, it is drift: 0.84 ms a group, 1.25 s of lip-sync over the game's 22.8 minutes. What a player carries is one accumulator, acc += 11*15625; n = acc//24; acc %= 24, which is clock.i's shape for clock.i's reason and the third time this tree has met the pattern. The four ADPCM axes ride in the header as fields rather than a version number, and the gate flips each one to prove they earn it: nibble order -31.99 dB, delta formula -24.86, clamp 0.00, accumulator -0.49. Nothing parses a packed container, so the gate partitions the whole file -- 131 spans, no overlap, no gap -- and asserts what a cadence-blind player would read: exactly records 11..119 wrong, and frames 0..10 identical either way, which is how an off-by-one like that survives a rig that checks frame 0. Wire 582.0 + 7.64 = 589.6 KB/s, 65.3's prediction to the tenth. Green light ALL GREEN before (tmp/check_s35_start.log) and after (tmp/check_s35_end.log), with the new stage in it. Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
This commit is contained in:
+25
-2
@@ -85,6 +85,15 @@ PG_PACEON = $1891C ; 1 = obey the frame clock. 0 free-runs, which
|
||||
; tests the CHAIN without the clock in the way.
|
||||
PG_ITER = $18920 ; passes over the scene; >1 exercises the SEEK,
|
||||
; which for this container is arithmetic
|
||||
PG_CADF = $18924 ; audio cadence: frames between one lump and the
|
||||
; next, 0 in a silent container. A DLXP2 puts
|
||||
; A sectors of ADPCM in front of every F records
|
||||
; (65.3, dlxp.py) and a player that did not know
|
||||
; would read the lump AS a record -- 7,168 B of
|
||||
; audio painted across the top 28 rows of the
|
||||
; screen, which is a picture, and a gate that
|
||||
; only looked for errors would pass it.
|
||||
PG_CADA = $18928 ; ...and the sectors in a lump
|
||||
|
||||
; ---- outputs
|
||||
PG_SHOWN = $18930 ; frames displayed. Bumped AFTER bit 11 is
|
||||
@@ -308,12 +317,26 @@ pg_frame:
|
||||
|
||||
move.w #PG_R20B,CRTC_R20.l ; the write window opens
|
||||
|
||||
; LBA = PG_LBA0 + d7 * PG_RECS. Arithmetic, not a lookup: a packed record's
|
||||
; length is geometry, so this player carries no record index at all (dlxp.py).
|
||||
; LBA = PG_LBA0 + d7*PG_RECS + (d7/PG_CADF)*PG_CADA. Arithmetic, not a lookup:
|
||||
; a packed record's length is geometry and an audio lump's is a cadence, so this
|
||||
; player carries no index of either kind (dlxp.py). The third term is the whole
|
||||
; cost of DLXP2 on the video path -- a divu and a mulu, once a frame -- and it
|
||||
; is zero instructions of parsing, because the cadence is two numbers in the
|
||||
; header and not a table in the stream.
|
||||
move.l d7,d3
|
||||
move.l PG_RECS.l,d0
|
||||
mulu d0,d3 ; frames * sectors, both small
|
||||
add.l PG_LBA0.l,d3
|
||||
move.l PG_CADF.l,d0
|
||||
beq.s .nocad ; silent container: no lumps to skip
|
||||
move.l d7,d2
|
||||
divu d0,d2 ; d2.w = frame / F, the lumps passed
|
||||
andi.l #$FFFF,d2 ; divu leaves the REMAINDER in the high
|
||||
; half, and it is not zero at F=11
|
||||
move.l PG_CADA.l,d0
|
||||
mulu d0,d2
|
||||
add.l d2,d3
|
||||
.nocad:
|
||||
move.l PG_RECS.l,d4
|
||||
lea GVRAM,a1 ; IGNORED under chaining -- the channel
|
||||
; takes MAR from the array's first entry
|
||||
|
||||
Reference in New Issue
Block a user