aboutsummaryrefslogtreecommitdiff
path: root/src/DMA.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/DMA.h')
-rw-r--r--src/DMA.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/DMA.h b/src/DMA.h
index 11ee1ad..1d1992a 100644
--- a/src/DMA.h
+++ b/src/DMA.h
@@ -1,5 +1,5 @@
/*
- Copyright 2016-2017 StapleButter
+ Copyright 2016-2019 StapleButter
This file is part of melonDS.
@@ -29,6 +29,8 @@ public:
void Reset();
+ void DoSavestate(Savestate* file);
+
void WriteCnt(u32 val);
void Start();
@@ -39,6 +41,8 @@ public:
return ((mode == StartMode) && (Cnt & 0x80000000));
}
+ bool IsRunning() { return Running!=0; }
+
void StartIfNeeded(u32 mode)
{
if ((mode == StartMode) && (Cnt & 0x80000000))
@@ -51,6 +55,11 @@ public:
Cnt &= ~0x80000000;
}
+ void StallIfRunning()
+ {
+ if (Executing) Stall = true;
+ }
+
u32 SrcAddr;
u32 DstAddr;
u32 Cnt;
@@ -58,8 +67,6 @@ public:
private:
u32 CPU, Num;
- s32 Waitstates[2][16];
-
u32 StartMode;
u32 CurSrcAddr;
u32 CurDstAddr;
@@ -69,9 +76,12 @@ private:
u32 DstAddrInc;
u32 CountMask;
- bool Running;
+ u32 Running;
bool InProgress;
+ bool Executing;
+ bool Stall;
+
bool IsGXFIFODMA;
};