feat(libSceSaveData): answer sceSaveDataDirNameSearch2 #4220
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4220"
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 xXPBSXx on 2026-10-12T01:42:36Z.
What
sceSaveDataDirNameSearch2(PPSA30601, Resonance; next stop after #4101/#4207 and #3737, see #4067) throws as a stub declared by #3814. This PR makes it run the same search assceSaveDataDirNameSearchwith the same condition and result structures: filter by name pattern, sort key and order,hit_num/set_num, unknown sort key or order returns the parameter error.Origin: SharpEmu registers
sceSaveDataDirNameSearch2on the same implementation assceSaveDataDirNameSearchPs4/sceSaveDataDirNameSearch(same(cond, result)arguments). That is the only source I found for the signature, so the assumption that both calls take the same structures rests on it; what distinguishes the2variant on a console is unknown. Throwing (the current stub) is the alternative if a reviewer prefers that until a second source exists.Tested
guest_savedata_search(new checks: the second search returns all three saves, sorts by user parameter descending like the first and rejects an unknown sort key) and the other 12savedatatests pass; the new test aborts without the change because the stub throws.tools/check_conventions.py --base upstream/mainpasses.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T01:43:01Z.
Progress report (
5ccb19b→989504e)📈 System libraries: 87.4% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceSaveDataDirNameSearch2Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T15:27:01Z.
Rebase handoff — rebased onto current
main, authorship unchanged (staleness only — the rebase applied cleanly).Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesTo pick it up:
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T17:56:38Z.
Thanks for the rebase and the full-suite run. I had already rebased this branch onto
main2a5eca11cbefore I saw your handoff (head3cf45a101), so there is nothing to pick up. Your 957/957 on Linux is a useful second platform; on Windows the same state passesguest_savedata_search(1/1).AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:57:13Z.
Checked on Linux Release: build and the 30 tests of the touched directories pass, including
guest_savedata_search, which fails without the change (stub throws). The new rows pin the three-save result, descending user-parameter order and the parameter error for an unknown key; the TechnicalDebt entry records that SharpEmu is the only source for the shared structures. Merging.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:02:42Z.
Checked on Linux Release: build and the 30 tests of the touched directories pass, including
guest_savedata_search, which fails without the change (stub throws). The new rows pin the three-save result, descending user-parameter order and the parameter error for an unknown key; the TechnicalDebt entry records that SharpEmu is the only source for the shared structures. Merging.Rebased onto current
main(only conflict: the PPSA30601 line indocs/dev/debt/libSceJson2.md, where I dropped thesceSaveDataDirNameSearch2mention as before); build and the touched tests pass again.Imported from boykopovar/AnyPS5. Originally posted by krishalivaibhav on 2026-10-12T21:41:29Z.
Thanks for implementing this. We independently tested a minimal local
sceSaveDataDirNameSearch2forwarder to the existing native search implementation while bringing up Don't Starve Together (PPSA02070, 02.009.002) on an M2 Mac using Rosetta and MoltenVK. This was on an older runtime checkout, so it is corroborating evidence for the forwarding approach rather than a test of your exact merged revision.The focused
guest_savedata_searchtest passed with comparisons of Search1/Search2 counts and output at capacities 0/1/2, count-only queries, buffer canaries, long patterns and no matches, using an isolated temporary save directory. In the actual guest, the import bound successfully and Search2 returnedhit_num=1,set_num=1; subsequent save mount/unmount operations succeeded.The user observed a logo/audio during boot; gameplay has not been verified. Boot later stops in a separate graphics path because a vertex shader requests subgroup capability 61 on the Mac target. This report does not establish console ABI equivalence, PS5-specific Search2 differences, or correctness of the additional sorting behavior in your merged PR. No game files or save data are attached.