feat(libSceRudp): implement sceRudpGetStatus #2359

Merged
mrzacarias merged 2 commits from upstream-pr/2359 into main 2026-10-09 22:04:52 +00:00
mrzacarias commented 2026-10-09 16:17:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrzacarias on 2026-10-09T16:17:47Z.


What

sceRudpGetStatus threw NotImplemented_nid_no_patch even after initialization. PPSA01521 calls it with an output pointer and byte count 0xF8.

It now returns RUDP_ERROR_NOT_INITIALIZED before initialization and otherwise zeroes the buffer (state 0 = idle, no connections) and returns 0, mirroring the sibling sceRudpGetContextStatus.

The status layout and size rules are unknown, so the buffer is zeroed and the size is not validated; recorded in TechnicalDebt.

Tested

  • python3 tools/check_conventions.py --base origin/main passes.
  • Not run on a title; follows the existing sceRudpGetContextStatus body.

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; 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
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4803018384 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359). Originally posted by [mrzacarias](https://github.com/mrzacarias) on 2026-10-09T16:17:47Z. --- ### What `sceRudpGetStatus` threw `NotImplemented_nid_no_patch` even after initialization. PPSA01521 calls it with an output pointer and byte count `0xF8`. It now returns `RUDP_ERROR_NOT_INITIALIZED` before initialization and otherwise zeroes the buffer (state 0 = idle, no connections) and returns 0, mirroring the sibling `sceRudpGetContextStatus`. The status layout and size rules are unknown, so the buffer is zeroed and the size is not validated; recorded in TechnicalDebt. ### Tested - `python3 tools/check_conventions.py --base origin/main` passes. - Not run on a title; follows the existing `sceRudpGetContextStatus` body. ### 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; 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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
Kikoarl commented 2026-10-09 18:29:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-09T18:29:38Z.


Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at adbd8f5e:

  • Build: Built cleanly in RAM (/tmp/anyps5_build) with zero warnings/errors.
  • Conventions: python3 tools/check_conventions.py --base origin/main --head HEAD -> PASS (0 errors).
  • Verification: Verified sceRudpGetStatus export and initialization checks in libSceRudp/Export.cpp. Gracefully writes idle status when initialized and returns RUDP_ERROR_NOT_INITIALIZED otherwise, with proper technical debt documentation.

LGTM!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086888298 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359#issuecomment-6086888298). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-09T18:29:38Z. --- Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at `adbd8f5e`: - **Build**: Built cleanly in RAM (`/tmp/anyps5_build`) with zero warnings/errors. - **Conventions**: `python3 tools/check_conventions.py --base origin/main --head HEAD` -> **PASS (0 errors)**. - **Verification**: Verified `sceRudpGetStatus` export and initialization checks in `libSceRudp/Export.cpp`. Gracefully writes idle status when initialized and returns `RUDP_ERROR_NOT_INITIALIZED` otherwise, with proper technical debt documentation. LGTM!
popcoder565 commented 2026-10-09 19:41:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:41:34Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head adbd8f5e, merged onto main 8b393b6e in one build with 31 other PRs that had no Windows run.

This breaks the existing guest_offline_imports test on any platform. The test aborts, because GuestOfflineImports.cpp (lines 71-86) still expects sceRudpGetStatus to throw sceRudpGetStatus not implemented, before and after sceRudpInit. With main's libSceRudp/Export.cpp swapped back into the same build, it passes 3 of 3. With this PR's version, it aborts 2 of 2. The test's Rudp part needs updating along with the implementation.

The rest of the suite passes in that build (520 of 521).

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088005326 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359#issuecomment-6088005326). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T19:41:34Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `adbd8f5e`, merged onto `main` 8b393b6e in one build with 31 other PRs that had no Windows run. **This breaks the existing `guest_offline_imports` test** on any platform. The test aborts, because `GuestOfflineImports.cpp` (lines 71-86) still expects `sceRudpGetStatus` to throw `sceRudpGetStatus not implemented`, before and after `sceRudpInit`. With `main`'s `libSceRudp/Export.cpp` swapped back into the same build, it passes 3 of 3. With this PR's version, it aborts 2 of 2. The test's Rudp part needs updating along with the implementation. The rest of the suite passes in that build (520 of 521). _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
mrzacarias commented 2026-10-09 19:58:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrzacarias on 2026-10-09T19:58:11Z.


Fixed the test breakage: GuestOfflineImports.cpp now expects sceRudpGetStatus to return RUDP_ERROR_NOT_INITIALIZED before init and zero the status buffer after init, instead of throwing not-implemented. Verified locally in a Linux container: guest_offline_imports_tests passes (exit 0).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088263424 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359#issuecomment-6088263424). Originally posted by [mrzacarias](https://github.com/mrzacarias) on 2026-10-09T19:58:11Z. --- Fixed the test breakage: `GuestOfflineImports.cpp` now expects `sceRudpGetStatus` to return `RUDP_ERROR_NOT_INITIALIZED` before init and zero the status buffer after init, instead of throwing not-implemented. Verified locally in a Linux container: `guest_offline_imports_tests` passes (exit 0).
adriadam10 commented 2026-10-09 22:04:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T22:04:49Z.


Checked on Linux: build + full ctest green (532/532), and the updated guest_offline_imports fails without the change. The TechnicalDebt line records the unknown layout and size rules. Thanks @popcoder565 for catching the test break; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090023884 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359#issuecomment-6090023884). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T22:04:49Z. --- Checked on Linux: build + full ctest green (532/532), and the updated `guest_offline_imports` fails without the change. The TechnicalDebt line records the unknown layout and size rules. Thanks @popcoder565 for catching the test break; merging.
github-actions[bot] commented 2026-10-09 22:20:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:20:40Z.


Progress report (8b393b6 → baa4b07)

📈 System libraries: 84.72% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceRudp sceRudpGetStatus
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090211805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2359#issuecomment-6090211805). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T22:20:40Z. --- <!-- progress-report --> ### Progress report (8b393b6 → baa4b07) 📈 **System libraries**: 84.72% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceRudp | `sceRudpGetStatus` | </details>
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!2359
No description provided.