Merge pull request #3603 from itsbo5/feat/libSceNpEntitlementAccess-offline-requests

feat(libSceNpEntitlementAccess): implement offline entitlement info r…
This commit is contained in:
Adrià 2026-10-11 23:56:38 +02:00 committed by GitHub
commit 2b4b8178f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 9 deletions

View File

@ -135,23 +135,19 @@ int APS5_VABI sceNpEntitlementAccessRequestConsumeServiceEntitlement(void) {
int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfo(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}
int APS5_VABI sceNpEntitlementAccessPollUnifiedEntitlementInfo(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}
int APS5_VABI sceNpEntitlementAccessRequestServiceEntitlementInfo(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}
int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfo(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}
int APS5_VABI sceNpEntitlementAccessGetPftFlag(void) {

View File

@ -17,6 +17,10 @@ int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfoList();
int APS5_VABI sceNpEntitlementAccessPollUnifiedEntitlementInfoList();
int APS5_VABI sceNpEntitlementAccessRequestServiceEntitlementInfoList();
int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfoList();
int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfo();
int APS5_VABI sceNpEntitlementAccessPollUnifiedEntitlementInfo();
int APS5_VABI sceNpEntitlementAccessRequestServiceEntitlementInfo();
int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfo();
int APS5_VABI sceRudpInit_nid_postfix(void*, int);
int APS5_VABI sceRudpActivate();
int APS5_VABI sceRudpGetStatus(void*, std::size_t);
@ -67,6 +71,10 @@ int main() {
Require(sceNpEntitlementAccessPollUnifiedEntitlementInfoList() == signedOut);
Require(sceNpEntitlementAccessRequestServiceEntitlementInfoList() == signedOut);
Require(sceNpEntitlementAccessPollServiceEntitlementInfoList() == signedOut);
Require(sceNpEntitlementAccessRequestUnifiedEntitlementInfo() == signedOut);
Require(sceNpEntitlementAccessPollUnifiedEntitlementInfo() == signedOut);
Require(sceNpEntitlementAccessRequestServiceEntitlementInfo() == signedOut);
Require(sceNpEntitlementAccessPollServiceEntitlementInfo() == signedOut);
Require(sceRudpActivate() == 0);
std::array<unsigned char, 248> status;

View File

@ -68,7 +68,7 @@ Throughout the project, every function at every stage either **does exactly what
- [sceAudioPropagationSourceSetAudioPath](../../core/libs/prx/libSceAudioPropagation/Export.cpp) (libSceAudioPropagation, NID `tKSmk2JsMAA`) - `(uint64_t path, const void* data, float gain)` follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Audio/AudioPropagation.cs) and SAROS's call, which passes a handle from `sceAudioPropagationSourceGetAudioPath`, path data and gain 1.0. Path updates are unsupported and every call throws without reading or writing caller memory. The no-propagation model yields no path handles; path allocation, ownership, rendering and console error codes remain unknown.
- [Color comparison descriptor forms](../../core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp): emulated color comparison supports UNORM, SNORM and float formats for 2D, 2D-array and cube views. 8-bit sRGB (`Format8Srgb`, `Format8_8Srgb`, `Format8_8_8_8Srgb`) returns 0 for every compare function, measured with `image_sample_c_lz` on gfx1035 over references -0.5..1.5 and texel codes 0..255. Anisotropic filters are refused. Bilinear cube comparisons of float, unorm and snorm formats without `DISABLE_CUBE_WRAP` are refused; on that hardware a 4x4 R32 float cube blends across faces (46 of 90 edge rows differ from a per-face clamp; face 0, ref 0.1, u=3.9 v=2.5 is 0.6016 and u=1.5 v=0.1 is 0.3984), and with `DISABLE_CUBE_WRAP` the per-face clamp matches. An 8-bit sRGB bilinear cube without that bit returns 0, since every texel comparison is already 0 for every compare function and the selected face cannot change the result. Cube-edge sampling behavior and console coverage on PS5's gfx1013 remain unverified.
- [sceNpEntitlementAccessGetEntitlementKey](../../core/libs/prx/libSceNpEntitlementAccess/Export.cpp) - the three-argument signature, 16-byte key and errors `0x817D0002`/`0x817D0007` follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libNet.cpp); PPSA01521 passes a service label, entitlement label and output pointer. Only the no-key path is implemented: local entitlement labels carry no keys, and the output is untouched on failure. Console error precedence and key provisioning are unverified
- [sceNpEntitlementAccess{Request,Poll}{Unified,Service}EntitlementInfoList](../../core/libs/prx/libSceNpEntitlementAccess/Export.cpp) - signatures unknown; no reference implements them, so they are declared without parameters. Like the consume requests in the same library, they report the signed-out NP state with `SCE_NP_ERROR_SIGNED_OUT` (`0x80550006`) and write nothing. PPSA15657 calls the unified request during start-up and continues past the error. Whether the console fails at the request or at the poll when signed out is unverified
- [sceNpEntitlementAccess{Request,Poll}{Unified,Service}EntitlementInfo{,List}](../../core/libs/prx/libSceNpEntitlementAccess/Export.cpp) - signatures unknown; no reference implements them, so they are declared without parameters. The single-item variants copy the behaviour of the list ones, with no source of their own. Like the consume requests in the same library, they report the signed-out NP state with `SCE_NP_ERROR_SIGNED_OUT` (`0x80550006`) and write nothing. PPSA15657 calls the unified request during start-up and continues past the error. Whether the console fails at the request or at the poll when signed out is unverified
- [sceRudpGetStatus](../../core/libs/prx/libSceRudp/Export.cpp) - PPSA01521 passes an output pointer and byte count `0xF8`. Measured on a PS5 (firmware 13.60): the status is 0xF8 bytes; before `sceRudpInit` every call returns `RUDP_ERROR_NOT_INITIALIZED`, and after it a null pointer or a byte count of 0 or above 0xF8 returns `RUDP_ERROR_INVALID_ARGUMENT`. The layout matches `SceRudpStatus` in [Vita3K](https://github.com/AndnixSH/Vita3K-PS-Vita-OS-Fork/blob/master/vita3k/modules/SceRudp/SceLibRudp.cpp) with `currentContexts` at 0x64 and `allocs`, `frees`, `memCurrent` and `memPeak` at 0xC8 to 0xD4. Only `currentContexts` is reported: the traffic counters stay 0 because nothing is sent, and the allocator counters stay 0 because the library does not allocate from the title's pool (the console reports 6 allocations and 0x1260 bytes right after `sceRudpInit`, and 4 more allocations and 0x3F0 bytes per context). The console also writes `currentContexts` and the allocator counters when the byte count is smaller than their offset; only the requested bytes are written here.
- [sceHttpSetCookieEnabled](../../core/libs/prx/libSceHttp/Export.cpp) - the two-argument signature and 0/1 enable values follow [VitaSDK](https://github.com/vitasdk/vita-headers/blob/master/include/psp2/net/http.h) and [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp); PPSA01521 passes 0 to disable cookies. Disabling succeeds because the offline HTTP backend has no cookie engine; enabling throws. Invalid enable values use the same error as `sceHttpSetInflateGZIPEnabled`. Like the existing offline HTTP setters, the handle is not validated; requests still fail with the network error. Console behavior is unverified