Smart Cities - RetroPie

From Sensors in Schools
Jump to navigation Jump to search

How to Install RetroPie on Ubuntu

1. Prerequisites

Before installing RetroPie, ensure you have the following:

  • An Ubuntu system (desktop or laptop).
  • A stable internet connection.
  • A USB game controller (optional but recommended).

2. Update Your System

Run the following commands to update and upgrade your system:

sudo apt update
sudo apt upgrade

3. Install Required Dependencies

RetroPie requires a few dependencies to run properly. Install them using:

sudo apt install -y git dialog unzip xmlstarlet

4. Clone the RetroPie Setup Script

Clone the RetroPie setup script from its GitHub repository:

git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git

5. Run the Setup Script

Navigate to the RetroPie setup directory and launch the setup script:

cd RetroPie-Setup
sudo ./retropie_setup.sh

6. Install RetroPie

In the setup menu:

  • Select Basic Install to install RetroPie.
  • Follow the on-screen instructions to complete the installation.

7. Launch RetroPie

After installation, you can launch RetroPie using the terminal:

emulationstation

Alternatively, you can configure RetroPie to start automatically when your system boots.

8. Configure Controllers and ROMs

  • Controllers: RetroPie will prompt you to configure your controller when you first start it.
  • ROMs: Transfer game ROMs into the appropriate folders in /home/[your-username]/RetroPie/roms/.

Notes

  • Ubuntu-based distributions (like Linux Mint or Pop!_OS) can also run RetroPie.
  • RetroPie on Ubuntu offers better performance on PCs compared to Raspberry Pi, thanks to more powerful hardware.


Installing LinApple

RetroPie supports a variety of emulators, but the Apple II emulator isn't included in the Basic Install by default. To use an Apple II emulator, you'll need to install it manually through the RetroPie setup script. Here's how you can get the emulator running and where to place the Apple II ROMs:

1. Install the Apple II Emulator

RetroPie includes the linapple emulator as its default Apple II emulator, but it might not be installed yet.

Steps to Install the Emulator:

Launch the RetroPie Setup Script:

sudo ~/RetroPie-Setup/retropie_setup.sh

Go to Manage Packages:

  • Navigate to Manage Packages > Optional Packages.
  • Locate linapple in the list of optional packages.
  • Select Install from Binary (or Install from Source if binary is unavailable).
  • Wait for the installation to complete.

2. Locate or Create the ROMs Folder

Once the emulator is installed, RetroPie will create a dedicated folder for Apple II ROMs.

Folder Location:

The default location for Apple II ROMs is:

/home/pi/RetroPie/roms/apple2/

If the folder doesn't exist, create it manually:

mkdir -p ~/RetroPie/roms/apple2/

3. Place the ROMs in the Folder

Apple II ROMs (e.g., disk images like .dsk or .nib files) need to be placed in the apple2 directory. Copy your ROM files to the folder:

scp your_roms.dsk pi@<IP_ADDRESS>:/home/pi/RetroPie/roms/apple2/

Or directly from a USB drive:

  • Copy the ROMs to a USB drive.
  • Plug the drive into your Raspberry Pi.
  • Transfer the files to /home/pi/RetroPie/roms/apple2/.

4. Configure the Emulator

If linapple doesn’t detect the ROMs:

  • Launch linapple via RetroPie or the terminal to check for configuration issues.
  • You may need to specify the path to the ROMs in linapple.conf (usually located in the emulator's directory).

5. Running Apple II Games

  • Launch RetroPie.
  • Navigate to the Apple II section in the RetroPie menu.
  • Select the ROM you wish to play.

Running Linapple from the Terminal

To launch LinApple from the terminal after installing it via RetroPie, you can use the following steps:

  • Steps to Launch LinApple via Terminal
  • Open the terminal on your Raspberry Pi.
  • Type the following command:
linapple
  • Press Enter to start the emulator.
  • If LinApple Does Not Start
  • If typing linapple does not work check if the executable is installed:
which linapple

This will show the path to the LinApple binary if it's installed.

  • If the binary is not found, locate LinApple manually.
  • This command searches your filesystem for the LinApple binary.
find / -name linapple 2>/dev/null

2>/dev/null: Redirects error messages (file descriptor 2, which is standard error) to /dev/null, effectively discarding them. This prevents permission-denied messages (common when searching system directories) from cluttering the output.

Once found, navigate to its directory or run it directly by specifying the path:

/path/to/linapple

LinApple Configuration File

LinApple may use a configuration file (linapple.conf) to define settings such as ROM directories. This file is typically located in:

~/.linapple/linapple.conf

You can edit it with a text editor like nano if needed:

nano ~/.linapple/linapple.conf

Running LinApple with ROMs

To launch a specific ROM or disk image directly:

linapple /path/to/your_rom.dsk