feat(libSceSystemService): fill the player dialog param as the console does #8337

Merged
KernelPanicNT merged 1 commit from upstream-pr/8337 into main 2026-10-21 03:33:33 +00:00
KernelPanicNT commented 2026-10-20 10:22:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KernelPanicNT on 2026-10-20T10:22:12Z.


What

sceSystemServiceInitializePlayerDialogParam now fills the param the way the console does. On main it returns 0 and writes nothing, so a title that initializes the param and then sets only the fields it needs passes uninitialized memory to sceSystemServiceLaunchPlayerDialog.

Source of the behaviour. A console measurement in prosper's console oracle (captured 2026-10-08, case). The call got a 256-byte buffer prefilled with 0xab and wrote only its first 0x40 bytes:

40 00 00 00 00 00 00 00  00 00 00 00 ff ff ff ff  00 ... 00 (to 0x3f)  ab ab ... (0x40..0xff untouched)

That is size 0x40 (u64), mode 0, user ID -1, and zeros. The field names and widths after 0x10 (target_account_id, 40 reserved bytes) and the void return follow SharpProspero's struct and declaration. The console left 0x0000000800693020 in rax, which is not an SCE error code, consistent with a void function.

On main, the export checks for null and returns 0. #292 added it for GTA V's Story Mode. PRAGMATA (PPSA02530) also imports it (#8005).

What the console does with a null param is not measured, so it now throws instead of returning 0x80A10003; it is recorded as debt.

Changes:

  • SceTypes.hpp: SystemServicePlayerDialogParam (0x40 bytes, with a static_assert).
  • Export.cpp: the export returns void, throws on null and writes the measured defaults.
  • guest_system_service_tests: the measured bytes, the untouched bytes after 0x40, and the null throw.
  • docs/dev/debt/libSceSystemService.md: a new entry for the null case.

Tested

Linux (GitHub Codespace, 4 cores, native build of this branch on d14a186f4):

  • guest_system_service_tests: 5/5 runs pass.
  • Negative control: with Export.cpp from main, guest_system_service_tests aborts with SIGABRT (the param is left unwritten); 5/5 pass again after restoring it.

Windows (fork CI, run 39403153111, this branch and an unrelated libSceNgs2 branch merged into main at d14a186f4): build and the full test suite pass, 1734/1734.

Checks:

  • python3 tools/check_conventions.py --base origin/main passes.
  • python3 tools/pr_overlap.py --branch feat/systemservice-player-dialog-param: reports no overlapping change. It could not compare #7201, #5965, #6977, #7081, #7412 and #6044, which conflict with main; checked by hand: #7201 (macOS port) changes LoadExec code in the same Export.cpp, the four SceTypes.hpp PRs change AudioOut, VideoOut, lconv and AvPlayer structures, and #6044 reorganizes tests.
  • tools/progress.py: unchanged (4246/6515 on base and head).

Checklist

  • Based on current main (d14a186f4); 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:4934366512 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8337). Originally posted by [KernelPanicNT](https://github.com/KernelPanicNT) on 2026-10-20T10:22:12Z. --- ### What `sceSystemServiceInitializePlayerDialogParam` now fills the param the way the console does. On `main` it returns 0 and writes nothing, so a title that initializes the param and then sets only the fields it needs passes uninitialized memory to `sceSystemServiceLaunchPlayerDialog`. **Source of the behaviour.** A console measurement in [prosper's console oracle](https://github.com/mattias800/prosper/blob/40d95db32efe1ad00106a5b9a84e018fffa9ecff/prosper/tests/data/console_oracle/nethttp.golden.tsv#L46) (captured 2026-10-08, [case](https://github.com/mattias800/prosper/blob/40d95db32efe1ad00106a5b9a84e018fffa9ecff/prosper/tests/data/console_oracle/nethttp.cases.tsv#L49)). The call got a 256-byte buffer prefilled with `0xab` and wrote only its first 0x40 bytes: ``` 40 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 ... 00 (to 0x3f) ab ab ... (0x40..0xff untouched) ``` That is size 0x40 (u64), mode 0, user ID -1, and zeros. The field names and widths after 0x10 (`target_account_id`, 40 reserved bytes) and the `void` return follow [SharpProspero's struct](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/SystemService/SystemService.cs#L637-L655) and [declaration](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/SystemService/SystemService.cs#L419-L426). The console left `0x0000000800693020` in `rax`, which is not an SCE error code, consistent with a `void` function. On `main`, [the export](https://github.com/boykopovar/AnyPS5/blob/d14a186f46155a3e87d5d070d8fda9dae382c180/core/libs/prx/libSceSystemService/Export.cpp#L350-L353) checks for null and returns 0. #292 added it for GTA V's Story Mode. PRAGMATA (PPSA02530) also imports it ([#8005](https://github.com/boykopovar/AnyPS5/issues/8005)). What the console does with a null param is not measured, so it now throws instead of returning `0x80A10003`; it is recorded as debt. Changes: - `SceTypes.hpp`: `SystemServicePlayerDialogParam` (0x40 bytes, with a `static_assert`). - `Export.cpp`: the export returns `void`, throws on null and writes the measured defaults. - `guest_system_service_tests`: the measured bytes, the untouched bytes after 0x40, and the null throw. - `docs/dev/debt/libSceSystemService.md`: a new entry for the null case. ### Tested Linux (GitHub Codespace, 4 cores, native build of this branch on `d14a186f4`): - `guest_system_service_tests`: 5/5 runs pass. - Negative control: with `Export.cpp` from `main`, `guest_system_service_tests` aborts with `SIGABRT` (the param is left unwritten); 5/5 pass again after restoring it. Windows (fork CI, [run 39403153111](https://github.com/KernelPanicNT/AnyPS5/actions/runs/39403153111), this branch and an unrelated libSceNgs2 branch merged into `main` at `d14a186f4`): build and the full test suite pass, 1734/1734. Checks: - `python3 tools/check_conventions.py --base origin/main` passes. - `python3 tools/pr_overlap.py --branch feat/systemservice-player-dialog-param`: reports no overlapping change. It could not compare #7201, #5965, #6977, #7081, #7412 and #6044, which conflict with `main`; checked by hand: #7201 (macOS port) changes `LoadExec` code in the same `Export.cpp`, the four `SceTypes.hpp` PRs change AudioOut, VideoOut, lconv and AvPlayer structures, and #6044 reorganizes tests. - `tools/progress.py`: unchanged (4246/6515 on base and head). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main` (`d14a186f4`); 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 - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 10:34:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T10:34:38Z.


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.

Pull request Shared files not compared
PR 5965 core/libs/SceTypes.hpp
PR 6044 core/libs/tests/GuestSystemService.cpp
PR 6977 core/libs/SceTypes.hpp
PR 7081 core/libs/SceTypes.hpp
PR 7201 core/libs/prx/libSceSystemService/Export.cpp
PR 7412 core/libs/SceTypes.hpp
PR 8354 core/libs/prx/libSceSystemService/Export.cpp
docs/dev/debt/libSceSystemService.md
PR 8524 core/libs/prx/libSceSystemService/Export.cpp
docs/dev/debt/libSceSystemService.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288954855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8337#issuecomment-6288954855). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T10:34:38Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 5965](https://www.github.com/boykopovar/AnyPS5/pull/5965) | `core/libs/SceTypes.hpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSystemService.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/SceTypes.hpp` | | [PR 7081](https://www.github.com/boykopovar/AnyPS5/pull/7081) | `core/libs/SceTypes.hpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceSystemService/Export.cpp` | | [PR 7412](https://www.github.com/boykopovar/AnyPS5/pull/7412) | `core/libs/SceTypes.hpp` | | [PR 8354](https://www.github.com/boykopovar/AnyPS5/pull/8354) | `core/libs/prx/libSceSystemService/Export.cpp`<br>`docs/dev/debt/libSceSystemService.md` | | [PR 8524](https://www.github.com/boykopovar/AnyPS5/pull/8524) | `core/libs/prx/libSceSystemService/Export.cpp`<br>`docs/dev/debt/libSceSystemService.md` |
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!8337
No description provided.