From ea931ada357acecceb41f53a8aab6f5007a81149 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Tue, 20 Oct 2026 16:28:09 +0530 Subject: [PATCH 1/4] feat(libSceNpGameIntent): implement the AppLauncher lifecycle AC Shadows calls Generated with [Devin](https://devin.ai) --- core/libs/prx/libSceNpGameIntent/Export.cpp | 12 +++++++++--- core/libs/tests/GuestNpGameIntent.cpp | 13 +++++++++++++ docs/dev/debt/libSceNpGameIntent.md | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/core/libs/prx/libSceNpGameIntent/Export.cpp b/core/libs/prx/libSceNpGameIntent/Export.cpp index cb36cdac0b..c3a6f2b7a4 100644 --- a/core/libs/prx/libSceNpGameIntent/Export.cpp +++ b/core/libs/prx/libSceNpGameIntent/Export.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -12,6 +13,8 @@ constexpr int NpGameIntentErrorIntentNotFound = -2141898746; constexpr int NpGameIntentErrorValueNotFound = -2141898745; constexpr int NpGameIntentUserIdInvalid = -1; +std::atomic g_appLauncherReady{false}; + } extern "C" { @@ -73,8 +76,11 @@ int APS5_VABI sceNpGameIntentVshTerminate(void) { return 0; } -int APS5_VABI sceNpAppLauncherInitialize() { - NotImplemented_nid_no_patch(__func__); +int APS5_VABI sceNpAppLauncherInitialize(const void* initParam) { + if (initParam != nullptr && *static_cast(initParam) != 0x28) { + APS5_INVALID_ARG_EX; + } + g_appLauncherReady.store(true, std::memory_order_release); return 0; } @@ -84,7 +90,7 @@ int APS5_VABI sceNpAppLauncherLaunchApp() { } int APS5_VABI sceNpAppLauncherTerminate() { - NotImplemented_nid_no_patch(__func__); + g_appLauncherReady.store(false, std::memory_order_release); return 0; } diff --git a/core/libs/tests/GuestNpGameIntent.cpp b/core/libs/tests/GuestNpGameIntent.cpp index 8d63fecbe1..17bc6a610d 100644 --- a/core/libs/tests/GuestNpGameIntent.cpp +++ b/core/libs/tests/GuestNpGameIntent.cpp @@ -14,6 +14,9 @@ int APS5_VABI sceNpGameIntentGetPropertyValueString(const NpGameIntentData* inte int APS5_VABI sceNpGameIntentVshInitialize(void); int APS5_VABI sceNpGameIntentVshTerminate(void); int APS5_VABI sceNpGameIntentTerminate(void); +int APS5_VABI sceNpAppLauncherInitialize(const void* initParam); +int APS5_VABI sceNpAppLauncherLaunchApp(void); +int APS5_VABI sceNpAppLauncherTerminate(void); } static void Require(bool value, const char* what) { @@ -62,6 +65,16 @@ int main() { Require(sceNpGameIntentVshTerminate() == 0, "vsh terminate failed"); Require(sceNpGameIntentTerminate() == 0, "terminate failed"); + unsigned char appLauncherParam[0x28]{}; + *reinterpret_cast(appLauncherParam) = 0x28; + Require(sceNpAppLauncherInitialize(appLauncherParam) == 0, "app launcher init failed"); + Require(Throws([] { sceNpAppLauncherLaunchApp(); }), + "app launcher launch must throw until implemented"); + Require(sceNpAppLauncherTerminate() == 0, "app launcher terminate failed"); + *reinterpret_cast(appLauncherParam) = 0x10; + Require(Throws([&] { sceNpAppLauncherInitialize(appLauncherParam); }), + "wrong init-param size did not throw"); + std::puts("NpGameIntent tests passed"); return 0; } diff --git a/docs/dev/debt/libSceNpGameIntent.md b/docs/dev/debt/libSceNpGameIntent.md index 91a214fd5e..3fbb325271 100644 --- a/docs/dev/debt/libSceNpGameIntent.md +++ b/docs/dev/debt/libSceNpGameIntent.md @@ -6,6 +6,6 @@ ### Unknown function info -- [sceNpAppLauncherInitialize, sceNpAppLauncherLaunchApp, sceNpAppLauncherTerminate, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c), but no credible prototypes were found in the cited sources. They are declared without parameters solely to resolve known imports and make no ABI claim. +- [sceNpAppLauncherInitialize, sceNpAppLauncherLaunchApp, sceNpAppLauncherTerminate, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). AC Shadows (PPSA20397) eboot call sites give partial prototypes: `sceNpAppLauncherInitialize` takes a 0x28-byte init param whose first field is `size = 0x28` — implemented with that validation plus state tracking; `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable; `sceNpAppLauncherTerminate` takes no argument and returns int — implemented as state reset. The rest are declared without parameters solely to resolve known imports and make no ABI claim. - [sceNpGameIntentInitParamInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L17) `SceNpGameIntentInitParam`; setting `size`, zeroing reserved bytes, and throwing on null pointer follow Sony SDK `*ParamInit` conventions but are unverified on retail hardware - [sceNpGameIntentInfoInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L28) `SceNpGameIntentInfo`; setting `size`, `user_id = -1`, zeroing fields, and throwing on null pointer match `sceNpGameIntentReceiveIntent` defaults but are unverified on retail hardware From 9833ab4297f448161fe133d2b298382847ba5c80 Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Wed, 21 Oct 2026 10:59:28 +0530 Subject: [PATCH 2/4] refactor(libSceNpGameIntent): make the AppLauncher lifecycle a documented silent stub Addresses review on #8355: drops g_appLauncherReady and the unverified init-param size check so both exports are plain silent stubs, lists them under Silent stubs in the debt file naming PPSA20397, and moves them out of the unknown-info entry. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- core/libs/prx/libSceNpGameIntent/Export.cpp | 8 +------- docs/dev/debt/libSceNpGameIntent.md | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/core/libs/prx/libSceNpGameIntent/Export.cpp b/core/libs/prx/libSceNpGameIntent/Export.cpp index c3a6f2b7a4..c8be4b9f09 100644 --- a/core/libs/prx/libSceNpGameIntent/Export.cpp +++ b/core/libs/prx/libSceNpGameIntent/Export.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -13,7 +12,6 @@ constexpr int NpGameIntentErrorIntentNotFound = -2141898746; constexpr int NpGameIntentErrorValueNotFound = -2141898745; constexpr int NpGameIntentUserIdInvalid = -1; -std::atomic g_appLauncherReady{false}; } @@ -77,10 +75,7 @@ int APS5_VABI sceNpGameIntentVshTerminate(void) { } int APS5_VABI sceNpAppLauncherInitialize(const void* initParam) { - if (initParam != nullptr && *static_cast(initParam) != 0x28) { - APS5_INVALID_ARG_EX; - } - g_appLauncherReady.store(true, std::memory_order_release); + (void)initParam; return 0; } @@ -90,7 +85,6 @@ int APS5_VABI sceNpAppLauncherLaunchApp() { } int APS5_VABI sceNpAppLauncherTerminate() { - g_appLauncherReady.store(false, std::memory_order_release); return 0; } diff --git a/docs/dev/debt/libSceNpGameIntent.md b/docs/dev/debt/libSceNpGameIntent.md index 3fbb325271..9ac0b8fdd1 100644 --- a/docs/dev/debt/libSceNpGameIntent.md +++ b/docs/dev/debt/libSceNpGameIntent.md @@ -3,9 +3,10 @@ ### Silent stubs - [sceNpGameIntentVshInitialize, sceNpGameIntentVshTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - VSH initialization and termination return 0 without performing shell operations, matching `sceNpGameIntentInitialize` and `sceNpGameIntentTerminate` +- [sceNpAppLauncherInitialize, sceNpAppLauncherTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - app-launcher lifecycle returns success without tracking launch state; `sceNpAppLauncherInitialize` accepts its init parameter without validation, following the silent-stub precedent of `sceNpGameIntentInitialize` — PPSA20397 calls it early in boot and returning success unblocks the title ### Unknown function info -- [sceNpAppLauncherInitialize, sceNpAppLauncherLaunchApp, sceNpAppLauncherTerminate, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). AC Shadows (PPSA20397) eboot call sites give partial prototypes: `sceNpAppLauncherInitialize` takes a 0x28-byte init param whose first field is `size = 0x28` — implemented with that validation plus state tracking; `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable; `sceNpAppLauncherTerminate` takes no argument and returns int — implemented as state reset. The rest are declared without parameters solely to resolve known imports and make no ABI claim. +- [sceNpAppLauncherLaunchApp, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). AC Shadows (PPSA20397) eboot call sites give a partial prototype: `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable. The rest are declared without parameters solely to resolve known imports and make no ABI claim. - [sceNpGameIntentInitParamInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L17) `SceNpGameIntentInitParam`; setting `size`, zeroing reserved bytes, and throwing on null pointer follow Sony SDK `*ParamInit` conventions but are unverified on retail hardware - [sceNpGameIntentInfoInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L28) `SceNpGameIntentInfo`; setting `size`, `user_id = -1`, zeroing fields, and throwing on null pointer match `sceNpGameIntentReceiveIntent` defaults but are unverified on retail hardware From ed63b60928b9134932c0fef6141a5470a5d55c9a Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Wed, 21 Oct 2026 11:13:51 +0530 Subject: [PATCH 3/4] test(libSceNpGameIntent): pin AppLauncherInitialize accepting any init parameter The silent-stub refactor dropped the unverified size check, so the test now asserts the documented contract instead of expecting a throw. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- core/libs/tests/GuestNpGameIntent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/libs/tests/GuestNpGameIntent.cpp b/core/libs/tests/GuestNpGameIntent.cpp index 17bc6a610d..dbf030f79e 100644 --- a/core/libs/tests/GuestNpGameIntent.cpp +++ b/core/libs/tests/GuestNpGameIntent.cpp @@ -72,8 +72,8 @@ int main() { "app launcher launch must throw until implemented"); Require(sceNpAppLauncherTerminate() == 0, "app launcher terminate failed"); *reinterpret_cast(appLauncherParam) = 0x10; - Require(Throws([&] { sceNpAppLauncherInitialize(appLauncherParam); }), - "wrong init-param size did not throw"); + Require(sceNpAppLauncherInitialize(appLauncherParam) == 0, + "app launcher init must accept any init parameter"); std::puts("NpGameIntent tests passed"); return 0; From 2f72bd87746f995a065c2e93a40ecedbff5a895a Mon Sep 17 00:00:00 2001 From: akkadbakkad89 Date: Wed, 21 Oct 2026 12:13:31 +0530 Subject: [PATCH 4/4] docs(debt): drop title names from the libSceNpGameIntent entries Debt files describe what was observed without naming titles. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- docs/dev/debt/libSceNpGameIntent.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/debt/libSceNpGameIntent.md b/docs/dev/debt/libSceNpGameIntent.md index 9ac0b8fdd1..622b40a2c2 100644 --- a/docs/dev/debt/libSceNpGameIntent.md +++ b/docs/dev/debt/libSceNpGameIntent.md @@ -3,10 +3,10 @@ ### Silent stubs - [sceNpGameIntentVshInitialize, sceNpGameIntentVshTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - VSH initialization and termination return 0 without performing shell operations, matching `sceNpGameIntentInitialize` and `sceNpGameIntentTerminate` -- [sceNpAppLauncherInitialize, sceNpAppLauncherTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - app-launcher lifecycle returns success without tracking launch state; `sceNpAppLauncherInitialize` accepts its init parameter without validation, following the silent-stub precedent of `sceNpGameIntentInitialize` — PPSA20397 calls it early in boot and returning success unblocks the title +- [sceNpAppLauncherInitialize, sceNpAppLauncherTerminate](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - app-launcher lifecycle returns success without tracking launch state; `sceNpAppLauncherInitialize` accepts its init parameter without validation, following the silent-stub precedent of `sceNpGameIntentInitialize` — a title calls it early in boot, and returning success lets it continue ### Unknown function info -- [sceNpAppLauncherLaunchApp, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). AC Shadows (PPSA20397) eboot call sites give a partial prototype: `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable. The rest are declared without parameters solely to resolve known imports and make no ABI claim. +- [sceNpAppLauncherLaunchApp, sceNpGameIntentGetUdsNpComId, sceNpGameIntentLaunchApp, sceNpGameIntentLaunchApp2, sceNpGameIntentNotifyAppLaunched, sceNpSessionServiceGetJoinedPartySession, sceNpSessionServiceGetRunningGamePlayerSession and sceNpSessionServiceSendPlayerSessionInvitations](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - names and NIDs are present in the [PS5 3.20 export inventory](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceNpGameIntent.c). Call sites in a title's executable give a partial prototype: `sceNpAppLauncherLaunchApp` takes `(user_id, uri struct, context)` and returns int — throws because no launcher-service semantics are derivable. The rest are declared without parameters solely to resolve known imports and make no ABI claim. - [sceNpGameIntentInitParamInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L17) `SceNpGameIntentInitParam`; setting `size`, zeroing reserved bytes, and throwing on null pointer follow Sony SDK `*ParamInit` conventions but are unverified on retail hardware - [sceNpGameIntentInfoInit](../../../core/libs/prx/libSceNpGameIntent/Export.cpp) (libSceNpGameIntent) - struct layout matches [fpPS4](https://github.com/red-prig/fpPS4/blob/master/src/np/ps4_libscenpgameintent.pas#L28) `SceNpGameIntentInfo`; setting `size`, `user_id = -1`, zeroing fields, and throwing on null pointer match `sceNpGameIntentReceiveIntent` defaults but are unverified on retail hardware