Commit Graph
34 Commits
Author SHA1 Message Date
Adrià 5e936063e3 Merge pull request #13871 from zaryabzip/fix/rudp-context-status-checks
fix(libSceRudp): check the context status arguments first and initialization before the id pointer
2026-11-01 06:06:40 +01:00
zaryabzip e70388ccd5 fix(libSceRudp): compare the context status size as 64 bits
A firmware 13.42 run of the module refuses a size of 0x100000010, which a
32-bit parameter would cut to 0x10 and accept.
2026-10-31 19:42:42 +05:00
zaryabzip 651808a48b feat(libSceRudp): track socket records as a firmware 13.42 run shows
sceRudpBind answers a listening context with NOT_ACCEPTABLE before the
already-bound check, and runs the socket checks in the module's order:
mux mode against the socket's contexts, then mux mode 1 with vport 0,
then a mux mode 2 vport in use. Vport 0 takes the next free vport above
the last one handed out. A socket's record, with its counter, goes when
its last context leaves; a listening context's binding is held until the
next sceRudpProcessEvents.
2026-10-31 19:37:06 +05:00
zaryabzip 553f1a82d2 fix(libSceRudp): check the context status arguments first and initialization before the id pointer
sceRudpGetContextStatus refuses a negative id, a null status and a size
outside 1 to 0x30 with 0x80770004 before it looks the id up, and writes
the idle block with 0xFFFFFFFF at bytes 4-7, as firmware 10.71 and 13.42
readings show. sceRudpCreateContext checks initialization before its null
id pointer.
2026-10-31 14:18:54 +05:00
zaryabzip 9c423e59bd test(libSceRudp): leave the unmeasured binds out of the listen test
The two binds whose answers nobody has measured still throw, with their
debt lines, but the test no longer pins that. The debt entries for Bind,
Listen and Accept say the run was under an emulator, and the Accept entry
says which of its arguments were run.
2026-10-31 12:28:57 +05:00
zaryabzip 11f42d025e feat(libSceRudp): bind, listen and accept as a firmware 13.42 run shows
sceRudpBind takes the socket id, virtual port and mux mode and checks
them; mux mode 2 with vport 0 takes 0x2711 and on from a per-socket
counter. sceRudpSetEventHandler checks initialization and a null
handler, and sceRudpEnd clears the handler. sceRudpListen and
sceRudpAccept follow the run: no peer ever connects here, so accept
returns WOULDBLOCK while non-blocking and otherwise waits until the
context is terminated. Cases the run did not cover throw.
2026-10-31 12:11:58 +05:00
zaryabzip 0e08e95853 feat(libSceRudp): answer flush, remote info and buffer status for unconnected contexts
sceRudpFlush, sceRudpGetRemoteInfo and sceRudpGetContextBufferStatus take
the argument lists and checks of a firmware 13.42 run of the real
exports. No context here ever connects, so flush and remote info return
NOT_ACCEPTABLE, as the run gave for created, bound and listening
contexts, and the buffer status writes zeros.
2026-10-31 07:26:15 +05:00
Codex ba9a48be8a feat(rudp): add missing context-buffer inventory export 2026-10-30 00:56:22 +02:00
harisibrar1andClaude Opus 5.5 b934ab8af1 fix(libSceRudp): drain only the cancelled waits and release a wait's registration on every exit
sceRudpPollCancel waited until no wait was registered, so a wait that
started during the drain kept it blocked, forever for an infinite one.
Waits registered when the cancel starts now move to a draining count,
and the cancel returns once those have left. A scope guard releases each
wait's registration on every exit, retaking the lock if the wait had
dropped it, so an exception in the condition wait no longer leaves a
registration that a later cancel can never drain. Reported by
@MarcZX10, @thepoppfish, @adriadam10 and @oneandonlydean; the guard
follows @thepoppfish's repair.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 01:26:57 -04:00
harisibrar1 0c85096011 Merge remote-tracking branch 'origin/main' into feat/rudp-poll-cancel
# Conflicts:
#	core/libs/prx/libSceRudp/include/Api.hpp
#	docs/dev/debt/libSceRudp.md
2026-10-28 01:25:17 -04:00
harisibrar1 4fe05b3bea Merge remote-tracking branch 'origin/main' into feat/rudp-poll-cancel
# Conflicts:
#	docs/dev/debt/libSceRudp.md
2026-10-26 19:15:46 -04:00
Yunus Shaikh 8d3f15f0e0 Merge main into feat/appcontent-addcont-ids-and-rudp-mss-v2 2026-10-26 12:43:42 -07:00
harisibrar1andClaude Opus 5.5 344acf3e66 docs(libSceRudp): link the detailed 13.42 report for sceRudpPollCancel
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 20:28:44 -04:00
harisibrar1andClaude Opus 5.5 db79e3cd02 feat(libSceRudp): implement sceRudpPollCancel as firmware 13.42's library does
A cancel with no waiter is kept once for that poll and makes its next
sceRudpPollWait return 0x80770014, also with a zero timeout. A cancel
with waiters wakes all of them with 0x80770014 and returns once none is
left. Behaviour from @BunnyFl's execution of the 13.42 libSceRudp.sprx
in #10954.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 19:37:51 -04:00
AZLisme ef9a48c6ec docs(libSceRudp): record firmware cancellation details 2026-10-26 00:25:54 +08:00
AZLisme 503a0efb3a test(libSceRudp): cover empty poll wait behavior 2026-10-25 22:11:20 +08:00
Yunus Shaikh 2deb5f9ed9 feat(libSceRudp): implement sceRudpSetMaxSegmentSize
Take the 16-bit segment size Vita3K and RPCS3 declare. As in Vita3K,
the call answers NOT_INITIALIZED before sceRudpInit and NOT_ACCEPTABLE
while any context exists, and otherwise stores the size.
sceRudpGetMaxSegmentSize keeps the 1410 measured on a PS5: Vita3K leaves
the getter unimplemented, so no source says it reports a stored size.
2026-10-25 05:27:46 -07:00
boykopovar 08fa5d3578 fix(rudp): validate activation and reject unsupported transport 2026-10-21 21:50:36 +03:00
boykopovar 3251852138 fix(rudp): recover poll signatures and event layout 2026-10-21 21:50:22 +03:00
boykopovar 8d3314c824 fix(rudp): recover remote address and event pump signatures 2026-10-21 21:46:58 +03:00
Felipebmaitan 733b0fdd4b docs(libSceRudp): record PPSA06888 option call sites 2026-10-20 22:59:36 -03:00
Felipebmaitan b122786155 fix(libSceRudp): accept setters for unreadable options 2026-10-20 21:41:57 -03:00
Felipebmaitan a006418d72 style(libSceRudp): use camelCase context arguments 2026-10-20 21:41:04 -03:00
Felipebmaitan a473096926 feat(libSceRudp): retain and query context options 2026-10-20 21:41:04 -03:00
nekomancer01andClaude Opus 5.5 e4164098a8 docs(libSceRudp): state the poll gaps first and shorten the debt entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:07:28 +11:00
nekomancer01andClaude Opus 5.5 d2b9531517 fix(libSceRudp): match the Vita3K check order and reject negative poll ids
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:07:28 +11:00
nekomancer01andClaude Opus 5.5 680ba6bf29 feat(libSceRudp): implement the poll exports
Implement sceRudpPollCreate, sceRudpPollControl, sceRudpPollWait and
sceRudpPollDestroy with the PS Vita signatures and argument checks.
sceRudpTerminate removes the context from every poll and sceRudpEnd
destroys the polls and wakes their waiters.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:07:28 +11:00
juanpimg 148e5024b7 feat(prx): drop the exports that main and open pull requests provide
The overlap audit against origin/main and the open pull requests found 39 of
the 193 declared exports that must not be declared here:

- 14 that origin/main already exports. The nid_patcher computes the NID of a
  symbol from its name, and a name ending in _nid_postfix exports the NID of
  the base name, so scePadOpen, sceNetInit and the rest are already there.
- 23 that an open pull request provides: #6832, #6847, #6852, #7846, #7881,
  #7889, #7890, #6977 and #7690.
- 2 whose technical-debt file an open pull request creates: #7463 and #8094.

The scope is now 30 libraries and 154 exports.
2026-10-19 23:37:57 +02:00
juanpimg 2f0ed638dc feat(prx): declare the missing PS5 3.20 system exports
AnyPS5 resolves a title's imports by NID, so a title that imports a system
function no library provides fails to load with an unresolved import. The
PS5 3.20 export inventory lists 193 such exports across 37 PS5 system
libraries AnyPS5 implements but does not provide.

Declare them as throwing stubs so those titles load and reach their next
blocker. Each declaration calls NotImplemented_nid_no_patch and returns 0;
none of them implements the function. Declarations with a credible
prototype use it and cite the source with a pinned commit, and the rest
are declared without parameters, which resolves the import without making
an ABI claim. The technical-debt files record the limitation per library.

libSceMbus and libSceSystemService are left out because pull request #7821
declares them. libSceAgc is left out because its exports are versioned, so
the 3.20 NID names a different symbol from the one AnyPS5 ships.
libSceAvPlayer.native is left out because it compiles libSceAvPlayer's
Export.cpp.

Names and NIDs come from the PS5 3.20 export inventory at
https://github.com/DNNDHH/PS5-3.20_Libs/tree/b2a77c09cd71c01f34c790cfbe98c751a13262ad
2026-10-19 23:16:55 +02:00
Adrià Franch f533fef893 docs(libSceRudp): drop stale and duplicate debt entries 2026-10-19 15:01:06 +02:00
Aryan SharmaandClaude Haiku 5.5 3ef8925a99 feat(libSceRudp): implement sceRudpEnableInternalIOThread2
The managed SceRudp.Rudp.EnableInternalIOThread in PPSA06888's Unity
metadata takes (uint stackSize, uint priority, ulong affinity), which
gives the signature. Like sceRudpEnableInternalIOThread it reports
RUDP_ERROR_NOT_INITIALIZED before sceRudpInit and success after it,
without starting a thread.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
2026-10-19 15:00:54 +02:00
Aryan SharmaandClaude Haiku 5.5 7b626baa23 feat(libSceRudp): implement sceRudpNetReceived and declare sceRudpGetOption
sceRudpNetReceived follows sceRudpNetFlush: it reports
RUDP_ERROR_NOT_INITIALIZED before sceRudpInit and success after it, since
no packets are ever received. sceRudpGetOption now has the signature its
PPSA06888 call sites use, (ctx_id, option, value, len), and still throws
because the option codes, defaults and errors are unknown.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
2026-10-19 15:00:54 +02:00
pushkarreddyy a276d2f718 feat(libs): declare missing RUDP and signaling imports for PPSA31327 2026-10-17 18:14:12 +05:30
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <[email protected]>
2026-10-12 20:38:29 +02:00