Memory sticks/cards don't suit N+1 separate save files the way Linux's
filesystem does, so add an opt-in SAVE_DEVICE_DATA_RAW mode: settings and
all save slots get serialized to JSON, concatenated, zlib-compressed, and
framed with a magic/version/checksum/generation header, then read/written
as a single blob through one combined platform hook instead of four.
- PSP and Dolphin's SD/NAND backends write via a temp file + atomic rename,
so a crash mid-write can never leave a half-written save behind.
- GameCube memory cards have no rename or resize primitive, so they
ping-pong between two fixed files instead, picking whichever is valid and
has the higher generation counter on load.
- Linux is untouched (still four separate JSON files); saveslot.h/
savesettings.h drop their now-unnecessary pack(1) now that nothing
persists them as raw bytes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PSP checks memory-stick reachability via sceIoGetstat. GameCube gets two
devices (CARD_SLOTA/CARD_SLOTB), each mounted via CARD_Init/CARD_Mount and
checked for free space via CARD_GetDirectory/CARD_GetBlockCount. Wii picks
between three storage methods at compile time (DUSK_SAVE_WII_METHOD =
NAND/CARD/SD in wii.cmake, default NAND via ISFS) since real hardware
behavior for the default is unverified.
Also fixes two pre-existing bugs found while build/runtime-testing this
across PPSSPP and Dolphin: wrong libogc language macros in
systemGetLocaleDolphin, and a missing SYS_STDIO_Report(true) call that
silently swallowed all guest console output in Dolphin.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>