RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
14.55k stars 1.85k forks source link

PSMove: initial support emulate psmove with mouse handler. #6596

Closed Zangetsu38 closed 4 years ago

Zangetsu38 commented 4 years ago

After used my long test with implemented real PSMove tracker for understand how use this for implemented function pos.

For tester, button on mouse is:

Configuration request

image

vsub commented 4 years ago

Will this eventually allow Ar Tonelico Quga "shaking the gamepad" to work with the mouse? I tried it but nothing happens(if I set everything right)

legend800 commented 4 years ago

Works great here (wish there was a way to shake): 2019-09-21 09_16_38-FPS_ 41 51 _ Vulkan _ 0 0 7-87f66a8d-psmove-mouse _ THE HOUSE OF THE DEAD 4  NPU

How to navigate - is there ANY other input besides the 3 mouse buttons? 2019-09-21 09_20_53-

HOD Overkill hangs with Move Handler = Mouse. With Fake, it loads fine, like master, so no regression: 2019-09-21 09_19_59-Window

Can't test - broken on master too. This PR broke the game: https://github.com/RPCS3/rpcs3/pull/5688 2019-09-21 09_21_36-Window

Zangetsu38 commented 4 years ago

For HOD test it with fake psmove in master for compare

legend800 commented 4 years ago

Confirmed it only hangs with Move Handler = Mouse. With Fake, it loads fine, like master, so no regression. Updated post.

Sucks that Time Crisis was broken 5 days ago since I think that's the one rail shooter that will work perfectly with the current ps move implementation. Although, US ver. needs Triangle instead of X to calibrate PS Move. Can you enable a way to alternate or map Triangle somewhere else? Regression logged here: https://github.com/RPCS3/rpcs3/issues/6608

You should note that additional input - like menu navigation - can be done by Pad 1.

Zangetsu38 commented 4 years ago

for me i get here image but calibrate not works

legend800 commented 4 years ago

Strange. Only boots if I set move handler to null. Maybe it's a US vs non-US version of game.

toccata10 commented 4 years ago

I was hoping for this to revive some railshooters. Thanks for your work. It allowed me to see a bit of Maddog for the 1st time: the haircross moves, I can shoot. If I'm in Fullscreen, I can reload by firing outside the screen. Unfortunately, after some time, either: the game freezes (it's still on, but you can't go to the next sequence) the mouse stops controlling the haircross (and the firing) But it looks like it's the most playable for now (compared to other railshooter games) Capture_067 A few other tests: Hotd4: can't reload, so the game ends quite quickly. Hotd overkill: by middle clicking, I can get past the calibration and launch a mini-game. In the mini-game, the mouse doesn't respond. Capture_069 Capture_071

RiasatSalminSami commented 4 years ago

Yeah, it works very well. There needs to be some functions for shaking too. Some games reload by shaking like house of dead 4 and on hod4, some parts of the levels can't even be progressed without shaking.

So there has to be a way to assign keyboard and mouse buttons for Psmove.

Lmb= Trigger= Shoot Rmb= Shake = Reload/ Aim outside and shoot= Reload

And so on.

Without the ability to emualte Psmove shaking and assign the buttons, it's gonna be very limited. However, very good progress.

Edit: Cursor also seemed to lag badly if used on fullscreen.

RiasatSalminSami commented 4 years ago

for full screen is normal, you need re calibrate cursor for that, but i working on one things for can keep same calibrate any resolution using. for shake i need more search ^^

Hmm I see. So the stuttering occurs for change in resolution? I can't see my mouse cursor in fullscreen though, so I can't calibrate in fullscreen.

Yeah, PSmove has accelerometer which detects the shaking.

legend800 commented 4 years ago

Now that Time Crisis is fixed, I gave it a go with this PR. Unfortunately, the US version is unplayable as it needs Triangle mapping for calibration and it won't let you play unless calibrated.

Is there anyway to map Triangle to something else or allow keyboard mapping in addition? Maybe a setting in the config file even? Could you post a build maybe with Triangle instead of X button for further testing in the meantime?

2019-09-24 08_20_34-FPS_ 60 03 _ Vulkan _ 0 0 7-e0b90b7c-psmove-mouse _ TIME CRISIS_ RAZING STORM  B

2019-09-24 08_23_47-Pull Requests · RPCS3_rpcs3

Zangetsu38 commented 4 years ago

@legend800 press Triangle on ds3 input not works ?

legend800 commented 4 years ago

Tried, unfortunately input is not recognized by other devices here, only the device being calbrated. :(

Zangetsu38 commented 4 years ago

@legend800 i see, after confirm calibrate i can use circle for back on menu, but is diferent so hmm

legend800 commented 4 years ago

Yep, input is locked to single device in the cali screen. BTW, this is Wes from discord. ;)

Zangetsu38 commented 4 years ago

re test needed, you can now change size game window and no need recalibrate or other things

Zangetsu38 commented 4 years ago

@legend800 retry please for your USA version of time crisis, and use press Midle click + right click for triangle.

legend800 commented 4 years ago

Nice! Works great BUT I can't escape cali screen without O button as well unfortunately. I can confirm cali screen now, but then it just takes me back to cali other pads instead of proceeding to main menu. See below screens.

SO, can you do that trick on the Middle click + left click for O button? Then we would have X, O and Triangle all accessible. :)

2019-09-26 20_12_38-FPS_ 59 88 _ Vulkan _ 0 0 7-14549b3e-psmove-mouse _ TIME CRISIS_ RAZING STORM  B

2019-09-26 20_10_10-FPS_ 34 11 _ Vulkan _ 0 0 7-14549b3e-psmove-mouse _ TIME CRISIS_ RAZING STORM  B

legend800 commented 4 years ago

Scratch the above request - you can use other controllers to exit the screen thankfully - in my case I use Pad1 for O button to exit.

Also, you already have Middle click + left click mapped - Start button! Which actually is required for all the titles in Razing storm to skip cinematics, pause and most importantly, continue after dying.

So don't touch a thing, everything seems perfect now, and all required button functionality is accessible. Nice work! Hopefully you can get it reviewed and merged soon.

Zangetsu38 commented 4 years ago

Is now Ready for review

dudesh34 commented 4 years ago

Hi, what i need to put in pad and in i/o settings for this to work? thanks. i will try it with a dolphin bar and will update.

Zangetsu38 commented 4 years ago

Hi, what i need to put in pad and in i/o settings for this to work? thanks. i will try it with a dolphin bar and will update.

eu what ? juust set Mouse on I/o tab inside PSMove handler, and that all, and dolphin bar ?

legend800 commented 4 years ago

It actually needs 3 settings changed to work: 2019-09-27 18_59_36-Settings

Zangetsu, you should consider updating those tooltips on that window at some point to show that it IS now implemented (says ps move is not supported currently).

toccata10 commented 4 years ago

This morning, I made some tests with all the railshooters I know on ps3. Results:

*Deadstorm pirates (NPEB00409): Combined with a pad configured, I'm able to enter the menus (for example, I press the Circle on my controller to avoid connecting to Playstation Network), do the calibration and enter the mode selection (pressing circle). The mouse is recognized as "Calibrate Motion Controller n°7" When in full screen, I can't see the mouse pointer, so I can't calibrate. When the window is maximized, it's working well. Whell I'm in fullscreen, I must make big moves with the mouse to move the crosshair. I tried to increase "mouse acceleration" to 20 and deadzone to 0, but it didn't change anything. The crosshair moves slowly when in fullscreen. I'm on a 4k screen (don't know if that's relevant). The game plays nicely (remember to active "write color buffers").

Mad dog mccree: calibration ok, no slowdown in fullscreen. I'm able to reload the gun in fullscreen by firing outside the screen. Pb: Game freezes while in the main street. Maddog 2 & The last bounty hunter: same behaviour. *Fast Draw showdown: can't calibrate (the crosshair stays on the left side). Strange as it seems the same engine as MadDog.

Heavyfire: afghanistan: stuck on "select profile-player 2" Heavyfire: shattered spea: stuck on "select profile-player 2"

*Men In Black: alien crisis: can't navigate the menus with the pad. I'm able to launch a game, but it asks to press L1 which I can't.

*House of the Dead 3: very similar to Deadstorm pirates: calibration ok, but cursor very slow in fullscreen. Reload is automatic. With Vulkan: poor performance and exploding vertices. With Ogl: ok. It played nicely with window maximized until the mouse stopped controlling the crosshair (the game was still playing, but I had no control)

*House of the Dead 4: looks like hotd3: performance is much better in Ogl. Pb is you can't reload (you need to shake the gun for that).

*House of the dead overkill: for the calibration, I can fire with the Middle click (X button), not the left one. The control works until I launch a minigame: it stops responding then. tried with and without WCB: no change.

*the shoot: can't calibrate

*time crisis: razing storm: can use the mouse and a pad to navigate the options. Crosshair speed is good in windowed and fullscreen. I can play the game (reload with the right button). It played nicely until the mouse stopped controlling the crosshair (the game was still playing, but I had no control).

*time crisis 4 BLUS30093: mouse not recognized.

resident evil darkside chronicles: it loops on the calibration screen. Can't use a pad to go back. resident evil umbrella chronicles: same

Zangetsu38 commented 4 years ago

thx for your test, i know is not pertfect

Andryshik345 commented 4 years ago

Sports Champions 2 asking for PS Eye connecting, Sports Champions is softlocks just after logo. изображение RPCS3.log.gz

Zangetsu38 commented 4 years ago

for sport champion 1/2 ignore it, it not can works with mouse, need obligatory real psmove

Zangetsu38 commented 4 years ago

good news, founded what function is used for resident evil, exactly like i have thinks image image this both game need little trick for good calibrate

Zangetsu38 commented 4 years ago

@toccata10 pushed, with news change, you can news try both resident evil, works for me perfect after understand how good calibrate

toccata10 commented 4 years ago

I wonder what is the trick to calibrate in resident evil ? How do press on Circle to exit the calibration screen ?

Zangetsu38 commented 4 years ago

I wonder what is the trick to calibrate in resident evil ? How do press on Circle to exit the calibration screen ?

@toccata10 look description for circle, and for calibrate is special, no press triger in center screen, but in little decaled up right in end circle like that, if you calibreate normally, you set psmove cursor in center, and repress T for re calibrate result

Here repress triger

I am not sur i can fix that, probably same with real psmove

but this shift is provided by the initial click before clicking on the target, so just adapt it and it's perfect, which puts it slightly higher left of the center, after several times it's easy to got there first time

for second game is very easy, because first calibrate already show target, so just click here for first click

Zangetsu38 commented 4 years ago

@toccata10 you can test again please, on resident evil serie ?

toccata10 commented 4 years ago

I was stuck because I didn't see that left+right sent "circle". So, ok, it's working. Nice. About the cursor being very slow in fullscreen, here's a workaround: with the mouse, click on an area near the center instead of click on the target (see the red spot). Capture_076b

I can't remember exactly but I think that I can't throw grenade because I have to press 2 buttons (left+right ?) but as it's associated with circle, it doesn't work. Nice work you've done. An idea (if that's possible): allow the keyboard to send some presses (instead of combinations middle+left,...).

No luck with time crisis (with the razing storm edition, as it's the only one supporting psmove): I can't move the haircross in the game (but I can calibrate).

Zangetsu38 commented 4 years ago

@toccata10 Yes, i know i thinks for found solution for this 🤔

dudesh34 commented 4 years ago

do i need to asign mouse movements and buttons in pad or just the after make the settings in i/o? or not to touch anything in pad?

legend800 commented 4 years ago

Just settings in I/O.

In additional, you can use the Pad, mapped to keyboard, to do generic actions (like main menu nav).

Zangetsu38 commented 4 years ago

for pad is bad idea, is like fake actually that coded problem and conflict with ds3 pad, i can only use so mouse + keyboard

toccata10 commented 4 years ago

A bit more testing: Razing storm [blus30528] contains 3 games *Razing Storm: time crisis Need a pad configured Navigate menus (arrows) with keyboard or pad, validate with mouse Once calibration is done, it's a bit difficult (for me) to press middle+right to send Triangle, so I first press right, then middle while maintaining right. After that, I press circle on the keyboard. I launch the game. To bypass the cinematic: left+middle. After that, it's ok: left to fire. Right to reload. Ok but freezes after some time (the mouse no longer controls the haircross)

Time crisis: Same calibration. Choose "Motion controller 7". Works fine but freezes after some time (the mouse no longer controls the haircross)

Deadstorm pirates Same calibration Plays nice. Didn't freeze.

dudesh34 commented 4 years ago

thanks for all the updates, cant wait for mor improvments:)

dudesh34 commented 4 years ago

Hi, is there a new update to download? new fixes? thanks.

toccata10 commented 4 years ago

I've tried playing Deadstorm on Linux with a wiimote: it's rather cool. Thing is: it randomly stops considerig the mouse after a while: the game is still running, but the cursor doesn't answer to the mouse anymore. Same behaviour in Razing storm. I uploaded my (big) logfile, just in case someone can find a clue in it: https://www.dropbox.com/s/426bajbwgusj76j/RPCS3.log-deadstorm.gz?dl=0

Zangetsu38 commented 4 years ago

@toccata10 i have not see this issue for moment, play How long before get this ?

toccata10 commented 4 years ago

It depends: I played 1 mission in Deadstorm, then I started another one and it froze a few seconds after that. With Razing storm, it froze quite quickly (after 2-3 minutes in the play). It seems random.

toccata10 commented 4 years ago

Another test this morning running through gdb: I launched Razing Storm. After calibration, I started the game: it crashed on "loading". Here's the backtrace: (gdb) bt

0 0x00000000424de484 in __0x6c842c ()

1 0x000000000070c7ff in ppu_thread::exec_task() ()

2 0x000000000070cf56 in ppu_thread::fast_call(unsigned int, unsigned int) ()

3 0x0000000000712b0f in ppu_thread::cpu_task() ()

4 0x00000000009c117f in cpu_thread::operator()() ()

5 0x00000000007068f6 in named_thread::entry_point(void*) ()

6 0x00007ffff78cf4cf in start_thread () from /usr/lib/libpthread.so.0

7 0x00007ffff57f22d3 in clone () from /usr/lib/libc.so.6

(gdb)

legend800 commented 4 years ago

Ive never had those issues and I'm not convinced they're related to this pr. The games and input are perfectly stable for me on long play throughs.

Good luck getting this merged soon!

elad335 commented 4 years ago

Need to solve conflicts.

toccata10 commented 4 years ago

Just tested Razing Storm again: same behaviour: Ok but freezes after some time (the mouse no longer controls the haircross).

legend800 commented 4 years ago

Never experienced that issue. Hard to say if 100% related to this implementation. I tried the latest build and like with every previous build, input never cut out, even after playing half the game (beat 2/ 4 stages). It was perfect and I hope we can just merge this finally and continue to iterate on it.

2019-12-01 17_55_22-

2019-12-01 18_08_59-FPS_ 59 95 _ Vulkan _ 0 0 7-3c48881a-psmove-mouse _ TIME CRISIS_ RAZING STORM  B

AlphaDelta9 commented 4 years ago

Tested BLUS30528TC4 freezes after long time, mouse no longer control the crosshair and RPCS3 stop responding. Already lost 2x my progress at Stage 2 (maybe around 40 minutes play)

legend800 commented 4 years ago

@AlphaDelta9 And that absolutely does not do that on master and this is 100% because of the PR? I don't want to block this PR because of false positives.

AlphaDelta9 commented 4 years ago

@AlphaDelta9 And that absolutely does not do that on master and this is 100% because of the PR? I don't want to block this PR because of false positives.

@legend800 my bad not compare it with master build, i just play with this build because i want to give some feedback. I want too this build merge with master, I'm sorry for my false positive feedback