| View previous topic :: View next topic |
| Author |
Message |
beatwho
Joined: 15 Dec 2004 Posts: 28
|
Posted: Wed Jul 06, 2005 9:40 pm Post subject: sceIoDopen |
|
|
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 |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Wed Jul 06, 2005 10:12 pm Post subject: |
|
|
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 |
|
 |
pspkrazy
Joined: 04 Jul 2005 Posts: 49
|
Posted: Wed Jul 06, 2005 10:13 pm Post subject: kernel mode. |
|
|
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 |
|
 |
beatwho
Joined: 15 Dec 2004 Posts: 28
|
Posted: Wed Jul 06, 2005 10:16 pm Post subject: |
|
|
| 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 |
|
 |
calebgray
Joined: 01 May 2007 Posts: 1 Location: Lynden, WA
|
Posted: Tue May 01, 2007 5:23 pm Post subject: sceIoDopen and sceIoDread |
|
|
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 |
|
 |
Mihawk
Joined: 03 Apr 2007 Posts: 29
|
Posted: Tue May 01, 2007 7:51 pm Post subject: |
|
|
| Actually it would have been sufficient to just memset the structure to 0 (see this thread). |
|
| Back to top |
|
 |
|