feat(exports): export the calls PPSA01317 imports #4834

Merged
GoodTimeclubs merged 1 commit from upstream-pr/4834 into main 2026-10-13 07:33:36 +00:00
GoodTimeclubs commented 2026-10-12 23:12:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GoodTimeclubs on 2026-10-12T23:12:36Z.


What

Gran Turismo 7 (PPSA01317) fails to load on unresolved imports, and on two needed libraries that AnyPS5 does not build. Both are listed in #4782. This PR covers what the first patch attached there adds, reworked to follow CONTRIBUTING: real behaviour where it can be derived, a throwing export where the signature is unknown, and no code comments.

Library Export Behaviour
libSceAppContent sceAppContentDownloadDataFormat Empties /download0, creating it if needed, as sceAppContentTemporaryDataFormat does for /temp0. Null mount point → PARAMETER. Another mount point throws, as in sceAppContentDownloadDataGetAvailableSpaceKb.
libSceNpAuth sceNpAuthSetTimeout Unknown request → REQUEST_NOT_FOUND, like the other request calls; otherwise OK. No request reaches the network the timeouts would bound. Signature from shadPS4 (PS4).
libSceNpWebApi2 sceNpWebApi2PushEventSetHandleTimeout An unknown library context throws, as in sceNpWebApi2GetMemoryPoolStats; otherwise OK. Push event handles are not tracked, and nothing waits on one offline. Signature follows sceNpWebApiSetHandleTimeout (PS4, shadPS4).
libSceSsl sceSslDisableVerifyOption, sceSslGetAlpnSelected, sceSslSetAlpn, sceSslSetMinSslVersion Declared without parameters, throw. They act on a connection; connections come with #4078, and these can be implemented on top of it there. They sit away from the lines #4078 changes, so the two don't conflict.
libSceAudioOut sceAudioOutDeviceIdOpen Declared without parameters, throws. Which device ids exist and how they map to host outputs is unknown. The original patch returned the port-type error instead, which the console would not return for a valid type.
libScePsml (_specularAA, _quality8K) unnamed NIDs xNZM9Y5lf-M, lcZD9tJraAw APS5_EXPORT as scePsmlUnknown01/02, throw. Built into both libScePsml and libScePsml_debug.
libSceUsbStorage, libSceUsbStorageDialog none Export-free libraries, like libSceXml (d33dad00b). The eboot lists both in DT_NEEDED but imports nothing from them.

Each assumption has an entry in the library's file under docs/dev/debt/.

This is based on patch 1 from #4782 by @dawid-swiecicki, credited with Co-authored-by. Patch 2 from that issue is #4809.

Tested

Docker container, Ubuntu 24.04, GCC 14.2, Release, -DBUILD_TESTING=ON, lavapipe:

  • guest_appcontent: formats an empty and a populated /download0 (a file and a subdirectory); a null mount point returns PARAMETER and leaves the files in place.
  • guest_np_auth: sceNpAuthSetTimeout on sync and async requests returns OK and leaves the later results unchanged; an unknown request and a deleted request return REQUEST_NOT_FOUND.
  • guest_np_web_api2: sceNpWebApi2PushEventSetHandleTimeout returns OK on a live context and throws after sceNpWebApi2Terminate.
  • guest_psml, guest_np_auth_authorized_app_code, guest_np_auth_authorized_app_dialog: pass.
  • nm -D on the patched libraries in build/core/libs/libs shows the 11 NIDs exported (CN7EbEV7MFU, PM3IZCw-7m0, KWkc6Q3tjXc, cx2dYFbzIAg, TL86glUrmUw, PwsHbErG+e8, QWSxBzf6lAg, 4O7+bRkRUe8, and xNZM9Y5lf-M/lcZD9tJraAw in libScePsml and libScePsml_debug). libSceUsbStorage.prx and libSceUsbStorageDialog.prx are built.
  • Full ctest after cmake --build build (994 tests): 992 pass. The other two, agc_driver_depth_compare_copy and guest_named_shm_concurrency, fail the same way on main without this change. Both come from the container: Docker's seccomp profile blocks userfaultfd, and the tests run as root.
  • python3 tools/check_conventions.py --base origin/main and python3 tools/check_test_registration.py build: passed.
  • Not tested with the title: I don't have GT7. The import list is the one in #4782. With this PR the title still needs a working sceSslCreateConnection (#4078), and it may stop at one of the throwing exports.
  • Not run on Windows.

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: none
  • Unblocks: PPSA01317 #4697 (partly, see Tested)
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4836082700 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4834). Originally posted by [GoodTimeclubs](https://github.com/GoodTimeclubs) on 2026-10-12T23:12:36Z. --- ### What Gran Turismo 7 (PPSA01317) fails to load on unresolved imports, and on two needed libraries that AnyPS5 does not build. Both are listed in #4782. This PR covers what the first patch attached there adds, reworked to follow CONTRIBUTING: real behaviour where it can be derived, a throwing export where the signature is unknown, and no code comments. | Library | Export | Behaviour | |---|---|---| | libSceAppContent | `sceAppContentDownloadDataFormat` | Empties `/download0`, creating it if needed, as `sceAppContentTemporaryDataFormat` does for `/temp0`. Null mount point → `PARAMETER`. Another mount point throws, as in `sceAppContentDownloadDataGetAvailableSpaceKb`. | | libSceNpAuth | `sceNpAuthSetTimeout` | Unknown request → `REQUEST_NOT_FOUND`, like the other request calls; otherwise OK. No request reaches the network the timeouts would bound. Signature from shadPS4 (PS4). | | libSceNpWebApi2 | `sceNpWebApi2PushEventSetHandleTimeout` | An unknown library context throws, as in `sceNpWebApi2GetMemoryPoolStats`; otherwise OK. Push event handles are not tracked, and nothing waits on one offline. Signature follows `sceNpWebApiSetHandleTimeout` (PS4, shadPS4). | | libSceSsl | `sceSslDisableVerifyOption`, `sceSslGetAlpnSelected`, `sceSslSetAlpn`, `sceSslSetMinSslVersion` | Declared without parameters, throw. They act on a connection; connections come with #4078, and these can be implemented on top of it there. They sit away from the lines #4078 changes, so the two don't conflict. | | libSceAudioOut | `sceAudioOutDeviceIdOpen` | Declared without parameters, throws. Which device ids exist and how they map to host outputs is unknown. The original patch returned the port-type error instead, which the console would not return for a valid type. | | libScePsml (`_specularAA`, `_quality8K`) | unnamed NIDs `xNZM9Y5lf-M`, `lcZD9tJraAw` | `APS5_EXPORT` as `scePsmlUnknown01`/`02`, throw. Built into both libScePsml and libScePsml_debug. | | libSceUsbStorage, libSceUsbStorageDialog | none | Export-free libraries, like libSceXml (d33dad00b). The eboot lists both in `DT_NEEDED` but imports nothing from them. | Each assumption has an entry in the library's file under `docs/dev/debt/`. This is based on patch 1 from #4782 by @dawid-swiecicki, credited with `Co-authored-by`. Patch 2 from that issue is #4809. ### Tested Docker container, Ubuntu 24.04, GCC 14.2, Release, `-DBUILD_TESTING=ON`, lavapipe: - `guest_appcontent`: formats an empty and a populated `/download0` (a file and a subdirectory); a null mount point returns `PARAMETER` and leaves the files in place. - `guest_np_auth`: `sceNpAuthSetTimeout` on sync and async requests returns OK and leaves the later results unchanged; an unknown request and a deleted request return `REQUEST_NOT_FOUND`. - `guest_np_web_api2`: `sceNpWebApi2PushEventSetHandleTimeout` returns OK on a live context and throws after `sceNpWebApi2Terminate`. - `guest_psml`, `guest_np_auth_authorized_app_code`, `guest_np_auth_authorized_app_dialog`: pass. - `nm -D` on the patched libraries in `build/core/libs/libs` shows the 11 NIDs exported (`CN7EbEV7MFU`, `PM3IZCw-7m0`, `KWkc6Q3tjXc`, `cx2dYFbzIAg`, `TL86glUrmUw`, `PwsHbErG+e8`, `QWSxBzf6lAg`, `4O7+bRkRUe8`, and `xNZM9Y5lf-M`/`lcZD9tJraAw` in libScePsml and libScePsml_debug). `libSceUsbStorage.prx` and `libSceUsbStorageDialog.prx` are built. - Full `ctest` after `cmake --build build` (994 tests): 992 pass. The other two, `agc_driver_depth_compare_copy` and `guest_named_shm_concurrency`, fail the same way on `main` without this change. Both come from the container: Docker's seccomp profile blocks `userfaultfd`, and the tests run as root. - `python3 tools/check_conventions.py --base origin/main` and `python3 tools/check_test_registration.py build`: passed. - Not tested with the title: I don't have GT7. The import list is the one in #4782. With this PR the title still needs a working `sceSslCreateConnection` (#4078), and it may stop at one of the throwing exports. - Not run on Windows. ### 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: none - [x] Unblocks: PPSA01317 #4697 (partly, see Tested) - [x] AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-12 23:28:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T23:28:21Z.


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
#4778 docs/dev/debt/libSceAudioOut.md L18
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6134584317 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4834#issuecomment-6134584317). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T23:28:21Z. --- <!-- 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 | |---|---|---|---| | #4778 | `docs/dev/debt/libSceAudioOut.md` [L18](https://github.com/boykopovar/AnyPS5/blob/30caf2b2a5641764312a5586eebe888e4074a209/docs/dev/debt/libSceAudioOut.md#L18) | | |
github-actions[bot] commented 2026-10-13 07:27:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T07:27:54Z.


Progress report (90c6839 → 8a7e119)

📉 System libraries: 87.7% (-0.17%, +3 implemented, +7 declared functions)

✅ 3 implemented
Library Name
libSceAppContent sceAppContentDownloadDataFormat
libSceNpAuth sceNpAuthSetTimeout
libSceNpWebApi2 sceNpWebApi2PushEventSetHandleTimeout
🆕 7 declared as stubs
Library Name
libSceAudioOut sceAudioOutDeviceIdOpen
libScePsml_debug scePsmlUnknown01
libScePsml_debug scePsmlUnknown02
libSceSsl sceSslDisableVerifyOption
libSceSsl sceSslGetAlpnSelected
libSceSsl sceSslSetAlpn
libSceSsl sceSslSetMinSslVersion
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6140557334 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4834#issuecomment-6140557334). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T07:27:54Z. --- <!-- progress-report --> ### Progress report (90c6839 → 8a7e119) 📉 **System libraries**: 87.7% (-0.17%, +3 implemented, +7 declared functions) <details> <summary>✅ 3 implemented</summary> | Library | Name | | - | - | | libSceAppContent | `sceAppContentDownloadDataFormat` | | libSceNpAuth | `sceNpAuthSetTimeout` | | libSceNpWebApi2 | `sceNpWebApi2PushEventSetHandleTimeout` | </details> <details> <summary>🆕 7 declared as stubs</summary> | Library | Name | | - | - | | libSceAudioOut | `sceAudioOutDeviceIdOpen` | | libScePsml_debug | `scePsmlUnknown01` | | libScePsml_debug | `scePsmlUnknown02` | | libSceSsl | `sceSslDisableVerifyOption` | | libSceSsl | `sceSslGetAlpnSelected` | | libSceSsl | `sceSslSetAlpn` | | libSceSsl | `sceSslSetMinSslVersion` | </details>
adriadam10 commented 2026-10-13 07:33:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T07:33:33Z.


Checked build and the affected ctest set (39 tests, green) on the PR merged onto main, and that the 11 NIDs match the exported names. Exports without a known signature throw, the implemented ones have a test and a debt entry; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6140642516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4834#issuecomment-6140642516). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T07:33:33Z. --- Checked build and the affected ctest set (39 tests, green) on the PR merged onto main, and that the 11 NIDs match the exported names. Exports without a known signature throw, the implemented ones have a test and a debt entry; merging.
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!4834
No description provided.