Files
AnyPS5/docs/dev/debt/libSceAppContent.md
T
Braxton Atkinson 4dcfc0b3db feat(libSceAppContent): implement sceAppContentGetEntitlementKey
Resolve the rebase conflicts with upstream's public API header migration. Put the typed entitlement-key layout and signature in Api.hpp, remove duplicate test/source declarations, and retain upstream's typed add-content checks and initialization behavior.

Keep ignoring the service label in the no-entitlement model. Cover labels 0, 7, 8 and UINT32_MAX without touching the output key. Update debt to distinguish firmware 13.42 module-side validation from the still-unverified system-service result. Evidence: https://github.com/boykopovar/AnyPS5/pull/9638#issuecomment-6390573735

Ubuntu 24.04, GCC 13.3, Release, upstream e7e3e9c198: actual libraries and guest_appcontent_tests built; guest_appcontent passes 1/1. Public-header audit, syntax checks of implementation and test, conventions, test registration and whitespace checks pass. No title or PS5 hardware tested; Windows was not rerun for this update.

AI-assisted: yes
2026-10-24 23:29:15 -05:00

5.4 KiB

libSceAppContent technical debt

Unknown function info

  • sceAppContentDownloadDataGetAvailableSpaceKb (libSceAppContent) - a title whose param.json declares downloadDataSize 0 gets 0 KB and OK; the console's behaviour for a title without a download data area is unverified (it may return an error instead). KytyPS5 does not special-case it, and shadPS4 stubs 1048576 KB. One disassembled title (PPSA15246) calls it with the /download0 mount point and a zeroed 64-bit output, ignores the return value and multiplies the output by 1024, so for that title an error that leaves the output untouched and an OK with 0 KB look the same

  • sceAppContentDownloadDataFormat (libSceAppContent) - empties the /download0 directory, creating it if needed. Imported by PPSA01317. A null mount point returns PARAMETER and another mount point returns NOT_MOUNTED as in sceAppContentTemporaryDataFormat and sceAppContentDownloadDataGetAvailableSpaceKb; the console's error codes for both and its behaviour with files still open are unverified

  • libSceAppContent pending exports - 15 named callable exports are listed in the PS5 3.20 export table and were cross-checked against the same module in PS5 firmware 13.60. Their signatures and behaviour are unverified; the declarations use the no-parameter unknown-signature convention and throw through NotImplemented_nid_no_patch.

Functional

  • Initialization - service readiness and boot attributes are not modeled; successful initialization returns a zero boot record. Initialization-state guards, SDK 0x01500000 repeated-initialization errors and reserved-field checks are recovered. SDK-dependent service-error translation remains incomplete.

  • Additional content (libSceAppContent) is not installed or mounted: sceAppContentAddcontMount answers NOT_FOUND for every entitlement label and sceAppContentAddcontUnmount for every mount point, as no add-content mount is ever handed out; sceAppContentGetAddcontInfo answers DRM_NO_ENTITLEMENT for every label and sceAppContentGetAddcontInfoList reports 0 entries; sceAppContentAddcontEnqueueDownload answers PARAMETER for a null label and NOT_FOUND otherwise, since no download is ever queued; sceAppContentAddcontDelete answers PARAMETER for a null label and NOT_FOUND otherwise, since no additional content is ever installed. sceAppContentGetAddcontDownloadProgress answers PARAMETER for a null label or progress and NOT_FOUND otherwise, as dlc_emu does for a label that is not installed additional content, and never writes the progress. Its 16-byte layout (DataSize, then DownloadedSize, both 64-bit) follows SharpProspero and is unused here. The signatures of sceAppContentAddcontEnqueueDownload and sceAppContentGetAddcontDownloadProgress follow SharpProspero, and the signature of sceAppContentAddcontDelete follows dlc_emu; dlc_emu is not a console measurement and no console source gives the error codes, so the signatures and the error codes are unverified

  • sceAppContentGetEntitlementKey (libSceAppContent) - the service result without an entitlement is unverified: this model returns DRM_NO_ENTITLEMENT and leaves the 16-byte key unchanged. Initialization, null-pointer and SDK 0x01500000 label-padding checks match the reported firmware 13.42 module probe, run in an emulator, not on hardware. That module forwards service labels 0, 7, 8 and 0xFFFFFFFF without checking them; this library ignores the service label. The system service's own validation and errors remain unknown.

  • Temporary app-content storage console behaviour and hardware return values are unverified, including behaviour with open files across unmount; host filesystem failures throw. Storage models one /temp0 mount, preserving files on unmount while rejecting new path resolutions until remount, and leaving existing open host descriptors usable. sceAppContentTemporaryDataMount delegates to sceAppContentTemporaryDataMount2 with option 1 (TEMPORARY_DATA_OPTION_FORMAT) to format on mount as shadPS4 does. Mount, format, space-query and unmount errors follow fpPS4; pointer ABI follows SharpProspero.