Commit Graph
96 Commits
Author SHA1 Message Date
Yunus Shaikh 4de3c5975a Merge #12748's main merge into feat/libSceSaveData-event-callbacks 2026-11-02 08:32:28 -08:00
Dean Galvin 02af078a35 Merge commit 'b28bb772177768f99874ca38f6252cd0139acf2a' into HEAD
# Conflicts:
#	docs/dev/debt/libSceSaveData.native.md
2026-11-03 05:19:45 +13:00
Dean 662fac8333 Merge pull request #12853 from slopgobblercobbler/fix/savedata-mount-point-termination
fix(libSceSaveData.native): validate mount point termination in mount operations
2026-11-03 05:14:36 +13:00
Dean 4d73869126 Merge pull request #12846 from slopgobblercobbler/fix/savedata-memory-offset-bounds
test(libSceSaveData.native): cover offset boundaries, null buffers, and uninitialized access in save data memory
2026-11-03 05:14:29 +13:00
Alberto Marchetti afddb2c442 docs(libSceSaveData): survey the pending exports across citable reimplementations 2026-11-02 13:42:41 +01:00
Dean Galvin 23493d9ca3 Merge commit '24238c4cb1a58e4ddb0596e68dc072e715f9bb17' into HEAD
# Conflicts:
#	docs/dev/debt/libSceSaveData.native.md

The pending declarations line keeps main's sceSaveDataGetProgress split and drops the three names this branch implements (sceSaveDataCheckBackupData, sceSaveDataRestoreBackupData, sceSaveDataUmountWithBackup).
2026-11-03 01:02:45 +13:00
Yunus Shaikh df0b6d335c Merge main into feat/libSceSaveData-event-callbacks
# Conflicts:
#	docs/dev/debt/libSceSaveData.native.md
2026-11-02 03:03:25 -08:00
Dean cb0f84e398 Merge pull request #10674 from MarcZX10/marc/signatures-libscesavedata
feat(libSceSaveData): declare sceSaveDataGetProgress with its known signature
2026-11-02 23:23:40 +13:00
Yunus Shaikh 62ab6243cb Merge feat/savedata-backup-progress-sourced into feat/libSceSaveData-event-callbacks 2026-11-01 06:54:26 -08:00
Dean Galvin 9b9e850d90 Merge commit 'd8b60b46ed425b117b6fae18900fe6ab81ed6661' into HEAD
# Conflicts:
#	core/libs/prx/libSceSaveData.native/Export.cpp
2026-11-02 03:23:34 +13:00
Dean d94fad17de Merge pull request #8285 from DealPotato/feat/savedata-mount2
feat(savedata): add sceSaveDataMount2
2026-11-02 03:22:25 +13:00
slopgobblercobbler 6f7f6dc1b6 fix(libSceSaveData.native): validate mount point termination in mount operations 2026-11-01 15:18:39 +01:00
MarcZX10 2880d7b8f6 docs(libSceSaveData): record the unmeasured signature of sceSaveDataGetProgress 2026-10-31 22:48:36 +00:00
Adrià 2147af70b0 Merge pull request #13690 from xXPBSXx/docs/savedata-umount-unmounted
docs(libSceSaveData): name what the emulators do when a mount point is not mounted
2026-10-31 20:08:37 +01:00
slopgobblercobbler 20f7abb088 test(libSceSaveData.native): cover offset boundaries, null buffers, and uninitialized access in save data memory 2026-10-31 19:56:37 +01:00
MarcZX10 5b7ba8484a Merge remote-tracking branch 'upstream/main' into feat/host-free-space
# Conflicts:
#	core/libs/prx/libSceSaveData.native/Export.cpp
2026-10-31 00:26:47 +00:00
Yunus Shaikh 36b5e96eb1 Merge feat/savedata-backup-progress-sourced into feat/libSceSaveData-event-callbacks 2026-10-30 23:09:35 +00:00
Yunus Shaikh 842f75d7e0 Merge main into feat/savedata-backup-progress-sourced
JJenkx's #13324 gives isMountedDirectory an std::error_code parameter.
The merge passes one in checkBackupData and restoreBackupData and
returns SAVE_DATA_ERROR_INTERNAL on a host error, as main's callers do.

GuestSaveDataMountStatus.cpp: CheckBackups writes param.json where
ResolvePath_nid_no_patch puts /app0/sce_sys/param.json, not under the
working directory. #13324's CheckHostMountFailures now resolves the
first guest path from its mount-host-failures subdirectory, so /app0
maps there, and checkBackupData didn't find the title's param.json.
2026-10-30 23:09:34 +00:00
xXPBSXxandClaude Sonnet 5.5 b9e68d3203 docs(libSceSaveData): name what the emulators do when a mount point is not mounted
sceSaveDataUmount2 returns NOT_MOUNTED for a mount point that is not mounted.
No console run has checked it, and KytyPS5's sceSaveDataUmount2, shadPS4's PS4
sceSaveDataUmount and fpPS4's PS4 sceSaveDataUmount do not agree on the code, so
the debt file now says so.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 23:11:09 +01:00
Adrià 6472c708ae Merge pull request #13324 from JJenkx/fix/savedata-mount-host-failure
fix(savedata): keep failed host mounts unpublished
2026-10-30 21:46:41 +01:00
Yunus Shaikh 0d0abe09c1 fix(libSceSaveData): start the event delivery thread at the first registration
sceSaveDataInitialize3 started the callback delivery thread for every
title that initializes save data, though nearly none register a
callback, and could throw there if scePthreadCreate failed. The thread
now starts at the first successful sceSaveDataRegisterEventCallback of
an initialization, under the calling, g_slots_mutex and callbacks.mutex
locks that registration already takes, so a title that never registers
gets no thread and sceSaveDataInitialize3 is again only the count.
A replacing registration, one from inside a callback and one after an
unregister reuse the running thread; a refused one starts nothing.

The last sceSaveDataTerminate still takes the worker out under
g_slots_mutex and joins it outside the lock, and only when one was
started, so a session that registers between that terminate's detach
and its join starts its own thread.

The tests run two sessions with no registration, and on Linux count the
process's threads to check that Initialize3 and a refused registration
start none, that the first registration starts one and later ones reuse
it, and that the final terminate joins it.
2026-10-30 19:39:06 +00:00
MarcZX10 5576165355 docs(debt): record the unmeasured 64 KiB block of the save room figures 2026-10-30 18:48:57 +00:00
MarcZX10 e53c545626 docs(debt): record the unmeasured free-block bound of ANYPS5_FREE_SPACE 2026-10-30 18:48:57 +00:00
MarcZX10 bdb1acd130 docs(debt): record the unmeasured save creation refusal of ANYPS5_FREE_SPACE 2026-10-30 18:48:57 +00:00
Adrià f91137142e Merge pull request #13027 from Celegans12/feat/savedata-inventory-exports-20261030
feat(savedata): add missing cloud and sync inventory exports
2026-10-30 13:45:45 +01:00
JJenkx 0c110bdf8e fix(savedata): keep failed host mounts unpublished 2026-10-30 08:12:24 -04:00
Yunus Shaikh 629477b800 feat(libSceSaveData): deliver backup completions to a registered event callback
sceSaveDataRegisterEventCallback and sceSaveDataUnregisterEventCallback
were parameterless declarations that threw. They now follow shadPS4
#5226: registering before initialization is NOT_INITIALIZED, a null
callback is PARAMETER, a second registration replaces the callback and
its userdata, and unregistering needs no initialization.

Every backup completion that queues an event for
sceSaveDataGetEventResult, type 2 from sceSaveDataBackup and type 1 from
sceSaveDataUmountWithBackup, is queued for polling first and then handed
to the callback registered at that moment. A library thread delivers it:
sceSaveDataInitialize3 starts it with scePthreadCreate, as
libSceUsbStorage starts its monitor, so the callback runs on a guest
thread, and the last sceSaveDataTerminate joins it. Unregistering waits
for a running callback and drops completions not yet delivered, and a
terminate from inside the callback returns BUSY instead of joining its
own thread, as shadPS4 does.

guest_savedata_event_callback covers the errors, both event types, the
delivering thread, unregistration, replacement, a terminate from inside
the callback and an idle terminate followed by a restart.
2026-10-30 09:57:33 +00:00
Yunus Shaikh 46c8ff27a6 Merge main into feat/savedata-backup-progress-sourced
# Conflicts:
#	core/libs/tests/GuestSaveDataMountStatus.cpp
#	docs/dev/debt/libSceSaveData.native.md
2026-10-29 22:05:12 -07:00
Adrià 0d62a3e0db Merge pull request #12699 from SnekPolylepis/feat/savedata-mounted-count-and-lifecycle
feat(libSceSaveData): add provisional abort and clear progress stubs
2026-10-30 05:51:21 +01:00
Yunus Shaikh 22291cddd8 Merge main into feat/savedata-backup-progress-sourced
# Conflicts:
#	core/libs/tests/GuestSaveDataMountStatus.cpp
#	docs/dev/debt/libSceSaveData.native.md
2026-10-29 18:59:33 -07:00
Adrià f67988f8e8 Merge pull request #12644 from slopgobblercobbler/fix/savedata-backup-dir-name-validation
fix(libSceSaveData.native): validate directory name in sceSaveDataBackup
2026-10-30 02:52:13 +01:00
Codex 2299b471cb feat(savedata): retain seven inventory exports within reviewed scope 2026-10-30 03:22:06 +02:00
Codex d058e59ffd feat(savedata): add missing cloud and sync inventory exports 2026-10-30 00:20:59 +02:00
SnekPolylepis e64a9b14ef Merge main into SaveData lifecycle branch 2026-10-29 09:54:32 -05:00
SnekPolylepis 8436d54350 fix(savedata): leave mounted count unimplemented 2026-10-29 09:52:50 -05:00
Yunus Shaikh bb346f7cad docs(libSceSaveData): record a PS4 console run of the backup calls
ntamas94 ran sceSaveDataCheckBackupData, sceSaveDataRestoreBackupData
and sceSaveDataUmountWithBackup on a PS4 Pro with firmware 10.71's
system libSceSaveData.sprx. The console agrees with this library on
every case it covers. Two of its rows go in the debt file: another
title's titleId returns NOT_FOUND, and sceSaveDataDelete drops the
save's backup as this library does, which the entry called unknown.

The run also shows the check returning PARAMETER for a param buffer
filled with 0xAA, and 0 for a zeroed or null one. Which bytes the
console checks was not measured, so the check is not changed; a new
entry states the measured cases and that the byte set is unknown.
2026-10-29 07:41:24 -07:00
Adrià 5a88858805 Merge pull request #11720 from ionut27001/fix/savedata-cancel-not-initialized
fix(libSceSaveData.native): answer sceSaveDataCancel before initialization as measured in a PS5 payload
2026-10-29 12:57:24 +01:00
slopgobblercobbler 43dc8a75c7 fix(libSceSaveData.native): validate directory name in sceSaveDataBackup 2026-10-29 11:34:09 +01:00
Yunus Shaikh b17c475af5 docs(libSceSaveData): say how a failed restore or a crash leaves the save
Three entries in the libSceSaveData.native debt file: a failed restore
leaves the live save as it was, and where a crash during a restore or a
backup leaves the save and its backup, since neither is recovered at the
next start; and that on Windows directory entries cannot be flushed, so
crash safety there rests on NTFS journaling and is not shown.
2026-10-29 10:18:24 +00:00
Zain 7211bfff43 docs(savedata): clarify provisional lifecycle behavior 2026-10-28 22:30:25 -05:00
Zain 7016a894f7 feat(libSceSaveData): implement sceSaveDataGetMountedSaveDataCount, sceSaveDataAbort, and sceSaveDataClearProgress 2026-10-28 21:39:18 -05:00
xXPBSXxandClaude Opus 5.5 0ea07e55b2 docs(debt): count how local titles pair sceSaveDataInitialize3 and Terminate
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 22:58:30 +01:00
Yunus Shaikh 5fed277cf2 feat(libSceSaveData): implement sceSaveDataCheckBackupData, sceSaveDataRestoreBackupData and sceSaveDataUmountWithBackup 2026-10-28 21:18:18 +00:00
ionut27001 a21f985dcf fix(libSceSaveData.native): answer sceSaveDataCancel before initialization as measured in a PS5 payload 2026-10-28 15:37:18 +01:00
Adrià 3b951bc4fa Merge pull request #12020 from milescoviello/docs/savedata-transaction-sizes
docs(libSceSaveData): record the sizes titles pass to sceSaveDataCreateTransactionResource
2026-10-28 14:47:00 +01:00
DealPotato e3022ccacb Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/savedata-mount2
# Conflicts:
#	docs/dev/debt/libSceSaveData.native.md
2026-10-28 11:47:37 +03:00
Dean 1068cd6b76 Merge pull request #7780 from savvaniss/fix/savedata-ps4-modules
fix(savedata): build libSceSaveData and libSceSaveDataDialog from the native sources
2026-10-28 13:48:05 +13:00
milescovielloandClaude Opus 5.5 ef0bfaa5f2 docs(libSceSaveData): record the sizes titles pass to sceSaveDataCreateTransactionResource
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 17:14:42 +00:00
Adrià 637522b6bf Merge pull request #11083 from slopgobblercobbler/fix/savedata-convert-null-parameter-validation
fix(libSceSaveData.native): return SAVE_DATA_ERROR_PARAMETER on null argument in sceSaveDataConvert
2026-10-27 16:21:11 +01:00
Adrià ca0e9557aa Merge pull request #11697 from milescoviello/docs/savedata-prepare-silent
docs(libSceSaveData.native): list sceSaveDataPrepare and sceSaveDataCommit as silent stubs and note how six titles use their results
2026-10-27 12:36:14 +01:00