3.5 KiB
3.5 KiB
libSceRudp technical debt
Silent stubs
- sceRudpProcessEvents and sceRudpNetFlush (libSceRudp) - there is no reliable-UDP stack on the host, and every
sceRudpWrite,sceRudpReadandsceRudpGetStatuscall here reports a reset or idle context without queueing data, so no context ever holds pending data to process or send; both calls return success aftersceRudpInitandRUDP_ERROR_NOT_INITIALIZEDbefore it, as shadPS4 returns OK from its stubs. PPSA03490 callssceRudpProcessEvents(0)followed bysceRudpNetFlush()from its P2P service thread and ignores the first result; whether the real calls take parameters is unknown - sceRudpActivate (libSceRudp) - there is no reliable-UDP stack on the host to activate, so it returns success without doing anything, as shadPS4 does for its own
sceRudpActivate. PPSA01325 calls it with no arguments during start-up; what the console activates, and whether it reports an error beforesceRudpInit, is unverified
Unknown function info
- sceRudpGetStatus - PPSA01521 passes an output pointer and byte count
0xF8. Measured on a PS5 (firmware 13.60): the status is 0xF8 bytes; beforesceRudpInitevery call returnsRUDP_ERROR_NOT_INITIALIZED, and after it a null pointer or a byte count of 0 or above 0xF8 returnsRUDP_ERROR_INVALID_ARGUMENT. The layout matchesSceRudpStatusin Vita3K withcurrentContextsat 0x64 andallocs,frees,memCurrentandmemPeakat 0xC8 to 0xD4. OnlycurrentContextsis reported: the traffic counters stay 0 because nothing is sent, and the allocator counters stay 0 because the library does not allocate from the title's pool (the console reports 6 allocations and 0x1260 bytes right aftersceRudpInit, and 4 more allocations and 0x3F0 bytes per context). The console also writescurrentContextsand the allocator counters when the byte count is smaller than their offset; only the requested bytes are written here. - sceRudpGetMaxSegmentSize (libSceRudp) - measured on a PS5 (firmware 13.60) in #3073: before
sceRudpInitit returnsRUDP_ERROR_NOT_INITIALIZEDand leaves the value untouched, also for a null pointer; after it a null pointer returnsRUDP_ERROR_INVALID_ARGUMENTand a valid one gets 1410 with result 0. The library keeps no configurable segment size (there is nosceRudpSetMaxSegmentSize), so 1410 is always reported. Theuint16_t*parameter is inferred: the measurement does not show how many bytes the console writes, PPSA03490 passes a pointer to a 16-bit value and RPCS3 declares the PS3cellRudpSetMaxSegmentSize(u16 mss), so only 16 bits are written - PPSA06888 imports declared without parameters, signatures unknown: sceRudpEnableInternalIOThread2, sceRudpGetOption, sceRudpGetRemoteInfo (libSceRudp), imported by its bundled
Media/Plugins/SceRudp.prxand not called during start-up. Names from the NID table of shadPS4, which declares them without parameters too