| View previous topic :: View next topic |
| Author |
Message |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Wed Mar 14, 2007 4:47 am Post subject: flash USB connection |
|
|
How can I make the USB connect to the flash0 or flash1 instead of the ms0?
I have tried this:
| Code: | sceIoUnassign("ms0:");
sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0); |
but that doesn't seem to do anything... I know I'm missing something but I've completely forgotten what it is. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Wed Mar 14, 2007 5:30 am Post subject: |
|
|
| Who cares? |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Wed Mar 14, 2007 6:43 am Post subject: |
|
|
=(
I do. I wanted to be able to access my flash drives through an eboot program so I could modify the files. |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed Mar 14, 2007 4:20 pm Post subject: |
|
|
| that is a function allowed in one of the recovery mode of one of the latter DAX firmwares I think |
|
| Back to top |
|
 |
harleyg

Joined: 05 Oct 2005 Posts: 123
|
Posted: Wed Mar 14, 2007 5:48 pm Post subject: |
|
|
| Yeah it is, but he wants to copy it... |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Thu Mar 15, 2007 6:36 am Post subject: |
|
|
| not exactly copy it, but use it in a different program. |
|
| Back to top |
|
 |
glynnder
Joined: 04 Sep 2005 Posts: 35
|
Posted: Thu Mar 15, 2007 8:45 pm Post subject: |
|
|
| so, copy it? |
|
| Back to top |
|
 |
codes02
Joined: 08 Oct 2006 Posts: 12
|
Posted: Fri Mar 16, 2007 8:36 am Post subject: |
|
|
the only problem with that code is that on the assign the mention of the device needs to be "ms0:"
| Code: | | sceIoAssign("ms0:", "lflash0:0,0", "fatms0:", IOASSIGN_RDWR, NULL, 0); |
before you were just reassigning flash0, probably returning an error code because it was already mounted. I also put in a change in the map for the block device, which may also be nessicary (or not).
Now you just have to start up the usb mass storage drivers |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Fri Mar 16, 2007 11:00 am Post subject: |
|
|
ooohhhh... so shouldn't this work? It didn't work when I tried to compile it in the complete program. Well, it compiled but when I ran it on the PSP it connected to the ms0 instead of the flash0. Should I remove sceIoUnassign() or the "fatms0:" part? (I have a gut feeling it's one of those two)
| Code: | void start_usbf0()
{
sceIoUnassign("ms0:");
sceIoAssign("ms0:", "lflash0:0,0", "fatms0:", IOASSIGN_RDWR, NULL, 0);
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);
sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
sceUsbstorBootSetCapacity(0x800000);
sceUsbActivate(0x1c8);
usbStarted = 1;
printf("\nUSB activated\n");
}
|
Last edited by Sleepy566 on Sun Mar 18, 2007 5:11 am; edited 1 time in total |
|
| Back to top |
|
 |
ai3gtmc30
Joined: 16 Mar 2007 Posts: 3
|
Posted: Fri Mar 16, 2007 10:38 pm Post subject: |
|
|
| how do u activate it with buttons? |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Sun Mar 18, 2007 5:09 am Post subject: |
|
|
| ai3gtmc30 wrote: | | how do u activate it with buttons? |
LOL. Looks like a newcomer is trying to take my idea. |
|
| Back to top |
|
 |
hallo007
Joined: 13 May 2006 Posts: 36
|
Posted: Sun Mar 18, 2007 7:03 am Post subject: |
|
|
| Sleepy566 wrote: | ooohhhh... so shouldn't this work? It didn't work when I tried to compile it in the complete program. Well, it compiled but when I ran it on the PSP it connected to the ms0 instead of the flash0. Should I remove sceIoUnassign() or the "fatms0:" part? (I have a gut feeling it's one of those two)
| Code: | void start_usbf0()
{
sceIoUnassign("ms0:");
sceIoAssign("ms0:", "lflash0:0,0", "fatms0:", IOASSIGN_RDWR, NULL, 0);
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);
sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
sceUsbStart(PSP_USBSTOR_DRIVERNAME, 0, 0);
sceUsbstorBootSetCapacity(0x800000);
sceUsbActivate(0x1c8);
usbStarted = 1;
printf("\nUSB activated\n");
}
|
|
if it was like this , it shouldnt took 2years before somebody founds out xD
wasnt USB SSS open source? |
|
| Back to top |
|
 |
pspwill
Joined: 17 Nov 2005 Posts: 51
|
Posted: Mon Mar 19, 2007 12:42 am Post subject: |
|
|
| To assign flash0:/ to usb you need to create a new driver for it using the sceIoDrv functions. Theres an example of this in the mph fw launcher source. |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Mon Mar 19, 2007 5:49 pm Post subject: |
|
|
It is more complicated that simple assign/unassign.
You have to redirect the msstor driver functions to the lflash driver functions, and handle some msstor specific ioctl codes (0x02125008, 0x02125803) and devctl codes (0x02125801). |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Tue Mar 20, 2007 5:38 am Post subject: |
|
|
| pspwill wrote: | | To assign flash0:/ to usb you need to create a new driver for it using the sceIoDrv functions. Theres an example of this in the mph fw launcher source. |
Thanks a bunch, I'll check it out asap! |
|
| Back to top |
|
 |
MSN
Joined: 09 Apr 2007 Posts: 5
|
Posted: Mon Apr 09, 2007 1:17 am Post subject: |
|
|
| were you able to connet the flash to usb? |
|
| Back to top |
|
 |
Sleepy566
Joined: 28 Dec 2006 Posts: 23
|
Posted: Thu Apr 12, 2007 7:52 am Post subject: |
|
|
Not yet, the driver functions from MPHL's firmware launcher code are a bit confusing.
Don't worry, I'm still working it on it. |
|
| Back to top |
|
 |
|