refactor(libSceSaveData.native): name sceSaveDataPrepareForTransferring #4906

Merged
nicolasfalesy merged 2 commits from upstream-pr/4906 into main 2026-10-14 17:35:46 +00:00
nicolasfalesy commented 2026-10-13 03:22:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-13T03:22:53Z.


What

Names the libSceSaveData.native NID RvID8BVeg+g, declared as sceSaveDataUnknown_RvID8BVeg for Minecraft (PPSA17221). sceSaveDataPrepareForTransferring hashes to it:

$ python3 -c "import importlib.util as u; s=u.spec_from_file_location('n','tools/nid_names.py'); m=u.module_from_spec(s); s.loader.exec_module(m); print(m.compute_nid('sceSaveDataPrepareForTransferring'))"
RvID8BVeg+g

The name is not in aerolib (the pinned copy or the current one at fe2cc2948e). It was found by hashing combinations of the words in aerolib's libSceSaveData names, and it fits beside the sceSaveDataTransferringMountPs4 and sceSaveDataDirNameSearchPs4 imports it sits next to. As in #1145 and #2301, behaviour is unchanged: it still throws, and NotImplemented_nid_no_patch(__func__) now names the real function. Its arguments stay unknown; the debt entry says so and records where the name came from.

Tested

  • Linux (Arch, GCC 16.2.1, Release) on main c13dc7e6b: libs builds, and nm -D on libSceSaveData.native.prx shows the export RvID8BVeg+g.
  • tools/check_conventions.py --base upstream/main passes; tools/pr_overlap.py reports no overlap.
  • No title run: the function still throws, so nothing changes at runtime except its name in the message.

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: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4837880067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4906). Originally posted by [nicolasfalesy](https://github.com/nicolasfalesy) on 2026-10-13T03:22:53Z. --- ### What Names the libSceSaveData.native NID `RvID8BVeg+g`, declared as `sceSaveDataUnknown_RvID8BVeg` for Minecraft (PPSA17221). `sceSaveDataPrepareForTransferring` hashes to it: ``` $ python3 -c "import importlib.util as u; s=u.spec_from_file_location('n','tools/nid_names.py'); m=u.module_from_spec(s); s.loader.exec_module(m); print(m.compute_nid('sceSaveDataPrepareForTransferring'))" RvID8BVeg+g ``` The name is not in aerolib (the pinned copy or the current one at `fe2cc2948e`). It was found by hashing combinations of the words in aerolib's libSceSaveData names, and it fits beside the `sceSaveDataTransferringMountPs4` and `sceSaveDataDirNameSearchPs4` imports it sits next to. As in #1145 and #2301, behaviour is unchanged: it still throws, and `NotImplemented_nid_no_patch(__func__)` now names the real function. Its arguments stay unknown; the debt entry says so and records where the name came from. ### Tested - Linux (Arch, GCC 16.2.1, Release) on `main` c13dc7e6b: `libs` builds, and `nm -D` on `libSceSaveData.native.prx` shows the export `RvID8BVeg+g`. - `tools/check_conventions.py --base upstream/main` passes; `tools/pr_overlap.py` reports no overlap. - No title run: the function still throws, so nothing changes at runtime except its name in the message. ### 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] Unblocks: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-13 03:23:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T03:23:17Z.


Progress report (e154f56 → 31e53e5)

➖ System libraries: 88.79% (+0.0%, +1 declared, -1 removed functions)

🆕 1 declared as stubs
Library Name
libSceSaveData.native sceSaveDataPrepareForTransferring
🗑️ 1 removed
Library Name
libSceSaveData.native sceSaveDataUnknown_RvID8BVeg
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6137485245 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4906#issuecomment-6137485245). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-13T03:23:17Z. --- <!-- progress-report --> ### Progress report (e154f56 → 31e53e5) ➖ **System libraries**: 88.79% (+0.0%, +1 declared, -1 removed functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceSaveData.native | `sceSaveDataPrepareForTransferring` | </details> <details> <summary>🗑️ 1 removed</summary> | Library | Name | | - | - | | libSceSaveData.native | `sceSaveDataUnknown_RvID8BVeg` | </details>
adriadam10 commented 2026-10-14 17:20:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T17:20:07Z.


Checked compute_nid("sceSaveDataPrepareForTransferring") = RvID8BVeg+g, the diff (rename only, still throws, debt line updated), and build + ctest of the libSceSaveData.native tests on top of current main (6/6).

One fix, pushed as a commit on your branch: the APS5_EXPORT("RvID8BVeg+g", sceSaveDataPrepareForTransferring); line is removed. The real name already hashes to that NID, so keeping the alias exports it twice, which the Windows PE patcher rejects (duplicate patched export name).

Merging once the full Build is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174133832 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4906#issuecomment-6174133832). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-14T17:20:07Z. --- Checked `compute_nid("sceSaveDataPrepareForTransferring")` = `RvID8BVeg+g`, the diff (rename only, still throws, debt line updated), and build + ctest of the libSceSaveData.native tests on top of current `main` (6/6). One fix, pushed as a commit on your branch: the `APS5_EXPORT("RvID8BVeg+g", sceSaveDataPrepareForTransferring);` line is removed. The real name already hashes to that NID, so keeping the alias exports it twice, which the Windows PE patcher rejects (`duplicate patched export name`). Merging once the full Build is green.
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!4906
No description provided.