Skip to content

fix(savedata): report a save's size as the mount that created it gave - #5094

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
bubblegg:fix/savedata-save-size
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
bubblegg:fix/savedata-save-size

Conversation

@bubblegg

Copy link
Copy Markdown
Contributor

What

sceSaveDataDirNameSearch infos and sceSaveDataGetMountInfo reported every save as SAVE_DATA_BLOCKS_MAX blocks, all of them free. A save's size is now the blocks of the sceSaveDataMount3 call that created it, kept beside the save in <dir>.blocks; a save without a kept size takes that of its next mount that names one, and otherwise keeps SAVE_DATA_BLOCKS_MAX. Free blocks are what the save's files leave of it, each file rounded up to 32 KiB blocks. Sort keys 2 (blocks) and 5 (free blocks) now sort by these values. sceSaveDataDelete removes the kept size. The technical debt entry is updated.

PPSA09030 creates its saves with 96 blocks. While the search reported 32768, it discarded them and showed its first-start EULA on every start.

Tested

Windows 11, WinLibs GCC 16.1.0. guest_savedata_search fails on main (an empty save must report all its blocks free) and passes with this change; the 15 save data tests pass. PPSA09030: the EULA no longer comes back and the trace shows the search followed by the mounts of both saves (the two saves made before this change were given their 96-block size by hand).

Checklist

Every native save reported SAVE_DATA_BLOCKS_MAX blocks, all of them free,
in the sceSaveDataDirNameSearch infos and in sceSaveDataGetMountInfo,
whatever the title created it with and whatever its files held. A save's
size is now the blocks of the sceSaveDataMount3 call that created it,
kept beside the save; a save without a kept size takes that of its next
mount that names one, and otherwise keeps SAVE_DATA_BLOCKS_MAX. Free
blocks are what the save's files leave of it, each file rounded up to
32 KiB blocks, and the blocks and free-blocks sort keys use both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5173 core/libs/prx/libSceSaveData.native/Export.cpp L257, L327, L364-365

@coltken95

Copy link
Copy Markdown

Tested on Linux x86-64 (Release build), with 4b7a357 merged into main 9d0a41d:

  • With the PR: guest_savedata_search passes.
  • With main's sources and the PR's test: guest_savedata_search fails.

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit a7836b1 into boykopovar:main Oct 14, 2026
8 checks passed
bubblegg added a commit to bubblegg/AnyPS5 that referenced this pull request Oct 14, 2026
Taken from upstream: its handling of the buffer pattern fill kernel (its images
are still not marked as filled), the save size of a mount (boykopovar#5094
as merged), the SSL connection bookkeeping (connect, read and write still fail
with a network error), the unwind image cache and the resident direct memory
views on Windows. Resource plans loaded from upstream's disk cache get their
compiled SRT walk too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants