From 41db7b9df6337e8860a8f5bbc00c25a1ed0b7b30 Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Sat, 7 Sep 2024 13:45:33 -0400 Subject: [PATCH] fix main ram adding cycles twice if code and memory region are the same --- src/CP15.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/CP15.cpp b/src/CP15.cpp index bcbfbb24..db1c67ea 100644 --- a/src/CP15.cpp +++ b/src/CP15.cpp @@ -814,12 +814,9 @@ u32 ARMv5::CodeRead32(u32 addr, bool branch) if ((addr >> 24) == 0x02) { - if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = MainRAMTimestamp; - - if (DataRegion == Mem9_MainRAM) NDS.ARM9Timestamp += CodeCycles; + if (NDS.ARM9Timestamp < MainRAMTimestamp) NDS.ARM9Timestamp = MainRAMTimestamp + ((1<>14] == DataRegion && Store) NDS.ARM9Timestamp += (1<>14] == DataRegion && Store) NDS.ARM9Timestamp += (1<