mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-30 12:03:54 +02:00
The dispatch status is 0x100 (printed as '22' in the message). A driver-side transparent low-RAM write log (VT1200_LOWLOG) shows the slot at bit 0x16F0 is written by the store at 3FDF9090 from a13(0x10), which L3FA7C050 sets to the literal 0x100 when the memory test L3F2018B0 returns non-zero. L3F2018B0 is the level-1 video-memory test (base bit 0x04000000, count 0x20000). Its failing checks: the 16-bit walking-bit read-back at 0x04000000 (baseline, unmapped) and, with video RAM mapped, the REFCNT (0xC00001F0) 'must change' check.
46 lines
1.4 KiB
Lua
46 lines
1.4 KiB
Lua
-- code22_fail.lua
|
|
--
|
|
-- L3FA7C050 returns code 0x100 (-> VIDEO MEMORY-22) when the memory test
|
|
-- L3F2018B0 returns nonzero. Find which failure branch inside L3F2018B0 is
|
|
-- taken by breaking on each of its error exits.
|
|
--
|
|
-- CF_FRAMES=300 <mame> vt1200 ... -autoboot_script harness/mame/code22_fail.lua
|
|
|
|
local machine = manager.machine
|
|
local cpu = machine.devices[':maincpu']
|
|
local dbg = machine.debugger
|
|
if not dbg then print("ERROR: no debugger"); machine:exit(); return end
|
|
|
|
-- address -> literal label (embedded in the printf, no %s)
|
|
local targets = {
|
|
{ "3f201c80", "WALKING-BIT-MISMATCH" },
|
|
{ "3f207080", "HANDLER-3F207080-a2eqa0" },
|
|
{ "3f2064c0", "HANDLER-3F2064C0-a2nea0" },
|
|
{ "3f2070c0", "HANDLER-3F2070C0-REFCNT-eq" },
|
|
{ "3f207050", "HANDLER-3F207050-a1eqa0" },
|
|
{ "3f207180", "HANDLER-3F207180-a2nea0-2" },
|
|
{ "3f206910", "HANDLER-3F206910-a1nea0" },
|
|
{ "3f207200", "HANDLER-3F207200-walkerr" },
|
|
{ "3f2073d0", "HANDLER-3F2073D0-spne0" },
|
|
{ "3fa7de30", "L3FA7C050-RET-0x100" },
|
|
}
|
|
for _, t in ipairs(targets) do
|
|
dbg:command(string.format(
|
|
'bpset %s,,{ printf "%s pc=%%08X a8=%%08X a9=%%08X a11=%%08X\\n", pc, a8, a9, a11 ; g }',
|
|
t[1], t[2]))
|
|
end
|
|
print("breakpoints armed: " .. #targets)
|
|
|
|
local maxframes = tonumber(os.getenv("CF_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-cf")
|
|
|
|
dbg.visible_cpu = cpu
|
|
dbg.execution_state = 'run'
|