USB Loaders and 4096 sectors hard drives

Discussion in 'Wii - Backup Loaders' started by SaintSeiya, Feb 7, 2010.

Feb 7, 2010
  1. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    I wonder why almost all usb loaders (except NeoGamma) don't work with new drives with 4096 physical sectors.
    Is there any chance for a fix?

    Thanks in advance
     


  2. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    I seriously doubt that NeoGamma has a different hardware compatibility than the other loaders. Well if the other loaders also use Waninkoko's cIOS. So if you have a HDD that only works in NeoGamma for you, select IOS249 in the others to make it work.
     
  3. fig2k4

    Member fig2k4 GBAtemp Advanced Fan

    Joined:
    Oct 30, 2009
    Messages:
    758
    Location:
    Scotland
    Country:
    United Kingdom
    Standard libWBFS uses hardcoded values for the sector size (512) in the read a write sector routines. I noticed that you use a USBStorage_ReadSectors() function in NeoGamma, which uses the real sector size.

    I haven't checked the source of other loaders, but if they use the same hardcoded values then it would explain why it works in NeoGamma and not others.

    It's one thing I changed when I converted libWBFS to my Delphi code for WBM. I haven't had a drive to test it, but having a variable hd_sec_sz, then using 512 in the read and write routines is obviously wrong.
     
  4. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    Hmm, when adding usb loading capability, i took the code as it was from Waninkoko's usb loader. So the other loaders should have the same code in them, if not they either used an older usb loader as base, changed the code on their own, or there was an "update" i missed.
     
  5. fig2k4

    Member fig2k4 GBAtemp Advanced Fan

    Joined:
    Oct 30, 2009
    Messages:
    758
    Location:
    Scotland
    Country:
    United Kingdom
    I just check the CFG code, it uses the same function as NeoGamma so my theory was a bit off.. [​IMG]
     
  6. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    I tried USB Loader GX, Configurable USB Loader (ios 249 selected with Configurator and saved in the config file) but both give me ''Exception (ISI) occurred'', Uloader 4.1 says: USB Device Sectors Size must be 512 bytes.
    Only NeoGamma works perfectly.

    Any idea?
     
  7. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    What cIOS are you using? And did you try with the lastest versions configurable usb loader and GX with completely cleared config, no pictures on sd card and stuff?
     
  8. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    cIOS38 rev17. I tried the latest versions of both loaders with cleared config. The sd is not empty but I used a pendrive without problems.
    Today I tried WiFlow too but it displays always the same error.
     
  9. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    Ok, let's fix this. On configurable usb loader, you can use a wbfs formatted usb pen using IOS249. If you try the same with your wbfs formatted HDD, you get the exception?

    If yes, gather all information that could be relevant and describe it as precise as you can in the configurable usb loader thread. Don't forget to tell that the same HDD works with the same cIOS on NeoGamma. I hope oggzee will pick this up then and fix it.

    PS: Once it would be fixed on configurable usb loader, the other loaders devs could copy the necessary change of course
     
  10. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    Ok, thanks. [​IMG]
     
  11. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    Can you make a screenshot of the error and also let me know exactly when does it happen?
    Is it during the intro screen or usb init or when?
    Also can you add the option debug=1 and let me know after which step the exception occurs?
    I will then make another debug version which should give me more details...
    Also, were you using normal cfg boot.dol or cfg-fat.dol, can you try both?
     
  12. tadija

    Newcomer tadija Newbie

    Joined:
    Dec 30, 2009
    Messages:
    2
    Country:
    Yugoslavia
    Ok, I have the same problem... [​IMG]

    I have bought today transcend storejet 2.5 640gb which also has 4096 physical sectors.

    With every loader I tried (cfg, gx, wiiflow - latest versions) I get same "exception isi occurred" error.

    I couldn't format the drive to WBFS properly with any tool, so I tried FAT32 with WBFS folder and .wbfs files.

    I tried cfg-fat.dol but it's the same error, I think it's going on at usb init (there's no error without drive attached), and it's after the intro screen.

    Every loader worked on my wii with my old WD320 hdd which I don't have anymore.

    I couldn't try Neogamma because it only support wbfs drive, and i couldn't format to wbfs (I don't know why?!),
    but Neogamma didn't show any errors when I try load from usb (I don't know does it do usb init if there's FAT32 hdd attached).

    If somene has any ideas, please...

    Greetings to all
     
  13. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    It has to do usb init, without usb init, it can't know if there's a wbfs partition or not.
     
  14. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    What I suspect is the error might be caused when trying to mount fat partitions from USB, not when mounting WBFS partition... but that's a blind guess, that's why i'm asking for more details. Without those it's hard to start fixing it...
     
  15. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    Here I am!
    I did everything you've told me:
    1. The error occurs right after the splash screen.
    2. I tried revision 51, 52 and 52-fat with the same result.
    3. I added option debug=1: in this case the error occurs after it has loaded ios 249, while it's accessing to hard drive.

    Screenshot Debug (just before the error) [​IMG]

    @tadija

    WBFS Manager didn't work for me, try to use Wii Backup Manager 0.3.4. I'm sure you'll able to format your drive in wbfs and make it work with NeoGamma.
     
  16. ViRGE

    Member ViRGE GBAtemp Fan

    Joined:
    Dec 4, 2004
    Messages:
    363
    Country:
    Perhaps I'm missing something here, but why do the loaders care about 4K drive sectors? All of these hardware vendors should be doing 512B4K translation (including read-modify-write for unaligned write operations) in their drive's firmware, so that the (S)ATA controller and the operating system see the drive as yet another 512B sector drive. The loaders shouldn't be seeing 4K sectors.
     
  17. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    That's correct and that's what i will try.
    The drive probably reports 4k sector, and that's what we use, but i will try what happens if we force it to 512.
     
  18. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    @SaintSeiya:
    @tadija:

    Can you try this:

    cfg52t2.dol (test)

    It will print some hdd info like number of sectors, sector size, hdd size.
    Can you make a screenshot of that.
    Then press any button and let me know if it works or not, it will try to force the 512 sector size.
     
  19. SaintSeiya
    OP

    Newcomer SaintSeiya Member

    Joined:
    Feb 5, 2010
    Messages:
    18
    Location:
    Naples
    Country:
    Italy
    wbfs error: hd sector size doesn't match

    I'm uploading a video of that.
     
  20. oggzee

    Member oggzee GBAtemp Addict

    Joined:
    Apr 11, 2009
    Messages:
    2,335
    Country:
    Slovenia
    Please do post a screenshot of the hdd info screen too as requested, so that i can see the numbers, or write them down.
    I need to see which size is calculated correctly...
    Oh, and can you enter the partition selection screen now? can you make a screenshot of that too?
     

Share This Page