Files
AnyPS5/docs/dev/debt/libSceNpTrophy.md
T
Adrià d2863131ef Merge pull request #13217 from kyon-eth/feat/np-trophy-320-exports
feat(libSceNpTrophy): declare 6 callable exports
2026-10-30 23:49:17 +01:00

40 lines
11 KiB
Markdown

# libSceNpTrophy technical debt
### Silent stubs
- [sceNpTrophySystemDbgCtl, sceNpTrophySystemGetDbgParam, sceNpTrophySystemGetDbgParamInt, sceNpTrophySystemSetDbgParam and sceNpTrophySystemSetDbgParamInt](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - return `0x80551692` and do nothing else, which is all firmware 13.42's module does: it makes no calls and writes no memory for null, small or all-ones arguments ([run in an emulator](https://github.com/boykopovar/AnyPS5/pull/9874#issuecomment-6401358829)). The parameter lists stay unknown and unused
### Unknown function info
- [sceNpTrophyRegisterContext, sceNpTrophyGetTrophyUnlockState, sceNpTrophyUnlockTrophy](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy, PS4) - the trophy definitions in `TROPCONF.ESFM` are encrypted, so the trophy count is the number of consecutive `TROPnnn.PNG` icons in the title's `/app0/sce_sys/trophy/trophyNN.trp`. Unlocks are kept per user and service label in `_trophy/trophyNN.<user id>` under the working directory, no platinum trophy is reported (`platinumId` is -1), and a locked trophy's icon fails with `TROPHY_NOT_UNLOCKED`. None of it is checked on a console.
- [sceNpTrophyAbortHandle](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy, PS4) - measured on a PS4 Pro (firmware 10.71): after an abort, `sceNpTrophyGetTrophyUnlockState` and `sceNpTrophyGetGameIcon` through that handle answer 0x80551607, before the not-registered check, and `sceNpTrophyRegisterContext` answers 0x80551607 before the missing trophy package (0x80551626 for a live handle); aborting again answers 0. The other calls that take the handle are assumed to answer 0x80551607 the same way, as `libSceNpTrophy.sprx` of firmware 10.71 maps the service's abort answer to it on the shared request path. On the console `sceNpTrophyRegisterContext` checks the process's NP title id before it reaches the service, so a title without one gets the NP title id error instead; AnyPS5 has no NP title id and does not model that step
- [sceNpTrophyCaptureScreenshot, sceNpTrophyConfigGetTrophyDetails, sceNpTrophyConfigGetTrophyFlagArray, sceNpTrophyConfigGetTrophyGroupArray, sceNpTrophyConfigGetTrophyGroupDetails, sceNpTrophyConfigGetTrophySetInfo, sceNpTrophyConfigGetTrophySetInfoInGroup, sceNpTrophyConfigGetTrophySetVersion, sceNpTrophyConfigGetTrophyTitleDetails, sceNpTrophyConfigHasGroupFeature, sceNpTrophyGroupArrayGetNum, sceNpTrophyIntAbortHandle, sceNpTrophyIntCheckNetSyncTitles, sceNpTrophyIntCreateHandle](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophyIntDestroyHandle, sceNpTrophyIntGetLocalTrophySummary, sceNpTrophyIntGetProgress, sceNpTrophyIntGetRunningTitle, sceNpTrophyIntGetRunningTitles, sceNpTrophyIntGetTrpIconByUri, sceNpTrophyIntNetSyncTitle, sceNpTrophyIntNetSyncTitles, sceNpTrophyNumInfoGetTotal, sceNpTrophySetInfoGetTrophyFlagArray, sceNpTrophySetInfoGetTrophyNum, sceNpTrophyShowTrophyList, sceNpTrophySystemAbortHandle, sceNpTrophySystemBuildGroupIconUri, sceNpTrophySystemBuildNetTrophyIconUri, sceNpTrophySystemBuildTitleIconUri](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophySystemBuildTrophyIconUri, sceNpTrophySystemCheckCallback, sceNpTrophySystemCheckNetSyncTitles, sceNpTrophySystemCheckRecoveryRequired, sceNpTrophySystemCloseStorage, sceNpTrophySystemCreateContext, sceNpTrophySystemCreateHandle, sceNpTrophySystemDebugLockTrophy, sceNpTrophySystemDebugUnlockTrophy, sceNpTrophySystemDestroyContext, sceNpTrophySystemDestroyHandle, sceNpTrophySystemDestroyTrophyConfig](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophySystemGetGroupIcon, sceNpTrophySystemGetLocalTrophySummary, sceNpTrophySystemGetNextTitleFileEntryStatus, sceNpTrophySystemGetProgress, sceNpTrophySystemGetTitleFileStatus, sceNpTrophySystemGetTitleIcon, sceNpTrophySystemGetTitleSyncStatus, sceNpTrophySystemGetTrophyConfig, sceNpTrophySystemGetTrophyData, sceNpTrophySystemGetTrophyGroupData, sceNpTrophySystemGetTrophyIcon, sceNpTrophySystemGetTrophyTitleData, sceNpTrophySystemGetUserFileInfo, sceNpTrophySystemGetUserFileStatus](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophySystemIsServerAvailable, sceNpTrophySystemNetSyncTitle, sceNpTrophySystemNetSyncTitles, sceNpTrophySystemOpenStorage, sceNpTrophySystemPerformRecovery, sceNpTrophySystemRegisterTitleSyncedCallback, sceNpTrophySystemRegisterTitleUpdateCallback, sceNpTrophySystemRemoveAll, sceNpTrophySystemRemoveTitleData, sceNpTrophySystemRemoveUserData, sceNpTrophySystemUnregisterTitleSyncedCallback, sceNpTrophySystemUnregisterTitleUpdateCallback](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophySystemWrapDebugLockTrophy, sceNpTrophySystemWrapDebugUnlockTrophy, sceNpTrophySystemWrapGetGroupDetails, sceNpTrophySystemWrapGetPlayedTrophyTitles, sceNpTrophySystemWrapGetTitleDetails, sceNpTrophySystemWrapGetTrophyDetailsArray, sceNpTrophySystemWrapGetTrophyTitleIdsByNpTitleId, sceNpTrophySystemWrapRemoveAll, sceNpTrophySystemWrapRemoveTitleData, sceNpTrophySystemWrapRemoveUserData](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpTrophy.c), but no credible prototypes were found. The declarations have no parameters solely to resolve known imports; this is not an ABI claim and callers must not call them until signatures are verified
- [sceNpTrophySystemWrapGetGroupData, sceNpTrophySystemWrapGetGroupDataArray, sceNpTrophySystemWrapGetGroupDetailsArray, sceNpTrophySystemWrapGetTitleData, sceNpTrophySystemWrapGetTrophyData, sceNpTrophySystemWrapGetTrophyDataArray, sceNpTrophySystemWrapGetTrophyDetails](../../../core/libs/prx/libSceNpTrophy/Export.cpp) have unknown signatures and behaviour. The parameterless `int` declarations are import-resolution placeholders, not confirmed ABI signatures, and throw through `NotImplemented_nid_no_patch`. Only the names and NIDs are established by the [13.60 export inventory](https://github.com/xdCloudy/PS5-13.60-Function-Stub-Library/blob/bfec40deb4c47a17d7603ee2bc79aa6862c0c56b/data/firmware-13.60/libscenptrophy-838da4c283.jsonl).
### Functional
- [sceNpTrophyGetGameInfo](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - the trophy configuration `TROPCONF.ESFM` is encrypted and not read, so the game details report the trophy count taken from the `TROPnnn.PNG` icons and the group count taken from the `GRnnn.PNG` icons of the trophy package; the per-grade counts are 0, the title and description are empty, and the progress percentage is unlocked trophies over all trophies instead of the console's grade-weighted points
- [sceNpTrophyGetGroupInfo](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - only the base game group (id -1) is answered, with the same counts as the game; an id past the `GRnnn.PNG` icons returns `INVALID_GROUP_ID`, and an existing group throws because the trophies of a group are listed only in the encrypted configuration
- [sceNpTrophyGetTrophyInfo](../../../core/libs/prx/libSceNpTrophy/Export.cpp) (libSceNpTrophy) - the grade is reported as unknown, the trophy is never hidden, the name and description are empty and the unlock timestamp is 0; a package with groups throws, since a trophy's group is listed only in the encrypted configuration
### Additional callable exports
- [Additional callable exports](../../../core/libs/prx/libSceNpTrophy/Export.cpp) - 6 entries present in both version-labelled images are import-resolution declarations only. None is listed in the pinned public 3.20 catalogue for this library. Neither label independently authenticates retail firmware provenance. Parameter lists, return types and behavior are unverified; parameterless `int` declarations are placeholders, not verified ABI contracts. Every entry throws through `NotImplemented_nid_no_patch`. Unidentified names use literal NID aliases. No runtime functionality is implemented. Identified candidate names match their NIDs in the [public symbol database](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) or [supplemental catalog](https://github.com/claimore22/ps5rs/blob/2304be5131221bae0dac24b9767cabffda33f747/data/nids.csv).
[Version-pinned selected ELF export records](https://gist.github.com/kyon-eth/3fbb1a4a6f95a936b4cd58e9c3d8c50c/5e3af709224ed8235af11337309af0725e5685cb) list every NID below with its image label, decoded export module and library, raw qualified symbol, ELF function type, value and size for each inspected version-labelled image. The extract SHA-256 is `02ab27f12bcd0cc9fa03fa33f55fc201110f0d54a86bbbaa093d55d0a8cf262d`; its full-module sorted-function-NID digests and raw module-parameter words permit independent comparison. This is an analyst-produced metadata record, not independent authentication of the original images or proof of prototypes or behavior.
| Name | NID |
| --- | --- |
| `Unknown` | `+O9vU1CpGZA` |
| `Unknown` | `+not13BEdVI` |
| `Unknown` | `FJZW2oHUHFk` |
| `Unknown` | `bGnKq23jqek` |
| `Unknown` | `lX611WLCvX0` |
| `Unknown` | `n4AHGHb-pfY` |