Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Wed Mar 14, 2007 4:47 am
How can I make the USB connect to the flash0 or flash1 instead of the ms0?
I have tried this:
Code: Select all
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.
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Wed Mar 14, 2007 5:30 am
Who cares?
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Wed Mar 14, 2007 6:43 am
=(
I do. I wanted to be able to access my flash drives through an eboot program so I could modify the files.
Art
Posts: 642 Joined: Wed Nov 09, 2005 8:01 am
Post
by Art » Wed Mar 14, 2007 4:20 pm
that is a function allowed in one of the recovery mode of one of the latter DAX firmwares I think
harleyg
Posts: 123 Joined: Wed Oct 05, 2005 6:15 am
Post
by harleyg » Wed Mar 14, 2007 5:48 pm
Yeah it is, but he wants to copy it...
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Thu Mar 15, 2007 6:36 am
not exactly copy it, but use it in a different program.
codes02
Posts: 12 Joined: Sun Oct 08, 2006 8:56 am
Post
by codes02 » Fri Mar 16, 2007 8:36 am
the only problem with that code is that on the assign the mention of the device needs to be "ms0:"
Code: Select all
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
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Fri Mar 16, 2007 11:00 am
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: Select all
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.
ai3gtmc30
Posts: 3 Joined: Fri Mar 16, 2007 9:15 pm
Post
by ai3gtmc30 » Fri Mar 16, 2007 10:38 pm
how do u activate it with buttons?
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Sun Mar 18, 2007 5:09 am
ai3gtmc30 wrote: how do u activate it with buttons?
LOL. Looks like a newcomer is trying to take my idea.
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Sun Mar 18, 2007 7:03 am
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: Select all
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?
pspwill
Posts: 51 Joined: Thu Nov 17, 2005 8:07 am
Post
by pspwill » Mon Mar 19, 2007 12:42 am
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.
moonlight
Posts: 567 Joined: Wed Oct 26, 2005 7:46 pm
Post
by moonlight » Mon Mar 19, 2007 5:49 pm
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).
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Tue Mar 20, 2007 5:38 am
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!
MSN
Posts: 5 Joined: Mon Apr 09, 2007 1:14 am
Post
by MSN » Mon Apr 09, 2007 1:17 am
were you able to connet the flash to usb?
Sleepy566
Posts: 23 Joined: Thu Dec 28, 2006 2:30 am
Post
by Sleepy566 » Thu Apr 12, 2007 7:52 am
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.