all repos — mgba @ d4ecdfc2ac29913867c9e2b91c8a946ffa312f50

mGBA Game Boy Advance Emulator

GBA Memory: Fix prefetch invalidation delay
Jeffrey Pfau jeffrey@endrift.com
Wed, 01 Jul 2015 19:24:15 -0700
commit

d4ecdfc2ac29913867c9e2b91c8a946ffa312f50

parent

79252c21fc187fff24cb9ba49d51162c11394172

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/memory.csrc/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;