feat(libSceNpCommon): declare 707 callable exports #13120

Open
kyon-eth wants to merge 19 commits from upstream-pr/13120 into main
kyon-eth commented 2026-10-30 02:36:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kyon-eth on 2026-10-30T02:36:25Z.


What

Declare 707 additional libSceNpCommon callable exports present in the 13.60-labelled inventory. Of these, 292 match typed function NIDs in the public 3.20 catalogue; 415 do not and their presence in retail 3.20 is unverified. The linked per-image ELF records show those 415 in a separate 3.20-labelled image and the later image, with matching module and library identities; neither image label is authenticated. These are import-resolution declarations that throw; signatures and behavior are unverified, and no game unblock is claimed. Data exports are outside this change.

The linked metadata is a summary of the observed identities, not independent verification. This change excludes 82 exports implemented by #13130, #13270, #13277, #13281, #13345, #13408 and #13431, of which #13281, #13345 and #13431 have now merged; the remaining four are intended to land before this inventory PR.

Tested

  • macOS x86-64: compiled the 707-entry export source and verified all 707 NIDs in a patched test image.
  • Merge previews of a previous head with each of #13130, #13270, #13277 and #13281 individually were clean. A combined merge was not testable without conflict resolution: the prerequisite branches conflict with one another, including #13130 with #13270. Combined validation with the current heads and #13345, #13408 and #13431 is outstanding.
  • Audited public headers, conventions, whitespace and open PR overlap. The checker could not fully compare some pre-existing conflicting branches, including three prerequisites; their changed NIDs were inspected separately and have no overlap with this inventory.
  • No Linux, Windows, console or game run was performed.

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: #13130, #13270, #13277, #13408
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5078595686 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13120). Originally posted by [kyon-eth](https://github.com/kyon-eth) on 2026-10-30T02:36:25Z. --- ### What Declare 707 additional `libSceNpCommon` callable exports present in the 13.60-labelled inventory. Of these, 292 match typed function NIDs in the public 3.20 catalogue; 415 do not and their presence in retail 3.20 is unverified. The linked per-image ELF records show those 415 in a separate 3.20-labelled image and the later image, with matching module and library identities; neither image label is authenticated. These are import-resolution declarations that throw; signatures and behavior are unverified, and no game unblock is claimed. Data exports are outside this change. The linked metadata is a summary of the observed identities, not independent verification. This change excludes 82 exports implemented by #13130, #13270, #13277, #13281, #13345, #13408 and #13431, of which #13281, #13345 and #13431 have now merged; the remaining four are intended to land before this inventory PR. ### Tested - macOS x86-64: compiled the 707-entry export source and verified all 707 NIDs in a patched test image. - Merge previews of a previous head with each of #13130, #13270, #13277 and #13281 individually were clean. A combined merge was not testable without conflict resolution: the prerequisite branches conflict with one another, including #13130 with #13270. Combined validation with the current heads and #13345, #13408 and #13431 is outstanding. - Audited public headers, conventions, whitespace and open PR overlap. The checker could not fully compare some pre-existing conflicting branches, including three prerequisites; their changed NIDs were inspected separately and have no overlap with this inventory. - No Linux, Windows, console or game run was performed. ### 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: #13130, #13270, #13277, #13408 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
adriadam10 commented 2026-10-30 04:48:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-30T04:48:20Z.

Review: CHANGES_REQUESTED


Thanks, the declarations check out (every body throws through NotImplemented_nid_no_patch, header, source and debt rows agree, and the 368/421 wording asked for above is in the current head). One blocker:

  • core/libs/prx/libSceNpCommon/InventoryExports.cpp:1063-1243 and :2631 (plus include/InventoryExports.hpp and the debt rows) declare 21 exports that #13130 implements: sce::np::Cond (Wait, dtor, Signal, Destroy, SignalTo, SignalAll, C1, C2, D2, IsInit) and sce::np::Mutex (Init, Lock, ctor, dtor, Unlock, TryLock, C1, C2, D0, D1, D2). Whichever of the two merges second defines the same symbols twice and fails to link. Please drop those 21 from the source, header and docs/dev/debt/libSceNpCommon.md (the count becomes 768, update the 368/421 split accordingly) and list #13130 under Depends on if you prefer to land after it.

Everything else can stay as is.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708195746 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13120#pullrequestreview-5708195746). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-30T04:48:20Z. **Review:** CHANGES_REQUESTED --- Thanks, the declarations check out (every body throws through `NotImplemented_nid_no_patch`, header, source and debt rows agree, and the 368/421 wording asked for above is in the current head). One blocker: - `core/libs/prx/libSceNpCommon/InventoryExports.cpp:1063-1243` and `:2631` (plus `include/InventoryExports.hpp` and the debt rows) declare 21 exports that #13130 implements: `sce::np::Cond` (`Wait`, `dtor`, `Signal`, `Destroy`, `SignalTo`, `SignalAll`, `C1`, `C2`, `D2`, `IsInit`) and `sce::np::Mutex` (`Init`, `Lock`, `ctor`, `dtor`, `Unlock`, `TryLock`, `C1`, `C2`, `D0`, `D1`, `D2`). Whichever of the two merges second defines the same symbols twice and fails to link. Please drop those 21 from the source, header and `docs/dev/debt/libSceNpCommon.md` (the count becomes 768, update the 368/421 split accordingly) and list #13130 under `Depends on` if you prefer to land after it. Everything else can stay as is.
CnRJay commented 2026-11-01 20:00:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T20:00:51Z.

Review: COMMENTED


Correction (2026-11-01): this review demanded a title for a PR where no title can supply one. CONTRIBUTING allows Unblocks: none. The technical points below are unaffected.

No title ID and no log line here. The description says "no game unblock is claimed" and Unblocks: none, so nothing shows a title on main reaching any of these 707 libSceNpCommon NIDs. Declaring names that throw does not change what a title does today: an unresolved import and a NotImplemented_nid_no_patch throw both stop it.

  1. Provenance of 415 of the 707. The description says 292 match typed function NIDs in the 3.20 catalogue and 415 do not, with their presence in retail 3.20 "unverified" and neither image label authenticated. Declaring 415 exports whose existence is unverified is the weakest part of this. I would split those out and only declare ones a title imports.
  2. Size and stacking. InventoryExports.hpp and InventoryExports.cpp add roughly 3,500 lines of generated declarations in one file. The PR also depends on four unmerged PRs (#13130, #13270, #13277, #13408) for the exclusion list, so it cannot be reviewed or merged on its own, and any of them landing in a different shape means this has to be regenerated.
  3. Prototypes. Every entry is int APS5_VABI name() with no parameters, the whole set has to be redeclared as each one is implemented. The debt entry should say so.

What I would want: the title ID that imports one of these, and the log line from main showing it reaching the unresolved import.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729960109 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13120#pullrequestreview-5729960109). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T20:00:51Z. **Review:** COMMENTED --- **Correction (2026-11-01):** this review demanded a title for a PR where no title can supply one. CONTRIBUTING allows `Unblocks: none`. The technical points below are unaffected. No title ID and no log line here. The description says "no game unblock is claimed" and `Unblocks: none`, so nothing shows a title on `main` reaching any of these 707 `libSceNpCommon` NIDs. Declaring names that throw does not change what a title does today: an unresolved import and a `NotImplemented_nid_no_patch` throw both stop it. 1. **Provenance of 415 of the 707.** The description says 292 match typed function NIDs in the 3.20 catalogue and 415 do not, with their presence in retail 3.20 "unverified" and neither image label authenticated. Declaring 415 exports whose existence is unverified is the weakest part of this. I would split those out and only declare ones a title imports. 2. **Size and stacking.** `InventoryExports.hpp` and `InventoryExports.cpp` add roughly 3,500 lines of generated declarations in one file. The PR also depends on four unmerged PRs (#13130, #13270, #13277, #13408) for the exclusion list, so it cannot be reviewed or merged on its own, and any of them landing in a different shape means this has to be regenerated. 3. **Prototypes.** Every entry is `int APS5_VABI name()` with no parameters, the whole set has to be redeclared as each one is implemented. The debt entry should say so. What I would want: the title ID that imports one of these, and the log line from `main` showing it reaching the unresolved import.
MarcZX10 commented 2026-11-22 14:00:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T14:00:15Z.

Review: COMMENTED


Reviewed — comments

The export declarations follow the documented throwing-stub pattern, but the supplied evidence does not let me verify the full inventory or its build and overlap claims.

What I ran

Reviewed head 59d18135b796e3874cc91c1ac5a2f08ea7fa25ce using repo_read.py to inspect the prepared description, commit list, diff, manifest, and repository files. No build or tests were run; the description reports an author-run macOS x86-64 check. No merge preview was run.

Results

Check Result Note
Diff and declaration pattern passed Inspected implementation excerpts and export wiring.
Build and tests not run Only author-reported macOS check.
Full inventory and overlap not run No independent exhaustive check performed.

Findings

Blocking

None verified.

Non-blocking

  • The description reports combined validation with current prerequisite heads is outstanding. Please run that integration check when those changes are available.

Not verified

The diff changes five files: core/libs/prx/libSceNpCommon/CMakeLists.txt, core/libs/prx/libSceNpCommon/InventoryExports.cpp, core/libs/prx/libSceNpCommon/include/InventoryExports.hpp, core/libs/prx/libSceNpCommon/libSceNpCommon.hpp, and docs/dev/debt/libSceNpCommon.md. I read the full C++ implementation and header, the complete debt document, and excerpts of the diff and manifest; I did not read every changed line in the diff or independently verify every NID, declaration, catalogue or overlap claim. files.json was not available through the reader, so excluded files were not verified. Linux, Windows, console, game, and combined prerequisite integration behavior were not verified.

To get this to a good state

Nothing is required. Optional: run combined integration validation against the current prerequisite heads and report its result.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012606243 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13120#pullrequestreview-6012606243). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T14:00:15Z. **Review:** COMMENTED --- # Reviewed — comments The export declarations follow the documented throwing-stub pattern, but the supplied evidence does not let me verify the full inventory or its build and overlap claims. ## What I ran Reviewed head `59d18135b796e3874cc91c1ac5a2f08ea7fa25ce` using `repo_read.py` to inspect the prepared description, commit list, diff, manifest, and repository files. No build or tests were run; the description reports an author-run macOS x86-64 check. No merge preview was run. ## Results | Check | Result | Note | | --- | --- | --- | | Diff and declaration pattern | passed | Inspected implementation excerpts and export wiring. | | Build and tests | not run | Only author-reported macOS check. | | Full inventory and overlap | not run | No independent exhaustive check performed. | ## Findings ### Blocking None verified. ### Non-blocking - The description reports combined validation with current prerequisite heads is outstanding. Please run that integration check when those changes are available. ## Not verified The diff changes five files: `core/libs/prx/libSceNpCommon/CMakeLists.txt`, `core/libs/prx/libSceNpCommon/InventoryExports.cpp`, `core/libs/prx/libSceNpCommon/include/InventoryExports.hpp`, `core/libs/prx/libSceNpCommon/libSceNpCommon.hpp`, and `docs/dev/debt/libSceNpCommon.md`. I read the full C++ implementation and header, the complete debt document, and excerpts of the diff and manifest; I did not read every changed line in the diff or independently verify every NID, declaration, catalogue or overlap claim. `files.json` was not available through the reader, so excluded files were not verified. Linux, Windows, console, game, and combined prerequisite integration behavior were not verified. ## To get this to a good state Nothing is required. Optional: run combined integration validation against the current prerequisite heads and report its result.
ligmaSec commented 2026-12-03 13:22:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:22:43Z.

Review: COMMENTED


Compiled the branch’s export source as a Linux object and checked that it defines all 707 callable symbols from the diff. All 9 explicit NID aliases resolve to their declared function symbols in the object. Move the debt addition into a change fragment under docs/dev/debt/changes/ and let the debt fold update the roll-up.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170617644 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13120#pullrequestreview-6170617644). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T13:22:43Z. **Review:** COMMENTED --- Compiled the branch’s export source as a Linux object and checked that it defines all 707 callable symbols from the diff. All 9 explicit NID aliases resolve to their declared function symbols in the object. Move the debt addition into a change fragment under `docs/dev/debt/changes/` and let the debt fold update the roll-up. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/13120:upstream-pr/13120'
git switch 'upstream-pr/13120'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/13120'
git switch 'upstream-pr/13120'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/13120'
git switch 'upstream-pr/13120'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/13120'
git switch 'main'
git merge --squash 'upstream-pr/13120'
git switch 'main'
git merge --ff-only 'upstream-pr/13120'
git switch 'main'
git merge 'upstream-pr/13120'
git push origin 'main'
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!13120
No description provided.