mirror of https://github.com/mgba-emu/mgba.git
Check active region instead of pc for BIOS loads
This commit is contained in:
parent
6cff3d423e
commit
1e1b0fc89e
|
@ -165,7 +165,7 @@ int32_t GBALoad32(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
|
|
||||||
switch (address & ~OFFSET_MASK) {
|
switch (address & ~OFFSET_MASK) {
|
||||||
case BASE_BIOS:
|
case BASE_BIOS:
|
||||||
if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) {
|
if (memory->activeRegion == REGION_BIOS) {
|
||||||
if (address < SIZE_BIOS) {
|
if (address < SIZE_BIOS) {
|
||||||
LOAD_32(value, address, memory->bios);
|
LOAD_32(value, address, memory->bios);
|
||||||
} else {
|
} else {
|
||||||
|
@ -239,7 +239,7 @@ int16_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
|
|
||||||
switch (address & ~OFFSET_MASK) {
|
switch (address & ~OFFSET_MASK) {
|
||||||
case BASE_BIOS:
|
case BASE_BIOS:
|
||||||
if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) {
|
if (memory->activeRegion == REGION_BIOS) {
|
||||||
if (address < SIZE_BIOS) {
|
if (address < SIZE_BIOS) {
|
||||||
LOAD_16(value, address, memory->bios);
|
LOAD_16(value, address, memory->bios);
|
||||||
} else {
|
} else {
|
||||||
|
@ -316,7 +316,7 @@ int8_t GBALoad8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
|
||||||
|
|
||||||
switch (address & ~OFFSET_MASK) {
|
switch (address & ~OFFSET_MASK) {
|
||||||
case BASE_BIOS:
|
case BASE_BIOS:
|
||||||
if (cpu->gprs[ARM_PC] >> BASE_OFFSET == REGION_BIOS) {
|
if (memory->activeRegion == REGION_BIOS) {
|
||||||
if (address < SIZE_BIOS) {
|
if (address < SIZE_BIOS) {
|
||||||
value = ((int8_t*) memory->bios)[address];
|
value = ((int8_t*) memory->bios)[address];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue