Commit Graph
158 Commits
Author SHA1 Message Date
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
Dean f02ce8d292 Merge pull request #14195 from rooklz/refactor/systemservice-speculative-launch-rejection
refactor(libSceSystemService): throw the documented speculative-launch rejection
2026-11-01 18:48:26 +13: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
Dean 8bb1018913 Merge pull request #14180 from rooklz/refactor/systemservice-loadexec-rejection
refactor(libSceSystemService): throw the documented LoadExec and kill rejections
2026-11-01 16:31:54 +13:00
rooklz 87d192fadb refactor(libSceSystemService): throw the documented speculative-launch rejection 2026-10-31 23:51:29 +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
rooklz bf3ef895d6 refactor(libSceSystemService): delegate the process lifecycle wrappers
Forward the suspend, resume, kill, exception and ready-for-suspend wrappers to their LncUtil exports, as the debt records. The targets keep their documented throws, so behaviour is unchanged.
2026-10-31 21:07:45 +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 <[email protected]>
2026-10-30 18:09:51 +00:00
BunnyFlandClaude Opus 5.5 126a40816f feat(libSceSystemService): answer the codec activation calls as firmware 13.42 does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:18:59 +01:00
BunnyFlandClaude Opus 5.5 f87932d303 feat(libSceSystemService): implement sceSystemServiceGetPSButtonEvent
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 13:45:37 +01:00
BunnyFlandClaude Opus 5.5 5a161a06b1 feat(libSceSystemService): answer the codec activation calls as firmware 13.42 does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 13:39:14 +01:00
Adrià 84e114e4eb Merge pull request #12715 from MarcZX10/feat/log-to-file
feat(libc): copy the runtime log into a file with ANYPS5_LOG_FILE
2026-10-30 05:51:34 +01: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 b22252c9bb fix(libSceSystemService): hand the real standard streams to a converted executable that replaces the process
LoadExec replaces the running process with the target executable on
Windows, Linux and macOS. With ANYPS5_LOG_FILE set the standard output and
error are the pipes the log copy reads, and its threads end with this
process, so the new executable would write into pipes nobody reads and a
POSIX one would be killed by SIGPIPE. Before the replacement starts, call
LogFileRelease, which empties the pipes into the file and puts the
original streams back on descriptors 1 and 2 (the standard handles on
Windows) when they still are the pipes. The new executable starts its own
copy from the inherited variable and appends to the same file.
2026-10-29 05:57:24 +01:00
dantdmdarealguy c5a69e8e46 fix(build): skip the core/libs relinker CLI tests when ANYPS5_RELINKER_CLI is OFF
With -DBUILD_TESTING=ON -DANYPS5_RELINKER_CLI=OFF the generate step
failed: exec_arguments, loadexec_arguments, guest_timed_join_import_*,
guest_runtime_lifecycle and agc_driver_guest_memory_lifetime_converted
name the relinker target, which core/relinker defines only when the
option is on. The option is now declared in the root CMakeLists.txt,
before core/libs, and those tests are registered only with the command
line, as core/relinker already does for its own command line tests.
2026-10-28 11:05:02 -05:00
simnJS b419a4a808 feat(libSceSystemService): call libSceUsbStorage from the USB storage aliases
The sceSystemServiceUsbStorage* exports jump straight into the USB storage
module, so call the matching libSceUsbStorage export instead of throwing.
RequestMapWSB keeps its marker while its two declarations disagree on the
fourth argument and the output type.
2026-10-27 14:18:59 +01: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 fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03: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 e14bb6f532 Merge pull request #8957 from dantdmdarealguy/test/loadexec-tracy-client
test(libSceSystemService): stage the Tracy client with the loadexec_arguments libraries
2026-10-23 14:00:20 +13: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
Yunus Shaikh a2e9ffd89c feat(libSceSystemService): report no Remote Play, Share Play or broadcast
The status queries answer from what the tree already reports for these
services: libSceRemoteplay's connection status is DISCONNECT,
libSceSharePlay has neither a host nor a visitor, and
libSceGameLiveStreaming's status has isOnAir false. The ShellCore
setters that would change these answers throw.

sceSystemServiceGetRemoteplayStatus and
sceSystemServiceIsGameLiveStreamingOnAir forward to their
sceShellCoreUtil twins. sceSystemServiceGetRemoteplayStatus returns
SYSTEM_SERVICE_ERROR_PARAMETER for a null output before forwarding, as
sceSystemServiceGetNoticeScreenSkipFlag does. No sceShellCoreUtil
function in the tree answers a null output, so the sceShellCoreUtil
forms throw for one.
2026-10-22 02:38:17 +00:00
Yunus Shaikh 2cfa852a40 feat(libSceSystemService): answer suspend blocks and notifications
AnyPS5 never suspends the running title: sceSystemServiceGetStatus never
reports background execution and sceSystemServiceReceiveEvent has no
event to deliver. Enabling or disabling the suspend notification, and
blocking or unblocking a suspend, therefore change nothing and return
success. The sceSystemService notification calls forward to their
sceLncUtil twins.

A null reason and an unblock with no block left throw, since the
console's answers to them are not measured.

The new guest_system_service_status tests check each answer.
2026-10-22 01:37:59 +00:00
frankea 41d551eb60 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-measured-1340
# Conflicts:
#	core/libs/prx/libSceSystemService/Export.cpp
2026-10-21 17:37:31 -04:00
boykopovar b35e344585 fix(systemservice): restore browser launch signature and validation 2026-10-21 21:54:54 +03:00
boykopovar 991efec086 fix(systemservice): restore tournament and daemon argument slots 2026-10-21 21:53:08 +03:00
boykopovar b167045830 fix(systemservice): recover activation handles and device argument types 2026-10-21 21:49:56 +03:00
boykopovar 50c8103af2 fix(systemservice): recover launch and process status structures 2026-10-21 21:49:56 +03:00
boykopovar 67ff7609c2 fix(systemservice): define application message payload layout 2026-10-21 21:49:55 +03:00
boykopovar 1db52e3e40 fix(systemservice): reject unsupported integer parameters 2026-10-21 21:49:54 +03:00
boykopovar 9e94b0cb71 fix(systemservice): define launch and microphone status layouts 2026-10-21 21:49:54 +03:00
boykopovar a8cb8345cd fix(systemservice): validate system name buffers and termination 2026-10-21 21:49:53 +03:00
boykopovar 28fdabd59c fix(systemservice): restore float progress returns and clock arguments 2026-10-21 21:49:53 +03:00