From 793cad8f301e4f42bcf682ff5d324b63c4561ee7 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 30 Jan 2017 16:17:13 -0800 Subject: [PATCH] DS Memory: Add WRAM to DS7Store8 --- src/ds/memory.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ds/memory.c b/src/ds/memory.c index df5e0b246..db2579d67 100644 --- a/src/ds/memory.c +++ b/src/ds/memory.c @@ -399,6 +399,13 @@ void DS7Store8(struct ARMCore* cpu, uint32_t address, int8_t value, int* cycleCo int wait = ds->ds7.memory.waitstatesNonseq16[address >> DS_BASE_OFFSET]; switch (address >> DS_BASE_OFFSET) { + case DS_REGION_WORKING_RAM: + if (address >= DS7_BASE_WORKING_RAM || !ds->memory.wramSize7) { + ((uint8_t*) memory->wram7)[address & (DS7_SIZE_WORKING_RAM - 1)] = value; + } else { + ((uint8_t*) memory->wram)[address & (ds->memory.wramSize7 - 1)] = value; + } + break; case DS_REGION_RAM: if ((address & (DS_SIZE_RAM - 1)) < DS_SIZE_RAM) { ((uint8_t*) memory->ram)[address & (DS_SIZE_RAM - 1)] = value;