 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Magniot
Joined: 30 Dec 2008 Posts: 4
|
Posted: Tue Dec 30, 2008 10:03 pm Post subject: Assign flash0 in read/write mode [Solved] |
|
|
Hi, i'm new on this forum. I'm french.
I've got one problem: i'm trying to create an homebrew to flash files in flash0 but i don't arrive to create directories in flash0.
| Code: | sceIoUnassign("flash0");
sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
sceIoMkdir("flash0:/test", 0777); |
Is this code correct? Because nothing is created in flash0.
Thanks
Last edited by Magniot on Wed Dec 31, 2008 6:36 am; edited 2 times in total |
|
| Back to top |
|
 |
hibbyware
Joined: 28 Mar 2007 Posts: 78
|
Posted: Tue Dec 30, 2008 10:14 pm Post subject: |
|
|
You was almost correct you are missing a ":"
Here is the function I use it has error checking but I don't use it, lol
| Code: |
/**
* Reassign flash0/flash1 to enable read and write access.
*
* @param - n/a
*
* @returns - n/a
**********************************************************************************************************/
void Reassign() {
if (sceIoUnassign("flash0:") < 0) {
// Unassign failed
}
if (sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0) < 0) {
// Assign failed
}
if (sceIoUnassign("flash1:") < 0) {
// Unassign failed
}
if (sceIoAssign("flash1:", "lflash0:0,1", "flashfat1:", IOASSIGN_RDWR, NULL, 0) < 0) {
// Assign failed
}
}
/***********************************************************************************************************/
|
|
|
| Back to top |
|
 |
Magniot
Joined: 30 Dec 2008 Posts: 4
|
Posted: Tue Dec 30, 2008 10:23 pm Post subject: |
|
|
Thanks. now i've got another problem lol
| Code: | void Reassign() {
if (sceIoUnassign("flash0:") < 0) {
// Unassign failed
}
if (sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0) < 0) {
// Assign failed
}
if (sceIoUnassign("flash1:") < 0) {
// Unassign failed
}
if (sceIoAssign("flash1:", "lflash0:0,1", "flashfat1:", IOASSIGN_RDWR, NULL, 0) < 0) {
// Assign failed
}
} |
and in int main after my part of code there is:
| Code: | Reassign();
sceIoMkdir("flash0:/test", 0777); |
And it's the same, nothing was created when i launched my eboot on my psp. my text is on the screen but when i toogle usb flash0 the directorie isn't here. |
|
| Back to top |
|
 |
hibbyware
Joined: 28 Mar 2007 Posts: 78
|
Posted: Tue Dec 30, 2008 10:30 pm Post subject: |
|
|
Try...
sceIoMkdir("flash0:/test/", 0777); |
|
| Back to top |
|
 |
Magniot
Joined: 30 Dec 2008 Posts: 4
|
Posted: Tue Dec 30, 2008 10:37 pm Post subject: |
|
|
and it doesn't work too. I've already tested it and i have tested it again.
If you've got a flasher source code made by you or someone else please upload it or post it to have an example. Thanks for all and sorry :) |
|
| Back to top |
|
 |
hibbyware
Joined: 28 Mar 2007 Posts: 78
|
Posted: Tue Dec 30, 2008 10:45 pm Post subject: |
|
|
I have not messed with flash0 since 3.80 / 3.90
I remember having problems with certain modes and ended up using 0x800 in my module info,
| Code: |
PSP_MODULE_INFO("Write2Flash380", 0x800, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
PSP_HEAP_SIZE_MAX();
|
|
|
| Back to top |
|
 |
Magniot
Joined: 30 Dec 2008 Posts: 4
|
Posted: Tue Dec 30, 2008 10:54 pm Post subject: |
|
|
It works!!!!! Thanks!
and to create dirs:
| Code: | | sceIoMkdir("flash0:/test", 0777); |
without "/" after name directorie.
Thanks again. |
|
| 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
|