Commit Graph
107 Commits
Author SHA1 Message Date
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
slopgobblercobbler 5bb4711bb8 fix(libSceSaveData.native): return SAVE_DATA_ERROR_PARAMETER on null argument in sceSaveDataConvert 2026-10-27 08:57:14 +01:00
slopgobblercobbler edf98688c8 fix(libSceSaveData.native): validate null arguments in sceSaveDataDirNameSearchPs4 and sceSaveDataMount 2026-10-26 18:21:39 +01:00
Dean a0ca5bdc71 Merge pull request #10295 from al3w0f205/test/savedata-convert-null-struct-validation
test(libSceSaveData.native): cover null convert struct and directory name validation
2026-10-26 19:59:27 +13:00
Savvanis SpyrosandClaude Opus 5.5 7394d62549 Merge branch 'main' into fix/savedata-ps4-modules
main's canonical-header refactor (f38d29fd08) edited the old libSceSaveData and libSceSaveDataDialog sources this branch removes, and made EventFlag.cpp, libSceNpCommon's Runtime.cpp and GuestKernelErrors.cpp include the old SaveDataCore.hpp. Those three use nothing from it and build without it, so the include is dropped. SaveDataWriteReplacement.cpp takes main's canonical header and keeps only the native path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 23:06:41 +02:00
slopggobblercobbler81 9c232b38fe fix(savedata): validate null arguments in delete, search, and mount3 2026-10-25 20:07:59 +01:00
Dean 74dfabae2c Merge pull request #10294 from al3w0f205/test/savedata-delete-null-struct-validation
test(libSceSaveData.native): cover null delete struct and directory name validation
2026-10-26 05:36:42 +13:00
Dean Galvin f30a7444a8 test(savedata): unwind the null-input throw on Windows
guest_savedata_convert catches the runtime_error that the PRX raises for null arguments, so the target needs configure_windows_unwind like the other savedata targets that catch; without it the throw terminates the process on MinGW.
2026-10-26 03:24:03 +13:00
Dean Galvin f66b095ada test(savedata): unwind the null-input throw on Windows
guest_savedata_delete catches the runtime_error that the PRX raises for null arguments, so the target needs configure_windows_unwind like the other savedata targets that catch; without it the throw terminates the process on MinGW.
2026-10-26 03:24:02 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Savvanis SpyrosandClaude Opus 5.5 797e2b9733 Merge branch 'main' into fix/savedata-ps4-modules
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 16:33:37 +03:00
Dean 7c9d3a005e Merge pull request #8990 from voidlakhan/fix/savedata-null-argument-parameter-error
fix(savedata): validate backup and event result arguments
2026-10-24 01:29:00 +13:00
Dean dd7a2c964d Merge pull request #6313 from mazen320/fix/savedata-convert-completion-event
fix(savedata): queue conversion completion events
2026-10-23 19:28:07 +13:00
Dean da54c652e3 Merge pull request #9433 from Get-fix/ps4/limbo-libs
feat: PS4 NpTrophy, save data v1, NpWebApi offline and Limbo's other imports
2026-10-22 18:00:00 +13:00
Get-fix f04d16d702 feat: PS4 NpTrophy, save data v1, NpWebApi offline and Limbo's other imports
NpTrophy reads the trophy count and icons from the title's trophy
package (names are encrypted and stay not implemented), PS4 v1 save data
calls wrap the native v2/v3 ones, and NpWebApi library contexts, handles
and push event filters work offline (service filters fail without a
signed-in user). libSceAjm is built from the libSceAjm.native sources
for PS4 titles. Limbo's (CUSA01664) remaining PS4 imports, including the
synchronous PS4 TUS calls and the Facebook dialog calls next to the
existing libraries, are exported as not implemented.
2026-10-22 00:35:09 +03:00
boykopovar 07a181649c fix(savedata): restore cancellation and transfer preparation arguments 2026-10-21 21:53:23 +03:00
Maz f638400709 fix(savedata): queue conversion completion events 2026-10-21 18:07:54 +04:00
Savvanis Spyros 5a1ffa01b3 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/savedata-ps4-modules
# Conflicts:
#	core/libs/prx/libSceSaveData/Export.cpp
#	docs/dev/debt/libSceSaveData.md
2026-10-21 13:08:27 +03:00
lakhantheboss 2b1eb36139 fix(savedata): validate backup and event result arguments 2026-10-21 14:06:38 +05:30
Dean 1bcaa14234 Merge pull request #8307 from hypermoist/fix/libs-console-results-part2
fix(libs): return what the firmware returns from 31 more calls it does not implement
2026-10-21 20:57:00 +13:00
lakhantheboss d3542d5eed fix(savedata): return parameter errors for null arguments 2026-10-21 13:23:15 +05:30
Dean d243cc5cab Merge pull request #7960 from Lindamea1/fix/savedata-ps5-64k-blocks
fix(libSceSaveData.native): count PS5 save data in 64 KiB blocks, at most 16384
2026-10-21 04:08:02 +13:00
pushkarreddyy 3bb39053ae fix(savedata): return parameter error on null arguments in umount2, loadIcon and saveIcon 2026-10-20 12:54:28 +02:00
Adrià 4f99cbffd7 Merge pull request #7536 from voidlakhan/fix/savedata-setparam-null-arguments
fix(savedata): return parameter error on null arguments in setParam
2026-10-20 12:18:56 +02:00
hypermistandClaude Opus 5.5 db25758397 fix(libs): return what the firmware returns from 29 more calls it does not implement
The NetCtl ApRp calls, the SaveData debug calls, HttpDbgEnableProfile,
HttpDbgSetPrintf, PadEnableExtensionPort and VideoRecording Init, Term
and SendCommand return 0; ImeForTestFunction returns 0x80BC00FF; the Hmd
distortion work memory align and size are 0x400 and 0x20000 and
DistortionGetCompoundEyeCorrectionCommand returns 0x81110009;
AjmInstanceCodecType returns the instance id shifted right by 14.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:38:57 +13:00
juanpimg 2f0ed638dc feat(prx): declare the missing PS5 3.20 system exports
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function no library provides fails to load with an unresolved import. The
PS5 3.20 export inventory lists 193 such exports across 37 PS5 system
libraries AnyPS5 implements but does not provide.

Declare them as throwing stubs so those titles load and reach their next
blocker. Each declaration calls NotImplemented_nid_no_patch and returns 0;
none of them implements the function. Declarations with a credible
prototype use it and cite the source with a pinned commit, and the rest
are declared without parameters, which resolves the import without making
an ABI claim. The technical-debt files record the limitation per library.

libSceMbus and libSceSystemService are left out because pull request #7821
declares them. libSceAgc is left out because its exports are versioned, so
the 3.20 NID names a different symbol from the one AnyPS5 ships.
libSceAvPlayer.native is left out because it compiles libSceAvPlayer's
Export.cpp.

Names and NIDs come from the PS5 3.20 export inventory at
https://github.com/DNNDHH/PS5-3.20_Libs/tree/b2a77c09cd71c01f34c790cfbe98c751a13262ad
2026-10-19 23:16:55 +02:00
Savvanis SpyrosandClaude Opus 5.5 0e88700965 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/savedata-ps4-modules
Keep SaveDataCore.hpp deleted: main's RemoveTree change to it (a96833682) also applies to the .native Export.cpp this branch builds from, which merged cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 20:53:00 +03:00
Lindamea1andClaude Opus 5.5 6206c230c4 fix(libSceSaveData.native): count PS5 save data in 64 KiB blocks, at most 16384
The PS5 references count save data differently from the PS4: SharpEmu
uses a 64 KiB block, and SharpEmu and KytyPS5 allow 48 to 16384 blocks
per save, which at 64 KiB a block is 3 MiB to 1 GiB, the PS4's byte
range. The module used the PS4 values, 32 KiB blocks and a 32768-block
maximum. At 64 KiB a block, sceSaveDataDirNameSearch and
sceSaveDataGetMountInfo therefore counted up to twice the blocks a
save's files use, and a save without a recorded size reported 32768
blocks, which is 2 GiB.

The search test now expects 64 KiB blocks and the 16384 maximum, and
the block accounting gets its own technical debt entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:49:19 +01:00
Savvanis Spyros fda475e541 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/savedata-ps4-modules
# Conflicts:
#	core/libs/CMakeLists.txt
2026-10-19 17:33:25 +03:00
UAQ Taxi a968336825 fix(libc): remove Windows trees without the remove_all symlink hang
MinGW libstdc++ up to GCC 16 does not treat a reparse point as a link in
std::filesystem::remove_all, so a host tree that holds a symlink is walked
through the link and never returns. Add RemoveTree, which removes the tree
itself on Windows, and use it where save data, app content and the shader
disk cache removed host trees. The libstdc++ fix is in GCC 17 (88856ad855ae).
2026-10-19 14:49:49 +02:00
Adrià db73af3506 Merge pull request #6831 from ErenYeager1836/fix/savedata-sync-memory-init-check
fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory
2026-10-19 13:43:56 +02:00
Adrià fb106a7e9a Merge pull request #6724 from Ondra97/codex/fix-savedata-mount-identity
fix(savedata): prevent duplicate mounts of one backing directory
2026-10-19 12:09:57 +02:00
Savvanis SpyrosandClaude Opus 5.5 4e8bd1609c fix(savedata): build libSceSaveData and libSceSaveDataDialog from the native sources
PS4 titles import save data from libSceSaveData and libSceSaveDataDialog,
and a converted title loads exactly the modules its DT_NEEDED names. Those
two libraries were separate, older implementations that export only 9 and 8
functions, while libSceSaveData.native and libSceSaveDataDialog.native carry
sceSaveDataDelete, sceSaveDataDirNameSearch, sceSaveDataSetParam,
sceSaveDataSaveIcon, sceSaveDataDialogUpdateStatus and the rest. A PS4 title
importing any of those failed at startup with unresolved imports.

Both plain libraries are now built from the native sources, the way
libSceNgs2 is built from libSceNgs2.native, and the old implementation and
its test variant are removed. The earlier implementation's save-data memory
and mount alias files are not read; that is recorded in the debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 10:10:50 +03:00
Adrià 7f596df48d Merge pull request #6550 from orishamir/fix/savedata-memory-journal
fix(libSceSaveData.native): write only the changed bytes of save-data memory
2026-10-19 08:39:54 +02:00
lakhantheboss a605f94732 fix(savedata): return parameter error on null arguments in setParam 2026-10-18 18:06:26 +05:30
Nithishvelan M 738eff083c fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory 2026-10-18 09:42:13 +05:30
Dean 6447ed1ed7 Merge pull request #7241 from ErenYeager1836/fix/savedata-native-transaction-resource-validation
fix(libSceSaveData.native): validate initialization and parameters in transaction resource lifecycle
2026-10-18 10:19:36 +13:00
Nithishvelan M 87f2e7a88c fix(libSceSaveData.native): drop size 0 and resource validation per review 2026-10-18 01:05:22 +05:30
Nithishvelan M c43c931005 fix(libSceSaveData.native): validate initialization and parameters in transaction resource lifecycle 2026-10-18 00:19:48 +05:30
lakhantheboss 0936fe9b53 fix(savedata): return parameter error on null arguments in getMountInfo and getParam 2026-10-17 19:07:36 +05:30
Ondra97 37e62ddb3b fix(savedata): skip identity comparisons for missing paths 2026-10-16 14:16:07 +02:00
Ondra97 fcf65455f5 fix(savedata): prevent duplicate mounts of one backing directory 2026-10-16 08:53:05 +02:00
Ori ShamirandClaude Opus 5.5 f6fd60c6ca fix(libSceSaveData.native): write only the changed bytes of save-data memory
sceSaveDataSetSaveDataMemory2 read the whole slot file, patched it and
replaced it through a temporary file on every call, so each call cost a
full rewrite of the slot (up to 32 MiB). The changed ranges now go to a
small journal that is staged through the slot's temporary file and
renamed into place, then written into the slot file in place, and the
journal is removed. A journal left by an interrupted call is replayed by
the next setup, get, set or sync of that slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 22:43:50 +03:00
Adrià 0e6a5e7a5c Merge pull request #5690 from SandstromPL/fix/savedata-mount3-invalid-dir-name
fix(savedata): return a parameter error from sceSaveDataMount3 for an invalid directory name
2026-10-15 17:04:04 +02:00
Dean 95945006ec Merge pull request #4629 from mugurc/fix/libcxx-portability
fix(libs): build with libc++
2026-10-15 10:46:05 +13:00
Adrià Franch 31e53e53d7 fix(libSceSaveData.native): drop the duplicate APS5_EXPORT of the real name 2026-10-14 19:17:47 +02:00
Nicolas FalesyandClaude Opus 5.5 204c2ac4af refactor(libSceSaveData.native): name sceSaveDataPrepareForTransferring
The NID RvID8BVeg+g, declared as sceSaveDataUnknown_RvID8BVeg for
Minecraft (PPSA17221), hashes to sceSaveDataPrepareForTransferring. The
name is not in aerolib; it was found by combining words from the
libSceSaveData names that are. Behaviour is unchanged: it still throws,
now naming the real function.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017WeVmjnnPPKdxVTpr2Vjtw
2026-10-14 19:17:41 +02:00
SandstromPLandClaude Opus 5.5 c73e9720ae fix(savedata): return a parameter error from sceSaveDataMount3 for an invalid directory name
An unterminated or empty directory name, "." or "..", or a name
containing "/", "\" or ":" now returns SAVE_DATA_ERROR_PARAMETER and
leaves the mount result unchanged. The SDK 12.000 reference lists that
code for an invalid parameter of sceSaveDataMount3, KytyPS5's
SaveDataMount3 returns it for an invalid name, and sceSaveDataDelete
and sceSaveDataConvert already return it here for the same check.
It threw before, which stopped Minecraft Preview (PPSA19639) on
entering a world.

The Mount3 trace now prints at most the 32 bytes of the directory name
and the 16 bytes of the mount point, since both can be unterminated
when the mount fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 12:19:09 +05:30
Dean a7836b1495 Merge pull request #5094 from bubblegg/fix/savedata-save-size
fix(savedata): report a save's size as the mount that created it gave
2026-10-14 15:47:32 +13:00
Dean a21d73733c Merge pull request #5133 from SandstromPL/fix/savedata-search-other-title
fix(savedata): return no saves for a search with another title's ID
2026-10-14 15:41:58 +13:00