From cd48c293d6df5beebad3a8cc542efc6bc88ee005 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 7 Jan 2015 00:58:31 -0800 Subject: [PATCH] GBA Memory: Filter out top nybble of DMA addresses --- CHANGES | 1 + src/gba/gba-memory.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 8fba79cc2..a7492c1a8 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,7 @@ Bugfixes: - GBA Audio: Fix GB audio channels being too quiet (fixes #159) - Qt: Fix a race condition when a game crashes immediately - Qt: Fix some cases where key mapping can break if focus is adjusted + - GBA Memory: Filter out top nybble of DMA addresses Misc: - Qt: Disable sync to video by default - GBA: Exit cleanly on FATAL if the port supports it diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index da0031c53..a7b71bb8d 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -972,12 +972,12 @@ void GBAAdjustWaitstates(struct GBA* gba, uint16_t parameters) { void GBAMemoryWriteDMASAD(struct GBA* gba, int dma, uint32_t address) { struct GBAMemory* memory = &gba->memory; - memory->dma[dma].source = address & 0xFFFFFFFE; + memory->dma[dma].source = address & 0x0FFFFFFE; } void GBAMemoryWriteDMADAD(struct GBA* gba, int dma, uint32_t address) { struct GBAMemory* memory = &gba->memory; - memory->dma[dma].dest = address & 0xFFFFFFFE; + memory->dma[dma].dest = address & 0x0FFFFFFE; } void GBAMemoryWriteDMACNT_LO(struct GBA* gba, int dma, uint16_t count) {