GSDumpReplayer: Fix resetting

And get rid of memory reset, it's never used.
This commit is contained in:
Stenzek 2023-03-06 18:39:26 +10:00 committed by refractionpcsx2
parent c783fc0f59
commit eb0d18f484
4 changed files with 12 additions and 11 deletions

View File

@ -144,11 +144,6 @@ bool GSDumpReplayer::ChangeDump(const char* filename)
return true; return true;
} }
void GSDumpReplayer::Reset()
{
GSDumpReplayerCpuReset();
}
void GSDumpReplayer::Shutdown() void GSDumpReplayer::Shutdown()
{ {
Console.WriteLn("(GSDumpReplayer) Shutting down."); Console.WriteLn("(GSDumpReplayer) Shutting down.");
@ -204,7 +199,6 @@ void GSDumpReplayerCpuReset()
s_needs_state_loaded = true; s_needs_state_loaded = true;
s_current_packet = 0; s_current_packet = 0;
s_dump_frame_number = 0; s_dump_frame_number = 0;
hwReset();
} }
static void GSDumpReplayerLoadInitialState() static void GSDumpReplayerLoadInitialState()

View File

@ -31,7 +31,6 @@ void SetIsDumpRunner(bool is_runner);
bool Initialize(const char* filename); bool Initialize(const char* filename);
bool ChangeDump(const char* filename); bool ChangeDump(const char* filename);
void Reset();
void Shutdown(); void Shutdown();
std::string GetDumpSerial(); std::string GetDumpSerial();

View File

@ -34,6 +34,7 @@
#include "CDVD/CDVD.h" #include "CDVD/CDVD.h"
#include "Patch.h" #include "Patch.h"
#include "GameDatabase.h" #include "GameDatabase.h"
#include "GSDumpReplayer.h"
#include "DebugTools/Breakpoints.h" #include "DebugTools/Breakpoints.h"
#include "DebugTools/MIPSAnalyst.h" #include "DebugTools/MIPSAnalyst.h"
@ -78,7 +79,8 @@ void cpuReset()
if (GetMTGS().IsOpen()) if (GetMTGS().IsOpen())
GetMTGS().WaitGS(); // GS better be done processing before we reset the EE, just in case. GetMTGS().WaitGS(); // GS better be done processing before we reset the EE, just in case.
GetVmMemory().Reset(); if (!GSDumpReplayer::IsReplayingDump())
GetVmMemory().Reset();
memzero(cpuRegs); memzero(cpuRegs);
memzero(fpuRegs); memzero(fpuRegs);

View File

@ -303,6 +303,15 @@ BaseVUmicroCPU* CpuVU1 = nullptr;
void SysCpuProviderPack::ApplyConfig() const void SysCpuProviderPack::ApplyConfig() const
{ {
if (GSDumpReplayer::IsReplayingDump())
{
Cpu = &GSDumpReplayerCpu;
psxCpu = &psxInt;
CpuVU0 = &CpuIntVU0;
CpuVU1 = &CpuIntVU1;
return;
}
Cpu = CHECK_EEREC ? &recCpu : &intCpu; Cpu = CHECK_EEREC ? &recCpu : &intCpu;
psxCpu = CHECK_IOPREC ? &psxRec : &psxInt; psxCpu = CHECK_IOPREC ? &psxRec : &psxInt;
@ -314,9 +323,6 @@ void SysCpuProviderPack::ApplyConfig() const
if (EmuConfig.Cpu.Recompiler.EnableVU1) if (EmuConfig.Cpu.Recompiler.EnableVU1)
CpuVU1 = &CpuMicroVU1; CpuVU1 = &CpuMicroVU1;
if (GSDumpReplayer::IsReplayingDump())
Cpu = &GSDumpReplayerCpu;
} }
// Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition. // Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition.