mirror of
https://git.k-space.ee/arti/vt1200.git
synced 2026-10-31 12:05:05 +02:00
Adds SCN2681 devices at 0x0640000 (DUART1 = host/printer) and 0x0620000 (DUART2 = keyboard/mouse), gated on VT1200_DUART, with the remap verified as duart_register = handler_off (duart_byte = off*2, value in the low byte of the firmware's 16-bit move). Optional external TX->RX loopback (VT1200_DUART_LB1/2) models the loopback connectors; the monitor switch is driven on IP4-IP6. New VT1200_DUARTLOG gives a full non-deduplicated DUART access log. Result: the level-1 HOST PORT test is reached and executed against the real DUART, but still reports 'LEVEL1/2 ERROR -> HOST PORT - 15'. The test reads SRA/RHRA and requires a 5-byte external pattern (0xAA,0xFF,0xAA,0x55) plus SRA overrun, yet the firmware never writes the transmit register (0 writes to reg 3/B on either DUART in 1400 frames), so no internal or external loopback can supply it. See harness/mame/DUART_REPORT.md. Regression holds: no VT1200_* env -> PC=3FDCE400 samples=199.
25 lines
1.2 KiB
Lua
25 lines
1.2 KiB
Lua
local machine = manager.machine
|
|
local cpu = machine.devices[':maincpu']
|
|
local dbg = machine.debugger
|
|
if not dbg then print("ERROR: need -debug"); machine:exit() return end
|
|
local function bp(addr, msg)
|
|
dbg:command(string.format('bpset %s,,{ printf "%s\\n", pc, a7, a9, a11, a13 ; g }', addr, msg))
|
|
end
|
|
bp("3fa761e0", "SRA-highnibble pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa76f30", "CSRA-WRITE pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa76f50", "CSRA-WRITTEN pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa76340", "RHRA-READ pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa76390", "RHRA-CMP pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa76010", "CRA-0A-pre pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
-- also the registry writes by the wrapper
|
|
bp("3fa71f00", "CRA-3A pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
bp("3fa721f0", "CSRA-tbl-write pc=%08X a7=%08X a9=%08X a11=%08X a13=%08X")
|
|
print("probe armed")
|
|
local n=0
|
|
emu.register_frame_done(function()
|
|
n=n+1
|
|
if n >= tonumber(os.getenv("CAP_MAX") or "1400") then print("done "..n); machine:exit() end
|
|
end, "duart-probe2")
|
|
dbg.visible_cpu = cpu
|
|
dbg.execution_state = 'run'
|