Verified GVRAM is one word-access per pixel in ALL color modes; chose 256-color 256x192 with movem.l bursts (page 1 sacrificed as double-buffer). Measured 8 scenes from the Blu-ray source: blit costs under 8% of the 12fps cycle budget, so I/O is the bottleneck, not CPU. Naive delta+RLE reaches only 3.2:1 (365 KB/s, 470MB) -> decision to use 4x4 vector quantization (~30 KB/s). "Shot on twos" assumption failed: the transfer has zero duplicate frames, so 12fps requires explicit decimation. Documents three false measurement results and their root causes (per-frame Floyd-Steinberg dithering, temporal denoise, exact-match dedupe on noisy source). MAME Lua injection harness works and is reusable for cycle-cost measurement; the IOCS _B_READ disk benchmark is blocked returning -1. Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
25 lines
1007 B
Lua
25 lines
1007 B
Lua
M=manager.machine; CPU=M.devices[":maincpu"]; SP=CPU.spaces["program"]
|
|
local f=io.open("one.bin","rb"); local d=f:read("a"); f:close()
|
|
CODE={}; for i=1,#d do CODE[i]=string.byte(d,i) end
|
|
STATE="wait"
|
|
local function T() local t=M.time return t.seconds+t.attoseconds/1e18 end
|
|
local function tick()
|
|
local t=T()
|
|
if STATE=="wait" then
|
|
if t<5.0 then return end
|
|
for i=1,#CODE do SP:write_u8(0x10000+i-1,CODE[i]) end
|
|
SP:write_u32(0x18000,0); SP:write_u32(0x18004,0x5A5A5A5A); SP:write_u32(0x20000,0)
|
|
CPU.state["SR"].value=0x2000; CPU.state["SP"].value=0x8000; CPU.state["PC"].value=0x10000
|
|
STATE="run"; return
|
|
end
|
|
local fl=SP:read_u32(0x18000)
|
|
if fl==0xFF or t>20 then
|
|
STATE="done"
|
|
print(string.format("[ONE] %s status=%08X buf=%08X",
|
|
os.getenv("SZLABEL") or "?", SP:read_u32(0x18004), SP:read_u32(0x20000)))
|
|
M:exit()
|
|
end
|
|
end
|
|
SUB=emu.add_machine_frame_notifier(function()
|
|
local ok,e=pcall(tick); if not ok then print("[ONE] ERR "..tostring(e)); M:exit() end end)
|