GBA Memory: Fix prefetch invalidation delay
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 Jul 2015 19:24:15 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gba/memory.c
→
src/gba/memory.c
@@ -1566,8 +1566,8 @@ // disappear as well.
int32_t toRemove = (s - 1) * loads + n2s * nWaits + diff; if (toRemove > gba->cpu->cycles) { // We have to delay invalidating... - gba->memory.prefetchCycles = gba->memory.prefetchCycles; - gba->memory.prefetchStalls = gba->memory.prefetchStalls; + gba->memory.prefetchCycles = waited; + gba->memory.prefetchStalls = nWaits; return; } gba->cpu->cycles -= toRemove;