Vr compatibity? #7649
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 elimgolden on 2026-10-18T19:36:21Z.
Hello, I was wondering if you guys plan to add vr game compatibly so pcvr users can experience psvr exclusives, thanks!
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T19:49:42Z.
The current code does not support PS VR2 gameplay or PC VR headset passthrough.
libSceHmd2reports that no headset is detected; reprojection and gaze exports, and thelibSceVrTracker2exports, are not implemented, while the VR setup dialog reports cancellation. That means titles which require VR setup are likely to skip it or stop rather than render stereoscopic output. I do not know of a scheduled VR implementation. If you have a specific PS VR title and expected PC headset/runtime in mind, please share them; that would help scope a concrete compatibility request.Imported from boykopovar/AnyPS5. Originally posted by elimgolden on 2026-10-18T20:21:52Z.
Target Headset: Meta Quest 3 (via PCVR streaming / OpenXR)
Preferred Runtime: OpenXR
Target Title for Compatibility Scope: Horizon Call of the Mountain
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T20:27:40Z.
Thanks, that scopes the target. The current VR-related PRs (#7394, #7399 and #7463) cover setup-dialog status/close behavior and Tracker2's pre-initialization response; none adds OpenXR device/session setup, stereo swapchain output, pose tracking or reprojection. I do not have a change that would make Horizon Call of the Mountain playable yet.
Which host OS and OpenXR runtime do you want to target with the Quest 3 PCVR connection? That will determine which runtime integration this request needs.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T22:53:53Z.
I added a short user-guide note in PR #7685: PS VR2 and PC VR headsets through OpenXR are not supported, and title startup without a detected headset should not be read as VR gameplay support. The note reflects the current Hmd2/reprojection implementation; it does not add headset support.
Imported from boykopovar/AnyPS5. Originally posted by elimgolden on 2026-10-18T22:58:02Z.
Ok thanks!
Imported from boykopovar/AnyPS5. Originally posted by T3cm0 on 2026-10-18T23:57:44Z.
I would like to work on this, and I'd rather agree on the shape before writing code. I have a PS VR2, Sony's PC adapter and a jailbroken PS5 to measure against.
Target. Windows first, SteamVR as the OpenXR runtime (through Sony's PlayStation VR2 App). Talking OpenXR rather than the headset directly means a Quest 3 over PC VR streaming would work the same way, which is what this issue asks for.
Proposed shape.
3rdparty/, built from source like the other dependencies.libSceHmd2reports a connected headset with the runtime's panel size and field of view, and its reprojection exports present the two eye buffers to OpenXR swapchains;libSceVrTracker2fills its results from the runtime's view and controller poses;libSceVideoOutaccepts the HMD output modes (PPSA05666 asks for 0x2000F);libScePad's VR controller exports map to the Sense controllers through OpenXR actions;libSceVrSetupDialogstops reporting cancellation. Eye tracking would come fromXR_EXT_eye_gaze_interactionwhere the runtime exposes it (Sony's PC adapter does not; third-party drivers do).Method. The same as #7463 and the Hmd2 size queries: measure the console where a payload can (the pre-initialization behaviour is being swept now), and capture under AnyPS5 what titles pass to each export (PPSA05666's whole VR set-up sequence so far: VrTracker2 query and initialization, then Hmd2 reprojection initialize, mirroring and 0x2000F VR mode). What the console answers once a headset is attached cannot be measured from a payload, so the connected-headset path would be AnyPS5's own behaviour, documented as such in the debt files.
Order. Open the HMD video output and present black to the headset first (PPSA05666 stops at
sceVideoOutOpentoday), then head pose, then controllers, each as its own PR.Does this fit how you'd want it done, and would you prefer a design issue or a draft PR to discuss the details? AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by elimgolden on 2026-10-19T00:06:39Z.
That sounds like a really good plan, if you want to do it I’m not stopping you but that sounds really hard, if you want some testers I would open a thread on the flat to vr modding server.
Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T18:22:50Z.
@T3cm0, for the PPSA05666 part of your plan: over the last two days I took Horizon Call of the Mountain (PPSA05666, v01.004.011) through its PS VR2 set-up on a local tree (
main324e0e48e+ #7658 + #7690 + #5499 plus environment-gated fakes, none of it meant as code for upstream) to see what the title passes and reads at each step of your order. It now renders its headset calibration screens and takes gaze and controller-beam input on them. Notes per library in your order; the layouts come from the title's own code (unwrapped eboot, radare2) and were then confirmed by runs. Today on plainmainf52509accit stops earlier, onsceHmd2ReprojectionSetAllowPositionalReprojection(details on #7658), because initialization now fails and the title carries on regardless.libSceVideoOut, HMD output. The title opens
sceVideoOutOpen(SCE_USER_SERVICE_USER_ID_SYSTEM, 32 /* HMD2_MAIN */, 0, nullptr)and registers two buffers withsceVideoOutRegisterBuffers2in buffer category 16, attribute 4000 x 2040, pixel format 0x8100000022000000, tiling 0. Behind each buffer pointer is a 16-byte {entries pointer, count 2}, one entry per eye; each 0x80-byte entry holds AGC T#s, the first one the eye image (bases 0x8fd4020000 and 0x8fd6020000, 64 KiB aligned, 32 MiB apart, 4000 x 2040), then smaller per-eye tables. Registering the first T# base of each as the display buffer was enough for the title to continue; it then callsIsOutputSupportedandConfigureOutputwith 0x2000F andsceHmd2ReprojectionEnableVrMode(0x2000F). I never saw it flip to that port itself.libSceHmd2, per frame. After the set-up (
SetAllowPositionalReprojection(2, 0x100000001, 1), the size queries,ReprojectionInitialize,SetMirroringOption,EnableMirroring,SetRenderConfig(1, 0, 0),EnableVrMode), every frame callsReprojectionGetPredictedDisplayTimeabout three times,ReprojectionBeginFrameandReprojectionSetParamonce each, andGazeGetResultForFoveatedRenderingonce.sceHmd2GazeGetResultis only reached once the tracker returns a result (next point).libSceVrTracker2.
RegisterDevice(type, handle)is called three times: type 0 with handle 0xe010000 (the headset), type 2 with the left Sense controller's pad handle and type 1 with the right one's (the handles the title got fromscePadOpentypes 3 and 4, below). ThenGetResult(param, result)for all three every frame, from one function (0x4b7f030 in the eboot):GazeGetResult(param, result): param 0x10 bytes (+0 size, +4 headset handle, +8 display time), result 0x38 bytes: +4 status, +0x10 valid, +0x14..+0x1c gaze direction (-z forward), and two per-eye flags at +0x28 and +0x34. Gaze selection on the first calibration page only works when both flags are set (3 of 3 runs, 1 of 6 without).libScePad, Sense controllers. The title opens them with plain
scePadOpen(userId, 3, 0, nullptr)and(userId, 4, 0, nullptr), notscePadOpenExt, and on today'smainkeeps the INVALID_ARG code as the handle.scePadVrControllerReadState(handle, state)fills a 0x68-byte block (the title copies exactly that much as its previous state): +0 button dword with the standard SCE pad bits (left controller L3, L2, L1, triangle, square; right controller R3, options, R2, R1, cross, circle), +4 / +5 analog bytes (the second inverted), +8 / +9 bytes, +0xc touch mask, +0x10..+0x13 bytes, two float triples at +0x14 and +0x20 (motion, not the pose), +0x40 bit 0 = connected (the device is not registered without it), +0x60 a u64 timestamp. The pose comes from the tracker, not from this block.GetDeviceInformation(handle, info, 0)is 0x20 bytes (the title reads +0 and +4);GetTriggerEffectState(left, right, out)writes two dwords. Unreal's controller pose query (0x1109310) runs about 3.5 times per controller per frame and requires ReadState to succeed with the connected bit before it asks the tracker.Rendering on the way. The first frame has a
DB_RENDER_CONTROL0x84 depth copy (#6304, #5499) followed by a 0x88 stencil copy (details on #5499); with both handled the title renders.What the calibration flow needs (useful as an acceptance test): page 1 "set gaze tracking on or off" is confirmed with the gaze straight ahead plus cross; page 2 "select your playing position" with the right controller's beam (R2) on SEATED or STANDING plus cross; page 3 "calibrate your position" waits for a controller press, where I stopped. Two things to watch: with my HMD-port mapping the window only refreshed when the head pose changed, one pose behind (probably my mapping of bus 32, not the title); and about one run in three dies within 60 s on the title's async loading thread right after its third save-data mount once the devices register (an Unreal out-of-memory of 0x7FC0000000 bytes or "BulkData compressed header read error"), which I have not traced.
The reports with run tables, register dumps and the local diffs are available if any of this helps; I can also run your PRs against this title on the 4090 as they come.
AI-assisted: yes (Claude Code)