feat(libSceSystemService): implement GPU load emulation mode and suspend confirmation dialog flag #12285

Merged
MarcZX10 merged 4 commits from upstream-pr/12285 into main 2026-11-02 13:36:51 +00:00
MarcZX10 commented 2026-10-28 07:14:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T07:14:01Z.


What

Implements two groups of pending libSceSystemService exports that had no behaviour and threw NotImplemented_nid_no_patch:

  • GPU load emulation mode: sceSystemServiceSetGpuLoadEmulationMode, sceSystemServiceGetGpuLoadEmulationMode, sceShellCoreUtilSetGpuLoadEmulationMode, sceShellCoreUtilGetGpuLoadEmulationMode, sceShellCoreUtilSetGpuLoadEmulationModeByAppId, sceShellCoreUtilGetGpuLoadEmulationModeByAppId. One atomic mode (0 off, 1 normal, per SharpProspero); the getter returns the mode itself. Other modes and other app IDs throw.
  • Suspend confirmation dialog: sceSystemServiceEnableSuspendConfirmationDialog, sceSystemServiceDisableSuspendConfirmationDialog, sceShellCoreUtilGetSuspendConfirmationDialogFlag (atomic flag, starts enabled, running title only).

Both are listed under Silent stubs in docs/dev/debt/libSceSystemService.md (the host has no GPU throttling and no shell dialog), with the assumptions stated (initial values, shared mode) and the public sources cited (SharpProspero, OpenOrbis, shadPS4 for prototypes and behaviour only; no code copied).

Skipped on purpose: the other ~500 pending exports have no public prototype or documented behaviour (OpenOrbis and shadPS4 list them as argument-less stubs), so they stay untouched. Exports already covered by open PRs (screen saver, eye-to-eye adjusted, suspend notification, streaming/remote play queries, USB storage, splash/player dialog stubs) were not touched.

Two commits, one per group.

Tested

  • guest_system_service, guest_system_service_language, guest_system_service_time_zone and the three guest_system_service_app_title_id_* tests pass; GuestSystemService.cpp gains tests for both groups, including 4-thread concurrent set/get.
  • tools/check_conventions.py --base upstream/main, the public header audit and git diff --check pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5046685259 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12285). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T07:14:01Z. --- ### What Implements two groups of pending libSceSystemService exports that had no behaviour and threw `NotImplemented_nid_no_patch`: - GPU load emulation mode: `sceSystemServiceSetGpuLoadEmulationMode`, `sceSystemServiceGetGpuLoadEmulationMode`, `sceShellCoreUtilSetGpuLoadEmulationMode`, `sceShellCoreUtilGetGpuLoadEmulationMode`, `sceShellCoreUtilSetGpuLoadEmulationModeByAppId`, `sceShellCoreUtilGetGpuLoadEmulationModeByAppId`. One atomic mode (0 off, 1 normal, per SharpProspero); the getter returns the mode itself. Other modes and other app IDs throw. - Suspend confirmation dialog: `sceSystemServiceEnableSuspendConfirmationDialog`, `sceSystemServiceDisableSuspendConfirmationDialog`, `sceShellCoreUtilGetSuspendConfirmationDialogFlag` (atomic flag, starts enabled, running title only). Both are listed under Silent stubs in `docs/dev/debt/libSceSystemService.md` (the host has no GPU throttling and no shell dialog), with the assumptions stated (initial values, shared mode) and the public sources cited (SharpProspero, OpenOrbis, shadPS4 for prototypes and behaviour only; no code copied). Skipped on purpose: the other ~500 pending exports have no public prototype or documented behaviour (OpenOrbis and shadPS4 list them as argument-less stubs), so they stay untouched. Exports already covered by open PRs (screen saver, eye-to-eye adjusted, suspend notification, streaming/remote play queries, USB storage, splash/player dialog stubs) were not touched. Two commits, one per group. ### Tested - `guest_system_service`, `guest_system_service_language`, `guest_system_service_time_zone` and the three `guest_system_service_app_title_id_*` tests pass; `GuestSystemService.cpp` gains tests for both groups, including 4-thread concurrent set/get. - `tools/check_conventions.py --base upstream/main`, the public header audit and `git diff --check` pass. ### Checklist - [x] Based on current main; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation .md files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - Depends on: none - Fixes: none - Unblocks: none - GPUs tested: n/a - AI-assisted: yes
MarcZX10 commented 2026-11-02 04:58:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:58:04Z.

Review: COMMENTED


Reviewed — requested test cleanup is in the head, no open point

The throw assertions oneandonlydean asked to drop are gone from the test file at this head, and the implementation throws they pointed at are still in Export.cpp.

What I ran

Live head: d9ca4b6b36 (OPEN, same as the batch file). Read the issue comments, review comments and reviews with gh api (repos/boykopovar/AnyPS5/issues|pulls/12285/...). Read files with git -C /marc/AnyPS5 show d9ca4b6b…:<path> and grep for Throws and NotImplemented. Read the hosted check rollup with gh pr view. Nothing was built or run.

Results

Check Result Note
windows SUCCESS hosted, at this head
conventions SUCCESS hosted, at this head
linux, relinker SKIPPED hosted workflow skipped them; not read further

Findings

  • oneandonlydean, 2026-10-28 07:25 UTC, and again 2026-10-29 05:51 UTC: drop the Throws checks for modes 2, 3 and 0xffffffff and for app IDs other than the running title. At this head TestSuspendConfirmationDialog (GuestSystemService.cpp:113-134) and TestGpuLoadEmulationMode (L136-162) contain no Throws check. The remaining Throws uses (L194-208) are the launch and PSM tests and were not part of the request. Done.
  • The throws stay in Export.cpp, as the reviewer said: L299 (mode other than 0 and 1), L306 (application other than the running title), L327 (suspend flag for another application).
  • TestRunningAppAnswer (L64-73) still queries other app IDs, but it expects a result code, not a throw.
  • oneandonlydean, 2026-10-29 11:51 UTC: "Fix-up" comment saying the removal was pushed. It matches the head. I did not tie it to a commit.

Sources

Not verified

  • The tests were not built or run here.
  • Whether the Throws removal happened in a commit after the reviewer's 10-29 comment: I only compared content at the head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5732252677 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12285#pullrequestreview-5732252677). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-02T04:58:04Z. **Review:** COMMENTED --- # Reviewed — requested test cleanup is in the head, no open point The throw assertions oneandonlydean asked to drop are gone from the test file at this head, and the implementation throws they pointed at are still in Export.cpp. ## What I ran Live head: d9ca4b6b3641641e2bb67282c3d9f10da82b7938 (OPEN, same as the batch file). Read the issue comments, review comments and reviews with `gh api` (repos/boykopovar/AnyPS5/issues|pulls/12285/...). Read files with `git -C /marc/AnyPS5 show d9ca4b6b…:<path>` and grep for `Throws` and `NotImplemented`. Read the hosted check rollup with `gh pr view`. Nothing was built or run. ## Results | Check | Result | Note | |---|---|---| | windows | SUCCESS | hosted, at this head | | conventions | SUCCESS | hosted, at this head | | linux, relinker | SKIPPED | hosted workflow skipped them; not read further | ## Findings - oneandonlydean, 2026-10-28 07:25 UTC, and again 2026-10-29 05:51 UTC: drop the `Throws` checks for modes 2, 3 and 0xffffffff and for app IDs other than the running title. At this head `TestSuspendConfirmationDialog` (GuestSystemService.cpp:113-134) and `TestGpuLoadEmulationMode` (L136-162) contain no `Throws` check. The remaining `Throws` uses (L194-208) are the launch and PSM tests and were not part of the request. Done. - The throws stay in Export.cpp, as the reviewer said: L299 (mode other than 0 and 1), L306 (application other than the running title), L327 (suspend flag for another application). - `TestRunningAppAnswer` (L64-73) still queries other app IDs, but it expects a result code, not a throw. - oneandonlydean, 2026-10-29 11:51 UTC: "Fix-up" comment saying the removal was pushed. It matches the head. I did not tie it to a commit. ## Sources - https://github.com/boykopovar/AnyPS5/blob/d9ca4b6b3641641e2bb67282c3d9f10da82b7938/core/libs/tests/GuestSystemService.cpp#L113-L162 - https://github.com/boykopovar/AnyPS5/blob/d9ca4b6b3641641e2bb67282c3d9f10da82b7938/core/libs/tests/GuestSystemService.cpp#L64-L73 - https://github.com/boykopovar/AnyPS5/blob/d9ca4b6b3641641e2bb67282c3d9f10da82b7938/core/libs/prx/libSceSystemService/Export.cpp#L299-L299 - https://github.com/boykopovar/AnyPS5/blob/d9ca4b6b3641641e2bb67282c3d9f10da82b7938/core/libs/prx/libSceSystemService/Export.cpp#L306-L306 - https://github.com/boykopovar/AnyPS5/blob/d9ca4b6b3641641e2bb67282c3d9f10da82b7938/core/libs/prx/libSceSystemService/Export.cpp#L327-L327 ## Not verified - The tests were not built or run here. - Whether the Throws removal happened in a commit after the reviewer's 10-29 comment: I only compared content at the head.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12285
No description provided.