libSceNpEntitlementAccess/libSceRazorCpu/libSceSharePlay: three small PRAGMATA exports; branch ready #3767

Closed
opened 2026-10-11 16:36:13 +00:00 by screamm · 0 comments
screamm commented 2026-10-11 16:36:13 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T16:36:13Z.


Three small exports PRAGMATA (#3043, xXPBSXx's comments 6106731532 and 6107100345) needs are absent or throwing: sceNpEntitlementAccessGetGameTrialsFlag (libSceNpEntitlementAccess, y7JD1gfwyfA, the title's reported stop on main: sceNpEntitlementAccessGetGameTrialsFlag not implemented), sceRazorCpuSync (libSceRazorCpu, Ax7NjOzctIM) and sceSharePlayProhibitController (libSceSharePlay, FzQS6DREDfk); PRAGMATA fails to load on the two absent imports.

Branch ready: screamm:feat/pragmata-small-exports (three commits on main a11c8f7f, head 08f590e3, one per function). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commits as they are.

  • sceNpEntitlementAccessGetGameTrialsFlag(uint32_t* flag): writes 0 (full game) and returns 0, 0x817D0002 for a null pointer, per sharpemu NpEntitlementAccessExports.cs:98-116 (a2983692; GPL-2.0-or-later, facts only), the parameter error KytyPS5, prosper and this file's own GetEntitlementKey use. No initialization check, because the library has none anywhere. The neighbouring GetSkuFlag returns 0x80558003 for a null pointer, so the file now has two unmeasured null codes; recorded in TechnicalDebt together with the possibility of a second argument (four live registers at PRAGMATA's call site).
  • sceRazorCpuSync(): returns 0 and does nothing, like the other Razor exports without an attached capture (SharpProspero Interop/Debug/RazorCpu.cs:119-122, shadPS4 razor_cpu.cpp:143-146); listed under TechnicalDebt's Silent stubs as the conventions check requires for a bare return 0, the same way open #3560 does for its Razor function.
  • sceSharePlayProhibitController(int prohibited): 0 and 1 return 0; other values throw, because sharpemu's 0x80020003 is a synthetic code and sceSharePlayInitialize here already throws for its unknown error. The setting is not stored (no Share Play session exists and no export reads it back).
  • Tests: guest_offline_imports (one-word write, null pointer), guest_razor_cpu, guest_share_play (0 and 1 accepted, 2 and -1 throw).

Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs: the three tests 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 533/536, the failures being the known windows_exceptions (#3411, fixed by #3415), guest_kernel_sys (#3510) and guest_filesystem (#3518); tools/check_conventions.py --base main and git diff --check pass. Not run on Linux.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5803006737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3767). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T16:36:13Z. --- Three small exports PRAGMATA (#3043, xXPBSXx's comments 6106731532 and 6107100345) needs are absent or throwing: `sceNpEntitlementAccessGetGameTrialsFlag` (libSceNpEntitlementAccess, `y7JD1gfwyfA`, the title's reported stop on `main`: `sceNpEntitlementAccessGetGameTrialsFlag not implemented`), `sceRazorCpuSync` (libSceRazorCpu, `Ax7NjOzctIM`) and `sceSharePlayProhibitController` (libSceSharePlay, `FzQS6DREDfk`); PRAGMATA fails to load on the two absent imports. **Branch ready:** [`screamm:feat/pragmata-small-exports`](https://github.com/screamm/AnyPS5/tree/feat/pragmata-small-exports) (three commits on `main` `a11c8f7f`, head `08f590e3`, one per function). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commits as they are. - `sceNpEntitlementAccessGetGameTrialsFlag(uint32_t* flag)`: writes 0 (full game) and returns 0, `0x817D0002` for a null pointer, per sharpemu `NpEntitlementAccessExports.cs:98-116` (`a2983692`; GPL-2.0-or-later, facts only), the parameter error KytyPS5, prosper and this file's own `GetEntitlementKey` use. No initialization check, because the library has none anywhere. The neighbouring `GetSkuFlag` returns `0x80558003` for a null pointer, so the file now has two unmeasured null codes; recorded in TechnicalDebt together with the possibility of a second argument (four live registers at PRAGMATA's call site). - `sceRazorCpuSync()`: returns 0 and does nothing, like the other Razor exports without an attached capture (SharpProspero `Interop/Debug/RazorCpu.cs:119-122`, shadPS4 `razor_cpu.cpp:143-146`); listed under TechnicalDebt's Silent stubs as the conventions check requires for a bare `return 0`, the same way open #3560 does for its Razor function. - `sceSharePlayProhibitController(int prohibited)`: 0 and 1 return 0; other values throw, because sharpemu's `0x80020003` is a synthetic code and `sceSharePlayInitialize` here already throws for its unknown error. The setting is not stored (no Share Play session exists and no export reads it back). - Tests: `guest_offline_imports` (one-word write, null pointer), `guest_razor_cpu`, `guest_share_play` (0 and 1 accepted, 2 and -1 throw). **Tested** on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: the three tests 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 533/536, the failures being the known `windows_exceptions` (#3411, fixed by #3415), `guest_kernel_sys` (#3510) and `guest_filesystem` (#3518); `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Sign in to join this conversation.
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#3767
No description provided.