Counters: mark the savestate poison-repair blocks DELETEME after 2026-12-01

The load-time repairs in rcntFreeze/psxRcntFreeze exist only to heal .p2s
files saved by builds that predate the trigger fix (9f6288531d, 2026-08-09).
No new state can carry the scar, so once old states have aged out the loops
can simply be deleted; the sync-time guards stay.
This commit is contained in:
Brian Degenhardt
2026-08-09 10:03:57 -07:00
parent c77ed879a3
commit 7668167aa1
2 changed files with 11 additions and 1 deletions
+7
View File
@@ -1114,11 +1114,18 @@ bool SaveStateBase::rcntFreeze()
if (IsLoading())
{
// DELETEME after 2026-12-01: transitional repair for old poisoned states.
// Repair states poisoned by the old u32 rcntSyncCounter blowup (baseline one
// full 2^32 epoch in the future, count far outside the 16-bit domain): snap
// the baseline back to now and re-fold the count, or the counter stays dead
// until cycle crosses the bogus baseline. cpuRegs is thawed before us, so
// cpuRegs.cycle is the loaded state's own clock here.
//
// The trigger (cross-thread ExitExecution warping the EE clock backwards)
// was fixed 2026-08-09, so no new state can carry this scar; this block
// only heals .p2s files saved by builds older than that. Once those have
// aged out (a few months of releases), delete the loop below — the guard
// in rcntSyncCounter stays.
for (int i = 0; i < 4; i++)
{
bool repaired = false;
+4 -1
View File
@@ -820,11 +820,14 @@ bool SaveStateBase::psxRcntFreeze()
if (IsLoading())
{
// DELETEME after 2026-12-01: transitional repair for old poisoned states.
// Repair states poisoned by the old u32 psxRcntSync blowup (baseline one full
// 2^32 epoch in the future): snap the baseline back to now, or the counter
// stays dead until psxRegs.cycle crosses the bogus baseline (116.5 s). The
// count is left alone — IOP counts are u64 and several counters legitimately
// run wider than 16 bits.
// run wider than 16 bits. Same removal terms as the EE-side block in
// rcntFreeze: the trigger was fixed 2026-08-09, this only heals states
// saved by older builds; delete the loop once those have aged out.
for (int i = 0; i < NUM_COUNTERS; i++)
{
if ((s64)(psxRegs.cycle - psxCounters[i].startCycle) >= 0)