mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
Firmware 13.42, run natively, checks six requests' arguments before the context; a request that passes them still throws, because the run could not show how the module completes it. LeaveRoom finds no session, the local getters report the context as not started, and the signaling calls find no peer. The signaling port is stored and reported.
9.2 KiB
9.2 KiB
libSceNpMatching2 technical debt
Unknown function info
- sceNpMatching2CreateContextInternal, sceNpMatching2CreateJoinRoomA, sceNpMatching2GetLobbyInfoList, sceNpMatching2GetLobbyMemberDataInternal, sceNpMatching2GetLobbyMemberDataInternalList, sceNpMatching2GetMemoryInfo, sceNpMatching2GetRoomMemberDataExternalList, sceNpMatching2GetRoomMemberIdListLocal, sceNpMatching2GetRoomPasswordLocal, sceNpMatching2GetSignalingOptParamLocal (libSceNpMatching2) - names and NIDs are present in the PS5 3.20 export inventory, 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
- sceNpMatching2GetSslMemoryInfo, sceNpMatching2GetUserInfoListA, sceNpMatching2GrantRoomOwner, sceNpMatching2JoinLobby, sceNpMatching2JoinRoomA, sceNpMatching2LeaveLobby, sceNpMatching2RegisterManualUdpSignalingCallback, sceNpMatching2SendLobbyChatMessage, sceNpMatching2SetExtraInitParam, sceNpMatching2SetLobbyMemberDataInternal, sceNpMatching2SetRoomDataInternalExt (libSceNpMatching2) - names and NIDs are present in the PS5 3.20 export inventory, 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
- sceNpMatching2SetSignalingOptParam, sceNpMatching2SignalingAbortConnection, sceNpMatching2SignalingCancelPeerNetInfo, sceNpMatching2SignalingEnableManualUdpMode, sceNpMatching2SignalingEstablishConnection, sceNpMatching2SignalingGetLocalNetInfo, sceNpMatching2SignalingGetPeerNetInfo, sceNpMatching2SignalingGetPeerNetInfoResult (libSceNpMatching2) - names and NIDs are present in the PS5 3.20 export inventory, 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
Functional
- sceNpMatching2Initialize, sceNpMatching2Terminate (libSceNpMatching2) - only the library state is kept: initialization checks the parameter's
sizefield (0x28, or 0x30 with an SSL pool) as shadPS4 does and starts no thread; a second initialization returnsALREADY_INITIALIZEDand a termination without oneNOT_INITIALIZED. The pool, thread and SSL settings are not used: no matching server is reached. Not measured on a console - sceNpMatching2CreateContext and the context calls (libSceNpMatching2) - offline only, not measured on a PS5: the checks follow shadPS4 and its context manager (a
0x28-byte parameter, ten ids handed out round-robin).sceNpMatching2ContextStartreturns0x804101E2(SCE_NET_ERROR_RESOLVER_ETIMEDOUT), which shadPS4 says was confirmed on a console disconnected from the internet, so no context starts andsceNpMatching2ContextStopanswersCONTEXT_NOT_STARTED. Callbacks and the default request option are checked but never used. The room, user, world, server-id and signaling-info calls still throw - sceNpMatching2CreateContextA (libSceNpMatching2) - offline only: the A parameter (user id, service label, then a
sizeof 0x10) and its checks follow a later shadPS4, and the user id is unused. The context takes the next of the same ten slots with 0x100 added: firmware 13.42, run natively, gave context 1 tosceNpMatching2CreateContextand 258 (0x0102) to thesceNpMatching2CreateContextAafter it. That the 0x100 marks A contexts, and that slot 2 alone does not name the A context, are read from that single pair - sceNpMatching2RegisterLobbyEventCallback, sceNpMatching2RegisterLobbyMessageCallback (libSceNpMatching2) - offline only, not measured on a PS5: checked like the room callbacks, as shadPS4 does (event, message), and never called: no lobby is joined offline
- sceNpMatching2SignalingGetConnectionStatus, sceNpMatching2AbortContextStart (libSceNpMatching2) - not measured on a console. With no room joined offline, the status call writes 0 (inactive) and returns 0 for a known context, as shadPS4 does; the PS3 module in RPCS3 also writes inactive but returns
INVALID_ROOM_ID. A null status pointer throws (shadPS4 skips the write, RPCS3 returnsINVALID_ARGUMENT); peer address and port are never written. The abort returnsNOT_INITIALIZEDbefore initialization, as RPCS3 does, and 0 for any context id, as both do - sceNpMatching2GetWorldInfoList, sceNpMatching2SetUserInfo, sceNpMatching2SetRoomDataExternal, sceNpMatching2SetRoomDataInternal, sceNpMatching2GetRoomDataInternal, sceNpMatching2SignalingGetPingInfo (libSceNpMatching2) - follow firmware 13.42 run natively on never-started contexts: initialization, a null parameter, then its leading server id (
INVALID_SERVER_ID) or room id (INVALID_ROOM_ID) come before the context (CONTEXT_NOT_FOUND). A request that passes these checks throws: the run accepted it and handed out a request id counted from 1, but with its worker threads stopped it could not show how the module completes, calls back or cancels the request offline. Not reproduced or measured: the checks on the rest of each parameter and a null request id (refused with the parameter, as in shadPS4) - sceNpMatching2LeaveRoom (libSceNpMatching2) - checked like the room requests above, then returns
SESSION_NOT_FOUND(0x80550C3A) on a known context andCONTEXT_NOT_FOUNDon an unknown one, as firmware 13.42 did, and room 0 givesINVALID_ROOM_IDon any context - sceNpMatching2GetServerId, sceNpMatching2GetRoomJoinedSlotMaskLocal, sceNpMatching2GetWorldIdArrayForAllServers (libSceNpMatching2) - no context starts offline, so a known context gets what firmware 13.42 returned for a created, never-started one, writing nothing:
CONTEXT_NOT_STARTED,CONTEXT_NOT_STARTEDandSERVER_NOT_AVAILABLE(0x80550C28). An unknown context givesCONTEXT_NOT_FOUND. The first two refuse a null output before the context; room 0 gives 0x80550C0C on a known context (measured). The third checks the context first, then its pointers. Assumed: that initialization is checked first, as in the request calls, the widths of the third call's arguments and which of its pointers it checks - sceNpMatching2SignalingGetConnectionInfo, sceNpMatching2SignalingGetConnectionInfoA, sceNpMatching2SignalingGetPort, sceNpMatching2SignalingSetPort (libSceNpMatching2) - as firmware 13.42 did with no context started: the connection info calls refuse a null
infowith 0x80550E15, then answer 0x80550E19 (no peer) for a known context and 0x80550E05 for an unknown one; the null check of the non-A form and the answer before initialization are not measured. The signaling port starts at 0 andSetPortstores whatGetPortreports. Neither checks initialization here, andGetPortwrites through its pointer with no null check, as the module does per its disassembly