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 

Help saving file

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



Joined: 15 Mar 2006
Posts: 5

PostPosted: Tue Mar 21, 2006 11:42 am    Post subject: Help saving file Reply with quote

How can I save a file to the memory stick of a psp such as a highscore list, or savegame?
Back to top
View user's profile Send private message
ipsp



Joined: 01 Feb 2006
Posts: 26
Location: Sydney

PostPosted: Tue Mar 21, 2006 12:28 pm    Post subject: Reply with quote

I have always just used the standard 'C' file functions and they work.

Note sure if this is the solution you want though
Back to top
View user's profile Send private message
mongatard



Joined: 15 Mar 2006
Posts: 5

PostPosted: Tue Mar 21, 2006 1:04 pm    Post subject: Reply with quote

Do you save to the path MS0:/PSP/GAME/FOLDER?
Back to top
View user's profile Send private message
ipsp



Joined: 01 Feb 2006
Posts: 26
Location: Sydney

PostPosted: Tue Mar 21, 2006 1:48 pm    Post subject: Reply with quote

I typically save to the local folder or subfolder that contain the executable.

I'm sure there is a way to write to the correct save floder but I have never bothered as i was under the impression these saves were restricted in some way.

Otherwise wait for someone else to reply, I'm sure you'll get your answer.
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Tue Mar 21, 2006 4:01 pm    Post subject: Reply with quote

saving there is possible with normal function, but if you want to save like an ufficial game you need to use the psputility library and precisely this:
psputility_savedata.h you can also found an example samples\savedata\utility note this will work only on 1.5 and 1.0.
you'll need to use samples\savedata\decrypt and samples\savedata\encrypt with 2.0
Back to top
View user's profile Send private message Visit poster's website
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Wed Mar 22, 2006 6:32 am    Post subject: Reply with quote

ipsp wrote:
I have always just used the standard 'C' file functions and they work.

Note sure if this is the solution you want though

People have noticed that using sceIoRead and sceIoWrite are faster then the standard C functions.
Not sure where the topic was, but I know it was on this forum. The speed difference was pretty unbelievable.
Back to top
View user's profile Send private message
basaghari



Joined: 21 May 2007
Posts: 1

PostPosted: Fri Jun 01, 2007 2:41 pm    Post subject: can't make it work Reply with quote

weltall wrote:
saving there is possible with normal function, but if you want to save like an ufficial game you need to use the psputility library and precisely this:
psputility_savedata.h you can also found an example samples\savedata\utility note this will work only on 1.5 and 1.0.
you'll need to use samples\savedata\decrypt and samples\savedata\encrypt with 2.0


sorry bout this. really new in using savedata utility. I can't seem to make this work. when i use the sdk sample it just crashes after pressing either circle or cross. it doesn't seem to create any savedata in psp/savedata folder. im using 1.5 in 3.03oe-c.
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Sat Jun 02, 2007 9:59 am    Post subject: Reply with quote

Gary13579 wrote:
ipsp wrote:
I have always just used the standard 'C' file functions and they work.

Note sure if this is the solution you want though

People have noticed that using sceIoRead and sceIoWrite are faster then the standard C functions.
Not sure where the topic was, but I know it was on this forum. The speed difference was pretty unbelievable.


This is because of newlib caches access to read/writes
as for saving files any C/C++ book covers how to use
the stdlib io functions ...just make sure to always clear and THEN
delete the file descriptor that is used in your files and also there is a file
limit of i think 9 files concurrently, so keep this in mind
_________________
10011011 00101010 11010111 10001001 10111010
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