Skip to content

nayaabkhan/rpi1b-retroarch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Making RetroArch work on Raspberry Pi 1 Model B

Burn image and first boot

  1. Burn the Raspberry Pi OS Lite Buster on an SD Card. Use Raspberry Pi Imager to turn on SSH and specify own username and password. If Buster isn't showing in the imager then old images could be found at here.
  2. Put in the SD card and let it expand the file system and reboot to login.

Buster is needed because it has the libraries in expected location, i.e., /opt/vc.

Enable USB WiFi

  1. Edit /etc/network/interfaces

    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp
    
  2. Edit /etc/wpa_supplicant/wpa_supplicant.conf

    network={
      ssid="YOUR_NETWORK_NAME"
      psk="YOUR_NETWORK_PASSWORD"
      key_mgmt=WPA-PSK
    }
    
  3. Reboot

Overclock

⚠️ Make sure you have at least a heatsink installed. A fan is even better.

Launch sudo raspi-config and then select Performance Options > Overclock > Turbo

Or these are working settings to put on /boot/config.txt:

arm_freq=950
core_freq=250
sdram_freq=450
force_turbo=0
over_voltage=6
over_voltage_sdram=0
gpu_freq=250

Increase Swap Size

sudo dphys-swapfile swapoff
sudo vi /etc/dphys-swapfile
> CONF_SWAPSIZE=1024
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Update System

sudo apt update
sudo apt upgrade

Install Build Dependencies

sudo apt install build-essential libasound2-dev libudev-dev libusb-1.0-0-dev

Compile RetroArch

  1. Download source: curl -LO 'https://github.com/libretro/RetroArch/archive/v1.12.0.tar.gz'
  2. Unpack: tar -zxvf v1.12.0.tar.gz
  3. Change to source folder: cd RetroArch-1.12.0
  4. Export flags: export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux"
  5. Configure: ./configure --disable-vg --disable-al --disable-cg --disable-sdl --disable-sdl2 --disable-ssl --disable-x11 --enable-opengles --disable-kms --disable-x11 --enable-floathard --enable-zlib --enable-freetype --enable-translate --enable-cdrom --enable-hid --enable-libusb --disable-discord --disable-langextra
  6. Compile: make
  7. Install: make install
  8. Launch: retroarch

It should launch without any errors. Although, it is missing assets (images, fonts, etc.), controller configurations, and cores.

Download assets and controller profiles

Navigate to Online Updater, then:

  1. Update Autoconfig Profiles
  2. Download Assets

Install the Cores

Cores are individual system libraries that are also built as binaries. The official link no longer has Armv6 binaries, which are required for RPi1. So we use prebuilt cores extracted from Lakka. Download them from this repo's cores. And move them to ~/.config/retroarch/cores.

Game!

The only way until now is to scp roms to the ~/.config/retroarch/downloads. Then scan for the new roms and play!

Bluetooth

For me, unfortunately, the 8bitdo SN30 Pro doesn't work via USB. It is detected but no buttons work. So I went for configuring bluetooth. The USB bluetooth module works out of the box.

  1. Install bluetooth package to fix issue where paired devices do not pair after getting disconnected:

    sudo apt install bluetooth

  2. Pair and connect devices using bluetoothctl.

    > scan on
    > scan off
    > trust <device MAC>
    > pair <device MAC>
    > connect <device MAC>
    

Appendix 1: Notes

Appendix 2: Resources

General

Useful commands

Overclocking

RetroArch

About

Making RetroArch work on Raspberry Pi 1 Model B

Topics

Resources

Stars

Watchers

Forks