feat: answer seven libSceAppContent add-content calls and sceRudpSetMaxSegmentSize from their sources #10993

Merged
EagleBearerYS merged 5 commits from upstream-pr/10993 into main 2026-10-27 08:18:04 +00:00
EagleBearerYS commented 2026-10-25 12:46:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-25T12:46:06Z.


What

Implements eight pending exports whose behaviour a public source names, for each function itself.

  • libSceAppContent (7):
    • The calls: sceAppContentAddcontEnqueueDownloadByEntitlemetId, sceAppContentAddcontEnqueueDownloadSp, sceAppContentAddcontMountByEntitlemetId, sceAppContentAddcontShrink, sceAppContentGetAddcontInfoByEntitlementId, sceAppContentGetAddcontInfoListByIroTag and sceAppContentGetPftFlag.
    • Prototypes and answers: they take dlc_emu's prototypes (fcf69b16, dlc_content.h), and give the answers dlc_emu gives for content it doesn't know (dlc_content.cpp L2040-L2209, L2343-L2347): NOT_FOUND, DRM_NO_ENTITLEMENT, 0 entries, PFT flag 0, and PARAMETER for null arguments. Each answer comes after the library's initialization guard.
    • Padded labels: dlc_emu rejects a padded label at every SDK, while the done label calls gate that check. So Sp and Shrink answer PARAMETER for a padded label from SDK 0x03500000, and throw below it.
  • libSceRudp (1): sceRudpSetMaxSegmentSize(uint16_t) follows Vita3K (c86ac732 SceLibRudp.cpp L1573-L1584) and RPCS3 (8b9ee605 cellRudp.cpp L149):
    • NOT_INITIALIZED before sceRudpInit;
    • NOT_ACCEPTABLE while a context exists;
    • otherwise the size is stored.
    • sceRudpGetMaxSegmentSize is unchanged and keeps reporting the 1410 measured on a PS5 (#3073). Vita3K leaves the getter unimplemented, so no source says it reports a stored size.

No title in our title-function lists calls these functions; it opens because the sources name the behaviour.

  • The AppContent answers: the debt files record them as the offline no-add-content model, with their sources.
  • The initialization guard: it follows the library-wide guard recovered in docs/dev/debt/libSceAppContent.md, not a per-function source.

Tested

  • GitHub's runners: run 40193321571. guest_appcontent and guest_rudp_pump pass 10 of 10 on Linux and on Windows, 0 skipped. With main's Export.cpp files, the tests don't build, since main declares the eight calls with no parameters.
  • Linux x86-64 (Ubuntu 24.04, gcc 13.3.0), no title:
    • each commit's new behaviour checks fail against main's stubs with the new signatures kept, and pass with the commit: AppContent 32 of 32 (38 of 38 assertions green). The Rudp setter's four return-value checks fail against main's stub, which throws;
    • CI-configured build, then ctest as an unprivileged user: 2,218 tests, 2,123 passed, 90 skipped and 5 failed. The five need IPv6, which that machine lacks: guest_net_buffer_validation, guest_socket_options, guest_socket_stream_options, guest_socket_address_length and guest_tcp.

Related: #10289 (AppContent uninitialized-rejection tests; merges cleanly with this). Overlaps: Noxy-HNR's #9638, which implements sceAppContentGetEntitlementKey in the same files, merged first, as agreed; this branch now merges it. #10954 (AZLisme) rewrites the sceRudpPollWait entry in docs/dev/debt/libSceRudp.md, next to the entry this PR edits: an adjacent-line conflict only, and this one goes after it too.

  • 8a9f6ca7bc, a merge of main 88f99678bf (run), after #9638 merged. #9638's sceAppContentGetEntitlementKey sits next to this PR's lines in include/Api.hpp, GuestAppContent.cpp and the AppContent debt file. The merge keeps main's declaration of it beside this PR's sceAppContentGetPftFlag(uint32_t*), both test blocks and both debt entries. It sets the pending-exports count to 8, the NotImplemented exports left in Export.cpp. guest_appcontent, the guest_rudp tests and public_headers pass 10 runs in a row. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 7 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (144 and 209) and on Windows (171 and 227). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. The branch merges cleanly with main 49d1f9b07e.
  • 8403d31744, after oneandonlydean's review (run): guest_appcontent no longer requires sceAppContentAddcontEnqueueDownloadSp and sceAppContentAddcontShrink to throw for a padded label below SDK 0x03500000. Both still throw there, and the PARAMETER checks from 0x03500000 up stay. guest_appcontent, the guest_rudp tests and public_headers pass 10 runs in a row. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 7 pass, 0 skip, 0 fail, on the job's second attempt; on the first, public_headers timed out at its 30 s limit on its first repetition, where it took 17 to 18 s in the previous run. Suites: libc and libkernel pass on Linux (144 and 209), and libc passes on Windows (171). Windows' libkernel suite runs 227 tests and fails guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web, which this PR doesn't touch; main 88f99678bf fails the same two in this verify's Windows job (run). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 8d3f15f0e0, a merge of main e0b13f2990 (run). AZLisme's #10954 rewrites the sceRudpPoll* entry in docs/dev/debt/libSceRudp.md with a firmware 13.42 report, adds an entry for sceRudpPollCancel, sceRudpPollDestroy and sceRudpEnd, and keeps sceRudpSetMaxSegmentSize in the list of throwing placeholders, on the lines this PR changes. The merge takes #10954's entries and drops sceRudpSetMaxSegmentSize from that list, since this PR implements it and documents it in its own entry. This PR's other changed lines are the same. The Rudp tests, #10954's guest_rudp_empty_poll among them, and guest_appcontent, with the tests for the files the merge changes, pass 10 runs in a row. Linux: 311 run, 301 pass, 10 skip (seven AGC tests on lavapipe and three video-out tests with no display or Vulkan device), 0 fail. Windows: 328 run, 242 pass, 86 skip (83 AGC tests and the same three video-out tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (145 and 212) and on Windows (174 and 233). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

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 under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10954 (merge order only; adjacent entries in docs/dev/debt/libSceRudp.md, resolved here after it merges, keeping both changes)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: none needed (no GPU code)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5004843357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10993). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-25T12:46:06Z. --- ### What Implements eight pending exports whose behaviour a public source names, for each function itself. - **libSceAppContent (7):** - **The calls:** `sceAppContentAddcontEnqueueDownloadByEntitlemetId`, `sceAppContentAddcontEnqueueDownloadSp`, `sceAppContentAddcontMountByEntitlemetId`, `sceAppContentAddcontShrink`, `sceAppContentGetAddcontInfoByEntitlementId`, `sceAppContentGetAddcontInfoListByIroTag` and `sceAppContentGetPftFlag`. - **Prototypes and answers:** they take dlc_emu's prototypes ([fcf69b16](https://github.com/drakmor/dlc_emu/blob/fcf69b16d46a9850578bce19dc2c1b4dc867cbb5/src/dlc_modules/dlc_content.h), `dlc_content.h`), and give the answers dlc_emu gives for content it doesn't know ([`dlc_content.cpp` L2040-L2209](https://github.com/drakmor/dlc_emu/blob/fcf69b16d46a9850578bce19dc2c1b4dc867cbb5/src/dlc_modules/dlc_content.cpp#L2040-L2209), [L2343-L2347](https://github.com/drakmor/dlc_emu/blob/fcf69b16d46a9850578bce19dc2c1b4dc867cbb5/src/dlc_modules/dlc_content.cpp#L2343-L2347)): NOT_FOUND, DRM_NO_ENTITLEMENT, 0 entries, PFT flag 0, and PARAMETER for null arguments. Each answer comes after the library's initialization guard. - **Padded labels:** dlc_emu rejects a padded label at every SDK, while the done label calls gate that check. So `Sp` and `Shrink` answer PARAMETER for a padded label from SDK 0x03500000, and throw below it. - **libSceRudp (1):** `sceRudpSetMaxSegmentSize(uint16_t)` follows Vita3K ([c86ac732 `SceLibRudp.cpp` L1573-L1584](https://github.com/AndnixSH/Vita3K-PS-Vita-OS-Fork/blob/c86ac732bc811057e690bed280c5076bdf95385e/vita3k/modules/SceRudp/SceLibRudp.cpp#L1573-L1584)) and RPCS3 ([8b9ee605 `cellRudp.cpp` L149](https://github.com/RPCS3/rpcs3/blob/8b9ee60569753db8406b66d135cce112156172a1/rpcs3/Emu/Cell/Modules/cellRudp.cpp#L149-L153)): - NOT_INITIALIZED before `sceRudpInit`; - NOT_ACCEPTABLE while a context exists; - otherwise the size is stored. - `sceRudpGetMaxSegmentSize` is unchanged and keeps reporting the 1410 measured on a PS5 (#3073). Vita3K leaves the getter unimplemented, so no source says it reports a stored size. No title in our title-function lists calls these functions; it opens because the sources name the behaviour. - **The AppContent answers:** the debt files record them as the offline no-add-content model, with their sources. - **The initialization guard:** it follows the library-wide guard recovered in `docs/dev/debt/libSceAppContent.md`, not a per-function source. ### Tested - **GitHub's runners:** [run 40193321571](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40193321571). `guest_appcontent` and `guest_rudp_pump` pass 10 of 10 on Linux and on Windows, 0 skipped. With main's `Export.cpp` files, the tests don't build, since main declares the eight calls with no parameters. - **Linux** x86-64 (Ubuntu 24.04, gcc 13.3.0), no title: - each commit's new behaviour checks fail against main's stubs with the new signatures kept, and pass with the commit: AppContent 32 of 32 (38 of 38 assertions green). The Rudp setter's four return-value checks fail against main's stub, which throws; - CI-configured build, then `ctest` as an unprivileged user: 2,218 tests, 2,123 passed, 90 skipped and 5 failed. The five need IPv6, which that machine lacks: `guest_net_buffer_validation`, `guest_socket_options`, `guest_socket_stream_options`, `guest_socket_address_length` and `guest_tcp`. Related: #10289 (AppContent uninitialized-rejection tests; merges cleanly with this). Overlaps: Noxy-HNR's #9638, which implements `sceAppContentGetEntitlementKey` in the same files, merged first, as agreed; this branch now merges it. #10954 (AZLisme) rewrites the `sceRudpPollWait` entry in `docs/dev/debt/libSceRudp.md`, next to the entry this PR edits: an adjacent-line conflict only, and this one goes after it too. - **8a9f6ca7bc, a merge of `main` 88f99678bf** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40237162317)), after #9638 merged. #9638's `sceAppContentGetEntitlementKey` sits next to this PR's lines in `include/Api.hpp`, `GuestAppContent.cpp` and the AppContent debt file. The merge keeps `main`'s declaration of it beside this PR's `sceAppContentGetPftFlag(uint32_t*)`, both test blocks and both debt entries. It sets the pending-exports count to 8, the `NotImplemented` exports left in `Export.cpp`. `guest_appcontent`, the `guest_rudp` tests and `public_headers` pass 10 runs in a row. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 7 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (144 and 209) and on Windows (171 and 227). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. The branch merges cleanly with `main` 49d1f9b07e. - **8403d31744, after oneandonlydean's review** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40280039102)): `guest_appcontent` no longer requires `sceAppContentAddcontEnqueueDownloadSp` and `sceAppContentAddcontShrink` to throw for a padded label below SDK 0x03500000. Both still throw there, and the PARAMETER checks from 0x03500000 up stay. `guest_appcontent`, the `guest_rudp` tests and `public_headers` pass 10 runs in a row. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 7 pass, 0 skip, 0 fail, on the job's second attempt; on the first, `public_headers` timed out at its 30 s limit on its first repetition, where it took 17 to 18 s in the previous run. Suites: libc and libkernel pass on Linux (144 and 209), and libc passes on Windows (171). Windows' libkernel suite runs 227 tests and fails `guest_timed_join_import_libkernel_sys` and `guest_timed_join_import_libkernel_web`, which this PR doesn't touch; `main` 88f99678bf fails the same two in this verify's Windows job ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40238050809)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **8d3f15f0e0, a merge of `main` e0b13f2990** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40389406005)). AZLisme's #10954 rewrites the `sceRudpPoll*` entry in `docs/dev/debt/libSceRudp.md` with a firmware 13.42 report, adds an entry for `sceRudpPollCancel`, `sceRudpPollDestroy` and `sceRudpEnd`, and keeps `sceRudpSetMaxSegmentSize` in the list of throwing placeholders, on the lines this PR changes. The merge takes #10954's entries and drops `sceRudpSetMaxSegmentSize` from that list, since this PR implements it and documents it in its own entry. This PR's other changed lines are the same. The Rudp tests, #10954's `guest_rudp_empty_poll` among them, and `guest_appcontent`, with the tests for the files the merge changes, pass 10 runs in a row. Linux: 311 run, 301 pass, 10 skip (seven AGC tests on lavapipe and three video-out tests with no display or Vulkan device), 0 fail. Windows: 328 run, 242 pass, 86 skip (83 AGC tests and the same three video-out tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (145 and 212) and on Windows (174 and 233). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10954 (merge order only; adjacent entries in `docs/dev/debt/libSceRudp.md`, resolved here after it merges, keeping both changes) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: none needed (no GPU code) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 12:55:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T12:55:41Z.

Review: APPROVED


Reviewed the full diff against the current base and checked the cited implementation references for the AppContent return paths and RUDP setter checks. The new AppContent no-content results, initialization/null handling, and list-count contract are consistent with the cited dlc_emu code; the RUDP setter's initialization/context checks and stored value match the cited Vita3K implementation. The implementation and debt notes also disclose that these behaviors have not been verified on PS5.

Checks I ran: git diff --check upstream/main...HEAD and python3 tools/check_conventions.py --base upstream/main --head HEAD passed. I attempted CMake configuration with BUILD_TESTING=ON; configuration stopped before building because the SDL2 submodule is not initialized in this checkout and the environment lacks XRandR development support, so I could not independently run the focused tests here. The PR's linked runner report records the focused AppContent and RUDP tests passing on Linux and Windows.

I found no blocking issue in the reviewed scope. The stored RUDP MSS is not consumed by the current networking implementation, which does not yet send or segment data; that limitation is accurately recorded in the debt note.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643280941 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10993#pullrequestreview-5643280941). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T12:55:41Z. **Review:** APPROVED --- Reviewed the full diff against the current base and checked the cited implementation references for the AppContent return paths and RUDP setter checks. The new AppContent no-content results, initialization/null handling, and list-count contract are consistent with the cited `dlc_emu` code; the RUDP setter's initialization/context checks and stored value match the cited Vita3K implementation. The implementation and debt notes also disclose that these behaviors have not been verified on PS5. Checks I ran: `git diff --check upstream/main...HEAD` and `python3 tools/check_conventions.py --base upstream/main --head HEAD` passed. I attempted CMake configuration with `BUILD_TESTING=ON`; configuration stopped before building because the SDL2 submodule is not initialized in this checkout and the environment lacks XRandR development support, so I could not independently run the focused tests here. The PR's linked runner report records the focused AppContent and RUDP tests passing on Linux and Windows. I found no blocking issue in the reviewed scope. The stored RUDP MSS is not consumed by the current networking implementation, which does not yet send or segment data; that limitation is accurately recorded in the debt note.
MarcZX10 commented 2026-10-25 13:33:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:33:24Z.

Review: CHANGES_REQUESTED


The overlap bot lists #10954, and I verified the current exact heads with git merge-tree --write-tree --name-only refs/remotes/review/pr-10954 refs/remotes/review/pr-10993: there is a content conflict in docs/dev/debt/libSceRudp.md. #10993 removes sceRudpSetMaxSegmentSize from the unresolved-export entry while #10954 changes the adjacent sceRudpPollWait entry. The work is distinct, but the open branches need a coordinated merge order.

Please agree the sequence with #10954's author, update the checklist dependency ordering alongside the existing #9638 merge-order note, and rebase/resolve the conflict while preserving both documentation changes. This is an integration request; I found no duplicate implementation in the two PRs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643409163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10993#pullrequestreview-5643409163). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T13:33:24Z. **Review:** CHANGES_REQUESTED --- The overlap bot lists #10954, and I verified the current exact heads with `git merge-tree --write-tree --name-only refs/remotes/review/pr-10954 refs/remotes/review/pr-10993`: there is a content conflict in `docs/dev/debt/libSceRudp.md`. #10993 removes `sceRudpSetMaxSegmentSize` from the unresolved-export entry while #10954 changes the adjacent `sceRudpPollWait` entry. The work is distinct, but the open branches need a coordinated merge order. Please agree the sequence with #10954's author, update the checklist dependency ordering alongside the existing #9638 merge-order note, and rebase/resolve the conflict while preserving both documentation changes. This is an integration request; I found no duplicate implementation in the two PRs.
MarcZX10 commented 2026-10-25 14:23:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T14:23:03Z.

Review: APPROVED


Re-reviewed the current head and the updated integration note. The earlier blocking concern was the adjacent edit shared with #10954; both authors have now agreed that #10954 merges first, and this PR records that dependency and will preserve both entries after rebasing. The implementation and focused tests reviewed previously are unchanged.\n\nThe overlap is an integration-order dependency rather than duplicate functionality. Please rebase onto main after #10954 merges so the combined debt file is represented on the final head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643649199 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10993#pullrequestreview-5643649199). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T14:23:03Z. **Review:** APPROVED --- Re-reviewed the current head and the updated integration note. The earlier blocking concern was the adjacent edit shared with #10954; both authors have now agreed that #10954 merges first, and this PR records that dependency and will preserve both entries after rebasing. The implementation and focused tests reviewed previously are unchanged.\n\nThe overlap is an integration-order dependency rather than duplicate functionality. Please rebase onto main after #10954 merges so the combined debt file is represented on the final head.
MarcZX10 commented 2026-10-25 14:23:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T14:23:39Z.

Review: APPROVED


Re-reviewed the current head and the updated integration note. The earlier blocking concern was the adjacent libSceRudp.md edit shared with #10954; both authors have now agreed that #10954 merges first, and this PR records that dependency and will preserve both entries after rebasing. The implementation and focused tests reviewed previously are unchanged.

The overlap is an integration-order dependency rather than duplicate functionality. Please rebase onto main after #10954 merges so the combined debt file is represented on the final head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5643651032 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10993#pullrequestreview-5643651032). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T14:23:39Z. **Review:** APPROVED --- Re-reviewed the current head and the updated integration note. The earlier blocking concern was the adjacent `libSceRudp.md` edit shared with #10954; both authors have now agreed that #10954 merges first, and this PR records that dependency and will preserve both entries after rebasing. The implementation and focused tests reviewed previously are unchanged. The overlap is an integration-order dependency rather than duplicate functionality. Please rebase onto main after #10954 merges so the combined debt file is represented on the final head.
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!10993
No description provided.