PSVRFramework
PSVRFramework copied to clipboard
Cinematic - Screen Lock
We now know how to scale the screen however don't know how to get screen to lock into position.
It was suggested that a zoom of value '0x1a' would lock screen, I can not get it to consistently lock position. It seems that if I run the following with headset off and after it blanks the screen (due to proximity) then the screen is locked, and will not unlock with writes. If I remove the HMD, let it blank, but wake it before I run script it will unlock (regardless of screen 'distance').... something strange is going on.
ep.write('\x23\x00\xaa\x04\x00\x00\x00\x00') ep.write('\x21\x00\xaa\x10\xc0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00') time.sleep(5) ep.write('\x21\x00\xaa\x10\xc0\x1a\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
This may be something to do with having the HMD stationary (ie on the desk) before the screen position is set. Seems like there may be some time to self calibrate required.
time.sleep(5) ep.write('\x21\x00\xaa\x10\xC0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
All the test I've done were with the headset worn and it always locked fine, try 0x1B instead, maybe I displaced one byte the value, but I belive the first one is 0x1A.
It may be that some other command that you are sending is effecting/enabling the 'lock at zoom less than 0x1d'. I am power-up the unit by hand and just sending '0x21' command, I'll double check tonight.
It may also be that something the PS4 has previously set is sticky, I don't have PS4...
Ok, that may be, I ensure the device is in cinematic mode, so I send a headseton, an exitvrmode, wait 1500msec and the I send all the cinematic config. I remember now the delay, if the delay was less than a second sometimes the device seems to still be booting or calibrating sensors and doesn't apply the changes, so for safety I left 1500msecs.
Try to add the delay and if still fails try to send the exitvrmode.
Finally I reproduced it, I was cleaning the code and removed a call to entervrmode on the startup routine and then the lock was stuck. So, the "correct" way to init the psvr is: headseton, entervrmode wait 1500ms, exitvrmode, wait 1500ms, send config.
With this combination it always works.
I didn't really get a chance to play tonight, but I was able to confirm that 'lock' did NOT work with PSVRFramework util (v0.1.1), regardless of wherever I moved the size and distance sliders.
If, as you say above, entering VR mode enables lock then I don't really consider that 'fixed'... it would be nice to know a bit/byte we could set on/off to enable lock at any screen size/distance - whatever the user wants.
I don't know whether the PS4 enables VR mode and then exits it, prior to showing the console 'home screen'. I would suspect not.
I don't think there is none, the PS4 acts exactly that way, only small screen is locked, the rest is unlocked, and to me the PS4 does that, enters VR and then cinematic, it "jumps" twice the loader, but not 100% sure.
Tried again with today's release (via libusb), would not lock 'screen to face' - it remains mobile in the view. "Shutdown" button, start with button on headset chord, util finds PSVR, move sliders to anywhere/everywhere => no lock.
Again this unit has never be PS4 connected (I don't have one ;-)
Ok, I will check it again, the problem is my unit is used with a PS4, so if ther's really a setting to enable/disable it is going to be hard to veify, I will try to lock my screen and do a bruteforce to the settings report unknown bytes to see if something happens. Also I will test the mic from the headset at the same time as some of those bytes must control mic volume, not the feedback one but the output one.
2016-11-04 1:28 GMT+01:00 mungewell [email protected]:
Tried again with today's release (via libusb), would not lock 'screen to face' - it remains mobile in the view. "Shutdown" button, start with button on headset chord, util finds PSVR, move sliders to anywhere/everywhere => no lock.
Again this unit has never be PS4 connected (I don't have one ;-)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gusmanb/PSVRFramework/issues/6#issuecomment-258314000, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5cgYRMhglZPqPKCu64UI5OwqCo1Pgyks5q6nwjgaJpZM4KnmwM .
@mungewell just an stupid question, when we say "locked" it means the screen is fixed at your view's center whatever your head movements are, and released is when it stays fixed in a virtual position, right?
yes, by 'locked' i mean that image stays center in the display, regardless of where the HMD is moved.
I did find a lock trigger, however this only works when the USB connection is uplugged and plugged back in just before sending command. It switches from VR mode -> Cinematic. but locked in position, ep.write('\x23\x00\xaa\x04\x00\x01\x00\x00')
[in fact any of those last 3 bytes set non-zero has the same behaviour].
It does not work once other commands (??) are sent to the device, so if you wanted to set screen size/distance you would have to do that before you unplug.
Obviously I don't understand why the plugging makes it work, just making the observation.
So more experimentation so that it's not the '0x01' which is making it lock, it is the sequence of events.
1) Enter VR mode
2) Unplug/Plug USB -> gets 'USB' message on the screen
3) Enter Cinemode, from this point the screen is locked (at any screen size)
Screen is unlocked by entering VR mode and then Cinemode without unplugging.... maybe this is just a bug on Sony's firmware.
"It's not a bug, it's a feature" XD.
I think in this case it really is a feature, but can't fully check as my unit behaves differently, mine locks the screen when it boots up and gets locked until the unit has been worn, then the screen remains locked for some seconds and it finally releases the lock, it's like a safe recenter mechanism, until the headset is not worn by the user the sensor filters aren't feeded to get the correct gravity vector for the hmd position on the user's head. The different behavior can be because I connected my unit to the PS4 or because the firmware difference, I will recheck this weekend this behavior and fully document it as I'm going to spend all the weekend with this (yeah, a weekend without work, yay!).
Just to be clear my unit (1.50 firmware) will temporary lock sometimes when Cinematic mode is entered, but will unlock a few seconds later.
'We' are trying to find a method of a permanent lock (until you exit Cinematic mode).
Ok, I read wrong your previous post, I was a bit sleepy this morning :). The temporary lock is what this morning I described I suppose, the screen gets locked until it's worn, when you wear it then the calibration starts and after one or two seconds gets unlocked, same happens when go to vr and back to cinematic.
But about the procedure, on mine doesn't works, just tested, if I unplug the unit in VR, replug it and change to cinematic then the screen gets released, only way to totally lock it is changing the screen size. There seems to be differences on the locking functionality between the firmwares, i'm wondering if the full lock is an addition to the 2.0 firmware... would be great to know what sony changed on the 2.0 fw but I can't find any docs except the morpheus bridge code.
Yeah!
Found the lock, but you have to be in 'Cinematic mode with Gamepad'. You can then lock/unlock at will and set the screen to any size you want.
# VR mode
ep.write('\x11\x00\xaa\x08\x01\x11\x03\x11\x00\x00\x00\x00')
time.sleep(8)
# Cinemode with Gamepad
ep.write('\x11\x00\xaa\x08\x02\x00\x03\x11\x00\x00\x00\x00')
time.sleep(8)
ep.write('\x21\x00\xaa\x10\x80\x63\x32\x14\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
# Not Locked
time.sleep(8)
ep.write('\x21\x00\xaa\x10\xc0\x63\x32\x14\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
# Locked
time.sleep(8)
ep.write('\x21\x00\xaa\x10\x80\x63\x32\x14\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
# Not Locked
time.sleep(8)
ep.write('\x21\x00\xaa\x10\xc0\x63\x32\x14\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
# Locked
Great job!
So byte 0x04 is the one which locks...hmmm, that should mean that byte is a bit mask, I will check this and investigate further.
Hello Gusmanb, thank for all this work ; any news regarding the lock?