Skip to content

Commit

Permalink
Debugger: GBA - Fixed incorrect ROM values for addresses over 16mb
Browse files Browse the repository at this point in the history
  • Loading branch information
SourMesen committed Oct 7, 2024
1 parent c5b260e commit 8e6846e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Core/GBA/GbaMemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,11 +736,13 @@ uint8_t GbaMemoryManager::DebugRead(uint32_t addr)
case 0x07: return _oam[addr & (GbaConsole::SpriteRamSize - 1)];

case 0x08: case 0x09: case 0x0A:
case 0x0B: case 0x0C: case 0x0D:
if(addr < _prgRomSize) {
return _prgRom[addr];
case 0x0B: case 0x0C: case 0x0D: {
uint32_t romAddr = ((bank & 0x01) << 24) | addr;
if(romAddr < _prgRomSize) {
return _prgRom[romAddr];
}
break;
}

case 0x0E: case 0x0F:
return _cart->ReadRam(addr, addr);
Expand Down

0 comments on commit 8e6846e

Please sign in to comment.