fix(rudp): provide the calls PPSA03490 still lacks #3823

Merged
xXPBSXx merged 2 commits from upstream-pr/3823 into main 2026-10-11 22:07:39 +00:00
xXPBSXx commented 2026-10-11 17:14:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T17:14:50Z.


What

Adds the four libSceRudp calls the P2P title PPSA03490 still lacks after the merged Rudp PRs, so it no longer fails to load on them:

  • sceRudpProcessEvents and sceRudpNetFlush: no reliable-UDP stack exists on the host, so with nothing to process or send they return success after sceRudpInit and RUDP_ERROR_NOT_INITIALIZED before it (shadPS4 returns OK from its stubs). The title calls sceRudpProcessEvents(0) then sceRudpNetFlush() from its P2P service thread.
  • sceRudpGetMaxSegmentSize: throws NotImplemented_nid_no_patch; its signature and the real segment size are unknown.
  • sceRudpNetReceived: parameters unknown, so it throws NotImplemented_nid_no_patch.

The success of the first two holds because no context here ever holds pending data (sceRudpWrite/sceRudpRead only report a reset context); it is listed in docs/dev/TechnicalDebt.md. guest_rudp_pump_tests covers the two pump calls and that the other two throw.

Tested

Windows, main a11c8f7f7 plus this branch: python tools/check_conventions.py --base upstream/main passes; ctest -R rudp (guest_rudp_status, guest_rudp_context_queries, guest_rudp_pump) passes. Not tested on a Linux build, and not run against the title itself with this exact branch. Whether the real calls take parameters is unknown.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4820851923 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T17:14:50Z. --- ### What Adds the four `libSceRudp` calls the P2P title PPSA03490 still lacks after the merged Rudp PRs, so it no longer fails to load on them: - `sceRudpProcessEvents` and `sceRudpNetFlush`: no reliable-UDP stack exists on the host, so with nothing to process or send they return success after `sceRudpInit` and `RUDP_ERROR_NOT_INITIALIZED` before it (shadPS4 returns OK from its stubs). The title calls `sceRudpProcessEvents(0)` then `sceRudpNetFlush()` from its P2P service thread. - `sceRudpGetMaxSegmentSize`: throws `NotImplemented_nid_no_patch`; its signature and the real segment size are unknown. - `sceRudpNetReceived`: parameters unknown, so it throws `NotImplemented_nid_no_patch`. The success of the first two holds because no context here ever holds pending data (`sceRudpWrite`/`sceRudpRead` only report a reset context); it is listed in `docs/dev/TechnicalDebt.md`. `guest_rudp_pump_tests` covers the two pump calls and that the other two throw. ### Tested Windows, `main` a11c8f7f7 plus this branch: `python tools/check_conventions.py --base upstream/main` passes; `ctest -R rudp` (`guest_rudp_status`, `guest_rudp_context_queries`, `guest_rudp_pump`) passes. Not tested on a Linux build, and not run against the title itself with this exact branch. Whether the real calls take parameters is unknown. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 17:15:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T17:15:12Z.


Progress report (a11c8f7 → 4eb3340)

📉 System libraries: 85.77% (-0.04%, +2 implemented, +2 declared functions)

✅ 2 implemented
Library Name
libSceRudp sceRudpNetFlush
libSceRudp sceRudpProcessEvents
🆕 2 declared as stubs
Library Name
libSceRudp sceRudpGetMaxSegmentSize
libSceRudp sceRudpNetReceived
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111587267 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823#issuecomment-6111587267). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T17:15:12Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 4eb3340) 📉 **System libraries**: 85.77% (-0.04%, +2 implemented, +2 declared functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceRudp | `sceRudpNetFlush` | | libSceRudp | `sceRudpProcessEvents` | </details> <details> <summary>🆕 2 declared as stubs</summary> | Library | Name | | - | - | | libSceRudp | `sceRudpGetMaxSegmentSize` | | libSceRudp | `sceRudpNetReceived` | </details>
xXPBSXx commented 2026-10-11 17:39:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T17:39:17Z.


Windows test of this branch with a second title, not the one it was written for: 永久與神樹的祈願者 (PPSA25936, Unity), main a11c8f7f7 plus this PR's head, relinked with --windows --module-dir Media/Modules --module-dir Media/Plugins (all 9 modules convert; the import audit shows 0 absent imports). Of the four calls this PR adds, the title imports only sceRudpNetReceived, which the audit lists as a stub that throws when called.

A 60 s run (run_title, Windows 10, RTX 4080 SUPER) shows no fault, no abort and no throw from the Rudp library, so the title did not call sceRudpNetReceived in that time. It reaches rendering and then prints AGC graphics: storage image access to depth/stencil surface ... is not implemented for several surfaces (the #1409 case); I did not look at the window.

What this does not show: whether the title calls sceRudpNetReceived later (it would throw NotImplemented_nid_no_patch with the call's name), and anything about the P2P path PPSA03490 uses. I did not run the title without this PR for comparison.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111806019 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823#issuecomment-6111806019). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T17:39:17Z. --- Windows test of this branch with a second title, not the one it was written for: 永久與神樹的祈願者 (PPSA25936, Unity), `main` a11c8f7f7 plus this PR's head, relinked with `--windows --module-dir Media/Modules --module-dir Media/Plugins` (all 9 modules convert; the import audit shows 0 absent imports). Of the four calls this PR adds, the title imports only `sceRudpNetReceived`, which the audit lists as a stub that throws when called. A 60 s run (`run_title`, Windows 10, RTX 4080 SUPER) shows no fault, no abort and no throw from the Rudp library, so the title did not call `sceRudpNetReceived` in that time. It reaches rendering and then prints `AGC graphics: storage image access to depth/stencil surface ... is not implemented` for several surfaces (the #1409 case); I did not look at the window. What this does not show: whether the title calls `sceRudpNetReceived` later (it would throw `NotImplemented_nid_no_patch` with the call's name), and anything about the P2P path PPSA03490 uses. I did not run the title without this PR for comparison. AI-assisted (Claude Code).
adriadam10 commented 2026-10-11 17:52:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T17:52:01Z.

Review: CHANGES_REQUESTED


Built and ran guest_rudp_* on the PR merged onto main: all pass, and guest_rudp_pump does not even link without the Export.cpp change. Points to fix:

  • core/libs/prx/libSceRudp/Export.cpp:261 sceRudpGetMaxSegmentSize reports success but writes nothing, so the caller gets back whatever it passed in. That is a plausible-but-wrong result where main threw (exact or throw), and the uint16_t* signature is inferred from one call site (shadPS4's stub declares no parameters). Either throw NotImplemented_nid_no_patch for it, or return a real value with a cited source (e.g. the default MSS the library uses) and list the signature as inferred in TechnicalDebt.
  • sceRudpProcessEvents / sceRudpNetFlush (Export.cpp:246, :251): success is defensible only if no context can hold pending data. Please say in TechnicalDebt that this holds because sceRudpRead/write paths here never queue anything, or throw once a context exists.
  • docs/dev/TechnicalDebt.md:600-602: the lines are at the end of the section (and of the file), which conflicts with #3469 and #3496 (see the overlap comment). Move them a few lines up, away from the last line. The sceRudpNetReceived line is listed under "Functional" although it throws; drop it or move it to the place where throwing stubs are tracked.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5484308515 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823#pullrequestreview-5484308515). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T17:52:01Z. **Review:** CHANGES_REQUESTED --- Built and ran `guest_rudp_*` on the PR merged onto main: all pass, and `guest_rudp_pump` does not even link without the Export.cpp change. Points to fix: - `core/libs/prx/libSceRudp/Export.cpp:261` `sceRudpGetMaxSegmentSize` reports success but writes nothing, so the caller gets back whatever it passed in. That is a plausible-but-wrong result where `main` threw (exact or throw), and the `uint16_t*` signature is inferred from one call site (shadPS4's stub declares no parameters). Either throw `NotImplemented_nid_no_patch` for it, or return a real value with a cited source (e.g. the default MSS the library uses) and list the signature as inferred in TechnicalDebt. - `sceRudpProcessEvents` / `sceRudpNetFlush` (`Export.cpp:246`, `:251`): success is defensible only if no context can hold pending data. Please say in TechnicalDebt that this holds because `sceRudpRead`/write paths here never queue anything, or throw once a context exists. - `docs/dev/TechnicalDebt.md:600-602`: the lines are at the end of the section (and of the file), which conflicts with #3469 and #3496 (see the overlap comment). Move them a few lines up, away from the last line. The `sceRudpNetReceived` line is listed under "Functional" although it throws; drop it or move it to the place where throwing stubs are tracked.
xXPBSXx commented 2026-10-11 18:32:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T18:32:46Z.


Thanks, all four points addressed in 4eb3340dc:

  • sceRudpGetMaxSegmentSize now throws NotImplemented_nid_no_patch (declared without parameters, since the signature rested on one call site); I have no cited source for a real segment size. Its TechnicalDebt line is gone.
  • sceRudpProcessEvents / sceRudpNetFlush: the TechnicalDebt line now says why success holds: sceRudpWrite, sceRudpRead and sceRudpGetStatus here never queue data (a reset or idle context), so no context holds anything to process or send.
  • The remaining line moved into "Silent stubs", away from the end of the file, so it no longer sits on the line #3469/#3496 append to. The sceRudpNetReceived line is dropped (it throws).
  • guest_rudp_pump now checks the two pump calls and that sceRudpNetReceived and sceRudpGetMaxSegmentSize throw.

Tested: check_conventions.py --base upstream/main passes, ctest -R rudp passes (3 tests), Windows only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112295541 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823#issuecomment-6112295541). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T18:32:46Z. --- Thanks, all four points addressed in `4eb3340dc`: - `sceRudpGetMaxSegmentSize` now throws `NotImplemented_nid_no_patch` (declared without parameters, since the signature rested on one call site); I have no cited source for a real segment size. Its TechnicalDebt line is gone. - `sceRudpProcessEvents` / `sceRudpNetFlush`: the TechnicalDebt line now says why success holds: `sceRudpWrite`, `sceRudpRead` and `sceRudpGetStatus` here never queue data (a reset or idle context), so no context holds anything to process or send. - The remaining line moved into "Silent stubs", away from the end of the file, so it no longer sits on the line #3469/#3496 append to. The `sceRudpNetReceived` line is dropped (it throws). - `guest_rudp_pump` now checks the two pump calls and that `sceRudpNetReceived` and `sceRudpGetMaxSegmentSize` throw. Tested: `check_conventions.py --base upstream/main` passes, `ctest -R rudp` passes (3 tests), Windows only. AI-assisted (Claude Code).
adriadam10 commented 2026-10-11 22:07:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:07:35Z.

Review: APPROVED


Checked on the PR merged onto main: core/libs build and ctest green (20/20, guest_rudp_pump included); the test does not link without the Export.cpp change. All points from the previous review are addressed (sceRudpGetMaxSegmentSize throws, the TechnicalDebt line justifies the success of the pump calls, line moved off the end of the section). Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5485205535 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3823#pullrequestreview-5485205535). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T22:07:35Z. **Review:** APPROVED --- Checked on the PR merged onto main: `core/libs` build and ctest green (20/20, `guest_rudp_pump` included); the test does not link without the Export.cpp change. All points from the previous review are addressed (`sceRudpGetMaxSegmentSize` throws, the TechnicalDebt line justifies the success of the pump calls, line moved off the end of the section). Merging once CI is green.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3823
No description provided.