Preserve saves during recovery and fix XMA playback #4255

Closed
github-bot wants to merge 2 commits from gh-pr/4254/head into gh-pr/4254/base
Owner

@⁠invismann on GitHub · 2026-11-30 17:49 UTC · original
invismann:fix/save-recovery-xma → main · +173 −36 · 3 files · 2 commits · closed without merging

What it changes

  • XGameSave: Abort migration if a legacy blob cannot be read, leaving the original container intact. Choose the newest complete committed version and clean up only canonical staging directories such as v2.new.
  • XMA: Follow packet skip links when a fresh input buffer starts with a continuation-only packet. Apply remaining sample skips when flushing the decoder's final overlap.

Save recovery incorporates work by towiice (034cb3de6) and lgtlgt0015-code (7e9f3a028, 2e2ca139f). The XMA fix comes from a236443f6 on cool-fox-rtx.

How it was tested

  • Before: All five regression cases failed on upstream 84bd61e2c with only the tests applied. Save recovery discarded the legacy container, selected the incomplete newer version, or removed a noncanonical directory. The decoder dropped the continuation case and produced 256 samples where 128 were expected after skipping five subframes.
  • After: All five regressions passed. victory-hle save and audio tests passed (35), and victory-formats XMA tests passed (15, with four existing ignored tests). The locked Windows app build and staged asset-policy check passed. Fixtures are synthetic.
  • Startup smoke: Windows, RTX 4090, Series X, 2560×1440 SDR, with DLSS, frame generation, and hardware ray tracing disabled. The title reached at least 1,024 presented frames with disposable data. The specific save and XMA failures were reproduced in the tests.

Checked for overlap

  • Searched open PRs for the issues and affected modules. #3657 concerns save enumeration errors. #3154 concerns validation of output pointers. Neither covers the recovery or decoding changes above.
**@⁠invismann** on GitHub · 2026-11-30 17:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4254) `invismann:fix/save-recovery-xma` → `main` · +173 −36 · 3 files · 2 commits · closed without merging ## What it changes - **XGameSave:** Abort migration if a legacy blob cannot be read, leaving the original container intact. Choose the newest complete committed version and clean up only canonical staging directories such as `v2.new`. - **XMA:** Follow packet skip links when a fresh input buffer starts with a continuation-only packet. Apply remaining sample skips when flushing the decoder's final overlap. Save recovery incorporates work by towiice (`034cb3de6`) and lgtlgt0015-code (`7e9f3a028`, `2e2ca139f`). The XMA fix comes from `a236443f6` on `cool-fox-rtx`. ## How it was tested - **Before:** All five regression cases failed on upstream `84bd61e2c` with only the tests applied. Save recovery discarded the legacy container, selected the incomplete newer version, or removed a noncanonical directory. The decoder dropped the continuation case and produced 256 samples where 128 were expected after skipping five subframes. - **After:** All five regressions passed. `victory-hle` save and audio tests passed (35), and `victory-formats` XMA tests passed (15, with four existing ignored tests). The locked Windows app build and staged asset-policy check passed. Fixtures are synthetic. - **Startup smoke:** Windows, RTX 4090, Series X, 2560×1440 SDR, with DLSS, frame generation, and hardware ray tracing disabled. The title reached at least 1,024 presented frames with disposable data. The specific save and XMA failures were reproduced in the tests. ## Checked for overlap - [x] Searched open PRs for the issues and affected modules. #3657 concerns save enumeration errors. #3154 concerns validation of output pointers. Neither covers the recovery or decoding changes above.
Keep the legacy container if reading a blob fails. Prefer the last
complete committed version and prune only canonical staging directories.

Ported-from: avatarmanz/VIctory-7900XTX@034cb3de6 (towiice)
Ported-from: Belobug/VIctory-Belobug-AMD@7e9f3a028 (lgtlgt0015-code)
Ported-from: Belobug/VIctory-Belobug-AMD@2e2ca139f (lgtlgt0015-code)
Follow the stream's packet chain when the first packet only holds a
continuation. Apply remaining sample skips to the decoder's final overlap.

Ported-from: a236443f6 (cool-fox-rtx)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:09:27 +00:00
github-bot closed this pull request 2026-11-30 18:09:27 +00:00
github-bot referenced this pull request from a commit 2026-12-01 18:24:34 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!4255
No description provided.