Commit Graph
122 Commits
Author SHA1 Message Date
Dean ea17aae8dc Merge pull request #12895 from MarcZX10/feat/host-open-url
feat(libSceSystemService): open sceSystemServiceLaunchWebBrowser URLs in the host browser, opt-in with ANYPS5_OPEN_URLS
2026-11-09 07:07:46 +13:00
Dean d55540ecd5 Merge pull request #14203 from BunnyFl/feat/libscesystemservice-shellcoreutil-leaf-calls
feat(libSceSystemService): answer two ShellCoreUtil calls as firmware 13.42 does
2026-11-09 06:36:48 +13:00
Dean Galvin 5ceb701561 revert(libkernel): back out the title instance lock and its release rename
Main's Windows patched_libraries test fails from the merge of #12970
(5bd71fb5bc): 15 modules, libSceSystemService among them, report
LoadLibraryEx error 127 (procedure not found). #17076 (212b75d984) renamed
the cross-library release call to a _nid_no_patch name but the same 15 modules
still fail on main push 42471325636, and its pull request run never ran
patched_libraries, so the rename was not shown to fix it.

Revert both merges as one change until the cause is found and shown
passing on Windows: 14 files from #12970 removed, the #17076 rename reverted
with them.
2026-11-09 00:24:37 +13:00
Dean Galvin 7d2f317754 fix(libkernel): name the instance lock release export so the NID patcher leaves it alone
libSceSystemService calls ReleaseHostInstanceLock across the libkernel
DLL boundary. Every other cross-library host call from libkernel uses a
_nid_postfix or _nid_no_patch name so the patched libraries resolve it.
The plain name is not resolved after patching, so libSceSystemService.prx
and the modules that import it fail LoadLibraryEx with error 127 and the
patched_libraries test goes red on Windows. Rename it to
ReleaseHostInstanceLock_nid_no_patch, next to LogFileRelease_nid_no_patch
at the same call site.
2026-11-08 22:29:59 +13:00
Adrià 5bd71fb5bc Merge pull request #12970 from MarcZX10/feat/title-instance-lock
feat(libkernel): stop a second copy of a title with ANYPS5_INSTANCE_LOCK
2026-11-08 09:16:58 +01:00
Adrià 10c3b868fb Merge pull request #15637 from LeandroLP23/refactor/windows-spawn-helpers
refactor(libc): share the converted executable name, own path and Windows command line helpers
2026-11-08 01:26:34 +01:00
Dean baf28a0a21 Merge pull request #15882 from zaryabzip/fix/systemservice-receive-event-null
fix(libSceSystemService): return NO_EVENT from sceSystemServiceReceiveEvent for a null event
2026-11-08 12:33:50 +13:00
MarcZX10 9a0bd3a611 fix(libSceSystemService): release the instance lock before sceSystemServiceLoadExec starts the next process on Windows
Windows starts the next process with CreateProcessW and only then terminates
the current one, so with ANYPS5_INSTANCE_LOCK=on the new process could reach
its own lock while this one still held it and stop with the already-running
error. Drop the lock just before CreateProcessW. POSIX hosts need nothing:
execv replaces the image in place and the close-on-exec lock descriptor is
released with it. Not built or run on Windows by the author.
2026-11-07 21:37:40 +01:00
Dean Galvin 0c8371b339 Merge branch 'main' into the host open-URL branch
Fix-up on MarcZX10's change: resolve the conflicts with main's console
date and time format settings by keeping both sides: both includes in
Export.cpp, the ANYPS5_OPEN_URLS row beside main's ANYPS5_DATE_FORMAT
and ANYPS5_TIME_FORMAT rows, and both USAGE sections.
2026-11-07 16:40:29 +13:00
MarcZX10 88b2f54637 feat(libSceSystemService): answer parameters 2 and 3 from ANYPS5_DATE_FORMAT and ANYPS5_TIME_FORMAT
sceSystemServiceParamGetInt returned a fixed 1 (day, month, year) for the date
format and a fixed 1 (24-hour) for the time format. They now come from
ConsoleDateFormat and ConsoleTimeFormat, which return those same values while
the variables are unset or empty, so nothing changes by default. An invalid
value throws at the first query of that parameter, naming the variable.
2026-11-07 02:50:57 +00:00
Dean 80be5291d1 Merge pull request #14118 from rooklz/refactor/systemservice-running-title-aliases
refactor(libSceSystemService): delegate the running-title aliases
2026-11-07 11:28:47 +13:00
Adrià 16ac89979e Merge pull request #14198 from rooklz/refactor/systemservice-launch-process-rejections
refactor(libSceSystemService): throw the documented launch and local-process rejections
2026-11-06 17:25:58 +01:00
rooklz f9cfa40a05 refactor(libSceSystemService): delegate the running-title aliases 2026-11-05 05:19:07 +01:00
zaryabzip cf6f2812dc fix(libSceSystemService): return NO_EVENT from sceSystemServiceReceiveEvent for a null event
obSCEne's PS5 run (system software 12.40) returned 0x80A10004 for a null
event pointer as for a real one, with no event pending; the host
returned 0x80A10003.
2026-11-05 02:57:13 +05:00
Rookie 8889cc9a03 refactor(libSceSystemService): keep launch and local-process rejections in the unimplemented-call metric 2026-11-04 12:58:27 +00:00
MarcZX10 4e7b6f3956 feat(system-service): route sceSystemServiceLaunchWebBrowser through the shared gate
All guest threads and all addresses now share one OpenUrlGate: callers that
arrive during a dialog or launch, repeats after a Cancel and more than three
attempts a minute return the existing EOPNOTSUPP without touching a backend.
The mutex that queued callers is gone. The test hook takes the clock too and
resets the gate; the existing exported-call test advances a fake clock between
calls so its sequence is unaffected by the limits.
2026-11-04 11:37:48 +00:00
MarcZX10 5f5d8ece50 feat(system-service): open the URL of sceSystemServiceLaunchWebBrowser on the host
After the sourced argument checks (null, 6015 bytes, http:, https: or psno:),
the call now consults ANYPS5_OPEN_URLS. Unset, empty or never keep today's
EOPNOTSUPP result. With ask or always, a URL that passes the host validator is
confirmed and launched through the injectable backends and the call returns 0;
a declined, rejected or failed launch still returns EOPNOTSUPP. The launch is
serialised so two guest threads never stack confirmation boxes. An invalid
ANYPS5_OPEN_URLS value throws an error naming the variable at the first call
that gets past the argument checks.
2026-11-04 11:37:03 +00:00
LeandroLP23andClaude Opus 5.5 e73a15fc5c refactor(libc): share the converted executable name, own path and Windows command line helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 23:43:47 +01:00
Dean 23c7030f63 Merge pull request #11588 from camezaro-intc/feat/appcontent-systemservice-imports
feat(libs): export MW3 app content and system service imports
2026-11-03 21:08:54 +13:00
Dean Galvin aefbe42bcc Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
# Conflicts:
#	core/libs/prx/libSceSystemService/PendingExports.cpp
2026-11-02 21:17:33 +13:00
Dean 8f5edf8757 Merge pull request #9586 from EagleBearerYS/feat/libscesystemservice-absent-features
feat(libSceSystemService): answer queries for streaming, VR, shell and device features AnyPS5 does not have
2026-11-02 20:57:58 +13:00
camezaro-intc 8b57112350 feat(libSceSystemService): export MW3 system service import 2026-11-01 03:48:18 -06:00
Dean bbe8cf31c1 Merge pull request #14188 from rooklz/refactor/systemservice-running-title-rejections
refactor(libSceSystemService): throw the documented running-title rejections
2026-11-01 18:47:35 +13:00
BunnyFlandClaude Opus 5.5 e6da8bf06f feat(libSceSystemService): answer two ShellCoreUtil calls as firmware 13.42 does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:17:48 +01:00
rooklz fca6bd92e1 refactor(libSceSystemService): throw the documented launch and local-process rejections 2026-10-31 23:59:06 +01:00
rooklz f440c992f5 refactor(libSceSystemService): throw the documented running-title rejections 2026-10-31 23:41:18 +01:00
rooklz 0b7c518e1a refactor(libSceSystemService): throw the documented LoadExec and kill rejections 2026-10-31 23:35:59 +01:00
Yunus Shaikh 2831b2367d refactor(libSceSystemService): use main's invalid-argument error names for null outputs
The branch defined SHELL_CORE_UTIL_ERROR_NULL_OUTPUT (0x80e30003) and
LNC_UTIL_ERROR_NULL_OUTPUT (0x80940005), while #10801 on main already
names the same values SHELL_CORE_UTIL_ERROR_INVALID_ARGUMENT and
LNC_UTIL_ERROR_INVALID_ARGUMENT. The two duplicates are gone and their
uses in the status exports and their tests take main's names. The
values, and so the behaviour, are unchanged.
2026-10-30 19:15:15 +00:00
Yunus Shaikhandjotitadev 2e5b93fd5f Merge main into feat/libscesystemservice-absent-features
main's #10706 requires each export to be declared once, in its
library's public header. GuestSystemServiceStatus.cpp now includes
prx/libSceSystemService/include/SystemService.hpp instead of declaring
25 of its exports in its own extern "C" lines, as jotitadev suggested
in review.

Co-authored-by: jotitadev <139649225+jotitadev@users.noreply.github.com>
2026-10-30 18:09:51 +00:00
MarcZX10 202fcb3792 fix(libSceSystemService): hand the real standard streams to a host executable that replaces the process
sceSystemServiceLoadExec of a host executable ends this process after it
starts the target, so with ANYPS5_LOG_FILE set the target would inherit
the pipes of the log copy with no reader left. Call LogFileRelease before
the launch (after the existing restore of the kept standard error on
POSIX) so the target inherits the original streams.
2026-10-29 05:57:24 +01:00
MarcZX10 eb385ab2da feat(libSceSystemService): track the suspend confirmation dialog flag
sceSystemServiceEnableSuspendConfirmationDialog and
sceSystemServiceDisableSuspendConfirmationDialog set an atomic flag
that sceShellCoreUtilGetSuspendConfirmationDialogFlag reads back for
the running title. The flag starts enabled. Another app ID still
throws NotImplemented_nid_no_patch because the console's answer is
unknown. AnyPS5 has no shell to suspend the title and show the
dialog, so the debt document lists the flag under Silent stubs.
2026-10-28 13:06:21 +00:00
MarcZX10 1755907bdb feat(libSceSystemService): keep the GPU load emulation mode
sceSystemServiceSetGpuLoadEmulationMode and
sceSystemServiceGetGpuLoadEmulationMode, with the sceShellCoreUtil
Set/Get pair and their ByAppId variants, now share one atomic mode
instead of throwing. Modes 0 (off) and 1 (normal) are accepted; the
getter returns the mode itself rather than a result code. The initial
mode is 1. Any other mode, and any app ID other than the running
title, still throws NotImplemented_nid_no_patch because the console's
errors for them are unknown. The host GPU is not throttled, which the
debt document lists under Silent stubs.
2026-10-28 13:06:21 +00:00
Yunus Shaikh 1928c54b4f fix(libSceSystemService): return firmware 13.42's results for the arguments it checks before a request
BunnyFl ran firmware 13.42's libSceSystemService.sprx in an emulator and
recorded the checks these calls make before they pass a request on. A
null title ID or one whose length isn't 9 makes sceSystemServiceGetAppId
and sceLncUtilGetAppId return -1 and sceLncUtilIsAppLaunched return
0x80940005. A null output, list, count or user returns 0x80940005 from
the LncUtil and SystemService calls and 0x80e30003 from
sceShellCoreUtilGetUserFocus, before the app ID is looked at, and a null
sceLncUtilLoadExec path returns 0x80940005.

What the module passes on as a request still throws: another
9-character title ID, another app ID, a list capacity of 0 and an empty
sceLncUtilLoadExec path.
2026-10-25 14:15:27 -07:00
Yunus Shaikh 7a4b965d6f feat(libSceSystemService): forward sceLncUtilLoadExec to sceSystemServiceLoadExec
sceLncUtilLoadExec takes the same path and null-terminated argument
list, which the SystemService call passes on to it on the console. It
returns sceSystemServiceLoadExec's result: the same parameter errors,
the same refusals for paths it cannot start, and "exit" ends the title
in the same way.
2026-10-25 00:15:25 +00:00
Yunus Shaikh c2eb0a2404 feat(libSceSystemService): report the running title as not suspended
sceLncUtilIsAppSuspended, sceSystemServiceIsAppSuspended and
sceLncUtilIsSpeculativeLaunch write false for the running title's app
ID. The title that calls them is running and has no shell to suspend
it. It was started from the host rather than by sceLncUtilLaunchApp,
so no LncLaunchParam asked for a speculative launch. Another app ID
and a null output still throw.
2026-10-25 00:15:25 +00:00
Yunus Shaikh f5afb8755c feat(libSceSystemService): report the running title's user
sceLncUtilGetAppLaunchedUser, sceSystemServiceGetAppLaunchedUser and
sceShellCoreUtilGetUserFocus write the initial user for the running
title's app ID. That is the user sceUserServiceGetInitialUser and
sceUserServiceGetForegroundUser report. Another app ID and a null user
pointer still throw.
2026-10-25 00:15:25 +00:00
Yunus Shaikh 695041093b feat(libSceSystemService): answer the running title's app ID lookups
sceLncUtilGetAppId and sceLncUtilIsAppLaunched accept the running
title's ID as sceSystemServiceGetAppId does, and
sceLncUtilGetAppIdOfRunningBigApp returns what
sceSystemServiceGetAppIdOfRunningBigApp returns. Both big-app lists
write the running title's app ID as their only entry, because AnyPS5
runs one title. Another title ID, a null pointer and a list capacity of
0 still throw.
2026-10-25 00:15:25 +00:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
Adrià a5f13b3fd4 Merge pull request #8354 from MarrasFederico/feat/system-service-app-title-id
feat(libSceSystemService): convert between the running title's app id and title id
2026-10-24 13:53:37 +02:00
Yunus Shaikh d64a74d8e9 fix(libSceSystemService): answer the measured null-output and unblock cases
BunnyFl measured these cases against firmware 13.42's libSceSystemService
in the PR thread (behaviour only), so they no longer throw:

- sceShellCoreUtilGetRemotePlayStatus, GetSharePlayStatus and
  GetGameLiveStreamingStatus return 0x80e30003 for a null output and
  write nothing.
- sceSystemServiceGetRemoteplayStatus has no null check of its own: it
  forwards, so a null output returns the ShellCoreUtil error, not
  SYSTEM_SERVICE_ERROR_PARAMETER.
- sceLncUtilIsPs2Emu returns 0x80940005 for a null output.
- sceLncUtilUnblockAppSuspend with no block left returns
  SCE_KERNEL_ERROR_EBUSY and changes nothing, before reading the reason.

A null reason in sceLncUtilBlockAppSuspend, a null reason in an unblock
while a block is held, sceShellCoreUtilGetSocialScreenStatus with a null
output and the service-answered eye-to-eye cases still throw, and the
debt entries say why.
2026-10-23 03:43:52 -07:00
frankea 56dfc1327e fix(libSceSystemService): answer the registry-backed integer parameters with values measured on a PS5 2026-10-23 04:36:58 -04:00
Dean 6a6a35fdf5 Merge pull request #7965 from frankea/ps5-measured-1340
fix(libs): values measured on a PS5 (firmware 13.40) from inside retail games
2026-10-23 06:18:10 +13:00
Federico Marras 06f25300f9 Merge commit '3ca07d086d5f44fbe3c00370e7f03953ab46ca1b' into feat/system-service-app-title-id 2026-10-22 15:43:43 +02:00
Yunus Shaikh 239de166eb Merge main into feat/libscesystemservice-absent-features
# Conflicts:
#	core/libs/prx/libSceSystemService/PendingExports.cpp
2026-10-22 00:01:31 -07:00
Yossi Yadgar 13d3ef8080 feat(libSceSystemService): report no background music in sceShellCoreUtilIsBgmPlaying 2026-10-22 08:25:30 +03:00
Yossi Yadgar a946073ce1 feat(libSceSystemService): report no background music in sceSystemServiceIsBgmPlaying 2026-10-22 08:25:24 +03:00
Federico Marras e0e231ef3f Merge remote-tracking branch 'upstream/main' into feat/system-service-app-title-id
# Conflicts:
#	core/libs/prx/libSceSystemService/PendingExports.cpp
#	docs/dev/debt/libSceSystemService.md
2026-10-22 07:08:48 +02:00
Yunus Shaikh f51064dbee fix(libSceSystemService): leave unmeasured suspend blocks and other users unimplemented
A null reason, an unblock with no block left and an eye-to-eye query for a user other than the logged-in one now go through NotImplemented_nid_no_patch instead of throwing invented errors, since the console's answers to them are not measured.
2026-10-21 20:53:37 -07:00
Yunus Shaikh 4a815a8bf5 feat(libSceSystemService): report no disc drive, USB storage, app move or PS2 emulator
AnyPS5 runs the title from its folder as /app0 and models none of these:
libSceDiscId and sceKernelHwGetBdDriveInfo throw, every libSceUsbStorage
device call throws, sceShellCoreUtilDeclareBeginOfExternalStorageAppMove
throws, and sceSystemServiceAddLocalProcessForPs2Emu throws, so the
running process is always the title's own PS5 executable.

sceSystemStateMgrIsBdDriveReady, sceShellCoreUtilIsUsbMassStorageMounted
and sceShellCoreUtilIsExternalStorageAppMoveInProgress return false, and
sceLncUtilIsPs2Emu writes false. A null output to sceLncUtilIsPs2Emu
throws, since no sceLncUtil function in the tree answers one.
2026-10-22 02:38:17 +00:00
Yunus Shaikh 81fd4e5dda feat(libSceSystemService): report the absent shell UI and PS VR
AnyPS5 has no shell UI: sceSystemServiceGetStatus never reports a system
UI overlay or background execution, and the host has no auto power-off
timer. The shell UI therefore never takes the foreground, overlays the
impose screen, runs a screen saver or shuts down, and those queries
return false.

libSceHmd detects no headset, so there is no PS VR social screen and the
logged-in user's eye-to-eye distance was never adjusted. Another user ID
throws, since the console's error for it is not measured.

The sceSystemService twins forward to their sceShellCoreUtil and
sceLncUtil targets. sceSystemServiceIsEyeToEyeDistanceAdjusted returns
SYSTEM_SERVICE_ERROR_PARAMETER for a null output before forwarding, as
its neighbours do, and the sceShellCoreUtil forms throw for one.
2026-10-22 02:38:17 +00:00