mirror of https://github.com/mgba-emu/mgba.git
GB Memory: Better emulate 0xFEA0 region on DMG, MGB and AGB
This commit is contained in:
parent
c471d03c7d
commit
773e0d26ff
1
CHANGES
1
CHANGES
|
@ -34,6 +34,7 @@ Emulation fixes:
|
|||
- GB Audio: Deschedule channel 1 when disabled by sweep (fixes mgba.io/i/1467)
|
||||
- GBA Memory: Fix STM/LDM to invalid VRAM
|
||||
- GB: Fix savedata initialization (fixes mgba.io/i/1473, mgba.io/i/1478)
|
||||
- GB Memory: Better emulate 0xFEA0 region on DMG, MGB and AGB
|
||||
Other fixes:
|
||||
- Qt: Fix some Qt display driver race conditions
|
||||
- Core: Improved lockstep driver reliability (Le Hoang Quyen)
|
||||
|
|
|
@ -234,7 +234,7 @@ uint8_t GBLoad8(struct LR35902Core* cpu, uint16_t address) {
|
|||
if (dmaBus != GB_BUS_CPU && dmaBus == accessBus) {
|
||||
return 0xFF;
|
||||
}
|
||||
if (address >= GB_BASE_OAM && address < GB_BASE_UNUSABLE) {
|
||||
if (address >= GB_BASE_OAM && address < GB_BASE_IO) {
|
||||
return 0xFF;
|
||||
}
|
||||
}
|
||||
|
@ -471,6 +471,17 @@ uint8_t GBView8(struct LR35902Core* cpu, uint16_t address, int segment) {
|
|||
}
|
||||
if (address < GB_BASE_IO) {
|
||||
mLOG(GB_MEM, GAME_ERROR, "Attempt to read from unusable memory: %04X", address);
|
||||
if (gb->video.mode < 2) {
|
||||
switch (gb->model) {
|
||||
case GB_MODEL_AGB:
|
||||
return (address & 0xF0) | ((address >> 4) & 0xF);
|
||||
case GB_MODEL_CGB:
|
||||
// TODO: R/W behavior
|
||||
return 0x00;
|
||||
default:
|
||||
return 0x00;
|
||||
}
|
||||
}
|
||||
return 0xFF;
|
||||
}
|
||||
if (address < GB_BASE_HRAM) {
|
||||
|
|
Loading…
Reference in New Issue