MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PreLoadPrep

Function PreLoadPrep

pcsx2/SaveState.cpp:51–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49static tlbs s_tlb_backup[std::size(tlb)];
50
51static void PreLoadPrep()
52{
53 // ensure everything is in sync before we start overwriting stuff.
54 if (THREAD_VU1)
55 vu1Thread.WaitVU();
56 MTGS::WaitGS(false);
57
58 // backup current TLBs, since we're going to overwrite them all
59 std::memcpy(s_tlb_backup, tlb, sizeof(s_tlb_backup));
60
61 // clear protected pages, since we don't want to fault loading EE memory
62 mmap_ResetBlockTracking();
63
64 VMManager::Internal::ClearCPUExecutionCaches();
65}
66
67static void PostLoadPrep()
68{

Callers 1

SaveState_UnzipFromDiskFunction · 0.85

Calls 2

mmap_ResetBlockTrackingFunction · 0.85
WaitVUMethod · 0.80

Tested by

no test coverage detected