diff --git a/CHANGES b/CHANGES index 6c323174b..699fc11d6 100644 --- a/CHANGES +++ b/CHANGES @@ -64,6 +64,7 @@ Misc: - Debugger: Convert breakpoints and watchpoints from linked-lists to vectors - Qt: Added button for breaking into the GDB debugger - GBA BIOS: Finish implementing RegisterRamReset + - GBA: Allow jumping to OAM and palette RAM 0.3.2: (2015-12-16) Bugfixes: diff --git a/src/gba/memory.c b/src/gba/memory.c index 653732154..1d3d87ff4 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -263,10 +263,18 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) { cpu->memory.activeRegion = memory->iwram; cpu->memory.activeMask = SIZE_WORKING_IRAM - 1; break; + case REGION_PALETTE_RAM: + cpu->memory.activeRegion = (uint32_t*) gba->video.palette; + cpu->memory.activeMask = SIZE_PALETTE_RAM - 1; + break; case REGION_VRAM: cpu->memory.activeRegion = (uint32_t*) gba->video.renderer->vram; cpu->memory.activeMask = 0x0000FFFF; break; + case REGION_OAM: + cpu->memory.activeRegion = (uint32_t*) gba->video.oam.raw; + cpu->memory.activeMask = SIZE_OAM - 1; + break; case REGION_CART0: case REGION_CART0_EX: case REGION_CART1: