Commit Graph
25 Commits
Author SHA1 Message Date
Adrià 49d1f9b07e Merge pull request #9726 from KernelPanicNT/fix/npmanager-state-callback-id-error
fix(libSceNpManager): return the module error for an out-of-range state callback id
2026-10-25 23:49:10 +01:00
sivasdeadknight 71932c0a56 fix(libSceNpManager): validate request ids for abort, delete and poll
sceNpAbortRequest and sceNpDeleteRequest return SCE_NP_ERROR_REQUEST_NOT_FOUND
for an id that was never created or was deleted; sceNpPollAsync does too and
additionally rejects a null result pointer with SCE_NP_ERROR_INVALID_ARGUMENT
before reading the id, without writing the caller's result. A live request
keeps its signed-out completion. This pins the validation half of shadPS4's
np_manager model that issue #9277 reports; the kind, completion state and
WaitAsync publication half stays open, documented in the debt entry, and the
sceNpWaitAsync export itself stays with PR #9282.

Tests: guest_np_manager tests the four absent/deleted probes (0, -1, 0x7fffffff,
a deleted id) for all three calls, output preservation, null-result precedence
and the live-id paths; guest_np_reachability unchanged. Both pass on Linux; the
new asserts failed on unpatched exports first.
2026-10-23 03:28:13 +02:00
KernelPanicNT 8029493488 fix(libSceNpManager): return the module error for an out-of-range state callback id
sceNpUnregisterStateCallbackA returns 0x80550015 for a callback id
outside 1..8, compared unsigned so 0, negative ids and INT_MIN are
included, as libSceNpManager.sprx does at RVA 0x15b10 in prosper's
reading. An empty slot still returns 0x80550009.
2026-10-22 18:24:56 +00:00
Rookie f0e63df885 feat(libSceNpManager): answer the user ID account queries for a signed-out user
sceNpCheckNpAvailabilityA, sceNpGetAccountLanguageA,
sceNpGetParentalControlInfoA and sceNpGetAccountDateOfBirthA return
SIGNED_OUT without writing, like sceNpGetAccountCountryA. The game
presence queries report OFFLINE. A null pointer or user id -1 is
INVALID_ARGUMENT, and the request forms refuse request id 0 and an
unknown request as sceNpSetGamePresenceOnline does. Signatures and
checks follow shadPS4 and Orbital; sceNpIsPlusMember keeps throwing.
2026-10-22 14:33:49 +01:00
Dean a16664584e Merge pull request #9225 from YossiYad/feat/npmanager-plus-content-restriction
feat(libSceNpManager): implement sceNpIsPlusMember and sceNpSetContentRestriction
2026-10-22 19:09:14 +13:00
Dean b27924d851 Merge pull request #9085 from YossiYad/feat/npmanager-check-callback-for-lib
feat(libSceNpManager): implement sceNpCheckCallbackForLib
2026-10-22 18:53:46 +13:00
boykopovar 6aa2dd97b7 fix(npmanager): restore availability output and online id input 2026-10-21 21:53:57 +03:00
Yossi Yadgar 3cf57aa463 docs(debt): record the libSceNpManager Plus membership and content restriction calls 2026-10-21 18:33:39 +03:00
Dean 74bdc3a3a7 Merge pull request #8110 from savvaniss/feat/np-account-signed-out
feat(libSceNpManager): answer the PS4 account and presence queries for a signed-out user
2026-10-22 01:54:31 +13:00
Yossi Yadgar fcc7f2aba9 docs(debt): note where sceNpCheckCallbackForLib comes from 2026-10-21 14:59:31 +03:00
Savvanis SpyrosandClaude Opus 5.5 79a5d6b65a fix(libSceNpManager): refuse an unknown request in sceNpSetGamePresenceOnline
After the argument checks, shadPS4 looks the request up and returns
REQUEST_NOT_FOUND for one that was never created or was deleted. The
library already tracks live requests for sceNpSetTimeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 14:13:04 +03:00
Dean 9a8c2a1a05 Merge pull request #9003 from xdCloudy/feat/libSceNpManager-150-exports
feat(libSceNpManager): declare 150 pending exports
2026-10-21 23:32:40 +13:00
xdCloudy 2ae6cd18bf feat(libSceNpManager): declare 150 pending exports 2026-10-21 10:09:38 +01:00
Savvanis SpyrosandClaude Opus 5.5 44dfebb524 fix(libSceNpManager): take the request id and online id in sceNpSetGamePresenceOnline
shadPS4 declares sceNpSetGamePresenceOnline(req_id, online_id, presence)
and returns INVALID_ARGUMENT for request id 0 or a null online id. The
export took (user id, timeout), so a caller's arguments landed in the
wrong registers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:06:06 +03:00
xdCloudy 11a097be24 feat(libSceNpManager): declare pending PS5 exports 2026-10-21 08:01:06 +01:00
orezraeyandClaude Opus 5.5 2a0f252396 feat(libSceNpManager): accept game presence callbacks while signed out
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 10:43:48 -03:00
Savvanis SpyrosandClaude Opus 5.5 dc642205a5 docs(libSceNpManager): list sceNpUnregisterPlusEventCallback under Silent stubs
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 15:19:42 +03:00
Savvanis SpyrosandClaude Opus 5.5 6e4c01f91c feat(libSceNpManager): answer the PS4 account id and presence queries for a signed-out user
sceNpGetAccountId and sceNpSetGamePresenceOnline report NP as signed
out, and sceNpUnregisterPlusEventCallback returns 0 like the premium
form.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 03:19:49 +03:00
Savvanis SpyrosandClaude Opus 5.5 d42fb3130d feat(libSceNpManager): answer the PS4 account queries for a signed-out user
sceNpGetAccountCountry, sceNpGetAccountDateOfBirth, sceNpGetAccountLanguage
and sceNpGetParentalControlInfo take an online id that matches no user,
sceNpGetUserIdByOnlineId and sceNpCheckPlus report NP as signed out, and
sceNpNotifyPlusFeature is declared and throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 01:04:01 +03:00
Adrià b5ab10185b Merge pull request #6121 from fdfawef324/claude/mc-np-state-callbacks
feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
2026-10-18 18:57:53 +02:00
Adrià Franch 53ffc976fe docs(debt): end the libSceNpManager debt lines with a period 2026-10-16 23:40:45 +02:00
notaxeltvandCursor af9d039d61 feat(libSceNpManager): export two unknown NIDs so PPSA34015 can load
Co-authored-by: Cursor <[email protected]>
2026-10-16 23:40:42 +02:00
alfalfa-starandClaude Opus 5.5 56d8b4f68d feat(npmanager): implement sceNpGetUserIdByAccountId
Account id 0 or a null output returns SCE_NP_ERROR_INVALID_ARGUMENT;
otherwise the always signed-out NP returns SCE_NP_ERROR_SIGNED_OUT, as
sceNpGetAccountIdA does. PPSA14632 imports it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 08:00:31 +02:00
fdfawef324andClaude Opus 5.5 9f96444c4a feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
sceNpRegisterStateCallback and sceNpRegisterStateCallbackA stored nothing,
the unregister calls always succeeded and sceNpCheckCallback did nothing,
so a title that waits for its NP state callback never learned the user's
state. #1277 reports that Minecraft Preview (PPSA19639) needs the callback
(stop 2).

sceNpRegisterStateCallbackA now keeps up to 8 callbacks and returns the
slot plus 1. A null callback returns INVALID_ARGUMENT, a callback that is
already registered CALLBACK_ALREADY_REGISTERED and a ninth one
CALLBACK_MAX (0x8055001D). sceNpUnregisterStateCallbackA returns
INVALID_ARGUMENT for an id outside 1..8 and CALLBACK_NOT_REGISTERED for an
empty slot. The legacy sceNpRegisterStateCallback keeps one callback with
the same errors. The rules follow shadPS4
src/core/libraries/np/np_manager.cpp @15abf68c9b52 (RegisterStateCallbackA
and UnregisterStateCallbackAById L857-L901, the legacy pair L981-L1005,
ORBIS_NP_STATE_CALLBACK_MAX L36) and np_error.h L38.

Each registration is marked pending. sceNpCheckCallback takes the pending
registrations under the lock and calls them after releasing it, on the
calling thread, with SIGNED_OUT for the initial user 0x10000000. For the A
form this follows KytyPS5 src/libs/network.cpp @9e41d8320a27
(NpRegisterStateCallbackA L4021-L4034 marks the registration pending,
NpCheckCallback L3959-L3974 delivers it once). KytyPS5 never calls the
legacy callback (NpRegisterStateCallback and NpUnregisterStateCallback,
L4009-L4019, do nothing). The legacy callback is called as
(user, SIGNED_OUT, nullptr, userdata), as in shadPS4, which passes an NpId
only for SIGNED_IN (L823, L938-L940).

shadPS4 queues SIGNED_OUT from the user service login event instead
(DispatchPendingNpStateCallbacks L903-L962), and the same event calls the
reachability callback once with UNAVAILABLE (L922-L931, L959-L961). The
reachability callback is still not called here. These differences and the
unmeasured console behaviour are recorded in
docs/dev/debt/libSceNpManager.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:12:19 -04:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <[email protected]>
2026-10-12 20:38:29 +02:00