Official HID to VPAD

Discussion in 'Wii U - Homebrew' started by Maschell, Apr 25, 2016.

  1. Spawn420

    Spawn420 Member

    Newcomer
    1
    Feb 19, 2017
    United States
    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.
     
  2. RacsoSakuraba

    RacsoSakuraba GBAtemp Regular

    Member
    1
    Mar 13, 2016
    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, Sep 11, 2019
  3. JCog

    JCog Newbie

    Newcomer
    1
    Sep 12, 2019
    United States
    Michigan, USA
    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?
     
  4. EmulateLife

    EmulateLife GBAtemp Psycho!

    Member
    7
    May 30, 2016
    United States
    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.

    — Posts automatically merged - Please don't double post! —

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

    JCog Newbie

    Newcomer
    1
    Sep 12, 2019
    United States
    Michigan, USA
    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?
     
  6. Spawn420

    Spawn420 Member

    Newcomer
    1
    Feb 19, 2017
    United States
    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, Sep 12, 2019
  7. Spawn420

    Spawn420 Member

    Newcomer
    1
    Feb 19, 2017
    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.
     
  8. Dry18

    Dry18 Newbie

    Newcomer
    1
    Oct 3, 2019
    Ecuador
    Can you emulate up to 8 wii u pro controls to play the super smash bros brawl for wii u?
     
  9. EmulateLife

    EmulateLife GBAtemp Psycho!

    Member
    7
    May 30, 2016
    United States
    *facepalm*

    -Wii games arent even supported by this
    -Brawl doesnt even support 8 players
     
  10. wolf-snake

    wolf-snake GBAtemp Maniac

    Member
    8
    Feb 5, 2009
    Mexico
    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.
     
  11. Dry18

    Dry18 Newbie

    Newcomer
    1
    Oct 3, 2019
    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
     
  12. jesus96

    jesus96 Pinkboi

    Member
    4
    Sep 2, 2015
    Mexico
    you can make the gamepad emulate as a pro controller?

    for example to play NSMBU Multiplayer without that boring bost mode
     
  13. infring

    infring Newbie

    Newcomer
    1
    Oct 17, 2019
    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
     
  14. lily_neko739

    lily_neko739 Newbie

    Newcomer
    1
    Oct 23, 2019
    United States
    I have all the buttons and stuff working, but they only work when i release them, then they stay pressed until i press another button
     
    Last edited by lily_neko739, Oct 23, 2019
  15. Nemesis90

    Nemesis90 GBAtemp Fan

    Member
    3
    Nov 12, 2011
    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
     
  16. emcintosh

    emcintosh Advanced Member

    Newcomer
    3
    Dec 4, 2016
    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.


     
    Last edited by emcintosh, Oct 30, 2019
  17. Spawn420

    Spawn420 Member

    Newcomer
    1
    Feb 19, 2017
    United States
    According to the info on the github it’s in the settings. So I’m going to assume so. Never used it personally though
     
  18. Nemesis90

    Nemesis90 GBAtemp Fan

    Member
    3
    Nov 12, 2011
    United States
    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
     
    MrCokeacola likes this.
  19. emcintosh

    emcintosh Advanced Member

    Newcomer
    3
    Dec 4, 2016
    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).

     
    Nemesis90 likes this.
  20. Nemesis90

    Nemesis90 GBAtemp Fan

    Member
    3
    Nov 12, 2011
    United States
    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?
     

    Attached Files:

    MrCokeacola likes this.
Quick Reply
Draft saved Draft deleted