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

    Autostart function not working

    Scheduled Pinned Locked Moved Help and Support
    autostart helpautostartrom directory
    51 Posts 5 Posters 4.4k 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.
    • mituM
      mitu Global Moderator @Razak
      last edited by

      @Razak If it's installed, then boot to Emulationstation, run the game and then use the Runcommand launch menu to choose stella as the default emulator for atari2600 system. You won't have to modify the autostart file, just leave it as is, runcommand will choose the correct emulator.

      In stella, you can press Tab on the keyboard to access the configuration menu and map your inputs the way you want.

      1 Reply Last reply Reply Quote 0
      • RazakR
        Razak
        last edited by

        Hey @mitu
        When you say boot to Emulationstation, do you mean through the GUI/booting up the pi as normal or through the commandline?

        I was able to see the runcommand launch screen, like in the picture below a few days ago, but for some reason I can't anymore. I changed the runcommand on the Retropie-Setup back to

        emulationstation #auto
        

        3a9583e9-f18f-462f-b523-b2c523b8af51-image.png

        ClydeC 1 Reply Last reply Reply Quote 0
        • ClydeC
          Clyde @Razak
          last edited by

          @Razak said in Autostart function not working:

          Hey @mitu
          When you say boot to Emulationstation, do you mean through the GUI/booting up the pi as normal or through the commandline?

          Though I'm not @mitu, it shouldn't matter as long as you don't add custom commands to your autostart.sh.

          I was able to see the runcommand launch screen, like in the picture below a few days ago, but for some reason I can't anymore.

          Any chance that you've disabled it? See here how to check on that: https://retropie.org.uk/docs/Runcommand/#configuring-runcommand

          RazakR 1 Reply Last reply Reply Quote 0
          • RazakR
            Razak
            last edited by

            @mitu Nevermind. Just realized that the runcommand launch menu was disabled on Emulationstation.

            THANK YOU SO MUCH, YOU'RE AN ANGEL!!

            1 Reply Last reply Reply Quote 0
            • RazakR
              Razak @Clyde
              last edited by

              @Clyde You too, Clyde! Thanks a million for your patience!!!

              1 Reply Last reply Reply Quote 0
              • RazakR
                Razak
                last edited by

                Wait, wait. I'm a bit confused.

                After using the runcommand launch menu to choose stella as the default emulator for atari2600, do I have to go back to the retropie-setup menu to manually edit the autostart script of emulationstation?

                I'm still not booting up to my game. I want for the pi to boot directly into the game and eliminate the emulationstation and/or retropie splash screens or console menus.

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @Razak
                  last edited by

                  @Razak said in Autostart function not working:

                  do I have to go back to the retropie-setup menu to manually edit the autostart script of emulationstation?

                  if you disabled the auto-start line, then yes.

                  1 Reply Last reply Reply Quote 0
                  • RazakR
                    Razak
                    last edited by

                    Ok, and should I manually edit the autostart script like so?

                    /opt/retropie/supplementary/runcommand/runcommand.sh 0_SYS_ lr-stella ~/home/pi/RetroPie/roms/atari2600/Yar_rev.bin
                    

                    or

                    /opt/retropie/supplementary/runcommand/runcommand.sh 0_SYS_ lr-stella ~/RetroPie/roms/atari2600/Yar_rev.bin
                    

                    and do I need to eliminate the emulationstation #auto on the second line?

                    Can you confirm that I'm supposed to disable the auto-start line in which menu?

                    1 Reply Last reply Reply Quote 0
                    • ClydeC
                      Clyde
                      last edited by Clyde

                      Your first line has one error: There shouldn't be a ~ before /home/pi/…. In Linux, ~ stands for the home directory of the logged-in user, i.e. /home/pi in this case. So, ~/home/pi would expand to /home/pi/home/pi which is wrong. Is my explanation comprehensible? :)

                      Apart from that, both lines should work, since /home/pi/Retropie/… and ~/Retropie/… are interchangable.

                      If you keep emulationstation #auto after your custom line in the script, Emulation Station will be started when you exit the game. Nothing more, nothing less.

                      RazakR 1 Reply Last reply Reply Quote 0
                      • RazakR
                        Razak @Clyde
                        last edited by

                        @Clyde Yes, now I understand much better! I inserted the line like so. and included the emulationstation #auto line at the bottom.

                        After re-booting–quitting out of emulationstation and the system, the pi will boot back into the retropie/emulation station menu.

                        I would it that after I interrupt the power on the pi (like, disconnect from the wall for example) that the pi boots directly into the Game and that I don't have to select the emulator/game. Is there a way to do this?

                        ClydeC 1 Reply Last reply Reply Quote 0
                        • ClydeC
                          Clyde @Razak
                          last edited by

                          @Razak said in Autostart function not working:

                          After re-booting–quitting out of emulationstation and the system, the pi will boot back into the retropie/emulation station menu.

                          Seems like that for some reason lr-stella doesn't start the game, or exits immediately, after which Emulation Station is started. You could look into /dev/shm/runcommand.log for any error messages.

                          Does the game start if you enter the line with lr-stella directly in Retropie's command console?

                          For further diagnoses, please show us the complete contents of your autostart.bat and, to check the validity of your path and file permissions of Yar_rev.bin, also the output of this command:

                          ls -l ~/RetroPie/roms/atari2600/Yar_rev.bin
                          
                          1 Reply Last reply Reply Quote 0
                          • RazakR
                            Razak
                            last edited by

                            Does the game start if you enter the line with lr-stella directly in Retropie's command console?

                            I get the 'launching screen/ press button to configure menu'

                            Where is /dev/shm/runcommand.log and autostart.bat?

                            1 Reply Last reply Reply Quote 0
                            • ClydeC
                              Clyde
                              last edited by Clyde

                              And what happens after the Runcommand menu (i.e. the "launching screen") is shown?

                              /dev/shm/runcommand.log is the full path of the file. The first / marks the top of the directory tree in Linux. There's nothing "above" it in the directory hierarchy.

                              Sorry, I meant autostart.sh (shame on me for involuntarily typing a Windows file extension 😳 ). It is located at /opt/retropie/configs/all/autostart.sh.

                              In the Retropie console, you can display these files easily by adding a cat before them, i.e. cat /dev/shm/runcommand.log, or copy them to your home directory via cp /dev/shm/runcommand.log /home/pi and cp ./opt/retropie/configs/all/autostart.sh /home/pi, if you have better access to that location over the network or otherwise.

                              edit: I'm going to sleep now. "See" you tomorrow.

                              1 Reply Last reply Reply Quote 0
                              • RazakR
                                Razak
                                last edited by

                                I get this on the cat /dev/shm/runcommand.log

                                Executing: stella
                                /opt.retropie/supplementary/runcommand/runcommand.sh: line 1002: stella: command not found
                                
                                1 Reply Last reply Reply Quote 0
                                • RazakR
                                  Razak
                                  last edited by

                                  With /opt/retropie/configs/all/autostart.sh
                                  I get:

                                  /opt/retropie/supplementary/runcommand/runcommand.sh 0_SYS_ stella /RetroPi/roms/atari2600/Yar_rev.bin
                                  

                                  It's supposed to be /RetroPie/roms/atari, right?

                                  1 Reply Last reply Reply Quote 0
                                  • ClydeC
                                    Clyde
                                    last edited by

                                    As a last quick post before bedtime …

                                    • Why stella and not lr-stella? The error clearly says that it can't find a command named stella. You should look into that.
                                    • The path to the rom should begin with either /home/pi/RetroPie/… or ~/RetroPie/…. Your path is missing the ~ at the beginning.

                                    Good night. 😴

                                    RazakR 1 Reply Last reply Reply Quote 0
                                    • RazakR
                                      Razak @Clyde
                                      last edited by

                                      Hi @Clyde

                                      Hope you had a restful weekend.

                                      I'm trying this again with another Pi.
                                      -Have not yet installed Stella on this one. I'm doubting whether that was necessary?
                                      -I dropped the ROM into /retropie/roms/atari2600/Yar_rev.bin
                                      -I manually edited the autostart script in Retro-Pie Setup to this:

                                      /opt/retropie/supplementary/runcommand/runcommand.sh 0_SYS_ atari2600 /home/pi/retropie/roms/atari2600/Yar_rev.bin
                                      

                                      I performed a reboot to the system and when booting back-up I get a screen that states 'launching Yar_rev....press any key to configure'

                                      I press a key and get to a menu where I can setup video. If I press 'Launch' I'm sent back to the Retropie GUI menu. If I don't press any keys, I'm set back to the Retropie GUI menu.

                                      The runcommand log; cat /dev/sh/runcommand.logsays this:

                                      Parameters:
                                      Executing: Atari 2600
                                      /opt/retropie/supplementary/runcommand/runcommand.sh: line: 1002 atari2600: command not found
                                      

                                      So the pi knows and attempts to boot into the game, but something happens int the process that makes it crash? Any thoughts on what that may be?

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @Razak
                                        last edited by mitu

                                        @Razak You mis-spelled the autostart line - there should be a space between the 0 and the _SYS_.

                                        1 Reply Last reply Reply Quote 0
                                        • RazakR
                                          Razak
                                          last edited by

                                          @mitu Ok, just added the space.

                                          And still getting the same results where the runcommand displays a screen like the pic below:
                                          e9a0ab52-8e73-4acc-9a6e-4de6ddb4247c-image.png

                                          And so, now, cat /dev/shm/runcommand.log gives me these results:

                                          Parameters:
                                          Executing: /opt/retropie/emulators/retroarch -L /opt/retropie/libretocores/lr-stella2014/stella2014_libreto.so --config /opt/retropie/configs/atari2600/retroarch.cfg "home/pi/retropie/roms/atari2600/Yarrev.bin" appendconfig /dev/shm/retroarch.cfg
                                          Failed to open /home/pi/retropie/roms/atari2600/Yarrev.bin: No such file or directory
                                          

                                          By the way, I changed the name of the ROM from Yar_rev.bin to Yarrev.bin out of suspicion that it may have to do with the way the autostart script is failing. Is the runcommand log telling me I need to get lr-stella2014 or that I need to configure something in retroarch?

                                          mituM 1 Reply Last reply Reply Quote 0
                                          • mituM
                                            mitu Global Moderator @Razak
                                            last edited by

                                            @Razak said in Autostart function not working:

                                            By the way, I changed the name of the ROM from Yar_rev.bin to Yarrev.bin out of suspicion that it may have to do with the way the autostart script is failing. Is the runcommand log telling me I need to get lr-stella2014 or that I need to configure something in retroarch?

                                            Linux is case sensitive, so if the filename doesn't match exactly, then the file cannot be found. The error message is pretty clear - the file is not where you tell the emulator it is.
                                            Please post the complete command line.

                                            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.