feat(libSceNpGameIntent): implement the AppLauncher lifecycle a title calls at boot #8355
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8355"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-20T10:58:11Z.
What
Implements the
sceNpAppLauncher*lifecycle that AC Shadows (PPSA20397) imports fromlibSceNpGameIntent.prx, using the prototypes recovered from the title's own eboot call sites:sceNpAppLauncherInitialize(initParam)— the eboot builds a 0x28-byte param whose first field issize = 0x28; implemented with that size validation,APS5_INVALID_ARG_EXon a wrong size, and lifecycle state tracking. Null param is accepted.sceNpAppLauncherTerminate()— resets the lifecycle state and returns 0.sceNpAppLauncherLaunchApp— the call site passes(user_id = -1, uri struct, context)and checks an int return; stillNotImplemented_nid_no_patchbecause no launcher-service semantics are derivable without the real module — recorded in the library's debt file rather than fabricated.Tested
Windows 11 host, WSL build.
guest_np_game_intentctest passes, now covering AppLauncher init/terminate, wrong-size rejection, and the honestLaunchAppthrow.tools/check_conventions.py --base origin/mainclean.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T10:58:57Z.
Progress report (
7ce3b1d→2f72bd8)📈 System libraries: 53.25% (+0.03%, +2 implemented functions)
✅ 2 implemented
sceNpAppLauncherInitializesceNpAppLauncherTerminate⚪ 2 behaviourally empty (constant return or throw)
sceNpAppLauncherInitializesceNpAppLauncherTerminateImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T03:52:06Z.
Independent Windows run of this PR (data only).
Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against
mainis clean. I built onlyguest_np_game_intent_tests;ctest -N -R guest_np_game_intentlists exactly one test.Results (3 runs each):
guest_np_game_intentpasses 3/3.core/libs/prx/libSceNpGameIntent/Export.cppwith the version from the PR's merge base (891d567515), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards.Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T05:18:57Z.
@akkadbakkad89 thanks, this does unblock the title. On our Linux run of PPSA28183 on
main8727ddb2, the title aborts after 2 s with "sceNpAppLauncherInitialize not implemented"; with this PR it runs for 206 s and reaches a later, unrelated recompiler stop.Since
sceNpAppLauncherInitializeandsceNpAppLauncherTerminateonly return 0 (nothing readsg_appLauncherReady), they're silent stubs, which CONTRIBUTING allows when they unblock a title. Three small changes before merge:g_appLauncherReadyflag.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T05:30:08Z.
All three applied in
9833ab42:docs/dev/debt/libSceNpGameIntent.md, naming PPSA20397 as the reason — and were moved out of the unknown-info entry, which also described the (now removed) validation.g_appLauncherReadyis gone, along with the<atomic>include — nothing read it.size = 0x28as its first field — that tells us what the title passes, not what the library validates, and we have no firmware read to cite.sceNpAppLauncherInitializenow just takes the pointer and returns 0, matching thesceNpGameIntentInitializeprecedent.Compile-checked with GCC 15.2.0 (
-fsyntax-only); no callers or tests read the removed flag.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T05:31:47Z.
@akkadbakkad89 thanks, all three are in. One thing left: the test still expects the size check you removed.
core/libs/tests/GuestNpGameIntent.cpp:74-76sets the size field to 0x10 and requiressceNpAppLauncherInitializeto throwstd::invalid_argument. It now returns 0, soguest_np_game_intentfails on9833ab42. Please drop those three lines, or change them toRequire(sceNpAppLauncherInitialize(appLauncherParam) == 0, ...)so the test pins that any init parameter is accepted.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T05:44:01Z.
Fixed in
ed63b609— went with the second option so the test pins the documented contract:Good catch — I'd compile-checked the lib but didn't rebuild the test target.
guest_np_game_intentshould pass again oned63b609.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T05:55:47Z.
@akkadbakkad89 thanks, that matches. Full CI on
ed63b609is next.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:30:23Z.
@akkadbakkad89 thanks, the init check is right and CI is green on this head. One small docs change before merge, please: our technical-debt files don't name titles or title IDs. The two lines this PR adds to
docs/dev/debt/libSceNpGameIntent.mdeach name one, the Silent stubs entry at "calls it early in boot" and the throwing entry at "eboot call sites give a partial prototype". Could you describe what was observed without the title, for example "a title calls it early in boot, and returning success lets it continue" and "call sites in a title's executable give a partial prototype"? Everything else can stay as it is.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T06:44:19Z.
Done in
2f72bd87— both lines now describe the observation without naming the title:Everything else unchanged.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:49:09Z.
@akkadbakkad89 thanks, the docs lines read well now, and this is ready to merge. One last small thing: could you retitle the PR so it doesn't name the game, for example
feat(libSceNpGameIntent): implement the AppLauncher lifecycle a title calls at boot? The PR title goes into the merge commit onmain, and we keep titles out of the project history. I will merge as soon as it's renamed.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T06:51:57Z.
Renamed the title, thanks for the quick review
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:56:18Z.
@akkadbakkad89 merged, thanks for the quick fixes.