 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Fri Oct 12, 2007 7:34 am Post subject: USB problem, please help. :) |
|
|
Hi! :)
I'm experiencing problems enabling the usb in a kernel 3.52 app.
First I had problem loading the usbstorms.prx (with the code from the sdk's sample) and I fixed it using pspSdkLoadStartModule.
Now is the last prx that fails to load (giving error 800213C) usbstorboot.prx
This way it fails also the sceUsbstorBootSetCapacity() call.
When I call sceUsbActivate() Windows detects the new hardware but I cannot see the new drive...
Here's my code:
| Code: | //Init USB:
int USBinit(){
u32 retVal;
//start necessary drivers
pspSdkLoadStartModule("flash0:/kd/semawm.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/kd/usbstor.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/kd/usbstormgr.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/kd/usbstorms.prx", PSP_MEMORY_PARTITION_KERNEL);
pspSdkLoadStartModule("flash0:/kd/usbstorboot.prx", PSP_MEMORY_PARTITION_KERNEL);
//setup USB drivers
retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
if (retVal != 0) {
return -6;
}
retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
if (retVal != 0) {
return -7;
}
retVal = sceUsbstorBootSetCapacity(0x800000);
if (retVal != 0) {
return -8;
}
return 0;
} |
Can someone help me loading this module, please? :)
P.S. If I copy the prx from my flash0 to my ms, then the module starts correctly...
Many thanks.
Ciaooo
Sakya |
|
| Back to top |
|
 |
_.-noel-._
Joined: 13 Aug 2007 Posts: 49
|
Posted: Tue Oct 16, 2007 10:55 pm Post subject: |
|
|
Delate the
| Code: | | PSP_MEMORY_PARTITION_KERNEL |
may be, then it works....
and, i think,
work, too....
not
....
but i'm not sure.... _________________ Sry for my english |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Tue Oct 16, 2007 11:35 pm Post subject: |
|
|
Hi! :)
Many thanks for your reply.
| _.-noel-._ wrote: | Delate the
| Code: | | PSP_MEMORY_PARTITION_KERNEL |
may be, then it works.... |
I'll try this when at home, thanks. ;)
| Quote: |
and, i think,
work, too....
not
....
but i'm not sure.... |
?????????
Sorry, I can't understand what you're saying here.
What's the problem with a int function returning -6 or -7?
Ciaooo
Sakya |
|
| Back to top |
|
 |
_.-noel-._
Joined: 13 Aug 2007 Posts: 49
|
Posted: Wed Oct 17, 2007 12:07 am Post subject: |
|
|
i dont know...
but i have allways ...
have you this code in your app?
| Code: |
int LoadStartModule(char *path)
{
u32 loadResult;
u32 startResult;
int status;
loadResult = sceKernelLoadModule(path, 0, NULL);
if (loadResult & 0x80000000)
return -1;
else
startResult =
sceKernelStartModule(loadResult, 0, NULL, &status, NULL);
if (loadResult != startResult)
return -2;
return 0;
} |
??
when not, try it out...
---
and my code for this is:
| Code: |
//start necessary drivers
LoadStartModule("flash0:/kd/semawm.prx");
LoadStartModule("flash0:/kd/usbstor.prx");
LoadStartModule("flash0:/kd/usbstormgr.prx");
LoadStartModule("flash0:/kd/usbstorms.prx");
LoadStartModule("flash0:/kd/usbstorboot.prx");
//setup USB drivers
retVal = sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
if (retVal != 0) {
printf("Error.... (0x%08X)\n", retVal);
sceKernelSleepThread();
}
retVal = sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
if (retVal != 0) {
printf("Error.... (0x%08X)\n",
retVal);
sceKernelSleepThread();
}
retVal = sceUsbstorBootSetCapacity(0x800000);
if (retVal != 0) {
printf
("Error... (0x%08X)\n",
retVal);
sceKernelSleepThread();
}
retVal = 0;
|
i hope it help _________________ Sry for my english |
|
| 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
|