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 · 13 comments
Closed

Steam Deck Gyro support (WarioWare Twisted) #2531

aldelaro5 opened this issue May 24, 2022 · 13 comments

Comments

@aldelaro5
Copy link
Contributor

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

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

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).

@Keiggo
Copy link

Keiggo commented Apr 28, 2023

@endrift sorry to dredge this back up but I have absolutely no idea how to map the cartridge gyro X and Y controls! I can only find a controller map within mGBA. I assume I'm just being an idiot but can you point me in the right direction please?

@spudpiggy
Copy link

click the game pak sensors button

@endrift
Copy link
Member

endrift commented Aug 12, 2023

That works for some cases, but here you're going to want to set both of them to IIRC axis 3 to bypass the interpolation, or you'll need to edit the config file manually to set gyroAxisZ (I think that's the config var name--I'd need to double check)

@sofakng
Copy link

sofakng commented Dec 17, 2023

What's the current status of this?

I see there was a commit to a different repo (rtomasa) with seemingly additional changes but that repo itself is a fork of the libretro mgba core?

Just wondering what's the current best way to play WarioWare Twisted with the gyro on the Steam Deck :)

@endrift
Copy link
Member

endrift commented Dec 19, 2023

You will need to set up the gyroscope in Steam Input to map to the right stick, then go into the game pak sensor view (under Tools), then press the "set X" button under gyroscope, move the right stick left or right, then the "set Y" button and do the same. It should work after that.

Yes I need to add a better way to do this.

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

6 participants