Files
SDD 72a96862c7 docs: causality audit -- the host-port failure is pre-existing, not caused by the two MAME edits
Four-config A/B (IRQ wiring kept in all four; both mc68681 edits reverted in cfg 4):
the console line and L3FA6E4B0's return are identical (HOST PORT - 15 / 6) in cfg 1-4.
Verdict: PRE-EXISTING.  Neither timing edit causes or relocates the failure.

Methodology correction: hp_ret.lua's labels were on the wrong rets addresses.  The real
returns are L3FA6E4B0 -> 6, L3FA71BC0 -> 0x00900040, L3FA753D0 -> 0x00000408,
L3FA767E0 -> 0.  hp_ret2.lua fixes the addresses.

What 6 is: not a device code.  L3FA6E4B0 reduces five descriptor fields (struct+0x60/
0x80/0xa0/0xc0/0xe0, written from the four sub-test calls) to a 5-bit value; 6 = 0b00110
= "L3FA71BC0 nonzero, L3FA753D0 nonzero".  The caller turns any nonzero into 0x400,
which the dispatcher maps to HOST PORT - 15.  Flagged: L3FA753D0 returns 0x408 while all
its own checks pass, so "nonzero" != "failed its checks"; polarity unresolved.

Leads: COUNTER_READY is set by the firmware's own Start-Counter-Command read (reg 0x0E),
is not in IMR, and is not handled by the ISR -- not the cause.  The DUART clock
(3.6864 MHz) could not be confirmed from the service guide.

Variant MAME files kept in harness/mame/mame_edits/.  Regression holds.
2026-10-16 12:13:39 +03:00

24 lines
915 B
Lua

-- hp_ret2.lua -- return values, with the rets addresses verified from the disassembly:
-- L3FA71BC0 rets @ 3FA753C0, L3FA753D0 (RXCHECK) @ 3FA767D0,
-- L3FA767E0 (XMITPASS) @ 3FA77800.
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
local function bp(addr, msg)
dbg:command('bpset ' .. addr .. ',,{ printf "' .. msg ..
' a8=%08X a7=%08X a9=%08X a11=%08X a13=%08X\\n", a8, a7, a9, a11, a13 ; g }')
end
bp("3fa753c0", "RET-BC0")
bp("3fa767d0", "RET-RXCHECK")
bp("3fa77800", "RET-XMITPASS")
bp("3fa84fe0", "RET-L3FA6E4B0")
bp("3fa6e4b0", "ENTER-GENERIC")
local n = 0
emu.register_frame_done(function()
n = n + 1
if n >= tonumber(os.getenv("HP_FRAMES") or "700") then print("done "..n); machine:exit() end
end, "vt1200-hp-ret2")
dbg.visible_cpu = cpu
dbg.execution_state = 'run'