Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/savedata-initialize3-pairing
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/savedata-initialize3-pairing

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

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

…rminate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@adriadam10
adriadam10 merged commit fe22b15 into boykopovar:main Oct 28, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Docs-only, one sentence added to the existing sceSaveDataInitialize3 debt entry; it matches the implementation (initializations counted, sceSaveDataTerminate ends the session at the last one) and states the pairing counts as static, unmeasured on a console. Conventions pass; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants