Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Updated for 2.2: Step-by-Step Guide
- This topic has 80 replies, 16 voices, and was last updated 9 years, 8 months ago by tdawg1982.
-
AuthorPosts
-
07/05/2014 at 02:34 #12147zSprawlGuest
Well I see it asked a lot, and I keep notes for myself, so I figured I would share. I’ve updated my build document for version 2.2 and am having a blast playing with the new interface.
—-
1) Download the latest version of RetroPie’s SD image. This document is based off version 2.2.
https://www.petrockblock.com/download/retropie-project-image/
2) Download and use Win32 Disk Imager to apply the above SD image to a 4 GB or larger SD card. 8 GB is really recommended.
http://sourceforge.net/projects/win32diskimager/
3) Boot the SD Image on your Raspberry Pi.
4) The first time the system boots up into Emulation Station, you will need to setup your joystick.
5) If this is a new Pi, you’ll probably want to update to the latest firmware and reboot. You may need to use a wired cable even if you plan on using wifi.
sudo rpi-update
sudo reboot
sudo apt-get update && sudo apt-get upgrade -y6) I purchased a EW-7811Un USB wifi, which is supported by the Raspberry Pi out of the box. I also have a TL-WN725N, which can be setup as follows:
http://www.raspberrypi.org/forums/viewtopic.php?p=462982#p462982
tar -zxvf 8188eu-201xyyzz.tar.gz
sudo install -p -m 644 8188eu.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo insmod /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko
sudo depmod -a7) Now we need to setup wifi. Edit /etc/network/interfaces to configure wlan0.
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid zInternet
wpa-psk *******8) Before we can move to configuring everything via SSH, we need to configure our joystick for the emulators themselves.
sudo chown pi /opt/retropie/configs/all/retroarch.cfg
cd /opt/retropie/emulators/RetroArch/installdir/bin
sudo ./retroarch-joyconfig -j 1 >> /opt/retropie/configs/all/retroarch.cfg9) Grab the IP address and SSH into the device to continue configuration. The default user/password that comes with Raspbian is used: The username is “pi”, the password is “raspberry”.
10) Let’s setup the player 2 controller for our emulators before we forget.
cd /opt/retropie/configs/all/
vi retroarch.cfgCopy and paste the entire section that begins with “input_player1_” and change it to “input_player2_”. Don’t forget to change the “input_player_joypad_index” to 1 or 2 as well.
Note: If you have a keyboard connected, things can be a little odd. You may need to change the joypad index to 0 and 1 if you remove the keyboard, which I’m going to do.
At the end of the retroarch.cfg file, it is a good idea to add the following to allow you to press select+start to exit the game.
input_enable_hotkey_btn = “8”
input_exit_emulator_btn = “9”I also like to take advantage of the save and load states in emulation, which some people consider cheating. Add the following lines to enable these buttons on your joypad.
input_save_state_btn = “4”
input_load_state_btn = “5”After this has been done, you can hold select and press the L and R paddles to save and load states respectively.
11) Run configuration.
sudo raspi-config
12) Change password.
13) Change Memory-split to 384.
14) Expand root file system to fill entire SD card.
15) Force audio out of audio jack (instead of HDMI).
16) Exit from tool and reboot.
17) SSH back in (if you are using DHCP, the resizing of the file system can cause an IP change).
18) Now we need to ensure that pisnes is the active emulator in Emulation station. Pisnes has problems playing some of the later games, like Yoshi’s Island, but performs way better than the RetroArch version. It is up to you whether you can handle the lag and broken sound in RetroArch.
cd /etc/emulationstation
sudo vi es_systems.cfgChange the section for SNES by uncommenting out the line for pisnes, and commenting out the current line. It should look like this when you’re done.
<system>
<fullname>Super Nintendo</fullname>
<name>snes</name>
<path>~/RetroPie/roms/snes</path>
<extension>.smc .sfc .fig .swc .SMC .SFC .FIG .SWC</extension>
<command>/opt/retropie/emulators/pisnes/snes9x %ROM%</command>
<platform>snes</platform>
<theme>snes</theme>
</system>You can also edit this file to remove other emulators. I deleted the Apple, Ports, and DOS emulators by commenting out their respective sections.
19) Now we need to configure the controller for pisnes.
cd /opt/retropie/emulators/pisnes
sudo vi snes9x.cfgEdit this file to match your controller. Here is my config file:
[Keyboard]
# Get codes from /usr/include/SDL/SDL_keysym.h
A_1=100
B_1=99
X_1=115
Y_1=120
L_1=97
R_1=102
START_1=13
SELECT_1=9
LEFT_1=276
RIGHT_1=275
UP_1=273
DOWN_1=274
QUIT=27
ACCEL=8[Joystick]
# Get codes from “jstest /dev/input/js0”
# from package “joystick”
A_1=1
B_1=2
X_1=0
Y_1=3
L_1=4
R_1=5
START_1=9
SELECT_1=8
A_2=1
B_2=2
X_2=0
Y_2=3
L_2=4
R_2=5
START_2=9
SELECT_2=8
QUIT=99
ACCEL=7
QLOAD=99
QSAVE=99
#Joystick axis
JA_LR=0
JA_UD=1
JA_LR_2=0
JA_UD_2=1[Graphics]
DisplaySmoothStretch=1
# Display Effect: 0 none, 1 scanlines, 2 phospher
# NOTE Phospher does not run at full speed
DisplayEffect=0
MaintainAspectRatio=1
DisplayBorder=0
AutoFrameskip=1
Frameskip=200
Transparency=1
CPUCycles=100[Sound]
APUEnabled=1
# Sound rates below as index, i.e. 7=44100 (some of these produce static)
# 0, 8192, 11025, 16000, 22050, 29300, 32000, 44100
SoundPlaybackRate=7
InterpolatedSound=020) Now copy your Roms to the SMB shares (ex. \\RaspberryPi\snes is where the Super Nintendo ROMs go).
21) All done? Reboot and game on.
sudo reboot
22) And once you are happy for a few days, go back into “raspi-config” and overclock your pi, if you are feeling daring. It will iron out some of the annoying blips in audio. I purchased a few heat sinks just in case.
07/05/2014 at 05:29 #12171smatticusParticipantgreat work! a couple of points/questions
1) i added
input_reset_btn = “3” to reset the rom
and
input_menu_toggle_btn = “0” to bring up the retroarch menu but i can’t save the configs2)how are you getting the memory split to be 384? my pi freezes the minute the emulationstation starts to appear
3)also how does one “copy and paste” inside the ssh window? i’ using puTTY on windows to ssh into the pi. was this more of a linux-based guide?
4)it looks like that chown command worked for cyberduck and winSCP, i can now log in as pi and edit the retroarch.cfg, which is super handy
5)you can apparently have both snes emulators in the emulationstation menu by adding the commands into es_systems.cfg, i haven’t quite figured out how to make them LOOK different, i just know that the first one to the left is the retroarch snes and the one o the left of THAT is pisnes. so people don’t have to choose, although the save states and save games don’t follow even though its the same rom path… weird
07/05/2014 at 06:29 #12177zSprawlGuest1) What do you mean you can’t save the config?
2) I have the latest model with 512 onboard. Perhaps you have an earlier model? Either way, 256 works fine. I have heard 128 does too, and some have said it is the optimal setting, but I can’t tell the difference tbh.
3) I use a Windows desktop as well and SSH into my Pi using Putty. Pasting in a Putty window is a simple right-click of the mouse. Just make sure your enter insert mode in vi before you paste! If you don’t know vi well, use nano. It makes more sense to most.
5) Oh cool. I’ll have to check that out. I’ve noticed that pisnes saves games at ~/.snessavegames (or something like that in the home folder). I copied that to my new build when I went from 1.x to 2.2 and my games restored fine.
07/05/2014 at 06:40 #12179zSprawlGuestFor point 1, I bet you need to do a chown on the es_system.cfg file in /etc.
sudo chown pi /etc/emulationstation/es_system.cfg
I haven’t tested it yet, since I’m no longer at home, but let me know how it works out.
07/05/2014 at 08:11 #12188smatticusParticipant1-if I use the retroarch menu to edit settings within a rom and I go to “save new retroarch” or whatever it says, I get the error “cannot save to retropie/configs/a…” but it cuts off so I never see the end.
2-The cooy and pasting wasn’t working so well for me. I’m a major noob in linux so I’m still getting my bearings. I’ll try nano next time since I’ve used it before.
3- I bought the most recent model b from adafruit so I hope it has the full 512mb. Is there a way to check?
4-Do you know how I would go about making the seperate snes emulators appear different in ES? I’m assuming it involves the es_systems.cfg again or maybe a different setting?
5-one last thing since you’ve been so helpful, do you know anyway to set up controls for mame so that they stick? Its the last piece of the puzzle for me and I really wanted to fix that
07/05/2014 at 08:33 #12191zSprawlGuest3) Not sure, but sounds like the latest.
4) I haven’t tried yet. Perhaps tomorrow.
5) I haven’t messed with MAME since I’m setting this Pi up as a console emulator. I have me an arcade cabinet for MAME, but it isn’t running on a Pi, yet. :)
07/05/2014 at 10:18 #12198petrockblogKeymasterGreat post!
Do you think that the guide is general enough that it could be posted as a blog post?07/05/2014 at 10:52 #12199ThomasGuest1-if I use the retroarch menu to edit settings within a rom and I go to “save new retroarch” or whatever it says, I get the error “cannot save to retropie/configs/a…” but it cuts off so I never see the end.
ich habe das problem auch
i have the problem too
07/05/2014 at 13:46 #12226nemo93ParticipantThomas, anyone with “permissions” issue,
please have a look here: https://www.petrockblock.com/forums/topic/no-writing-permission-for-retroarch-cfg/#post-12219
hope this helps.
cheers,07/05/2014 at 16:34 #12264zSprawlGuestI’ll look into the permissions issue later today. I would recommend against making a root user. While it works, it really isn’t “best practice”.
Once we work out the last few kinks, this would be an excellent blog post. All I would ask is for a link back to my world ( http://zsprawl.com ).
Thanks!
07/05/2014 at 16:40 #12268borlandofloridaParticipantExcellent post. Just what I was looking for (hence my original post yesterday). Going through a new setup now so will follow this and see how it goes. Will report any issues.
07/05/2014 at 20:44 #12302ranem123ParticipantGuys please help me i cant edit the es_systems.cfg with Winscp getting permission error .
Antoher Question how i can stretch or fit the screen ?
07/05/2014 at 21:50 #12313zSprawlGuestFix your permissions error one of two ways:
1) You can change the owner of the file to pi.
sudo chown pi /etc/emulationstation/es_systems.cfg
2) Or you can put a file that overrides it in ~/.emulationstation
sudo cp /etc/emulationstation/es_systems.cfg ~/.emulationstation
vi ~/.emulationstation/es_systems.cfg07/05/2014 at 21:52 #12314zSprawlGuestIt looks like Nemo’s suggested fix is probably the best. Honestly I’m not running into the permissions issue once I did:
sudo chown pi /opt/retropie/configs/all/retroarch.cfg
However, I’m also only using NES, SNES (pisnes), Genesis, Master System, and Turbographx.
07/06/2014 at 04:18 #12372zsprawlParticipantBy the way, to save your configs in-game, I was able to do so after running:
sudo chown -R pi /opt/retropie/configs
After you do the above, once in game, press F1 to access the setup menu.
07/06/2014 at 06:49 #12386smatticusParticipantDon’t forget you can set a hotkey for the menu if you don’t always want to have a keyboard plugged in
07/06/2014 at 12:02 #12409lukasParticipantHello,
i am running into problems when typing the sudo ./retroarch-joyconfig command.
I am using a xbox 360 wired controller, i already installed the xboxdrv but the lights are still flashing on the controller.When entering the command, i get this error: Couldn’t open joystick #1
Can someone help me?
Thanks
07/06/2014 at 16:56 #12436zsprawlParticipantUnfortunately the X-Box controller will never stop flashing. That is normal behavior in my experience.
As far as the retroarch-joystick command, try different “-j” values. For me, the controller was “-j 1” but for you it might be “-j 0” or “-j 2”.
07/06/2014 at 19:43 #12468LukasGuestHello,
thanks for your help, now i cant run my snes roms. i’ve put them in the before mentioned directory, but i get this error:
sh: 1: /opt/retropie/emulators/pisnes/snes9x/home/pi/RetroPie/roms/snes/Legend of Zelda.smc: not found
It looks like i changed the path to the roms, but i cant figure it out how to change the path directory.
When Starting the Emulationstation i see the Snes emulator and Zelda, but when i try to start this i get this error in the CLI and get back to the Station.
Thanks for your help!
Regards
07/06/2014 at 19:53 #12470LukasGuestSmall Update:
and i cant move to the directory, i can change the directory till …/pisnes/
When i try to get to /pisnes/snes9x/ i get this error:
-bash: cd: …./snes9x/: Not a Directory
I hope this helps
07/06/2014 at 21:21 #12478ranem123ParticipantHi Guys i use my Ps2 Controller with my adapter (Twin USb ) all working only the analog sticks not working . How i can fix it ?
Thanks07/06/2014 at 23:43 #12487zsprawlParticipantI believe you set the path to your ROMs in the es_system.cfg file.
sudo vi /opt/retropie/configs/all/retroarch.cfg
Look for the line that declares the system_directory. Mine looks like this:
system_directory = /home/pi/RetroPie/roms/../BIOS
Also you may want to change your es_system.cfg back to RetroArch and see how that works.
Also, try starting up any game at all, even the built in ones, and hit F1. Try to configure the path to your ROMs there.
Somewhere you have a path setting messed up, just not sure where. Worst case, start over.
07/06/2014 at 23:44 #12488zsprawlParticipant[quote=12478]Hi Guys i use my Ps2 Controller with my adapter (Twin USb ) all working only the analog sticks not working . How i can fix it ?
Thanks[/quote]Did you use the following to set it up?
sudo chown pi /opt/retropie/configs/all/retroarch.cfg cd /opt/retropie/emulators/RetroArch/installdir/bin sudo ./retroarch-joyconfig -j 1 >> /opt/retropie/configs/all/retroarch.cfg
You also may want to try pressing F1 during a game, and configuring the joystick there.
07/07/2014 at 02:03 #12504ranem123Participanti try it to set it up again but still not working analog sticks only d pad :( ?
when i set it up it show my analog sticks and i can recognize them but not in the games !07/07/2014 at 03:09 #12513zsprawlParticipantIf you want to use the analog stick in-game, you’ll have to configure the D pad and left stick as opposites. So when it asks for up/down/left/right, use the analog stick.
07/07/2014 at 14:19 #12664AnonymousInactiveThanks for posting this guide. It helped a lot. Unfortunately I am having trouble getting pisnes to work. I followed you directions for changing the emulator to pisnes in the es_systems.cfg file, but now when I try to run a game, I get an error something like this;
sh: 1: opt/retropie/emulators/pisnes/snes9x permission denied!
Any ideas on what I am doing wrong?
Also, another problem I am having is that I previously ran the scraper, then ended up moving some roms and now the pictures don’t show up. If I try to re-run the scraper, it thinks that the info is already there so it skips those games. If I force it to re-scrape the entire folder, it stops on the first game and goes back to terminal. If I try to re-enter emulationstation from terminal I get an error message saying I have no systems and I have to reboot.
07/07/2014 at 15:20 #12678MutexParticipantMaybe the executable has no execution rights
If that’s the case this should fix it:
sudo chmod +x opt/retropie/emulators/pisnes/snes9x
You can remove the entries from the gamelist.xml in ~/.emulationstation/.
There’s also a folder with downloaded images and since emulationstation by default just looks for roms that have no image set it will skip those.
If you just moved the rom to a different folder after scraping the path to the rom set in the gamelist.xml is wrong and starting them shouldn’t work.07/07/2014 at 15:37 #12683ranem123Participant[quote=12513]If you want to use the analog stick in-game, you’ll have to configure the D pad and left stick as opposites. So when it asks for up/down/left/right, use the analog stick.[/quote]
i try it but still only the d pad works !+
This are my analog settings
input_player1_l_x_plus_axis = “nul”
input_player1_l_x_minus_axis = “nul”
input_player1_l_y_plus_axis = “+1”
input_player1_l_y_minus_axis = “-1”
input_player1_r_x_plus_axis = “nul”
input_player1_r_x_minus_axis = “nul”what is the solution ?
07/07/2014 at 15:42 #12685tandreParticipantI dont know why but pressing 0 button, i.e. triangle on ps2 controller, emulators quit.
Also the load/save buttons doesnt work…
[code]system_directory = /home/pi/RetroPie/roms/../BIOS
config_save_on_exit = false
video_aspect_ratio = 1.33
video_smooth = false
video_threaded = true
input_enable_hotkey = escape
rewind_enable = false
rewind_buffer_size = 10
rewind_granularity = 2
input_rewind = r
video_gpu_screenshot = true
input_shader_next = m
input_shader_prev = n
video_shader_dir = /opt/retropie/emulators/RetroArch/shader/
input_player1_a = x
input_player1_b = z
input_player1_y = a
input_player1_x = s
input_player1_start = enter
input_player1_select = rshift
input_player1_l = q
input_player1_r = w
input_player1_left = left
input_player1_right = right
input_player1_up = up
input_player1_down = down
input_autodetect_enable = true
joypad_autoconfig_dir = /opt/retropie/emulators/RetroArch/configs/
input_player1_b_btn = "2"
input_player1_y_btn = "3"
input_player1_select_btn = "8"
input_player1_start_btn = "9"
input_player1_up_axis = "-1"
input_player1_down_axis = "+1"
input_player1_left_axis = "-0"
input_player1_right_axis = "+0"
input_player1_a_btn = "1"
input_player1_x_btn = "0"
input_player1_l_btn = "6"
input_player1_r_btn = "7"
input_player1_l2_btn = "4"
input_player1_r2_btn = "5"
input_player1_l3_btn = "11"
input_player1_r3_btn = "10"
input_player1_l_x_plus_btn = "h0up"
input_player1_l_x_minus_btn = "h0down"
input_player1_l_y_plus_btn = "h0right"
input_player1_l_y_minus_btn = "h0left"
input_player1_r_x_plus_btn = "+2"
input_player1_r_x_minus_btn = "-2"
input_player1_r_y_plus_axis = "+3"
input_player1_r_y_minus_axis = "-3"
input_enable_hotkey_btn = “8″
input_exit_emulator_btn = “9″
input_save_state_btn = “11″
input_load_state_btn = “10″
[/code]07/07/2014 at 19:36 #12753zsprawlParticipant[quote=12683]
i try it but still only the d pad works !+
This are my analog settings
input_player1_l_x_plus_axis = “nul”
input_player1_l_x_minus_axis = “nul”
input_player1_l_y_plus_axis = “+1″
input_player1_l_y_minus_axis = “-1″
input_player1_r_x_plus_axis = “nul”
input_player1_r_x_minus_axis = “nul”what is the solution ?
[/quote]I don’t know exactly other than going through the joystick_config script again, but it doesn’t look like anything has been setup for the X axis.
On my x-box controller, axis 1 is up and down, 0 is left and right.
Unfortunately I don’t have a PS controller to test.
07/07/2014 at 19:38 #12754zsprawlParticipant[quote=12664]Thanks for posting this guide. It helped a lot. Unfortunately I am having trouble getting pisnes to work. I followed you directions for changing the emulator to pisnes in the es_systems.cfg file, but now when I try to run a game, I get an error something like this;
sh: 1: opt/retropie/emulators/pisnes/snes9x permission denied!
Any ideas on what I am doing wrong?
Also, another problem I am having is that I previously ran the scraper, then ended up moving some roms and now the pictures don’t show up. If I try to re-run the scraper, it thinks that the info is already there so it skips those games. If I force it to re-scrape the entire folder, it stops on the first game and goes back to terminal. If I try to re-enter emulationstation from terminal I get an error message saying I have no systems and I have to reboot.
[/quote]As mentioned above, set the file to 777 will fix this.
sudo chmod -R 777 /opt/retropie/emulators/pisnes
If you download pisnes from source, this step is in the install script, so I accidently left out this requirement.
07/07/2014 at 19:39 #12756zsprawlParticipant[quote=12685]I dont know why but pressing 0 button, i.e. triangle on ps2 controller, emulators quit.
[/quote]Have you tried to set this one to “nul” and see if it still happens?
input_exit_emulator_btn = “9″
07/08/2014 at 07:51 #12962landrainGuestIn order to configure the first joystick, I’ve had to use
sudo ./retroarch-joyconfig -j 0 >> /opt/retropie/configs/all/retroarch.cfg
instead of
sudo ./retroarch-joyconfig -j 0 >> /opt/retropie/configs/all/retroarch.cfg
07/08/2014 at 07:52 #12964landrainGuestSorry, please read:
instead of
sudo ./retroarch-joyconfig -j 1 >> /opt/retropie/configs/all/retroarch.cfg
07/08/2014 at 09:14 #13019ranem123Participant[quote=12753]
<div class=”d4p-bbt-quote-title”>ranem123 wrote:</div>
i try it but still only the d pad works !+
This are my analog settings
input_player1_l_x_plus_axis = “nul”
input_player1_l_x_minus_axis = “nul”
input_player1_l_y_plus_axis = “+1″
input_player1_l_y_minus_axis = “-1″
input_player1_r_x_plus_axis = “nul”
input_player1_r_x_minus_axis = “nul”what is the solution ?
I don’t know exactly other than going through the joystick_config script again, but it doesn’t look like anything has been setup for the X axis.
On my x-box controller, axis 1 is up and down, 0 is left and right.
Unfortunately I don’t have a PS controller to test.
[/quote]I found the solution ! Everything works after delete the retroarch.cfg and set up the controller again ! !
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.