fix(prx): add missing HFW imports with strict offline handling #1436

Merged
tototomate123 merged 1 commit from upstream-pr/1436 into main 2026-10-08 13:52:39 +00:00
tototomate123 commented 2026-10-08 06:29:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tototomate123 on 2026-10-08T06:29:42Z.


What

Adds three missing PPSA01521 imports. Draft: RUDP reporting remains unimplemented.

  • sceHttpSetCookieEnabled: disabling succeeds; invalid flags fail; enabling throws. No cookie engine or handle validation.
  • sceNpEntitlementAccessGetEntitlementKey: validates pointers, returns NO_ENTITLEMENT, preserves the 16-byte output. No key provisioning.
  • sceRudpGetStatus: pointer/byte-count ABI; throws without writing output. Layout and size/error rules remain unknown.

Sources: KytyPS5 (key ABI/errors), VitaSDK and shadPS4 HTTP (HTTP ABI/flags). shadPS4 RUDP provides no status layout. Calling shapes match HFW; gaps are documented in TechnicalDebt.md.

Tested

Linux x86-64, GCC 16.2.1, Release, RTX 4070 SUPER; BUILD_TESTING=ON and separate libs build.

  • New test passes: cookie errors/offline requests, key errors/output canaries, RUDP exceptions/unchanged output before/after initialization. Existing HTTP/header/TTS tests pass; conventions and diff checks pass.
  • CTest: 335/420 pass; 85 AGC graphics failures. Representative agc_driver_buffer_atomic_csub reproduces on unchanged main 7a178e22 with Vulkan error -13. Others were not individually baselined; failure set stayed unchanged after final edits.
  • Fresh HFW relink: all three added NIDs resolve. Launch still stops at missing sceKernelFutimes (NLq2b1jOaN0), before game code.

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); limitations are recorded 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 behavior; no title-specific dispatch, entitlement labels, or status values
  • Depends on: none
  • AI-assisted: yes, implementation, tests, investigation and this description were prepared with Codex
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4782786590 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1436). Originally posted by [tototomate123](https://github.com/tototomate123) on 2026-10-08T06:29:42Z. --- ### What Adds three missing PPSA01521 imports. Draft: RUDP reporting remains unimplemented. - `sceHttpSetCookieEnabled`: disabling succeeds; invalid flags fail; enabling throws. No cookie engine or handle validation. - `sceNpEntitlementAccessGetEntitlementKey`: validates pointers, returns `NO_ENTITLEMENT`, preserves the 16-byte output. No key provisioning. - `sceRudpGetStatus`: pointer/byte-count ABI; throws without writing output. Layout and size/error rules remain unknown. Sources: [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libNet.cpp) (key ABI/errors), [VitaSDK](https://github.com/vitasdk/vita-headers/blob/master/include/psp2/net/http.h) and [shadPS4 HTTP](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp) (HTTP ABI/flags). [shadPS4 RUDP](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/rudp/rudp.cpp) provides no status layout. Calling shapes match HFW; gaps are documented in `TechnicalDebt.md`. ### Tested Linux x86-64, GCC 16.2.1, Release, RTX 4070 SUPER; `BUILD_TESTING=ON` and separate `libs` build. - New test passes: cookie errors/offline requests, key errors/output canaries, RUDP exceptions/unchanged output before/after initialization. Existing HTTP/header/TTS tests pass; conventions and diff checks pass. - CTest: **335/420 pass; 85 AGC graphics failures**. Representative `agc_driver_buffer_atomic_csub` reproduces on unchanged main `7a178e22` with Vulkan error -13. Others were not individually baselined; failure set stayed unchanged after final edits. - Fresh HFW relink: all three added NIDs resolve. Launch still stops at missing `sceKernelFutimes` (`NLq2b1jOaN0`), before game code. ### 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`); limitations are recorded 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 behavior; no title-specific dispatch, entitlement labels, or status values - [x] Depends on: none - [x] AI-assisted: yes, implementation, tests, investigation and this description were prepared with Codex
github-actions[bot] commented 2026-10-08 06:34:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T06:34:15Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1307 core/libs/CMakeLists.txt L133
#1499 core/libs/CMakeLists.txt L133
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6053958003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1436#issuecomment-6053958003). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T06:34:15Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1307 | `core/libs/CMakeLists.txt` [L133](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/core/libs/CMakeLists.txt#L133) | | | | #1499 | `core/libs/CMakeLists.txt` [L133](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/core/libs/CMakeLists.txt#L133) | | |
tototomate123 commented 2026-10-08 06:39:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tototomate123 on 2026-10-08T06:39:01Z.


Other open pull requests touch the same code.

#1307 changes unrelated POSIX I/O behavior; neither PR depends on the other or duplicates its implementation. The conflict is only because both register new tests at the same location in core/libs/CMakeLists.txt, and can be resolved by keeping both test blocks

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6054041097 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1436#issuecomment-6054041097). Originally posted by [tototomate123](https://github.com/tototomate123) on 2026-10-08T06:39:01Z. --- > Other open pull requests touch the same code. #1307 changes unrelated POSIX I/O behavior; neither PR depends on the other or duplicates its implementation. The conflict is only because both register new tests at the same location in `core/libs/CMakeLists.txt`, and can be resolved by keeping both test blocks
github-actions[bot] commented 2026-10-08 13:32:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T13:32:18Z.


Progress report (7a178e2 → 0b0526c)

📉 System libraries: 85.13% (-0.05%, +1 implemented, +2 declared functions)

✅ 1 implemented
Library Name
libSceNpEntitlementAccess sceNpEntitlementAccessGetEntitlementKey
🆕 2 declared as stubs
Library Name
libSceHttp sceHttpSetCookieEnabled
libSceRudp sceRudpGetStatus
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6061005670 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1436#issuecomment-6061005670). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T13:32:18Z. --- <!-- progress-report --> ### Progress report (7a178e2 → 0b0526c) 📉 **System libraries**: 85.13% (-0.05%, +1 implemented, +2 declared functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceNpEntitlementAccess | `sceNpEntitlementAccessGetEntitlementKey` | </details> <details> <summary>🆕 2 declared as stubs</summary> | Library | Name | | - | - | | libSceHttp | `sceHttpSetCookieEnabled` | | libSceRudp | `sceRudpGetStatus` | </details>
adriadam10 commented 2026-10-08 13:52:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:52:35Z.


Checked on Linux (build + full ctest on top of current main, 459/459; guest_offline_imports fails to build without the change). Signature, 16-byte key and 0x817D0002/0x817D0007 match KytyPS5 libNet.cpp; invalid cookie flags use the same error as sceHttpSetInflateGZIPEnabled; unmodelled paths throw and the gaps are in TechnicalDebt. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6061387571 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1436#issuecomment-6061387571). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T13:52:35Z. --- Checked on Linux (build + full ctest on top of current main, 459/459; `guest_offline_imports` fails to build without the change). Signature, 16-byte key and `0x817D0002`/`0x817D0007` match KytyPS5 `libNet.cpp`; invalid cookie flags use the same error as `sceHttpSetInflateGZIPEnabled`; unmodelled paths throw and the gaps are in TechnicalDebt. 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!1436
No description provided.