docs(debt): count how local titles pair sceSaveDataInitialize3 and Terminate #12600

Merged
xXPBSXx merged 1 commit from upstream-pr/12600 into main 2026-10-28 22:48:46 +00:00
xXPBSXx commented 2026-10-28 22:25:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-28T22:25:57Z.


What

The entry then reads (the new part is its last sentence):

sceSaveDataInitialize3 (libSceSaveData.native) - a repeated initialize succeeds: PPSA12544's executable and its Unity SaveData plugin both initialize, and the plugin fails on any error. Initializations are counted and sceSaveDataTerminate ends the session at the last one; how the console pairs them is unknown. In PPSA12544 the executable calls it once (0x1721d8f) with 0 as its argument, only while a flag byte of its object is 0, and does not import sceSaveDataTerminate; the plugin calls it once (0x1fd2) with 0, skips the call while a flag byte of its own is set, and calls sceSaveDataTerminate from two functions (0x2059, 0x20d9) that clear that byte. Of 53 local titles, all import and call it and 28 import sceSaveDataTerminate (25 do not); counting tail jumps as calls and ignoring indirect calls, 17 of those 28 call both once, 10 call both twice and 1 calls it once and sceSaveDataTerminate twice.

Changed: docs/dev/debt/libSceSaveData.native.md, one existing entry extended by one sentence. No code change.

Method: for each of 53 local titles the import table of the title's executable was read, and direct call and jmp instructions to the imported functions were counted in that executable (static counting only, nothing run on a console). Only the counts are reported; no game code is attached.

Overlap

Four open PRs change docs/dev/debt/libSceSaveData.native.md, none of them this entry: #11720 changes the sceSaveDataCancel entry, and #10674, #8630 and #8285 add new entries (sceSaveDataGetProgress, sceSaveDataLoadIcon/sceSaveDataSaveIcon, sceSaveDataMount2). git merge-tree of this branch against each of their heads is clean. #12444 changes code in the same library and also merges cleanly. Measured on the file sets of all open PRs (git diff --name-only from each PR head's merge base with main).

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes; based on current main 319621ba2e. Not built, not run.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5058671195 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12600). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-28T22:25:57Z. --- ### What The entry then reads (the new part is its last sentence): > [sceSaveDataInitialize3](../../../core/libs/prx/libSceSaveData.native/Export.cpp) (libSceSaveData.native) - a repeated initialize succeeds: PPSA12544's executable and its Unity SaveData plugin both initialize, and the plugin fails on any error. Initializations are counted and `sceSaveDataTerminate` ends the session at the last one; how the console pairs them is unknown. In PPSA12544 the executable calls it once (0x1721d8f) with 0 as its argument, only while a flag byte of its object is 0, and does not import `sceSaveDataTerminate`; the plugin calls it once (0x1fd2) with 0, skips the call while a flag byte of its own is set, and calls `sceSaveDataTerminate` from two functions (0x2059, 0x20d9) that clear that byte. Of 53 local titles, all import and call it and 28 import `sceSaveDataTerminate` (25 do not); counting tail jumps as calls and ignoring indirect calls, 17 of those 28 call both once, 10 call both twice and 1 calls it once and `sceSaveDataTerminate` twice. Changed: `docs/dev/debt/libSceSaveData.native.md`, one existing entry extended by one sentence. No code change. Method: for each of 53 local titles the import table of the title's executable was read, and direct `call` and `jmp` instructions to the imported functions were counted in that executable (static counting only, nothing run on a console). Only the counts are reported; no game code is attached. ### Overlap Four open PRs change `docs/dev/debt/libSceSaveData.native.md`, none of them this entry: #11720 changes the `sceSaveDataCancel` entry, and #10674, #8630 and #8285 add new entries (`sceSaveDataGetProgress`, `sceSaveDataLoadIcon`/`sceSaveDataSaveIcon`, `sceSaveDataMount2`). `git merge-tree` of this branch against each of their heads is clean. #12444 changes code in the same library and also merges cleanly. Measured on the file sets of all open PRs (`git diff --name-only` from each PR head's merge base with `main`). ### Tested Documentation only. `tools/check_conventions.py --base upstream/main` passes; based on current `main` `319621ba2e`. Not built, not run. ### 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 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 (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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!12600
No description provided.