mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-31 12:05:05 +02:00
36 lines
1.2 KiB
Lua
36 lines
1.2 KiB
Lua
-- Watch the video-memory test's accesses with their VALUES, to see what it
|
|
-- expects versus what it gets. The test reports failing at bit address
|
|
-- 0x40000C and walks in 0x400000 steps.
|
|
--
|
|
-- WP2_FRAMES=400 <mame> vt1200 ... -autoboot_script harness/mame/wp2.lua
|
|
|
|
local machine = manager.machine
|
|
local cpu = machine.devices[':maincpu']
|
|
local dbg = machine.debugger
|
|
|
|
if not dbg then
|
|
print("ERROR: debugger not enabled; pass -debug")
|
|
machine:exit()
|
|
return
|
|
end
|
|
|
|
-- Watch a window around both candidate locations for the video memory
|
|
-- (the reported failing address is 0x40000C; the driver-side catch-all saw
|
|
-- traffic at 0x400000-0x40D7FF).
|
|
dbg:command('wpset 400000,1000,rw,{ printf "WP-A %08X data=%04X acc=%02X pc=%08X\\n", wpaddr, wpdata, wpaccess, pc ; g }')
|
|
dbg:command('wpset 4000000,1000,rw,{ printf "WP-B %08X data=%04X acc=%02X pc=%08X\\n", wpaddr, wpdata, wpaccess, pc ; g }')
|
|
print("watchpoints armed: A=0x400000..0x400FFF B=0x4000000..0x4000FFF")
|
|
|
|
local maxframes = tonumber(os.getenv("WP2_FRAMES") or "300")
|
|
local n = 0
|
|
emu.register_frame_done(function()
|
|
n = n + 1
|
|
if n >= maxframes then
|
|
print("done (" .. n .. " frames)")
|
|
machine:exit()
|
|
end
|
|
end, "vt1200-wp2")
|
|
|
|
dbg.visible_cpu = cpu
|
|
dbg.execution_state = 'run'
|