feat: PS4 NpTrophy, save data v1, NpWebApi offline and Limbo's other imports #9433
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9433"
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 Get-fix on 2026-10-21T21:51:06Z.
What
Part 5 of the PS4 Limbo stack, split out of #6977 (the whole stack is listed in #6978): the PS4 system-library calls Limbo (CUSA01664) makes outside the GPU.
trophy00.trp; trophy names are encrypted, so the calls that return them throw. Unlocks are kept per user and service label.sceSaveDataInitialize,sceSaveDataMount,sceSaveDataUmountand the save data memory calls (sceSaveDataSetupSaveDataMemory,sceSaveDataGetSaveDataMemory,sceSaveDataSetSaveDataMemory) wrap the native v2/v3 implementation.SIGNED_IN_USER_NOT_FOUND. Ids and errors follow shadPS4 (debt entry indocs/dev/debt/libSceNpWebApi.md).sceNpSetContentRestrictionis left to #9225, which implements it; Limbo calls it at start, so the integration branch #6977 carries #9225 next to this PR.libSceAjm.nativesources for PS4 titles, through oneadd_sce_ajm_libraryhelper shared by both.main's TUS library, and the Facebook dialog callsmaindoes not have yet) are exported and throwNotImplemented, so the title loads and any call to them is reported. NpCommon'ssceNpCmpNpIdjoinsmain's other pending NpCommon stubs inPendingExports.cpp, so this PR doesn't create theExport.cppthat #9037 and #9063 add.Tested
Windows 11, WinLibs GCC 15.2, on
maincecb540a6:guest_np_web_api(ids, the three error paths, double deletes, terminate),guest_np_trophy(a synthetictrophy00.trp: count, icons, unlock state, missing package), and the v1 save data memory calls inguest_savedata_ps4.agc_driver_sample_orderand its--grid-referenceand--recipe-depth-locationscases (also onmaind34da5d69),prx_thread_local_destructors(also with #9430 alone, which touches neither libc nor libkernel), andagc_driver_image_array_window_past_layer_limit, whichmaindoesn't compile with MinGW (alignas(65536)in the test).mainthe save data memory calls return NOT_INITIALIZED until save data is initialized, soguest_savedata_ps4now checks that for the v1 calls and initializes and terminates around them.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T21:51:57Z.
Progress report (
a6dcea9→f04d16d)📉 System libraries: 41.97% (-0.36%, +23 implemented, +126 declared functions)
✅ 23 implemented
sceNpTrophyCreateContextsceNpTrophyCreateHandlesceNpTrophyDestroyContextsceNpTrophyDestroyHandlesceNpTrophyGetGameIconsceNpTrophyGetGroupIconsceNpTrophyGetTrophyIconsceNpTrophyGetTrophyUnlockStatesceNpTrophyRegisterContextsceNpTrophyUnlockTrophysceNpWebApiCreateHandlesceNpWebApiCreatePushEventFiltersceNpWebApiCreateServicePushEventFiltersceNpWebApiDeleteHandlesceNpWebApiDeletePushEventFiltersceNpWebApiDeleteServicePushEventFiltersceNpWebApiInitializesceNpWebApiTerminatesceSaveDataGetSaveDataMemorysceSaveDataInitializesceSaveDataSetSaveDataMemorysceSaveDataSetupSaveDataMemorysceSaveDataUmount🆕 126 declared as stubs
sceAjmBatchJobControlBufferRasceAjmBatchJobRunSplitBufferRasceAjmBatchStartBuffersceGameCustomDataDialogGetResultsceGameCustomDataDialogInitializesceGameCustomDataDialogOpensceGameCustomDataDialogTerminatesceGameCustomDataDialogUpdateStatussceInvitationDialogGetResultsceInvitationDialogInitializesceInvitationDialogOpensceInvitationDialogTerminatesceInvitationDialogUpdateStatussceNpCmpNpIdsceNpInGameMessageCreateHandlesceNpInGameMessageDeleteHandlesceNpInGameMessageInitializesceNpInGameMessagePreparesceNpInGameMessageSendDatasceNpInGameMessageTerminatesceNpSnsFacebookCreateRequestsceNpSnsFacebookDeleteRequestsceNpSnsFacebookGetAccessTokensceNpMatching2ContextStartsceNpMatching2ContextStopsceNpMatching2CreateContextsceNpMatching2CreateJoinRoomsceNpMatching2DestroyContextsceNpMatching2GetRoomDataExternalListsceNpMatching2GetRoomDataInternalsceNpMatching2GetRoomMemberDataInternalsceNpMatching2GetServerIdsceNpMatching2GetUserInfoListsceNpMatching2GetWorldInfoListsceNpMatching2InitializesceNpMatching2JoinRoomsceNpMatching2KickoutRoomMembersceNpMatching2LeaveRoomsceNpMatching2RegisterContextCallbacksceNpMatching2RegisterRoomEventCallbacksceNpMatching2RegisterRoomMessageCallbacksceNpMatching2RegisterSignalingCallbacksceNpMatching2SearchRoomsceNpMatching2SendRoomChatMessagesceNpMatching2SendRoomMessagesceNpMatching2SetDefaultRequestOptParamsceNpMatching2SetRoomDataExternalsceNpMatching2SetRoomDataInternalsceNpMatching2SetRoomMemberDataInternalsceNpMatching2SetUserInfosceNpMatching2SignalingGetConnectionInfosceNpMatching2TerminatesceNpScoreAbortRequestsceNpScoreCreateNpTitleCtxsceNpScoreCreateRequestsceNpScoreDeleteNpTitleCtxsceNpScoreDeleteRequestsceNpScoreGetBoardInfosceNpScoreGetFriendsRankingsceNpScoreGetFriendsRankingAsyncsceNpScoreGetRankingByNpIdsceNpScoreGetRankingByNpIdAsyncsceNpScoreGetRankingByRangesceNpScoreGetRankingByRangeAsyncsceNpScorePollAsyncsceNpScoreRecordScoresceNpScoreRecordScoreAsyncsceNpSignalingActivateConnectionsceNpSignalingCreateContextsceNpSignalingDeleteContextsceNpSignalingGetConnectionInfosceNpSignalingInitializesceNpSignalingSetContextOptionsceNpSignalingTerminatesceNpSignalingTerminateConnectionsceNpSnsFacebookDialogGetResultsceNpSnsFacebookDialogInitializesceNpSnsFacebookDialogOpensceNpSnsFacebookDialogTerminatesceNpSnsFacebookDialogUpdateStatussceNpTrophyGetGameInfosceNpTrophyGetGroupInfosceNpTrophyGetTrophyInfosceNpTssGetDatasceNpTusCreateNpTitleCtxsceNpTusGetDatasceNpTusGetDataVUsersceNpTusGetMultiSlotVariablesceNpTusGetMultiSlotVariableVUsersceNpTusSetDatasceNpTusSetDataVUsersceNpTusSetMultiSlotVariablesceNpTusSetMultiSlotVariableVUsersceNpBandwidthTestInitStartsceNpLookupCreateRequestsceNpLookupCreateTitleCtxsceNpLookupDeleteRequestsceNpLookupDeleteTitleCtxsceNpLookupNpIdsceNpWordFilterAbortRequestImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T22:39:19Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceNpCommon/PendingExports.cppL117-142core/libs/prx/libSceNpCommon/PendingExports.cppL117-207Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAjm.native/CMakeLists.txtcore/libs/tests/GuestSaveDataPs4.cppcore/libs/prx/libSceSaveData.native/Export.cppcore/libs/prx/libSceNpManager/Export.cppcore/libs/prx/libSceNpManager/Export.cppcore/libs/prx/libSceSaveData.native/Export.cppcore/libs/tests/GuestSaveDataPs4.cppcore/libs/prx/libSceNpUtility/Export.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:45:39Z.
Review: CHANGES_REQUESTED
I found a persistence isolation bug in the new trophy implementation, along with a few checklist/update items:
sceNpTrophyRegisterContextbuilds the persisted unlock filename only from service label and user ID (_trophy/trophy%02u.%d). It does not include the running title identity. Service labels are not unique title IDs, so two games using the same label for the same user will read and write the same unlock set across launches. A trophy unlocked in one game can therefore appear unlocked in another. Please key this state by the current title's trophy identity as well as user/service label, and add a regression test that proves two titles sharing a service label remain isolated while each title still persists its own unlocks.This head is 534 commits behind the current
mainin the repository comparison. Please update it to currentmainand rerun the focused tests plus the convention, intake, and overlap checks; the checked-in test results are fromcecb540a6and do not validate the current merge base.The overlap report identifies open #9037 and #9063 in
libSceNpCommon/PendingExports.cpp. The checklist currently saysDepends on: none, but the repository rules require the authors to agree which overlapping change lands first and record that order. Please coordinate and update the checklist (or refresh the report if the overlap has been resolved).The PR's hosted conventions, eligibility, intake, labels, and progress-report checks pass. Its Linux, Windows, relinker, ASAN, register-context, and write-watch jobs are skipped. I did not run the author-reported test suite locally: there is no matching checkout/build in this workspace, and the reusable
/tmpbuild I found belongs to a different change. The reported Windows test and Limbo run remain author-provided evidence, not independent results from this review.