diff options
author | StapleButter <thetotalworm@gmail.com> | 2018-10-18 00:27:55 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2018-10-18 00:27:55 +0200 |
commit | de91eabf71437ff6973154131353d2a83a892380 (patch) | |
tree | 31fb6d226fc28f125fe6f13acfe566d8e28c728a | |
parent | 7cbcc6c23085a3e957ed4ba4c1faad3e3101a973 (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.cpp | 8 | ||||
-rw-r--r-- | src/ARM.h | 2 | ||||
-rw-r--r-- | src/CP15.cpp | 2 | ||||
-rw-r--r-- | src/CP15.h | 2 | ||||
-rw-r--r-- | src/DMA.cpp | 8 | ||||
-rw-r--r-- | src/DMA.h | 2 | ||||
-rw-r--r-- | src/NDS.cpp | 14 | ||||
-rw-r--r-- | src/NDS.h | 2 |
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)); @@ -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"); @@ -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) @@ -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 @@ -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(); |