feat(libSceNpManager): answer sceNpCheckNpAvailability with no user signed in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d70b899894
commit
f4084d5653
|
|
@ -8,6 +8,7 @@
|
|||
// PSN is not emulated: the user is reported as signed out and online queries fail.
|
||||
static constexpr int SCE_NP_ERROR_INVALID_ARGUMENT = static_cast<int>(0x80550003);
|
||||
static constexpr int SCE_NP_ERROR_SIGNED_OUT = static_cast<int>(0x80550006);
|
||||
static constexpr int SCE_NP_ERROR_USER_NOT_FOUND = static_cast<int>(0x80550007);
|
||||
static constexpr int SCE_NP_ERROR_CALLBACK_ALREADY_REGISTERED = static_cast<int>(0x80550008);
|
||||
static constexpr int SCE_NP_ERROR_CALLBACK_NOT_REGISTERED = static_cast<int>(0x80550009);
|
||||
static constexpr uint32_t NP_STATE_SIGNED_OUT = 1;
|
||||
|
|
@ -33,12 +34,10 @@ int APS5_VABI sceNpCheckCallback(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int APS5_VABI sceNpCheckNpAvailability(int req_id, const char* user, void* result) {
|
||||
int APS5_VABI sceNpCheckNpAvailability(int req_id, const NpOnlineId* online_id) {
|
||||
(void)req_id;
|
||||
(void)user;
|
||||
(void)result;
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
if (!online_id) return SCE_NP_ERROR_INVALID_ARGUMENT;
|
||||
return SCE_NP_ERROR_USER_NOT_FOUND;
|
||||
}
|
||||
|
||||
int APS5_VABI sceNpCheckNpReachability(int req_id, int user_id) {
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ int APS5_VABI sceNpRegisterNpReachabilityStateCallback(void*, void*);
|
|||
int APS5_VABI sceNpUnregisterNpReachabilityStateCallback();
|
||||
int APS5_VABI sceNpGetNpReachabilityState(int, uint32_t*);
|
||||
int APS5_VABI sceNpCheckCallback();
|
||||
int APS5_VABI sceNpCheckNpAvailability(int, const NpOnlineId*);
|
||||
}
|
||||
|
||||
static constexpr int ErrorArgument = static_cast<int>(0x80550003);
|
||||
static constexpr int ErrorAlreadyRegistered = static_cast<int>(0x80550008);
|
||||
static constexpr int ErrorNotRegistered = static_cast<int>(0x80550009);
|
||||
static constexpr int ErrorUserNotFound = static_cast<int>(0x80550007);
|
||||
static void Require(bool value) { if (!value) std::abort(); }
|
||||
static void APS5_VABI Callback(int, uint32_t, void*) { std::abort(); }
|
||||
|
||||
|
|
@ -29,4 +31,8 @@ int main() {
|
|||
Require(sceNpUnregisterNpReachabilityStateCallback() == ErrorNotRegistered);
|
||||
Require(sceNpRegisterNpReachabilityStateCallback(callback, nullptr) == 0);
|
||||
Require(sceNpUnregisterNpReachabilityStateCallback() == 0);
|
||||
NpOnlineId onlineId{};
|
||||
onlineId.data[0] = 'p';
|
||||
Require(sceNpCheckNpAvailability(1, &onlineId) == ErrorUserNotFound);
|
||||
Require(sceNpCheckNpAvailability(1, nullptr) == ErrorArgument);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,6 +356,7 @@ Throughout the project, every function at every stage either **does exactly what
|
|||
- [Player review dialog](../../core/libs/prx/libSceCdlgPlayerReview/Export.cpp) (libSceCdlgPlayerReview) shows nothing: `scePlayerReviewDialogOpen` finishes at once and the result reports that the user canceled, as `sceWebBrowserDialogOpen` does
|
||||
- [NP reachability callbacks](../../core/libs/prx/libSceNpManager/Export.cpp) retain one callback and its user data; duplicate registration and unregistering an absent callback return the errors used by [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/945dbc3cc3eee80ac3e053b438502ed936fa6bb2/src/core/libraries/np/np_manager.cpp). No callback is delivered because the existing NP model remains signed out with reachability unavailable.
|
||||
- [Running application ID](../../core/libs/prx/libSceSystemService/Export.cpp) (libSceSystemService) - `sceSystemServiceGetAppIdOfRunningBigApp` reports 1 as the running title's app ID. The value is AnyPS5's own: the console's shell assigns app IDs and their values are not known here, so other calls that take an app ID must use the same one. `sceSystemServiceKillApp` with that ID and the arguments -1, 0 and 0, which [SwanStationPS5](https://github.com/darkxex/SwanStationPS5/blob/4cdc981d1a64ffb7f2af73f7a27a9e91a3cb5eb4/src/main.c#L1050-L1058) passes to close itself and [ps5-payload-dev's hbldr](https://github.com/ps5-payload-dev/websrv/blob/46374edee6627885abac717de24da7a1d73af6f1/src/ps5/hbldr.c#L425-L435) passes to close the running game, ends the title as its own `exit(0)` would: the guest's shutdown and `atexit` handlers run and the process exits with status 0. On the console the call returns and the shell then ends the title, and whether those handlers run there is unknown; here there is no shell, so the call does not return. Another app ID or other arguments throw.
|
||||
- [sceNpCheckNpAvailability](../../core/libs/prx/libSceNpManager/Export.cpp) (libSceNpManager) - the `(req_id, online_id)` signature and the errors follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/0fe263a4760dfbfa973366890061749b4af0de97/src/core/libraries/np/np_manager.cpp) with no user signed in to PSN: a null online id is `SCE_NP_ERROR_INVALID_ARGUMENT`, and any other online id matches no user, `SCE_NP_ERROR_USER_NOT_FOUND`; the request id is not checked, as in the other NpManager requests
|
||||
- [Temporary app-content storage](../../core/libs/prx/libSceAppContent/Export.cpp) tracks one `/temp0` mount, preserves its files on unmount, and rejects new path resolutions until remount. Mount, format, space-query and unmount errors follow [fpPS4](https://github.com/red-prig/fpPS4/blob/04cefd43e6fddd1ab033e7980cd356d14c964905/sys/sys_path.pas); the pointer ABI is also declared by [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/AppContent/AppContent.cs). Existing open host descriptors remain usable after unmount; console behaviour with open files is unverified. Host filesystem failures still throw.
|
||||
- [Guest path resolution](../../core/libs/prx/libc/src/General.cpp) falls back to ASCII case-insensitive component lookup, following [shadPS4's host filesystem](https://github.com/shadps4-emu/shadPS4/blob/945dbc3cc3eee80ac3e053b438502ed936fa6bb2/src/core/file_sys/backends/host_fs.cpp). PPSA03747 requests `Skyrim.INI`, `Data/Video` and lowercase archive/plugin names that differ from the dump's filenames. Exact host names take precedence; multiple fallback matches throw instead of selecting an arbitrary file. Existing parent names are resolved when creating a new file, and guest mount aliases use the same ASCII comparison. Results are not cached, so renames and newly created files remain visible. Unicode case folding and PS5 behaviour for case-colliding host entries are unverified; host roots are used as supplied.
|
||||
- [Static scalar calls](../../core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp) (`s_call_b64` and `s_swappc_b64`) require one call per ordinary even-aligned SGPR link pair (s0:s1 through s104:s105) and one later `s_setpc_b64` return reading that exact pair. Regions must nest or be disjoint; recursion, shared links, escaping link values (including overlapping tuples and resource descriptors), invalid targets, interleaved regions, cross-region branches or fall-through, relative SGPR reads and dynamic `s_setpc_b64` in a program with calls throw. The analysis checks all decoded instructions, including unreachable code. Arbitrary indirect calls and general call frames are not implemented.
|
||||
|
|
|
|||
Loading…
Reference in New Issue