vWii/Wii HID USB support - Why is it limited to Nintendont ?

Discussion in 'Wii U - Homebrew' started by johan_1984, Jan 20, 2017.

  1. johan_1984
    OP

    johan_1984 Member

    Newcomer
    28
    17
    Jan 17, 2017
    France
    Hello everyone

    Why Nintendont is the only wii app that support HID USB controllers ?
    Is it possible that wii homebrews support them in the future ? (I think about using my Gamecube controller adapter with emulators :) )
    More difficult : Is it possible that wii retails games support them in the future, emulating a classic controller for exemple ?
    And what about Wii U ? Will it be that way too ?

    Thanks
     


  2. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,625
    8,204
    Oct 27, 2002
    France
    Engine room, learning
    homebrew : yes, it's possible. developers have to code its support.
    Some homebrew have a partial support (USBLoaderGX, or some emulators have PS3 HID-USB controller support).

    Retail game : no, it would require a recompile of the game's sources which only the developers have. it's up to the developers to decide which controller they allow the players to use.

    I guess only Smash Bros WiiU supports HID USB (the Gamecube USB adapter is actually HID-USB).
    Maybe some fighting games also support HID for joystick arcade fighting controllers?
     
    Last edited by Cyan, Jan 20, 2017
    Ryccardo and NoNAND like this.
  3. pedro702

    pedro702 GBAtemp Guru

    Member
    6,022
    1,879
    Mar 3, 2014
    Portugal
    you can easily hack hid controllers to games like HID to vpad on wiiu wich replace the gamepad inputs iwth any hid controller inputs in "every" wiiu game, someone just needed to do this for wii/vwii too, but there is little interest sadly.
     
    Last edited by pedro702, Jan 20, 2017
    Cyan likes this.
  4. tswntk

    tswntk GBAtemp Advanced Fan

    Member
    639
    134
    Aug 6, 2012
    Switzerland
    After so many years and still no one have a clue on how Wii games handle controller input from a system level, so I tend to believe its a per game handling.

    Maybe one day you can use vpad on vWii and hopefully HID to vpad still work on that level. Backward hacking on the Wii by then?
     
  5. Maschell

    Maschell GBAtemp Advanced Fan

    Member
    883
    1,282
    Jun 14, 2008
    Gambia, The
    Nintendon't is supporting it, because the controls (control emulations) are implemented in nintendon't. You just code it, and it's working. But retail games are already done, and unless the dev have implemented it, it become a bit harder to change that fact in the future.
    But sure, everything is possible, it just has to be done. But at first, you have to understand how the WiiU and Wii are handling the system functions:

    The WiiU and Wii have a different approach to use the system functions. Dynamic linking vs. static linking.

    On the WiiU, all system libs are loaded on run time (The .rpl files!), this mean dynamically. When a game needs WiiMote support, it loads the padscore.rpl and has access to the KPAD-functions. What HID-to-VPAD does it just hooking into the
    functions of the .rpl's. Very simplified: The game is asking for system function XY and we're given them a patched version of XY (In fact it's done differently, but the result is the same). Because each game is taking the function from the same place, this can be easily done, and the functions only need to be patched a one place. The WiiU also has a buil-in HID lib, which can be used easily.

    On the Wii, the system libs are linked STATICALLY. Every Wii game has a version of the functions directly in their executables. All games run on the bare metal, so there is no OS, this mean they can't ask the system for function XY. They have their own copy of the function in their .dol that they are using. Every game may have it in a different place and may even have a different version of it (When it's compiled with an older/newer SDK function). In addition you don't know where the function is in the .dol (on WiiU side you have the neat findexport function), but at least no convient way to find it.
    There IS a tool for the Wii that handles with all this "problems", called brainslug by Chadderz: https://github.com/Chadderz121/brainslug-wii.
    This means it can be done! But at first, someone has to implement it. You need to find the "signature" of the control-function in the Wii Games, that indentifies the function in the executables, which then can be patched. This also has to fit all versions of this function. Once you've done this, you can probably copy the nintendon't hid-handling code for using the GC-Adapter, do some magic, and hopefully it's working magically.

    tl;dr: It's just way harder on the Wii, because all games have their own copy of system functions compiled in. This means all games have to be patched individually (or you use the neat brainslug app for patching). + no HID library provided by the system, like the WiiU.
     
  6. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,625
    8,204
    Oct 27, 2002
    France
    Engine room, learning
    It can be done, but on a game by game patching basis.
    There were a patch for a specific version of the controller library posted on a dead forum (sources are lost I guess) to remap the button to another wiimote's button; but not all games used that controller library version, and not all games are even using the official nintendo's libraries, some developers made their own controller's drivers. .
    Crediar also released some patches to redirect wiimote button to gamecube controllers (or was is classic pad?) but it's for one specific game too.

    Maschell explained it very well :)
     
    Last edited by Cyan, Jan 21, 2017
    Maschell likes this.
  7. pedro702

    pedro702 GBAtemp Guru

    Member
    6,022
    1,879
    Mar 3, 2014
    Portugal
    well all you needed to fake is seinding hid signals as gc signals if the signals are exatly the same whatever lib the game uses will convert them to controller imputs, you just need some interface, sure maybe it would add afew ms lags but small price to pay.
     
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    17,625
    8,204
    Oct 27, 2002
    France
    Engine room, learning
    "all you need" means a hardware signal converter?
    yes, that will work. but on Wii only, as the WiiU does not have a gamecube port to read EXI or controller signals at all.


    remember that the Wii doesn't have an OS in memory where you can have multiple applications running at the same time.
    there can't be a "real time converter" being processed in the background, you need the game to do it. which means you need to patch the game's function to replace it with a custom one (fitting the size and memory).
    Replacing a function is dependent on the function compiled by the developer, which is what Maschell and I said.
     
    Last edited by Cyan, Jan 22, 2017
  9. pedro702

    pedro702 GBAtemp Guru

    Member
    6,022
    1,879
    Mar 3, 2014
    Portugal
    afaik you can have iosu running on the background while on vwii maybe use that space.
     
  10. Sumea

    Sumea Disco Ninja Frog

    Member
    1,438
    252
    Aug 16, 2008
    Finland
    Turku
    There is a HID to PAD Wii U and it had very interesting developments made to it which the creator showed a demo video of, but never anything more. The one you can get for Wii U enabled any game that can be controlled with Gamepad, to be controlled with HID controller. I even mapped fully a madcatz PS3 fight stick and played some Tekken Tag 2 with my stick on Wii U.

    The (I think still unreleased) demo was REALLY hot though, It allowed Dual Shock 3 and Dual Shock 4 over Bluetooth, and allowed controllers to be registered as Gamepad Pros so you could easily have a lot of extra pads for multiple players with dualshocks and whatnot. I REALLY would love this to be released as I have a Wii U, but I have only one Pro pad, they cost more than 70 dollars where I live - And Switch Propads are going to be around 120 here too.

    As for Wii, there is lot of Limitations for it. Indeed it goes mostly down to how Wii works versus Wii U - Wii has no firmware and code running in background, it is very close to metal coding developers do and only thing in "background" is Wii's IOS that Wii can have up to 254/255 (I forgot) which enable hardware addressing for certain types of USB devices and such - This is why D2X custom IOS is needed for USB loading - The custom IOS contains the base IOS that the games usually need, and as extra USB and some other stuff. Do not quote me what D2X exactly has since, I have no idea, and I am not a doctor.

    LOTS of Wii games require Wiimote anyway, for also unique things like sound, few games for motion plus, and so on. So in the end there is also very little point to it when wiimote is so prominently required to play Wii titles anyway.
     
  11. xLothwenx

    xLothwenx Member

    Newcomer
    11
    0
    Feb 9, 2017
    United States
    When talking about "hacking in" generic controller support, "require" becomes a subjective word. The Wiimote sound feature is awful, so I disable it anyway. A hacked driver could do the same. People (such as Dolphin emulator developers) act like the Wii Motion Plus is this difficult, un-mimic-able thing. Yes, there are challenges mapping the Wii Motion Plus to less-equipped controllers, but it's completely possible. For example, the PS3 controller was called "Sixaxis" for a reason. That maps pretty well to the Wii Motion Plus. In cases where it doesn't, two axes can be made to simulate three. Futhermore, held button combinations can enable and disable distinct modes of control for different tasks. It's completely doable; there needs to be a will.

    I refuse to buy a Wii Motion Plus, yet I want to replay Skyward Sword.

    Donkey Kong Country Returns is awful with motion controls. I should be able to map the motions to my USB SNES controller.

    If USB loading can be hacked into a cIOS, custom controller drivers is completely possible. A Wiird-kind-of-code could be applied which searches for addresses of input ports/drivers and injects a function call into a new, controller-centric cIOS. I would love to work on something like this.
     
  12. Sumea

    Sumea Disco Ninja Frog

    Member
    1,438
    252
    Aug 16, 2008
    Finland
    Turku
    "A hacked driver" does not exist for Wii, Wii is not driver oriented like other systems, it would need a custom iOS and it would need to be separate from D2X custom IOS or somehow umped together with D2X - so, very unlikely to get working in Wii mode.

    Protip: You look less silly if you dismiss THE FUCKING DOLPHIN TEAM'S YEARS OF WORK ON REVERSE ENGINEERING THE WII AND GAMECUBE, handwave it and say "you can just map sixaxis" - Trust me, if it actually was that simple Dolphin team would have done it.

    The wiimote is so central because it has the sensor that approximates where you are pointing on the screen by two Infrared points, and things starting from the wii menu itself use this feature, as does a lot of games. Dolphin can emulate it but there is no real hardware to replace it with. Motion plus IS NOT CURRENTLY emulatable and I take Dolphin team's expertise over yours on this matter. EVEN IF YOU COULD map sixaxis to motion plus, left half of the controller emulate as nunchuck and right half as Wiimote - which is VERY easy to say, but you have no idea how hard it is to actually do - how nice it is to play skyward sword like that? Swinging a Dualshock in your two hands. I played skyward sword, through the whole thing and a little more, and it would be, unplayable to be frank. You also forget that skyward sword also still uses Nunchuck shake for several game functions and you cannot clear the game without shield bash while I can't say if the game actually requires you to roll (though it is much more fun to be able to roll)

    With Wiimote I mean three things; It's IR and the IR lights. The actual complex hardware of that is on wiimote. The unique Shape. Think this as "Would you play smash with something else than gamecube controller" - or in examples you would not probably get; Killer 7. You just do not want to play Killer 7's PS2 version because the controls are better designed for gamecube controller and it's unique button placmenent. The gameplay becomes VERY awkward the moment you play it on PS2 pad etc. Same thing with Wiimote. It's unique controller plug, supporting another controller or small additional controller with it's own motion sensor- The sound of the controller is not crucial for many, if any games but still very much part of the experience. Also an example of "Easier said than done" deal since Wiimote sound was actually made rival what it is with the Wii/Wii U consoles only on Dolphin 5.0. so last year, not even full 12 months ago IIRC, and it works only on one type of Wiimote out of three. And yeah, IIRC, it works only with wiimote even dolphin team can't yet reverse it enough to make the sound come out of speakers or whatever.


    TL;DR: It is easy be ignorant but it would be better if you didn't hand wave the BIGGEST reverse engineers of the Wii and just go "oh yeah this and that should be SIMPLE, the BIGGEST reverse engineers could not do it but it should be simple" - it just isn't. Cry about it if you want I dunno, but it just isn't and nobody has put as much work in reverse engineering wii and wiimote (and I think also the Wii U gamepad) than dolphin team.
    If you want to play Donkey Donk Returns without motion control (which I personally had no problems with), get it on 3DS.

    If you want to play skyward sword but don't want to get motion plus you are waiting, possibly years. So if you actually want to play it get a darn motion plus. I have five, it's not particularly hard to get a used one. And that is just how it is.

    Also if I read Cyan correctly, wiimote and control functionalities are not entirely or at all IOS dedicated, but hard coded to games, and every game has different kind (hard coded) - so CIOS would be a dead end for this controller thing, and instead you would just need to individually hack every game in existence.
     
    Last edited by Sumea, Feb 14, 2017
    SlimPortable likes this.
  13. xLothwenx

    xLothwenx Member

    Newcomer
    11
    0
    Feb 9, 2017
    United States
    Nerd anger Internet rant.

    Here's my childish response to yours, "You're wrong." Keep defending those whom you think I'm attacking, though. I disagree with your opinions, but you can't handle it. Can't wait for your response:
     
  14. Sumea

    Sumea Disco Ninja Frog

    Member
    1,438
    252
    Aug 16, 2008
    Finland
    Turku
    What do people who are right usually do?
    State "you're wrong because I said so" without even explaining how or why the other guy is wrong.
    Sorry where was the part this was about opinions and not about physical attributes of where actual console input redirection would work because I missed that part.

    My response to you is: Stop talking about things you do not even kinda-sorta know about, stop thinking you are right about things you do not even kinda-sorta know about, and last, stop telling others they are wrong when you cannot give even one sentence counter.

    Also, seriously stop projecting malice where none exists. I responded to you seriously, with just general info of why some of the ideas you gave are bad, would not work, would be impractical and there is reason why nobody has done any of this stuff yet. I made fun of ONLY you hand waving the goddamn Dolphin team because that is just funny.

    I invite you to prove me wrong. Do you even "kinda-sorta" know what you are talking about? Back some stuff up and you're a winner babe. Show us your input redirection code if you have any.

    Happy Valentine's day, I love you ❤️️
    was worth for the laughs
     
    Last edited by Sumea, Feb 14, 2017
  15. xLothwenx
    This message by xLothwenx has been removed from public view by BORTZ, Feb 15, 2017, Reason: dont troll and bait.
    Feb 14, 2017
  16. hnieuw

    hnieuw Newbie

    Newcomer
    4
    0
    Apr 14, 2013
    Netherlands
    So, i guess there will not be usb-controller support for UsbLoader GX for vwii. But is this the same for emulators like vba gx? I didn't quite understand that part :)
     
  17. pedro702

    pedro702 GBAtemp Guru

    Member
    6,022
    1,879
    Mar 3, 2014
    Portugal
    praticaly nothing supports usb controllers besides nintendont.

    the wiiu gc adapter does not emulate real gc ports, so while the emulators are compatible with gc controllers they cant see the wiiu gc adapter since its like a standard usb controller like a ps3 controller and basicaly no emulator has hid support.
     
    hnieuw likes this.
  18. Master-Killua

    Master-Killua GBAtemp Regular

    Member
    183
    54
    Jan 11, 2016
    Peru
    There's HID to VPAD because it runs the homebrew in the background. Wii U uses ram for the game and the OS, that's why you can use internet browser or even miiverse. The same happens to Nintendo 3ds, but Wii have less ram memory, so when a game is loaded/running, it don't let you open the Wii OS, just shows the "Home menu botton", but that's inside the game files (is not because the Wii OS).
    So that means the Wii can't have any homebrew in the background (because all the ram memory is used for the game)
    I wonder why the gamecube games (nintendont) can use HID/libwupc and Wii games doesn't.
     
  19. Sonic Angel Knight

    Sonic Angel Knight GBAtemp Guru

    Member
    9,445
    4,653
    May 27, 2016
    United States
    New York
    I can use HID controllers and Wii u pro controllers in v wii emulators. I'm happy. :P
    Though I do wish you can use gamecube controllers on wii games that support it on wii u. I figured it be a system update feature or something but I dunno. Can't play sonic colors with gamecube controller on wii u, or smash bros brawl. Need a original 2006 wii with Gamecube compatibility.

    Sometimes I wonder if we just replace the vwii with a original wii if it would work with the USB gamecube controller nintendo made for super smash bros. But i wish more games supported 3DS controller support. Smash bros wii u done so much that no one saw coming. 3DS controller for smash bros on wii u? THANK YOU:toot:
     
  20. hnieuw

    hnieuw Newbie

    Newcomer
    4
    0
    Apr 14, 2013
    Netherlands
    HID controllers with usb?
     
  21. Sonic Angel Knight

    Sonic Angel Knight GBAtemp Guru

    Member
    9,445
    4,653
    May 27, 2016
    United States
    New York
    PS3/PS4, as far as I know, is a HID controller, that works with snes9xGX emulator that has been updated to support it, and HID2VPAD on wii u.