Repository navigation
feat(libSceVideoOut): answer the HMD2 bus open as the console does - #7786
Conversation
sceVideoOutOpen with bus type 0x20, the PS VR2 output PPSA05666 opens as SCE_VIDEO_OUT_BUS_TYPE_HMD2_MAIN after sceHmd2ReprojectionEnableVrMode, threw VIDEO_OUT_ERROR_INVALID_VALUE and aborted the title. The console returns that code to a process that is not a game, with the headset connected and worn or not, for users 255 and 0 and for a null or zeroed open parameter, so the bus is answered that way before the other argument checks and the title carries on with the error as its handle, as it does on the console without a headset. The debt entry records the sequence the title follows on that handle (RegisterBuffers2 with category 16 and 4000x2040 descriptors that point at Hmd2 per-eye textures, ConfigureOutput and IsOutputSupported with 0x2000F, a GPU wait on buffer 0), which a VR backend will have to model, and the test covers the bus and the HMD output modes 0x20001 and 0x2000C to 0x20010, which the console and this implementation answer with VIDEO_OUT_ERROR_UNKNOWN_OUTPUT_MODE on the TV bus. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
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.
|
|
Console log behind the measurements in the description: probe /data/vo2.txtAI-assisted: yes. |
|
Checked the diff against the description and the console measurements: bus 0x20 returns |
What
sceVideoOutOpenwith bus type 0x20, the PS VR2 output that PPSA05666 (Horizon Call of the Mountain) opens right aftersceHmd2ReprojectionEnableVrMode(0x2000F)and that its own log namesSCE_VIDEO_OUT_BUS_TYPE_HMD2_MAIN, used to throwVIDEO_OUT_ERROR_INVALID_VALUEand abort the title. The console returns that error code to a process that is not a game, headset connected and worn or not, for users 255 and 0 and for a null or a zeroed open parameter, so the bus now returns it before the other argument checks (VIDEO_OUT_BUS_TYPE_HMD2_MAINconstant). The title then carries on with the error code as its handle, as it does on the console without a headset. What a game gets with a headset attached is not measurable from a payload and is left to a VR backend.The debt entry records what the title does on that handle (captured with a local build that handed out a handle):
sceVideoOutRegisterBuffers2with set 0, two buffers, a 4000x2040 attribute with pixel format0x8100000022000000, category 16 and a null option, where each buffer entry points at a 16-byte{pointer, 2}whose pointer is the structure passed tosceHmd2ReprojectionEnableMirroringholding per-eye 2000x2040 texture descriptors; thenConfigureOutputandIsOutputSupportedwith mode0x2000F, and a GPU wait on buffer 0. The test gains the bus checks and the HMD modes0x20001,0x2000Cto0x20010, which the console answers with0x8029001Eon the TV bus, asmainalready does.Console measurements: payload
vo2run from the websrv Homebrew Launcher (app FAKE00000) on firmware 13.60, twice without and once with the PS VR2 connected and worn; log attached.Tested
mainc4d6dbe:libs,guest_video_out_output_mode_testsandpatched_libraries_testsbuilt;ctest -R "guest_video_out_output_mode|patched_libraries"2/2 passed.main64a9caa: same targets built, same two tests passed.sceVrTracker2Initializeand the Hmd2 reprojection stubs so the title reaches this point):sceVideoOutOpen(255, 0x20, 0, nullptr)returns0x80290001and the title logs it and carries on; it now stops at its next call,sceVideoOutRegisterBuffers2with that error code as the handle, which throwsinvalid output handlehere (the console's answer to that call is not measured).tools/check_conventions.py --base origin/mainandtools/pr_overlap.pyclean (the PRs sharingOutput.cpp,VideoOutDriver.hpp, the test and the debt file implement other things).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code