From 3a76cdc6e07ac9ea48d98f8a642c45e29ef34215 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 23 Apr 2013 02:03:06 -0700 Subject: [PATCH] VRAM reading --- src/gba/gba-memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index d4a3b6f15..1e292d79a 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -117,7 +117,7 @@ int32_t GBALoad32(struct ARMMemory* memory, uint32_t address) { 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 @@ int16_t GBALoad16(struct ARMMemory* memory, uint32_t address) { 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 @@ uint16_t GBALoadU16(struct ARMMemory* memory, uint32_t address) { case BASE_PALETTE_RAM: break; case BASE_VRAM: - break; + return gbaMemory->p->video.vram[(address & 0x0001FFFF) >> 1]; case BASE_OAM: break; case BASE_CART0: