Hacking USB Loader Hard Drives - Call to coders

tedgreen

Member
Newcomer
Joined
Oct 4, 2008
Messages
13
Trophies
0
XP
91
Country
United States
I've also been playing around as my enclosure (vantec nextstar cx) occasionally is not detected. It's kinda weird as either it is detected within the first 4 counts or within the last 10 counts of timer but never in the middle.
I've tried all sorts of delays and loops to the init/open calls but can't seem to improve the detection success rate. I noticed that Waninkoko's new 1.5 version puts a loop around the WBFS_Init call but in my own testing of calling this routine multiple times the hard drive is always detected in the first call or not at all.
I'm guessing that the detection problem is inside of the IOS itself.
 

ether2802

we have the techno...!!
Former Staff
Joined
Oct 14, 2007
Messages
4,349
Trophies
0
Age
41
Location
Pto. Vallarta
XP
312
Country
Mexico
What is the order of the things that the loader does..?? I mean does it call the IOS to be able to start the app before mounting the device, just like a game disc with his IOS..??
huh.gif
 

tedgreen

Member
Newcomer
Joined
Oct 4, 2008
Messages
13
Trophies
0
XP
91
Country
United States
The loader order is basically:
calls IOS_ReloadIOS(249);
calls WBFS_Init(WBFS_MIN_DEVICE);
which calls -> USBStorage_Init();
then -> USBStorage_GetCapacity(&sector_size);

The failure occurs when the get capacity routine returns a zero.

I just tried the lsusb program and the usb device seems to be detected by it okay (152d JMicron Technology Corp. / JMicron USA Technology Corp).
 

ether2802

we have the techno...!!
Former Staff
Joined
Oct 14, 2007
Messages
4,349
Trophies
0
Age
41
Location
Pto. Vallarta
XP
312
Country
Mexico
check the other utility posted above (but it needs to have the device formated as FAT or FAT32) to see if works right too, cause it also makes me think (but what da' f*** do I know) that depending on the manufacturer the devices send the info in different order....!!
 

Lexip;

Well-Known Member
Member
Joined
Apr 8, 2009
Messages
413
Trophies
0
XP
83
Country
United States
tedgreen said:
The loader order is basically:
calls IOS_ReloadIOS(249);
calls WBFS_Init(WBFS_MIN_DEVICE);
which calls -> USBStorage_Init();
then -> USBStorage_GetCapacity(&sector_size);

CODEs32 USBStorage_GetCapacity(u32 *_sector_size)
{
ÂÂÂÂif (fd > 0) {
ÂÂÂÂÂÂÂÂs32 ret;

ÂÂÂÂÂÂÂÂret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_GET_CAPACITY, ":i", &sector_size);

ÂÂÂÂÂÂÂÂif (ret && _sector_size)
ÂÂÂÂÂÂÂÂÂÂÂÂ*_sector_size = sector_size;

ÂÂÂÂÂÂÂÂreturn ret;
ÂÂÂÂ}

ÂÂÂÂreturn IPC_ENOENT;
}

I'm curious to what ret is equal to

Maybe you might be able to force it?
 

gamerjr

Well-Known Member
Member
Joined
Jan 7, 2008
Messages
247
Trophies
0
Age
32
XP
242
Country
United States
QUOTE said:
I'm curious to what ret is equal to

Maybe you might be able to force it?

I was thinking the same thing, only side effect would be it may easily destroy a hard drives partition rendering it useless. But im not sure.
 

steve-p

Well-Known Member
Member
Joined
Apr 13, 2009
Messages
503
Trophies
0
XP
143
Country
why dont you just look at the part number on the usb>ata bridge chip and then see if it's listed in the Linux kernel-source?
there may be a problem and a workaround there.
 

gamerjr

Well-Known Member
Member
Joined
Jan 7, 2008
Messages
247
Trophies
0
Age
32
XP
242
Country
United States
QUOTE said:
I'm curious to what ret is equal to

Maybe you might be able to force it?

I was thinking the same thing, only side effect would be it may easily destroy a hard drives partition rendering it useless. But im not sure.
 

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
frankomio: Yes, I did try compiling my first suggestion, unfortunately it gave me a code dump error when I tried it.

Here's the LSUSB output for my troublesome hdd enclosure, maybe if everyone who has a troublesome enclosure runs LSUSB and posts the output (saved onto the SD card as a text file), maybe there's some correlation that we can narrow down.

It's a Comstar Platinum 500GB enclosure, currently using it with a spare 20GB HDD for testing because the 500GB is formatted as NTFS. This is what it looks like:

10080571.gif


Code:
ÂÂÂÂUSB Device Details

bLength: 18
bDescriptorType: 1
bcdUSB:ÂÂ2.00
bDeviceClass: 0
bDeviceSubClass: 0
bDeviceProtocol: 0
bMaxPacketSize0: 64
idVendor: 0x040d
idProduct: 0x6204
bcdDevice:ÂÂ0.03
iManufacturer: 1
iProduct: 2
iSerialNumber: 3
bNumConfigurations: 1
Config Descriptors:
ÂÂÂÂbLength: 9
ÂÂÂÂbDescriptorType: 2
ÂÂÂÂwTotalLength: 32
ÂÂÂÂbNumInterfaces: 1
ÂÂÂÂbConfigurationValue: 2
ÂÂÂÂiConfiguration: 0
ÂÂÂÂbmAttributes: 0xc0
ÂÂÂÂbMaxPower: 50
ÂÂÂÂInterface Descriptors:
ÂÂÂÂÂÂÂÂbLength: 9
ÂÂÂÂÂÂÂÂbDescriptorType: 4
ÂÂÂÂÂÂÂÂbInterfaceNumber: 0
ÂÂÂÂÂÂÂÂbAlternateSetting: 0
ÂÂÂÂÂÂÂÂbNumEndpoints: 2
ÂÂÂÂÂÂÂÂbInterfaceClass: 8
ÂÂÂÂÂÂÂÂbInterfaceSubClass: 2
ÂÂÂÂÂÂÂÂbInterfaceProtocol: 80
ÂÂÂÂÂÂÂÂiInterface: 0
ÂÂÂÂÂÂÂÂEndpoint Descriptors:
ÂÂÂÂÂÂÂÂÂÂÂÂbLength: 7
ÂÂÂÂÂÂÂÂÂÂÂÂbDescriptorType: 5
ÂÂÂÂÂÂÂÂÂÂÂÂbEndpointAddress: 0x81
ÂÂÂÂÂÂÂÂÂÂÂÂbmAttributes: 0x02
ÂÂÂÂÂÂÂÂÂÂÂÂwMaxPacketSize: 0x0040
ÂÂÂÂÂÂÂÂÂÂÂÂbInterval: 0
ÂÂÂÂÂÂÂÂÂÂÂÂbLength: 7
ÂÂÂÂÂÂÂÂÂÂÂÂbDescriptorType: 5
ÂÂÂÂÂÂÂÂÂÂÂÂbEndpointAddress: 0x02
ÂÂÂÂÂÂÂÂÂÂÂÂbmAttributes: 0x02
ÂÂÂÂÂÂÂÂÂÂÂÂwMaxPacketSize: 0x0040
ÂÂÂÂÂÂÂÂÂÂÂÂbInterval: 0

I tried to run the USB mass storage tester, it bombed with the error message "USBStorage_Open() returned -10000". I have a feeling the problem is with libogc or the usbstorage module.
 

Dteyn

Well-Known Member
OP
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
steve-p said:
why dont you just look at the part number on the usb>ata bridge chip and then see if it's listed in the Linux kernel-source?
there may be a problem and a workaround there.

The controller is a VIA Vectro VT6204 USB 2.0 to IDE Bridge Controller. More information is available here:
http://www.via.com.tw/en/products/peripherals/usb/vt6204/

I'm just downloading the Linux kernel source now to see if I can find any reference to it.
 

WiiPower

Well-Known Member
Member
Joined
Oct 17, 2008
Messages
8,165
Trophies
0
XP
345
Country
Gambia, The
tedgreen said:
The loader order is basically:
calls IOS_ReloadIOS(249);
calls WBFS_Init(WBFS_MIN_DEVICE);
which calls -> USBStorage_Init();
then -> USBStorage_GetCapacity(&sector_size);

The failure occurs when the get capacity routine returns a zero.

I just tried the lsusb program and the usb device seems to be detected by it okay (152d JMicron Technology Corp. / JMicron USA Technology Corp).

Actually it's:

calls IOS_ReloadIOS(249);
then Fat_MountSDHC();
calls WBFS_Init(WBFS_MIN_DEVICE);
which calls -> USBStorage_Init();
then -> USBStorage_GetCapacity(&sector_size);


I'm really interested if it changes anything if the sdhc module isn't touched until the usb storage is completey detected.
 

steve-p

Well-Known Member
Member
Joined
Apr 13, 2009
Messages
503
Trophies
0
XP
143
Country
maybe after calling the usb init,
you should throw a spinup command at the drive? it could be in powerdown mode.
 

kevin8622

Member
Newcomer
Joined
Apr 15, 2009
Messages
8
Trophies
0
XP
1
Country
France
Maybe I can help you with my error...

I cannot use ANY usb loader to install game from my backups, it results of a "WBFS Panic : Malloc fst" after displaying the backup's title (on any hard disk). If a use original it works fine.
But my backups works fine if I play them with the disc channel ! I never had any read error.

From 1.0 to 1.5 and any mod work on my Wii to install game directly from the Wii. I must use FTPii+my computer to copy my backups to my WBFS partition
frown.gif
 

steve-p

Well-Known Member
Member
Joined
Apr 13, 2009
Messages
503
Trophies
0
XP
143
Country
rip those iso's with imgburn and try to install them with wbfs.
if they wont then 2 things to try.
1: use scrubber to clean the partition-table up.
2: use the encryptor that was posted here on the iso.
 

jovanah

Active Member
Newcomer
Joined
Apr 4, 2009
Messages
43
Trophies
0
Location
Australia
XP
53
Country
Hi Guys

Not sure if this will help or give any insight, or i may just be talking cr*p.

I've tried usb loader 1.1 to 1.5 with 2 different type of usb enclosures with 4 different laptop hard drive. 2 where sata and 2 where ide.

The sata enclosures i have is a Vantec and i tested it with a Seagate and Westen Digital HDD.
The Westen Digital will only be detected by USB Loader after I've booted Geexbox and rebooted via the Geexbox menu. I can then load USB loader and play the games without any problem, i can even go in and out of different games. (This drive is partitioned)
The Seagate drive would not detect at all, not even Geexbox would detect it. (but is working fine on my pc)

The IDE enclosure is a cool master x-force. This worked like a treat!
I tested it on a Toshiba 60gb, and another 120gb (can't remember the brand) Both where detected by USB loader first go, i even had an old Compaq 20gb laptop drive and it worked.

Thing is i can't tell if the problem is the Enclosure units or Sata / IDE capability.

Like i said i don't know if this will help you guys or mean anything, but i figured i would post it just encase
 

tedgreen

Member
Newcomer
Joined
Oct 4, 2008
Messages
13
Trophies
0
XP
91
Country
United States
Tried removing Fat_MountSDHC() until after harddrive detection-> No noticeable change in detection probability.

Tried sending a fixed size from USBStorage_GetCapacity-> Get a "No WBFS partitions found" message.

Anyone know where the lsusb source for the wii would be?
 

KingSquitter

Member
Newcomer
Joined
Apr 19, 2009
Messages
18
Trophies
0
XP
2
Country
I've done some testing and from what i can tell the issue is when the "USBStorage_GetCapacity" function gets called. If you call "USBStorage_GetCapacity" with a hdd that works and
then switch to the non working hdd directly after, it will work.

If you have Cios_usb2_beta3.tar.bz2 installed, installes as ios202, and then changes "IOS_ReloadIOS(249);" to "IOS_ReloadIOS(202);", the hdd will get detected (can't play any backaps from 202, need 249 for that). I think that Custom IOS36 rev 10 uses code from beta2 and not beta3. Unfortunately there is no source code for Custom IOS36 rev 10 so i can't verify.
 

wiirfreaks

Member
Newcomer
Joined
Oct 14, 2008
Messages
11
Trophies
0
Website
Visit site
XP
12
Country
Gambia, The
guys,
i think to get a recognized HDD has maybe more to do with the interface (adapter) as with the hdd...
i have testet 6 HDD and 1 USB-Stick....
2x Western Digital WD200 & WD800 (20gb and 80 gb)
a Maxtor DiamondMax Plus 9 (60 GB)
a Seagate ST340810A (40 gb)
a samsung SP2514N (250 gb)
a 2,5" Fujitsu MHV2100AT (100 gb)
and a Sharkoon 4 gb usbStick

have testet all HDDs with the same adapter and no one of these HDDs has recognized by the wii
only the Sharkoon USB-Stick works perfekt.
could it be that the interface is more important than the HDD Name?
 

darkangel5000

Well-Known Member
Member
Joined
Apr 26, 2008
Messages
394
Trophies
1
Age
33
Location
Unna, ~Dortmund :3
XP
1,224
Country
Germany
wiirfreaks said:
could it be that the interface is more important than the HDD Name?
Yep, I think so, because I have tested two HDD enclosures, and only one of them actually works, no matter which HDD is inside.
The hard disks I've been testing with were a IBM Deskstar Pro with 40GB, a Maxtor 80GB, a WD 40GB and a Seagate Barracuda 400GB - and as I previously said, every hard disk works, but only in connection with one of the two built in ide->usb interfaces.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    linuxares @ linuxares: Brazil?