fopen/fclose vs sceIoOpen()/sceIoClose()

Syscalls, threading, file IO, SceAppMgr, and related stuff.
Post Reply
Posts: 5
Joined: Mon Jan 02, 2017 5:14 pm

fopen/fclose vs sceIoOpen()/sceIoClose()

Post by rsn8887 » Tue Jan 03, 2017 1:28 am

Is there any difference using sceIoOpen/sceIoClose compared to simple fopen/fclose calls?

Where can I see how the libc fopen/fclose is implemented in VitaSDK?

I suppose it calls sceIoOpen/sceIoClose somehow?

I am asking because I am trying to fight the file corruption issue that happens in UAE4All Vita whenever the user presses the "PS" button. I am trying to close all files and everything properly before the button is pressed.

I suspect that somehow the OS is keeping track of files and when the PS Button is pressed the system is doing SOMETHING to the files that have been opened. I am uncertain what is going on, but the program works perfectly fine unless the PS button is invoked.

EDIT: I found it it is the newlib port to Vita here: ... c/sys/vita

Posts: 6
Joined: Tue Dec 27, 2016 4:25 pm

Re: fopen/fclose vs sceIoOpen()/sceIoClose()

Post by Joel16 » Wed Jan 04, 2017 12:07 am

Hey rsn8887,
If I recall correctly, Sony's IO wrappers were somewhat faster than standard C IO. Apart from that I don't think there's many differences. Well an obvious reason would be these wrappers were made specifically for the VITA/PSP, so onr could argue they may perhaps work better (?).

However regarding your issue maybe if there's a way to check if the home button is pressed, you can close the files before it happens. I believe xerpi would know more about this since he's been reversing the ctrl.surpx module.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest