Hacking Uneek + Hard drive

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
i have a hard time getting any sneek version to work properly with my new hard drive. it's a usb3.0 with 500gb.
nevertheless this hard drive is detected by the usb loaders and can play games.

when i start any sneek version, mostly uneek+di, i get a no signal black screen and after a while a 1time blinking.
BUT if i start the wii on my realnand and THEN press reset in the healthscreen with my sd card in, my harddrive is detected and shows response and everything works perfect. the same goes with when i use switch2uneek.

so i thought it was because of a slow boot up of my hard drive.
i added this code in fs-usb/ehci.c in ehci_reset_port:
Code:
dev->id = 0;
// NEW CODE START
int retries = 30;
while (!(PORT_CONNECT&status) && retries > 0)
{
msleep(1000);  // sleep 1 second
status = ehci_readl(status_reg);
ehci_dbg ( "port %d status at retry %d %X \n", port,retries,status);
retries--;
}
// NEW CODE END
if ((PORT_OWNER&status) || !(PORT_CONNECT&status))

playing around with retries and msleep didnt help either.
the reset workaround still works with this code, so im not sure anymore if it's because of a slow boot up of my hard drive.
i dont have any debug output device.

help? please?
 

shortz1994

Well-Known Member
Member
Joined
Jan 21, 2011
Messages
1,340
Trophies
0
XP
369
Country
United States
as far as i know an understand, 3.0 usb device will not work.(wii/*neek limitation). try an get a separate sd card, an install sneek(no di) to see if that boots up. but i'm pretty sure it's cause your triying a 3.0 hd. plus a reminder,*nek if it does support 3.0.. you need to have the hd as a fat32.(if you haven't done this yet).
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
i said in the beginning, that it WORKS for me when i reset the wii from real nand. (sometimes it also works when i turn it off and immidietly turn it on again.)
my hd is fat32. i can get sneek, uneek and both with di booting with resetting.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Let me guess? Some western digital passport drives.
I had 2 of those and ended up using a low cost 2.5" enclosure with a laptop sata drive.
No spindown suspend problems ever since.

Since it works with your usb loader, it somehow is hardware compatible (it normally should be.)

Maybe you could find the usb ehci code used in the cios and compare that to the neek ehci code.
It wouldn't suprise me that those are very much alike, but probably the neek code never got updated and fine tuned.

Sorry, I can't give you more help.
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
well, it's a 2,5 drive from cnmemory.

is this the ehci code, that is still used or are there newer ones? (that's the only one i could find)
https://github.com/waninkoko/ehci-module/blob/master/tinyehci/ehci.c
if yes, i will take a look into that, but i doubt that i can do anything useful with this.
thanks anyway!
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
well i tried to adapt the ciosx code to the sneek code, but either the outcome was the same or it was incompatible.
im pretty much unexperienced with this though.

im not sure if the cios code would work anyway, since the usb drive is already longer connected to the wii until i start the usb loader.
the same is with sneek, when i start the realnand, reset it into the sneek nand -> the usb is longer connected, too.

anybody?
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
So, if I understand correctly, when the drive had time to become ready before it was accessed, everything works? If you run an usb loader, it can acces the harddrive?
You could try to add a delay to the startup of fs-usb, as this would basically do the same. It might be worth trying just to ensure this is indeed the issue.
Is your usb loader launched from the hbc or from a channel? In the first case, the hbc probably already initialised and accessed the harddisk. Maybe It only does that when the homebrew
is loaded from the harddisk instead of the sd card.
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
So, if I understand correctly, when the drive had time to become ready before it was accessed, everything works? If you run an usb loader, it can acces the harddrive?
yes, correct.

You could try to add a delay to the startup of fs-usb, as this would basically do the same. It might be worth trying just to ensure this is indeed the issue.
how/where can i do that exactly?

Is your usb loader launched from the hbc or from a channel? In the first case, the hbc probably already initialised and accessed the harddisk. Maybe It only does that when the homebrew is loaded from the harddisk instead of the sd card.
from hbc, but i load it from the sd card, since the hbc seems not to recognize my usb drive.

going into standby mode (the led of my usb drive is still on) and then booting into sneek works, too.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
It really looks like your harddisk needs power connected some seconds before you try to acces it.
I wonder if a powered usb hub between the harddisk and the wii would fix the issue as well.
I guess you don't have such a hub lying around.
I have had harddisks that gave problems with the HBC as well. If you had switched hbc to usb,, you could see the homebrew on it after you power cycled the wii once.
Maybe yours will work to if you use that trick?
in fs-usb main.c, main function you will find the following line of code:

//dbgprintf("FFS:Mounting USB...\n");
ret = f_mount(0, &fatfs);
Just before it, you could add a
udelay(2000000);

this should delay the harddisk access for 2 seconds. It's worth a try.
Don't shoot me if it doesn't work.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
I am trying to help as much as I can. It makes me understand the weak points of the system better.
I think the link to the issue you proposed is the one PizzaPino initially used in an attempt to fix his problems.
The problem was indeed similar.
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
yes i really have to thank obcd again for his help.

i only have an unpowered usb hub at home, maybe i can manage to get a powered one.
yes i used that link already to try to fix my problem.

i will try all that when i come home from university in 10-11hours..
 

stfour

Well-Known Member
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
If you have priiloader you can try to install priibooter.dol to boot to uneek (from postloader2 package). It will initialize your usb hdd before doing so. My hdd take more then 9 second to init, and works fine in this way.
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
yes i was already thinking about this too. it wouldnt be the ideal solution, but if i can't get it work within sneek, i'd do that. thanks.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
@stfour

is this the new harddisk you talked about that gave you problems?
My added delay is only 2 seconds, but I guess you could find out how to make it 9 or 10
the google article also shows the debug output of his boot process. His harddisk needed 5 seconds as well.
It's a fustrating problem. I hope it get's fixed properly once.
 

stfour

Well-Known Member
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
No it is another one.... the slow hdd is a samsung G3 1.5 TB. It take a lot of time to start from off or standby. It works perfectly once started, also with neek. It is only giving problem with wiimc, that loose it after a period of activity.

The hdd that is givin me big problems are two WD 250gb 2.5" sata with a generic box. They works perfectly in every situation, but sometime (on the first boot after fresh image, always) under neek startup they shutdown (the power led turn off, so I think that is the wii usb that is disabled). The only way to install uneek on them was using an old 40gb and after the first boot copying files from it to the 250gb.

Also they stop working after a period of inactivity.
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
Also they stop working after a period of inactivity.

I think this could be fixed in uneek by accessing it regulary when no other activity is seen.
All disk access passes trough fs-usb, so it's easy to check and generate activity in there..
It's not like the real nand homebrew applications that use the libogc ehci which is linked with the application.

Could it be that the power consumption of your 2.5" inch sata drives is to high? Normally, an usb port only allows 0.5A.
My western digitals in a generic box consume 0.55A. My cable has 2 usb connectors, one only used to get additional power for the drive.

It's also possible that the shutdown is done by the disk firmware itself.
In that case, you might find a tool on the manufacturer website to disable it.
It will probably require to connect the harddisk to a sata port of your pc, which might not be possible if you are using a portable computer.
 

stfour

Well-Known Member
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
I've tried to use external power cable without success. I will write a little appl that will generate a lot of activity on the disc to check if it is really matter in "hb" mode.
 

PizzaPino

Well-Known Member
OP
Member
Joined
Oct 4, 2008
Messages
308
Trophies
0
XP
203
Country
Spain
for all those who have a slow boot up hard drive, obcd gave the fix.
adding a delay of only 1second (that's the value for me, might vary for others) right before the mounting of the hard drive made it work (and mine has even usb 3.0 but already worked with the normal usb loaders)
BIG THANKS again obcd!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: rule 63 went too far nowadays