Homebrew Official HID to VPAD

Spawn420

Member
Newcomer
Joined
Feb 19, 2017
Messages
10
Trophies
0
Age
31
XP
44
Country
United States
Can someone create a config file for the GameCube adaptor. It’s the Hyperkin model but it appears to read as the official one on hid test. But I have two issues. The main issue is the left stick. I noticed while testing wind waker hd you cant gain momentum in the straight left or south direction. It lets you walk in all directions but not run left or down. If someone could incorporate a dead zone fix to that it would be appreciated. Also for some reason I always have to run hidtovpad twice before it registers the GameCube adaptor/controller.
Ended up creating a ini file and only adding the left stick VPAD settings from the magic_joy_box_gamecube ini you’ve provided in the nightly build. Feel like this should be incorporated into the controller folder for the nightly build or a default layout of a gamecube controller ini for people to go off of. I’d post one myself if I had the know how. The tutorial is very convoluted. Especially for someone who doesn’t understand dead zones and min-max etc. just a little description of what it’s sctually changing, and an example 5 with a default layout would help a lot.
 

RacsoSakuraba

Well-Known Member
Member
Joined
Mar 13, 2016
Messages
267
Trophies
0
XP
516
Country
Venezuela
Is it possible to use this tool without having the gamepad? (For example: Using a Wii Remote) That of a friend has battery problems so I wonder that and since I have no wii u so I ask for him
 
Last edited by RacsoSakuraba,

JCog

New Member
Newbie
Joined
Sep 12, 2019
Messages
2
Trophies
0
Location
Michigan, USA
Website
twitch.tv
XP
34
Country
United States
I've been digging around but can't quite seem to find what I'm looking for. How often exactly does the HID controller get polled/the VPAD data get updated? Is that defined somewhere in the app, or is that controlled by the console itself?
 

EmulateLife

Well-Known Member
Member
Joined
May 30, 2016
Messages
3,981
Trophies
0
Age
40
XP
1,857
Country
United States
Is it possible to use this tool without having the gamepad? (For example: Using a Wii Remote) That of a friend has battery problems so I wonder that and since I have no wii u so I ask for him

No because you have to hit a on the gamepad and then start on the gamepad to make the controller work. The only thing that might work is a Pro controller, I say might because I don't have one to try it.

--------------------- MERGED ---------------------------

I've been digging around but can't quite seem to find what I'm looking for. How often exactly does the HID controller get polled/the VPAD data get updated? Is that defined somewhere in the app, or is that controlled by the console itself?

I have no idea what you're asking, please clarify. Polled? data get updated?
 

JCog

New Member
Newbie
Joined
Sep 12, 2019
Messages
2
Trophies
0
Location
Michigan, USA
Website
twitch.tv
XP
34
Country
United States
Basically, how many times per second does the game loop through checking what buttons are currently pressed? Bare minimum it'd be 60 times per second to keep up with 60 fps games. And more specifically, what controls that?
 

Spawn420

Member
Newcomer
Joined
Feb 19, 2017
Messages
10
Trophies
0
Age
31
XP
44
Country
United States
Basically, how many times per second does the game loop through checking what buttons are currently pressed? Bare minimum it'd be 60 times per second to keep up with 60 fps games. And more specifically, what controls that?
A lot of 60 fps games on the Wii U?.....think you may have to message the developer on this one. Couldn’t find anything on it myself. My guess is 30 since that’s what Wii U games run at and based on what you said with the 60
 
Last edited by Spawn420,

Spawn420

Member
Newcomer
Joined
Feb 19, 2017
Messages
10
Trophies
0
Age
31
XP
44
Country
United States
Can anyone tell me what specific setting needs to be added or altered in the config to adjust how hard the joystick needs to be pressed before it registers a hard direction press. Seems like I have to push kinda hard to get link to run in most directions.
 

wolf-snake

Well-Known Member
Member
Joined
Feb 5, 2009
Messages
1,408
Trophies
0
XP
2,292
Country
Mexico
*facepalm*

-Wii games arent even supported by this
-Brawl doesnt even support 8 players
I think he meant Smash 4... as for why he said brawl? Latin Americans tends to do stuff like this with Videogame related stuff names all the time, like referring to Mario the character as Mario Bros.
 

Dry18

New Member
Newbie
Joined
Oct 3, 2019
Messages
2
Trophies
0
Age
23
XP
33
Country
Ecuador
Can you emulate up to 8 wii u pro controls to play the super smash bros for wii u?
I used to play in the Wii, so I keep the previous name
 

infring

New Member
Newbie
Joined
Oct 17, 2019
Messages
3
Trophies
0
Age
32
XP
34
Country
United Kingdom
I'm going to ask a dumb question that's probably been answered before but i have searched for it and i cant find anything =/ . is there a way to make hid to vpad work with Loadiine gx 2 games? sorry for asking dumb noob questions :c
 

Nemesis90

Well-Known Member
Member
Joined
Nov 12, 2011
Messages
315
Trophies
0
Age
36
XP
311
Country
United States
Can someone assist me with this? I have all the buttons working but the D-Pad is giving me issues. I can make the up, down, left and right directional buttons work but when i include the corner directions the problems start. This is what i'm using. I bought it in 2012 so i couldn't find a definitive source for it.

https://www.ebay.com/itm/Brand-NEW-...oller-adapter-for-PC-to-Mac-USB-/162168181051


Here is what i have done so far. Numbers have always been a weak point for me so maybe someone can give me some advice.

[vid=0x0925,pid=0x8866]

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK =

VPAD_BUTTON_DPAD_N = 0x00, 0xF1
VPAD_BUTTON_DPAD_NE = 0x00, 0xF3
VPAD_BUTTON_DPAD_E = 0x00, 0xF7
VPAD_BUTTON_DPAD_SE = 0x00, 0xFF
VPAD_BUTTON_DPAD_S = 0x00, 0xFD
VPAD_BUTTON_DPAD_SW = 0x00, 0xFC
VPAD_BUTTON_DPAD_W = 0x00, 0xF4
VPAD_BUTTON_DPAD_NW = 0x00, 0xF0
VPAD_BUTTON_DPAD_Neutral = 0x00, 0xF5

//Buttons
VPAD_BUTTON_A = 0x01, 0x02
VPAD_BUTTON_B = 0x01, 0x01
VPAD_BUTTON_X = 0x01, 0x08
VPAD_BUTTON_Y = 0x01, 0x04
VPAD_BUTTON_MINUS = 0x01, 0x40
VPAD_BUTTON_PLUS = 0x01, 0x80

//Triggers
VPAD_BUTTON_R = 0x01, 0x20
VPAD_BUTTON_ZR =
VPAD_BUTTON_L = 0x01, 0x10
VPAD_BUTTON_ZL =
PAD_COUNT=1
 

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
304
Trophies
0
XP
1,430
Country
United Kingdom
You should try setting
DPAD_MASK = 0x0F
as it's the second digit that's changing.

If that doesn't work, are there any other numbers that change (in HID-Test?) when you press the d-pad, apart from the very first pair (position 0x00)? It may be that the values are shown in a different format further on that's easier to fit into the format the config file needs.


In Hat mode, I would expect the values to run in a sensible order (e.g. clockwise from N), but the values you list are in a strange order.

If the d-pad showed up like an analog stick (DPAD_Absolute_2Values), I'd expect the up/down/L/R to be 00 or FF. The only other possibility is Normal mode. In that, up/down/L/R are each worth 1,2,4,8 &c., so we can add them up to get diagonals (or meaningless combos like up+down) with different totals.

Let's look at the values.
If N is worth 1 and NE is worth 3, I'd expect E on its own to be worth 2.
If S is worth D(=13), I'd expect SE to be 13+2=15, which is F. So far so good.
What about W? NW is 0, which is 1 less than N=1. This matches up with SW being C(=12) when S is D(=13).
We'd expect neutral to be worth 0, as we're not adding up the values of any direction. You've got it as 5.

Maybe I can work it out as a table:
...........left..neutral..right
up...........0....1..........3
neutral...4....5..........7
down....12...13........15

OK, now we're getting somewhere. 5 IS neutral, moving left subtracts 1, moving right adds 2.
Moving up subtracts 4 and moving down adds 8.


Can someone assist me with this? I have all the buttons working but the D-Pad is giving me issues. I can make the up, down, left and right directional buttons work but when i include the corner directions the problems start.
[vid=0x0925,pid=0x8866]

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK =

VPAD_BUTTON_DPAD_N = 0x00, 0xF1
VPAD_BUTTON_DPAD_NE = 0x00, 0xF3
VPAD_BUTTON_DPAD_E = 0x00, 0xF7
VPAD_BUTTON_DPAD_SE = 0x00, 0xFF
VPAD_BUTTON_DPAD_S = 0x00, 0xFD
VPAD_BUTTON_DPAD_SW = 0x00, 0xFC
VPAD_BUTTON_DPAD_W = 0x00, 0xF4
VPAD_BUTTON_DPAD_NW = 0x00, 0xF0
VPAD_BUTTON_DPAD_Neutral = 0x00, 0xF5
 
Last edited by emcintosh,

Spawn420

Member
Newcomer
Joined
Feb 19, 2017
Messages
10
Trophies
0
Age
31
XP
44
Country
United States
I'm going to ask a dumb question that's probably been answered before but i have searched for it and i cant find anything =/ . is there a way to make hid to vpad work with Loadiine gx 2 games? sorry for asking dumb noob questions :c
According to the info on the github it’s in the settings. So I’m going to assume so. Never used it personally though
 

Nemesis90

Well-Known Member
Member
Joined
Nov 12, 2011
Messages
315
Trophies
0
Age
36
XP
311
Country
United States
You should try setting
DPAD_MASK = 0x0F
as it's the second digit that's changing.

If that doesn't work, are there any other numbers that change (in HID-Test?) when you press the d-pad, apart from the very first pair (position 0x00)? It may be that the values are shown in a different format further on that's easier to fit into the format the config file needs.


In Hat mode, I would expect the values to run in a sensible order (e.g. clockwise from N), but the values you list are in a strange order.

If the d-pad showed up like an analog stick (DPAD_Absolute_2Values), I'd expect the up/down/L/R to be 00 or FF. The only other possibility is Normal mode. In that, up/down/L/R are each worth 1,2,4,8 &c., so we can add them up to get diagonals (or meaningless combos like up+down) with different totals.

Let's look at the values.
If N is worth 1 and NE is worth 3, I'd expect E on its own to be worth 2.
If S is worth D(=13), I'd expect SE to be 13+2=15, which is F. So far so good.
What about W? NW is 0, which is 1 less than N=1. This matches up with SW being C(=12) when S is D(=13).
We'd expect neutral to be worth 0, as we're not adding up the values of any direction. You've got it as 5.

Maybe I can work it out as a table:
...........left..neutral..right
up...........0....1..........3
neutral...4....5..........7
down....12...13........15

OK, now we're getting somewhere. 5 IS neutral, moving left subtracts 1, moving right adds 2.
Moving up subtracts 4 and moving down adds 8.

Thank you for your help. This is very close to the proper values, the only ones that don't work now are SW, S and SE. Here is what it looks like now. I'm sure i'm overlooking something simple.

[vid=0x0925,pid=0x8866]

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK = 0x0F

VPAD_BUTTON_DPAD_N = 0x00, 0x01
VPAD_BUTTON_DPAD_NE = 0x00, 0x03
VPAD_BUTTON_DPAD_E = 0x00, 0x07
VPAD_BUTTON_DPAD_SE = 0x00, 0x15
VPAD_BUTTON_DPAD_S = 0x00, 0x13
VPAD_BUTTON_DPAD_SW = 0x00, 0x12
VPAD_BUTTON_DPAD_W = 0x00, 0x04
VPAD_BUTTON_DPAD_NW = 0x00, 0x00
VPAD_BUTTON_DPAD_Neutral = 0x00, 0x05

//Buttons
VPAD_BUTTON_A = 0x01, 0x02
VPAD_BUTTON_B = 0x01, 0x01
VPAD_BUTTON_X = 0x01, 0x08
VPAD_BUTTON_Y = 0x01, 0x04
VPAD_BUTTON_MINUS = 0x01, 0x40
VPAD_BUTTON_PLUS = 0x01, 0x80

//Triggers
VPAD_BUTTON_R = 0x01, 0x20
VPAD_BUTTON_ZR =
VPAD_BUTTON_L = 0x01, 0x10
VPAD_BUTTON_ZL =
PAD_COUNT=1
 
  • Like
Reactions: MrCokeacola

emcintosh

On the internet, everyone knows I'm a cat
Member
Joined
Dec 4, 2016
Messages
304
Trophies
0
XP
1,430
Country
United Kingdom
Glad to hear it mostly worked. Getting the remaining directions to work *should* be an easy fix now.

I meant that the only thing you needed to change from your original version was adding the mask value, so that section of your config file should be:

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK = 0x0F

VPAD_BUTTON_DPAD_N = 0x00, 0xF1
VPAD_BUTTON_DPAD_NE = 0x00, 0xF3
VPAD_BUTTON_DPAD_E = 0x00, 0xF7
VPAD_BUTTON_DPAD_SE = 0x00, 0xFF
VPAD_BUTTON_DPAD_S = 0x00, 0xFD
VPAD_BUTTON_DPAD_SW = 0x00, 0xFC
VPAD_BUTTON_DPAD_W = 0x00, 0xF4
VPAD_BUTTON_DPAD_NW = 0x00, 0xF0
VPAD_BUTTON_DPAD_Neutral = 0x00, 0xF5




Here's why, if you're interested:
The values in this file are in hexadecimal - we can count to 15 rather than 9 before needing another column, because 10=A, 11=B &c., up to 15=F. The numbers less than ten are the same as normal decimal numbers. But the bottom row of my table would look different in hex - 12=C, 13=D, 15=F (in bold above). I used normal numbers in my table as they're easier for humans to read. But with this mask, we're telling the program to look only at the last digit, so from your new list it was expecting 2 for SW (which never happens), 3 for S (as well as NE) and 5 for SE (as well as neutral).

Thank you for your help. This is very close to the proper values, the only ones that don't work now are SW, S and SE. Here is what it looks like now. I'm sure i'm overlooking something simple.

[vid=0x0925,pid=0x8866]

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK = 0x0F

…VPAD_BUTTON_DPAD_NE = 0x00, 0x03…
VPAD_BUTTON_DPAD_SE = 0x00, 0x15
VPAD_BUTTON_DPAD_S = 0x00, 0x13
VPAD_BUTTON_DPAD_SW = 0x00, 0x12
VPAD_BUTTON_DPAD_Neutral = 0x00, 0x05
 
  • Like
Reactions: Nemesis90

Nemesis90

Well-Known Member
Member
Joined
Nov 12, 2011
Messages
315
Trophies
0
Age
36
XP
311
Country
United States
Glad to hear it mostly worked. Getting the remaining directions to work *should* be an easy fix now.

I meant that the only thing you needed to change from your original version was adding the mask value, so that section of your config file should be:

//DPad
DPAD_MODE = DPAD_HAT
DPAD_MASK = 0x0F

VPAD_BUTTON_DPAD_N = 0x00, 0xF1
VPAD_BUTTON_DPAD_NE = 0x00, 0xF3
VPAD_BUTTON_DPAD_E = 0x00, 0xF7
VPAD_BUTTON_DPAD_SE = 0x00, 0xFF
VPAD_BUTTON_DPAD_S = 0x00, 0xFD
VPAD_BUTTON_DPAD_SW = 0x00, 0xFC
VPAD_BUTTON_DPAD_W = 0x00, 0xF4
VPAD_BUTTON_DPAD_NW = 0x00, 0xF0
VPAD_BUTTON_DPAD_Neutral = 0x00, 0xF5




Here's why, if you're interested:
The values in this file are in hexadecimal - we can count to 15 rather than 9 before needing another column, because 10=A, 11=B &c., up to 15=F. The numbers less than ten are the same as normal decimal numbers. But the bottom row of my table would look different in hex - 12=C, 13=D, 15=F (in bold above). I used normal numbers in my table as they're easier for humans to read. But with this mask, we're telling the program to look only at the last digit, so from your new list it was expecting 2 for SW (which never happens), 3 for S (as well as NE) and 5 for SE (as well as neutral).

Everything works now! Thanks again! I attached the config file. I'm not sure how i would go about adding it to the repository. I have one more issue maybe you can help me with. I have a mayflash adapter for the N64. According to the repository it already has a config file, but it doesn't seem to work with it (no detection on HIDtoVPAD). I booted HID-test to see if it could help. I found that the VID and PID values are completely different from the repository config. It also seems no matter what input i give HID-test all of the values alternate quickly between the neutral value and the pressed value, this happens until i let go of the button. I'm not sure if this is normal behavior. Most of the values seem to be the same as the default config save for the swapped Start/Z buttons. Could these issues be from a newer revision of the adapter?
 

Attachments

  • SFC_USB_Gamepad_Adapter.zip
    433 bytes · Views: 117
  • Like
Reactions: MrCokeacola
General chit-chat
Help Users
    NoobletCheese @ NoobletCheese: Hi Ramesh, please join our weird puddle.