Skip to content

feat(libSceNpSessionSignaling): implement sceNpSessionSignalingGetConnectionStatus, GetConnectionStatistics, GetMemoryInfo - #1582

Closed
Deses wants to merge 1 commit into
boykopovar:mainfrom
Deses:feat/npsessionsignaling-status-calls
Closed

Deses wants to merge 1 commit into
boykopovar:mainfrom
Deses:feat/npsessionsignaling-status-calls

Conversation

@Deses

@Deses Deses commented Oct 8, 2026 •

Copy link
Copy Markdown

What

Implements sceNpSessionSignalingGetConnectionStatus, sceNpSessionSignalingGetConnectionStatistics and sceNpSessionSignalingGetMemoryInfo for the library's offline model (contexts exist, no connection is ever created), with the signatures from the SDK reference. GetConnectionStatistics and GetMemoryInfo were declared without parameters and take one output pointer each; the ids of GetConnectionStatus are uint32_t (were int32_t).

  • GetConnectionStatus: NOT_INITIALIZED (0x80553301) before Initialize, INVALID_ARGUMENT for a null connStatus, CTX_NOT_FOUND (0x80553308) for a context that was never created or was destroyed, otherwise CONN_NOT_FOUND (0x8055330C). Nothing is written.
  • GetConnectionStatistics: the four counters (0x10 bytes) are 0.
  • GetMemoryInfo: totalMemSize is the poolSize passed to Initialize; current and peak usage are 0, as nothing is allocated from the pool; the reserved bytes are zeroed (0x28 bytes).
  • For these, Initialize reads SceNpSessionSignalingInitParam (0x28 bytes) and keeps poolSize; a null param returns INVALID_ARGUMENT and a second call ALREADY_INITIALIZED (0x80553302). Terminate returns NOT_INITIALIZED when the library is not initialized and drops the contexts. CreateContext2 and DestroyContext keep the set of live context ids; their results are unchanged.
  • TechnicalDebt: the two "unknown signature" entries are removed and NpSessionSignaling leaves the "assumed signatures" line (no export of the library is left without an implementation; tools/progress.py reports 15 of 15). New Unknown function info entries for the unknown-connection result and the pool usage GetMemoryInfo reports.

Sources (Sony SDK 12.000 NpSessionSignaling reference, mirrored in peterpuppy/bm under features/ps5):

Unconfirmed: the result for a connection id that does not exist. The reference lists CONN_NOT_FOUND but also describes status INACTIVE (0) as "a connection with the specified ID does not exist"; the error is returned here, as no connection id is ever handed out. The console's own pool usage after initialization is unknown. The library's existing UNAVAILABLE (0x80552D06) is not in the reference's error table; it is left as is.

Overlaps: #1128 (clang-format) reformats the old GetConnectionStatus and #1539 removes the same two TechnicalDebt entries; neither implements these calls.

Tested

Windows 11, GCC 15.2.0 (WinLibs), Release, in this branch's worktree rebased on current upstream/main (fe9beae): full build, libs target and ctest -R np_ pass. guest_np_session_signaling checks the three calls and Terminate before Initialize (NOT_INITIALIZED), a null and a second Initialize, null outputs, the pool size of the first Initialize with zero usage, zero statistics, CTX_NOT_FOUND for an unknown and a destroyed context, CONN_NOT_FOUND with the outputs left untouched, and NOT_INITIALIZED after Terminate. check_conventions.py and check_test_registration.py clean. No title tested.

CI: the upstream runs for this head are waiting for approval (#1631). The same Build workflow ran on the fork for head 0c6ce38b: https://github.com/Deses/AnyPS5/actions/runs/37804528715, Windows green; Linux stopped at check_test_registration.py because the base fe9beae0 still carried the guest_formatting_tests exception that #1603 removed. The head merged into current main (4b005b22, merge 191b8e99): https://github.com/Deses/AnyPS5/actions/runs/37805201526, Linux and Windows (full build, libs, ctest) and the relinker jobs (Linux, Windows, macOS) green.

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

@Deses
Deses force-pushed the feat/npsessionsignaling-status-calls branch from 6cb547b to 38981e3 Compare October 8, 2026 14:10
…nectionStatus, GetConnectionStatistics, GetMemoryInfo
@Deses
Deses force-pushed the feat/npsessionsignaling-status-calls branch from 38981e3 to 0c6ce38 Compare October 8, 2026 14:12
@Deses
Deses marked this pull request as ready for review October 8, 2026 14:12
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is shown reaching these calls on main, and library functions go in when one does. The same goes for #1537, #1564 and #1583. Please reopen any of them with the title ID and the log line where it stops.

ycbuzi pushed a commit to ycbuzi/AnyPS5 that referenced this pull request Oct 10, 2026
…ceNpSessionSignalingGetConnectionStatus, GetConnectionStatistics, GetMemoryInfo

Harvested from upstream (closed unmerged); library completion 2842/3239 -> 2845/3239. (changelog conflict: kept both)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011krDVCnnMQPaEFEqCDnKmA
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.

2 participants