Files
vt1200/harness/mame/console_frames.lua
arti 41454d5d4c harness: the stub level-1 run continues past both DUART failures; correct the "fatal/LED loop" claim
The stub run does not park at HOST PORT - 15. Both DUART failures are reported,
the board LED blinks once (finite L3F208660), TYPE 'GO' TO CONTINUE is printed
(no input is read), and the level-1 runner continues ('CONTINUING THE TESTS').
The runner never returns to 3F204440, so 3F208060/3F208650 are never executed.

The run then wedges at frame ~2839 in a DUART1 counter-ready interrupt storm:
the ISR polls DUART1 reg 5 (bit 0x06400050) and always reads 0x08; the counter
runs in timer mode (ACR=0x60) with CTUR/CTLR never programmed, so MAME re-arms
at 1 tick and the interrupt re-asserts every ~229 CPU cycles. Frames at 3500 /
6000 / 12000 are byte-identical; RAM differs by one byte.

Corrects README.md and annotates GATE_CLEANUP_REPORT.md, BRINGUP_LOG.md and
DUART_REPORT.md. Adds a console+PC/milestone instrument and the finding report.
2026-10-16 14:56:47 +03:00

49 lines
1.9 KiB
Lua

-- console_frames.lua -- the firmware console transcript WITH frame numbers.
--
-- Break on the printer entry 0x3FDE00C0 (a9 = message bit pointer) and on the
-- error-report dispatcher and the level-1 runner, so the transcript is
-- interleaved with the control-flow milestones. Output goes to MAME's
-- debug.log (run with -debuglog); stdout only carries frame summaries.
--
-- CF_FRAMES=<n> budget (default 20000)
--
-- <mame> vt1200 ... -debug -debugger none -debuglog \
-- -autoboot_script harness/mame/console_frames.lua -autoboot_delay 0
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 3fde00c0,,{ printf "P fr=%d a9=%08X\\n", FRAME, a9 ; g }')
dbg:command('bpset 3fdf72d0,,{ printf "RUNNER-ENTRY fr=%d a3=%08X\\n", FRAME, a3 ; g }')
dbg:command('bpset 3f204400,,{ printf "L1-CALL fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3f204440,,{ printf "L1-GATE fr=%d a8=%08X\\n", FRAME, a8 ; g }')
dbg:command('bpset 3f204460,,{ printf "L1-ZERO-LOOPBACK fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3f208060,,{ printf "LED-RESTART fr=%d a10=%08X\\n", FRAME, a10 ; g }')
dbg:command('bpset 3f208660,,{ printf "LED-BLINK fr=%d a10=%08X\\n", FRAME, a10 ; g }')
dbg:command('bpset 3fde9d70,,{ printf "ERR-HOSTPORT fr=%d\\n", FRAME ; g }')
dbg:command('bpset 3fdf0630,,{ printf "ERR-DISPATCH fr=%d a8=%08X a10=%08X\\n", FRAME, a8, a10 ; g }')
local maxframes = tonumber(os.getenv("CF_FRAMES") or "20000")
emu.register_frame_done(function()
FRAME = FRAME + 1
if FRAME % 2000 == 0 then
print(string.format("frame %d PC=%08X", FRAME, cpu.state['PC'].value))
end
if FRAME >= maxframes then
print("done (" .. FRAME .. " frames)")
machine:exit()
end
end, "vt1200-cf")
dbg.visible_cpu = cpu
dbg.execution_state = 'run'