From ce34e879e348cecd4e21329be5974cc4162fa6c4 Mon Sep 17 00:00:00 2001 From: neonloop Date: Wed, 9 Feb 2022 07:15:14 +0000 Subject: Adds experimental ARM dynarec Supports ARMv5 and higher, enable with USE_DYNAREC Makefile variable --- source/ppu.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/ppu.c') 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++; -- cgit v1.2.3