all repos — mgba @ 1e1b0fc89e46f3120d24efad54841fb5d8826764

mGBA Game Boy Advance Emulator

Check active region instead of pc for BIOS loads
Jeffrey Pfau jeffrey@endrift.com
Fri, 29 Aug 2014 01:46:46 -0700
commit

1e1b0fc89e46f3120d24efad54841fb5d8826764

parent

6cff3d423e699d97d6d5723b0ad3736e3efffd9f

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

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

@@ -165,7 +165,7 @@ int wait = 0;

switch (address & ~OFFSET_MASK) { case BASE_BIOS: - if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) { + if (memory->activeRegion == REGION_BIOS) { if (address < SIZE_BIOS) { LOAD_32(value, address, memory->bios); } else {

@@ -239,7 +239,7 @@ int wait = 0;

switch (address & ~OFFSET_MASK) { case BASE_BIOS: - if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) { + if (memory->activeRegion == REGION_BIOS) { if (address < SIZE_BIOS) { LOAD_16(value, address, memory->bios); } else {

@@ -316,7 +316,7 @@ int wait = 0;

switch (address & ~OFFSET_MASK) { case BASE_BIOS: - if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) { + if (memory->activeRegion == REGION_BIOS) { if (address < SIZE_BIOS) { value = ((int8_t*) memory->bios)[address]; } else {