diff options
author | Nebuleon Fumika | 2013-01-26 14:47:59 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-01-26 14:47:59 -0500 |
commit | 2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65 (patch) | |
tree | 33fd86c89c7d02af26a77e146c4008fa9ca5f404 /source/dma.cpp | |
parent | d57eea6b4fd4d5d642cb730f6291dabfb0c6a633 (diff) | |
download | snes9x2005-2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65.tar.gz snes9x2005-2b9a9dc05b5c4abdf5dac5ceba9300734d4f1b65.tar.bz2 snes9x2005-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.cpp | 8 |
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) { |