kozec / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
1.53k stars 129 forks source link

Using gyro with cemu #449

Closed Sayanel01 closed 5 years ago

Sayanel01 commented 5 years ago

I wanted to use gyro of the steam controller as a input for Cemu emulator (which runs through wine), but didn't find a way to transmit info to cemuhook gamepad motion source., and I don't know if it requires something from sc-controller side. Any tip?

kozec commented 5 years ago

Depends on what cemuhook is :)

sc-controller emulates xbox controller which has no motion sensors, so if "gamepad motion source" is supposed to talk to actual gamepad, it's not going to work. What may is emulating mouse with sc-controller and then setting emulator to use mouse as input for emulated motion sensor.

Ryochan7 commented 5 years ago

Being compatible with cemuhook would require implementing a UDP server in sc-controller, that transmits the raw state of the original controller, that cemu would connect to and read. Cemuhook has direct knowledge about the DS4 and DS3. There is a generic gamepad option but I do not know how well that would work in cemuhook. Here is a sample implementation of the UDP server that was originally made by rajkosto (author of cemuhook).

https://github.com/Ryochan7/DS4Windows/blob/jay/DS4Windows/DS4Control/UdpServer.cs

Main website: https://cemuhook.sshnuke.net/ UDP Pad motion data provider info: https://cemuhook.sshnuke.net/padudpserver.html

It looks like there is an implementation of Steam Controller support for cemuhook out there. It looks interesting and maybe worth trying out.

https://github.com/FrogTheFrog/steam-gyro-for-cemuhook

kozec commented 5 years ago

Are there any other programs consuming same protocol, or is it specific just to cemuhook?

It should be possible to hack together script that connects to scc-daemon on one side, does translation and sends UDP data to cemuhook, but if later is case, I'd prefer to add support to scc-daemon directly.

sndein commented 5 years ago

Citra also uses this protocol and it seems to be the only way to get reliable gyro support in that emulator as the only other option is using the mouse, which does not work well.

kozec commented 5 years ago

Citra also uses this protocol

Now that sounds interesting. Can you suggest any game or 3ds application that could be used to test gyro?

sndein commented 5 years ago

Ocarina of Time 3D uses the gyro to aim a number of items so that's a good candidate. As for actual numbers I found this https://github.com/Swiftloke/ROB.

kozec commented 5 years ago

Thanks, it appears to work. @Sayanel01 if you haven't gave up yet, do you have any idea for Cemu game usable for same?

IkeKap commented 5 years ago

@kozec I'd recommend Zelda wind waker hd. While breath of the wild also uses gyro quite a bit, wind waker is smaller size, fewer shaders and not as demanding performance wise