feat(np): answer and declare the PS4 NP and trophy imports of CUSA03312 #9896

Merged
savvaniss merged 3 commits from upstream-pr/9896 into main 2026-10-23 18:25:12 +00:00
savvaniss commented 2026-10-22 20:49:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-22T20:49:43Z.


What

Get-fix/AnyPS5#2, moved upstream. #9433 merged the PS4 NP and trophy libraries this built on, so it goes straight on main.

The Hasbro Family Fun Pack titles (CUSA03312) import NP functions that main doesn't answer yet, and call some of them while they start. Several open pull requests now cover parts of this, so this one keeps only what no other open pull request implements or declares.

Implemented, following the signed-out model the NP libraries already use:

  • sceNpMatching2Initialize and sceNpMatching2Terminate keep the library state.
    • Initialization checks the parameter's size field (0x28, or 0x30 with an SSL pool), and a second one returns ALREADY_INITIALIZED.
    • Termination returns NOT_INITIALIZED when nothing was initialized.
    • No thread starts and no server is reached. Monopoly Plus initializes the library at startup.
  • sceNpTrophyGetGameInfo, sceNpTrophyGetGroupInfo and sceNpTrophyGetTrophyInfo answer for a registered context from the trophy package that #9433's library already opens. On main they throw.
    • UnityNpToolkit in Boggle and Trivial Pursuit Live! asks for the game info when it registers its trophy context. It allocates one request per trophy from numTrophies, so a count of 0 leaves it reading an unset request.
    • TROPCONF.ESFM is encrypted, so the counts come from the package's TROPnnn.PNG and GRnnn.PNG icons, as #9433 already counts trophies. Names, grades and timestamps are empty or unknown.
    • Only the base game group (-1) is answered. A real group throws, because a trophy's group is listed only in the encrypted configuration.

Declared, each throwing NotImplemented_nid_no_patch: sceNpSignalingDeactivateConnection and sceInvitationDialogClose.

The debt file of each library records what it gets here. The NpTrophy entry no longer says the three info calls throw.

Get-fix/AnyPS5#2 also had these, which other open pull requests cover now:

  • sceNpCmpOnlineId and sceNpCmpNpId: #9037 and #9063. Boggle's UnityNpToolkit needs sceNpCmpNpId.
  • sceNpSignalingInitialize and sceNpSignalingTerminate: #9886. Monopoly Plus calls them at startup.
  • sceNpLookupCreateTitleCtx: #9887.
  • sceNpLookupAbortRequest, CreateAsyncRequest and PollAsync: #8472.
  • sceNpMatching2AbortContextStart, GrantRoomOwner, SignalingGetConnectionStatus and SignalingGetPingInfo: #9874.
  • sceNpTrophyAbortHandle: #9871.
  • The six GNM declarations: libSceGnmDriverForNeoMode already exports them on main.

Tested

Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, on main 3bbd2321de.

  • guest_np_ps4_imports (new) is registered in core/libs/CMakeLists.txt beside the other guest NP tests.

    • It covers both NpMatching2 functions with every error above, and checks that sceNpSignalingDeactivateConnection throws <name> not implemented.
    • It writes a trophy package with three trophy icons and no group icons. It checks the game, base group and trophy answers before and after an unlock (progress 0, then 33), and each error.
    • It passes. With the NpMatching2 and NpTrophy Export.cpp as on main, it stops at "sceNpTrophyGetGameInfo not implemented".
  • CUSA03312, on ps4/limbo-gpu at 93eeee0141 (#6977's head then), with these answers and the functions listed above. The stack also had Get-fix/AnyPS5#1 and local stand-ins for sceGnmDrawInitDefaultHardwareState200 and sceGnmUpdate*Shader.

    • Risk plays a local match.
    • Monopoly Plus initializes NpMatching2 and NpSignaling and reaches its loading screen.
    • Trivial Pursuit Live! gets past Begin Game to profile creation with the trophy info. With a count of 0 its UnityNpToolkit crashed there.

    The titles don't run on main: they need #9430 to #9432.

  • tools/check_conventions.py --base origin/main passes.

  • tools/pr_overlap.py lists four. #9037 and #9063 register their tests on the same line of core/libs/CMakeLists.txt. #9874 also creates docs/dev/debt/libSceNpMatching2.md and changes the NpTrophy debt entry next to this one. #9886 also creates docs/dev/debt/libSceNpSignaling.md. None implements or declares the same exports, and whichever lands second merges the other's lines.

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: CUSA03312 #7198
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4973930080 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9896). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-22T20:49:43Z. --- ### What Get-fix/AnyPS5#2, moved upstream. #9433 merged the PS4 NP and trophy libraries this built on, so it goes straight on `main`. The Hasbro Family Fun Pack titles (CUSA03312) import NP functions that `main` doesn't answer yet, and call some of them while they start. Several open pull requests now cover parts of this, so this one keeps only what no other open pull request implements or declares. Implemented, following the signed-out model the NP libraries already use: - `sceNpMatching2Initialize` and `sceNpMatching2Terminate` keep the library state. - Initialization checks the parameter's `size` field (0x28, or 0x30 with an SSL pool), and a second one returns `ALREADY_INITIALIZED`. - Termination returns `NOT_INITIALIZED` when nothing was initialized. - No thread starts and no server is reached. Monopoly Plus initializes the library at startup. - `sceNpTrophyGetGameInfo`, `sceNpTrophyGetGroupInfo` and `sceNpTrophyGetTrophyInfo` answer for a registered context from the trophy package that #9433's library already opens. On `main` they throw. - UnityNpToolkit in Boggle and Trivial Pursuit Live! asks for the game info when it registers its trophy context. It allocates one request per trophy from `numTrophies`, so a count of 0 leaves it reading an unset request. - `TROPCONF.ESFM` is encrypted, so the counts come from the package's `TROPnnn.PNG` and `GRnnn.PNG` icons, as #9433 already counts trophies. Names, grades and timestamps are empty or unknown. - Only the base game group (-1) is answered. A real group throws, because a trophy's group is listed only in the encrypted configuration. Declared, each throwing `NotImplemented_nid_no_patch`: `sceNpSignalingDeactivateConnection` and `sceInvitationDialogClose`. The debt file of each library records what it gets here. The NpTrophy entry no longer says the three info calls throw. Get-fix/AnyPS5#2 also had these, which other open pull requests cover now: - `sceNpCmpOnlineId` and `sceNpCmpNpId`: #9037 and #9063. Boggle's UnityNpToolkit needs `sceNpCmpNpId`. - `sceNpSignalingInitialize` and `sceNpSignalingTerminate`: #9886. Monopoly Plus calls them at startup. - `sceNpLookupCreateTitleCtx`: #9887. - `sceNpLookupAbortRequest`, `CreateAsyncRequest` and `PollAsync`: #8472. - `sceNpMatching2AbortContextStart`, `GrantRoomOwner`, `SignalingGetConnectionStatus` and `SignalingGetPingInfo`: #9874. - `sceNpTrophyAbortHandle`: #9871. - The six GNM declarations: libSceGnmDriverForNeoMode already exports them on `main`. ### Tested Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, on `main` `3bbd2321de`. - `guest_np_ps4_imports` (new) is registered in `core/libs/CMakeLists.txt` beside the other guest NP tests. - It covers both NpMatching2 functions with every error above, and checks that `sceNpSignalingDeactivateConnection` throws `<name> not implemented`. - It writes a trophy package with three trophy icons and no group icons. It checks the game, base group and trophy answers before and after an unlock (progress 0, then 33), and each error. - It passes. With the NpMatching2 and NpTrophy `Export.cpp` as on `main`, it stops at "sceNpTrophyGetGameInfo not implemented". - CUSA03312, on `ps4/limbo-gpu` at `93eeee0141` (#6977's head then), with these answers and the functions listed above. The stack also had Get-fix/AnyPS5#1 and local stand-ins for `sceGnmDrawInitDefaultHardwareState200` and `sceGnmUpdate*Shader`. - Risk plays a local match. - Monopoly Plus initializes NpMatching2 and NpSignaling and reaches its loading screen. - Trivial Pursuit Live! gets past Begin Game to profile creation with the trophy info. With a count of 0 its UnityNpToolkit crashed there. The titles don't run on `main`: they need #9430 to #9432. - `tools/check_conventions.py --base origin/main` passes. - `tools/pr_overlap.py` lists four. #9037 and #9063 register their tests on the same line of `core/libs/CMakeLists.txt`. #9874 also creates `docs/dev/debt/libSceNpMatching2.md` and changes the NpTrophy debt entry next to this one. #9886 also creates `docs/dev/debt/libSceNpSignaling.md`. None implements or declares the same exports, and whichever lands second merges the other's lines. ### 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 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] Fixes: none - [x] Unblocks: CUSA03312 #7198 - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!9896
No description provided.