From f5df45499a413ae9142e62a2dc8850bce3f6b0b9 Mon Sep 17 00:00:00 2001 From: pjht Date: Sat, 4 Nov 2023 09:07:47 -0500 Subject: [PATCH] Fix M68K::write_word ot checking for an aligned address --- src/m68k.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/m68k.rs b/src/m68k.rs index 9c9ea28..b05fd73 100644 --- a/src/m68k.rs +++ b/src/m68k.rs @@ -1547,6 +1547,9 @@ impl M68K { fn write_word(&mut self, address: u32, data: u16) -> Result<(), DetailedBusError> { let address = address & 0xFF_FFFF; + if address & 0x1 != 0 { + self.trap(3)?; + } if self.use_stored_mem_cycles { let cycle = self.stored_mem_cycles.remove(0); if let MemCycleInfo::WriteWord {