Files
vt1200/harness/mame/fonttrace.lua
T
arti 7efb4880f0 harness: the TFTP font 'Disk full' is the terminal's own tftp_close, not a storage or map bug
A tcpdump on the tap plus a live execution trace settle the 'Disk full or
allocation exceeded' abort: the TERMINAL sends TFTP error 3, from
tftp_close (0x3F5EC860), which reports an incomplete read (the last DATA
block read was a full 512-byte block) using its fixed text for code 3. It
is not a capacity or disk condition.

The font buffers (path/index read buffer bit 0x9316D0, fos parser stream
buffer 0x227FD0, parsed-font cache 0x227F50) are all in main RAM
(0x00000000-0x01FFFFFF), mapped and writable; the writes land in RAM dumps.
No second map overlap exists, so the NVR fix did not cause this. vt1200.cpp
is unchanged and every baseline is intact.

New: fonttrace.lua, fontprobe.lua, two evidence pcaps, FONT_STORAGE_REPORT.md.
2026-10-16 22:03:16 +03:00

47 lines
1.9 KiB
Lua

-- fonttrace.lua -- step-by-step trace of one TFTP font fetch.
--
-- Prints the control-flow milestones inside the firmware's TFTP client
-- (tftp_read 0x3f5ed230, tftp_open 0x3f5ebc40, tftp_close 0x3f5ec860) with the
-- key registers, so the reason a transfer is abandoned is read off the run
-- rather than inferred from the disassembly.
--
-- FT_FRAMES=<n> budget (default 20000)
local machine = manager.machine
local dbg = machine.debugger
local cpu = machine.devices[':maincpu']
if not dbg then
print("ERROR: debugger not enabled; pass -debug")
machine:exit()
return
end
FRAME = 0
dbg:command('bpset 3f5ed230,,{ printf "TFTP-ENTRY fr=%d a14=%08X\\n", FRAME, a14 ; g }')
dbg:command('bpset 3f5ed3f0,,{ printf " EXPECTED->%d fr=%d\\n", a11, FRAME ; g }')
dbg:command('bpset 3f5ed690,,{ printf " RECV ret=%08X fr=%d\\n", a8, FRAME ; g }')
dbg:command('bpset 3f5edb20,,{ printf " OPCODE=%04X fr=%d\\n", a11, FRAME ; g }')
dbg:command('bpset 3f5ee3d0,,{ printf " BLKREAD=%04X fr=%d\\n", a11, FRAME ; g }')
dbg:command('bpset 3f5ee420,,{ printf " BLKCHK blk=%04X exp=%08X fr=%d\\n", a11, a9, FRAME ; g }')
dbg:command('bpset 3f5ee720,,{ printf " ->ACK/send path fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3f5eeae0,,{ printf " SEND-RET a8=%08X a11=%08X fr=%d\\n", a8, a11, FRAME ; g }')
dbg:command('bpset 3f5eecf0,,{ printf " COPY reclen=%08X fr=%d\\n", a9, FRAME ; g }')
dbg:command('bpset 3f5ef090,,{ printf " READ-RET a8=%08X fr=%d\\n", a8, FRAME ; g }')
dbg:command('bpset 3f5ec750,,{ printf "OPEN-OK fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3f5ec860,,{ printf "CLOSE fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3f5ecd10,,{ printf " CLOSE->ERROR3 fr=%d\\n", FRAME ; g }')
local maxframes = tonumber(os.getenv("FT_FRAMES") or "20000")
emu.register_frame_done(function()
FRAME = FRAME + 1
if FRAME >= maxframes then
print("done (" .. FRAME .. " frames)")
machine:exit()
end
end, "vt1200-ft")
dbg.visible_cpu = cpu
dbg.execution_state = 'run'