Ok so here are the returned values.
Code: Select all
int fd = sceIoOpen("ms0:/test.txt", PSP_O_CREAT | PSP_O_WRONLY, 0777);
Returns a positive number. (so this one is working) Takes at least 10 seconds to create the file.
Code: Select all
int bw = sceIoWrite(fd, data, sizeof(data));
Returns 80220087 / -214525589 - Error
Code: Select all
int close = sceIoClose(fd);
Returns 0 so it closed the file successfully but just like with sceIoOpen, it blinks for at least 10 seconds.
I think this is due to the fact that I am "pausing" the game
Edit:
Just tested before starting the main thread in my prx and it wrote the file with success. So I guess the problem is I am pausing the game. I need to write the file after resuming the game to confirm this
Edit 2: confirmed