Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    how to autostart a rom directly on boot?

    Recalbox General
    autostart rom directly boot
    4
    16
    7742
    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.
    • voljega
      voljega Banned @tonificante last edited by voljega

      @tonificante you're missing the controllers string, your full command should look like that :

      python /usr/lib/python2.7/site-packages/configgen/emulatorlauncher.pyc -p1index 0 -p1guid 060000004c0500006802000000010000 -p1name "PLAYSTATION(R)3 Controller" -p1devicepath /dev/input/event0 -system amigacd32 -rom "/recalbox/share/roms/amigacd32/Flashback.iso" -emulator default -core default -ratio auto
      

      To get the right controller string corresponding to your setup, boot up you recalbox normally and launch the game from emulation station.

      Then through putty type ps -ef | grep emulatorlauncher and you will see the full string for the python command.
      In my example the controller string part is -p1index 0 -p1guid 060000004c0500006802000000010000 -p1name "PLAYSTATION(R)3 Controller" -p1devicepath /dev/input/event0 but this is only for one controller

      This string depends of the connected controllers and the configuration for them in Emulation Station though, you have to get through YOUR ES with YOUR controllers connected

      1 Reply Last reply Reply Quote 0
      • tonificante
        tonificante last edited by

        Worked like a charm, I just had to add the quotation marks to the values of the controller names from the output of ps. This is very cool, just switch on and the game is instantly there, feels a bit more like a real game console. Thank you!

        voljega 1 Reply Last reply Reply Quote 0
        • voljega
          voljega Banned @tonificante last edited by

          @tonificante ah yeah sorry forgot to tell you to add the " " but it was in my example and you found it 😉
          glad it worked for you

          1 Reply Last reply Reply Quote 0
          • tonificante
            tonificante last edited by

            Unfortunately, strange things happen when I try to autostart the rom. It keeps running in the background (you can even hear the rom in the background while navigating through emulation station) and it starts again when I try to switch off recalbox. I tried a thousand of things, with sh -c, with vars, with eval, with case and catching start and stop, with custom.sh on /recalbox/share/system but it didn't work fine. Gamepad works fine, but it even triggers the rom after you close it with hotkey + start and while you are navigating through the menus of emulation station.

            I give up. Would be nice to see an easy way to configure it directly on emulation station / recalbox in the future, maybe some day.

            voljega 1 Reply Last reply Reply Quote 0
            • voljega
              voljega Banned @tonificante last edited by

              @tonificante try to comment the content of S31emulationstation script ?

              But yeah anyway Recalbox is not really designed for that usage

              1 Reply Last reply Reply Quote 0
              • tonificante
                tonificante last edited by tonificante

                Just for the records, and in case somebody is trying something similar, I managed it in this way:

                • in /etc/init.d , disable emulationstation service and custom service this way: sudo chmod -x S31emulationstation S99custom and disable also all the services that you don't need (in my case S02splash S11upgrade S24lircmod S25hyperion S25lircd S31sixad S32bluetooth S92steamcontroller S92virtualgamepads S94manager)
                • create a new service in /etc/init.d with following name S99customrom and sudo chmod +x S99customrom and add the following code:
                #!/bin/bash
                
                case "$1" in 
                start)
                   /recalbox/share/system/custom.sh &
                   echo $!>/var/run/hit.pid
                   ;;
                stop)
                   kill `cat /var/run/hit.pid`
                   rm /var/run/hit.pid
                   ;;
                restart)
                   $0 stop
                   $0 start
                   ;;
                status)
                   if [ -e /var/run/hit.pid ]; then
                      echo hit.sh is running, pid=`cat /var/run/hit.pid`
                   else
                      echo hit.sh is NOT running
                      exit 1
                   fi
                   ;;
                *)
                   echo "Usage: $0 {start|stop|status|restart}"
                esac
                
                exit 0 
                
                • and now, in the share folder, in the system folder, edit the custom.sh and add the line to launch the game, that you got when you played it normally and used ps -ef | grep emulatorlauncher , like voljega said, BUT add this at the end: && poweroff
                • for example, in my case:
                python /usr/lib/python2.7/site-packages/configgen/emulatorlauncher.pyc -p1index 0 -p1guid 03000000830500006020000010010000 -p1name "USB,2-axis 8-button gamepad" -p1nbaxes 2 -p1devicepath /dev/input/event2 -p2index 1 -p2guid 03000000830500006020000010010000 -p2name "USB,2-axis 8-button gamepad" -p2nbaxes 2 -p2devicepath /dev/input/event3 -p3index 2 -p3guid 03000000451300000031000001010000 -p3name "Sony SPEEDLINK USB GAMEPAD" -p3nbaxes 4 -p3devicepath /dev/input/event4 -system snes -rom "/recalbox/share/roms/snes/Breath of Fire.zip" -emulator default -core default -ratio auto && poweroff
                
                • then, don't forget to make the custom.sh executable with sudo chmod +x custom.sh

                If you did everything fine, recalbox will start directly on the rom, and when you press select + start (or whatever your back-to-menu is) then you will shutdown the system safely and you can turn the raspberry off after 5 or 10 seconds

                If you make S31emulationstation executable again, and disable the customrom script, then you can enter to emulationstation and modify settings like shaders, video configs, etc, and this will affect also your custom rom.

                The only problem that I still have is that in this way I cannot manage to get the audio output through my external usb audio card. I have a typical behringer uca222 to increase the sound quality, but the sound is still going through the hdmi signal, although it works fine if I boot the rom from the emulationstation menu. If I manage it on the autostarted rom, I will let you know.

                1 Reply Last reply Reply Quote 1
                • mago
                  mago Banned last edited by

                  Hello, guys! I tried doing this for Batocera and it worked very well! What I'm wanting is to make a script for the Batocera to boot already inside a system, for example, SNES, in the game list, without appearing the main menu. Does anyone have any idea how to create a script to direct the system into the folder?

                  voljega tonificante 2 Replies Last reply Reply Quote 0
                  • voljega
                    voljega Banned @mago last edited by

                    @mago we are not the batocera forum, please go there if you want help for batocera, it is clearly not our problem

                    mago 1 Reply Last reply Reply Quote 0
                    • tonificante
                      tonificante @mago last edited by

                      @mago in Recalbox you can do it directly from the menus, I remember that I saw the option a couple of times, I think it is under some kind of interface options menu or theme menu, maybe batocera also has it, otherwise you can try recalbox 🙂

                      mago 1 Reply Last reply Reply Quote 0
                      • mago
                        mago Banned @tonificante last edited by

                        @tonificante Thanks for reply, i just need to know the command to do the system start inside a folder, like Favorites, if i know it, i could do Batocera autostart inside the games list!

                        1 Reply Last reply Reply Quote 0
                        • mago
                          mago Banned @voljega last edited by

                          @voljega I know that here is not the forum of Batocera, but in case you do not know the system, the kernell is the same , and someone can always help, regardless of the place, whether it's your problem or not, that does not interest me!

                          paradadf 1 Reply Last reply Reply Quote 0
                          • paradadf
                            paradadf Staff @mago last edited by

                            @mago I’ll say it clear and politely... we do not give support for other OS's, regardless how similir to ours it might be. And we don't want to keep loosing our time explaining this. So please, go to your respective forum. Thank you!

                            If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                            mago 1 Reply Last reply Reply Quote 1
                            • mago
                              mago Banned @paradadf last edited by

                              @paradadf my apologizes... I see your ignorance, signs of those who do not know how to share knowledge. Save "your time" for yourself, friend, one day you may need and no one will help you!

                              paradadf 1 Reply Last reply Reply Quote 0
                              • paradadf
                                paradadf Staff @mago last edited by

                                @mago ok, here I stop answering you. I didn’t insult you in any way, but you just did and I won’t accept such behaviour.

                                If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

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

                                Want to support us ?

                                88
                                Online

                                99.6k
                                Users

                                28.1k
                                Topics

                                187.1k
                                Posts

                                Copyright © 2021 recalbox.com