mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Let raw access read high MMIO addresses
This commit is contained in:
parent
b1c7c6d14a
commit
a2493a7bf3
1
CHANGES
1
CHANGES
|
@ -4,6 +4,7 @@ Emulation fixes:
|
|||
- GBA GPIO: Fix gyro read-out start (fixes mgba.io/i/3141)
|
||||
- GBA SIO: Fix MULTI mode SIOCNT bit 7 writes on secondary GBAs (fixes mgba.io/i/3110)
|
||||
Other fixes:
|
||||
- GBA Memory: Let raw access read high MMIO addresses
|
||||
- Qt: Fix crash when applying changes to GB I/O registers in I/O view
|
||||
- Updater: Fix updating appimage across filesystems
|
||||
Misc:
|
||||
|
|
|
@ -1118,10 +1118,8 @@ uint32_t GBAView32(struct ARMCore* cpu, uint32_t address) {
|
|||
value = GBALoad32(cpu, address, 0);
|
||||
break;
|
||||
case REGION_IO:
|
||||
if ((address & OFFSET_MASK) < REG_MAX) {
|
||||
value = gba->memory.io[(address & OFFSET_MASK) >> 1];
|
||||
value |= gba->memory.io[((address & OFFSET_MASK) >> 1) + 1] << 16;
|
||||
}
|
||||
value = GBAView16(cpu, address);
|
||||
value |= GBAView16(cpu, address + 2) << 16;
|
||||
break;
|
||||
case REGION_CART_SRAM:
|
||||
value = GBALoad8(cpu, address, 0);
|
||||
|
@ -1159,7 +1157,10 @@ uint16_t GBAView16(struct ARMCore* cpu, uint32_t address) {
|
|||
value = GBALoad16(cpu, address, 0);
|
||||
break;
|
||||
case REGION_IO:
|
||||
if ((address & OFFSET_MASK) < REG_MAX) {
|
||||
if ((address & OFFSET_MASK) < REG_MAX || (address & OFFSET_MASK) == REG_POSTFLG) {
|
||||
value = gba->memory.io[(address & OFFSET_MASK) >> 1];
|
||||
} else if ((address & OFFSET_MASK) == REG_EXWAITCNT_LO || (address & OFFSET_MASK) == REG_EXWAITCNT_HI) {
|
||||
address += REG_INTERNAL_EXWAITCNT_LO - REG_EXWAITCNT_LO;
|
||||
value = gba->memory.io[(address & OFFSET_MASK) >> 1];
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue