diff --git a/src/GBA-arm.cpp b/src/GBA-arm.cpp index 7d7193e7..b2d048af 100644 --- a/src/GBA-arm.cpp +++ b/src/GBA-arm.cpp @@ -2867,7 +2867,9 @@ static void tester(void) { int armExecute() { do { - cpuMasterCodeCheck(); + if( cheatsEnabled ) { + cpuMasterCodeCheck(); + } if ((armNextPC & 0x0803FFFF) == 0x08020000) busPrefetchCount = 0x100; diff --git a/src/GBA-thumb.cpp b/src/GBA-thumb.cpp index 29d421ac..012ebb37 100644 --- a/src/GBA-thumb.cpp +++ b/src/GBA-thumb.cpp @@ -2295,7 +2295,9 @@ static insnfunc_t thumbInsnTable[1024] = { int thumbExecute() { do { - cpuMasterCodeCheck(); + if( cheatsEnabled ) { + cpuMasterCodeCheck(); + } //if ((armNextPC & 0x0803FFFF) == 0x08020000) // busPrefetchCount=0x100; diff --git a/src/GBAcpu.h b/src/GBAcpu.h index 3309df91..53384e9d 100644 --- a/src/GBAcpu.h +++ b/src/GBAcpu.h @@ -289,7 +289,7 @@ inline int codeTicksAccessSeq32(u32 address) // ARM SEQ // Emulates the Cheat System (m) code inline void cpuMasterCodeCheck() { - if((cheatsEnabled) && (mastercode) && (mastercode == armNextPC)) + if((mastercode) && (mastercode == armNextPC)) { u32 joy = 0; if(systemReadJoypads())