Need help with vWii gc adapter for project M

Discussion in 'Wii U - Homebrew' started by ada010, Mar 7, 2018.

  1. JacobM

    JacobM GBAtemp Regular

    Member
    1
    Jun 16, 2017
    United States
    I've been trying to get this working using USB Loader GX. I think the only other loader compatible with gameconfig.txt is CFG loader. There are some old threads in which @Cyan mentions the need to run at least one ocarina code for the gameconfig.txt to be enabled, but I think that was corrected at some point since I am getting the same behavior with and without ocarina active. Thanks for looking into this.
     
  2. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    20
    Oct 27, 2002
    France
    Engine room, learning
    The need to activate at least one ocarina has been fixed. I changed it to load gameconfig.txt only by enabling one hook type, which loads the geckoOS patcher sources.
    So, if gameconfig.txt work fine with geckoOS itself, maybe the problem is the cIOS ?


    I'm sorry I took this conversation midway, so maybe I might not understand what this patch is doing.
    Is it a way to add gamecube pad support to Wii games, or is it a way to add HID USB support to wii games?

    That's two completely different things.


    If you are on wiiu, or using the official gamecube controller adapter, then it's NOT gamecube ! it's HID USB.
    It works fine with nintendont because Crediar added HID USB Support to nintendont (and not to gamecube game !). Nintendont is loaded in memory and responsible for communicating with the USB. it then converts HID controller signal by writing the corresponding button value into the memory address where the gamecube game is expecting it. it acts as a gateway (interpreter more than emulator).

    When you play a wii game, there's no program in memory doing this conversion HID->button writing to memory. The loader is not in memory anymore and can't act as interface between hardware and the game.

    So, tell me what this patch is doing :
    1. replacing Wii controller drivers with gamecube controller's driver ? (if it's a generic patcher, it should work only on games using the exact same controller driver version, and located at the exact same address, unless it's a "search&replace" patch)
    or
    2. replacing Wii controller driver with HID support writing HID value to memory like nintendont does?


    If it's doing the first one, then you can only use your Wii and a real gamecube controller port.
    if it's doing the second one, then you (might) need cIOS r53 to enable USB Port1 ! if you use cIOS it's limiting the available USB Port.


    So, when you tried to connect the adapter on back bottom port of WiiU, did you use d2x r52 or r53?
    try r53 please :)
    I don't have a GC adapter to test.
     
    Last edited by Cyan, Mar 11, 2018
  3. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    Ok so I took some time to test the GPF and gameconfig.txt with the actual brawl disk this morning. Using the mayflash adapter with the switch to wiiu mode on the back. Used gecko os and the official disk for all the tests below.

    The Gpf and .txt are interchangeable when working with Gecko OS, great conversion script @Cyan ! In Gecko Os, the .txt file must be in SD:/ not in SD:/codes/ in order to load, the GPF in SD:/patch/ (for any smashers lurking this thread) and I tried with both VBI and OSSleepThread hooktypes and they both worked fine.

    ~~the notes bewteeen the ~~~s pertain to having only the gc adapter and a usb port hud (with only the adapter connected) plugged in.~~~
    Some notes on the functionality of the script itself, when loaded through Gecko OS, works with both rear USB ports, works with the front USB ports, and also works in conjunction with a USB Port HUB (assuming this means it adds HID support if it works through a hub).
    ~~~~

    Ok so what's the issue? connecting other things.... Having a usb HDD in the rear top port of the wiiu with the gc adapter hooked up in the front causes no inputs to be registered until the HDD is unplugged. After that happens the gc adapter will work even if the HDD is plugged back in. Having both my Wiiu drive hooked up in the front and my wii hdd in the back on game load causes the game to get to the endless loop of the 'Now Loading...' screen. Having just the adapter plugged in on game load will allow it to work no matter if both HDDs are plugged in afterwards from my short tests.

    Basically it seems like the patch has huge issues with other USB devices connected at the same time. This is most likely the reason behind it not working so well with USB Loader, so it might not be an issue with USBloader gx's patching function at all.

    Do you think these exception cases/error handling could be looked into @wilm0x42 ?

    EDIT: Oh yeah, for anyone who is testing, some tips. Cuz of all the hardlocks you're bound to get, pressing B on the wiimote on the WiiU boot logo boots directly to Vwii mode. And for whoever asked about wiimotion plus and gecko os, after a certain date, manufactured wiimote plus remotes won't work with it. The first generation of wiimote motion plus integrated and the original wiimotes will still work - believe this is due to the version of libogc it was compiled with but unsure
     
    Last edited by cruplezone, Mar 11, 2018
    Cyan likes this.
  4. wilm0x42

    wilm0x42 Member

    Newcomer
    1
    Mar 10, 2018
    United States
    Not exactly either, but 2. is closer:
    It replaces the gamecube controller (SI) driver with a "HID" driver.
    I put that in quotes because it's tailored specifically to the official Wii U Gamecube Controller Adapter. (Slight differences)

    Another important distinction to be made is that it doesn't just "write controller values to memory."
    Rather, it redirects calls to gamecube controller related functions (SI, PAD) to functions that
    accomplish the same goal, but with the adapter.

    Basically, it redirects all traffic going to/from the gamecube ports (which are only in the original wii) to the adapter.

    As for the IOS:
    My code doesn't use the IOS module USB_HID.
    It uses OH0/1, the USB 1.1 module, communicating with raw interrupt transfers.
    This module is in all versions of IOS, to my knowledge.
    At the very least, I know it's in IOS36, which Brawl uses.

    It looks like the wii u has some wierd ways of handling the USB ports.
    The original wii only has 2 USB ports, both in the back, so it's up to the wii u to determine how the vWii sees it's 4 ports.
    Based on what you said, I'm guessing it handles this by either...

    1. It exposes the extra ports as a USB hub.
    2. It only shows the vWii either the front or the back ports at any given time. (Your guess is as good as mine as to how it decides which ports should take priority.)

    If it's 1., then it could be caused by the fact that my code only scans for 2 USB devices, since that's all there can normally be on a wii. Fixing this should be fairly trivial.
    If it's 2, which I find more likely, try plugging in both a hard drive and the adapter in either front/back. (Keep in mind, the grey cable on the adapter doesn't matter.)
     
    Cyan likes this.
  5. monkeyman4412

    monkeyman4412 GBAtemp Maniac

    Member
    3
    Jun 16, 2016
    United States
    that is brilliant, I hope the next games you plan patching for is mario kart wii (and ctgpr. I Idk how your going to get that to work since latest version of ctgpr is closed source) and sonic riders zero gravity.
     
  6. wilm0x42

    wilm0x42 Member

    Newcomer
    1
    Mar 10, 2018
    United States
    MKW is probably #1 on the list, once I begin work on porting this to other games.
    CTGPR: Brawl was closed source too, wasn't it? :^)
     
  7. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    Ok so just tell me what you want me to test and I'll do it, although if you're looking to get usb loadergx setup for internal testing it's capable of ripping the game for you, all you need is the loader on your ad and a usb hdd/compatible thumb drive

    Anyways I tried having the back bottom port having the adapter plugged in, back top with a Wii HDD, both front empty. Through gecko the patch works. Through usb loader the game boots and runs but as if no patch applied.

    Second setup back top HDD plugged in, front port adapter plugged in, in gecko os game boots and runs as if no patch is applied.

    Third setup, only adapter in front, empty back. Gecko os patch works.


    Hope that helps

    I guess the next thing would be to remove the cap for number of ports (it would be cool if it could work through hubs that would make it more than 4 btw) and see how it fairs with something in the back and front plugged in.
     
    Last edited by cruplezone, Mar 11, 2018
  8. wilm0x42

    wilm0x42 Member

    Newcomer
    1
    Mar 10, 2018
    United States
    USBLoaderGX is ripping Brawl right now. I'll test it as soon as it's finished.

    For clarification: Third setup only worked in Gecko OS, not USB loader?
     
    cruplezone likes this.
  9. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    I actually didn't try the other two setups with usb loader as I assumed since the first didnt, that would mean the other two would not. I'll try them for you!

    Eidt: Oh lol I just realized the third setup cannot possibly work since you need to have a HDD plugged into one of the back ports for usbloader

    Edit2: for setup 2 the game stopped receiving all inputs and got stuck on infinite game loading loop

    Edit3: oh yeah, also for usb loader I'm pretty sure you have to get the CIOses required btw! I'm pretty sure I'm using the NON-alt versions
     
    Last edited by cruplezone, Mar 11, 2018
    wilm0x42 likes this.
  10. JacobM

    JacobM GBAtemp Regular

    Member
    1
    Jun 16, 2017
    United States
    I just installed r53 to 251 base 57 but didn't notice any difference other than losing the ability to modify game settings in USB Loader GX

    I also tried hexediting the ISO as a whole with the patch values with no success

    Just to be clear, all of these patch values overwrite data starting at the destination address (inclusive)? Is it possible to generate a list of original values so we can identify what file they originate from? Can we use the alt dol feature in USB Loader GX to test dol modifications rather than transferring an entire ISO over and over?

    EDIT: all of my testing has been with USB HDD in top back port and black Wii GCN Adapter in bottom port.
     
    Last edited by JacobM, Mar 11, 2018
    cruplezone likes this.
  11. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    I think we should refrain from trying to patch ISOs as from what I've seen so far, trying to load the patch and game from usb loadergx does not work in the first place. It may be the patches issue not usbloader's
     
  12. JacobM

    JacobM GBAtemp Regular

    Member
    1
    Jun 16, 2017
    United States
    IMO patching the ISO directly removes a variable in determining what is failing. If we are making the correct assumption that these patches belong in main.dol, then the black screen that Peninsula and I encountered would suggest a CIOS limitation since our results matched when tested via SD loading and USB loading. Based on the gameconfig.txt findings, it could still be the USB Loader implementation of gecko support and/or CIOS incompatibility.

    Edit: Just to be clear, Gecko OS loaded the patch from the disk with a Wii HDD in the top back port and the adapter in the bottom back port? Would running this patch on a regular Wii work since it only has the two ports?
     
    Last edited by JacobM, Mar 11, 2018
  13. monkeyman4412

    monkeyman4412 GBAtemp Maniac

    Member
    3
    Jun 16, 2016
    United States
    True, but ctgpr does a lot of things differently than what project M does. and with getting projectM to work with the code was pretty easy. Problem is, ctgpr doesn't support gecko for obvious reasons (or outside gecko patches. userstuff. No cheating online) . So he would need to get in contact with the creator of ctgpr to make a official patch to the mod. And project M however was open sourced.
     
    Last edited by monkeyman4412, Mar 11, 2018
  14. Lyrin

    Lyrin Annoying Weaboo Girl

    Member
    3
    Jun 4, 2017
    United States
    You people are dense.
    CTGPR 1.03 was made to only properly launch through their channel launcher or something like that. No one has found a way to patch it onto an ISO. And if the devs found a person to be tampering with CTGPR, they're immediately permabanned from Wiimmfi completely.
     
  15. monkeyman4412

    monkeyman4412 GBAtemp Maniac

    Member
    3
    Jun 16, 2016
    United States
    I'm not dense, check my response I changed it, before you sent that message
     
    Last edited by monkeyman4412, Mar 11, 2018
  16. wilm0x42

    wilm0x42 Member

    Newcomer
    1
    Mar 10, 2018
    United States
    1. I didn't hack Project M, I hacked Brawl, which in-turn affects PM. As such, PM being open/closed source are completely irrelevant.
    2. If I was to attempt hacking CTGPR, there's no reason I'd have to restrict myself to using Gecko for that. It's 100% possible to hack it.
    3. The devs don't have the authority to ban you from Wimmfi completely; CTGPR is only one of the games Wimmfi supports.
    4. This hack would only be a client-side mod. They're servers would never see any difference.
    5. Keeping in mind that they CAN ban me from netplay for using hacks of any kind... I'll take my chances. ;)
    6. If I port my hack to vanilla MKW, then they can apply it to their hack themselves. Wii GCA Inject is open source.

    </rant>
     
    monkeyman4412 likes this.
  17. JacobM

    JacobM GBAtemp Regular

    Member
    1
    Jun 16, 2017
    United States
    Mr. Bean pretty much had the adapter working with CTGP ~December 20th, 2017. After a few days of testing relatively flawlessly, there was a minor graphical glitch that put the project on hold.

    http://forums.mkboards.com/threads/...-tracks-thoughts-and-suggestions.23387/page-6
    https://www.reddit.com/r/WiiUHacks/comments/7k8ylb/mr_bean_is_currently_livestreaming_research_into/
     
  18. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    Can we please not turn this into a thread of discussing other games when it doesn't even work on the one it was made for. Yall are adding to drama where it really wasn't needed
     
  19. monkeyman4412

    monkeyman4412 GBAtemp Maniac

    Member
    3
    Jun 16, 2016
    United States
  20. cruplezone

    cruplezone GBAtemp Fan

    Member
    2
    Feb 3, 2014
    Canada
    Based on the responses he gives on his live stream, it is at the bottom if even one of the things he is thinking about working on. Okay we good?
     
    wilm0x42 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice