diff options
-rw-r--r-- | src/DMA.cpp | 4 | ||||
-rw-r--r-- | src/DMA.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/DMA.cpp b/src/DMA.cpp index 335ad2c..edd6f8b 100644 --- a/src/DMA.cpp +++ b/src/DMA.cpp @@ -200,6 +200,8 @@ void DMA::Start() return; } + IsGXFIFODMA = (CPU == 0 && (CurSrcAddr>>24) == 0x02 && CurDstAddr == 0x04000400 && DstAddrInc == 0); + // TODO eventually: not stop if we're running code in ITCM Running = true; @@ -234,7 +236,7 @@ s32 DMA::Run(s32 cycles) else { // optimized path for typical GXFIFO DMA - if (CPU == 0 && (CurSrcAddr>>24) == 0x02 && CurDstAddr == 0x04000400 && DstAddrInc == 0) + if (IsGXFIFODMA) { while (IterCount > 0 && cycles > 0) { @@ -66,6 +66,8 @@ private: bool Running; bool InProgress; + + bool IsGXFIFODMA; }; #endif |