| View previous topic :: View next topic |
| Author |
Message |
mongatard
Joined: 15 Mar 2006 Posts: 5
|
Posted: Tue Mar 21, 2006 11:42 am Post subject: Help saving file |
|
|
| How can I save a file to the memory stick of a psp such as a highscore list, or savegame? |
|
| Back to top |
|
 |
ipsp
Joined: 01 Feb 2006 Posts: 26 Location: Sydney
|
Posted: Tue Mar 21, 2006 12:28 pm Post subject: |
|
|
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 |
|
 |
mongatard
Joined: 15 Mar 2006 Posts: 5
|
Posted: Tue Mar 21, 2006 1:04 pm Post subject: |
|
|
| Do you save to the path MS0:/PSP/GAME/FOLDER? |
|
| Back to top |
|
 |
ipsp
Joined: 01 Feb 2006 Posts: 26 Location: Sydney
|
Posted: Tue Mar 21, 2006 1:48 pm Post subject: |
|
|
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 |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Tue Mar 21, 2006 4:01 pm Post subject: |
|
|
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 |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Wed Mar 22, 2006 6:32 am Post subject: |
|
|
| 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 |
|
 |
basaghari
Joined: 21 May 2007 Posts: 1
|
Posted: Fri Jun 01, 2007 2:41 pm Post subject: can't make it work |
|
|
| 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 |
|
 |
dot_blank

Joined: 28 Sep 2005 Posts: 498 Location: Brasil
|
Posted: Sat Jun 02, 2007 9:59 am Post subject: |
|
|
| 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 |
|
 |
|