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

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

  1. Benoit934

    Benoit934 Advanced Member

    Newcomer
    52
    25
    Oct 31, 2016
    France
    No it work pretty well but the only real improvement would be to mount USB disk FAT partition then but the SD card readonly so you avoid any data corruption issues, transferring files wirelessly take too long time
     


  2. Zarklord

    Zarklord GBAtemp Regular

    Member
    191
    64
    May 13, 2016
    United States
    yes i would want to mount mlc/usb.
    i would be mounting the sd card as a fat partition just like mlc/usb
    im confused where did i say wireless?

    either way i get a crash when on one of these two sections
    Code:
    //it failed either here
    int res = IOSUHAX_Open();
    if(res < 0)
    {
        log_printf("IOSUHAX_open failed\n");
    }
    //or here
    int fsaFd = IOSUHAX_FSA_Open();
    if(fsaFd < 0)
    {
        log_printf("IOSUHAX_FSA_Open failed\n");
    }
     
  3. Benoit934

    Benoit934 Advanced Member

    Newcomer
    52
    25
    Oct 31, 2016
    France
    Are you sure that everything is well defined ? I did tried mounting USB and it worked well, if i didn't launch the app through IOSUHAX is just don't work but not crashing

    I speak about wireless because i was thinking about mounting external FS so I gave up
     
  4. Zarklord

    Zarklord GBAtemp Regular

    Member
    191
    64
    May 13, 2016
    United States
    nah im making a rpx app that would be installable to the sys menu(assuming sig patches) and thats where i error
     
  5. dimok
    OP

    dimok GBAtemp Advanced Fan

    Member
    728
    2,174
    Jan 11, 2009
    United States
    Alright guys, here is an update to the library.

    I added DISC_INTERFACE devices for sd and usb to the library. Those disc interfaces can be used in combination with libfat, libntfs or libext2fs to mount varios devices with different filesystems on the wii u homebrews.

    One of a great improvements is that the SD speed is way faster than using the original FS library of nintendo. Another bonus is that mounting USB with other filesystems than the original nintendo WFS filesystem is now also possible. This could theoritically be used to mount the USB inside the MCP iosuhax module (aka wupserver) before the original MCP module starts to search for titles on the USB. Then force it to search on an NTFS/FAT32 formatted USB device through a hook. This is not done yet but it would be quite possible. Maybe with this some people that were sceptical above see some light in this now.

    What's done for now as a demonstration on how it works is a version of ftpiiu everywhere that uses libfat for SD and USB mounting. You can just insert a FAT32 formatted USB device either as first or 2nd usb device and it will be mounted by ftpiiu everywhere. It first tries the first device and if that fails then the second. Be aware hat if you attach the 2nd usb drive inside the WiiU Menu it will tell you to remove it and reboot. So only attach the 2nd device once you are inside HBL. If you only use one device as FAT32 you can attach it at any time. ftpiiu everywhere will automatically mount FAT32 usb devices to "usb" and WFS usb devices to "storage_usb".

    Where to find the new stuff?
    You can find the new update of libiosuhax on my github here:
    https://github.com/dimok789/libiosuhax/commit/918491b2db486dd3c6ddb45c009b14a9fefc3561

    I adapted libfat a bit to use the new disc interfaces as defaults. With that you can simply use fatInitDefault(); and it will mount the SD card and any FAT32 usb devices. Of course you can also just use the manual libfat mount functions. You can find it here:
    https://github.com/dimok789/libfat

    The new ftpiiu everywhere version that makes use of the new changes can be found here:
    https://github.com/dimok789/ftpiiu/tree/ftpiiu_everywhere
    Here a compiled version: http://www81.zippyshare.com/v/2wnWV6Xd/file.html

    Have fun with it
     
    futaris, gbamix, VinsCool and 11 others like this.
  6. ploggy

    ploggy WAKA! WAKA!

    Member
    1,793
    1,144
    Aug 29, 2007
    United Kingdom
    @dimok Sorry but can this now be used with retroarch to speed up the file browser?
    Thanks :)
     
  7. Benoit934

    Benoit934 Advanced Member

    Newcomer
    52
    25
    Oct 31, 2016
    France
    Just replace the mounting method then try it
     
  8. ploggy

    ploggy WAKA! WAKA!

    Member
    1,793
    1,144
    Aug 29, 2007
    United Kingdom
    Unless it's tied up nicely into a retorarch rpx of elf I wouldn't have a clue where to start. ;)
     
  9. Benoit934

    Benoit934 Advanced Member

    Newcomer
    52
    25
    Oct 31, 2016
    France
  10. lordelan

    lordelan GBAtemp Advanced Maniac

    Member
    1,516
    423
    Jan 4, 2015
    Gambia, The
    You are a f*cking legend! This is the greatest improvement since HBL/Loadiine! Finally this is the gate for Loadiine or redNAND or stuff like that to read games from one big FAT32 USB drive which can store vWii stuff and roms for RetroArchU as well! Thank you so much! :)
     
    futaris and KiiWii like this.
  11. Osakasan

    Osakasan GBAtemp Advanced Fan

    Member
    788
    446
    Sep 19, 2015
    Yeah, this may look small but it's fucking huge. We can stop depending on our SDs now.
     
  12. shinyquagsire23

    shinyquagsire23 SALT/Sm4sh Leak Guy

    Member
    1,962
    3,231
    Nov 18, 2012
    United States
    Las Vegas
    This won't work for Loadiine unless a Cafiine equivalent is written which uses this library to actually read from the FAT filesystem on the USB, since games by default use Nintendo's APIs. Personally I think a better solution for that is just mounting the USB as FAT in IOS (or if you want a lazy hack, redirect the SD card to USB on top of NAND to SD). This will work fine for RetroArch, though introducing CFW-specific code into homebrew generally seems like a bad idea to be honest. But that's just my two cents.
     
  13. QuarkTheAwesome

    QuarkTheAwesome Working for Hugs

    Member
    784
    1,920
    Apr 19, 2015
    Australia
    Stuck in the PowerPC
    In that case; I'd love to see your solution to FAT USBs in homebrew rather than the constant complaints that the public solution isn't up to your standards. If you want homebrew developers to use a different set of tools; then give them a different set of tools. I know I'd like to keep dependencies to a minimum (especially if one of those is a CFW) but you seem to have forgotten that whatever sorcery you're using isn't available to anyone else. All we've had the privilege of receiving is your complaints and radio silence from Wulfy once public ARM-side stuff got rolling. It's not a good look; and if this CFW setup takes off don't be suprised if your tools don't get much developer support (in the unlikely event they are released at all).

    I've seen some of the stuff you're working on (both you specifically and your team as a whole) and it's very cool. You lot have a knack for nice, elegant solutions; and I want things I make to be supportive of that. However; if you decide to keep criticizing public work in a non-constructive way like this and you keep failing to work with any of us while simultaneously expecting everyone to accommodate for developments nobody is allowed to see - don't be suprised when you find out (as @vgmoose would put it) that we didn't wait for Superman.

    (P.S. I've noticed who I'm speaking for in this post is a bit nebulus. To clarify; I only speak for myself, my feelings and my experiences, although I feel a few hard-hitting homebrewers echo this sentiment.)
     
    asper, Zulnoth, Crazystato and 11 others like this.
  14. VinsCool

    VinsCool Delusional

    Member
    GBAtemp Patron
    VinsCool is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,684
    27,655
    Jan 7, 2014
    Canada
    End of Time
    I hate to say that, because I usually try to not get into drama anymore, but I 100% agree with what you wrote there.
     
    lordelan and QuarkTheAwesome like this.
  15. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,389
    5,833
    Apr 20, 2015
    United States
    Tigard, OR
    is there any reason certain files/folders can't be accessed with FT2SD/ftpiiu everywhere? I can't seem to download some folders from game contents. just wondering because this seems to be random and I couldn't find anything in the thread.

    for example under /storage_mlc/usr/title/0005000e/10101d00/content/Common/ (NSMBU update USA) I can't view the course, param, subject, or unit folders, but I can open actor, distant_view, and env (there are more folders but these are what I tested).

    besides that, thanks for all your work on this, it's fun to dump the NAND filesystem and dig through all the files. :D
     
  16. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,664
    1,392
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    NSMBU update working with FTPiiU here.

    And believe me, replacing the files was A TON of fun! :P

     
    Last edited by AboodXD, Nov 29, 2016
    lordelan likes this.
  17. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,389
    5,833
    Apr 20, 2015
    United States
    Tigard, OR
    region?

    also, happen to own any wii games from the eshop? I have three but I can't get any of the /content/hif_0000*.nfs files (all fail to open, both nand/usb), so I needed to get the ticket and re-download from cdn to open them.
     
  18. AboodXD

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,664
    1,392
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    USA.
    Same title ID that you posted.

    Sadly, no.

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

    BTW, there's no "course" folder in the game. (game/update/dlc)
     
  19. icw35

    icw35 GBAtemp Fan

    Member
    480
    112
    Sep 22, 2010
    I compiled dimoks latest iosuhax fw.img and it works fine. Is this enough to use ftpii everywhere? Or do I need to compile this libiosu too? If I do, how do I link them?
     
  20. DanTheMan827

    DanTheMan827 GBAtemp Advanced Fan

    Member
    630
    394
    May 3, 2015
    United States
    Wisconsin
    Just curious... I haven't touched anything on the file system but do /dev/odd* work like in the unix world?

    What I'm getting at is, is there a /dev/odd "file" (or similar) that could access the raw optical drive in order to dump encrypted disc images?

    Do the storage devices even work like that? CAN they be copied like a file?

    Just some thoughts...