summaryrefslogtreecommitdiff
path: root/src/cpuexec.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpuexec.h')
-rw-r--r--src/cpuexec.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/cpuexec.h b/src/cpuexec.h
index 9ccfa71..40ea4d6 100644
--- a/src/cpuexec.h
+++ b/src/cpuexec.h
@@ -190,7 +190,7 @@ extern "C" {
void asm_APU_EXECUTE(int Mode);
void asm_APU_EXECUTE2(void);
}*/
-
+#ifdef ASMCPU
#define asm_APU_EXECUTE(MODE)\
{\
if (CPU.APU_APUExecuting == MODE) {\
@@ -231,6 +231,24 @@ void asm_APU_EXECUTE2(void);
}\
}\
}
+#else
+
+#define asm_APU_EXECUTE(MODE)\
+ do { if (CPU.APU_APUExecuting == MODE) \
+ while (CPU.APU_Cycles <= CPU.Cycles)\
+ {\
+ CPU.APU_Cycles += S9xAPUCycles [*IAPU.PC];\
+ (*S9xApuOpcodes[*IAPU.PC]) ();\
+ }}while(0)
+#define asm_APU_EXECUTE2() \
+ if (CPU.APU_APUExecuting == 1) do\
+ {\
+ CPU.APU_Cycles += S9xAPUCycles [*IAPU.PC];\
+ (*S9xApuOpcodes[*IAPU.PC]) ();\
+ } while (CPU.APU_Cycles < CPU.NextEvent)
+
+#endif
+
#endif