feat(libSceHmd2): report the uninitialized library from the device exports #3820
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3820"
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 13hourstilliland on 2026-10-11T17:13:23Z.
What
Picks up #3242 by @dantdmdarealguy (auto-closed by the intake pause), rebased onto current main with no changes.
sceHmd2Initializestill fails because there's no PS VR2 runtime, so the library stays uninitialized. Open, Close and SetVibration now returnNOT_INITIALIZED(0x8A720002) instead of throwing. GetDeviceInformation and GetFieldOfViewWithoutHandle returnPARAMETER_NULL(0x8A720008) for a null output andNOT_INITIALIZEDotherwise. Signatures follow PS5VR, error values follow KytyPS5 in the observed 0x8A72 facility, and the Initialize placeholder moves to 0x8A720016. A new Hmd2.hpp holds the constants and struct layouts, with static_asserts. The reprojection exports get their signatures but still throw, because their headset-less console behaviour is unknown. Sources and open questions are in TechnicalDebt.Tested
Linux x86-64, GCC 14, Release, BUILD_TESTING=ON. guest_hmd2 passes, and check_conventions and check_test_registration pass. Not tested with a title.
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 github-actions[bot] on 2026-10-11T17:13:45Z.
Progress report (
436e310→563666b)📈 System libraries: 86.6% (+0.15%, +5 implemented functions)
✅ 5 implemented
sceHmd2ClosesceHmd2GetDeviceInformationsceHmd2GetFieldOfViewWithoutHandlesceHmd2OpensceHmd2SetVibrationImported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T19:38:16Z.
Trial-merging this against #3537 gives two content conflicts, both resolvable by hand. In
core/libs/prx/libSceHmd2/Export.cpp, this PR appends nine new stub exports while #3820 both rewrites the signatures of the neighboring existing exports (sceHmd2Open,sceHmd2Close,sceHmd2GetDeviceInformation,sceHmd2GetFieldOfViewWithoutHandle,sceHmd2SetVibration, and the reprojection entries get typed parameters andSizeAlignreturns) and adds its own exports at the same tail — no export name is duplicated between the two PRs (verified by diffing the added function lists), so whoever rebases second keeps both sets and takes the rewritten signatures from whichever PR landed first. Indocs/dev/TechnicalDebt.md, both PRs reword the same libSceHmd2/PPSA01317 bullets, so the rebased version needs to merge the two wordings rather than pick one. No same-exports overlap, so it is a positional merge, not a design one.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:17:42Z.
Which title calls
sceHmd2Open,sceHmd2Close,sceHmd2GetDeviceInformation,sceHmd2GetFieldOfViewWithoutHandleorsceHmd2SetVibrationaftersceHmd2Initializehas failed? PPSA01317 skips its VR set-up at that point, and the0x8A72values come from KytyPS5, not from a console. With the title ID and the log line where it stops on main this can go in; otherwise I'll close it until one does.Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-12T07:36:18Z.
No title log line from me: PPSA01317 skips its VR set-up when
sceHmd2Initializefails, and I have no other title that reaches the Hmd2 device calls after a failed initialize — which is your point: on the only title anyone has checked, the console path never reaches these calls on main's behaviour.The change still replaces main's throws on the libSceHmd2 device exports with PS5VR/KytyPS5-sourced code paths, but if no title reaches them, there is nothing observable to pin. Close until one does is fine.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:32:37Z.
Closing as agreed in the thread: no title is known to call
sceHmd2Open,sceHmd2Close,sceHmd2GetDeviceInformation,sceHmd2GetFieldOfViewWithoutHandleorsceHmd2SetVibrationaftersceHmd2Initializefails (PPSA01317 skips its VR set-up there), and the0x8A72values come from KytyPS5, not from a console. The branch also conflicts withmainnow.Feel free to reopen, rebased, with the title ID and the log line where it stops on
main.Pull request closed