-- List every I/O port and field the driver registers, with the tag needed to -- address it from Lua. Used to drive the LK401/VSXXX-AA device models. -- -- vt1200 ... -autoboot_script harness/mame/input_probe.lua local machine = manager.machine local frames = 0 emu.register_frame_done(function() frames = frames + 1 if frames < 3 then return end print("=== ioport ports ===") for tag, port in pairs(machine.ioport.ports) do print(string.format("port %s", tag)) for fname, field in pairs(port.fields) do local ok, ftype = pcall(function() return field.type end) print(string.format(" field %-28s type=%s name=%s", tostring(fname), tostring(ftype), tostring(field.name))) end end machine:exit() end, "vt1200-input-probe")