Thursday, December 31, 2015

Install RetroPie 3.3.1 on Raspberry Pi1 Model B+

RetroPie 3.3.1 on Raspberry Pi1 Model B+

This post will go through the steps to get up and running with RetroPie 3.3.1 on the Raspberry Pi1 (model B+). This overview is based on my experience setting up RetroPie using several online articles that I will link to at the bottom of this post.

Note: I will not discuss how to obtain ROMs or the legality of having digital copies of your games.


Overview
  1. Download the RetroPie 3.3.1 image
  2. Install the image on a micro SD card
  3. Fire it up and make some tweaks
  4. Transfer your ROMs 
  5. Helpful resources


Download the RetroPie 3.3.1 image

You can find the latest images on the PetRockBlog download page. I've had the best luck with a direct download for the stable image. Although it takes longer to download than the torrent (about an hour), I've found it to be more stable than using an image from the torrent.
Unless you are looking to dual-boot your RetroPie, use the Standard image instead of the Berryboot.

Install the image on a micro SD card

Once you have the image, you will need to install it onto the micro SD card. I used the ApplePi-Baker application to do this on my Macbook Pro. The RetroPie Github page has information on how to install the image on the SD card if you have a Windows or Linux machine.

Fire it up

Plug your controller and keyboard into the Raspberry Pi. I recommend connecting the pi to HDMI and ethernet before firing it up (not doing this caused some issues with one of my installations).
Go through the controller setup screen in Emulation Station. This should also configure the controller for Retroarch emulators, so that saves us from having to configure the controller the old way.

Make some tweaks

  • Navigate to RetroPie in Emulation Station.
  • Use the "Raspberry Pi configuration tool raspi-config" option in the RetroPie section to expand the file system and Split the Memory.
  • After selecting Raspberry Pi configuration tool raspi-config, choose option 1 to expand the file system.
  • Then go to Advanced Options (option 8) and choose the Memory Split (option A3). For the Raspberry Pi 1 Model B+ (with 512MB RAM), I find an even 256MB split to work best. You can experiment for yourself to find out what memory split works best for you. For my Raspberry Pi2 I used an even 512MB split. 
Note: Outside of Emulation Station, I find it easier to navigate the menus using a keyboard.

Transfer your ROMs 

I've used both an ftp client and the samba share to transfer my ROMs. I haven't used the USB stick option, but you can find more details on how to transfer your ROMs from your computer to your RetroPie here.

Helpful Resources


Friday, June 26, 2015

RetroPie: Enable Video Shaders and Add Video Shader Hotkeys

RetroPie: Enable Video Shaders and Add Video Shader Hotkeys

This post will go over how to enable shaders and set up hotkeys so that you can change shaders while playing games. Shaders are applied to video games to achieve some type of visual effect. These effects can give a game a more retro look.

Enable Video Shaders

1. Navigate to RetroArch config file for the specific emulator
cd opt/retropie/configs

2. Open the configuration file
sudo nano retroarch.cfg

3. Find the option to enable shaders (you'll see some lines that have "video_shader")

4. Enable the video shader by changing the value from false to true
video_shader_enable = true


Now that the video shaders are enabled, you will want to add video shader hotkeys to your account. By adding video shader hotkeys, you can adjust the shaders in-game and see which one you prefer.


Add Video Shader Hotkeys

1. Navigate to the controller configuration file
cd /opt/retropie/emulators/RetroArch/configs/

2. Assign video shader hotkeys to your controller configuration.
#input_shader_next_btn = “ ”
#input_shader_prev_btn = “ ”


Here is an example of my controller configuration file after I added Video Shader hotkeys:
input_device = "USB,2-axis 8-button gamepad "
input_driver = "udev"
input_b_btn = "1"
input_y_btn = "3"
input_select_btn = "6"
input_start_btn = "7"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"
input_a_btn = "0"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_enable_hotkey_btn = "6"
input_exit_emulator_btn = "7"
input_save_state_btn = "0"
input_load_state_btn = "1"
input_state_slot_increase_axis = "-1"
input_state_slot_decrease_axis = "+1"
input_shader_next_btn = “5”
input_shader_prev_btn = “4”

If you aren't familiar with modifying the controller configuration, see my previous post: Configure a USB SNES Controller for RetroPie


Thursday, February 26, 2015

RetroPie: An All-in-One Retro Game Emulator on the Raspberry Pi

The affordable Raspberry Pie computer that is popular among DIYers and enthusiasts makes an excellent retro console emulator. You can turn it into an all-in-one retro game console that plays hundreds of classic video games and is small enough to fit in your pocket (so to speak). The only thing better than reliving classic video games is bringing it over to a friend's place and enjoying the games you grew up playing together.

The RetroPie Project makes it incredibly easy to get up and running with retro gaming. You can save plenty of time by downloading the RetroPie image that includes all of the emulators you need.

You can buy a Raspberry Pi starter kit which typically includes the following:
  • Raspberry Pie
  • microSD card (for model B+)
  • Power adapter
  • Raspberry Pi case
  • HDMI cable
In addition to the basic components, you can pick up some USB gaming controllers for that retro feel.

If you have all the components, it's a pretty strait forward process:
  • Install the RetroPie image
  • Configure your controllers to work with Emulation Station and the emulators
  • Copy over your ROMs
Of course you may want to do change a few advanced configurations:
There are plenty of guides out there to help you get set up and playing your favorite old school video games on a Raspberry Pi. Here are a few that have helped me:


Sunday, February 15, 2015

Configure a USB SNES Controller for RetroPie

Setting up a USB SNES Controller/Gamepad for RetroPie

Note: This covers how to set up a controller on RetroPie 2.6 for a Raspberry Pi 1 Model B+. The set up steps are different in later versions of RetroPie.

This post will go over how to configure a USB SNES controller for RetroPie [Update - RetroPie 2.6 for a Raspberry Pi 1 Model B+] following the steps below:
  1. Register the controller for RetroArch
  2. Modify the controller to use hotkeys

In the example below, I'm using a USB controller that I purchased from Amazon (Buffalo Classic USB Gamepad for PC). The controller received great reviews and I haven't had an issue with it. I own two of these controllers and use them for playing games on my RetroPie (SNES, NES, Genesis, MasterSystem, and TurboGrafix-16). If you have a different controller, your input numbers may differ, so keep that in mind when modifying the controller configuration file.

This setup/configuration only covers setting up a gamepad for use with the emulators that fall under RetroArch.

Register the Controller for RetroArch

When you boot into the Raspberry Pi, you will be prompted to configure the controller for Emulation Station. 
  1. Press F4 on your keyboard to exit to the command line.
  2. Navigate to the setup script location: "cd RetroPie-Setup"
  3. Load the RetroPie setup screen: "sudo ./retropie_setup.sh"
  4. Go to "SETUP" > "Register RetroArch controller"
  5. Follow the onscreen instructions to map your controller inputs (if your controller doesn't have the buttons, wait a few seconds and it will skip to the next button)
    1. Note the name of the configuration file this setup creates as we will be modifying the file below to add hotkeys.
  6. When the setup finishes, reboot (back out to the previous menu options and select "Perform REBOOT").
To run the controller setup script:
cd RetroPie-Setup
sudo ./retropie_setup.sh


Modify the Controller to Use Hotkeys

Hotkeys can be set up to exit the emulator, reset, the game, save/load states, etc.
Reminder: The configuration below is specific to the controller that I mentioned above. Your input buttons will differ depending on the USB controller you are using.

Steps (starting from the command line):
  1. Navigate to the controller configuration file
  2. Edit the configuration file that you had set up for RetroArch
  3. Save the changes to the configuration file and exit the editor
1. Navigate to the controller configuration file
cd opt/retropie/emulators/RetroArch/configs
sudo nano USB,2-axis8-buttongamepad.cfg

2a. Open the controller configuration file using "nano":
input_device = "USB,2-axis 8-button gamepad  "
input_driver = "udev"
input_b_btn = "1"
input_y_btn = "3"
input_select_btn = "6"
input_start_btn = "7"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"
input_a_btn = "0"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"

2b. Add a line to enable the hotkey button (I'm using the select button on my controller):
input_enable_hotkey_btn = "6"
You can add hotkeys to perform the following functions:

#Enable hotkeys
input_enable_hotkey_btn = ""
#Exit the emulator
input_exit_emulator_btn = ""
#Save/Load a state
input_save_state_btn = ""
input_load_state_btn = ""
#Increase/Decrease the save state slot
input_state_slot_increase_axis = ""
input_state_slot_decrease_axis = ""
#Toggle the emulator menu
input_menu_toggle_btn = ""
#Reset the emulated game
input_reset_btn = ""

To use the hotkeys, hold down the button assigned to the "input_enable_hotkey_btn" and press the button assigned to the function you want to perform.

My final controller configuration looks like this:
input_device = "USB,2-axis 8-button gamepad  "
input_driver = "udev"
input_b_btn = "1"
input_y_btn = "3"
input_select_btn = "6"
input_start_btn = "7"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"
input_a_btn = "0"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_enable_hotkey_btn = "6"
input_exit_emulator_btn = "7"
input_save_state_btn = "0"
input_load_state_btn = "1"
input_state_slot_increase_axis = "-1"
input_state_slot_decrease_axis = "+1"
input_menu_toggle_btn = "5"
input_reset_btn = "4"

3. Save the changes to the configuration file and exit the editor:

  • Control + X
  • Y
  • Enter
You should now have a working controller configured with functional hotkeys.