aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-10-18 00:27:55 +0200
committerStapleButter <thetotalworm@gmail.com>2018-10-18 00:27:55 +0200
commitde91eabf71437ff6973154131353d2a83a892380 (patch)
tree31fb6d226fc28f125fe6f13acfe566d8e28c728a
parent7cbcc6c23085a3e957ed4ba4c1faad3e3101a973 (diff)
savestate shito: fix compile errors.
still far from being finished, so avoid using unless you want to spawn blackholes or some pretty bad shit.
-rw-r--r--src/ARM.cpp8
-rw-r--r--src/ARM.h2
-rw-r--r--src/CP15.cpp2
-rw-r--r--src/CP15.h2
-rw-r--r--src/DMA.cpp8
-rw-r--r--src/DMA.h2
-rw-r--r--src/NDS.cpp14
-rw-r--r--src/NDS.h2
8 files changed, 20 insertions, 20 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index fbf4be2..2368a1b 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -161,12 +161,12 @@ void ARM::Reset()
JumpTo(ExceptionBase);
}
-void ARM::Savestate(Savestate* file)
+void ARM::DoSavestate(Savestate* file)
{
- file->Section(Num ? "ARM7" : "ARM9");
+ file->Section((char*)(Num ? "ARM7" : "ARM9"));
- file->Var32(&(u32)Cycles);
- file->Var32(&(u32)CyclesToRun);
+ file->Var32((u32*)&Cycles);
+ file->Var32((u32*)&CyclesToRun);
file->Var32(&Halted);
file->VarArray(R, 16*sizeof(u32));
diff --git a/src/ARM.h b/src/ARM.h
index 85ddfc0..92d47bb 100644
--- a/src/ARM.h
+++ b/src/ARM.h
@@ -38,7 +38,7 @@ public:
void Reset();
- void Savestate(Savestate* file);
+ void DoSavestate(Savestate* file);
void JumpTo(u32 addr, bool restorecpsr = false);
void RestoreCPSR();
diff --git a/src/CP15.cpp b/src/CP15.cpp
index 97414db..e3f0bae 100644
--- a/src/CP15.cpp
+++ b/src/CP15.cpp
@@ -57,7 +57,7 @@ void Reset()
DTCMSize = 0;
}
-void Savestate(Savestate* file)
+void DoSavestate(Savestate* file)
{
file->Section("CP15");
diff --git a/src/CP15.h b/src/CP15.h
index 2e7f5f0..1b92191 100644
--- a/src/CP15.h
+++ b/src/CP15.h
@@ -24,7 +24,7 @@ namespace CP15
void Reset();
-void Savestate(Savestate* file);
+void DoSavestate(Savestate* file);
void UpdateDTCMSetting();
void UpdateITCMSetting();
diff --git a/src/DMA.cpp b/src/DMA.cpp
index 9989f73..ba8cc41 100644
--- a/src/DMA.cpp
+++ b/src/DMA.cpp
@@ -118,7 +118,7 @@ void DMA::Reset()
InProgress = false;
}
-void DMA::Savestate(Savestate* file)
+void DMA::DoSavestate(Savestate* file)
{
char* magic = "DMAx";
magic[3] = '0' + Num + (CPU*4);
@@ -136,9 +136,9 @@ void DMA::Savestate(Savestate* file)
file->Var32(&SrcAddrInc);
file->Var32(&DstAddrInc);
- file->Var32(&(u32)Running);
- file->Var32(&(u32)InProgress);
- file->Var32(&(u32)IsGXFIFODMA);
+ file->Var32((u32*)&Running);
+ file->Var32((u32*)&InProgress);
+ file->Var32((u32*)&IsGXFIFODMA);
}
void DMA::WriteCnt(u32 val)
diff --git a/src/DMA.h b/src/DMA.h
index 0bc5ed1..6157431 100644
--- a/src/DMA.h
+++ b/src/DMA.h
@@ -29,7 +29,7 @@ public:
void Reset();
- void Savestate(Savestate* file);
+ void DoSavestate(Savestate* file);
void WriteCnt(u32 val);
void Start();
diff --git a/src/NDS.cpp b/src/NDS.cpp
index d82db55..b0bd392 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -356,7 +356,7 @@ void Stop()
SPU::Stop();
}
-void Savestate(Savestate* file)
+void DoSavestate(Savestate* file)
{
file->Section("NDSG");
@@ -401,8 +401,8 @@ void Savestate(Savestate* file)
file->VarArray(SchedList, sizeof(SchedList));
file->Var32(&SchedListMask);
- file->Var32(&(u32)CurIterationCycles);
- file->Var32(&(u32)ARM7Offset);
+ file->Var32((u32*)&CurIterationCycles);
+ file->Var32((u32*)&ARM7Offset);
// TODO: save KeyInput????
file->Var16(&KeyCnt);
@@ -410,15 +410,15 @@ void Savestate(Savestate* file)
for (int i = 0; i < 8; i++)
- DMAs[i]->Savestate(i);
+ DMAs[i]->DoSavestate(file);
// MapSharedWRAM
// powcnt shito
- ARM9->Savestate(file);
- ARM7->Savestate(file);
- CP15::Savestate(file);
+ ARM9->DoSavestate(file);
+ ARM7->DoSavestate(file);
+ CP15::DoSavestate(file);
// NDSCart
// GPU
diff --git a/src/NDS.h b/src/NDS.h
index 9887323..27dc820 100644
--- a/src/NDS.h
+++ b/src/NDS.h
@@ -109,7 +109,7 @@ void DeInit();
void Reset();
void Stop();
-void Savestate(Savestate* file);
+void DoSavestate(Savestate* file);
bool LoadROM(const char* path, bool direct);
void LoadBIOS();