aboutsummaryrefslogtreecommitdiff
path: root/source/ppu.c
diff options
context:
space:
mode:
authorneonloop2022-08-16 23:47:42 +0000
committerneonloop2022-08-16 23:47:42 +0000
commitbf61547f8ce8967c73c0568c05bfaa3d71c07f53 (patch)
tree1bc122b198865cc3311dee690d9387917fb0a5ee /source/ppu.c
parent479872a8d30b092671ed49868748e48830bc36da (diff)
parentce34e879e348cecd4e21329be5974cc4162fa6c4 (diff)
downloadsnes9x2005-bf61547f8ce8967c73c0568c05bfaa3d71c07f53.tar.gz
snes9x2005-bf61547f8ce8967c73c0568c05bfaa3d71c07f53.tar.bz2
snes9x2005-bf61547f8ce8967c73c0568c05bfaa3d71c07f53.zip
Merge branch 'dynarec' into performanceperformance
Diffstat (limited to 'source/ppu.c')
-rw-r--r--source/ppu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/ppu.c b/source/ppu.c
index 1f5df0b..caf47ed 100644
--- a/source/ppu.c
+++ b/source/ppu.c
@@ -629,6 +629,11 @@ void S9xSetPPU(uint8_t Byte, uint16_t Address)
case 0x217e:
case 0x217f:
#ifndef USE_BLARGG_APU
+#ifdef USE_DYNAREC
+ if (Settings.EnableDynarec)
+ while (APU.Cycles <= CPU.Cycles)
+ APU_EXECUTE1();
+#endif
Memory.FillRAM [Address] = Byte;
IAPU.RAM [(Address & 3) + 0xf4] = Byte;
IAPU.APUExecuting = Settings.APUEnabled;
@@ -889,6 +894,10 @@ uint8_t S9xGetPPU(uint16_t Address)
case 0x217e:
case 0x217f:
#ifndef USE_BLARGG_APU
+#ifdef USE_DYNAREC
+ if (Settings.EnableDynarec)
+ APU_EXECUTE();
+#endif
IAPU.APUExecuting = Settings.APUEnabled;
IAPU.WaitCounter++;