Files
AnyPS5/docs/dev/debt/libSceNpScoreRanking.md

4.6 KiB

libSceNpScoreRanking technical debt

Silent stubs

Functional

  • libSceNpScoreRanking (libSceNpScoreRanking) - offline only, not measured on a PS5: the argument checks, their order, the limit of 32 title contexts and 32 requests and the array sizes follow shadPS4, and a valid call then returns SCE_NP_ERROR_SIGNED_OUT and finishes its request with it, as shadPS4 does when the user has no connection. No output is written, where shadPS4 first clears the rank, comment and info arrays. A null boardInfo throws: shadPS4 answers it by the title's SDK version
  • the A, account id, character id, game data and board info variants (libSceNpScoreRanking) - offline only, not measured on a PS5: signatures, checks, their order and element sizes follow a later shadPS4, which also answers SCE_NP_ERROR_SIGNED_OUT for a user with no connection. sceNpScoreCreateNpTitleCtxA checks the sign-in first, so it always returns SCE_NP_ERROR_SIGNED_OUT; sceNpScoreGetGameData finishes the request with INVALID_ARGUMENT for an empty online id; sceNpScoreSetPlayerCharacterId only checks its arguments, since no request reaches a server
  • the ForCrossSave calls, sceNpScoreSetTimeout, sceNpScoreSetThreadParam, sceNpScoreCreateTitleCtx (libSceNpScoreRanking) - follow firmware 13.42's module as read from its disassembly, not run: each ForCrossSave call is its regular call under another name, and sceNpScoreGetRankingByRange takes 0x80 or 0x90 bytes per rank. sceNpScoreSetTimeout checks the retry count and the minimum timeouts in the module's order; the module picks a title context or a request by the id range, and the ids here overlap, so both are looked up. sceNpScoreCreateTitleCtx prints its three warnings and takes a context from the same table. The module's NOT_INITIALIZED checks never apply here
  • sceNpScoreWaitAsync (libSceNpScoreRanking) - throws for a request with no operation started. Firmware 13.42 blocks there on the request's semaphore, which only the worker's completion signals, as shadPS4 waits forever; neither sceNpScoreAbortRequest nor sceNpScoreDeleteRequest releases it, so such a wait never returns
  • sceNpScoreCensorComment, sceNpScoreSanitizeComment, sceNpScoreRecordGameData and their async forms (libSceNpScoreRanking) - make the checks firmware 13.42 makes before queueing to its worker (disassembly, not run): an option, then a null comment or data, then the request, then a comment longer than 255 characters. Valid calls then answer offline like the rest of the library. The module copies the score and sizes unchecked and leaves the chunk checks to the service, sanitizedComment is never written, and the async forms finish the request here instead of returning 0 for the worker to finish