From 27db4a412fd3ebea2554827d18e0eb00c0ecfdc1 Mon Sep 17 00:00:00 2001 From: "Adam Polkosnik [fun]" Date: Wed, 18 May 2022 08:49:27 -0400 Subject: [PATCH] another flipped args fix, this should help with CHIP_FASTPATH --- m68kcpu.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/m68kcpu.h b/m68kcpu.h index cdb7930..c011e9a 100644 --- a/m68kcpu.h +++ b/m68kcpu.h @@ -1446,8 +1446,8 @@ static inline void m68ki_write_16_fc(m68ki_cpu_core *state, uint address, uint f #ifdef CHIP_FASTPATH if (!state->ovl && address < 0x200000) { if (address & 0x01) { - ps_write_8(value & 0xFF, address); - ps_write_8((value >> 8) & 0xFF, address + 1); + ps_write_8((uint32_t)address, value & 0xFF); + ps_write_8((uint32_t)address + 1, (value >> 8) & 0xFF); return; } ps_write_16(address, value); @@ -1490,9 +1490,9 @@ static inline void m68ki_write_32_fc(m68ki_cpu_core *state, uint address, uint f #ifdef CHIP_FASTPATH if (!state->ovl && address < 0x200000) { if (address & 0x01) { - ps_write_8(value & 0xFF, address); - ps_write_16(htobe16(((value >> 8) & 0xFFFF)), address + 1); - ps_write_8((value >> 24), address + 3); + ps_write_8((uint32_t)address, value & 0xFF); + ps_write_16((uint32_t)address + 1, htobe16(((value >> 8) & 0xFFFF))); + ps_write_8((uint32_t)address + 3, (value >> 24)); return; } ps_write_32(address, value);