feat(libSceSaveData): implement sceSaveDataGetConvertProgress #4708

Merged
Aathish-D merged 1 commit from upstream-pr/4708 into main 2026-10-13 07:56:02 +00:00
Aathish-D commented 2026-10-12 19:33:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Aathish-D on 2026-10-12T19:33:03Z.


What

Implements sceSaveDataGetConvertProgress (NID 8EA5OMIL1lQ) in libSceSaveData.native.

On current main, Minecraft Dungeons II (PPSA16064) imports sceSaveDataGetConvertProgress and stops with:

terminate called after throwing an instance of 'std::runtime_error'
  what(): sceSaveDataGetConvertProgress not implemented

Signature and error codes follow the SDK 12.000 reference.
Save data conversion on AnyPS5 (sceSaveDataConvert) runs synchronously on the host filesystem. sceSaveDataGetConvertProgress validates the output pointer (returning SAVE_DATA_ERROR_PARAMETER if null), verifies library initialization (returning SAVE_DATA_ERROR_NOT_INITIALIZED if uninitialized), and writes the last conversion's progress (0.0f before any conversion or when conversion fails, 1.0f after successful conversion), returning SAVE_DATA_OK (0).
Adds test coverage in guest_savedata_convert_tests verifying parameter validation, uninitialized error handling before initialize and after terminate, initial 0.0f progress, and progress after successful and failed conversions. Documents technical debt in docs/dev/debt/libSceSaveData.native.md and removes the unknown signature entry from docs/dev/debt/libkernel.md.

Tested

  • Linux x86_64, ctest guest_savedata_convert (passed in 0.01s)
  • All 7 guest_savedata_* integration tests passed (100%)
  • Verified guest_savedata_convert_tests aborts on main before this change with std::runtime_error: sceSaveDataGetConvertProgress not implemented
  • python3 tools/check_conventions.py --base upstream/main passed
  • python3 tools/check_test_registration.py build passed (0 unrecorded)

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 under Silent stubs in their library's technical debt file
  • 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
  • Unblocks: Minecraft Dungeons II (PPSA16064)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4834108000 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4708). Originally posted by [Aathish-D](https://github.com/Aathish-D) on 2026-10-12T19:33:03Z. --- ### What Implements `sceSaveDataGetConvertProgress` (NID `8EA5OMIL1lQ`) in `libSceSaveData.native`. On current `main`, Minecraft Dungeons II (PPSA16064) imports `sceSaveDataGetConvertProgress` and stops with: ``` terminate called after throwing an instance of 'std::runtime_error' what(): sceSaveDataGetConvertProgress not implemented ``` Signature and error codes follow the [SDK 12.000 reference](https://github.com/peterpuppy/bm/blob/3f9d1ba6b896a53080460c903f5c15af8affb80d/features/ps5/document/output/psn_12/System/Save_Data/SaveData-Reference/sce-save-data-get-convert-progress.md). Save data conversion on AnyPS5 (`sceSaveDataConvert`) runs synchronously on the host filesystem. `sceSaveDataGetConvertProgress` validates the output pointer (returning `SAVE_DATA_ERROR_PARAMETER` if null), verifies library initialization (returning `SAVE_DATA_ERROR_NOT_INITIALIZED` if uninitialized), and writes the last conversion's progress (`0.0f` before any conversion or when conversion fails, `1.0f` after successful conversion), returning `SAVE_DATA_OK` (0). Adds test coverage in `guest_savedata_convert_tests` verifying parameter validation, uninitialized error handling before initialize and after terminate, initial 0.0f progress, and progress after successful and failed conversions. Documents technical debt in `docs/dev/debt/libSceSaveData.native.md` and removes the unknown signature entry from `docs/dev/debt/libkernel.md`. ### Tested - Linux x86_64, ctest `guest_savedata_convert` (passed in 0.01s) - All 7 `guest_savedata_*` integration tests passed (100%) - Verified `guest_savedata_convert_tests` aborts on `main` before this change with `std::runtime_error: sceSaveDataGetConvertProgress not implemented` - `python3 tools/check_conventions.py --base upstream/main` passed - `python3 tools/check_test_registration.py build` passed (0 unrecorded) ### 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 under Silent stubs in their library's technical debt file - [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] Unblocks: Minecraft Dungeons II (PPSA16064) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-12 19:34:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T19:34:14Z.


Progress report (fc1f063 → b078f47)

📈 System libraries: 87.86% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceSaveData.native sceSaveDataGetConvertProgress
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6131247298 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4708#issuecomment-6131247298). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T19:34:14Z. --- <!-- progress-report --> ### Progress report (fc1f063 → b078f47) 📈 **System libraries**: 87.86% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceSaveData.native | `sceSaveDataGetConvertProgress` | </details>
adriadam10 commented 2026-10-12 21:13:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:13:35Z.

Review: CHANGES_REQUESTED


Thanks. The signature int32_t sceSaveDataGetConvertProgress(float *progress) matches the SDK 12.000 reference, and the test fails on main as expected. Two behaviours in that reference differ from the PR:

  • Export.cpp:803-809: it always reports 1.0f. The reference says the value is 0.0 before any sceSaveDataConvert(), the final value after a successful one, and < 1.0 if the conversion failed. Keep the last convert's progress (e.g. 0.0 initially, 1.0 after a successful sceSaveDataConvert, left below 1.0 when it fails) and pin each case in GuestSaveDataConvert.cpp; the test currently queries before the convert and expects 1.0.
  • Export.cpp:803: no SAVE_DATA_ERROR_NOT_INITIALIZED (0x809f0001) when the library isn't initialized, which the reference lists next to PARAMETER. Check how the sibling exports do it and add a test case.

In docs/dev/debt/libSceSaveData.native.md:8, cite the SDK page you took the signature from (a link), and update the line for the behaviour above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5495997030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4708#pullrequestreview-5495997030). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-12T21:13:35Z. **Review:** CHANGES_REQUESTED --- Thanks. The signature `int32_t sceSaveDataGetConvertProgress(float *progress)` matches the SDK 12.000 reference, and the test fails on `main` as expected. Two behaviours in that reference differ from the PR: - `Export.cpp:803-809`: it always reports `1.0f`. The reference says the value is `0.0` before any `sceSaveDataConvert()`, the final value after a successful one, and `< 1.0` if the conversion failed. Keep the last convert's progress (e.g. 0.0 initially, 1.0 after a successful `sceSaveDataConvert`, left below 1.0 when it fails) and pin each case in `GuestSaveDataConvert.cpp`; the test currently queries before the convert and expects 1.0. - `Export.cpp:803`: no `SAVE_DATA_ERROR_NOT_INITIALIZED` (0x809f0001) when the library isn't initialized, which the reference lists next to `PARAMETER`. Check how the sibling exports do it and add a test case. In `docs/dev/debt/libSceSaveData.native.md:8`, cite the SDK page you took the signature from (a link), and update the line for the behaviour above.
Aathish-D commented 2026-10-12 21:24:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Aathish-D on 2026-10-12T21:24:06Z.


Updated in the amended commit:

  • Initialization check: sceSaveDataGetConvertProgress now returns SAVE_DATA_ERROR_NOT_INITIALIZED (0x809f0001) when the library is uninitialized, matching sibling exports.
  • Convert progress tracking: tracks the progress of the most recently called sceSaveDataConvert() (reports 0.0f initially and when a conversion fails, 1.0f after a successful conversion, and resets on termination).
  • Test coverage: pinned test assertions in GuestSaveDataConvert.cpp for uninitialized queries (before initialize and after terminate), initial 0.0f progress, and progress after successful and failed conversions.
  • Technical debt: cited the SDK 12.000 reference in docs/dev/debt/libSceSaveData.native.md and updated the documented behavior.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132874061 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4708#issuecomment-6132874061). Originally posted by [Aathish-D](https://github.com/Aathish-D) on 2026-10-12T21:24:06Z. --- Updated in the amended commit: - **Initialization check**: `sceSaveDataGetConvertProgress` now returns `SAVE_DATA_ERROR_NOT_INITIALIZED` (`0x809f0001`) when the library is uninitialized, matching sibling exports. - **Convert progress tracking**: tracks the progress of the most recently called `sceSaveDataConvert()` (reports `0.0f` initially and when a conversion fails, `1.0f` after a successful conversion, and resets on termination). - **Test coverage**: pinned test assertions in `GuestSaveDataConvert.cpp` for uninitialized queries (before initialize and after terminate), initial 0.0f progress, and progress after successful and failed conversions. - **Technical debt**: cited the [SDK 12.000 reference](https://github.com/peterpuppy/bm/blob/3f9d1ba6b896a53080460c903f5c15af8affb80d/features/ps5/document/output/psn_12/System/Save_Data/SaveData-Reference/sce-save-data-get-convert-progress.md) in `docs/dev/debt/libSceSaveData.native.md` and updated the documented behavior.
adriadam10 commented 2026-10-13 07:55:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T07:55:03Z.

Review: APPROVED


Checked the signature and error codes against the SDK reference, the new test fails on main without the change and passes with it, and the scoped build and ctest are green after rebasing onto current main. The only conflict was the TechnicalDebt line in docs/dev/debt/libkernel.md, which I resolved by dropping sceSaveDataGetConvertProgress from the Coredump entry; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5500426478 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4708#pullrequestreview-5500426478). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-13T07:55:03Z. **Review:** APPROVED --- Checked the signature and error codes against the SDK reference, the new test fails on `main` without the change and passes with it, and the scoped build and ctest are green after rebasing onto current `main`. The only conflict was the TechnicalDebt line in `docs/dev/debt/libkernel.md`, which I resolved by dropping `sceSaveDataGetConvertProgress` from the Coredump entry; merging.
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!4708
No description provided.