PowerPC: Add reservation monitor to save state

This commit is contained in:
CrystalGamma 2021-07-13 10:36:17 +02:00
parent d763d693e8
commit c991904e04
3 changed files with 5 additions and 3 deletions

View File

@ -125,6 +125,9 @@ void DoState(PointerWrap& p)
p.Do(ppcState.pagetable_base); p.Do(ppcState.pagetable_base);
p.Do(ppcState.pagetable_hashmask); p.Do(ppcState.pagetable_hashmask);
p.Do(ppcState.reserve);
p.Do(ppcState.reserve_address);
ppcState.iCache.DoState(p); ppcState.iCache.DoState(p);
if (p.GetMode() == PointerWrap::MODE_READ) if (p.GetMode() == PointerWrap::MODE_READ)

View File

@ -167,8 +167,7 @@ struct PowerPCState
InstructionCache iCache; InstructionCache iCache;
// TODO: These should really be in the save state, although it's unlikely to matter much. // Reservation monitor for lwarx and its friend stwcxd.
// They are for lwarx and its friend stwcxd.
bool reserve; bool reserve;
u32 reserve_address; u32 reserve_address;

View File

@ -73,7 +73,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread; static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system // Don't forget to increase this after doing changes on the savestate system
constexpr u32 STATE_VERSION = 133; // Last changed in PR 9600 constexpr u32 STATE_VERSION = 134; // Last changed in PR 7896
// Maps savestate versions to Dolphin versions. // Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list, // Versions after 42 don't need to be added to this list,