From bf4d005ddd3d629e20ffce6e0ffe6ae399a5baeb Mon Sep 17 00:00:00 2001 From: pjht Date: Thu, 14 Mar 2024 13:37:24 -0500 Subject: [PATCH] Fix setting ins/data flag in bus error trap --- src/m68k.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m68k.rs b/src/m68k.rs index 8c4e08c..f77b193 100644 --- a/src/m68k.rs +++ b/src/m68k.rs @@ -1822,8 +1822,8 @@ impl M68K { let special_status_word = (u16::from(bus_error.cause.is_write()) << 8) | (u16::from(bus_error.cause.is_byte()) << 9) | (((bus_error.address & 0x1) as u16) << 10) - | u16::from(!ins) - | u16::from(ins); + | (u16::from(!ins) << 12) + | (u16::from(ins) << 13); self.push(u32::from(special_status_word), Size::Word)?; // Format & vector self.push(0x8002, Size::Word)?;