Retro Gaming Console with Raspberry Pi – Memories of playing River Raid on Atari …

Retro_Gaming_Console_with Raspberry _Pi

In a short amount of time Raspberry Pi archived a very high acceptation and recognition amongst the enthusiasts than any other device. Lunched in February 2012 and just cost between 25 and 35 US $.

Raspberry Pi based on 700 MHz ARM processor and current version comes with 512 MB of memory. On the OS side many it support many Linux kernel based operating systems and some of them released their slim-down versions for optimal performance.

With support of native USB and adequate number of I/O’s, Raspberry Pi is ideal for hobbyist to professional projects such as old Game console emulators.

Lot of the supported Linux already have many different games emulators that can be used to play games but they all comes with their own issues and setup complexity which takes out the fun element.

And here’s comes RetroPie Project () which bring all of the best of retro gaming is one small package.

“The RetroPie Project is a collection of works that all have the overall goal to turn the Raspberry Pi into a dedicated retro-gaming console.” RetroPie Project

RetroPie comes in two flavors, RetroPie Script and RetroPie SD-card image.

RetroPie Script is a bash script which let you install and configure all the emulators and components but it require that Raspbian OS is already installed on the Raspberry Pi.

While RetroPie SD-card image is complete and prepared image of Raspbian OS, all emulators, front-end and Samba shares ready to start and play.

I find RetroPie SD-card image method much easier and convenient. Now let start building J

Hardware

We need following hardware components to build.

  • A Raspberry Pi (I had an earlier 256 MB Model B rev 1 laying around)
  • USB 5 V Power adapter 700 mA (3.5 W)
  • SD card 4/8 GB
  • HDMI cable
  • Wired keyboard
  • HDMI cable
  • Wired Ethernet cable(LAN )
  • A Raspberry Pi Case (if you want it to look prettier 🙂
  • A USB PC Game Pads (I used these cheap Gametech 2-pack Dual Shock Pad )

Initial Set-up

I will be using Windows OS for this part of the setup, depending on your OS steps can be slightly different.

  • First thing first, we need to get the latest (current v2.3) RetroPie SD-card image from the here.
  • Download image is compress in Zip, extract it by using 7-zip or other compatible utility.
  • An SD card is needed of at least 4gb (I personally recommend to use 8GB ,that will allow to hold the emulators ROM’s files )
  • Use Win32 Disk Imager to transfer the image on the SD card (dd command in Linux)

In some TV/monitor displays Raspberry Pi HDMI don’t show anything (No Signal). This is a known issue, and can be fixed.

In Windows OS, go to the boot sector of the SD card (usually drive name BOOT) and edit the config.txt with following code

hdmi_force_hotplug=1

Unplug the SD card from window machine and hock it up into Raspberry Pi and attach all the cables including USB game Pads and turn on the system.

First Boot

 

Raspberry Pi will automatically turn on when USB power cable is connected. In a short while a controller input configuration screen will be prompted, this input configuration is only for emulators Front-end navigation and an additional setting will be needed to configure In-Game controller setup.

In most cases RetroPie automatically detect the controller and prompt you the press the correspondent buttons.

gamepad_welcome

To get better performance we need to change some configuration in Raspberry Pi underlying OS. Press F4 on the keyboard and it will take you out from Emulator front-end to Raspbian command shell.

Enter “raspi-config” command and it will prompt a configuration screen.

  • Now select Option 1 “Expend file system” to utilize the whole SD card
  • After that select Option 8 and enable SSH and SAMBA, it will enable remote connection from another PC (through putty) and file sharing to transfer ROM files.
  • Also select “Memory Split” and change the memory allocation to 128 for 256 MB Raspberry Pi and 256 for 512 MB.

Finally navigate down to Finish by using TAB and press Enter to confirm. It will restart the Raspberry Pi.

Additional Set-up

Go the command shall by pressing F4.

Configuring the Twin Gamepad

Use the following command to configure the Gametech twin USB controller by default only one of the twin will work.

cd ~/RetroPie/emulators/RetroArch/tools/ &&

./retroarch-joyconfig -p 2 -j 1 >> ~/RetroPie/configs/all/retroarch.cfg

-j indicate the joystick index while –p indicate the player.

Try -p2 in -p 2 does not work.

>> is used to redirect the output to the file, you can either save output of retroarch-joyconfig to different file and manually edit the retroarch.cfg

The output file generated by retroarch-joyconfig for Gametech twin controllers

input_player1_joypad_index = “0”

input_player1_b_btn = “2”

input_player1_y_btn = “3”

input_player1_select_btn = “9”

input_player1_start_btn = “8”

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 = “4”

input_player1_r3_btn = “5”

input_player1_l_x_plus_axis = “+0”

input_player1_l_x_minus_axis = “-0”

input_player1_l_y_plus_axis = “+1”

input_player1_l_y_minus_axis = “-1”

input_player1_r_x_plus_btn = “1”

input_player1_r_x_minus_btn = “3”

input_player1_r_y_plus_btn = “2”

input_player1_r_y_minus_btn = “0”

input_player2_joypad_index = “1”

input_player2_b_btn = “2”

input_player2_y_btn = “3”

input_player2_select_btn = “9”

input_player2_start_btn = “8”

input_player2_up_axis = “-1”

input_player2_down_axis = “+1”

input_player2_left_axis = “-0”

input_player2_right_axis = “+0”

input_player2_a_btn = “1”

input_player2_x_btn = “0”

input_player2_l_btn = “6”

input_player2_r_btn = “7”

input_player2_l2_btn = “4”

input_player2_r2_btn = “5”

input_player2_l3_btn = “4”

input_player2_r3_btn = “5”

input_player2_l_x_plus_axis = “+0”

input_player2_l_x_minus_axis = “-0”

input_player2_l_y_plus_axis = “+1”

input_player2_l_y_minus_axis = “-1”

input_player2_r_x_plus_btn = “1”

input_player2_r_x_minus_btn = “3”

input_player2_r_y_plus_btn = “2”

input_player2_r_y_minus_btn = “0”

Adding Exit keys

Game can be exit by pressing SELECT+START by adding these commands I retroarch.cfg

input_enable_hotkey_btn = “8”

input_exit_emulator_btn = “9”

Adding Save & Load states

Following command will add the functionality of load and save states for the games.

input_save_state_btn = “5”

input_load_state_btn = “4”

Now add L and R paddle to load and save those states.

input_volume_up_axis = “-1”

input_volume_down_axis = “+1”

Write . emulationstation command to start up the emulator again from the shell.

Transferring the Games

In 2.3 version of RetroPie SD-card image SAMAB is already setup for many individual emulators, thus transferring game in much simpler than previous versions.

You need to connect your Raspberry Pi to your network and SAMBA shares will appears on your Windows Network shares, there you can transfer your ROMS to the relevant Share Directory.

When transferring is done go back to your Raspberry Pi and on the emulator screen you see the transfer games.

Now Press the START button and begin you Classic Mario or River Raid adventure ….

  1 comment for “Retro Gaming Console with Raspberry Pi – Memories of playing River Raid on Atari …

  1. Waseem
    2014/09/28 at 19:36

    nice article,
    it will be good if you write how to add wifi/ bluetooh gamepad support

Leave a Reply

Your email address will not be published. Required fields are marked *