Repository navigation
feat(libSceSystemService): implement GPU load emulation mode and suspend confirmation dialog flag - #12285
Conversation
Progress report (88e804b → aefbe42)📈 System libraries: 26.43% (+0.01%, +4 implemented functions) ✅ 4 implemented
Changed libraries (implemented exports)
|
|
@MarcZX10 thanks, the two groups look right to me: none of the nine NIDs was implemented before, the mode and the flag are plain atomics, and the debt entries say what is assumed. One thing before it lands, from the rule that new tests do not assert that an unimplemented export throws:
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
A Windows run, since the description lists none. Head
AI-assisted: yes (Claude Code). |
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The tree also carried the open PRs #12290, #12288, #12269, #12265, #12232, #12206, #12201, #12199, #12197, #12165, #12146, all merged cleanly, so the run is a joint one; the tests of this PR are AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
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.
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.
dc62fca to
eb385ab
Compare
|
@MarcZX10 The prior throw-assert request is still present at eb385ab: please remove the new Throws assertions for unsupported modes and non-running app IDs in GuestSystemService.cpp:122-123,152-154,157-159. Keep the implementation throws and supported mode/dialog tests. This is the same outstanding request, not a new behavior change. |
|
Fix-up to your PR: removed only the unsupported-mode and foreign-app-ID throw assertions requested by our review; implementation throws and supported behavior tests are unchanged. |
MarcZX10
left a comment
There was a problem hiding this comment.
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: d9ca4b6 (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
Throwschecks for modes 2, 3 and 0xffffffff and for app IDs other than the running title. At this headTestSuspendConfirmationDialog(GuestSystemService.cpp:113-134) andTestGpuLoadEmulationMode(L136-162) contain noThrowscheck. The remainingThrowsuses (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
AnyPS5/core/libs/tests/GuestSystemService.cpp
Lines 113 to 162 in d9ca4b6
AnyPS5/core/libs/tests/GuestSystemService.cpp
Lines 64 to 73 in d9ca4b6
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.
# Conflicts: # core/libs/prx/libSceSystemService/PendingExports.cpp
What
Implements two groups of pending libSceSystemService exports that had no behaviour and threw
NotImplemented_nid_no_patch: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.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_zoneand the threeguest_system_service_app_title_id_*tests pass;GuestSystemService.cppgains tests for both groups, including 4-thread concurrent set/get.tools/check_conventions.py --base upstream/main, the public header audit andgit diff --checkpass.Checklist