From 47941dd8786354e081a2dde3b31b3aeaa57cd812 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 20 Feb 2017 19:35:27 -0800 Subject: [PATCH] DS Memory: Add 8-bit I/O loading --- src/ds/memory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ds/memory.c b/src/ds/memory.c index 17e3487db..a0d665f45 100644 --- a/src/ds/memory.c +++ b/src/ds/memory.c @@ -340,6 +340,10 @@ uint32_t DS7Load8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) { break; } mLOG(DS_MEM, STUB, "Unimplemented DS7 Load8: %08X", address); + break; + case DS_REGION_IO: + value = (DS7IORead(ds, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; + break; default: mLOG(DS_MEM, STUB, "Unimplemented DS7 Load8: %08X", address); break; @@ -861,6 +865,9 @@ uint32_t DS9Load8(struct ARMCore* cpu, uint32_t address, int* cycleCounter) { break; } mLOG(DS_MEM, STUB, "Unimplemented DS9 Load8: %08X", address); + case DS_REGION_IO: + value = (DS9IORead(ds, address & 0xFFFE) >> ((address & 0x0001) << 3)) & 0xFF; + break; case DS9_REGION_BIOS: // TODO: Fix undersized BIOS // TODO: Fix masking