 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Derek8588
Joined: 22 Oct 2004 Posts: 62
|
Posted: Wed Aug 20, 2008 2:40 pm Post subject: usb_mass and ps2link problems |
|
|
Hello! I have created a simple program that loads the appropriate USB drivers to use a mass storage device. However, I can only run it from uLaunchelf. When I run it from ps2link, ps2link crashes and video output stops (blue screen).
| Code: |
int ret;
SifInitRpc(0);
init_scr();
// SBV Patches
sbv_patch_enable_lmb();
sbv_patch_disable_prefix_check();
ret = SifLoadModule("rom0:SIO2MAN", 0, NULL);
ret = SifLoadModule("rom0:MCMAN", 0, NULL);
ret = SifLoadModule("rom0:MCSERV", 0, NULL);
ret = SifLoadModule("rom0:PADMAN", 0, NULL);
ret = SifLoadModule("rom0:IOMAN", 0, NULL);
mcInit(MC_TYPE_MC);
ret = SifLoadModule("mc0:usbd.irx", 0, NULL);
ret = SifLoadModule("mc0:usb_mass.irx", 0, NULL);
nopdelay();
ret = usb_mass_bindRpc();
if (ret < 0 )
{
scr_printf("\nSifBindRpc failed: %d !!!!\n", ret);
}
else
{
scr_printf("Usb Driver Initialized\n");
}
|
When run from uLaunchelf, "Usb Driver Initialized" is printed to my screen.
When run from ps2link, crazy stuff happens :) Can someone please explain why this is happening and is there a way around it? Thanks |
|
| Back to top |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Wed Aug 20, 2008 3:03 pm Post subject: |
|
|
Could it be that ps2link does not reset the IOP before starting your app? I do not know how uLaunchelf behaves.
In which case the MC related modules would already be loaded, and may object to a 2nd attempt.... Just a suggestion :) _________________ Damn, I need a decent signature! |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Wed Aug 20, 2008 4:42 pm Post subject: |
|
|
As far as I remember of the top of my head, I don't think you need to load rom0:IOMAN for USB support and I think PS2Link already loads a variant of this module in the form of iomanx.irx from PS2SDK, this conflict could be your problem. _________________ Lukasz.dk |
|
| Back to top |
|
 |
Derek8588
Joined: 22 Oct 2004 Posts: 62
|
Posted: Thu Aug 21, 2008 1:37 am Post subject: |
|
|
| Lukasz wrote: | | As far as I remember of the top of my head, I don't think you need to load rom0:IOMAN for USB support and I think PS2Link already loads a variant of this module in the form of iomanx.irx from PS2SDK, this conflict could be your problem. |
Well I just tried loading it through ps2link again without loading IOMAN as you said, same thing occurs. However, I briefly saw the exception handler which stated that something was wrong w/ "Module Manager." I am still tinkering with this to figure it out. |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Thu Aug 21, 2008 2:13 am Post subject: |
|
|
Use the netdump option in ps2client
This will print the exception in the console on your PC instead of on the screen.
You can also try to have a look at the source for my Memory Plus ELF loader, the only real difference between it and what you are trying to do is that it loads an ELF from the memory card instead of an IRX.
http://lukasz.dk/2008/04/22/datel-memory-plus-64-mb/ _________________ Lukasz.dk |
|
| Back to top |
|
 |
Derek8588
Joined: 22 Oct 2004 Posts: 62
|
Posted: Thu Aug 21, 2008 3:24 am Post subject: |
|
|
Update: Well I have reset the IOP, load all basic modules from rom0 (SIO2MAN, MCMAN, MCSERV, PADMAN), then try to load usbd.irx and usb_mass.irx from mc0. All goes well until
ret = SifLoadModule("mc0:usbd.irx", 0, NULL); is called. The ps2 hangs. And I am calling usbd.irx before usb_mass.irx
Edit: I will have a look at Memory Plus ELF loader tonight
Edit 2: Well even after resetting the IOP, When I load usbd.irx, the ps2 hangs once again :( Still looking through sources...
Edit 3 Update 2: Wow. I found the problem. All that precious time... wasted :( The problem was my usbd.irx file. I reckon it was incompatible. I got it from one of my retail games, and it worked fine with PS2 Reality Media Player... So i took the usbd.irx from "C:\ps2dev\ps2sdk\iop\irx\usbd.irx" and it worked beautufilly over ps2link with no problems. I didnt even need to reset the IOP. I never would have thought my usbd.irx was incompatible... oh well at least now I know. Thanks |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|