Skip to content

feat(libSceNpManager): keep the NP toolkit state callback slot - #16110

Open
MarrasFederico wants to merge 1 commit into
boykopovar:mainfrom
MarrasFederico:feat/np-manager-toolkit-state-callback
Open

MarrasFederico wants to merge 1 commit into
boykopovar:mainfrom
MarrasFederico:feat/np-manager-toolkit-state-callback

Conversation

@MarrasFederico

Copy link
Copy Markdown
Contributor

What

sceNpRegisterStateCallbackForToolkit and sceNpUnregisterStateCallbackForToolkit were parameterless placeholders that threw. shadPS4 keeps one toolkit callback slot, separate from the other state callbacks: registering stores the callback and user data with no checks, and unregistering an empty slot returns CALLBACK_NOT_REGISTERED.

Both exports now do the same under the existing state-callback mutex. The callback type follows shadPS4's OrbisNpStateCallbackForNpToolkit, the same shape as NpStateCallbackA.

  • The callback is never called: the offline model produces no toolkit state change.
  • The pending-exports count drops from 188 to 186.

Not measured on a console.

Tested

Ubuntu 26.04.1, kernel 7.0.0, GCC 15.2.0, Release, BUILD_TESTING=ON, on main 6e6dae4e8b. Windows and macOS were not compiled here. No title was run.

  • guest_np_manager passes. New cases: unregistering before any registration, registering twice (overwrite), unregistering twice, and a null callback leaving the slot empty.
  • On main the new calls do not compile against the (void) declarations, and the placeholders throw.
  • check_conventions.py --base upstream/main passes.
  • pr_overlap.py: #15580 and my #15203 also change the pending-export count line, and #15922 edits the top of Api.hpp; none implements these exports. #14212 only respaces the debt file.

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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Progress report (fc23faa → 78cfa6a)

📈 System libraries: 26.86% (+0.0053%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceNpManager sceNpRegisterStateCallbackForToolkit
libSceNpManager sceNpUnregisterStateCallbackForToolkit

Changed libraries (implemented exports)

Library Before After Change
libSceNpManager 78/551 (14.16%) 80/551 (14.52%) +0.36%

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant