The import's default blob name was the payload's file name (SLOT0, Player,
story) on a guess the docs carried as a VERIFY. The executable settles it:
XGameSaveSubmitBlobWrite takes a literal at both call sites -- "Save Game
Header" first, 0x128 bytes, then "Save Game Data" with the payload -- and
the read path matches exactly those two names, keeping the header only when
its size is 0x128. A container the title wrote therefore holds a 296-byte
header blob and a data blob, so a payload imported under any other name is
never read back.
Write the payload as "Save Game Data" (the existing %-encoding turns it into
Save%20Game%20Data on disk) and leave --map for both halves. The container
name is still unmeasured: neither CreateContainer call passes a literal, both
take [state + 0x288] + index * 0x2c + 2, a table the title fills at run time,
so the default stays the ASAV slot name and the docs say so instead of
guessing.
docs/saves.md records what was measured and what was not and drops the
VERIFY; the import-manifest note says the same; the layout test pins the new
name. tools/exe_checklist.py goes from 17 notes to 16 on dde82f27e.
Python 3.14's json decoder is iterative, so a 100,000-level JSAV body no
longer raises RecursionError: parse_jsav accepted it, info printed
JSAV (...), verify said OK and extract died with a 1,027-line traceback
and exit 1 (json.dump recurses). The tests already expected a validation
error and noted that the C decoder's limit differs by platform; the tool
now checks the nesting depth itself (JSON_NESTING_LIMIT = 512, brackets
inside strings ignored) in parse_jsav, in verify's per-block check and in
the packed index, so a malformed save is one error line and exit 2 on
every Python.
(cherry picked from commit 79da3a9161fb0a238ddf4fd5179559bcd69c44a0)
Squash-merged after diff review of PR #6848 - docs/saves: both import usage lines name --with-packed, the flag that imports the packed SLAYER1 copy (EGEN-SAVES-WITHPACKED-DOC)
A GDK title opens its save provider at boot; QueryApiImpl now serves
XGameSaveImpl (IXGameSaveImpl..3, 33 slots from xgameruntime-docs' layout,
signatures and error codes from the public GDK reference). Saves are files
in LEONIDA_SAVE_DIR\local-user\<container>\<blob> (default
%LOCALAPPDATA%\Leonida\saves), %-encoded: the layout tools/saves.py import
already writes. Updates are buffered and committed by write-then-rename;
container names follow the documented rule; the 16 MB update limit, the
documented E_GS_* codes, async variants through XAsync, and the
XGameSaveFiles folder/quota slots. Assumptions (quota, blob-name length,
nullptr blob list) are marked in the source and docs.
xgameruntime_gamesave_test drives every slot (50 checks). The two tests that
used XGameSaveImpl's id as "a class not served" now use a made-up id.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/saves.md: document 1,644-byte ASAV profile record (kind 3) layout: 112-byte active header and setting fields starting with u32 10, u32 3, followed by 1,532 bytes of zero padding.
- tools/saves.py: implement parse_profile and build_profile to decode version, kind, active dwords, account identifier and verify zero-padding cleanliness; update info and extract commands to report profile metadata and write profile.json.
- tests/test_saves.py: add unit tests for profile record decoding, extraction, info reporting and invalid version/kind rejection.
docs/saves.md and the tools/saves.py docstring named
runtime/shims/xgameruntime_services.cpp as the runtime's save store; that file
is only in the open #279, and on main XGameSave* imports get the loader's
default answers. docs/shader_validation.md named spirv_mini_interp without
its .py. tests/test_docs_repo_paths.py checks that backticked tools/,
runtime/, tests/ and scripts/ paths in docs/ name tracked files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The $0x... keys in JSAV blocks and ASAV settings are the case-sensitive joaat
(seed 0, no lower-casing) of engine/script names, the same rule as the member
hashes in docs/world_names.md. Found from structure: the group keys hash names
derived from the clear-text JSON wrappers.
tools/save_keys.py collects the distinct keys from saves or extract folders and
resolves them against strings harvested from any local files (raw bytes and
zlib streams), reporting per hash family how many keys resolve and how many
are expected by chance; --compose N adds one/two-word names. On the sample set
278 of 1,059 keys resolve with joaat over the game's own data archives; every
other family stays at chance level. Only counts are documented; names stay local.
Synthetic tests only (tests/test_save_keys.py).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/saves.md records the measured layout of the game's save containers:
JSAV v3 (20-byte index + one JSON document of CodeSaveBlocks/ScriptSaveBlocks,
rebuilt byte-for-byte), the ASAV header (checksum at 0x160 still unknown) and
the SLAYER1 wrapper, whose packed body is noted and not decoded.
tools/saves.py (stdlib only): info, extract, pack, verify, diff, and import
into the offline XGameSave folder layout of xgameruntime_services.cpp (#279)
with the same %-encoding. tests/test_saves.py covers it on synthetic files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>