4

I've added to /opt/retropie/emulators/retroarch/retroarch.cfg:

input_enable_hotkey_btn = 8
input_exit_emulator_btn = 9

based on http://nickbartlett.com/retropie-emulationstation-not-saving-game-progress/.

To /opt/retropie/configs/all/retroarch.cfg, I've added:

# Automatically saves a savestate at the end of RetroArch's 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 = true
savestate_auto_load = true

# Autosaves the non-volatile SRAM at a regular interval. This is disabled by default unless set otherwise.
# The interval is measured in seconds. A value of 0 disables autosave.
autosave_interval = 5

And I have no other configs that would overwrite those in /opt/retropie/configs/snes/retroarch.cfg:

# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line

input_remapping_directory = "/opt/retropie/configs/snes/"

#include "/opt/retropie/configs/all/retroarch.cfg"

I watch the file that should change when I make progress, but nothing happens!

watch -d "ls -al ~/RetroPie/roms/snes/Legend*.state.auto"

I'm on retropie version:

pi@retropie:~/RetroPie-Setup $ git show
commit c522c722b6753b1908d7f5fa00b4bc1e105e514a

I tried running with verbose logging by pressing a on launching the ROM. It seems to add the --verbose logging option:

/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-snes9x2010/snes9x2010_libretro.so --config /opt/retropie/configs/snes/retroarch.cfg /home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.sfc --verbose --appendconfig /dev/shm/retroarch.cfg

The logs appear to be going to /dev/shm/runcommand.log. Tailing them, I see save attempts but the file is not modified:

RetroArch [INFO] :: Loading state: "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.state.auto".
RetroArch [INFO] :: State size: 5000000 bytes.
RetroArch [INFO] :: Saving state: "RAM".
RetroArch [INFO] :: State size: 5000000 bytes.
RetroArch [INFO] :: Autosaving SRAM to "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.srm", will continue to check every 5 seconds ...
RetroArch [INFO] :: SRAM changed ... autosaving ...

I see no logs even after I hit key points in the game (e.g. opening dungeon treasure chests, changing coin counts, arrow counts, bomb counts). The autosave log never comes back. I see no cronjobs running for either root or the pi user that could be periodically copying over the .state file to the .state.auto file. On exiting the emulator, I see a burst of logs:

RetroArch [INFO] :: Saving state: "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.state.auto".
RetroArch [INFO] :: State size: 5000000 bytes.
RetroArch [INFO] :: File already exists. Saving to backup buffer ...
RetroArch [INFO] :: Auto save state to "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.state.auto" succeeded.
RetroArch [INFO] :: Saved new config to "/opt/retropie/configs/snes/retroarch.cfg".
RetroArch [INFO] :: Saving RAM type #0 to "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.srm".
RetroArch [INFO] :: Saved successfully to "/home/pi/RetroPie/roms/snes/LegendofZeldaALinktothePast.srm".
RetroArch [INFO] :: Trying to write to playlist file: /opt/retropie/configs/snes/content_history.lpl
RetroArch [INFO] :: Trying to write to playlist file: /opt/retropie/configs/snes/content_image_history.lpl
RetroArch [INFO] :: Average audio buffer saturation: 49.77 %, standard deviation (percentage points): 14.49 %.
RetroArch [INFO] :: Amount of time spent close to underrun: 3.78 %. Close to blocking: 3.63 %.
RetroArch [INFO] :: Average monitor Hz: 59.988002 Hz. (18.284 % frame time deviation, based on 2048 last samples).
RetroArch [INFO] :: Average audio buffer saturation: 49.77 %, standard deviation (percentage points): 14.49 %.
RetroArch [INFO] :: Amount of time spent close to underrun: 3.78 %. Close to blocking: 3.63 %.
RetroArch [INFO] :: Average monitor Hz: 59.988002 Hz. (18.284 % frame time deviation, based on 2048 last samples).
Sound buffer size: 128000 (32000 samples)

but the .state.auto file md5sum does not change.

I think this is a conflict between me testing out slot saving feature (RightShoulder+select) and the more native game save. I can see my .state file was recently updated but my .state.auto file hasn't been touched for a long time. Manually copying the .state file to the .state.auto file does bring up some progress...

Update

I gave up on autosave. Slot saving still seems to have problems. The only thing that works seems to be:

  1. slot-save (right_shoulder + select)
  2. native-save (save and quit)
  3. exit emulator (start + select)

I'm watching the .state file and can see it change on a slot-save. I grab the md5sum and make sure it is unmodified on reboot. The file is in tact. Either what is being saved to that state file is insufficient or that state file is NOT what is being loaded. Is there another file that could being read? Is there another cached file that is not getting written to that state file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.