Files
Matthew Stanley 0d573f0568 coop: portable context blobs (capture a character, re-install it later)
Adds ctx_region/ctx_save/ctx_load plus psx_coop_seed_from_blob, and raises the swap-region caps to 128 regions of up to 1MB (from 8 of 16KB) so a whole alternate CHARACTER fits, not just an actor struct. Overlapping swap regions are now rejected -- they would be gathered and scattered twice and the context would not round-trip. Wasteful by design: this is a PC enhancement and the PlayStation is the porting baseline, not the memory budget.

Motivation, measured: on MMX6 a playable character is not a flag. Setting the struct's character byte alone wedges the machine into an exception storm, because the character IS the data set the loader installs at stage entry. That set is 830KB across 84 disjoint regions (the X-vs-X control differs by 866 bytes, so it is signal) and contains no code -- no overlay covers it and the dirty-RAM interpreter never executes there.

NOT SUFFICIENT ON ITS OWN, recorded so the next attempt does not repeat it: installing the whole diff over a live player flips the character byte and avoids an instant crash, but drops the frame rate 65->22 with the player frozen and post_exception_cooldown in the thousands. The blob is a difference set captured mid-run and injected at a different point in another run, so it imports live per-frame state from a foreign timeline. The failure is coherence, not content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 11:42:57 -07:00
..