Official libiosuhax - PPC IPC library for communication to /dev/iosuhax

Discussion in 'Wii U - Homebrew' started by dimok, Nov 17, 2016.

  1. icw35

    Member icw35 GBAtemp Fan

    Joined:
    Sep 22, 2010
    Messages:
    480
    Country:
    United Kingdom
    Nvm. I just found the release notes on how to include :)
     


  2. icw35

    Member icw35 GBAtemp Fan

    Joined:
    Sep 22, 2010
    Messages:
    480
    Country:
    United Kingdom
    So, I compiled everything and got it all working. Wow. Simply wow. FTP everywhere...auto mount of SD everything works nicely!

    FanBloodyTastic.

    Thank you Dimok for this wonderful tool.
     
    QuarkTheAwesome likes this.
  3. dimok
    OP

    Member dimok GBAtemp Advanced Fan

    Joined:
    Jan 11, 2009
    Messages:
    721
    Country:
    United States
    Yep basically that's how it works yes. You can use the FSA_RawOpen() / Read/Write/Close functions of libiosuhax to access it even from PPC and dump whatever device you want in raw form to a file on the SD card.
     
  4. brienj

    Member brienj Trying to avoid getting cancer

    Joined:
    Jan 3, 2016
    Messages:
    1,232
    Country:
    United States
    I echo your sentiment. I've been pretty non-existent for two months for a variety of reasons, and they aren't all because I've been busy ...

    I hope to at least get something contributed soon, it all depends on a few things though.
     
    QuarkTheAwesome and Billy Acuña like this.
  5. ploggy

    Member ploggy WAKA! WAKA!

    Joined:
    Aug 29, 2007
    Messages:
    938
    Country:
    United Kingdom
    Is there any chance you could add this new lib to Retroarch please? Retroarch WiiU is pretty good already but file loading times are deadly lol
    and if this new lib could help even a little, it will be worth it :)

    Thanks
     
  6. Plasma816

    Newcomer Plasma816 Advanced Member

    Joined:
    Aug 9, 2016
    Messages:
    68
    Country:
    United States
    What happens if I turn the Wii U off while something in ft2sd is dumping?
     
  7. lordelan

    Member lordelan GBAtemp Maniac

    Joined:
    Jan 4, 2015
    Messages:
    1,287
    Country:
    Germany
    Dumping is a read process not a write process so your dump might be corrupted but the Wii U should still be fine.
     
    AboodXD likes this.
  8. Plasma816

    Newcomer Plasma816 Advanced Member

    Joined:
    Aug 9, 2016
    Messages:
    68
    Country:
    United States
    Didn't really care about dumping stuff THAT much anyway, so thanks.
     
  9. efen3001

    Member efen3001 GBAtemp Regular

    Joined:
    Apr 21, 2011
    Messages:
    153
    Country:
    United States
    Thank you!
     
  10. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    I successfully compiled the static library libiosuhax.a but I'm having trouble linking against it:
    Code:
    D:\Consoles\WiiU\Applications\Browser\tcpgecko>make
    linking ... tcpgecko.elf
    c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.8.2/../../../../powerpc-eabi/bin/ld.exe: cannot find -liosuhax
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/d/Consoles/WiiU/Applications/Browser/tcpgecko/tcpgecko.elf] Error 1
    make: *** [build] Error 2
    The way I edited the Makefile is as follows:
    Code:
    LIBS    := -lz -liosuhax # the last part has been added
    And I placed the libiosuhax.a in the project root directory:
    Warning: Spoilers inside!
    I also tried placing it in the src folder/build folder and renaming but it always gave me the same compilation error. This might be pretty nooby but help is appreciated, thanks. My repository is here.
     
    Last edited by BullyWiiPlaza, Mar 31, 2017
  11. Zarklord

    Member Zarklord GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    161
    Country:
    United States
    you do "make install" after doing "make", which copies the files into the correct devkitPPC folder, and then do make on your project, you don't need to copy libiosuhax.a anywhere manually.
     
  12. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    It doesn't seem like it copied itself there, why are you saying that? dimok said you need to edit the makefile and according to you, it works without but it doesn't:
    Code:
    D:\Consoles\WiiU\Applications\Browser\haxchi\installer>make
    main.c
    d:/Consoles/WiiU/Applications/Browser/haxchi/installer/src/main.c:14:21: fatal error: iosuhax.h: No such file or directory
     #include <iosuhax.h>
                         ^
    compilation terminated.
    make[1]: *** [main.o] Error 1
    make: *** [build] Error 2
     
    Last edited by BullyWiiPlaza, Mar 31, 2017
  13. Zarklord

    Member Zarklord GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    161
    Country:
    United States
    this is what happens for me when i run those commands and then it works perfectly fine upload_2017-3-31_15-31-13.png
     
  14. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    Nevermind, sorry
     
  15. nexusmtz

    Member nexusmtz GBAtemp Maniac

    Joined:
    Feb 17, 2016
    Messages:
    1,072
    Country:
    United States
    DRIVE-BY observation: Wouldn't you either specify the lib before the switches, or put the name of the library after the -l? Without looking at everything else, I'd have used -liosuhax if the lib was named iosuhax.a. Basically, look to see where it's finding z, and do that.
     
    BullyWiiPlaza likes this.
  16. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    Uh, so I installed the library, included it in the current source file and used one function from it but I get that the function is undefined?
    Code:
    #include <iosuhax.h>
    // ... random stuff inbetween
    int res = IOSUHAX_Open(NULL);
    Code:
    D:\Consoles\WiiU\Applications\Browser\tcpgecko>make
    pygecko.c
    linking ... tcpgecko.elf
    pygecko.o: In function `rungecko':
    pygecko.c:(.text.rungecko+0x850): undefined reference to `IOSUHAX_Open'
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/d/Consoles/WiiU/Applications/Browser/tcpgecko/tcpgecko.elf] Error 1
    make: *** [build] Error 2
    
    The iosuhax.h file says this:
    Code:
    int IOSUHAX_Open(const char *dev);  // if dev == NULL the default path /dev/iosuhax will be used
     
    Last edited by BullyWiiPlaza, Mar 31, 2017
  17. Zarklord

    Member Zarklord GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    161
    Country:
    United States
    hmm :unsure: did you run "make clean" and then "make" just to make sure it wasnt some weird compile bug?
     
  18. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    I just did that and it doesn't fix it...
     
    Last edited by BullyWiiPlaza, Mar 31, 2017
  19. Zarklord

    Member Zarklord GBAtemp Regular

    Joined:
    May 13, 2016
    Messages:
    161
    Country:
    United States
    how odd...
    just to double check you have
    1. done "make" then "make install" in libiosuhax directory
    2. -liosuhax is in your makefile
    if thats all true and correct then i really have zero ideas
     
  20. BullyWiiPlaza

    Member BullyWiiPlaza Nintendo Hacking <3

    Joined:
    Aug 2, 2014
    Messages:
    1,523
    Country:
    Germany
    I realized I had to edit the Makefile still but another error:
    Code:
    LIBS    := -lz -liosuhax
    Code:
    c:/devkitPro/portlibs/ppc/lib\libiosuhax.a(iosuhax.o): In function `IOSUHAX_Open':
    iosuhax.c:(.text.IOSUHAX_Open+0x3e): undefined reference to `IOS_Open'
    iosuhax.c:(.text.IOSUHAX_Open+0x42): undefined reference to `IOS_Open'
    iosuhax.c:(.text.IOSUHAX_Open+0x72): undefined reference to `IOS_Ioctl'
    iosuhax.c:(.text.IOSUHAX_Open+0x76): undefined reference to `IOS_Ioctl'
    iosuhax.c:(.text.IOSUHAX_Open+0xaa): undefined reference to `IOS_Close'
    iosuhax.c:(.text.IOSUHAX_Open+0xb2): undefined reference to `IOS_Close'
    collect2.exe: error: ld returned 1 exit status
    make[1]: *** [/d/Consoles/WiiU/Applications/Browser/tcpgecko/tcpgecko.elf] Error 1
    make: *** [build] Error 2
    
    It doesn't find the IOSU functions referenced in the library which is odd. How come?
     
    Last edited by BullyWiiPlaza, Mar 31, 2017

Share This Page