"""The boot ROM checksum loop's rate on the board: R8 per frame, cache state, BSC.""" import sys from sega32x_python.runner import Session s = Session.start(sys.argv[1], "/data/emu/images/x55/bios") side = s.device.sh2 m = side.chips[0] for f in range(1, 41): s.run_frame() if f in (25, 35): print(f"frame {f}: PC {m.pc:08X} R8 {m.R[8]:08X} R7 {m.R[7]} R9 {m.R[9]:08X} " f"instr {side.instructions[0]} cache {m.cache.enabled} CCR {m.cache.ccr:02X} " f"bsc {m.bsc.snapshot() if hasattr(m.bsc, 'snapshot') else vars(m.bsc)}", flush=True)