Adding > 2TB support to WiiMC

Discussion in 'Wii - Hacking' started by crwys, Aug 26, 2011.

Aug 26, 2011

Adding > 2TB support to WiiMC by crwys at 3:43 PM (4,267 Views / 0 Likes) 36 replies

  1. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    Ok so I have been going around trying to figure out why my 2.5TB usb drive crashes WiiMC.
    I reported the bug over on the bugtracker at WiiMC.
    It was then closed by Tantric with the comment:
    So it looks like > 2TB support won't happen through libntfs. It has been supported through cios d2x v6 though.
    Is there any way of incorporating cios d2x v6 with WiiMC?
    Or is there another way for WiiMC to support > 2TB hard drives?

    I would also like to thank Tantric, psyblade, the devs over at libntfs and tueidj (sorry if i spelt that wrong) for putting up with me when I have been trying to figure out this problem.
     


  2. scooby74029

    Member scooby74029 "fake coder"

    Joined:
    May 7, 2010
    Messages:
    1,174
    Location:
    oklahoma, USA
    Country:
    United States
    ill try to help you out man i first need to get wiimc set up to compile on my computer and i still havent been able to do that yet

    as soon as i do ill let you know and we will see if we can add it for you

    i would like to add a coverflow for covers also(for movies and music if possible)
     
  3. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    I have already done that but I am no coder.
    I guess its time to start learning though.
    If USB Loader GX is able to use cios then I'm pretty sure WiiMC can too, just have to figure out how to make WiiMC use cIOS then working out the bugs.
     
  4. giantpune

    Member giantpune GBAtemp Addict

    Joined:
    Apr 10, 2009
    Messages:
    2,860
    Country:
    United States
    < means "less than"
     
  5. XFlak

    Member XFlak Wiitired but still kicking

    Joined:
    Sep 12, 2009
    Messages:
    9,122
    Location:
    Ontario
    Country:
    Canada
    "How to not be a dumbass for dummies" by giantpune
    lol
     
  6. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    My bad, changed. Requested title change.
     
  7. alexh

    Newcomer alexh Member

    Joined:
    May 18, 2009
    Messages:
    20
    Country:
    United Kingdom
    Windows XP does not support USB drives larger than 2.2TB where each sector is 512bytes because it uses a 32-bit LBA. USB hard drive makers have got around this limitation by changing the sector size of these USB drives to 4Kbytes. 32-bit LBA with a sector size of 4Kbytes has a limit of 17.6TB

    Software has to have been written so that it reads the USB mode sense response (the USB command which returns the info which says what the sector size is) and does not always assume a 512byte sector size.
     
  8. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    scratch the USB
    thats thue for all harddrives
     
  9. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    This isnt new information. The new software would be cios d2x and I have already tested it with usb loader gx and it works.
    What the question is, is how to go about making cios d2x work with wiimc. They are both open source right? Maybe talking to the usb loader gx devs will give us an idea of how hard it is.
    But since wiimc never used cios, does that mean a lot more code re writing?
    all these questions may be simple but they are new to me.
     
  10. scooby74029

    Member scooby74029 "fake coder"

    Joined:
    May 7, 2010
    Messages:
    1,174
    Location:
    oklahoma, USA
    Country:
    United States
    i know that old versions of wiimc used to use Cios 202 but when the ahbprot thing came out they changed to ios58 which sucks most of the time
     
  11. shortz1994

    Member shortz1994 GBAtemp Maniac

    Joined:
    Jan 21, 2011
    Messages:
    1,341
    Country:
    United States
    there is a beta build of wiimc with 202 support added back in. i hate 58 for wiimc, it's a lot slower. would post but not sure if it's cool to. it might be back up on the main wiimc page? you'll need to re add 202.
    i had to in order to get it to work right.(follow the bunny. he's got my vote.).
     
  12. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    I dont think ios 202 works with my drive though. Only ciosx d2x v6 does because it adds support for 4kb sector drives
     
  13. scooby74029

    Member scooby74029 "fake coder"

    Joined:
    May 7, 2010
    Messages:
    1,174
    Location:
    oklahoma, USA
    Country:
    United States
    well you CAN use ModMii(Advanced Download section) and get Cios 249[56] d2x and change the slot to 202 install and run the 202 version and see what happens.
     
  14. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    Thanks for the tip but as tueidj said "you can't run an app magically on top of an ios and expect it to work"
    But i'll try it anyways.
     
  15. Indentity

    Newcomer Indentity Member

    Joined:
    Feb 5, 2011
    Messages:
    21
    Country:
    United Kingdom
    tried installing d2xv6 to IOS58 slot and see how you get on...
     
  16. shortz1994

    Member shortz1994 GBAtemp Maniac

    Joined:
    Jan 21, 2011
    Messages:
    1,341
    Country:
    United States
    but to use d2x wiimc has to be able to read or support d2x.. an i think it only support 58, or if you grab the newer beta it's back to 202. could be wrong. just starting to play with coding. so i still have a lot to learn. [​IMG]
     
  17. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    You are right I am pretty sure.

    I already tested the 202 versions with d2x202 and it resulted in the same code dump.
    I will try d2x58 for the hell of it with 1.1.9, see what happens.
    Thanks for trying to help everyone, but the only real solution is to edit the source and add support for cios21d2x for WiiMC.
    And I don't think Trantric will do that so unless another good coder steps forward, it is going to take it a while to do it my self.

    Edit:
    Ok that was a bad idea lol.
    First it broke the homebrew channel, when trying to load the homebrew channel it would just load the hackmii installer, then freeze.
    I loaded WiiMC through bannerbomb, it loaded, but then it said "The current IOS is unsupported. Functionality and/or stability may be adversely affected." then the Wii crashed with the code dump.

    I posted a video here of the result just for anyone who wants to see it.
    http://www.youtube.com/watch?v=vtFquh-w5VU
     
  18. tueidj

    Member tueidj I R Expert

    Joined:
    Jan 8, 2009
    Messages:
    2,569
    Country:
    Forget about the damn cios already, it is completely irrelevant.

    Tantric is right, Dimok is wrong. The issue is in his ext2 library, not libntfs:
    http://code.google.com/p/libext2fs-wii/sou...e/gekko_io.h#30
    http://code.google.com/p/libext2fs-wii/sou...e/gekko_io.c#81
    http://code.google.com/p/libext2fs-wii/sou...e/gekko_io.c#90
    There's probably more bugs, but those are the ones that jumped out at me.

    Saying libogc doesn't support large sector sizes or drives larger than 2TB is incorrect and I think he's probably aware of that (why would he have implemented it in libntfs if libogc didn't support it...) so I don't know why he said it.
     
  19. crwys
    OP

    Member crwys GBAtemp Maniac

    Joined:
    Jun 26, 2008
    Messages:
    1,146
    Country:
    United States
    Tueidj, thanks again for the help.
    I have been getting a lot of stories but I think I finally got a clear solution figured out now.
    I reported the bug over at libext2fs-wii as well but no one over there has gotten back to me yet.
    So fix the bugs in libext2fs-wii and then my drive will work. Hopefully the devs will do that soon.

    If I could ask you some questios Tueidj...
    You mentioned the bug in this link. This bug could be fixed by either changing it to
    #define MAX_SECTOR_SIZE 4096
    Or
    #define BYTES_PER_SECTOR 4096
    Both are the same correct? Because we are just "defining" something? Except in libext2fs, if the current define name is changed, I may have to change other parts of code in the source to recognize the new #define name?
    The bugs you mentioned here and here,
    struct ext2_super_block * super = (struct ext2_super_block *) mem_alloc(SUPERBLOCK_SIZE); //1024 bytes, so this is saying superblock_size is a structure and it is assigned to sectors of 1024 bytes, while this, if (!interface->readSectors(fd->startSector+SUPERBLOCK_OFFSET/BYTES_PER_SECTOR, SUPERBLOCK_SIZE/BYTES_PER_SECTOR, super)), piece of code is saying it divides 1024 making 512b which is the bug.
    Correct me if I am wrong, but I understand this much, but changing simple values from 512 to 4096 and 1024 to 8192: Will this actually work?

    In theory, if a nub coder like me, could easily fix the bugs in libext2fs by comparing the source with the libntfs source?
    If you could answer these questions, that would be nice. Thank you.
     
  20. tueidj

    Member tueidj I R Expert

    Joined:
    Jan 8, 2009
    Messages:
    2,569
    Country:
    Possibly, since they both use gekko_io.c/.h files you might be able see which bits need changing.
     

Share This Page