Skip to content

feat(libSceSaveData): implement sceSaveDataGetConvertProgress - #4708

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Aathish-D:feat/savedata-get-convert-progress
Oct 13, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Aathish-D:feat/savedata-get-convert-progress

Conversation

@Aathish-D

@Aathish-D Aathish-D commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Progress report (fc1f063 → b078f47)

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

✅ 1 implemented
Library Name
libSceSaveData.native sceSaveDataGetConvertProgress

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Aathish-D force-pushed the feat/savedata-get-convert-progress branch from 45cbdbb to a81a5ba Compare October 12, 2026 21:23
@Aathish-D

Copy link
Copy Markdown
Contributor Author

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.

@Aathish-D
Aathish-D requested a review from adriadam10 October 12, 2026 21:32
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@adriadam10
adriadam10 force-pushed the feat/savedata-get-convert-progress branch from a81a5ba to b078f47 Compare October 13, 2026 07:55

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@adriadam10
adriadam10 merged commit 42e5eda into boykopovar:main Oct 13, 2026
8 checks passed
@Aathish-D
Aathish-D deleted the feat/savedata-get-convert-progress branch October 13, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants