From 9a65ce5c07fde64b33b6e8bb5a198e633ae2d0bc Mon Sep 17 00:00:00 2001 From: mightymax Date: Wed, 10 Jan 2007 12:49:48 +0000 Subject: [PATCH] ACL checks disabled when define MMU_ENABLE_ACL is not set --- desmume/src/MMU.c | 2 ++ desmume/src/MMU.h | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/desmume/src/MMU.c b/desmume/src/MMU.c index 608961a81..0d87791ff 100644 --- a/desmume/src/MMU.c +++ b/desmume/src/MMU.c @@ -2353,6 +2353,7 @@ void FASTCALL MMU_doDMA(u32 proc, u32 num) } } +#ifdef MMU_ENABLE_ACL u8 FASTCALL MMU_read8_acl(u32 proc, u32 adr, u32 access) { if (proc == ARMCPU_ARM9) /* on arm9 we need to check the MPU regions */ @@ -2475,3 +2476,4 @@ void FASTCALL MMU_write32_acl(u32 proc, u32 adr, u32 val) } MMU_write32(proc,adr,val) ; } +#endif diff --git a/desmume/src/MMU.h b/desmume/src/MMU.h index 0d1e3c730..ab975a4d9 100644 --- a/desmume/src/MMU.h +++ b/desmume/src/MMU.h @@ -117,9 +117,15 @@ u8 FASTCALL MMU_read8(u32 proc, u32 adr); u16 FASTCALL MMU_read16(u32 proc, u32 adr); u32 FASTCALL MMU_read32(u32 proc, u32 adr); -u8 FASTCALL MMU_read8_acl(u32 proc, u32 adr, u32 access); -u16 FASTCALL MMU_read16_acl(u32 proc, u32 adr, u32 access); -u32 FASTCALL MMU_read32_acl(u32 proc, u32 adr, u32 access); +#ifdef MMU_ENABLE_ACL + u8 FASTCALL MMU_read8_acl(u32 proc, u32 adr, u32 access); + u16 FASTCALL MMU_read16_acl(u32 proc, u32 adr, u32 access); + u32 FASTCALL MMU_read32_acl(u32 proc, u32 adr, u32 access); +#else + #define MMU_read8_acl(proc,adr,access) MMU_read8(proc,adr) + #define MMU_read16_acl(proc,adr,access) MMU_read16(proc,adr) + #define MMU_read32_acl(proc,adr,access) MMU_read32(proc,adr) +#endif #define MMU_writeByte MMU_write8 #define MMU_writeHWord MMU_write16 @@ -132,9 +138,15 @@ void FASTCALL MMU_write8(u32 proc, u32 adr, u8 val); void FASTCALL MMU_write16(u32 proc, u32 adr, u16 val); void FASTCALL MMU_write32(u32 proc, u32 adr, u32 val); -void FASTCALL MMU_write8_acl(u32 proc, u32 adr, u8 val); -void FASTCALL MMU_write16_acl(u32 proc, u32 adr, u16 val); -void FASTCALL MMU_write32_acl(u32 proc, u32 adr, u32 val); +#ifdef MMU_ENABLE_ACL + void FASTCALL MMU_write8_acl(u32 proc, u32 adr, u8 val); + void FASTCALL MMU_write16_acl(u32 proc, u32 adr, u16 val); + void FASTCALL MMU_write32_acl(u32 proc, u32 adr, u32 val); +#else + #define MMU_write8_acl MMU_write8 + #define MMU_write16_acl MMU_write16 + #define MMU_write32_acl MMU_write32 +#endif void FASTCALL MMU_doDMA(u32 proc, u32 num);