Files
AnyPS5/docs/dev/debt/libSceNpUniversalDataSystem.md
Adrià 58c3fd47ed Merge pull request #11817 from milescoviello/docs/uds-silent-stubs
docs(libSceNpUniversalDataSystem): list the context registration and handle teardown as silent stubs
2026-10-29 09:30:39 +01:00

17 KiB

libSceNpUniversalDataSystem technical debt

Silent stubs

  • sceNpUniversalDataSystemRegisterContext (libSceNpUniversalDataSystem) - returns SCE_NP_UNIVERSAL_DATA_SYSTEM_OK without checking the context or handle and without recording anything. sceNpUniversalDataSystemPostEvent uses only its context and ignores the handle, so nothing depends on the registration. All ten titles in my set call it.
  • sceNpUniversalDataSystemDestroyHandle and sceNpUniversalDataSystemAbortHandle (libSceNpUniversalDataSystem) - return SCE_NP_UNIVERSAL_DATA_SYSTEM_OK without checking the handle. sceNpUniversalDataSystemCreateHandle always hands out the same handle and keeps no state, so there is nothing to tear down. All ten titles in my set call sceNpUniversalDataSystemDestroyHandle; Metal Gear Solid 4 (PPSA18194) also calls sceNpUniversalDataSystemAbortHandle.

Unknown function info

  • libSceNpUniversalDataSystem additional exports - these name/NID pairs are present in the 13.60 export inventory. Parameter lists, return types and behavior are unverified. Parameterless int declarations are import-resolution placeholders, not verified ABI prototypes; every entry throws through NotImplemented_nid_no_patch. No runtime functionality is implemented.
Name NID
sceNpUniversalDataSystemIntCloseStream pSyd06cKZVk
sceNpUniversalDataSystemIntDeleteUserData IiSeRSN++Mc
sceNpUniversalDataSystemIntGetNpCommIdByNpTitleId ONOoGEhy+mg
sceNpUniversalDataSystemIntGetNpTitleIdListByNpCommId FgmhJGcGztU
sceNpUniversalDataSystemIntGetObjectState KSHif9MWQjQ
sceNpUniversalDataSystemIntOpenObjectsDefinitionConfStream O5enyfsJoK0
sceNpUniversalDataSystemIntOpenObjectsDefinitionConfStreamByObjectId vOdDBWSu-Gk
sceNpUniversalDataSystemIntOpenStreamByUri tkUOy4Ag4wo
sceNpUniversalDataSystemIntReadStream ABFxQ2B50RA

Functional

  • Trophy events: sceNpUniversalDataSystemPostEvent stores an _UnlockTrophy event with an int32 _trophy_id of 0 or more as an unlock for the user and service label of its context, as KytyPS5 does, except an id that libSceNpTrophy2 refuses when the title's trophy data is loaded (one not in the data, a platinum or a progressive trophy). _UpdateTrophyProgress goes through the title's statistic rules like any other event (below). A context need not be registered, and every post of an event that sceNpUniversalDataSystemCreateEvent returned and that is not yet destroyed returns success (a null or any other event pointer stops the game): KytyPS5's errors for an unknown or unregistered context and for a malformed unlock are not verified. The storage statistics stay zero.
  • Statistics: every other event goes through the title's rules in sce_sys/uds/udsNN.ucp, which libSceNpTrophy2 reads. Only "aggregation":"latest" and "max" statistics of dataType uint32, uint64 or int32 are kept; no public source documents the other aggregations (such as count, collection and eachLatest) or types, so their definitions and rules are skipped. Only rules whose input is a $.name path (dotted for nested objects) are applied. A value is used when it is an integer of any width that is not negative and fits the statistic's type and minValue/maxValue; KytyPS5 requires the statistic's exact width, and whether the console converts, clamps or rejects other values is not known. Statistics are stored per user and service label, and every trophy's unlockCondition is compared after each event that sets one.