feat(libs): add exports imported by PPSA12544 #699

Merged
merwie merged 3 commits from upstream-pr/699 into main 2026-10-05 23:18:12 +00:00
merwie commented 2026-10-05 16:41:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T16:41:58Z.


What

Exports imported by PPSA12544 (Hollow Knight: Silksong) and its bundled modules that were missing at startup.

Implemented:

  • scePthreadGetschedparam / scePthreadSetschedparam (libkernel): SCE-error counterparts of the existing pthread_getschedparam / pthread_setschedparam, built on scePthreadGetprio / scePthreadSetprio.
  • utimes / fsync (libScePosix, in libkernel): built on sceKernelUtimes / sceKernelFsync.
  • sceUserServiceGetAccessibilityZoomFollowFocus (libSceUserService): reports 0 like sceUserServiceGetAccessibilityZoomEnabled.
  • sceKernelGetOperationMode (libkernel, NID NH6xARDOVv8, verified hash of the name): PPSA12544 zeroes two int locals, calls it and logs them with "sceKernelGetOperationMode mode=%d submode=%d", then checks submode == 1. Both are reported as 0, as in prosper's reimplementation (mattias800/prosper#4153); recorded in TechnicalDebt.

Unimplemented exports (NotImplemented_nid_no_patch):

  • libSceFont: sceFontGraphicsDrawupFillTextureImageObject, sceFontGraphicsDrawupFillTexturePatternObject
  • libSceHttp2: sceHttp2CookieFlush, sceHttp2CreateCookieBox, sceHttp2SetCookieBox, sceHttp2SetRequestNoContentLength
  • libSceNet: sceNetResolverGetError
  • libSceSsl: sceSslFreeSslCertName, sceSslGetIssuerName, sceSslGetNameEntryCount, sceSslGetNameEntryInfo, sceSslGetPem, sceSslGetSubjectName
  • libSceSystemService: sceSystemServiceDisableMusicPlayer, sceSystemServiceOpenChallengeActivity, sceSystemServiceOpenTournamentOccurrence, sceSystemServiceReenableMusicPlayer, sceSystemServiceShowControllerSettings
  • libkernel: sceKernelFchmod, fchmod, futimes, recvmsg, sendmsg
  • libkernel B2n8aDorSH4 / PZQhiiLXRFs, also imported by the title, are sceKernelSyncOnAddressWait32 / Wait64 and left to #633. The libSceLibcInternalExt thread-exit functions OQ-dzhlnM28, qBS714-Jr3g, tB59hFLH3SA are implemented by #641 (merged) and dbOlWdppb4o by #651; rebased on main without them.
  • Unknown NIDs, recorded in TechnicalDebt: libSceAgc vieBRwlh1Lw; libScePad fCWdlnmB1Ks

Names come from the shadPS4 aerolib.inl NID list. sceVideoOutVrrPegToFixedRate / sceVideoOutVrrUnpegFromFixedRate, also imported by the title, are left to #518.

Tested

Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT.

  • ctest (rebased on 0518f0e0): 286/288 passed. agc_driver_lds_atomics64 and agc_driver_vopc_compare_table fail on this machine on this branch and on the relinker branch alike (Vulkan device tests).
  • PPSA12544: with the built libraries, every import of the executable and its bundled modules resolves except the VideoOut VRR exports of #518, the SyncOnAddress waits of #633 and dbOlWdppb4o of #651. With #698, #700 and stubs for those, the title calls sceKernelGetOperationMode during launcher setup and continues; the other implemented functions were not observed being called.

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 in TechnicalDebt
  • 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 (title startup also needs #698, #700, #518, #633 and #651)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4748101307 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/699). Originally posted by [merwie](https://github.com/merwie) on 2026-10-05T16:41:58Z. --- ### What Exports imported by PPSA12544 (Hollow Knight: Silksong) and its bundled modules that were missing at startup. Implemented: - `scePthreadGetschedparam` / `scePthreadSetschedparam` (libkernel): SCE-error counterparts of the existing `pthread_getschedparam` / `pthread_setschedparam`, built on `scePthreadGetprio` / `scePthreadSetprio`. - `utimes` / `fsync` (libScePosix, in libkernel): built on `sceKernelUtimes` / `sceKernelFsync`. - `sceUserServiceGetAccessibilityZoomFollowFocus` (libSceUserService): reports 0 like `sceUserServiceGetAccessibilityZoomEnabled`. - `sceKernelGetOperationMode` (libkernel, NID `NH6xARDOVv8`, verified hash of the name): PPSA12544 zeroes two `int` locals, calls it and logs them with `"sceKernelGetOperationMode mode=%d submode=%d"`, then checks `submode == 1`. Both are reported as 0, as in prosper's reimplementation ([mattias800/prosper#4153](https://github.com/mattias800/prosper/pull/4153)); recorded in TechnicalDebt. Unimplemented exports (`NotImplemented_nid_no_patch`): - libSceFont: `sceFontGraphicsDrawupFillTextureImageObject`, `sceFontGraphicsDrawupFillTexturePatternObject` - libSceHttp2: `sceHttp2CookieFlush`, `sceHttp2CreateCookieBox`, `sceHttp2SetCookieBox`, `sceHttp2SetRequestNoContentLength` - libSceNet: `sceNetResolverGetError` - libSceSsl: `sceSslFreeSslCertName`, `sceSslGetIssuerName`, `sceSslGetNameEntryCount`, `sceSslGetNameEntryInfo`, `sceSslGetPem`, `sceSslGetSubjectName` - libSceSystemService: `sceSystemServiceDisableMusicPlayer`, `sceSystemServiceOpenChallengeActivity`, `sceSystemServiceOpenTournamentOccurrence`, `sceSystemServiceReenableMusicPlayer`, `sceSystemServiceShowControllerSettings` - libkernel: `sceKernelFchmod`, `fchmod`, `futimes`, `recvmsg`, `sendmsg` - libkernel `B2n8aDorSH4` / `PZQhiiLXRFs`, also imported by the title, are `sceKernelSyncOnAddressWait32` / `Wait64` and left to #633. The `libSceLibcInternalExt` thread-exit functions `OQ-dzhlnM28`, `qBS714-Jr3g`, `tB59hFLH3SA` are implemented by #641 (merged) and `dbOlWdppb4o` by #651; rebased on `main` without them. - Unknown NIDs, recorded in TechnicalDebt: libSceAgc `vieBRwlh1Lw`; libScePad `fCWdlnmB1Ks` Names come from the shadPS4 `aerolib.inl` NID list. `sceVideoOutVrrPegToFixedRate` / `sceVideoOutVrrUnpegFromFixedRate`, also imported by the title, are left to #518. ### Tested Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT. - `ctest` (rebased on `0518f0e0`): 286/288 passed. `agc_driver_lds_atomics64` and `agc_driver_vopc_compare_table` fail on this machine on this branch and on the relinker branch alike (Vulkan device tests). - PPSA12544: with the built libraries, every import of the executable and its bundled modules resolves except the VideoOut VRR exports of #518, the SyncOnAddress waits of #633 and `dbOlWdppb4o` of #651. With #698, #700 and stubs for those, the title calls `sceKernelGetOperationMode` during launcher setup and continues; the other implemented functions were not observed being called. ### 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`); silent stubs are listed in TechnicalDebt - [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 (title startup also needs #698, #700, #518, #633 and #651) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-05 16:53:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T16:53:29Z.


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
#407 scePthreadGetschedparam
scePthreadSetschedparam
#545 scePthreadGetschedparam
scePthreadSetschedparam
#769 core/libs/prx/libSceFont/src/Unimplemented.cpp L445-459
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5999059924 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/699#issuecomment-5999059924). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T16:53:29Z. --- <!-- 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 | |---|---|---|---| | #407 | | `scePthreadGetschedparam`<br>`scePthreadSetschedparam` | | | #545 | | `scePthreadGetschedparam`<br>`scePthreadSetschedparam` | | | #769 | `core/libs/prx/libSceFont/src/Unimplemented.cpp` [L445-459](https://github.com/boykopovar/AnyPS5/blob/44b3778ce9d7468517661f000510769a0ba21b7d/core/libs/prx/libSceFont/src/Unimplemented.cpp#L445-L459) | | |
merwie commented 2026-10-05 20:49:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-05T20:49:19Z.


On the overlap note: #407 and #545 add scePthreadGetschedparam / scePthreadSetschedparam as NotImplemented_nid_no_patch stubs. This PR implements both (policy SCHED_FIFO and the thread priority, as pthread_getschedparam / pthread_setschedparam already do, with SCE error codes). Whichever lands second has to drop its copy; the implementation here can replace the stubs there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6002655543 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/699#issuecomment-6002655543). Originally posted by [merwie](https://github.com/merwie) on 2026-10-05T20:49:19Z. --- On the overlap note: #407 and #545 add `scePthreadGetschedparam` / `scePthreadSetschedparam` as `NotImplemented_nid_no_patch` stubs. This PR implements both (policy SCHED_FIFO and the thread priority, as `pthread_getschedparam` / `pthread_setschedparam` already do, with SCE error codes). Whichever lands second has to drop its copy; the implementation here can replace the stubs there.
github-actions[bot] commented 2026-10-05 23:04:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T23:04:53Z.


Progress report (0518f0e → 845e4dd)

📉 System libraries: 78.64% (-0.57%, +6 implemented, +25 declared functions)

✅ 6 implemented
Library Name
libSceUserService sceUserServiceGetAccessibilityZoomFollowFocus
libkernel fsync_nid_postfix
libkernel sceKernelGetOperationMode
libkernel scePthreadGetschedparam
libkernel scePthreadSetschedparam
libkernel utimes_nid_postfix
🆕 25 declared as stubs
Library Name
libSceAgc sceAgcUnknown_vieBRwlh1Lw
libSceFont sceFontGraphicsDrawupFillTextureImageObject
libSceFont sceFontGraphicsDrawupFillTexturePatternObject
libSceHttp2 sceHttp2CookieFlush
libSceHttp2 sceHttp2CreateCookieBox
libSceHttp2 sceHttp2SetCookieBox
libSceHttp2 sceHttp2SetRequestNoContentLength
libSceNet sceNetResolverGetError
libScePad scePadUnknown_fCWdlnmB1Ks
libSceSsl sceSslFreeSslCertName
libSceSsl sceSslGetIssuerName
libSceSsl sceSslGetNameEntryCount
libSceSsl sceSslGetNameEntryInfo
libSceSsl sceSslGetPem
libSceSsl sceSslGetSubjectName
libSceSystemService sceSystemServiceDisableMusicPlayer
libSceSystemService sceSystemServiceOpenChallengeActivity
libSceSystemService sceSystemServiceOpenTournamentOccurrence
libSceSystemService sceSystemServiceReenableMusicPlayer
libSceSystemService sceSystemServiceShowControllerSettings
libkernel fchmod_nid_postfix
libkernel futimes_nid_postfix
libkernel recvmsg_nid_postfix
libkernel sceKernelFchmod
libkernel sendmsg_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6005023587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/699#issuecomment-6005023587). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T23:04:53Z. --- <!-- progress-report --> ### Progress report (0518f0e → 845e4dd) 📉 **System libraries**: 78.64% (-0.57%, +6 implemented, +25 declared functions) <details> <summary>✅ 6 implemented</summary> | Library | Name | | - | - | | libSceUserService | `sceUserServiceGetAccessibilityZoomFollowFocus` | | libkernel | `fsync_nid_postfix` | | libkernel | `sceKernelGetOperationMode` | | libkernel | `scePthreadGetschedparam` | | libkernel | `scePthreadSetschedparam` | | libkernel | `utimes_nid_postfix` | </details> <details> <summary>🆕 25 declared as stubs</summary> | Library | Name | | - | - | | libSceAgc | `sceAgcUnknown_vieBRwlh1Lw` | | libSceFont | `sceFontGraphicsDrawupFillTextureImageObject` | | libSceFont | `sceFontGraphicsDrawupFillTexturePatternObject` | | libSceHttp2 | `sceHttp2CookieFlush` | | libSceHttp2 | `sceHttp2CreateCookieBox` | | libSceHttp2 | `sceHttp2SetCookieBox` | | libSceHttp2 | `sceHttp2SetRequestNoContentLength` | | libSceNet | `sceNetResolverGetError` | | libScePad | `scePadUnknown_fCWdlnmB1Ks` | | libSceSsl | `sceSslFreeSslCertName` | | libSceSsl | `sceSslGetIssuerName` | | libSceSsl | `sceSslGetNameEntryCount` | | libSceSsl | `sceSslGetNameEntryInfo` | | libSceSsl | `sceSslGetPem` | | libSceSsl | `sceSslGetSubjectName` | | libSceSystemService | `sceSystemServiceDisableMusicPlayer` | | libSceSystemService | `sceSystemServiceOpenChallengeActivity` | | libSceSystemService | `sceSystemServiceOpenTournamentOccurrence` | | libSceSystemService | `sceSystemServiceReenableMusicPlayer` | | libSceSystemService | `sceSystemServiceShowControllerSettings` | | libkernel | `fchmod_nid_postfix` | | libkernel | `futimes_nid_postfix` | | libkernel | `recvmsg_nid_postfix` | | libkernel | `sceKernelFchmod` | | libkernel | `sendmsg_nid_postfix` | </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!699
No description provided.