mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user