From fe3325e42d6682637b70cc2520d4cbb3ef06d1e1 Mon Sep 17 00:00:00 2001 From: damdoum Date: Thu, 15 Feb 2007 16:01:17 +0000 Subject: [PATCH] MMU : forgot mask while factoring --- desmume/src/MMU.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/desmume/src/MMU.c b/desmume/src/MMU.c index 8c2dff761..4c985c9cc 100644 --- a/desmume/src/MMU.c +++ b/desmume/src/MMU.c @@ -2648,14 +2648,14 @@ void FASTCALL MMU_doDMA(u32 proc, u32 num) int u=(MMU.DMACrt[proc][num]>>21); switch(u & 0x3) { case 0 : dstinc = sz; break; - case 1 : dstinc = 0; break; - case 2 : dstinc = -sz; break; + case 1 : dstinc = -sz; break; + case 2 : dstinc = 0; break; case 3 : dstinc = sz; break; //reload } - switch(u >> 2) { + switch((u >> 2)&0x3) { case 0 : srcinc = sz; break; - case 1 : srcinc = 0; break; - case 2 : srcinc = -sz; break; + case 1 : srcinc = -sz; break; + case 2 : srcinc = 0; break; case 3 : // reserved return; } @@ -2739,4 +2739,3 @@ void FASTCALL MMU_write32_acl(u32 proc, u32 adr, u32 val) } #endif -