Homepage Forums RetroPie Project Everything else related to the RetroPie Project Start a specific emulator by command line

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #115983
    marvink
    Participant

    Hello everyone!

    I want to start a specific emulator (for example “snes”) from the command line so that I only have to choose the game I want to play. Is there a command for this purpose?

    Greetz
    Marvin

    #115984
    herbfargus
    Member
    #115992
    labelwhore
    Participant

    Just to add to Herb’s reply. You can see the commands ES is using when it starts an emulator by looking at the emulators.cfg files in the respective folders here /opt/retropie/configs

    #116943
    marvink
    Participant

    Thanks for the answers!

    My RetroPie-Project goes ahead and I think I need some base support.
    All hardware is available and now the tinkering and programming can start.

    So thats the plan:
    I have an old rotary phone and want to use it as the case for my raspberry pi 2. Instead of the normal RetroPie Gui I will show my own user interface where all available games are displayed with a “phonenumber”. The user can then dial a number to start a specific game. Probably there will be no more than 10 games.

    I think the answers above will help me to start the game, but a few questions are still open:

    How can I start my own programm while system start, instead of the RetroPie GUI?
    Which programming language should I use? (I have some experience with C#, Java, C and Python)

    I’m thankful for every tip.

    Greetz
    Marvin

    #117153
    labelwhore
    Participant

    First you’ll need to stop ES from starting up at boot time. I believe you can do this from the retropie-setup script. From there the easiest way to get something to run at boot time is to add a command to /etc/rc.local.

    #117158
    marvink
    Participant

    That is a good starting point. Thanks!

    #119521
    marvink
    Participant

    Hallo again!
    So, work is still in progress…
    I wrote the skript and it works fine until I want to execute the command,
    I use:
    command = retroarch -L /opt/retropie/libretrocores/lr-pocketsnes/libretro.so /home/pi/RetroPie/roms/snes/nameofmyrom.smc
    subprocess.check_call(command, shell=True)

    But it returns:
    “returned non-zero exit status 2”

    I tried some variations but I dont get it :(

    Any ideas about that?

    #119687
    marvink
    Participant

    Yeah, I got it! :D

    Three points:
    1.:’subprocess’ does not work. I had to use ‘os.system’
    2.: I had to use the full path, when calling the ‘retroarch’ command.
    3.: I had to insert a backslash for each space and parentheses in the name of the roms.

    The rest should be simple, but we will see…

    Again, thanks for the help!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.