Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
GoodTimeclubs:feat/exports-ppsa01317
Oct 13, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
GoodTimeclubs:feat/exports-ppsa01317

Conversation

@GoodTimeclubs

Copy link
Copy Markdown
Contributor

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 (d33dad0). 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 Gran Turismo 7 (PPSA01317): ten missing exports, two USB storage libraries, and unaligned shader headers in ABI resolution (patches attached) #4782. With this PR the title still needs a working sceSslCreateConnection (fix(libSceSsl): add missing verification callback export #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 Gran Turismo 7 (PPSA01317) #4697 (partly, see Tested)
  • AI-assisted: yes (Claude Code)

Gran Turismo 7 (PPSA01317) fails to load on unresolved imports and on
two needed libraries that AnyPS5 does not build (boykopovar#4782).

- sceAppContentDownloadDataFormat empties /download0, as
  sceAppContentTemporaryDataFormat does for /temp0.
- sceNpAuthSetTimeout returns REQUEST_NOT_FOUND for an unknown request
  like the other request calls, and OK otherwise; no request reaches the
  network the timeouts would bound.
- sceNpWebApi2PushEventSetHandleTimeout throws for an unknown library
  context, like sceNpWebApi2GetMemoryPoolStats, and returns OK
  otherwise; push event handles are not tracked and nothing waits on
  one offline.
- sceSslDisableVerifyOption, sceSslGetAlpnSelected, sceSslSetAlpn,
  sceSslSetMinSslVersion, sceAudioOutDeviceIdOpen and the unnamed
  libScePsml NIDs xNZM9Y5lf-M and lcZD9tJraAw are declared without
  parameters and throw; their signatures are unknown.
- libSceUsbStorage and libSceUsbStorageDialog exist with no exports,
  like libSceXml: the title lists both as needed but imports nothing
  from them.

Each assumption is recorded in the library's technical debt file.

Co-authored-by: dawid-swiecicki <8942606+dawid-swiecicki@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

@adriadam10

Copy link
Copy Markdown
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants