all repos — mgba @ 3a7bdbf8dd2ce3dcea2c09c9bca5c39a72ecd3d2

mGBA Game Boy Advance Emulator

GBA: Only run idle loop detection outside of BIOS region
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Jan 2015 00:53:14 -0800
commit

3a7bdbf8dd2ce3dcea2c09c9bca5c39a72ecd3d2

parent

d49a9a84f782236137966f8c83934e77db5c067e

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

jump to
M src/gba/gba-memory.csrc/gba/gba-memory.c

@@ -193,8 +193,8 @@ struct GBA* gba = (struct GBA*) cpu->master;

struct GBAMemory* memory = &gba->memory; int newRegion = address >> BASE_OFFSET; - if (gba->idleOptimization >= IDLE_LOOP_REMOVE) { - if (address == gba->lastJump && address == gba->idleLoop && memory->activeRegion != REGION_BIOS) { + if (gba->idleOptimization >= IDLE_LOOP_REMOVE && memory->activeRegion != REGION_BIOS) { + if (address == gba->lastJump && address == gba->idleLoop) { GBAHalt(gba); } else if (gba->idleOptimization >= IDLE_LOOP_DETECT && newRegion == memory->activeRegion) { if (address == gba->lastJump) {