aboutsummaryrefslogtreecommitdiff
path: root/source/dma.cpp
diff options
context:
space:
mode:
authorNebuleon Fumika2013-01-26 14:47:59 -0500
committerNebuleon Fumika2013-01-26 14:47:59 -0500
commit2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65 (patch)
tree33fd86c89c7d02af26a77e146c4008fa9ca5f404 /source/dma.cpp
parentd57eea6b4fd4d5d642cb730f6291dabfb0c6a633 (diff)
downloadsnesemu-2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65.tar.gz
snesemu-2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65.tar.bz2
snesemu-2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65.zip
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)
Diffstat (limited to 'source/dma.cpp')
-rw-r--r--source/dma.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/dma.cpp b/source/dma.cpp
index 2addceb..96f705f 100644
--- a/source/dma.cpp
+++ b/source/dma.cpp
@@ -855,8 +855,12 @@ void S9xDoDMA (uint8 Channel)
IAPU.APUExecuting = Settings.APUEnabled;
APU_EXECUTE ();
#endif
- while (CPU.Cycles > CPU.NextEvent)
- S9xDoHBlankProcessing ();
+ if (Settings.SuperFX)
+ while (CPU.Cycles > CPU.NextEvent)
+ S9xDoHBlankProcessing_SFX ();
+ else /* if (!Settings.SuperFX) */
+ while (CPU.Cycles > CPU.NextEvent)
+ S9xDoHBlankProcessing_NoSFX ();
if(Settings.SPC7110&&spc7110_dma)
{