docs(libSceSaveData): survey the pending exports across citable reimplementations #15077

Merged
xecedemon merged 1 commit from upstream-pr/15077 into main 2026-11-02 15:11:17 +00:00
xecedemon commented 2026-11-02 14:26:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xecedemon on 2026-11-02T14:26:07Z.


What

Surveys the 73 pending libSceSaveData exports against every citable reimplementation. Four grouped entries under a new ### Unknown function info section in docs/dev/debt/libSceSaveData.md cover the PSN/cloud, system/database, query and backup-check/dialog families: shadPS4 0614ce3 holds only return-success templates for the PS4 names and nothing for the PS5-only ones; fpPS4 04cefd4, KytyPS5 569ec04 carry no real bodies; RPS5E d540c46 registers only five of the query exports (GetEventInfo/SetEventInfo plain success; GetSaveDataCount/GetAllSize/IsMounted writing through a second argument) — shapes #14150 already rejected as invented success. Nothing was implemented: no stub was silenced.

sceSaveDataGetProgress, the only pending export with a real citable body (shadPS4 savedata.cpp L1124-L1136 at 0614ce324be: NOT_INITIALIZED before initialization checked first, PARAMETER for a null float*, else the last backup's progress, reset by ClearProgress), stays throwing: a faithful mapping needs one line in sceSaveDataBackup, which open PR #15042 rewrites (guest-pointer validation there, a GuestCopyOut write-out in sceSaveDataGetConvertProgress). Its full semantics, the dependency and RPS5E's constant-1.0f dissent are recorded in the canonical entry in docs/dev/debt/libSceSaveData.native.md, which this PR enriches.

Tested

Documentation-only change; code is identical to main. Ubuntu 24.04 (GCC 13.3, Release, BUILD_TESTING=ON): ctest -R savedata passes 15 of 15 at this branch head. A sceSaveDataGetProgress implementation was written, run red (sceSaveDataGetProgress not implemented) then green with the same 15 of 15, and withdrawn for the #15042 overlap documented above; it is not part of this branch. python3 tools/check_conventions.py --base origin/main passes.

  • 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
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5121919833 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15077). Originally posted by [xecedemon](https://github.com/xecedemon) on 2026-11-02T14:26:07Z. --- ### What Surveys the 73 pending libSceSaveData exports against every citable reimplementation. Four grouped entries under a new `### Unknown function info` section in `docs/dev/debt/libSceSaveData.md` cover the PSN/cloud, system/database, query and backup-check/dialog families: shadPS4 0614ce3 holds only return-success templates for the PS4 names and nothing for the PS5-only ones; fpPS4 04cefd4, KytyPS5 569ec04 carry no real bodies; RPS5E d540c46 registers only five of the query exports (`GetEventInfo`/`SetEventInfo` plain success; `GetSaveDataCount`/`GetAllSize`/`IsMounted` writing through a second argument) — shapes #14150 already rejected as invented success. Nothing was implemented: no stub was silenced. `sceSaveDataGetProgress`, the only pending export with a real citable body (shadPS4 `savedata.cpp` L1124-L1136 at 0614ce324be: `NOT_INITIALIZED` before initialization checked first, `PARAMETER` for a null `float*`, else the last backup's progress, reset by ClearProgress), stays throwing: a faithful mapping needs one line in `sceSaveDataBackup`, which open PR #15042 rewrites (guest-pointer validation there, a `GuestCopyOut` write-out in `sceSaveDataGetConvertProgress`). Its full semantics, the dependency and RPS5E's constant-`1.0f` dissent are recorded in the canonical entry in `docs/dev/debt/libSceSaveData.native.md`, which this PR enriches. ### Tested Documentation-only change; code is identical to `main`. Ubuntu 24.04 (GCC 13.3, Release, `BUILD_TESTING=ON`): `ctest -R savedata` passes 15 of 15 at this branch head. A `sceSaveDataGetProgress` implementation was written, run red (`sceSaveDataGetProgress not implemented`) then green with the same 15 of 15, and withdrawn for the #15042 overlap documented above; it is not part of this branch. `python3 tools/check_conventions.py --base origin/main` passes. - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
BunnyFl commented 2026-11-02 14:54:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T14:54:55Z.

Review: COMMENTED


One firmware note for the sceSaveDataGetProgress entry. The PS5 module settles some of what the entry leaves to the reimplementations, and its shape differs from shadPS4's.

Firmware 13.42's libSceSaveData.sprx (sha256 1d214285f188f1c0821a611a08345833dd379cee547d5834e64228cde906a567) at 0x39af0 (ANmSWUiyyGQ), read from disassembly only, not measured on a console:

39b00: ctx = [0x64040] ; test ctx ; je 39b3b    ; 39b3b: 0x809f0001, no library context
39b05: (ctx->state & ~1) != 2 -> 0x809f0000      ; state gate before the pointer is looked at
39b1b: call 0x1d6c0(ctx, progress)
  1d6dc: ctx[0x38] < 0 -> return it
  1d6eb: ctx[0x10] == NULL -> 0x809f8002
  1d6f0: progress == NULL -> 0x809f8004
  1d74e: call 0x1a0a0(conn, request 5, ..., 0x80-byte reply)   ; a request to the save-data service
  1d757: vmovss xmm0, [reply] ; vmovss [progress], xmm0           ; float written straight through
39b28: on a negative result, tail-calls 0x1d480(ctx, 5)

So, for the entry:

  • The float* parameter is confirmed by the module, not just by the OpenOrbis and shadPS4 headers.
  • The order is: library context (0x809f0001), a state gate (0x809f0000), then null progress (0x809f8004).
  • The progress is a query to the save-data service, not a value the library keeps from its own backup call. Mapping it to sceSaveDataBackup's copy, as the entry plans, would be a host model rather than a port.

I haven't traced 0x1d480 or what the service reports, so I can't say what an idle query returns.

For the four grouped entries, the same dump has every one of those NIDs in libSceSaveData.sprx. "PS5 signatures and behaviour are unknown" could say "not yet read from the 13.42 module" instead, so it doesn't look unobtainable. Not a blocker either way.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5738443193 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15077#pullrequestreview-5738443193). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T14:54:55Z. **Review:** COMMENTED --- One firmware note for the `sceSaveDataGetProgress` entry. The PS5 module settles some of what the entry leaves to the reimplementations, and its shape differs from shadPS4's. Firmware 13.42's `libSceSaveData.sprx` (sha256 `1d214285f188f1c0821a611a08345833dd379cee547d5834e64228cde906a567`) at `0x39af0` (`ANmSWUiyyGQ`), read from disassembly only, not measured on a console: ``` 39b00: ctx = [0x64040] ; test ctx ; je 39b3b ; 39b3b: 0x809f0001, no library context 39b05: (ctx->state & ~1) != 2 -> 0x809f0000 ; state gate before the pointer is looked at 39b1b: call 0x1d6c0(ctx, progress) 1d6dc: ctx[0x38] < 0 -> return it 1d6eb: ctx[0x10] == NULL -> 0x809f8002 1d6f0: progress == NULL -> 0x809f8004 1d74e: call 0x1a0a0(conn, request 5, ..., 0x80-byte reply) ; a request to the save-data service 1d757: vmovss xmm0, [reply] ; vmovss [progress], xmm0 ; float written straight through 39b28: on a negative result, tail-calls 0x1d480(ctx, 5) ``` So, for the entry: - The `float*` parameter is confirmed by the module, not just by the OpenOrbis and shadPS4 headers. - The order is: library context (`0x809f0001`), a state gate (`0x809f0000`), then null `progress` (`0x809f8004`). - The progress is a query to the save-data service, not a value the library keeps from its own backup call. Mapping it to `sceSaveDataBackup`'s copy, as the entry plans, would be a host model rather than a port. I haven't traced `0x1d480` or what the service reports, so I can't say what an idle query returns. For the four grouped entries, the same dump has every one of those NIDs in `libSceSaveData.sprx`. "PS5 signatures and behaviour are unknown" could say "not yet read from the 13.42 module" instead, so it doesn't look unobtainable. Not a blocker either way.
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!15077
No description provided.