dylanmckay / psvr-protocol

Breakdown of the PlayStation VR communication protocols for programmers
Creative Commons Attribution 4.0 International
12 stars 2 forks source link

psvr-protocol

Breakdown of the PlayStation VR communication protocols for programmers.

This Wiki is hosted on the web at dylanmckay.io/psvr-protocol/. This site automatically tracks the master branch.

It can be edited at github.com/dylanmckay/psvr-protocol

Foreword

This wiki is an attempt to collect all available and useful information for developing programs that interact with the PSVR.

As the protocol itself is not officially documented, all information collected is the result of reverse engineering.

This means that much of the terminology used will vary across sources, such as the names of commands and fields.

The goal of this project is to be the canonical reference for all things related to PSVR hacking.

Contributions and modifications to this repository are strongly encouraged! Information for contributors can be found here.

External projects and resources

In no particular order

The parts

The PSVR comes with two main components - the actual headset, and a small processing unit that handles most of the logic. These two parts are required - the headset cannot function without the box.

The processing unit

This device sits in-between the headset and the computer.

The processing unit has multiple IO connections

psvr processing unit

The headset

Properties

Property Value
Full resolution 1080p (1920x1080)
Per-eye resolution 960x1080 (screen divided in half widthwise per eye)
Color mode RGB 4:4:4
Inertial measurement unit BMI055 (6 degrees of freedom)
Lens to lens distance 63.1mm
Lens center to viewer baseline 39.48mm
Screen to lens distance 35.4mm
Distortion factors (K1 & K2) 0.22, 0.24

Credit to Agustín Bernad on GitHub for calculating the lens properties here.

psvr headset

The basics

There are two connections that need to be established.

First, a USB connection must be made with the PSVR processing unit. The processing unit itself acts as a USB HID device to the host computer.

The PSVR will not display any video unless the correct initialisation commands are sent via USB.

Secondly, an HDMI connection must be established with the processing unit. Depending on the display mode, barrel distortion may need to be applied to the image in order to correct for the curvature of the lens.

A full explanation of the connection methods:

Note on projects that do not use USB

Some projects (such as the MacMorpheus video player) avoid all USB communication by having an powered-on, idle PS4 connected to the processing unit via USB. This sucks because it is a pain having a PlayStation hooked up to your system. This setup also can only be used in cinematic mode