local machine = manager.machine local cpu = machine.devices[':maincpu'] local dbg = machine.debugger local prog = cpu.spaces['program'] local rd = function(a) return prog:read_u16(a) end local last={} local keys={ ISR=0x06400050, IMR=0x06400050, ACR=0x06400040, CUR=0x06400060 } local n=0 emu.register_frame_done(function() n=n+1 local isr=rd(0x06400050) & 0xff if last.isr~=isr then print(string.format("f%4d ISR=%02X ACR=%04X", n, isr, rd(0x06400040))); last.isr=isr end if n>=520 then machine:exit() end end,"ctr") dbg.execution_state='run'