Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:feat/systemservice-player-dialog-param
Oct 21, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
KernelPanicNT:feat/systemservice-player-dialog-param

Conversation

@KernelPanicNT

Copy link
Copy Markdown
Contributor

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:

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

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

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

@oneandonlydean
oneandonlydean merged commit 31f0e34 into boykopovar:main Oct 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants