aboutsummaryrefslogtreecommitdiff
path: root/src/DMA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DMA.cpp')
-rw-r--r--src/DMA.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/DMA.cpp b/src/DMA.cpp
index d296511..a7558ff 100644
--- a/src/DMA.cpp
+++ b/src/DMA.cpp
@@ -47,21 +47,16 @@ using Platform::LogLevel;
// TODO: timings are nonseq when address is fixed/decrementing
-DMA::DMA(u32 cpu, u32 num)
+DMA::DMA(u32 cpu, u32 num) :
+ CPU(cpu),
+ Num(num)
{
- CPU = cpu;
- Num = num;
-
if (cpu == 0)
CountMask = 0x001FFFFF;
else
CountMask = (num==3 ? 0x0000FFFF : 0x00003FFF);
}
-DMA::~DMA()
-{
-}
-
void DMA::Reset()
{
SrcAddr = 0;
@@ -82,6 +77,7 @@ void DMA::Reset()
Executing = false;
InProgress = false;
MRAMBurstCount = 0;
+ MRAMBurstTable = DMATiming::MRAMDummy;
}
void DMA::DoSavestate(Savestate* file)
@@ -106,6 +102,10 @@ void DMA::DoSavestate(Savestate* file)
file->Bool32(&InProgress);
file->Bool32(&IsGXFIFODMA);
file->Var32(&MRAMBurstCount);
+ file->Bool32(&Executing);
+ file->Bool32(&Stall);
+
+ file->VarArray(MRAMBurstTable.data(), sizeof(MRAMBurstTable));
}
void DMA::WriteCnt(u32 val)