HENkaku is a native Homebrew Enabler for the PS Vita and PS TV. It lets you run homebrews on the PS Vita
#419575 by OperationNT
Sat Aug 19, 2017 3:27 pm
Description

PlayStation TV driver for DualShock 3 and 4 controllers completly ignore their gyroscope and accelerometers values. Therefore, games which require some motion control cannot be played.

DSMotion plugins allow to fix this limitation. It is separated into a user and a kernel plugin.

Installation

In order to activate those plugins featues, you must edit your `ux0:tai/config.txt` file:

Code: Select all*KERNEL
ux0:tai/dsmotion.skprx

*TITLEID00
ux0:tai/dsmotion.suprx


Replace TITLEID00 by a title identifier which needs motion control or by ALL to affect all titles.

Limitations

- If a DualShock 3 controller is used, it must not be directly plugged with USB on the PS TV (use an external charger).
- Computed orientation is wrong when the controller is turned upside down (it could happen in a game when you try to look too verticaly high).
- Some games could be perceived like they have inverted horizontal controls (specially during FPS and TPS viewpoints) but it is a wrong impression (on a real PS Vita, tilting the device on the left also makes the view goes to the right and vice versa): if you can, please check games behavior on a real PS Vita before reporting any issue on this subject.

Please read all other limitations in "README.MD" before reporting any issue!

Download link

https://github.com/OperationNT414C/DSMo ... es/tag/1.2
Advertising
Attachments
(21.82 KiB) Downloaded 52 times
Last edited by OperationNT on Thu Aug 24, 2017 10:13 pm, edited 3 times in total.
#419586 by stranno
Sun Aug 20, 2017 11:32 am
Thanks much OperationNT. It is one of the most useful plugins i've tried so far.

Some test i've been doing: https://www.reddit.com/r/vitahacks/comm ... your_pstv/



Some recommendations:

- Option to set the sensibility: Its maybe too high. Some games can internally set the sensibility, like Wipeout, but most games dont have this option. Virtua Tennis 4 VR mode is barely playable because the camera is shaking constantly xD.
- Option to invert each axis. In some games the axis work properly but, in other games, the X axis is inverted, like in Gravity Rush, Escape Plan or Virtua Tennis, making them really hard to play. I also dont like the inverted Y axis in some games but i can deal with that.
Advertising
#419587 by OperationNT
Sun Aug 20, 2017 4:35 pm
Impressive tests!
It changes from most of my tests where I create a homebrew which just outputs a bunch of numbers for simple comparison with a PS Vita (see the attachment "SensorTest.zip"). ;)

About inverted axis, I could make some tests on Gravity Rush (because I own this game) and unfortunatly, it uses the orientation quaternion I talked about in the limitations part (which accurate fix would require someone skilled in maths/IMU controls). However, I invert the computation logic to get it work in this case: you can get this fix in the attachment "dsmotion_user_invaxis.zip". If you have some time, could you perform some quick tests with this version?
If it repair more things than it brokes, I will officially publish it. :)

By the way, I noticed that original titles work too: I put this limitation because, long time ago, when I wrote output for FakeCamera plugin, it failed on original titles but it was probably due to some missing rights for those titles which were removed once the title was dumped.
However, if I add some "per title" settings for sensitivity, I will probably fall again in this missing rights issue (because it would involve reading some files official titles cannot).
Attachments
(2.37 KiB) Downloaded 57 times
(48.43 KiB) Downloaded 58 times
#419588 by stranno
Sun Aug 20, 2017 4:46 pm
This fix for Gravity Rush is more than welcome. I will try later.

I'm testing Uncharted for now, i'm doing another run of the game and maybe the savestates can help you with the FakeCamera plugin. I need to check again if the light puzzle gets resolved again or it was a savestate glitch or something.

IDK how orientation math work but, cant you handle the orientation of the axis in gamepad side? Instead of changing the game behaviour. Axis "remap" or something like that.
#419589 by OperationNT
Sun Aug 20, 2017 5:29 pm
Ok, thank you for your tests!

About orientation, if I cannot find a generic solution, it will probably requires "per game settings" (which would have the same constraint as I said in the previous post).

There is also one last thing: there is a rotation matrix and I don't know if it's row major or column major. This matrix doesn't seems to be looked by Gravity Rush but maybe other games look at it. If you still have some issues on some games with the "dsmotion_user_invaxis", can you test "dsmotion_user_invaxis_transpmat" which transposes the matrix?

PS : The user plugin "dsmotion.suprx" doesn't require system restart when it is changed (only the kernel plugin requires a restart).
Attachments
(2.37 KiB) Downloaded 55 times
#419606 by OperationNT
Mon Aug 21, 2017 9:55 pm
New version 1.1 released: It officially includes the vertical control fix.
https://github.com/OperationNT414C/DSMo ... es/tag/1.1

Unfortunatly, I discovered that the PS Vita seems to own a "magnetometer" that DualShock controllers will never be able to simulate. This magnetometer seems to be activated by some games which have inverted horizontal controls. I will try to analyse this feature activation patern and see if it could be use to "revert back" horizontal controls.
#419607 by stranno
Mon Aug 21, 2017 11:43 pm
I haven tested more stuff yet but thanks for your work. I will quote here my post in the FakeCamera thread.

stranno wrote:I have played though the game, again, and its perfectly playable on PSTV thanks to you.

All tilt minigames, including the river, work properly and X-axis are not reverted.

Light puzzle gets resolved automatically but, again, i'm not sure if it is because FakeCamera or it is the normal behaviour of the game (maybe a memory patch to a never ended compatibility update with this game from Sony) in Playstation TV. Once resolved and saved it will get resolved again no matter what so i cant try again without the plugin :?

I will upload the decryted savestate later.

Edit: Here is. It is for the PCSA00029 version. Dumped through vita-savemgr Nightly 144. Infamous river level is Level 12 (you start right there if you choose the level), camera puzzle is level 13 (same with this) and level 14 have a balance mini-game that is impossible to glitch (the first balance minigame, after a few minutes in the level).

https://1fichier.com/?g69dacd58t (it is a hotlink).

All the other balance mini-games can be glitched in order to past through them without doing the motion stuff. Its hard because it is one precise spot in each log but it can be done, i did it time ago.

Anyway, the game works perfect now.

I dont know if you can try the light puzzle level in Uncharted but i'm 99,9% sure that the puzzle gets resolved without any hack at all. Maybe you can debug it to see whats going on :mrgreen:
#419615 by OperationNT
Tue Aug 22, 2017 10:45 pm
Hello,

It is not currently an official build but I manage to fix inverted horizontal axis issues. In fact, I used wrong quaternion formula that was why the axis were inverted and also why some movements were so "rough". I tested Gravity Rush and now, gravity slide (touch the 2 corners of the touch pad to activate this Kat's move) is much more playable!

Before I make an official release, I will try to see if I can integrate this code to manage all moves from controller:
http://www.pieter-jan.com/node/11
I hope it could finally feel like a real PS Vita motion sensor.

Have fun!
Attachments
(2.56 KiB) Downloaded 59 times
#419616 by nightwishfan1
Tue Aug 22, 2017 11:16 pm
I been waiting for something like this, and now I can't wait for the next version release seeing as how it supports original game cards as well it seems. Reason I say this is cause I have Uncharted Golden Abyss game card, and I'm hoping this plugin will work with it once you optimize it further. Thanks for the work on it.
#419617 by jj96
Wed Aug 23, 2017 1:01 am
Hi,

I have taken a look at your source code and I believe I may have a solution to the random horizontal acceleromter inversion issue. I have noticed that this issue appears somewhat randomly in games, and I believe that one of the (otherwise unused) back triggers could be used to invert the horizontal tilting data. The data stored in accel[1] could invert when trigger is held down, and uninverted data could be stored in accel[1] upon release of the trigger. I believe that functions of "psp2kern/ctrl.h" could be used to check for trigger input, specifically the ksceCtrlPeekBufferPositive() function. I am currently reading vitasdk documentation so that I can implement this in the "kernel\main.c" . Let me know if i am on the right track, as i am inexperienced with vitasdk kernel calls.

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests