Retropie

Retropie is a Raspberri Pi OS distribution with a bunch of emulators and drivers embeded. An other distribution to have a look at is Mega Retro.

Installation

The Rapsberry Pi Imager is now able to install Retropie itself. It is even better because it avoids creating a user and setting the system. However you'll need a keyboard.

Go to Emulation and game OS > RetroPie > Choose your version.

Once done:

apt-get update && apt-get upgrade -y && apt-get install openssh-server
systemctl enable ssh
systemctl start ssh
nc -zvw100 [IP] 22

Edit the SSH server configuration:

vi /etc/ssh/sshd_config

A quick and dirty script to install some basics

#! /bin/bash

NICO_PASSWORD="XXXXX"
NICO_SSH_PUB_KEY="SSSSSSS"
PI_PASSWORD="YYYYY"

# Update and install packages
apt-get update && apt-get upgrade -y && apt-get install -y openssh-server
systemctl enable ssh
systemctl start ssh

# Manage users and SSH config
useradd -m -G pi,adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi nicolasbages
usermod --password "$(echo NICO_PASSWORD | openssl passwd -1 -stdin)" nicolasbages
usermod --password "$(echo PI_PASSWORD | openssl passwd -1 -stdin)" pi

mkdir /home/nicolasbages/.ssh
cat <<EOT >> /home/nicolasbages/.ssh/authorized_keys
$NICO_SSH_PUB_KEY
EOT

chown -R nicolasbages:nicolasbages /home/nicolasbages/.ssh

# Configure controllers
wget -P /opt/retropie/configs/all/retroarch/autoconfig
 https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/8BitDo_SN30_Pro%2B_BT_X.cfg

chown pi:pi /opt/retropie/configs/all/retroarch/autoconfig/8BitDo_SN30_Pro%2B_BT_X.cfg

cat <<EOT >> /opt/retropie/configs/all/retroarch-core-options.cfg
pcsx_rearmed_pad1type = "dualshock"
pcsx_rearmed_pad2type = "dualshock"
pcsx_rearmed_pad3type = "none"
pcsx_rearmed_pad4type = "none"
pcsx_rearmed_pad5type = "none"
pcsx_rearmed_pad6type = "none"
pcsx_rearmed_pad7type = "none"
pcsx_rearmed_pad8type = "none"
EOT

Failed to add service - already in use?

If EmulationStation is not launched due to an error like * failed to add service - already in use? *. Execute RetroPie setup, reinstall all core packages and update all.

/home/pi/RetroPie-Setup/retropie_setup.sh

First boot up of retropie comes up with a command line

If the first boot up of retropie comes up with a command line. Start EmulationStation manully.

emulationstation

Roms

Visit these websites to download some roms but never forget that it will be illegal to download a game without paying it at first. That said, I only downloaded games previoulsy bought when I was a kid. Basically those I still have the cartbridge or the CD of.

Roms can use a lot of your storage. It is common to see a PSX game somewhere between 300Mo and 600Mo. It can be a good idea to keep them on an SSD drive mounted via USB.

Raspberry Pi OS mounts USD external storages in /media. Mine got mounted by default in /media/usb0. Retropie on the other hands requires you to place roms in /home/pi/Retropie/roms/<platform>.

From that point there are 2 options:

  • Create a symbolic link from /media/usb0/<platform> to /home/pi/Retropie/roms/<platform>: ln -s /media/usb0/<platform> /home/pi/Retropie/roms/<platform>
  • Mount the USB storage in /home/pi/Retropie/roms

Memory Card

Every emulator has its own method. Most of our games are Playstation 1 games so Memory Card saves are located in /home/pi/RetroPie/roms/psx/.

Game controllers

The chosen controllers are 8BitDo SN30 Pro+.

Bluetooth MAC addresses:

  • Original: E4:17:D8:60:12:0D
  • Pink: E4:17:D8:19:6C:01

Upgrade the firmware

Do this for each controller:

  1. Download the fireware updater: https://support.8bitdo.com/firmware-updater.html
  2. Open the firmware updater
  3. Plug the controller to your mac
  4. Follow instructions

Install the controller

Download Retroarch joypad autoconfig for 8BitDo_SN30_Pro BT_X and place it in /opt/retropie/configs/all/retroarch/autoconfig

Enable joypads in section "The Controller Problem: Digital-Only & Analog" by following the playstation documentation

Eventually, the file /opt/retropie/configs/all/retroarch-core-options.cfg needs to be edited. At least to activate the joypads.

Important lines are :

pcsx_rearmed_pad1type = "dualshock"
pcsx_rearmed_pad2type = "dualshock"
cap32_autorun = "enabled"
cap32_combokey = "y"
cap32_Model = "6128"
cap32_Ram = "128"
fbneo-diagnostic-input = "Hold Start"
fuse_machine = "Spectrum 128K"
gambatte_gb_colorization = "custom"
mame2003_dcs-speedhack = "enabled"
mame2003_samples = "enabled"
mame2003_skip_disclaimer = "enabled"
mgba_allow_opposing_directions = "no"
mgba_color_correction = "OFF"
mgba_frameskip = "0"
mgba_gb_model = "Autodetect"
mgba_idle_optimization = "Remove Known"
mgba_interframe_blending = "OFF"
mgba_sgb_borders = "ON"
mgba_skip_bios = "OFF"
mgba_solar_sensor_level = "0"
mgba_use_bios = "ON"
net_retropad_ip_octet1 = "0"
net_retropad_ip_octet2 = "0"
net_retropad_ip_octet3 = "0"
net_retropad_ip_octet4 = "0"
net_retropad_port = "55400"
pcsx_rearmed_analog_axis_modifier = "circle"
pcsx_rearmed_async_cd = "sync"
pcsx_rearmed_bios = "auto"
pcsx_rearmed_display_internal_fps = "disabled"
pcsx_rearmed_dithering = "enabled"
pcsx_rearmed_drc = "enabled"
pcsx_rearmed_duping_enable = "enabled"
pcsx_rearmed_frameskip = "0"
pcsx_rearmed_gteregsunneeded = "disabled"
pcsx_rearmed_gunconadjustratiox = "1"
pcsx_rearmed_gunconadjustratioy = "1"
pcsx_rearmed_gunconadjustx = "0"
pcsx_rearmed_gunconadjusty = "0"
pcsx_rearmed_idiablofix = "disabled"
pcsx_rearmed_inuyasha_fix = "disabled"
pcsx_rearmed_memcard2 = "disabled"
pcsx_rearmed_multitap1 = "auto"
pcsx_rearmed_multitap2 = "auto"
pcsx_rearmed_negcon_deadzone = "0"
pcsx_rearmed_negcon_response = "linear"
pcsx_rearmed_neon_enhancement_enable = "disabled"
pcsx_rearmed_neon_enhancement_no_main = "disabled"
pcsx_rearmed_neon_interlace_enable = "disabled"
pcsx_rearmed_nocdaudio = "enabled"
pcsx_rearmed_nogteflags = "disabled"
pcsx_rearmed_nosmccheck = "disabled"
pcsx_rearmed_noxadecoding = "enabled"
pcsx_rearmed_pad1type = "dualshock"
pcsx_rearmed_pad2type = "dualshock"
pcsx_rearmed_pad3type = "none"
pcsx_rearmed_pad4type = "none"
pcsx_rearmed_pad5type = "none"
pcsx_rearmed_pad6type = "none"
pcsx_rearmed_pad7type = "none"
pcsx_rearmed_pad8type = "none"
pcsx_rearmed_pe2_fix = "disabled"
pcsx_rearmed_psxclock = "57"
pcsx_rearmed_region = "auto"
pcsx_rearmed_show_bios_bootlogo = "disabled"
pcsx_rearmed_spu_interpolation = "simple"
pcsx_rearmed_spu_reverb = "enabled"
pcsx_rearmed_spuirq = "disabled"
pcsx_rearmed_vibration = "enabled"

Fix Bluetooth connexion issue for 8bitdo SN30 Pro+ Controller

Source: https://retropie.org.uk/forum/topic/29996/issue-connecting-bluetooth-8bitdo-sn30-pro-controller/5

Install additional BIOS

Add PlayStation BIOS Files On RetroPie - Start Button Fix On PlayStation Roms RetroPie Guy Tutorial