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

    Start game from command line

    Scheduled Pinned Locked Moved Help and Support
    retropiecommand linenfc
    8 Posts 4 Posters 7.2k 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.
    • Z
      Zephalon
      last edited by

      Hi,

      is it possible to start a ROM directly from command line? Is there some kind of wrapper provided by Retropie i could use or do i have to address each emulator directly?

      I want to add a NFC interface to my case so i can play games by putting fake cartridges near it. I know my way around the hardware, Linux and Python but the Retropie stuff is new to me.

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @Zephalon
        last edited by

        @Zephalon

        Via runcommand

        /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes /path/to/ROM
        

        Changing snes and rompath accordingly

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 2
        • Z
          Zephalon
          last edited by

          Thank you, this is exactly what i was looking for!

          1 Reply Last reply Reply Quote 0
          • Z
            Zephalon
            last edited by BuZz

            I tried it via SSH like an idiot, but of course that does not work. Anyhow, i'd like to share a 'real life' example just in case somebody run's into the same problem with the brackets:

            /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes '/home/pi/RetroPie/roms/snes/The Legend of Zelda - A Link to the Past (U) [!].smc'
            

            as for the NFC part i'll have to wait for my reader.

            BuZzB 1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators @Zephalon
              last edited by BuZz

              @Zephalon this forum uses markdown so you need to use an inline code block / code block or else some text is translated as styling - http://commonmark.org/help/ - I fixed your post.

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • daeksD
                daeks
                last edited by

                just to complete this thread: kill emulator with commandline -> http://pastebin.com/jmNJxMcJ

                BuZzB 1 Reply Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators @daeks
                  last edited by

                  @daeks SIGTERM would be better than SIGKILL and would assure a more clean exit.

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  C 1 Reply Last reply Reply Quote 0
                  • C
                    Chimera111x @BuZz
                    last edited by

                    @buzz I'm a completely new to the Retropie scene, so please forgive my stupidity.

                    If I run a game from a command line I'm assuming that I have to quit Emulation Station.

                    If I do that will the config file still be used for the system that I am running from the command line to back out of a game (hotkey+start)?

                    I'm asking because I do not want to unplug my Pi when I'm done with a game...

                    Thank you in advance!!

                    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.