savestate shito: fix compile errors.

still far from being finished, so avoid using unless you want to spawn blackholes or some pretty bad shit.
This commit is contained in:
StapleButter 2018-10-18 00:27:55 +02:00
parent 7cbcc6c230
commit de91eabf71
8 changed files with 20 additions and 20 deletions

View File

@ -161,12 +161,12 @@ void ARM::Reset()
JumpTo(ExceptionBase); 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*)&Cycles);
file->Var32(&(u32)CyclesToRun); file->Var32((u32*)&CyclesToRun);
file->Var32(&Halted); file->Var32(&Halted);
file->VarArray(R, 16*sizeof(u32)); file->VarArray(R, 16*sizeof(u32));

View File

@ -38,7 +38,7 @@ public:
void Reset(); void Reset();
void Savestate(Savestate* file); void DoSavestate(Savestate* file);
void JumpTo(u32 addr, bool restorecpsr = false); void JumpTo(u32 addr, bool restorecpsr = false);
void RestoreCPSR(); void RestoreCPSR();

View File

@ -57,7 +57,7 @@ void Reset()
DTCMSize = 0; DTCMSize = 0;
} }
void Savestate(Savestate* file) void DoSavestate(Savestate* file)
{ {
file->Section("CP15"); file->Section("CP15");

View File

@ -24,7 +24,7 @@ namespace CP15
void Reset(); void Reset();
void Savestate(Savestate* file); void DoSavestate(Savestate* file);
void UpdateDTCMSetting(); void UpdateDTCMSetting();
void UpdateITCMSetting(); void UpdateITCMSetting();

View File

@ -118,7 +118,7 @@ void DMA::Reset()
InProgress = false; InProgress = false;
} }
void DMA::Savestate(Savestate* file) void DMA::DoSavestate(Savestate* file)
{ {
char* magic = "DMAx"; char* magic = "DMAx";
magic[3] = '0' + Num + (CPU*4); magic[3] = '0' + Num + (CPU*4);
@ -136,9 +136,9 @@ void DMA::Savestate(Savestate* file)
file->Var32(&SrcAddrInc); file->Var32(&SrcAddrInc);
file->Var32(&DstAddrInc); file->Var32(&DstAddrInc);
file->Var32(&(u32)Running); file->Var32((u32*)&Running);
file->Var32(&(u32)InProgress); file->Var32((u32*)&InProgress);
file->Var32(&(u32)IsGXFIFODMA); file->Var32((u32*)&IsGXFIFODMA);
} }
void DMA::WriteCnt(u32 val) void DMA::WriteCnt(u32 val)

View File

@ -29,7 +29,7 @@ public:
void Reset(); void Reset();
void Savestate(Savestate* file); void DoSavestate(Savestate* file);
void WriteCnt(u32 val); void WriteCnt(u32 val);
void Start(); void Start();

View File

@ -356,7 +356,7 @@ void Stop()
SPU::Stop(); SPU::Stop();
} }
void Savestate(Savestate* file) void DoSavestate(Savestate* file)
{ {
file->Section("NDSG"); file->Section("NDSG");
@ -401,8 +401,8 @@ void Savestate(Savestate* file)
file->VarArray(SchedList, sizeof(SchedList)); file->VarArray(SchedList, sizeof(SchedList));
file->Var32(&SchedListMask); file->Var32(&SchedListMask);
file->Var32(&(u32)CurIterationCycles); file->Var32((u32*)&CurIterationCycles);
file->Var32(&(u32)ARM7Offset); file->Var32((u32*)&ARM7Offset);
// TODO: save KeyInput???? // TODO: save KeyInput????
file->Var16(&KeyCnt); file->Var16(&KeyCnt);
@ -410,15 +410,15 @@ void Savestate(Savestate* file)
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
DMAs[i]->Savestate(i); DMAs[i]->DoSavestate(file);
// MapSharedWRAM // MapSharedWRAM
// powcnt shito // powcnt shito
ARM9->Savestate(file); ARM9->DoSavestate(file);
ARM7->Savestate(file); ARM7->DoSavestate(file);
CP15::Savestate(file); CP15::DoSavestate(file);
// NDSCart // NDSCart
// GPU // GPU

View File

@ -109,7 +109,7 @@ void DeInit();
void Reset(); void Reset();
void Stop(); void Stop();
void Savestate(Savestate* file); void DoSavestate(Savestate* file);
bool LoadROM(const char* path, bool direct); bool LoadROM(const char* path, bool direct);
void LoadBIOS(); void LoadBIOS();