all repos — mgba @ 2bc11c9aac79865582d3943b6d86f335253a8823

mGBA Game Boy Advance Emulator

32- and 16-bit reads of OAM
Jeffrey Pfau jeffrey@endrift.com
Fri, 03 May 2013 01:33:20 -0700
commit

2bc11c9aac79865582d3943b6d86f335253a8823

parent

862c93916df31e3813fe86f42948adb0650eb991

1 files changed, 3 insertions(+), 2 deletions(-)

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

@@ -128,6 +128,7 @@ case BASE_VRAM:

value = ((int32_t*) gbaMemory->p->video.vram)[(address & 0x0001FFFF) >> 2]; break; case BASE_OAM: + value = ((int32_t*) gbaMemory->p->video.oam.raw)[(address & (SIZE_OAM - 1)) >> 2]; break; case BASE_CART0: case BASE_CART0_EX:

@@ -167,7 +168,7 @@ return gbaMemory->p->video.palette[(address & (SIZE_PALETTE_RAM - 1)) >> 1];

case BASE_VRAM: return gbaMemory->p->video.vram[(address & 0x0001FFFF) >> 1]; case BASE_OAM: - break; + return gbaMemory->p->video.oam.raw[(address & (SIZE_OAM - 1)) >> 1]; case BASE_CART0: case BASE_CART0_EX: case BASE_CART1:

@@ -208,7 +209,7 @@ return gbaMemory->p->video.palette[(address & (SIZE_PALETTE_RAM - 1)) >> 1];

case BASE_VRAM: return gbaMemory->p->video.vram[(address & 0x0001FFFF) >> 1]; case BASE_OAM: - break; + return gbaMemory->p->video.oam.raw[(address & (SIZE_OAM - 1)) >> 1]; case BASE_CART0: case BASE_CART0_EX: case BASE_CART1: