From 9e41f42420c3465459689881c9254691f7c279a1 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sat, 15 Dec 2007 11:21:33 +0000 Subject: [PATCH] improve debug build speed by 20% when not using cheats git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@200 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/GBA-arm.cpp | 4 +++- src/GBA-thumb.cpp | 4 +++- src/GBAcpu.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) 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())