feat(savedata): implement save icons and the read-only mount check #3950
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3950"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T19:42:40Z.
What
Addresses the review: the removed
sceSaveDataMount3: unknown mount_modethrow is restored (d3c30eb0f), and every//comment outside the technical-debt markers is gone fromExport.cpp,SaveData.hppandtests/GuestSaveDataIcon.cpp.sceSaveDataSaveIcon,sceSaveDataLoadIconand the savedata-memory icon paths (GetSaveDataMemory2/SetSaveDataMemory2/SetupSaveDataMemory2with aninit_icon). Icons persist at_sd/<dir>/sce_sys/icon0.png, the console layout titles also see through the mount; the memory sidecar lives at_sd_mem/<slot>.icon. Loads follow shadPS4 semantics (buf_sizefill, full size indata_size, drop on an empty-icon set).sceSaveDataMount3, so a save on a read-only mount returnsBAD_MOUNTED(0x809F000D) instead of silently succeeding.zecoxao/sce_symbolsaerolib database (checked withtools/nid_names.py), including the previously name-unverifiedsceSaveDataCancelstub; recorded in TechnicalDebt.Tested
Ubuntu 24.04 container, no GPU. CMake configure + build from scratch; all 13 savedata tests pass, including the new
guest_savedata_icon(tests/GuestSaveDataIcon.cpp: round trip, truncation, NOT_FOUND before a save, null-argument PARAMETER checks, RDONLY BAD_MOUNTED, memory sidecar init/get/set/drop, Get with a null icon buffer). Also verified against the built export set: all 28 libSceSaveData.native export names recompute their NIDs. Rebased onto currentmain(bca7a29d): the unknown-mount_modethrow is back (d3c30eb0f) and every test still passes.No title was run: no PS5 console behavior was tested, and I have no title that reaches these functions yet (the ps5-doom binary imports no libSceSaveData functions, so its log cannot exercise the icon path). If a title I can run shows the save-icon flow, I will run it and record the log lines here; until then this stays one hurdle short of the title-log evidence incoming reviews now ask for.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:19:37Z.
Two things before this can go in:
libSceSaveData.native/Export.cpp,mount3: thesceSaveDataMount3: unknown mount_modethrow is removed, which the description doesn't mention and the new tests don't need. Please put it back.//comments inExport.cpp,SaveData.hppandGuestSaveDataIcon.cpphave to go; only technical-debt markers are allowed.Which title loads an icon it saved? The description says none was run.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T09:14:52Z.
Conflicts with main again in
core/libs/prx/libSceSaveData.native/Export.cpp: #3814 addedsceSaveDataDirNameSearch2at the end of the file. Please rebase, and leave thesceSaveDataCancelTechnicalDebt entry as it is on main; the NID note doesn't belong in this PR.Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-13T04:08:29Z.
Rebased onto current
main(089f49002): the file-end conflict with #3814 is resolved,sceSaveDataDirNameSearch2and theRvID8BVeg+gunknown stay as they are onmain, and thesceSaveDataCancelTechnicalDebt entry is back to main's text without the NID note. All 14 savedata and neighbouring guest tests pass, and conventions are green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T04:18:25Z.
Progress report (
e51428b→80aa747)📉 System libraries: 87.9% (-0.02%, -1 reverted functions)
⚠️ 1 went back to stubs
sceSaveDataDirNameSearch2Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T08:14:19Z.
Tested on Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release: this PR merged onto
mainc080fc2d5(no conflict).guest_savedata_iconpasses with the PR (0.29 s).libSceSaveData.native/Export.cppandSaveData.hpptaken back tomain, it fails (load without an icon returns NOT_FOUND,icon lands at sce_sys/icon0.png inside ...), so the new checks fail without the change.Not tested: Linux, a console, a title run.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-13T08:27:59Z.
Linux test (Arch, GCC 16.2.1, Release), this PR's head merged alone onto
main7e181fcc3(clean merge):main'sguest_savedata_searchfails withsceSaveDataDirNameSearch2 not implemented. The branch still replacesmain's implementation inlibSceSaveData.native/Export.cppwith a stub (int APS5_VABI sceSaveDataDirNameSearch2() { NotImplemented_nid_no_patch(__func__); ...), which is also what the progress report's "1 went back to stubs" refers to. Keepingmain's version of that function should fix it.Imported from boykopovar/AnyPS5. Originally posted by AaravMehta-07 on 2026-10-13T09:12:55Z.
While preparing a separate savedata wildcard regression, I noticed this PR's current diff removes the trailing-
%handling indir_name_matchintroduced by merged #4504. That would regress patterns such asTRAIL%matchingTRAIL.My candidate keeps the existing
%/_semantics but replaces recursive matching: one search across three legal 31-character save names with%Arepeated 15 times followed byBexceeds the 30-second test limit on the baseline. Since both patches touch this helper, could you keep the matcher unchanged when rebasing this icon PR, so the independent wildcard fix can follow without conflict?This investigation and the proposed wildcard patch are AI-assisted. No commercial-title performance or PS5 hardware behavior is claimed.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T15:20:38Z.
Review: CHANGES_REQUESTED
Merged onto current
main, this branch still reverts code that is already merged:core/libs/prx/libSceSaveData.native/Export.cpp:901:sceSaveDataDirNameSearch2is turned back into aNotImplemented_nid_no_patchstub. This failsguest_savedata_search(as @nicolasfalesy found) and is the "went back to stubs" line in the progress report. Keepmain's implementation (dirNameSearch+ trace).Export.cpp:64: thewhile (*pattern == '%')tail indir_name_match(from #4504) is removed, soTRAIL%no longer matchesTRAIL(@AaravMehta-07). Keep the matcher as onmain.mainand have nothing to do with icons are deleted (Export.cpp:34,:69,:93,:771,:802,SaveData.hpp:10). Please drop those hunks; only comments the PR itself adds should go.The easiest way is to reset those hunks to
main(git checkout origin/main -- <file>then re-apply only the icon/RDONLY changes), rebase, and re-runguest_savedata_searchalong withguest_savedata_icon. The icon and read-only mount changes themselves were not reviewed in depth until the branch stops overwritingmain.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:39:27Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed