RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    [Solved] Can't get SaveStateManager to work

    Scheduled Pinned Locked Moved Help and Support
    savestatemanagemanagersavestate
    9 Posts 2 Posters 757 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BobHarrisB
      BobHarris
      last edited by BobHarris

      So I'm trying to get @cyperghost SaveStateManager to work (https://github.com/crcerror/RetroPie-UserMenu-SaveStateManager).
      These were the steps I took:

      • Through SSH I placed the SaveStateManager.sh file in /home/pi/RetroPie/scripts
      • I pressed F4 and entered chmod +x /home/pi/RetroPie/scripts/SaveStateManager.sh and pressed Enter..nothing seemed to happen, is that ok?
      • I used SSH to create the runcommand-menu folder in /opt/retropie/configs/all and placed SaveStateManager.sh in there, containing one line: /home/pi/RetroPie/scripts/SaveStateManager.sh "$3" all
      • After starting a game (which has multiple save states) I enter the runcommand menu, and access UserMenu. Then I select SaveStateManager at which point the screen flashes once, but nothing more. Is there something obvious I'm doing wrong?

      Pi Model or other hardware: Pi 3B
      Power Supply used: (If using a Pi): Official Pi adapter
      RetroPie Version Used : 4.3.5
      Built From: premade image on the Retropie website
      USB Devices connected: Sandisk 64 gb flash drive, Logitech keyboard
      Controller used: Playstation dual shock 4

      Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

      cyperghostC 1 Reply Last reply Reply Quote 0
      • cyperghostC
        cyperghost @BobHarris
        last edited by

        @BobHarris try to add bash command to script in user menu. Seems like the script is loaded to USB drive. ‘bash /path/to/script.sh ‘

        BobHarrisB 1 Reply Last reply Reply Quote 0
        • BobHarrisB
          BobHarris @cyperghost
          last edited by BobHarris

          @cyperghost Thanks for the suggestion. The script is indeed located on a usb drive.
          So in the runcommand-menu folder the SaveStateManager.sh file now contains the line:
          bash /home/pi/RetroPie/scripts/SaveStateManager.sh "$3" all

          But sadly no change.. still a flash and nothing further happens.

          Update:
          I also moved the script to a location on the sd card, did the chmod thing again, removed the bash in the other script and changed the pathway accordingly, but this did nothing either.

          Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

          cyperghostC 1 Reply Last reply Reply Quote 0
          • cyperghostC
            cyperghost @BobHarris
            last edited by

            @BobHarris Is there any path defined for save_path variable in retroarch.cfg?

            Can you add a sleep command to the script that is called by the User Menu to read error messages ?

            BobHarrisB 1 Reply Last reply Reply Quote 0
            • BobHarrisB
              BobHarris @cyperghost
              last edited by

              @cyperghost the words save_path and variable do not exist in retroarch.cfg

              Sorry I don't understand what you want me to do in your second question... I'm pretty good at following guides, but my knowledge on the matter is quite limited.

              I don't have any more time today, hope to continue getting this to work tomorrow.

              Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

              1 Reply Last reply Reply Quote 0
              • cyperghostC
                cyperghost
                last edited by cyperghost

                @BobHarris I rechecked the script and it seems to work in every state I've tested. My first assumption was the missing of the savefile_directory and savestate_directory values in retroarch.cfg - nevertheless if these keys are missing or commented out the SaveStateScript uses the path found in $3 ($3 = complete path + romfilename)

                Roadmap to track down errors

                1. I assume following... You might inserted the script by a Windows editor and get errors caused by Windows how it handels the line breaks.
                  To avoid line breaks you can use wget to download the script directly to your Raspberry.

                wget http://raw.githubusercontent.com/crcerror/RetroPie-UserMenu-SaveStateManager/master/SaveStateManager.sh -O /home/pi/RetroPie/scripts/SaveStateManager.sh

                This will download directly from github to home/pi/RetroPie/scripts

                1. So to detect annother error behaviour we might just add a sleep command to the script from User Menu. For example:
                /path/to/script/scriptname.sh
                sleep 5
                

                You may start manually with bash home/pi/RetroPie/scripts/SaveStateManger.sh and will receive a message like SaveStateManager Check: Please parse system parameter! Error!

                The script defintly needs some repolishing. There are things done that I would do much much better annother time. But I need your feedback to track down some errors.

                Good luck

                BobHarrisB 1 Reply Last reply Reply Quote 1
                • BobHarrisB
                  BobHarris @cyperghost
                  last edited by

                  @cyperghost Good news, I got it to work. :)
                  I don't know 100% sure why it worked this time, but I do think you are right it is best to do every step on the Pi. I added 2 pictures of all the steps I took.
                  1.jpg 2.jpg
                  As you can see I changed one small thing, which could also have made a difference: I changed the location of the scripts folder to the Pi directory, so it wouldn't be located on the usb drive.

                  Thanks a lot for helping me out and for creating this script! I like my Pi system to be self sufficient, so deleting obsolete save files is certainly part of it.

                  Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

                  1 Reply Last reply Reply Quote 1
                  • cyperghostC
                    cyperghost
                    last edited by cyperghost

                    @BobHarris Your "error" likely was to use a texteditor made for Windows as you transfered the script to your Pi.

                    Use this script to test
                    And save it to the scripts dir by using Windows and insert with notepad

                    #!/bin/bash
                    
                    echo "Hello World"
                    echo "Do you hear me?"
                    

                    If you execute with bash command you receive an error like '\r': command not found this is because Windows uses newline \n and carriage return \r for adding a new line.
                    Do get this fixed you can convert with tools like dos2unix or use an advanced editor like NotePad++ and save in Unix format. That was very likely the error. So to avoid this mess I just said to to download the script directly from github to your Raspberry ;)

                    Thanks a lot for helping me out and for creating this script! I like my Pi system to be self sufficient, so deleting obsolete save files is certainly part of it.

                    No problem you can use this tool to delete more files on the fly ;) On first start the program inits a small setup, on the second start it will run.

                    BobHarrisB 1 Reply Last reply Reply Quote 1
                    • BobHarrisB
                      BobHarris @cyperghost
                      last edited by BobHarris

                      @cyperghost I'm sure you're right! Thanks, but I don't think I have a need for the other tool...the SaveStateManager was the very last thing I missed having on my Pi. :)

                      Edit: I actually installed it anyway..a gamepad compatible file manager can always come in handy. :) Thanks again!

                      Pi 3B , 64 GB Sandisk ultra flashdrive, 19 systems, 872 hand picked classic gaming gems :-) Dual shock 4v2

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.