all repos — mgba @ 4d2ccd5df438b988c21af6959c3704aec590a075

mGBA Game Boy Advance Emulator

Add busy loop optimization back
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Aug 2014 00:35:43 -0700
commit

4d2ccd5df438b988c21af6959c3704aec590a075

parent

5002cf44f4b7ecea134cf96d70bd7f5e02c10526

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

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

@@ -42,8 +42,11 @@ // Drill Dozer

{ "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 },