Files
AnyPS5/docs/dev/debt/libSceNpTus.md
T
MarcZX10 14afdc1854 docs(libSceNpTus): say where the firmware 13.42 module disagrees with the shadPS4 argument checks
The checks and the tests that assert them follow shadPS4 and are unverified; the entry lists the differences an emulator run of the 13.42 module reports.
2026-10-28 13:43:45 +00:00

15 KiB

libSceNpTus technical debt

Unknown function info

  • sceNpTusCreateNpTitleCtx - throws through NotImplemented_nid_no_patch; behaviour and the PS5 prototypes are unmeasured. The only source of the parameter lists is shadPS4's PS4-derived prototypes (GPLv2, used as a reference only), with no second reference; structure pointers are void* because no layout is known.
  • TUS variable outputs (libSceNpTus) - the layouts of the variable arrays of the sceNpTusGetMultiSlotVariable* calls and of outVariable in sceNpTusAddAndGetVariableAAsync are not verified, so the output is never written and variableArraySize / outVariableSize are not checked; shadPS4, and RPCS3 in its PS3 sceNpTusGetMultiSlotVariable* and sceNpTusAddAndGetVariable* calls, return INVALID_ALIGNMENT unless the size is arrayLen variables of the call's type, or one variable for outVariable. The signatures and the community error codes follow shadPS4, which fpPS4 agrees with for the context and request calls; no console measurement.
  • Multi-slot variable calls (libSceNpTus) - the argument checks of the multi-slot get, set and delete calls are not measured on a console; they follow shadPS4, where they differ between functions: arrayLen < 1 is INSUFFICIENT_ARGUMENT in the NpId and virtual-user delete calls and in sceNpTusGetMultiSlotVariableVUserAsync, and INVALID_ARGUMENT in the others; a null NpId is accepted except in delete; an empty virtual user ID is INVALID_ARGUMENT. RPCS3's PS3 module has only the NpId and virtual-user calls; it returns INVALID_ARGUMENT for an empty array in all of them, rejects a null target in get and set and does not check for an empty virtual user ID.
  • Variable, data, data status and TSS requests (libSceNpTus) - the argument checks of the 82 add-and-get, try-and-set, data, data status, multi-user, friends and sceNpTssGetSmallStorage calls are not measured on a console; their signatures, checks and order follow shadPS4, including its differences between forms: the NpId try-and-set calls return INVALID_ARGUMENT for an operation type outside 1-6 where the others return INVALID_TYPE, and the NpId and virtual-user multi-slot data status calls return TOO_MANY_NPID for more than 64 slots. As for the calls above, the output and structure sizes are not checked, and every request finishes with SCE_NP_ERROR_SIGNED_OUT
  • sceNpTusSetThreadParam (libSceNpTus) - unknown signature
  • sceNpTusCreateTitleCtx (libSceNpTus) - unknown signature
  • sceNpTusSetTimeout (libSceNpTus) - unknown signature
  • sceNpTusChangeModeForOtherSaveDataOwners (libSceNpTus) - unknown signature
  • sceNpTusDeleteMultiSlotDataVUser (libSceNpTus) - waits on the request that sceNpTusDeleteMultiSlotDataVUserAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT. The checks of sceNpTusDeleteMultiSlotDataVUserAsync apply.
  • sceNpTusDeleteMultiSlotDataVUserAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console: a null virtual user, null slot ids or no slot are INSUFFICIENT_ARGUMENT, a non-null option, a negative slot id or an empty virtual user are INVALID_ARGUMENT and more than 64 slots are TOO_MANY_SLOTID. The request finishes with SCE_NP_ERROR_SIGNED_OUT and no slot data exists to delete.
  • sceNpTssGetStorage (libSceNpTus) - unknown signature
  • sceNpTssGetStorageAsync (libSceNpTus) - unknown signature
  • sceNpTssGetDataAsync (libSceNpTus) - unknown signature
  • sceNpTusGetDataForCrossSaveVUser (libSceNpTus) - waits on the request that sceNpTusGetDataForCrossSaveVUserAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT. The checks of sceNpTusGetDataForCrossSaveVUserAsync apply.
  • sceNpTusGetDataForCrossSaveVUserAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console. dataStatusSize and the layout of dataStatus are not checked, and dataStatus and data are never written, so no transfer offset is kept between calls. The request finishes with SCE_NP_ERROR_SIGNED_OUT.
  • sceNpTusGetFriendsVariableA (libSceNpTus) - waits on the request that sceNpTusGetFriendsVariableAAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks of sceNpTusGetFriendsVariableAAsync apply.
  • sceNpTusGetFriendsVariableAAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console. variableArraySize and the size of its entries are not checked and the array is never written. A non-null option is read as size, startSerialRank and hits (0x18 bytes): another size is INVALID_ALIGNMENT and a startSerialRank of 0 is INVALID_ARGUMENT; hits is never written, and the option is accepted where sceNpTusGetFriendsVariableAsync refuses every option. The request finishes with SCE_NP_ERROR_SIGNED_OUT.
  • sceNpTusGetFriendsVariableForCrossSave (libSceNpTus) - waits on the request that sceNpTusGetFriendsVariableForCrossSaveAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks of sceNpTusGetFriendsVariableForCrossSaveAsync apply.
  • sceNpTusGetFriendsVariableForCrossSaveAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console. variableArraySize and the size of its entries are not checked and the array is never written. A non-null option is read as size, startSerialRank and hits (0x18 bytes): another size is INVALID_ALIGNMENT and a startSerialRank of 0 is INVALID_ARGUMENT; hits is never written, and the option is accepted where sceNpTusGetFriendsVariableAsync refuses every option. The request finishes with SCE_NP_ERROR_SIGNED_OUT.
  • sceNpTusGetFriendsDataStatusA (libSceNpTus) - waits on the request that sceNpTusGetFriendsDataStatusAAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks of sceNpTusGetFriendsDataStatusAAsync apply.
  • sceNpTusGetFriendsDataStatusAAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console. statusArraySize and the size of its entries are not checked and the array is never written. A non-null option is read as size, startSerialRank and hits (0x18 bytes): another size is INVALID_ALIGNMENT and a startSerialRank of 0 is INVALID_ARGUMENT; hits is never written, and the option is accepted where sceNpTusGetFriendsDataStatusAsync refuses every option. The request finishes with SCE_NP_ERROR_SIGNED_OUT.
  • sceNpTusGetFriendsDataStatusForCrossSave (libSceNpTus) - waits on the request that sceNpTusGetFriendsDataStatusForCrossSaveAsync starts, as shadPS4 does, and returns its argument error or SCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks of sceNpTusGetFriendsDataStatusForCrossSaveAsync apply.
  • sceNpTusGetFriendsDataStatusForCrossSaveAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console. statusArraySize and the size of its entries are not checked and the array is never written. A non-null option is read as size, startSerialRank and hits (0x18 bytes): another size is INVALID_ALIGNMENT and a startSerialRank of 0 is INVALID_ARGUMENT; hits is never written, and the option is accepted where sceNpTusGetFriendsDataStatusAsync refuses every option. The request finishes with SCE_NP_ERROR_SIGNED_OUT.
  • Friends, cross-save and virtual-user argument checks (libSceNpTus) - unverified: the checks of the A and ForCrossSave friends calls, sceNpTusGetDataForCrossSaveVUser and sceNpTusDeleteMultiSlotDataVUser, and their *Async forms, follow shadPS4 and their tests assert those results; no console measured them. An emulator run of the firmware 13.42 module (report) differs: the friends calls refuse an array size other than arrayLen times the entry size with 0x80550714, answer an option size mismatch with 0x80550704, accept start rank 0 and zero the array for SDK 5.50 and later; the data status call takes only a dataStatusSize of 0x1F0 or 0x210 and accepts a null status or empty name; the delete call accepts a null or empty virtual user and arrayLen -1, and refuses 0 with 0x80550704.
  • sceNpTusDeleteNpTitleCtx (libSceNpTus) - the PS5 signature, error codes and child-request lifetime have not been measured on a console. Deletion invalidates the context and all its requests, following shadPS4.

Functional