aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-18 23:05:36 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-18 23:05:36 +0200
commitb1ed835ae91d9bb507d4d7b2084bbcdcce729e2d (patch)
tree18f9f48c6ccac1f3fb1bf8435fd5291068faf47a
parent606a40e6b8f05bbc13d08e6e68fcf477c9a4a0e7 (diff)
might be more impressive if it actually worked, like this
-rw-r--r--src/DSi_NDMA.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/DSi_NDMA.cpp b/src/DSi_NDMA.cpp
index a8055eb..7c0b2a1 100644
--- a/src/DSi_NDMA.cpp
+++ b/src/DSi_NDMA.cpp
@@ -118,13 +118,16 @@ void DSi_NDMA::Start()
// TODO: how does GXFIFO DMA work with all the block shito?
IterCount = RemCount;
- if (IterCount > TotalRemCount)
- IterCount = TotalRemCount;
+ if (((StartMode & 0x1F) != 0x10) && !(Cnt & (1<<29)))
+ {
+ if (IterCount > TotalRemCount)
+ IterCount = TotalRemCount;
+ }
if (Cnt & (1<<12)) CurDstAddr = DstAddr;
if (Cnt & (1<<15)) CurSrcAddr = SrcAddr;
- printf("ARM%d NDMA%d %08X %02X %08X->%08X %d bytes\n", CPU?7:9, Num, Cnt, StartMode, CurSrcAddr, CurDstAddr, RemCount*4);
+ printf("ARM%d NDMA%d %08X %02X %08X->%08X %d bytes, total=%d\n", CPU?7:9, Num, Cnt, StartMode, CurSrcAddr, CurDstAddr, RemCount*4, TotalRemCount*4);
//IsGXFIFODMA = (CPU == 0 && (CurSrcAddr>>24) == 0x02 && CurDstAddr == 0x04000400 && DstAddrInc == 0);