SaveState: add a reader for the legacy 0x9A2C/0x9A34 blob layouts

Savestates written by the AetherSX2/NetherSX2 era of upstream PCSX2 use two
internal-structures layouts that today's reader cannot parse: 0x9A2C (upstream
0312e902) and 0x9A34 (upstream 7e939b75). Add a load-only deserializer that
consumes those layouts field-by-field into live emulator state.

Old struct layouts are declared in an OldState namespace, each cited to the
upstream sha it was taken from and guarded by a static_assert of the byte-exact
size. A second assert group pins the sizes of the CURRENT types the legacy
layout depends on, so upstream drift breaks the build rather than desyncing a
load mid-blob. Blocks that are byte-identical across eras reuse the existing
freeze functions.

The two era gaps that need real work: 32-bit cycle counters widen relative to
their domain base so wrap-straddling deltas survive, and fields that moved
between the cpuRegs and Cycles blocks at 0x9A31 are staged and committed once,
after the disc identity check, so a wrong-game state cannot half-apply.

Not yet wired into the load path; that follows.
This commit is contained in:
Brian Degenhardt
2026-08-02 11:19:56 -07:00
parent 5bf499b21d
commit 08dddb0947
8 changed files with 1223 additions and 0 deletions
File diff suppressed because it is too large Load Diff