mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
16 KiB
16 KiB
libSceNpTus technical debt
Unknown function info
- TUS variable outputs (libSceNpTus) - the layouts of the variable arrays of the
sceNpTusGetMultiSlotVariable*calls and ofoutVariableinsceNpTusAddAndGetVariableAAsyncare not verified, so the output is never written andvariableArraySize/outVariableSizeare not checked; shadPS4, and RPCS3 in its PS3sceNpTusGetMultiSlotVariable*andsceNpTusAddAndGetVariable*calls, returnINVALID_ALIGNMENTunless the size isarrayLenvariables of the call's type, or one variable foroutVariable. 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 < 1isINSUFFICIENT_ARGUMENTin the NpId and virtual-user delete calls and insceNpTusGetMultiSlotVariableVUserAsync, andINVALID_ARGUMENTin the others; a null NpId is accepted except in delete; an empty virtual user ID isINVALID_ARGUMENT. RPCS3's PS3 module has only the NpId and virtual-user calls; it returnsINVALID_ARGUMENTfor 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
sceNpTssGetSmallStoragecalls are not measured on a console; their signatures, checks and order follow shadPS4, including its differences between forms: the NpId try-and-set calls returnINVALID_ARGUMENTfor an operation type outside 1-6 where the others returnINVALID_TYPE, and the NpId and virtual-user multi-slot data status calls returnTOO_MANY_NPIDfor more than 64 slots. As for the calls above, the output and structure sizes are not checked, and every request finishes withSCE_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
sceNpTusDeleteMultiSlotDataVUserAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT. The checks ofsceNpTusDeleteMultiSlotDataVUserAsyncapply. - 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-nulloption, a negative slot id or an empty virtual user areINVALID_ARGUMENTand more than 64 slots areTOO_MANY_SLOTID. The request finishes withSCE_NP_ERROR_SIGNED_OUTand no slot data exists to delete. - sceNpTssGetStorage (libSceNpTus) - unknown signature
- sceNpTssGetStorageAsync (libSceNpTus) - unknown signature
- sceNpTssGetDataAsync (libSceNpTus) - the implemented argument checks and their order are not measured on a console: a non-null
optionmust have size 0x20 or returnsINVALID_ALIGNMENT; a non-nulldataStatusmust havedataStatusSize0x18 or also returnsINVALID_ALIGNMENT; a nulldataStatusis accepted and its size is ignored; and a slot id outside 0 to 15 returnsINVALID_ARGUMENT. The option-size check precedes the data-status-size check, which precedes the slot and request checks. The data-status layout is unverified, and nothing is written to the data status or the data. The option's offsets and condition are not read, and the transfer offset that shadPS4 keeps per request is not kept. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - sceNpTssGetData (libSceNpTus) - waits on the request that
sceNpTssGetDataAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT. The checks ofsceNpTssGetDataAsyncapply. - sceNpTusGetDataForCrossSaveVUser (libSceNpTus) - waits on the request that
sceNpTusGetDataForCrossSaveVUserAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT. The checks ofsceNpTusGetDataForCrossSaveVUserAsyncapply. - sceNpTusGetDataForCrossSaveVUserAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console.
dataStatusSizeand the layout ofdataStatusare not checked, anddataStatusanddataare never written, so no transfer offset is kept between calls. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - sceNpTusGetFriendsVariableA (libSceNpTus) - waits on the request that
sceNpTusGetFriendsVariableAAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks ofsceNpTusGetFriendsVariableAAsyncapply. - sceNpTusGetFriendsVariableAAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console.
variableArraySizeand the size of its entries are not checked and the array is never written. A non-nulloptionis read assize,startSerialRankandhits(0x18 bytes): another size isINVALID_ALIGNMENTand astartSerialRankof 0 isINVALID_ARGUMENT;hitsis never written, and the option is accepted wheresceNpTusGetFriendsVariableAsyncrefuses every option. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - sceNpTusGetFriendsVariableForCrossSave (libSceNpTus) - waits on the request that
sceNpTusGetFriendsVariableForCrossSaveAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks ofsceNpTusGetFriendsVariableForCrossSaveAsyncapply. - sceNpTusGetFriendsVariableForCrossSaveAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console.
variableArraySizeand the size of its entries are not checked and the array is never written. A non-nulloptionis read assize,startSerialRankandhits(0x18 bytes): another size isINVALID_ALIGNMENTand astartSerialRankof 0 isINVALID_ARGUMENT;hitsis never written, and the option is accepted wheresceNpTusGetFriendsVariableAsyncrefuses every option. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - sceNpTusGetFriendsDataStatusA (libSceNpTus) - waits on the request that
sceNpTusGetFriendsDataStatusAAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks ofsceNpTusGetFriendsDataStatusAAsyncapply. - sceNpTusGetFriendsDataStatusAAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console.
statusArraySizeand the size of its entries are not checked and the array is never written. A non-nulloptionis read assize,startSerialRankandhits(0x18 bytes): another size isINVALID_ALIGNMENTand astartSerialRankof 0 isINVALID_ARGUMENT;hitsis never written, and the option is accepted wheresceNpTusGetFriendsDataStatusAsyncrefuses every option. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - sceNpTusGetFriendsDataStatusForCrossSave (libSceNpTus) - waits on the request that
sceNpTusGetFriendsDataStatusForCrossSaveAsyncstarts, as shadPS4 does, and returns its argument error orSCE_NP_ERROR_SIGNED_OUT; the number of entries read that the console returns on success is never produced. The checks ofsceNpTusGetFriendsDataStatusForCrossSaveAsyncapply. - sceNpTusGetFriendsDataStatusForCrossSaveAsync (libSceNpTus) - the argument checks and their order follow shadPS4 and are not measured on a console.
statusArraySizeand the size of its entries are not checked and the array is never written. A non-nulloptionis read assize,startSerialRankandhits(0x18 bytes): another size isINVALID_ALIGNMENTand astartSerialRankof 0 isINVALID_ARGUMENT;hitsis never written, and the option is accepted wheresceNpTusGetFriendsDataStatusAsyncrefuses every option. The request finishes withSCE_NP_ERROR_SIGNED_OUT. - Friends, cross-save and virtual-user argument checks (libSceNpTus) - unverified: the checks of the
AandForCrossSavefriends calls,sceNpTusGetDataForCrossSaveVUserandsceNpTusDeleteMultiSlotDataVUser, and their*Asyncforms, 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 thanarrayLentimes the entry size with0x80550714, answer an optionsizemismatch with0x80550704, accept start rank 0 and zero the array for SDK 5.50 and later; the data status call takes only adataStatusSizeof 0x1F0 or 0x210 and accepts a null status or empty name; the delete call accepts a null or empty virtual user andarrayLen-1, and refuses 0 with0x80550704. - 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
- sceNpTusCreateNpTitleCtxA (libSceNpTus) - creates a title context without checking sign-in, up to 32 contexts (
TOO_MANY_OBJECTSbeyond); shadPS4 returns thesceNpGetNpIderror instead. Requests are limited to 256, and the limits are not measured on a console. - sceNpTssCreateNpTitleCtx and sceNpTssCreateNpTitleCtxA (libSceNpTus) - that TSS title contexts share the TUS context table and its 32-context limit is inferred from shadPS4, which redirects both to the TUS creators, and from TSS requests coming from
sceNpTusCreateRequest; nothing is measured on a console. TheAform issceNpTusCreateNpTitleCtxA. TheNpIdform returnsINSUFFICIENT_ARGUMENTfor a nullnpIdandINVALID_ARGUMENTfor service label0xFFFFFFFFbefore the limit, as shadPS4's sceNpTusCreateNpTitleCtx does; the signatures are shadPS4's and fpPS4's, and Orbital's for theAform. - sceNpTusCreateNpTitleCtx (libSceNpTus) - not measured on a console, and the
npIdcontents are neither read nor kept with the context, where shadPS4 keeps them for its requests. It issceNpTssCreateNpTitleCtx:INSUFFICIENT_ARGUMENTfor a nullnpId, thenINVALID_ARGUMENTfor service label0xFFFFFFFF, then a context in the shared 32-context table, as in shadPS4; the signature is shadPS4's and fpPS4's. - sceNpTusPollAsync, sceNpTusWaitAsync (libSceNpTus) - there is no PSN, so every implemented
*Asynccall whose arguments pass the checks starts a request that finishes at once withSCE_NP_ERROR_SIGNED_OUT, which poll and wait report and the blocking calls return; shadPS4 returnsSIGNED_OUTfrom the*Asynccall itself when no shadNet client is signed in, and RPCS3 returnsINVALID_ONLINE_IDwhile offline, marked there as probable behaviour. An abort stays set, so every later operation on the request, blocking ones included, finishes withABORTED; in shadPS4 an abort only ends the operation in progress. Until an operation has started, poll returns 1 and wait returnsINVALID_ARGUMENTas in shadPS4; RPCS3 blocks until a result is set. - sceNpTusGetData, sceNpTusGetDataVUser, sceNpTusGetMultiSlotVariable, sceNpTusGetMultiSlotVariableVUser, sceNpTusGetMultiUserVariableForCrossSave, sceNpTusSetData, sceNpTusSetDataVUser, sceNpTusSetMultiSlotVariable and sceNpTusSetMultiSlotVariableVUser (libSceNpTus) - block on their
*Asyncforms with the same parameters, as shadPS4 does, so they inherit those forms' unmeasured checks and the offlineSIGNED_OUTresult