feat(libSceVrSetupDialog): implement sceVrSetupDialogInitialize, Open, UpdateStatus, GetResult, Close, Terminate #1638
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1638"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Deses on 2026-10-08T15:24:40Z.
What
Implements the six
libSceVrSetupDialogexports (core/libs/prx/libSceVrSetupDialog/Export.cpp), which were declared without parameters and threw. The library is the common dialog that sets up a VR headset. The host has none, so the dialog behaves like the other common dialogs here (LoginDialog, CdlgPlayerReview, WebBrowserDialog): it shows nothing, finishes when opened and reports that the user canceled.int sceVrSetupDialogInitialize(void)(NIDsTFqbfXJGG4): none -> initialized; a second call returnsALREADY_INITIALIZED(0x80B80004).int sceVrSetupDialogOpen(const void* param)(loE6cNuCUtk):NOT_INITIALIZED(0x80B80003) before Initialize,ARG_NULL(0x80B8000D) for a null param, otherwise the dialog is finished. The param is not read. Opening again after it finished is allowed, as ALVR-PS4 reports for the PS4 dialog.int sceVrSetupDialogUpdateStatus(void)(KHfpjj9Pucg): returns the status (0 none, 1 initialized, 3 finished).int sceVrSetupDialogGetResult(void* result)(-umGRHNUiZU):NOT_INITIALIZED,ARG_NULL, andNOT_FINISHED(0x80B80005) before Open; once finished it writesUSER_CANCELED(1) to the first 32 bits and leaves the rest untouched.int sceVrSetupDialogClose(void)(ZeYpKhsLfG0):NOT_INITIALIZEDbefore Initialize, otherwise 0.int sceVrSetupDialogTerminate(void)(zdgiIPRqET4): back to none;NOT_INITIALIZEDwhen not initialized.The dialog never reaches the running state, so there is no
BUSYpath (the 0x80B80007 question from #1583 does not arise here).The library was built by the fallback in
core/libs/CMakeLists.txt; it now has its ownCMakeLists.txt, which registers the testguest_vr_setup_dialog(core/libs/tests/GuestVrSetupDialog.cpp). The test covers every call before Initialize, a double Initialize, GetResult with a null pointer and before Open, Open with a null param, Close and Terminate from the initialized state, Open, the finished status, theUSER_CANCELEDresult with the following 32 bytes untouched, a second Open, Close, Terminate, and Terminate and Close after Terminate. It catches no exceptions, so it does not linklibc.TechnicalDebt: libSceVrSetupDialog is removed from the PPSA12544 "added without an implementation" entry. One new "Unknown function info" entry (signatures taken from PS4, param not read, result layout assumed, source of
ALREADY_INITIALIZED, the PS5VR report) and one new "Functional" entry (the dialog shows nothing and reportsUSER_CANCELED).Not settled: no reference gives the PS5 signatures, the param or result layouts, or what the console returns without a headset. Recorded in TechnicalDebt. Not added:
sceVrSetupDialogGetStatus(qRUACYyUNFA), which the PS5 library also exports and no known title imports.Sources:
data/stubs/by_library/libSceVrSetupDialog.txtlines 1-9 (seven names, GetStatus included), which also match the names hashed:github.com/claimore22/ps5rs@2304be5131/data/stubs/by_library/libSceVrSetupDialog.txtsceHmdSetupDialog*, the PS4 ancestor): shadPS4src/core/libraries/hmd/hmd_setup_dialog.hlines 16-35 (0x68-byte param: common base param, size, user id,disable_handover_screen, 40 reserved bytes; 36-byte result: common result and 32 reserved bytes):github.com/shadps4-emu/shadPS4@0fe263a476/src/core/libraries/hmd/hmd_setup_dialog.h, and orbitaltools/ida/db_types.jsonlines 932-938:github.com/AlexAltea/orbital@cc408367da/tools/ida/db_types.jsondocs/psvr-technical-reference.mdlines 251-285 (0x80B80004from a second...Initialize(); with a ready headset the dialog finishes at once, a cancel finishes with result 1, re-opening without a new Initialize shows it again):github.com/nicolas-riera/ALVR-PS4@3889e303b9/docs/psvr-technical-reference.mdsrc/core/libraries/system/commondialog.hlines 14-44:github.com/shadps4-emu/shadPS4@0fe263a476/src/core/libraries/system/commondialog.happ/src/vr_system.hlines 5-7 report that the system refuses the dialog with "invalid video out" whatever the param holds, and that it is the original PS VR set-up, not PS VR2 (no error code given):github.com/theghostonline/PS5VR@0e408909ce/app/src/vr_system.hcrates/raeen-hle/src/libsce_dialog_misc.rslines 1-34, also finishes the dialog at once with a canceled outcome and notes that Blasphemous II (PPSA13580) imports the same six calls:github.com/Whoisraeen/Raeen@2db5692320/crates/raeen-hle/src/libsce_dialog_misc.rsfeatures/ps5/document/docs/sdk_12_catalog.mdlines 865-871); the mirror does not include the page.Text conflict: the TechnicalDebt line edited here (exports imported by PPSA12544's Unity plugins) is also edited by #1544 (removes Share) and #1583 (removes WebBrowserDialog). Whichever merges later needs a rebase; the conflict is in text only.
Tested
Windows 11, MinGW-w64 GCC 15.2.0, built in this branch's own tree on
4b005b22: full build, thelibstarget (the patchedlibSceVrSetupDialog.prxexports the six NIDs above) andctest -R "vr_setup|dialog"(9 tests,guest_vr_setup_dialogincluded) pass;check_conventions.pyandcheck_test_registration.pypass, andprogress.pyreports libSceVrSetupDialog 6/6. No title run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T15:32:16Z.
Review: COMMENTED
This is a draft PR claiming the libSceVrSetupDialog exports for future implementation. Good to reserve these NIDs early to avoid conflicts. Keep as draft until the actual implementation is ready - no code changes yet, just export declarations.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T17:08:16Z.
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.
main)docs/dev/TechnicalDebt.mdL235docs/dev/TechnicalDebt.mdL235docs/dev/TechnicalDebt.mdL235Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:22:23Z.
Which title reaches the VR setup dialog on main? An ID and the log line where it stops would settle it.
Pull request closed