feat(libSceNpManager): answer four more calls offline #2398

Closed
NahuelGenchi wants to merge 1 commit from upstream-pr/2398 into main
NahuelGenchi commented 2026-10-09 18:05:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-09T18:05:40Z.


What

Four libSceNpManager exports still threw as not implemented, although the rest of the library already answers as a signed-out console. This gives them the same offline behaviour.

sceNpCheckNpAvailability takes the request id and an online id. A null online id is rejected, and since no user here has an online id the call reports SCE_NP_ERROR_USER_NOT_FOUND. sceNpGetUserIdByAccountId takes an account id and an output user id; account 0 or a null output is rejected and anything else reports SCE_NP_ERROR_SIGNED_OUT, like sceNpGetAccountIdA does. sceNpSetContentRestriction checks the structure (size, default age, the count and the age list pointer) and accepts it. sceNpRegisterGamePresenceCallback keeps the last callback, which is never called because there are no presence updates offline. The previous sceNpCheckNpAvailability declaration took a const char*, it is now the NpOnlineId pointer, and NpContentRestriction and a new NpAgeRestriction got their real layout instead of an opaque 128 byte blob.

The error values, the argument checks and the structure layout come from shadPS4's np_manager (commit linked in the technical debt entry); none of it was measured on a console, so it is recorded there. The entry for exports declared without parameters no longer lists NpManager.

Tested

Ubuntu 26.04, GCC 15.2. guest_np_manager now covers the four calls, including each rejected argument case and that the output user id stays untouched. The system library count goes from 2578 to 2582 in tools/progress.py. The convention, overlap and test registration checks pass. Not run on Windows locally, so the Windows job is the first run there.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4804118737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2398). Originally posted by [NahuelGenchi](https://github.com/NahuelGenchi) on 2026-10-09T18:05:40Z. --- ### What Four libSceNpManager exports still threw as not implemented, although the rest of the library already answers as a signed-out console. This gives them the same offline behaviour. `sceNpCheckNpAvailability` takes the request id and an online id. A null online id is rejected, and since no user here has an online id the call reports `SCE_NP_ERROR_USER_NOT_FOUND`. `sceNpGetUserIdByAccountId` takes an account id and an output user id; account 0 or a null output is rejected and anything else reports `SCE_NP_ERROR_SIGNED_OUT`, like `sceNpGetAccountIdA` does. `sceNpSetContentRestriction` checks the structure (size, default age, the count and the age list pointer) and accepts it. `sceNpRegisterGamePresenceCallback` keeps the last callback, which is never called because there are no presence updates offline. The previous `sceNpCheckNpAvailability` declaration took a `const char*`, it is now the `NpOnlineId` pointer, and `NpContentRestriction` and a new `NpAgeRestriction` got their real layout instead of an opaque 128 byte blob. The error values, the argument checks and the structure layout come from shadPS4's np_manager (commit linked in the technical debt entry); none of it was measured on a console, so it is recorded there. The entry for exports declared without parameters no longer lists NpManager. ### Tested Ubuntu 26.04, GCC 15.2. `guest_np_manager` now covers the four calls, including each rejected argument case and that the output user id stays untouched. The system library count goes from 2578 to 2582 in `tools/progress.py`. The convention, overlap and test registration checks pass. Not run on Windows locally, so the Windows job is the first run there. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
github-actions[bot] commented 2026-10-09 18:05:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T18:05:50Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086523976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2398#issuecomment-6086523976). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T18:05:50Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
github-actions[bot] commented 2026-10-09 18:06:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T18:06:03Z.


Progress report (f8c2f07 → 90fc193)

📈 System libraries: 84.82% (+0.13%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceNpManager sceNpCheckNpAvailability
libSceNpManager sceNpGetUserIdByAccountId
libSceNpManager sceNpRegisterGamePresenceCallback
libSceNpManager sceNpSetContentRestriction
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086527465 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2398#issuecomment-6086527465). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T18:06:03Z. --- <!-- progress-report --> ### Progress report (f8c2f07 → 90fc193) 📈 **System libraries**: 84.82% (+0.13%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceNpManager | `sceNpCheckNpAvailability` | | libSceNpManager | `sceNpGetUserIdByAccountId` | | libSceNpManager | `sceNpRegisterGamePresenceCallback` | | libSceNpManager | `sceNpSetContentRestriction` | </details>

Pull request closed

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!2398
No description provided.