Skip to content

docs(debt): note the result structure a title passes to sceSaveDataDirNameSearch2 - #10095

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/debt-savedata-dirnamesearch2-title
Oct 26, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
xXPBSXx:docs/debt-savedata-dirnamesearch2-title

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

The changed entry now reads:

sceSaveDataDirNameSearch2 (libSceSaveData.native) runs the same search as sceSaveDataDirNameSearch with the same condition and result structures, as SharpEmu does, its only source; what distinguishes it on the console is unknown. One title (PPSA35669, in a plugin) disassembled for this entry has one call site (0x2eda71); it clears 56 bytes for the result structure first (the size of the structure used here), puts a value returned by a call with the argument 0x8000 at offset 8 and 0x400 at offset 0x10, and afterwards branches on a negative result and reads the 32-bit field at offset 0, skipping its loop when it is 0. That agrees with the result structure of sceSaveDataDirNameSearch. The condition structure was not read.

Changed: docs/dev/debt/libSceSaveData.native.md. No code change.

Method: Ghidra 12.1.4 headless on the unwrapped executable of the title named; the addresses are the call sites in that executable as Ghidra maps it, read from the instruction listing (static reading only, nothing run on a console). The listing and decompiled code are game code and are not attached.

Fixes: #10094

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes; git merge-tree against main is clean. Every number in the sentence was recounted against the instruction listing. Not built, not run, no title 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 libSceSaveData.native debt: note the result structure a title passes to sceSaveDataDirNameSearch2 #10094
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…rNameSearch2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8285 docs/dev/debt/libSceSaveData.native.md L19

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 11080 docs/dev/debt/libSceSaveData.native.md
PR 11083 docs/dev/debt/libSceSaveData.native.md

@github-actions github-actions Bot added docs fix error Closes an issue (Fixes #N) labels Oct 23, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The documentation change is evidence-bounded and internally consistent. The call site supports the observed result buffer size/layout and count-field use; the entry explicitly says the condition structure was not read and leaves console-specific differences unknown. I checked PR #7780’s same-file change: it adds a separate pending-declarations section, with no line-level overlap in this functional entry. #7780 currently conflicts with main, so combined landing order cannot be confirmed until that PR is refreshed; I do not see a substantive dependency between these two specific edits. In this PR worktree, python3 tools/check_conventions.py --base upstream/main, git diff --check upstream/main...HEAD, and python3 tools/check_main_sync.py all passed (1 ahead/115 behind; merge clean). Hosted eligibility, intake, conventions, and labels checks pass; product build jobs are skipped for this docs-only PR.

@adriadam10 adriadam10 self-assigned this Oct 26, 2026
@adriadam10
adriadam10 merged commit 99b8446 into boykopovar:main Oct 26, 2026
12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the entry against the result structure in core/libs/SceTypes.hpp (56 bytes, dir_names at offset 8, dir_names_num at 0x10), which agrees with the call site described; the entry states what was not read. Conventions green, docs only; merged.

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

Labels

docs fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libSceSaveData.native debt: note the result structure a title passes to sceSaveDataDirNameSearch2

3 participants