Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › How to save games in RetroPie / RetroArch
- This topic has 22 replies, 8 voices, and was last updated 8 years, 10 months ago by tossy.
-
AuthorPosts
-
10/25/2014 at 21:26 #82025FloobMember
I’ve just been playing with the save game option in RetroPie / RetroArch and this is what I have so far.
There are 2 methods of saving games. One is using the “in game” save files, in the same way as you would if you were using the original hardware.
The second method is to take a “snapshot” using the emulator itself, in this case RetroArch.I have found that when playing the games (that are emulated by RetroArch), when you make an “in game” save, i.e. in Zelda on the SNES, the *.srm file will automatically save correctly in the rom folder. The folder can be specified, but the rom folder is default. This will only work correctly if the permissions are fine, which they are by defaut (the pi user must be able to write files in the relevant rom folder).
This means the next time you run the game, it will happily load the *.srm file and allow you to access your “in game” saves as normal.
In addition to the game saving the *.srm file, you can set it to keep saving this every x seconds using the retroarch.cfg file and this line:
autosave_interval =Whilst that wont make any difference to where the save happens in the game, it just ensures that it is regularly saved to the SD card – although I’m not sure it has a lot of value as I’m not using it and its working fine (although this may in part be due to me always making sure I exit the emulator cleanly, going back to Emulation Station).
As I mention, the *.srm save works fine out the box for me, no config changes needed.
You can verify by searching for *.srm files on the SD card.The second method of saving games is using “Save States”, the game itself doesnt have any concept of this, but the emulator (RetroArch) can use them.
This is very useful for games that dont have a built in save facility, as it allows you to store the position you were in when you stop playing. This is again controlled in the retroarch.cfg file
Here are the settings to auto save and/or auto load snapshots.
# Automatically saves a savestate at the end of RetroArch lifetime. # The path is $SRAM_PATH.auto. # RetroArch will automatically load any savestate with this path on startup if savestate_auto_load is set. # savestate_auto_save = false # savestate_auto_load = true
You can save and load these with the keyboard using the settings
# Saves state.
# input_save_state = f2
# Loads state.
# input_load_state = f4or map them to your joypad (in the controller config) using hotkeys: for example
input_enable_hotkey_btn = 8
input_save_state_btn = 5
input_load_state_btn = 4If anyone is interested I could put a video together showing how this works.
11/01/2014 at 19:17 #82310FloobMemberVideo showing the internal / standard save feature:
11/01/2014 at 20:07 #82311FloobMemberVideo showing save states in RetroPie / RetroArch:
11/01/2014 at 22:51 #82319darknighte9ParticipantForgive me for my noobiness but how do you write permissions? I’m trying to get .srm files to be created automatically for Earthbound (am using Retropie and Emulationstation), but so far I have not had any luck… :s
11/01/2014 at 23:46 #82321FloobMemberI just gave that a go and it seems to work fine – I created a game file as you do when starting for the first time, then when the game started I cleanly exited back to EmulationStation and the .srm appeared in the rom folder.
How are you exiting the game?
If its a permission issue check that your permissions allow user “pi” to write to the snes rom directory (unless you are saving your .srm files somewhere else)
See the attached pic.If you need to update permissions, its probably easiest using a tool like Filezilla.
https://my.rochen.com/portal/index.php?m=knowledgebase&c=view&id=4711/02/2014 at 03:33 #82331darknighte9ParticipantAlright I’m guessing my issue is more with how I am exiting my game then actual permissions. I guess my next question would be how are you exiting back to EmulationStation? I use a SNES Buffalo USB Gamepad controller that I setup using the RetroArch setup and start+select does not work for me as it does for others.
11/02/2014 at 13:09 #82344FloobMemberCan you post your controller config here as a txt file?
Or have you tried exiting the game using the Escape key, as that should do it as well.
11/02/2014 at 21:48 #82365darknighte9ParticipantWell in my file for my controller I have these lines here
input_device = “USB,2-axis 8-button gamepad ”
input_driver = “udev”
input_b_btn = “1”
input_y_btn = “3”
input_select_btn = “6”
input_start_btn = “7”
input_up_axis = “-1”
input_down_axis = “+1”
input_left_axis = “-0”
input_right_axis = “+0”
input_a_btn = “0”
input_x_btn = “2”
input_l_btn = “4”
input_r_btn = “5”11/02/2014 at 21:53 #82366darknighte9ParticipantIf I added input_exit_emulator_btn =
to this file would I be able to list both start and select buttons 6 and 7 as exit buttons? I can use escape on my keyboard to exit emulation station but my ultimate goal for my RetroPie is to be able to primarily use the controller once I have everything completely set up for the most part.11/02/2014 at 22:04 #82370FloobMemberThats its – check from 5 mins in on this video, just add the two lines into your controller file.
You would use “6” and “7” from your example.11/02/2014 at 22:19 #82372darknighte9ParticipantAlright so I added the lines
input_enable_hotkey_btn = “7”
input_exit_emulator_btn = “6”to my controller file, and upon reboot I was able to use start+select to exit back into EmulationStation. I’m going to go start a new file in Earthbound and save in game and see if a .srm is created after exiting cleanly.
11/02/2014 at 23:50 #82378darknighte9ParticipantSo I made a save in-game, exited cleanly back to ES, reloaded my game and had a save waiting for me and .srm file saved to my ROMS folder. Thanks for all the help floob!
03/30/2015 at 18:38 #93168elgur85ParticipantHello there!
Is it possible to save “states” by only using one button?
And another for loading states?03/30/2015 at 20:57 #93193FloobMemberYes, but you wouldnt want to use the button for another function, so you need an unused one really.
Then you just keep hotkeys enabled (so no need for an enable_hotkey button):03/31/2015 at 06:34 #93213AnonymousInactiveAlright, I have a different type of question regarding saves. When i exit a game it records the new play count. But if I then just shut down the system or restart it my play count isnt saved. The only way for it to save is to completely exit emulationstation, then preform a shut down from the raspberry’s command line.
Any idea how to change this?
08/26/2015 at 13:08 #104759robertusParticipantsorry i don’t understand how to save game with my ps3 controller
i see that select + L1 save state, is right?
then how can i load it?
and i can save only a state? no more then 1?
sorry for the noob
08/26/2015 at 18:21 #104775FloobMember@robertus Yes, and Select + R1 to load. You can have multiple save states, choose which one with Select + Left and Right on the joypad.
This may also help
08/27/2015 at 10:38 #104801robertusParticipant[quote=104775] @robertus Yes, and Select + R1 to load. You can have multiple save states, choose which one with Select + Left and Right on the joypad.
This may also help
<span class=”embed-youtube” style=”text-align:center; display: block;”></span>
[/quote]
thanks a lot i solved ;)
12/17/2015 at 04:19 #111957dmm1000ParticipantHi Floob
really struggling with this
I have configured a saitek P220 pad and theres nothing registering in thee bottom left hand side of the screen on F2 F4 load or saveWhen playing genesis games – where does it save state by default – ?
what permission command should i give this directory when i log in via ssh ?do you need to be the level above the directory you are giving the permissions to when you typw the chmod command ?
can we not make it much easier by just assigning a keyboard key
In retroarch do the numbers assigned to joypad buttons 3 and 7 and 9 etc ? are these equivalent to keyboard buttons 3/7 and 9 etc ?
Sorry for all the questions everything is working except save / load ??
12/26/2015 at 00:17 #112506luziorParticipantHey guys ^^
First of all I’m sorry for my bad english :/
So, I saw your video and I decided to do the first method to save my games.
I copied the retroarch.cfg and renamed as retroarch_Original.cfg. I changed the savefile_directiony to /home/pi/RetroPie/roms/Saves. Also I put “5” seconds for my autosaving files but the game does not even save !!! It’s very embarrasing ! If u are a problem to my issue I’ll thank u a lot ;)12/26/2015 at 16:56 #112534FloobMemberThe first method uses .srm saves, these are made by the game itself. Try Super Mario World on the snes and finsih the first level – does an .srm file appear in the roms folder or your custom one at all?
12/27/2015 at 19:12 #112588tossyParticipantMy save/load state function works fine with Select-L/R with SNES. But the in-game save feature doesn’t work. This is supposed to just work “out of the box” right? All my ROMs are unzipped in the SNES folder. Also, ES always shows “last played / # times played” metadata as zero when that’s not true. How should I troubleshoot this??
There are .SRM files created for the games I’ve played. A problem with loading?
12/27/2015 at 21:21 #112601tossyParticipantI’m doing some more testing and things seem to be working now. I have noticed that failing to exit the emulator with Start-Select and just unplugging will cause the save-data to not take. Probably after a few key gaming sessions, this was the culprit. Pretty lousy fault in the system if you ask me, oh well. I will try the autosave_interval setting, since I can’t always expect a clean exit (either someone will not know, or forget, or my bluetooth controller will turn off and I have no way of reconnecting it without pulling the power, usually)
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.