Switching Downloaded Games On-The-Fly with pyGecko!

Discussion in 'Wii U - Hacking & Backup Loaders' started by MrRean, Jan 4, 2016.

  1. MrRean
    OP

    MrRean WiiU Helper / Hacker

    Member
    422
    1,500
    Jan 21, 2013
    United States
    Recently I reversed engineered quite a bit of the sysapp functions and decided to try to make a launcher using pyGecko.

    Code:
    from tcpgecko import TCPGecko
    tcp = TCPGecko("10.0.0.2")
    # make sure to check if your title exists, or else it will crash!
    # if it exists, it will return 1
    SYSCheckTitleExists = tcp.get_symbol("sysapp.rpl", "SYSCheckTitleExists")
    # first argument is the first 32-bit set of the Title ID
    # second argument is the second 32-bit set of the Title ID
    # for example, this is Wooly World (USA)
    SYSCheckTitleExists(0x0005000, 0x10184D00)
    # now here is the title id that you will launch
    # remember to have the game / disc in!!!!!
    SYSLaunchTitle= tcp.get_symbol("sysapp.rpl","SYSLaunchTitle")
    SYSLaunchTitle(0x0005000, 0x10184D00)
    tcp.s.close()
    print("Game switched!")
    
    if this doesn't work, poke me quickly cuz this worked for me :P
     
    Last edited by MrRean, Jan 4, 2016
    zeldaism, Phantom90, vgmoose and 8 others like this.
  2. yahoo

    yahoo G͝B͢A͜t͞em҉p̡ R̨e͢g̷ul̨aŗ

    Member
    340
    236
    Aug 4, 2014
    United States
    I haven't tested this, but it looks like you may have forgotten to get the symbol for
    SYSLaunchTitle...
    Code:
    SYSLaunchTitle= tcp.get_symbol("sysapp.rpl","SYSLaunchTitle")
     
  3. EclipseSin

    EclipseSin FullMental Trollemist

    Member
    1,813
    1,287
    Apr 1, 2015
    United States
    Vegeta's Hyrule
    This works for discs too? I'm asking since you mentioned the disc. Would probably be best to check without an update installed. I don't have any to test with. Haha.

    Anyways, autoboot (smash) might work better using this if instead of relying on the mounted device path. odd3 only seems valid after running a game from the disc on my Wii U, so autoboot only works after a game was previously loaded here.
     
  4. aracom

    aracom GBAtemp Fan

    Member
    476
    242
    Oct 1, 2015
    Gambia, The
    That's what I thought too when reading the PR on github.

    Anyways, thanks for researching this, it's gonna be a pretty helpful addition to some scripts I've done.

    EDIT: @MrRean Just tried that function, my WiiU always crashes when pyGecko tries to get the symbol for SYSCheckTitleExists. I guess it's a problem on my side?
     
    Last edited by aracom, Jan 4, 2016
  5. MrRean
    OP

    MrRean WiiU Helper / Hacker

    Member
    422
    1,500
    Jan 21, 2013
    United States
    updated, should work now
     
  6. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,536
    3,926
    Jun 9, 2007
    Antarctica
    Did you ever solve this? My Wii U just freezes after it tries to get the symbol for SYSCheckTitleExists too.

    Code:
    C:\Users\Dax\Downloads\cafiine\server>python launch.py
    Connecting to 10.10.10.109:7331
    Connected!
    Traceback (most recent call last):
      File "launch.py", line 5, in <module>
        SYSCheckTitleExists = tcp.get_symbol("sysapp.rpl", "SYSCheckTitleExists")
      File "C:\Users\Dax\Downloads\cafiine\server\tcpgecko.py", line 222, in get_sym
    bol
        address = self.s.recv(4)
    ConnectionResetError: [WinError 10054] An existing connection was forcibly close
    d by the remote host
    Do I need to use Python 2 for this script, or am I doing something else wrong?
     
  7. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,725
    1,407
    Aug 2, 2014
    Germany
    Do you also happen to have a generic function to launch the currently inserted disk game?
     
  8. rw-r-r_0644

    rw-r-r_0644 GBAtemp Fan

    Member
    333
    380
    Jan 13, 2016
    Italy
    Maybe:
    Code:
    _SYSLaunchTitleByPathFromLauncher("/vol/storage_odd03", 18, 0);
     
    Last edited by rw-r-r_0644, Sep 12, 2016
  9. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,725
    1,407
    Aug 2, 2014
    Germany
    This starts the Mii Maker so it's close enough. Now just for the disk :)
    Code:
    void startMiiMaker() {
        char buf_vol_odd[20];
        snprintf(buf_vol_odd, sizeof(buf_vol_odd), "%s", "/vol/storage_odd03");
        _SYSLaunchTitleByPathFromLauncher(buf_vol_odd, 18, 0);
    }
     
    Last edited by BullyWiiPlaza, Nov 11, 2016