all repos — mgba @ a4e29886c9aab8a54a1232bac1bf4a4b7eb1b3db

mGBA Game Boy Advance Emulator

GBA Memory: Better fix for OBJ VRAM code
Jeffrey Pfau jeffrey@endrift.com
Fri, 22 Apr 2016 22:58:59 -0700
commit

a4e29886c9aab8a54a1232bac1bf4a4b7eb1b3db

parent

ae578c0eaa8688346e91cf4d0a97cb6599021943

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/gba/memory.csrc/gba/memory.c

@@ -276,12 +276,12 @@ cpu->memory.activeRegion = (uint32_t*) gba->video.palette;

cpu->memory.activeMask = SIZE_PALETTE_RAM - 1; break; case REGION_VRAM: - if (address < 0x06010000) { - cpu->memory.activeRegion = (uint32_t*) gba->video.renderer->vram; - cpu->memory.activeMask = 0x0000FFFF; - } else { + if (address & 0x10000) { cpu->memory.activeRegion = (uint32_t*) &gba->video.renderer->vram[0x8000]; cpu->memory.activeMask = 0x00007FFF; + } else { + cpu->memory.activeRegion = (uint32_t*) gba->video.renderer->vram; + cpu->memory.activeMask = 0x0000FFFF; } break; case REGION_OAM: