Homebrew Add gyro capabilities in HID to VPAD

Famus484

Member
OP
Newcomer
Joined
Oct 9, 2019
Messages
22
Trophies
0
Age
29
XP
108
Country
Canada
Hi everyone,

First of all, HID to VPAD is an awesome piece of homebrew, and one the top 3 reasons why I installed Haxchi on my Wii U (along with gamecube/wii/vc injection and retroarch). I was wondering how (un)doable is it to augment it with gyro emulation for the gamepad. It would be really awesome for the Zelda's (aiming and botw special shrines), Splatoon (real gamepad would only be used for touchscreen stuff), and Star fox. Basically where shooting is involved (racing games might benefit too for some).

I see two possible paths (in my inexperience) to achieve that:

1. When the controller has gyro built-in.
Out of my head, the DS4, Switch Pro and Joy-cons are examples. The controllers would be either usb plugged, wireless network or wireless using an adapter like the Mayflash magic NS in Switch pro mode.

2. Generalise the Splatoon idea.
So this method, big if possible, would work for any controller currently working, as long as the geometry of the controller is not too unorthodox (rip n64). There would be a wiimote+ attached to the back of the controller, with the only purpose being emulating gamepad's gyroscope. It would appear as an option in the homebrew, and it would be insanely cool.

So my question is: is any of the options doable? I would bet 1. is, but then the question becomes how much work has to be done. I don't know how to code homebrew yet, but I want to help as much as I can.
 

Famus484

Member
OP
Newcomer
Joined
Oct 9, 2019
Messages
22
Trophies
0
Age
29
XP
108
Country
Canada
Me searching the forum did not lead to anything concrete on the subject, but I'm sorry if this has already been asked.
 

EmulateLife

Well-Known Member
Member
Joined
May 30, 2016
Messages
3,979
Trophies
0
Age
42
XP
1,889
Country
United States
Don't expect any ground breaking new features to come as hardly anyone uses it anymore as most people have moved on to Switch.
 

Famus484

Member
OP
Newcomer
Joined
Oct 9, 2019
Messages
22
Trophies
0
Age
29
XP
108
Country
Canada
Don't expect any ground breaking new features to come as hardly anyone uses it anymore as most people have moved on to Switch.

Ah, that's too bad! I also have the Switch, but I still use my Wii U quite often. I feel like in this scene we are more free than on the switch, where the work done is under Nintendo's scrutiny. I always prefer to hack a console after its end of shelf life.
 

EmulateLife

Well-Known Member
Member
Joined
May 30, 2016
Messages
3,979
Trophies
0
Age
42
XP
1,889
Country
United States
Well not as many people use Wii U but especially not many people use Hid to Vpad. You can tell by the lack of replies in that thread. I use it, I have a Mayflash NS adapter it allows me to use a wireless Dualshock 3. I played through BOTW with it recently. It would be cool to have gyro abilities like you said for Star Fox Zero and a few others, I just don't see it happening.
 

Famus484

Member
OP
Newcomer
Joined
Oct 9, 2019
Messages
22
Trophies
0
Age
29
XP
108
Country
Canada
Well I guess I'll have a look at the code, see what I can make of it. Basically, I have to understand how the software interacts with the rest of the system?

First, I made some quick testing, using the dualshock 4 connected wirelessly to my mayflash NS. I notice that the gamepad still fully works while emulation is in effect. Clicking any button on either or both controller works. Furthermore, using Breath of the Wild, I noticed both sticks from both controllers cancel each other out, in an additive way (ex: all the way left on gamepad and a bit right on DS4 makes link slowly walk left). So I conclude the software probably ''adds'' the data of the controller to that of the gamepad (in the form of an OR gate for the buttons).

So I would have to understand how the gyro on both the gamepad and the DS4 work, and see if I can also ''add'' the gyro data.
 

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
444
Trophies
0
XP
2,333
Country
United Kingdom
Well I guess I'll have a look at the code, see what I can make of it. Basically, I have to understand how the software interacts with the rest of the system?

First, I made some quick testing, using the dualshock 4 connected wirelessly to my mayflash NS. I notice that the gamepad still fully works while emulation is in effect. Clicking any button on either or both controller works. Furthermore, using Breath of the Wild, I noticed both sticks from both controllers cancel each other out, in an additive way (ex: all the way left on gamepad and a bit right on DS4 makes link slowly walk left). So I conclude the software probably ''adds'' the data of the controller to that of the gamepad (in the form of an OR gate for the buttons).

So I would have to understand how the gyro on both the gamepad and the DS4 work, and see if I can also ''add'' the gyro data.

The dev, Maschell, had a go at implementing DS4 gyro input, but, as the Gamepad has many more sensors than the DS4, it wasn't accurate enough to be included in the released version.

The source code is at https://github.com/Maschell/hid_to_vpad/tree/DS4GyroAndTouchtest and the readme there puts it as a branch of version 0.9j, so it's not far behind the master branch. I would be very interested if you can compile this. I evidently have something wrong with my build environment, because I have had trouble compiling both this and the master branch, on both Mac and Windows.
 
Last edited by emcintosh,

Famus484

Member
OP
Newcomer
Joined
Oct 9, 2019
Messages
22
Trophies
0
Age
29
XP
108
Country
Canada
The dev, Maschell, had a go at implementing DS4 gyro input, but, as the Gamepad has many more sensors than the DS4, it wasn't accurate enough to be included in the released version.

The source code is at [...] and the readme there puts it as a branch of version 0.9j, so it's not far behind the master branch. I would be very interested if you can compile this. I evidently have something wrong with my build environment, because I have had trouble compiling both this and the master branch, on both Mac and Windows.

Sorry, I didn't see that post until two days ago. I am on Manjaro (Linux distro which comes with pacman), but I didn't succeed in compiling. I will try again once I understand a bit more how all of this works.

The problem with the gyro was accuracy alone? With the magic NS, the DS4 could emulate the switch pro gyro with ''close enough'' accuracy for playability, if I recall correctly. I will test on the switch again just to be sure.
And yea I hadn't even thought of using the DS4 trackpad to simulate the touchsreen. Though I can see how it would not be that practical during play.

Edit: I tested the gyro of the DS4 with magic NS on the switch for Mario Kart and Fortnite, and they seemed "accurate" (it's just opinion, I haven't done anything scientific)
 
Last edited by Famus484,

larryd

Active Member
Newcomer
Joined
May 11, 2018
Messages
44
Trophies
0
XP
694
Country
Denmark
Would it be possible to use the DS4 compatible nightly build with xinput controllers that support gyro?
 

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
444
Trophies
0
XP
2,333
Country
United Kingdom
Would it be possible to use the DS4 compatible nightly build with xinput controllers that support gyro?

There isn't any built release of the gyro branch, only the master branch without gyro support. If you are able to build it yourself and post the binary here, I'm sure all of us in this thread would be very grateful.

AIUI the gyro input only works with controllers that report themselves as a DS4 (e.g. Xbox One controller through Brook Xone adapter).
 

larryd

Active Member
Newcomer
Joined
May 11, 2018
Messages
44
Trophies
0
XP
694
Country
Denmark
There isn't any built release of the gyro branch, only the master branch without gyro support. If you are able to build it yourself and post the binary here, I'm sure all of us in this thread would be very grateful.

AIUI the gyro input only works with controllers that report themselves as a DS4 (e.g. Xbox One controller through Brook Xone adapter).
I have no experience with compiling what so ever but I tried anyways. This was the farthest I could get: https://pasteboard.co/IYO9XF5.png
 
  • Like
Reactions: Famus484

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
444
Trophies
0
XP
2,333
Country
United Kingdom
I have no experience with compiling what so ever but I tried anyways. This was the farthest I could get: https://pasteboard.co/IYO9XF5.png

I seem to remember having a similar problem last year. I have read on here that devkitPPC release 27 and above had a problem with the gctypes file. WinterMute, who is AIUI responsible for the devkitPro tools, is not keen on leaving old versions available in case people have problems with mixing old and new tools, but this does make it hard to compile particular projects. I haven't found release 26 in a form I was able to use. But I got a bit further with the latest version of devkitPPC, r36.

The latest main version shows a problem with the ld command, and the Gyro branch uses gAppStatus without defining it anywhere, and can't run the ControllerPatcher:Init() function. I've had the same errors on both Mac and Windows, which makes me think there is a problem other than my incompetent installation.
 
Last edited by emcintosh,
  • Like
Reactions: larryd

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
444
Trophies
0
XP
2,333
Country
United Kingdom
The dev, Maschell, had a go at implementing DS4 gyro input… it wasn't accurate enough to be included in the released version. The source code is at https://github.com/Maschell/hid_to_vpad/tree/DS4GyroAndTouchtest

New member jacobsson was kind enough to build it for me. You can find it on the main HIDtoVpad thread: https://gbatemp.net/threads/hid-to-vpad.424127/page-106#post-9019018

I managed to get it to load exactly once. Then I turned off the console to add a config file to the SD card and it's only given me a black screen since then. I hope you have better luck.
 
  • Like
Reactions: Famus484 and larryd

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/3eGAHfC5P-Y?si=Fo3iEl1pZ4D_O6dp