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/dma.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/dma.cpp') 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) { -- cgit v1.2.3