From 9d63abca3fd32a7273dc820d451dcdfa6dc5c036 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 16 Aug 2016 14:11:16 -0500 Subject: [PATCH] Revert "(MMU.cpp) Use retro_assert" (fine idea but unintentional functional changes) This reverts commit 2e8886adb041aa341f8eb214039ea887e8acdf39. --- desmume/src/MMU.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 7f1e1dfa2..8436b8f7d 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -20,10 +20,9 @@ #include #include #include +#include #include -#include - #include "utils/bits.h" #include "armcpu.h" #include "debug.h" @@ -48,6 +47,12 @@ #include "GPU.h" #include "SPU.h" +#ifdef DO_ASSERT_UNALIGNED +#define ASSERT_UNALIGNED(x) assert(x) +#else +#define ASSERT_UNALIGNED(x) +#endif + //TODO - do we need these here? _KEY2 key2; @@ -5864,7 +5869,7 @@ u32 FASTCALL _MMU_ARM7_read32(u32 adr) u32 FASTCALL MMU_read32(u32 proc, u32 adr) { - retro_assert((adr&3)==0); + ASSERT_UNALIGNED((adr&3)==0); if(proc==0) return _MMU_ARM9_read32(adr); @@ -5873,7 +5878,7 @@ u32 FASTCALL MMU_read32(u32 proc, u32 adr) u16 FASTCALL MMU_read16(u32 proc, u32 adr) { - retro_assert((adr&1)==0); + ASSERT_UNALIGNED((adr&1)==0); if(proc==0) return _MMU_ARM9_read16(adr); @@ -5889,7 +5894,7 @@ u8 FASTCALL MMU_read8(u32 proc, u32 adr) void FASTCALL MMU_write32(u32 proc, u32 adr, u32 val) { - retro_assert((adr&3)==0); + ASSERT_UNALIGNED((adr&3)==0); if(proc==0) _MMU_ARM9_write32(adr, val); @@ -5899,7 +5904,7 @@ void FASTCALL MMU_write32(u32 proc, u32 adr, u32 val) void FASTCALL MMU_write16(u32 proc, u32 adr, u16 val) { - retro_assert((adr&1)==0); + ASSERT_UNALIGNED((adr&1)==0); if(proc==0) _MMU_ARM9_write16(adr, val);