Files
vt1200/reference/l1probe/gate.lua
T
SDD c69d2c295f reference: level-1 host-port test — can it be skipped? (analysis, no skip)
Answers the five sub-questions from the service guide, the linear dis34 dump,
the existing reports, and one empirical capture:

* level 1 runs unconditionally at power-up; the boot calls the level-1 runner
  at bit 0x3F204400 (calla L3FDF72D0). The only conditional at the call site is
  the DUART1 IP3 hardware input bit (firmware @0x64000D0 bit 3), not a stored
  value.
* the host-port test has no 'not installed' sense; only SIMMs (@0x5000000) and
  the Image Option (@0x62000D0 bit 5) have presence checks.
* no persistent test-selection record: the power-up test set is a hard-coded
  ROM immediate (0x10FEFD80) written into a RAM descriptor; the interactive
  menu and NCP P3 only modify a run. NVRAM is read only by the user-settings
  code, never on the level-1 path.
* a level-1 failure wedges the boot in the board-LED code loop (0x3F208060,
  jruc itself); transcript = LEVEL1/2 TESTING, HOST PORT - 15, TYPE 'GO' TO
  CONTINUE, then the LED loop.
* the one in-ROM bypass (0x3F2043B0 -> OS cold-start 0x3F5788C0) is a
  board-input gate (IP3 high + no 0x55 signature); it skips all of level 1,
  not just the host port, and is not a firmware setting.

Verdict: no persistent/configurable skip; harness must pass level 1 or assert
DUART1 IP3 (0x0640000D bit 3) to take the OS branch.

Evidence + scratch: reference/l1probe/.
2026-10-16 12:42:35 +03:00

30 lines
1.3 KiB
Lua

-- gate.lua -- does the bit-0x3F2042D0 IP3 gate skip level 1?
-- Probes the branch around the level-1 call site and the OS cold-start.
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, body)
dbg:command('bpset ' .. addr .. ',,{ ' .. body .. ' ; g }')
end
bp("3f2042d0", 'printf "IP-READ a0(@64000d0)=%08X\\n", a0')
bp("3f204300", 'printf "BTST3 a0=%08X bit3=%d\\n", a0, (a0>>3)&1')
bp("3f204360", 'printf "AT-360 a3=%08X\\n", a3')
bp("3f2043b0", 'printf "SKIP-BRANCH-TAKEN\\n"')
bp("3f204400", 'printf "RUN-LEVEL1 arg(a3)=%08X\\n", a3')
bp("3f5788c0", 'printf "OS-START-REACHED\\n"')
bp("3f2031d0", 'printf "HANDSHAKE-POLL @6200010=%08X\\n", d@6200010')
bp("3fdf7da0", 'printf "L1-RUNNER arg0 path\\n"')
bp("3fdf7e30", 'printf "L1-RUNNER arg0 fallthrough\\n"')
bp("3fdf7fb0", 'printf "L1-RUNNER test-loop\\n"')
bp("3fdf9d70", 'printf "HOSTPORT-HANDLER\\n"')
local n = 0
local maxf = tonumber(os.getenv("GATE_FRAMES") or "1500")
emu.register_frame_done(function()
n = n + 1
if n % 300 == 0 then print(string.format("frame %5d PC=%08X", n, cpu.state['PC'].value)) end
if n >= maxf then print("done "..n); machine:exit() end
end, "vt1200-gate")
dbg.visible_cpu = cpu
dbg.execution_state = 'run'