1
0

command advance sweep

This commit is contained in:
Aiden
2026-05-26 15:21:52 +10:00
parent 74a2e2fd2c
commit a48fa0ed18
14 changed files with 821 additions and 78 deletions

View File

@@ -176,6 +176,21 @@ class EmulatorHarnessTest(unittest.TestCase):
self.assertEqual(emulator.memory.read8(ON_CHIP_RAM_START), 0x99)
def test_memory_access_log_records_executing_pc(self):
rom = rom_with_reset(size=0x1010)
rom[0x1000:0x1005] = bytes([0x15, (ON_CHIP_RAM_START >> 8) & 0xFF, ON_CHIP_RAM_START & 0xFF, 0x06, 0x77])
emulator = H8536Emulator(bytes(rom))
emulator.run(max_steps=1)
writes = [
access
for access in emulator.memory.access_log
if access.kind == "write" and access.address == ON_CHIP_RAM_START
]
self.assertEqual(writes[-1].value, 0x77)
self.assertEqual(writes[-1].pc, 0x1000)
if __name__ == "__main__":
unittest.main()