aboutsummaryrefslogtreecommitdiff
path: root/source/ppu.c
diff options
context:
space:
mode:
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++;