From 2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Sat, 26 Jan 2013 14:47:59 -0500 Subject: Decide whether SuperFX and SA-1 chips are enabled only once per frame. This saves a few million instructions per second. (Inspired by Snes9x-Euphoria) --- source/cpuexec.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source/cpuexec.h') diff --git a/source/cpuexec.h b/source/cpuexec.h index a094220..dab9099 100644 --- a/source/cpuexec.h +++ b/source/cpuexec.h @@ -93,9 +93,13 @@ #include "memmap.h" #include "65c816.h" -#define DO_HBLANK_CHECK() \ +#define DO_HBLANK_CHECK_SFX() \ if (CPU.Cycles >= CPU.NextEvent) \ - S9xDoHBlankProcessing (); + S9xDoHBlankProcessing_SFX (); + +#define DO_HBLANK_CHECK_NoSFX() \ + if (CPU.Cycles >= CPU.NextEvent) \ + S9xDoHBlankProcessing_NoSFX (); struct SOpcodes { #ifdef __WIN32__ @@ -126,7 +130,8 @@ START_EXTERN_C void S9xMainLoop (void); void S9xReset (void); void S9xSoftReset (void); -void S9xDoHBlankProcessing (); +void S9xDoHBlankProcessing_SFX (); +void S9xDoHBlankProcessing_NoSFX (); void S9xClearIRQ (uint32); void S9xSetIRQ (uint32); -- cgit v1.2.3