From 4d2ccd5df438b988c21af6959c3704aec590a075 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 29 Aug 2014 00:35:43 -0700 Subject: [PATCH] Add busy loop optimization back --- src/gba/gba-memory.c | 4 ++++ src/gba/gba.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index ef692a498..424be1932 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -109,6 +109,10 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) { struct GBA* gba = (struct GBA*) cpu->master; struct GBAMemory* memory = &gba->memory; + if (address == gba->busyLoop && memory->activeRegion != REGION_BIOS) { + GBAHalt(gba); + } + int newRegion = address >> BASE_OFFSET; if (newRegion == memory->activeRegion) { return; diff --git a/src/gba/gba.c b/src/gba/gba.c index 3decc7023..e5914301a 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -42,8 +42,11 @@ static const struct GBACartridgeOverride _overrides[] = { { "V49J", SAVEDATA_SRAM, GPIO_RUMBLE, -1 }, { "V49E", SAVEDATA_SRAM, GPIO_RUMBLE, -1 }, + // Final Fantasy Tactics Advance + { "AFXE", SAVEDATA_FLASH512, GPIO_NONE, 0x8000418 }, + // Mega Man Battle Network - { "AREE", SAVEDATA_SRAM, GPIO_NONE, 0x8000338 }, + { "AREE", SAVEDATA_SRAM, GPIO_NONE, 0x800032E }, // Pokemon Ruby { "AXVJ", SAVEDATA_FLASH1M, GPIO_RTC, -1 },