6.0 KiB
6.0 KiB
libSceSaveData.native technical debt
Unknown function info
- sceSaveDataUnknown_RvID8BVeg (libSceSaveData.native, NID
RvID8BVeg+g) - declared without parameters as a throwing stub; Minecraft (PPSA17221) imports it besidesceSaveDataTransferringMountPs4andsceSaveDataDirNameSearchPs4and fails to load without it. No name in aerolib or among the PS4-migration variants tried withtools/nid_names.pyhashes to it. - sceSaveDataTransferringMountPs4, sceSaveDataDirNameSearchPs4 (libSceSaveData.native) - arguments assumed to be those of
sceSaveDataTransferringMountandsceSaveDataDirNameSearch: KytyPS5 binds both NIDs to the PS5 functions, and prosper captured the same result layout on a title for the search. There is no PS4 save area, so the mount returnsNOT_FOUNDand the search reports zero hits - sceSaveDataConvert (libSceSaveData.native) - the parameter block (user id at
+0x00,SceSaveDataDirNamepointer at+0x08, 48 opaque bytes after it) is read from PPSA28416's single call, not confirmed by KytyPS5, shadPS4, fpPS4 or SharpProspero, which have no body for it. Host saves have no size limit, so an existing save returnsSCE_OKwithout touching its files and no event is queued; what the console returns for a save that is mounted, already converted or needs no conversion is unknown. The directory name is validated assceSaveDataDeletedoes - sceSaveDataGetConvertProgress (libSceSaveData.native) - imported by PPSA16064; signature and error codes follow the SDK 12.000 reference (
float* progress). Save data conversion on host filesystems completes synchronously, so the progress query returnsSAVE_DATA_OKwith the last conversion's progress (0.0fbefore any conversion or when conversion fails,1.0fafter successful conversion),SAVE_DATA_ERROR_PARAMETERifprogressis null, orSAVE_DATA_ERROR_NOT_INITIALIZEDwhen the library is uninitialized; intermediate asynchronous conversion progress on console is unmeasured - sceSaveDataCancel (libSceSaveData.native) - imported by PPSA23126, which fails to load without it; added without an implementation because its signature is unknown. Every save data call here finishes before it returns, so nothing is ever in flight to cancel, but what the console returns then is unknown
- sceSaveDataDirNameSearch (libSceSaveData.native) - the sort keys (0 directory name, 1 user parameter, 2 blocks, 3 modification time, 5 free blocks) and orders (0 ascending, 1 descending) follow shadPS4, not a hardware run; saves with equal keys keep directory-name order before a descending reverse. A save's size is the
blocksof thesceSaveDataMount3call 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 reportsSAVE_DATA_BLOCKS_MAX. The search infos (blocks, free blocks and 32 reserved bytes per returned name, following shadPS4'sOrbisSaveDataSearchInfo),sceSaveDataGetMountInfoand the two block keys use that size and, as free, what the save's files leave of it, each file rounded up to 32 KiB blocks; the console's file system overhead is not known and not counted. Keys other than 0, 1, 2, 3 and 5 (including 4) and orders above 1 returnSCE_SAVE_DATA_ERROR_PARAMETER; shadPS4 and KytyPS5 only reject keys above 5, so key 4 is rejected here because no source names it. In the directory name pattern%matches any run of characters, none included, and_exactly one, as the comments of shadPS4's matcher describe; also not confirmed on hardware - sceSaveDataInitialize3 (libSceSaveData.native) - a repeated initialize succeeds: PPSA12544's executable and its Unity SaveData plugin both initialize, and the plugin fails on any error. Initializations are counted and
sceSaveDataTerminateends the session at the last one; how the console pairs them is unknown
Functional
- sceSaveDataDirNameSearch, sceSaveDataDirNameSearch2 (libSceSaveData.native) - only the running title's saves are kept, so a search with another title's
title_idreports zero hits, as shadPS4 and KytyPS5 do when that title has no save directory; what a console returns for another title's saves is not verified. The running title's ID is thetitleIdin itsparam.json - sceSaveDataDirNameSearch2 (libSceSaveData.native) runs the same search as
sceSaveDataDirNameSearchwith the same condition and result structures, as SharpEmu does, its only source; what distinguishes it on the console is unknown. - sceSaveDataMount3 (libSceSaveData.native) - a failed mount (BUSY, EXISTS, NOT_FOUND, MOUNT_FULL) leaves the result as it was, as shadPS4 does; not checked on hardware. Animal Well (PPSA22520) depends on it: it checks for its save with a mount it never unmounts, then saves with a second mount of the same directory, ignores its BUSY and keeps using the first mount point for
sceSaveDataPrepare, its file andsceSaveDataUmount2