Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam Deck Gyro support (WarioWare Twisted) #2531

Closed
aldelaro5 opened this issue May 24, 2022 · 8 comments
Closed

Steam Deck Gyro support (WarioWare Twisted) #2531

aldelaro5 opened this issue May 24, 2022 · 8 comments

Comments

@aldelaro5
Copy link
Contributor

aldelaro5 commented May 24, 2022

This is mostly to document the lack of this and the other related issues with it.

Currently, mgba supports binding the gyro to 2 axises which typically would be one stick on a controller. This is fine if the hardware has no gyro, but is very inaccurate because the coordinate system used doesn't match what an actual gyro would do. This means that even using steam input on the deck to bind the gyro to a stick and then the stick to mgba's gyro, it's not going to work well (from my testing, it can partially work, but it's overall not really playable).

The solutions other emulators like citra does is they support DSU which is a protocol made to pass the sensor data via a server. There is support for this on the deck and it makes the gyro essentially perfect on citra. Endrift however did not wanted to add support to DSU and would rather want a direct access to the sensors.

That's essentially where we are. There is currently no way to play twisted using the hardware gyro. I know it can work because I actually been emulating gold on citra and the gyro is perfect.

@sofakng
Copy link

sofakng commented Jun 1, 2022

Thanks for the creating the issue and providing the information. I found it by looking for a way to play WarioWare Twisted on my Steam Deck as well.

Would it be possible for mGBA to add direct support for the Steam Deck gyro?

Is it possible to configure RetroArch to use the gyro?

@ROMaster2
Copy link

ROMaster2 commented Jun 14, 2022

Native support would be great, but you also can accomplish this through editing the controller settings through Steam. Set the gyro as an analog stick and bind it to tilt/gyro in mGBA.

@aldelaro5
Copy link
Contributor Author

aldelaro5 commented Jun 14, 2022

Native support would be great, but you also can accomplish this through editing the controller settings through Steam. Set the gyro as an analog stick and bind it to tilt/gyro in mGBA.

Nope, I brought attention to this issue specifically because this doesn't work well. The issue is although it technically allows to use the gyro, it behaves improperly because the coordinates system makes it not work. It's even more odd on a stick itself, the gyro is BARELY better.

@endrift
Copy link
Member

endrift commented Jun 15, 2022

I still need to test exactly how well this works on the Deck, but it should work now. I'll give instructions for using it once I've tested it a bit better.

@endrift
Copy link
Member

endrift commented Jun 15, 2022

I have no idea how to actually use the gyro with games on the Steam Deck. It's just shaking wildly. None of these settings names mean anything to me.

@endrift endrift reopened this Jun 15, 2022
@endrift
Copy link
Member

endrift commented Jun 15, 2022

It helps if I actually push the code.

Okay, so it controls like shit, but it works. You'll need to map both the gyro "X" and "Y" to be axis 3, which is left/right on the right joystick. Then you'll need to tweak the sensitivity...a lot.

@sofakng
Copy link

sofakng commented Jun 15, 2022

@endrift Thanks so much for working on this! What is this mapping? (the physical joystick to a gyro?)

I'm wondering if this is even possible without mGBA enabling game-specific hardware. If I understand correctly, the WarioWare Twisted cartridge contained a gyroscope. There was nothing in the GBA that supported this and I don't think the GBA would even be aware of the gyro.

I think the original request was to map the Steam Controller gyroscope (I think SDL supports this?) to the cartridge gyroscope.

@endrift
Copy link
Member

endrift commented Jun 16, 2022

Yes, this lets you directly map a gamepad axis value to the gyroscope value. Steam Input lets you (very confusingly) map a gyro to right joystick, axes 3 and 4, so using this you can use axis 3 to map lateral rotation to the in-game gyroscope (which only measures roll or yaw, depending on your perspective--in Steam Deck parlance it's yaw).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants