all repos — mgba @ 3a76cdc6e07ac9ea48d98f8a642c45e29ef34215

mGBA Game Boy Advance Emulator

VRAM reading
Jeffrey Pfau jeffrey@endrift.com
Tue, 23 Apr 2013 02:03:06 -0700
commit

3a76cdc6e07ac9ea48d98f8a642c45e29ef34215

parent

21704ab37a52766309ddc326ab73661eb833a4fd

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

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

@@ -117,7 +117,7 @@ return GBAIORead(gbaMemory->p, address & (SIZE_IO - 1)) | (GBAIORead(gbaMemory->p, (address & (SIZE_IO - 1)) | 2) << 16);

case BASE_PALETTE_RAM: break; case BASE_VRAM: - break; + return ((int32_t*) gbaMemory->p->video.vram)[(address & 0x0001FFFF) >> 2]; case BASE_OAM: break; case BASE_CART0:

@@ -151,7 +151,7 @@ return GBAIORead(gbaMemory->p, address & (SIZE_IO - 1));

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

@@ -185,7 +185,7 @@ return GBAIORead(gbaMemory->p, address & (SIZE_IO - 1));

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