fix(appcontent): report no download data space without a declared area #842

Merged
merwie merged 2 commits from upstream-pr/842 into main 2026-10-07 20:18:48 +00:00
merwie commented 2026-10-06 08:52:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-06T08:52:59Z.


What

sceAppContentDownloadDataGetAvailableSpaceKb threw when param.json declares no download data area. It now reports 0 KB, because a title without the area has no space there.

Unity's player (PPSA12544) queries this at startup. It treats an error or 0 as no space and logs:

persistentDataPath / DownloadData has no space available, check "Download Data Area Size" in SDK Param Editor

Tested

Windows 11, Radeon RX 9070 XT, PPSA12544 (Hollow Knight: Silksong; bring-up: #726): the title logs the message above and continues. Non-GPU ctest passes. There is no new unit test.

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
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4756425604 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/842). Originally posted by [merwie](https://github.com/merwie) on 2026-10-06T08:52:59Z. --- ### What `sceAppContentDownloadDataGetAvailableSpaceKb` threw when param.json declares no download data area. It now reports 0 KB, because a title without the area has no space there. Unity's player (PPSA12544) queries this at startup. It treats an error or 0 as no space and logs: ``` persistentDataPath / DownloadData has no space available, check "Download Data Area Size" in SDK Param Editor ``` ### Tested Windows 11, Radeon RX 9070 XT, PPSA12544 (Hollow Knight: Silksong; bring-up: #726): the title logs the message above and continues. Non-GPU `ctest` passes. There is no new unit test. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
adriadam10 commented 2026-10-07 16:10:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T16:10:52Z.

Review: CHANGES_REQUESTED


Thanks for the fix. A few things before this can merge:

  • core/libs/prx/libSceAppContent/Export.cpp:60: returning 0 KB is a choice no reference backs (KytyPS5 doesn't special-case it, shadPS4 stubs 1048576 KB). Add a line to TechnicalDebt under "Unknown function info" saying that the console's behaviour for a title without a download data area is unverified.
  • No test. A title log alone isn't enough for a game fix: add a Linux test, next to the library's other tests and registered in ctest, that runs with downloadDataSize 0 and checks the call returns OK with *available_space_kb == 0.
  • #1121 (TideOPL) makes the same change in the same function and already adds the TechnicalDebt line. Please agree with them on which PR goes forward and list the other in Depends on. This one is older.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5445061855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/842#pullrequestreview-5445061855). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-07T16:10:52Z. **Review:** CHANGES_REQUESTED --- Thanks for the fix. A few things before this can merge: - `core/libs/prx/libSceAppContent/Export.cpp:60`: returning 0 KB is a choice no reference backs (KytyPS5 doesn't special-case it, shadPS4 stubs 1048576 KB). Add a line to TechnicalDebt under "Unknown function info" saying that the console's behaviour for a title without a download data area is unverified. - No test. A title log alone isn't enough for a game fix: add a Linux test, next to the library's other tests and registered in ctest, that runs with `downloadDataSize` 0 and checks the call returns OK with `*available_space_kb == 0`. - #1121 (TideOPL) makes the same change in the same function and already adds the TechnicalDebt line. Please agree with them on which PR goes forward and list the other in **Depends on**. This one is older.
merwie commented 2026-10-07 19:07:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by merwie on 2026-10-07T19:07:35Z.


Thanks. Pushed (on top of a merge of main):

  • TechnicalDebt under Unknown function info: 0 KB and OK for a title without a download data area is unverified, KytyPS5 doesn't special-case it, and shadPS4 stubs 1048576 KB.
  • Test: GuestAppContent writes an app0/sce_sys/param.json with downloadDataSize 0 and checks that the call returns OK with *available_space_kb == 0 for /download0, and PARAMETER for a null result. It is registered as guest_appcontent and fails without the change (the call threw). The non-GPU tests pass.
  • #1121: it makes the same change and is newer, so I've proposed on #1121 that this one goes forward with the test, and that its author is credited in the description.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6044899509 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/842#issuecomment-6044899509). Originally posted by [merwie](https://github.com/merwie) on 2026-10-07T19:07:35Z. --- Thanks. Pushed (on top of a merge of `main`): - **TechnicalDebt** under *Unknown function info*: 0 KB and OK for a title without a download data area is unverified, KytyPS5 doesn't special-case it, and shadPS4 stubs 1048576 KB. - **Test:** `GuestAppContent` writes an `app0/sce_sys/param.json` with `downloadDataSize` 0 and checks that the call returns OK with `*available_space_kb == 0` for `/download0`, and PARAMETER for a null result. It is registered as `guest_appcontent` and fails without the change (the call threw). The non-GPU tests pass. - **#1121:** it makes the same change and is newer, so I've proposed on #1121 that this one goes forward with the test, and that its author is credited in the description.
TideOPL commented 2026-10-07 19:24:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-07T19:24:18Z.


Good stuff! LGTM

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6045189679 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/842#issuecomment-6045189679). Originally posted by [TideOPL](https://github.com/TideOPL) on 2026-10-07T19:24:18Z. --- Good stuff! LGTM
adriadam10 commented 2026-10-07 20:06:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T20:06:12Z.

Review: APPROVED


Thanks, both points addressed. Checked: build + full ctest on Linux, guest_appcontent fails with the Export.cpp change reverted, and the TechnicalDebt line's references (KytyPS5 has no special case, shadPS4 stubs 1048576 KB).

What we added: rebased onto current main to drop the merge commit from the history (no merge commits, CONTRIBUTING); no code changes. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5447711442 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/842#pullrequestreview-5447711442). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-07T20:06:12Z. **Review:** APPROVED --- Thanks, both points addressed. Checked: build + full ctest on Linux, `guest_appcontent` fails with the `Export.cpp` change reverted, and the TechnicalDebt line's references (KytyPS5 has no special case, shadPS4 stubs 1048576 KB). What we added: rebased onto current `main` to drop the merge commit from the history (no merge commits, CONTRIBUTING); no code changes. Merging once CI is green.
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!842
No description provided.