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 

sceIoDopen

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



Joined: 15 Dec 2004
Posts: 28

PostPosted: Wed Jul 06, 2005 9:40 pm    Post subject: sceIoDopen Reply with quote

int dfd = sceIoDopen("flash0:/");
then calls to sceIoDread work fine

int dfd = sceIoDopen("ms0:/"); shuts down the psp after a short pause

int dfd = sceIoDopen("ms0:/PSP/GAME/gen/data/base/");
returns a valid handle (3) but a call to sceIoDread leaves the memory stick access light on for a while then shuts off the psp

I'm out of ideas, any ideas on what else i can try?
Anybody used these functions and had problems?
Back to top
View user's profile Send private message
rinco



Joined: 21 Jan 2005
Posts: 255
Location: Canberra, Australia

PostPosted: Wed Jul 06, 2005 10:12 pm    Post subject: Reply with quote

I recently used these functions with success.

Try using a recent version of pspsdk for exception handling. This might stop the shutdowns.

... and/or perhaps you forgot to allocate memory and you're lucky in round one.


Last edited by rinco on Wed Jul 06, 2005 10:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
pspkrazy



Joined: 04 Jul 2005
Posts: 49

PostPosted: Wed Jul 06, 2005 10:13 pm    Post subject: kernel mode. Reply with quote

It seems to be a problem related to kernel mode startup.

I am not sure anyway...

Use search button with "kernel mode" and try it out.
Back to top
View user's profile Send private message
beatwho



Joined: 15 Dec 2004
Posts: 28

PostPosted: Wed Jul 06, 2005 10:16 pm    Post subject: Reply with quote

rinco wrote:
I recently used these functions with success.

Try using a recent version of pspsdk for exception handling. This might stop the shutdowns.

... and/or perhaps you forgot to allocate memory and you're lucky in round one.


Whoa, I didn't even notice exception handling! thanks for pointing it out! I'll try it now...

edit: psp crashes installing exception handler -_-; (including in the sample program)

edit2: if I set PSP_MAIN_THREAD_ATTR(0) then it works o_O, and that was by accident because I was trying to install the exception handler
Back to top
View user's profile Send private message
calebgray



Joined: 01 May 2007
Posts: 1
Location: Lynden, WA

PostPosted: Tue May 01, 2007 5:23 pm    Post subject: sceIoDopen and sceIoDread Reply with quote

I have come to realize that the sample given in the PSPSDK is faulty. If you don't feel like hacking around with your kernelmode/usermode functionality and stability, just use the following fix for the fileio code in the pspsdk.

SceIoDirent *dir = (SceIoDirent *) malloc(sizeof(SceIoDirent));
while (sceIoDread(dfd, dir) > 0) {
if (dir->d_stat.st_attr & FIO_SO_IFDIR) {
....

Just be sure to use -> instead of . from then on, since now we're dealing with a pointer.

Happy coding!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Mihawk



Joined: 03 Apr 2007
Posts: 29

PostPosted: Tue May 01, 2007 7:51 pm    Post subject: Reply with quote

Actually it would have been sufficient to just memset the structure to 0 (see this thread).
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