Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f691d1d
feat(libkernel): implement sceKernelGetEventError
ZekriDev1 Oct 11, 2026
2f60f55
feat(libSceNpEntitlementAccess): report signed-out for entitlement fl…
ZekriDev1 Oct 11, 2026
22e96c5
feat(libSceNpSessionSignaling): report unavailable for connection que…
ZekriDev1 Oct 11, 2026
dabc0dc
feat(libSceGameUpdate): reject null entitlement label as invalid argu…
ZekriDev1 Oct 11, 2026
0d5bacd
feat(libSceNpAuth): implement id-token, wait-async and request creation
ZekriDev1 Oct 11, 2026
f4b4b3a
feat(libSceNpManager): accept presence callback and content restriction
ZekriDev1 Oct 11, 2026
b6300b9
feat(libSceShare.native): mirror no-capture status model from libSceS…
ZekriDev1 Oct 11, 2026
12f2904
feat(libSceShare): report extended video-clip capture unsupported
ZekriDev1 Oct 11, 2026
2e1f701
feat(libSceIme): validate open parameters, report panel unavailable
ZekriDev1 Oct 11, 2026
992799b
feat(libSceNpPartner001): track EA access initialization state
ZekriDev1 Oct 11, 2026
50cb224
feat(libSceSystemGesture): report no-touch results for id and info qu…
ZekriDev1 Oct 11, 2026
779e394
feat(libSceAudioOut): accept system debug state without backend
ZekriDev1 Oct 11, 2026
1864ee4
feat(libSceNpWebApi2): accept request timeout without backend
ZekriDev1 Oct 11, 2026
63f8d15
feat(libSceNet): complete synchronous resolver abort as no-op
ZekriDev1 Oct 11, 2026
9e3cb3f
revert(libSceNpAuth): drop offline auth requests, covered by #3604
ZekriDev1 Oct 11, 2026
7b2c5a7
revert(libSceNpPartner001): drop EA access state, covered by #3718
ZekriDev1 Oct 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/libs/prx/libSceAudioOut/src/AudioOut2System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ int APS5_VABI sceAudioOut2GetSystemState(AudioOut2SystemState* state) {

int APS5_VABI sceAudioOut2SetSystemDebugState(const AudioOut2SystemDebugStateParam* param) {
(void)param;
NotImplemented_nid_no_patch(__func__);
return 0;
}

Expand Down
8 changes: 8 additions & 0 deletions core/libs/prx/libSceAudioOut/tests/AudioOut2Latency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ int APS5_VABI sceAudioOut2Set3DLatency(int, std::uint32_t);
int APS5_VABI sceAudioOut2MasteringInit(std::uint32_t);
int APS5_VABI sceAudioOut2MasteringTerm();
int APS5_VABI sceAudioOut2MasteringSetParam(const void*, std::uint32_t, std::uint32_t);
int APS5_VABI sceAudioOut2SetSystemDebugState(const void*);
}

static void Require(bool value, const char* message) {
Expand Down Expand Up @@ -60,6 +61,12 @@ void TestMasteringSetParam() {
Require(ThrowsRuntimeError([] { sceAudioOut2MasteringSetParam(nullptr, 0, 0); }), "null mastering parameters must throw");
}

void TestSystemDebugState() {
const std::uint32_t param[4] = {0u, 0u, 0u, 0u};
Require(sceAudioOut2SetSystemDebugState(param) == 0, "debug state must be accepted");
Require(sceAudioOut2SetSystemDebugState(nullptr) == 0, "null debug state must be accepted");
}

}

int main() {
Expand All @@ -68,5 +75,6 @@ int main() {
TestMasteringInit();
TestMasteringTerm();
TestMasteringSetParam();
TestSystemDebugState();
return 0;
}
5 changes: 1 addition & 4 deletions core/libs/prx/libSceGameUpdate/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ int APS5_VABI sceGameUpdateGetAddcontLatestVersion(uint32_t service_label, const
if (!g_initialized.load()) {
return SCE_GAME_UPDATE_ERROR_NOT_INITIALIZED;
}
if (info == nullptr) {
if (info == nullptr || entitlement_label == nullptr) {
return SCE_GAME_UPDATE_ERROR_INVALID_ARGUMENT;
}
if (entitlement_label == nullptr) {
NotImplemented_nid_no_patch(__func__);
}
if (info->size < sizeof(GameUpdateAddcontVersionInfo)) {
return SCE_GAME_UPDATE_ERROR_INVALID_SIZE;
}
Expand Down
7 changes: 4 additions & 3 deletions core/libs/prx/libSceIme/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ int APS5_VABI sceImeKeyboardSetMode(int32_t user_id, uint32_t mode) {
}

int APS5_VABI sceImeOpen_nid_postfix(const Param* param, const ExtendedParam* extended) {
(void)param;
(void)extended;
NotImplemented_nid_no_patch(__func__);
return 0;
if (param == nullptr) return ErrorInvalidAddress;
if (param->type > TypeNumber) return ErrorInvalidType;
if ((param->option & ~ValidOptions) != 0) return ErrorInvalidOption;
return ErrorNotOpened;
}

void APS5_VABI sceImeParamInit(Param* param) {
Expand Down
1 change: 0 additions & 1 deletion core/libs/prx/libSceNet/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,6 @@ int APS5_VABI sceNetResolverGetError(int rid, int* status) {
}

int APS5_VABI sceNetResolverAbort(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
}

Expand Down
6 changes: 2 additions & 4 deletions core/libs/prx/libSceNpEntitlementAccess/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,11 @@ int APS5_VABI sceNpEntitlementAccessRequestUnifiedEntitlementInfo(void) {
}

int APS5_VABI sceNpEntitlementAccessGetPftFlag(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}

int APS5_VABI sceNpEntitlementAccessGetGameTrialsFlag(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_ERROR_SIGNED_OUT;
}

int APS5_VABI sceNpEntitlementAccessPollServiceEntitlementInfoList() {
Expand Down
5 changes: 2 additions & 3 deletions core/libs/prx/libSceNpManager/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "prx/libc/include/General.hpp"
#include <atomic>
#include <mutex>
#include <stdexcept>
#include <unordered_set>

// PSN is not emulated: the user is reported as signed out and online queries fail.
Expand Down Expand Up @@ -138,9 +139,8 @@ int APS5_VABI sceNpPollAsync(int req_id, int* result) {
}

void APS5_VABI sceNpRegisterGamePresenceCallback(void* callback, void* userdata) {
(void)callback;
(void)userdata;
NotImplemented_nid_no_patch(__func__);
if (!callback) throw std::invalid_argument("sceNpRegisterGamePresenceCallback: null callback");
}

int APS5_VABI sceNpRegisterNpReachabilityStateCallback(void* callback, void* userdata) {
Expand Down Expand Up @@ -180,7 +180,6 @@ int APS5_VABI sceNpRegisterStateCallback(void* callback, void* userdata) {

int APS5_VABI sceNpSetContentRestriction(const NpContentRestriction* restriction) {
(void)restriction;
NotImplemented_nid_no_patch(__func__);
return 0;
}

Expand Down
22 changes: 9 additions & 13 deletions core/libs/prx/libSceNpSessionSignaling/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ int APS5_VABI sceNpSessionSignalingTerminate(void) {
}

int32_t APS5_VABI sceNpSessionSignalingGetConnectionStatus(int32_t context_id, int32_t connection_id, int32_t* status, void* peer_address, uint16_t* peer_port) {
(void)context_id;
(void)connection_id;
(void)status;
(void)peer_address;
(void)peer_port;
NotImplemented_nid_no_patch(__func__);
return 0;
(void)context_id;
(void)connection_id;
(void)peer_address;
(void)peer_port;
if (!status) return SCE_NP_SESSION_SIGNALING_ERROR_INVALID_ARGUMENT;
return SCE_NP_SESSION_SIGNALING_ERROR_UNAVAILABLE;
}

int32_t APS5_VABI sceNpSessionSignalingGetLocalNetInfo(int32_t context_id, void* info) {
Expand All @@ -80,18 +79,15 @@ int APS5_VABI sceNpSessionSignalingRequestPrepare(uint32_t contextId, uint32_t*
}

int APS5_VABI sceNpSessionSignalingGetMemoryInfo(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_SESSION_SIGNALING_ERROR_UNAVAILABLE;
}

int APS5_VABI sceNpSessionSignalingGetConnectionStatistics(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_SESSION_SIGNALING_ERROR_UNAVAILABLE;
}

int APS5_VABI sceNpSessionSignalingGetConnectionFromPeerAddress(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return SCE_NP_SESSION_SIGNALING_ERROR_UNAVAILABLE;
}

int APS5_VABI sceNpSessionSignalingGetGroupFromSessionId(void) {
Expand Down
1 change: 0 additions & 1 deletion core/libs/prx/libSceNpWebApi2/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ int APS5_VABI sceNpWebApi2PushEventUnregisterPushContextCallback() {
}

int APS5_VABI sceNpWebApi2SetRequestTimeout() {
NotImplemented_nid_no_patch(__func__);
return 0;
}

Expand Down
14 changes: 14 additions & 0 deletions core/libs/prx/libSceShare.native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
add_library(libSceShare.native SHARED EXCLUDE_FROM_ALL Export.cpp)
target_include_directories(libSceShare.native PRIVATE ${LIBS_INCLUDE_DIR})
configure_windows_unwind(libSceShare.native)

if(BUILD_TESTING)
add_test_executable(guest_share_native_tests ${LIBS_INCLUDE_DIR}/tests/GuestShareNative.cpp)
target_include_directories(guest_share_native_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_share_native_tests PRIVATE libSceShare.native)
add_test(NAME guest_share_native COMMAND guest_share_native_tests)
if(WIN32)
set_tests_properties(guest_share_native PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceShare.native>")
endif()
endif()
33 changes: 22 additions & 11 deletions core/libs/prx/libSceShare.native/Export.cpp
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
#include <cstdint>
#include <cstddef>
#include <cstring>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"

// Capture and sharing are not emulated; policy and parameter calls are accepted.

namespace {

constexpr std::int32_t ERROR_INVALID_PARAM = static_cast<std::int32_t>(0x81960002);
constexpr std::int32_t ERROR_NOT_SUPPORTED = static_cast<std::int32_t>(0x81960007);
constexpr std::int32_t REQUEST_ID_INVALID = -1;

}

extern "C" {

int APS5_VABI sceShareCaptureScreenshot(const void* param, int32_t* req_id) {
(void)param;
(void)req_id;
NotImplemented_nid_no_patch(__func__);
return 0;
if (req_id != nullptr) {
*req_id = REQUEST_ID_INVALID;
}
return ERROR_NOT_SUPPORTED;
}

int APS5_VABI sceShareCaptureVideoClip(const void* param, int32_t* req_id) {
(void)param;
(void)req_id;
NotImplemented_nid_no_patch(__func__);
return 0;
if (req_id != nullptr) {
*req_id = REQUEST_ID_INVALID;
}
return ERROR_NOT_SUPPORTED;
}

int APS5_VABI sceShareFeaturePermit(uint32_t feature_flags) {
Expand All @@ -32,9 +43,10 @@ int APS5_VABI sceShareFeatureProhibit(uint32_t feature_flags) {
}

int APS5_VABI sceShareGetCurrentStatus(uint32_t feature_flag, ShareCurrentStatus* status) {
(void)feature_flag;
(void)status;
NotImplemented_nid_no_patch(__func__);
if (feature_flag == 0 || status == nullptr) {
return ERROR_INVALID_PARAM;
}
std::memset(status, 0, sizeof(*status));
return 0;
}

Expand All @@ -47,8 +59,7 @@ int APS5_VABI sceShareInitialize(size_t heap_size, int thread_priority, uint64_t

int APS5_VABI sceShareOpenMenuForContent(const void* content_id) {
(void)content_id;
NotImplemented_nid_no_patch(__func__);
return 0;
return ERROR_NOT_SUPPORTED;
}

int APS5_VABI sceShareRegisterContentEventCallback(void* callback, void* user_data) {
Expand Down
3 changes: 1 addition & 2 deletions core/libs/prx/libSceShare/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ int APS5_VABI sceShareCaptureScreenshotExtended(const void* extended_param, int3


int APS5_VABI sceShareCaptureVideoClipExtended(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
return ERROR_NOT_SUPPORTED;
}

int APS5_VABI sceShareGetRunningStatus(uint32_t* status) {
Expand Down
29 changes: 13 additions & 16 deletions core/libs/prx/libSceSystemGesture/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ int APS5_VABI sceSystemGestureGetPrimitiveTouchEventByIndex(int32_t gesture_hand
}

int APS5_VABI sceSystemGestureGetPrimitiveTouchEventByPrimitiveID(int32_t gesture_handle, uint16_t primitiveId, SystemGesturePrimitiveTouchEvent* event) {
(void)gesture_handle;
(void)primitiveId;
(void)event;
NotImplemented_nid_no_patch(__func__);
return 0;
(void)primitiveId;
(void)event;
if (gesture_handle != GESTURE_HANDLE) return SCE_SYSTEM_GESTURE_ERROR_INVALID_HANDLE;
return SCE_SYSTEM_GESTURE_ERROR_INDEX_OUT_OF_ARRAY;
}

int APS5_VABI sceSystemGestureGetPrimitiveTouchEvents(int32_t gesture_handle, SystemGesturePrimitiveTouchEvent* event_buffer, uint32_t capacity_of_buffer, uint32_t* number_of_event) {
Expand All @@ -63,12 +62,11 @@ int APS5_VABI sceSystemGestureGetPrimitiveTouchEventsCount(int32_t gesture_handl
}

int APS5_VABI sceSystemGestureGetTouchEventByEventID(int32_t gesture_handle, const SystemGestureTouchRecognizer* recognizer, uint32_t eventId, SystemGestureTouchEvent* event) {
(void)gesture_handle;
(void)recognizer;
(void)eventId;
(void)event;
NotImplemented_nid_no_patch(__func__);
return 0;
(void)recognizer;
(void)eventId;
(void)event;
if (gesture_handle != GESTURE_HANDLE) return SCE_SYSTEM_GESTURE_ERROR_INVALID_HANDLE;
return SCE_SYSTEM_GESTURE_ERROR_INDEX_OUT_OF_ARRAY;
}

int APS5_VABI sceSystemGestureGetTouchEventByIndex(int32_t gesture_handle, const SystemGestureTouchRecognizer* recognizer, uint32_t index, SystemGestureTouchEvent* event) {
Expand All @@ -95,11 +93,10 @@ int APS5_VABI sceSystemGestureGetTouchEventsCount(int32_t gesture_handle, const
}

int APS5_VABI sceSystemGestureGetTouchRecognizerInformation(int32_t gesture_handle, const SystemGestureTouchRecognizer* recognizer, SystemGestureTouchRecognizerInformation* information) {
(void)gesture_handle;
(void)recognizer;
(void)information;
NotImplemented_nid_no_patch(__func__);
return 0;
if (gesture_handle != GESTURE_HANDLE) return SCE_SYSTEM_GESTURE_ERROR_INVALID_HANDLE;
if (!recognizer || !information) return SCE_SYSTEM_GESTURE_ERROR_INVALID_ARGUMENT;
*information = SystemGestureTouchRecognizerInformation{};
return 0;
}

int APS5_VABI sceSystemGestureInitializePrimitiveTouchRecognizer(const void* param) {
Expand Down
6 changes: 3 additions & 3 deletions core/libs/prx/libkernel/Equeue/src/EventAccessors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>
#include "SceTypes.hpp"
#include "prx/libc/include/General.hpp"
#include "prx/libkernel/Equeue/Equeue.hpp"

static const KernelEvent& requireEvent(const KernelEvent* ev, const char* caller) {
if (ev == nullptr) {
Expand All @@ -19,9 +20,8 @@ intptr_t APS5_VABI sceKernelGetEventData(const KernelEvent* ev) {
}

int APS5_VABI sceKernelGetEventError(const KernelEvent* ev) {
(void)ev;
NotImplemented_nid_no_patch(__func__);
return 0;
const KernelEvent& event = requireEvent(ev, __func__);
return (event.flags & EV_ERROR) != 0 ? static_cast<int>(event.data) : 0;
}

intptr_t APS5_VABI sceKernelGetEventFflags(const KernelEvent* ev) {
Expand Down
7 changes: 7 additions & 0 deletions core/libs/tests/GuestEqueueEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ intptr_t APS5_VABI sceKernelGetEventFflags(const KernelEvent* ev);
int APS5_VABI sceKernelGetEventFilter(const KernelEvent* ev);
uintptr_t APS5_VABI sceKernelGetEventId(const KernelEvent* ev);
void* APS5_VABI sceKernelGetEventUserData(const KernelEvent* ev);
int APS5_VABI sceKernelGetEventError(const KernelEvent* ev);
}

static constexpr int SCE_OK = 0;
Expand Down Expand Up @@ -288,10 +289,16 @@ int main() {
Require(sceKernelGetEventFflags(&rawEvent) == static_cast<intptr_t>(0x80000001LL));
Require(sceKernelGetEventData(&rawEvent) == -5);
Require(sceKernelGetEventUserData(&rawEvent) == nullptr);
Require(sceKernelGetEventError(&rawEvent) == 0);
KernelEvent errorEvent{};
errorEvent.flags = 0x4000;
errorEvent.data = -13;
Require(sceKernelGetEventError(&errorEvent) == -13);

Require(RejectsNull(sceKernelGetEventData));
Require(RejectsNull(sceKernelGetEventFflags));
Require(RejectsNull(sceKernelGetEventFilter));
Require(RejectsNull(sceKernelGetEventId));
Require(RejectsNull(sceKernelGetEventUserData));
Require(RejectsNull(sceKernelGetEventError));
}
6 changes: 1 addition & 5 deletions core/libs/tests/GuestGameUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ int main() {
Require(sceGameUpdateGetAddcontLatestVersion(0, label, &info) == notInitialized);
Require(sceGameUpdateInitialize() == 0);
Require(sceGameUpdateGetAddcontLatestVersion(0, label, nullptr) == invalidArgument);

bool threw = false;
try { sceGameUpdateGetAddcontLatestVersion(0, nullptr, &info); }
catch (const std::runtime_error&) { threw = true; }
Require(threw);
Require(sceGameUpdateGetAddcontLatestVersion(0, nullptr, &info) == invalidArgument);

info.size = sizeof(info) - 1;
Require(sceGameUpdateGetAddcontLatestVersion(0, label, &info) == invalidSize);
Expand Down
Loading
Loading