From 422961a2df929f5fff7b4fabf82671f92e2b91c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 18 Apr 2013 01:19:57 -0700 Subject: [PATCH] 8-bit I/O reads --- src/gba/gba-memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index 1960149cd..0f4f19e92 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -251,7 +251,7 @@ uint8_t GBALoadU8(struct ARMMemory* memory, uint32_t address) { return ((uint8_t*) gbaMemory->iwram)[address & (SIZE_WORKING_IRAM - 1)]; break; case BASE_IO: - break; + return (GBAIORead(gbaMemory->p, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; case BASE_PALETTE_RAM: break; case BASE_VRAM: