Align the container to the disc, and find the decoder-free packed player fits
Two sessions, unrecorded until now, committed together because their edits share files and cannot be split cleanly after the fact. Session 28 (FINDINGS 60): the container is DLX5 -- every record sector-aligned, 120/120 starting on a boundary where 3/120 did, +0.48% on the wire and zero clocks -- and the ring's release rounds to RECALN so no pad is stranded. Two encoder levers measured and refused: `--spans all` buys +0.19 dB for +67% of the wire, and joint span/lam selection emits byte-identical containers because `lam` never leaves its floor on any of 120 frames. Session 29 (FINDINGS 61): the packed full-frame blit is 27.3% of a 12 fps frame, a channel fills GVRAM in buffer mode off the disc with the CPU halted, and it walks the 1,024 B line stride itself through array chaining. At the 9 clk/B dual-address floor the codec is 110.4% of a frame and a decoder-free packed literal player is 55.2%, at +4.89 dB -- 2.75 dB past a ceiling the codec's scene-wide palette cannot cross. Encoder work is parked; the codec is kept and not built on. check.sh is ALL GREEN before and after, plus one new stage that gates the ORDER of the measured paint costs rather than their values. Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
This commit is contained in:
+23
-1
@@ -29,7 +29,7 @@ end
|
||||
local MODE = load_mode()
|
||||
|
||||
local FLAG, VAR, ITER = 0x18000, 0x18004, 0x18008
|
||||
local SRCW, SRCB = 0x60000, 0x80000
|
||||
local SRCW, SRCB, SRCP = 0x60000, 0x80000, 0x90000
|
||||
local GVRAM, GPAL = 0xC00000, 0xE82000
|
||||
local CPUHZ = 10000000 -- x68k.cpp:1133, 40_MHz_XTAL/4
|
||||
local FRAME12 = CPUHZ / 12 -- 833333 cycles at 12 fps
|
||||
@@ -40,6 +40,16 @@ local PLAN = {
|
||||
{var=2, iter= 50, name="V2 naive byte-source expansion (move.b/move.w per pixel)"},
|
||||
{var=3, iter=200, name="V3 write-only floor (no source read at all)"},
|
||||
{var=4, iter= 60, name="V4 same 96KB of writes, issued in 4x4 BLOCK order (decoder access pattern)"},
|
||||
-- V8 is V1 with R20 bit 11's packing: 48KB read + 48KB write for the SAME
|
||||
-- 49,152 pixels. It is the per-frame work of a decoder-free packed player
|
||||
-- (FINDINGS 44.7 / 46.6 / 47.5), and 47.6.1 filed its `movem` shape as an
|
||||
-- ASSUMPTION -- this is the measurement that assumption was standing in for.
|
||||
{var=8, iter=200, name="V8 PACKED movem.l blit (48KB read + 48KB write, same 49,152 pixels as V1)"},
|
||||
-- V9/V10 are the two ways a BLOCK decoder could survive the packed layout
|
||||
-- (47.6.4, open since session 16): sixteen move.b at stride 2 per block, or
|
||||
-- pair the blocks 128 columns apart in the encoder and get V4's movem back.
|
||||
{var= 9, iter= 40, name="V9 PACKED block order, 16 move.b at stride 2 per 4x4 block"},
|
||||
{var=10, iter=120, name="V10 PACKED block order, blocks PAIRED so a movem writes whole words"},
|
||||
}
|
||||
|
||||
local code do
|
||||
@@ -97,6 +107,18 @@ local function setup()
|
||||
SP:write_u8 (SRCB + y*256 + x, px)
|
||||
end
|
||||
end
|
||||
-- SRCP: the PACKED frame, interleaved the way tools/bench/show_frame256_packed.lua
|
||||
-- lays it out -- word i of a row is (column i+128) << 8 | (column i), because
|
||||
-- page 0 is the low byte at screen column i and page 1 the high byte at i+128.
|
||||
-- Only V8 reads it, and only its SIZE (128 words a row) affects the timing;
|
||||
-- the interleave is written correctly so the buffer is the real artefact and
|
||||
-- not a same-sized stand-in.
|
||||
for y = 0, H-1 do
|
||||
local row = PIX0 + y*W
|
||||
for i = 0, (W//2)-1 do
|
||||
SP:write_u16(SRCP + y*(W//2)*2 + i*2, (B(row+i+W//2) << 8) | B(row+i))
|
||||
end
|
||||
end
|
||||
for i = 1, #code do SP:write_u8(0x10000+i-1, string.byte(code,i)) end
|
||||
P(string.format("loaded blit.bin=%d bytes, source frame %dx%d at yoff=%d", #code, W, H, YOFF))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user