RetroPie-Setup: An initialization script for RetroArch on the Raspberry Pi

If you want to install and setup RetroArch on the Raspberry Pi (TM) together with various emulator cores, all needed libraries for the SNESDev controller interface, and a graphical front end you can now go to https://github.com/petrockblog/RetroPie-Setup. There you will find an easy-to-use script that installs all essential packages for retro gaming on the Raspberry. I call it RetroPie script.

I prepared a Github repository with a shell script that automatically installs all needed packages. It has a console-based GUI and makes the installation of everything you need for retro gaming very easy. The script was tested on the Raspbian distribution. The following instructions can also be found directly on the Github site.

Download

To obtain the installation script you first need to install two packages with

Then you can download the latest RetroPie setup script with

Installation

The script is executed with

You are welcomed with the following screen

Here, you have the choice between two different ways of installation:

  1. Binaries-based installation: This way of installation will download per-compiled versions of RetroArch, various cores, Emulation Station, and SNESDev. In comparison to the second way of installation this is much faster. Even though the binaries will be updated from time to time, a disadvantage is that you probably will not have the most recent versions of the programs.
  2. Source-code based installation: This way of installation will download and compile the most recentsources of all programs and cores. Compiling everything takes some hours, but you will have the most up-to-date releases of the programs. When you choose this option in the menu a screen will appear that lets you select (with the space and arrow keys) the individual tasks to be done by the setup script:

    The default selection will install the complete set of packages.

Usage

With it's default configuration the RetroPie setup configures the graphical front end EmulationStation such that a set of emulators can directly be used by the front end. You can start the front end with

Before that, however, you need to copy your ROM files into the according RetroPie/roms/ folders. Every emulator has its own subfolder here. Due to the early stage of the ALSA implementation on the Raspberry you can expect some creaking when using the analog output. I made quite good experiences with the HDMI output. For now, another solution for that seems to be the use of an external USB soundcard until the problems with the ALSA implementation are solved.

I really would like to see this script be further developed by you and me!! I think that Github is the right place for that.

Enjoy!

  • meowzen

    Hey I'm hoping someone can help me out. Ive set up RetroPie and my wireless controller seems to work but I cant seem get any roms to open up. It only opens Apple II and then I have to use my keyboard to exit out. My roms have the correct file extensions but I can figure out how to get them to open. Also I dont see an option for this Cave game that keeps getting mentioned. Any ideas?

  • nicholas moore

    I have been having issues getting my config files for a wired Xbox 360 controller. The issue is inside the emulator its self. The drive works fine and the device is functional. I have tried a few def methods with no luck. Would someone be able to provide an image with the retro-pi being setup with a wired xbox 360 controller in the nes and snes emulators? I can provide a share drop box. Thanks!

  • sergey

    Hello, petRock! Can you help me use xbmc like front-end for retro-pie?

  • Chase

    I don't understand ... WHERE ARE THE ROMS FOR RETROPIE? I looked in the folder named 'roms', but they aren't there. Please help.

    • http://www.petrockblock.com/ petRockBlog

      You need to copy your own ROMs into the according rom folders. RetroPie does not provide any ROMs - except shareware of Doom and Duke3D and the freeware Cave Story.

  • Screamopancakes49

    Ok so I have emulation station and all that installed,as well as roms,but I'm having trouble running emulation station itself, when I try to run it from LXTerminal it tells me "X is running.please shut down X in order to mitigate problems with loosing keyboard input.for example,logout from LXDE."
    Does that mean emulation station is open somewhere and I just can't see it?

    • jmbrnt

      Hi there, you can't run emulationstation from inside LXDE. You need to quit LXDE totally (I click the red 'power' icon in the bottom right corner of the screen and select logout). This takes you back to a terminal (not a terminal emulator like LXTerminal). From here you run the 'emulationstation' command and it opens up.

      I hope that makes sense.

      • Arjan Vlek

        At this stage im sent back to a login screen rather than the terminal. If I press CTRL ALT F2 and log in, it still says that x is running even through im using the terminal screen as suggested. Can I bypass thisand open emustation anyway?

      • http://www.petrockblock.com/ petRockBlog

        You need to exit LXDE completely. To put it simple, this has to do with the way, LXDE uses the graphics resources of the RPi.

      • William O’Meara

        when you get to the terminal type "sudo service lightdm stop" to stop the x server. Replace "stop" with "start" to return to LXDE.

      • Ol Bailey

        Hello, I have stopped LDXE as you described, I was left with what I presume is the terminal (a black screen awaiting a command)
        I have typed in emulationstation, and I'm not sure if it was in the middle of something, but I am now left with a black screen and no way to input anything, any help?
        I apologise for the complete beginner SOS call, but any idea what is going on?

    • Guest

      All this means is you need to log out of the desktop environment to be able to run emulation station

  • Pingback: Tú puedes hacerlo: Crea tu propia consola | Nivel Oculto

  • Big D

    Please help! Ive tried a few times, but every time the retropie script finishes compiling, the debug list says that retroarch did not install successfully, so none of the snes, nes, etc. emulators show in emulations station.

    • Big D

      okay, I added roms, so now they show up, but none of them run. I'm guessing this is because retroarch failed to install correctly, So, I'm still stuck.

      • PiRo

        have you configured your controller in both ES and RetroArch? The first allows you to navigate the menu, the 2nd allows you control once in the game.

  • Nick

    Hi,

    I am having a problem at the end of the compiling/installing. When the script completes, it says that RetroArch was not successfully compiled or installed. Any suggestions on how to fix this issue?

    Thanks in advance,
    Nick

    • Big D

      I'm having the same problem. Hopefully someone can answer this for us. Did you compile from source or binary? I did source, but I'm about to try binary and see if it works that way.

  • Pingback: Getting Started with the RetroPie GPIO Adapter | petRockBlog

  • Oliver

    Hi, first of all, thank you very much for this great script! Unfortunately, I get some errors: the Amiga, Atari 800, GnGeo and PPSSPP could not be compiled successfully. When looking at debug.log, it says that uae4all is not available ("/home/emulator/RetroPie/emulatorcors/uae4all/uae4all does NOT exist.").
    I've selected to install all available emulators, the rPi is running raspian "wheezy" -- any idea what went wrong?

    Thanks!

    • http://www.petrockblock.com/ petRockBlog

      It seems that some of the sources are not available anymore or other things have changed. I will update the script within the next days.

  • cii

    I seem to be having trouble with the install, specifically the script can't download the RetroPie theme referenced at http://downloads.petrockblock.com/RetroPieSetupThemes_290513.tar.bz2 - I get a 404 error when accessing this URL?

    • http://www.petrockblock.com/ petRockBlog

      Ups, that download was accidentally deleted. I fixed the download!

  • Kael

    Hi everyone.

    I just got my pi a few days ago and this is exactly what I was wanting to do with it. I do have a quick question, however.

    When running the retro-pie setup script, how long did it run for you guys? I loaded raspbian and followed the instructions on the github site. I ran retropie_setup.sh last night before going to bed, compiling everything from the source distro. That was over 12 hours ago and it's still running. This doesn't seem normal to me, but is it? Should I start over and do something different or just continue to wait it out?

    • http://www.petrockblock.com/ petRockBlog

      Depending on the overclock settings I heard from people that it takes around 16 hours. The binaries-based installation is a lot faster.

      • Kael

        Thanks for the quick reply.
        I guess since I'm this far in I'll let it continue to compile. I just wanted to make sure before I go TOO impatient and wiped my sd card and started over. 0.o

  • Pizzahut91

    please tell me that I can do this on windows, too. Their command prompt isn't a unix based console like on linux or mac, so I can't see any way for me to get this as it appears to require console commands I am incapable of performing on my current setup.

    • http://www.petrockblock.com/ petRockBlog

      I'm afraid to say that the RetroPie Script only works on the Raspberry Pi. Getting emulators to run on Windows is a completely different story.

  • Diego Escobar

    neo geo full screen?

    can be modified to achieve this?

  • Pingback: more for raspberry | fredfire1

  • Diego Escobar

    to install the core PicoDrive dgen emulator automatically uses it?

  • rleyfield

    By the way, you don't need to use SSH to do this. The writer of petRockBlog only did this so they could take screenshots of it.

  • Pingback: Raspberry Pi | Persönliche Rezensionen aller Art

  • torturedutopian

    Hi ! First, thanks a lot for your work, it's very much appreciated !

    However, I'm experiencing some issues regarding input. I'm using keyboard input (as I'm using the Pi in an arcade cabinet with an i-pac interface).

    Emulation station reports some "script error" when trying to setup some input settings (dgen for instance). The settings for retroarch do not report any error, but buttons do not work when starting the emulator. Well it seems to partly work actually, I managed to get the start button to work once, but for instance, not when it was mapped to "&" but when it was mapped to "x". But then the other ingame buttons didn't work at all (ctrl alt space etc.)

    Anyway, I was using the binary install. Trying to build the sources now :-)

  • Nicholas Moore

    Does anyone know how to configure the xbox controller to drop to a terminal when hitting the home button? any help would be great. I have found a work around to play music in the retro pie. I can complete ths via ssh but would like to be able to from the controller without ssh or a local keyboard!.

  • Pingback: Global Knowledge UK Training Blog » Blog Archive » Fun Things you Can Do with a Raspberry Pi

  • Pingback: Creating the RetroPie SD-card Image: A Recipe

  • DomNewell

    Hi
    I love the image, and have just done this with the setup script, but for some reason now I just get a white dot in the middle of the screen when it boots up. Do you have any ideas as to what I could do?

    Thanks

    • http://www.petrockblock.com/ petRockBlog

      In some cases in the past, this was observed when the power source was too weak (<1000mA).

      Are you using the downloadable SD-card image? Od did you use the binaries- or source-based installation of the RetroPie Setup Script?

      • DomNewell

        Hi,
        I am using the downloadable sd image, and used the binaries based installation.
        Thanks

      • http://www.petrockblock.com/ petRockBlog

        If the white-dot-problem occurs with the SD-card image, I would guess that the power supply is too weak.

      • DomNewell

        Thanks, do you know what you use? I have tried two different plugs, one for my phone (1000mA) and the one that came with my pi (330mA).

      • http://www.petrockblock.com/ petRockBlog

        I am using this one: http://www.amazon.de/Belkin-USB-Netzadapter-iPod-iPhone/dp/B003DN3API and I have not observed any issues regarding the power source until now.

      • DomNewell

        ok, thanks

      • http://www.petrockblock.com/ petRockBlog

        Unfortunately, no I do not know it. Maybe someone else here?

      • DomNewell

        I've just had a look on google and it says that the white dot is a memory split problem. How would I get to terminal with this problem?

      • http://www.petrockblock.com/ petRockBlog

        If you cannot even boot up, you would need to change the configuration in /boot/config.txt by mounting the sd-card from another Linux distribution. However, the image is working in my case as is for many, many others. So, I would not bet too much on the memory split.

      • DomNewell

        I've just redone the binaries installation onto a raspbian image, but when i type emulationstation into the terminal it just says no such file or directory

      • MojoArcade

        I'm having the exact same problem, had a working retropie installation

      • http://www.petrockblock.com/ petRockBlog

        I will have a look into that.

      • DomNewell

        Which emulationstation: /usr/bin/emulationstation
        df /h: '/h': nocsuch file or directory
        df: no file systems processed

      • http://www.petrockblock.com/ petRockBlog

        If df is not working it sounds as if there are some serious error with the (file) system. I would recommend to copy a new version of the SD-card image onto the SD-card.

      • DomNewell

        Hi,

        Ive got an SD image and it all works now, thanks.
        However, for some reason, my retroarch.cfg has a problem where it presses back as well as down, when I press the down button. Here is the code:

        input_player1_joypad_index = "0"
        input_player1_b_axis = "+1"
        input_player1_y_axis = "-0"
        input_player1_select_btn = "2"
        input_player1_start_btn = "3"
        input_player1_up_axis = "-1"
        input_player1_down_axis = "+1"
        input_player1_left_axis = "-0"
        input_player1_right_axis = "+0"
        input_player1_a_btn = "0"
        input_player1_x_btn = "1"
        input_player1_l_btn = "4"
        input_player1_r_btn = "5"

        I thought it was a number mix up, but it doesn't happen with the a button and the right button, which also have the same number. Could you help? Thanks

      • http://www.petrockblock.com/ petRockBlog

        Maybe this works?

        input_player1_joypad_index = "0"
        input_player1_b_btn = "6"
        input_player1_y_btn = "7"
        input_player1_select_btn = "2"
        input_player1_start_btn = "3"
        input_player1_up_axis = "-1"
        input_player1_down_axis = "+1"
        input_player1_left_axis = "-0"
        input_player1_right_axis = "+0"
        input_player1_a_btn = "0"
        input_player1_x_btn = "1"
        input_player1_l_btn = "4"
        input_player1_r_btn = "5"

        The lines

        input_player1_b_axis = "+1"
        input_player1_y_axis = "-0"

        look strange - I would have expected button types in these lines.

      • DomNewell

        Thanks, that's that problem sorted, but now that btn has gone completely. For example, it was the accelerate in the snes version of mario kart, and the shoot button in space invaders for atari 2600. Could I map this button?

      • http://www.petrockblock.com/ petRockBlog

        Could you post the output of the command jstest /dev/input/js0 here?

      • DomNewell

        Driver version is 2.1.0.

        Joystick (USB Gamepad ) has 2 axes (X, Y)

        and 10 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4).

        Testing ... (interrupt to exit)

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0:-32767 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        Axes: 0:-32767 1:-32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:

        off 7:off 8:off 9:off

      • DomNewell

        Hi,
        could you give me some sort of update as to what is happening, it's just that it has been a while since I last posted?
        Thanks

      • http://www.petrockblock.com/ petRockBlog

        Could you try and follow the steps described in the article at http://blog.petrockblock.com/2013/12/02/retropie-autoconfig-functionality/? hope that this solves your controller issues.

      • DomNewell

        Thanks, that has worked. Ps1 games work brilliantly, I might add

      • http://www.petrockblock.com/ petRockBlog

        what is the output of the command which emulationstation? This command checks for the location of emulationstation.

        what is the output of the command df /h? This command checks for the free space.

  • tri

    cd
    git clone git://github.com/petrockblog/RetroPie-Setup.git

    doesnt seem to be working for me, keep getting An error.

    fatal: remote error:
    repository not found.

    • Sandwich

      Try This

      git clone --depth=0 git://github.com/petrockblog/RetroPie-Setup.git

      • anil

        I did git clone without the depth parameter, is this a bad thing?
        can i fix it now, IVE already run the script?
        thanks

  • Pingback: Update for the RetroPie Setup Script: Support for RetroArch’s Autoconfig Functionality and (wired) Xbox 360 controller support | petRockBlog

  • Pingback: RetroPie-Setup: Raspi als retro console | fortschrittsbalken

  • Pingback: 12 Ways To Make The Most Of Raspberry Pi | DIGIZENS

  • Pingback: 12 Cool Projects For Your Raspberry Pi

  • Pingback: 12 tutorials for taking your Raspberry Pi to the limit | TopNewsSites

  • James Hastings-Trew

    I see a couple of errors go by while it is fetching dependencies:
    Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgnutlsxx27 armhf 2.12.20-8
    404 Not Found
    Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgnutls-dev armhf 2.12.20-8
    404 Not Found

  • Vakilando

    My SD card is corrupted but I can still mount it on an Debian PC. Can I just copy the Retropie folders to a new SD Card? I want to keep my Games and Savegames...

    • http://www.petrockblock.com/ petRockBlog

      Yes, you can copy the folder RetroPie with all subfolders to another SD-card. It contains all emulators, ROMs, save games etc.

  • Michael Gibson

    If there are a few components that do not install correctly is there a way to run the installation again and only install the things that need to be re-installed?

    • http://www.petrockblock.com/ petRockBlog

      You can use the "source-based installation" to select individual components for their (re-)installation.

      • Michael Gibson

        The only problem with that is you cannot always tell which parts of the installation went wrong When doing the Installation I left it overnight it taking 16 hours and all but I'm using my laptop to forward the internet to the Raspberry pi so when I got Up the internet was down for the Raspberry pi because the computer went to sleep in a way even though I selected things that were supposed to prevent that

      • http://www.petrockblock.com/ petRockBlog

        A logging function was added some time ago. You can print the logs with the command zless /home/pi/RetroPie-Setup/logs/.

  • Pingback: Another Interim Report on the RetroPie Project and a new Logo | petRockBlog

  • Pingback: Xarcade2Jstick – Map your Xarcade Tankstick to Game Pads | petRockBlog

  • Lucas

    Hey, the MAME4ALL emulator is not working, I'm trying to load metalslug, streetfighter, pac man, tron and others, and it's not working .. can someone help me ?

    • Lucas

      One thing, I'm using NOOBS as SO on my rpi, is that a problem ?

  • Pingback: Major Update for RetroPie | petRockBlog

  • Pingback: Retro PiGeek Studio Club

  • JakeTheGreat

    Hey i'm kinda a beginner and i need some help getting my PSX controller working in Emulation Station. My first problem is that when i test my controller in the terminal, for couple of the buttons it shows as if i was pressing multiple buttons, while other button presses aren't detected.
    My second problem is that when i start emulation station it says "No game pads detected, Hold a button on you're device to configure it." and when i hold a button down there's no response. Can someone please help me? Thanks, Jake

  • Modern Pie

    i in stalled it and ran it but it only has 3 systems an i can't play on any of them

  • PhilW

    Okay so I chose the source-based installation, and it was running for ages as expected. When finished there were a host of messages saying it failed to compile various emulators (supposedly all this was logged to a debug log, but I can't find that file anywhere). I tried running emulation station anyway but was told the was no such file or directory. Not sure where to go from here!

    • PhilW

      I tried the binaries installation after this, and managed to run emulationstation, but it freezes as soon as I hold any key/button at the start.

    • wrzr123

      Hey, similar problem here! I tried to install mupen64 via source-based installation, and there was the error message 'Could not successfully compile Mupen 64 Plus RPi. See debug.log for more details.'
      But where is this debug.log-file??

      • http://www.petrockblock.com/ petRockBlog

        You can find the debug logs of the RetroPie Setup Script in ~/RetroPie-Setup/logs/ To list a log file you can use the command zless LOGFILENAME

  • Xhogar

    This stuff is just amazing. Thanks for the effort!! :)

%d bloggers like this: