forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceIoOpen() doesnt work on flash0?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
zydeoN



Joined: 09 May 2009
Posts: 45

PostPosted: Mon Sep 14, 2009 7:31 pm    Post subject: sceIoOpen() doesnt work on flash0? Reply with quote

Does anyone know why sceIoOpen() with PSP_O_WRONLY flag doesnt work in flash0 ?

I tried
Code:
sceIoOpen("flash0:/test.txt",PSP_O_TRUNC | PSP_O_CREAT | PSP_O_WRONLY, 0777);


But test.txt is only created if i open it in ms0:
Code:
sceIoOpen("ms0:/test.txt",PSP_O_TRUNC | PSP_O_CREAT | PSP_O_WRONLY, 0777);


However, if i open test.txt to read only, it works:
Code:
sceIoOpen("flash0:/test.txt",PSP_O_TRUNC | PSP_O_CREAT | PSP_O_RDONLY, 0777);



This way it works... Perhaps i have to use a differente mode, instead of 0777. (Tried with 0744, but doesnt work too)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Sep 14, 2009 9:30 pm    Post subject: Reply with quote

flash0 needs to be unassigned and reassigned in write mode. By default only VSH mode (0x800) apps can do this. If your app is user mode then you can simply change it to 0x800. If your app is kernel mode (which I assume it is since you can read flash0), you'll need to increase your privileges. Look at the iop.prx source code.
Back to top
View user's profile Send private message
zydeoN



Joined: 09 May 2009
Posts: 45

PostPosted: Wed Sep 16, 2009 3:54 am    Post subject: Reply with quote

yes, i just had to reassigned it to read/write privileges...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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