Raspberry Pi Setup

From IndividualComputers
Jump to: navigation, search
This page is work in progress. Please check back later.

This page briefly describes how to set up a Raspberry Pi with a Keyrah to build a low cost retro computer.

Please understand that this page can only give a couple hints on things specific to VICE/UAE or installing Keyrah - it is not a full step by step installation guide - please have a look at the documentation of the OS you will be using.


installing the OS image

Download Retropie Recalbox Combian Amibian

The first thing you will have to do is install the OS on an SD card. If you never did this before and have no experience with linux, simply downloading an SD card image and putting that on the card is probably the most hassle free way to get started. Download the SD card image of your choice and then:

on Linux use dd to write the OS image to an SD card

dd bs=4M if=image.img of=/dev/sdX status=progress

on windows you can use Diskimager.

extend the filesystem

The first thing you probably want to do after installing the OS image is extending the filesystem to use the entire capacity of the SD card.

In Raspian based Distributions use


select "Expand Filesystem", confirm, then reboot

initial OS configuration


Retropie is a Raspian based distribution that boots into the emulator frontend "Emulation Station".

  • /opt/retropie/emulators/retroarch/retroarch.cfg

set keyboard layout


select "Internationalisation Options" -> "Change Keyboard Layout"

set root password

sudo passwd root

permit root login

in /etc/ssh/sshd_config

PermitRootLogin yes

configure composite (PAL)

in /boot/config.txt to switch video output to PAL add

sdtv_mode = 2

in /boot/config.txt fix the overscan area


installing / updating VICE

You'll have to install VICE yourself after installing RetroPie. At the time of writing some features and files we use later are not yet available in the binary packages, which is why you should update from source (which will install the bleeding edge SVN version).

Retropie -> Retropie Setup -> Manage Packages -> Manage Optional Packages -> VICE -> Install from Source


Retropie -> Retropie Setup -> Manage Packages -> Manage Optional Packages -> VICE -> Update from Source

this will take a while to complete. Time for a cup of tea :)

configuring VICE

Some more hints on configuring Commodore 64 Emulation in Retropie are in their wiki.

  • VICE config file is /home/pi/.vice/sdl-vicerc
  • VICE data dir is /opt/retropie/emulators/vice/lib/vice/
  • copy games to /home/pi/RetroPie/roms/c64/

See below for hints on how to solve keyboard problems.

installing / updating UAE

You'll have to install UAE yourself after installing RetroPie

Retropie -> Retropie Setup -> Manage Packages -> Manage Optional Packages -> UAE4Arm -> Install from Binaries


Retropie -> Retropie Setup -> Manage Packages -> Manage Optional Packages -> UAE4Arm -> Update from Binaries

You also have to copy a kickstart ROM to /home/pi/RetroPie/BIOS

cp KICK13.ROM /home/pi/RetroPie/BIOS

configuring UAE

Some more hints on configuring Amiga Emulation in Retropie are in their wiki.

  • copy games to /home/pi/RetroPie/roms/amiga/


Recalbox is another distribution that boots into the emulator frontend "Emulation Station". It is more targetted at "zero setup" than Retropie is.

permit root login

Use the username root and the password recalboxroot - You can connect through ssh to the recalbox

configure composite (PAL)

To connect your recalbox to a CRT with Composite do the following:

in /boot/config.txt to switch video output to PAL add


... also remove all options starting with hdmi_...

In recalbox.conf



Amibian is a minimal Raspian Distribution that boots directly into UAE


Combian is a modified Amibian Distribution that boots directly into the x64 (C64) emulator of VICE.

to exit the emulator and access the Linux system, press the VICE menu key (preconfigured is F8) and choose "Quit emulator" at the bottom of the menu

to enter the Combian menu type

  • VICE data dir is /usr/local/lib/vice/
  • copy games to /root/combian64/games

set root password

passwd root

choose a password you wont forget

enable ssh daemon

to make startup faster, the sshd daemon is not running by default in combian, so start it manually when needed:


configure composite (PAL)

in /boot/config.txt to switch video output to PAL add

sdtv_mode = 2
disable_overscan = 1

makes the framebuffer as large as possible

configure VICE

  • VICE config file is /root/.vice/sdl-vicerc

Setting up a 1:1 keyboard mapping

Keyrah V2

The Keyrah V2 keymap was originally tweaked for the Windows release of VICE that was current at time. However, during the years the default mapping of VICE was changed and tweaked more to regular PC keyboards - which made Keyrah V2 no more match. To fix this, we have provided extra keymappings for VICE, which restores the original behaviour.

Find the VICE config file as explained above, then change the following:


at the top of each [section] enables the "arrow up" key to enter the VICE menu when the Keyrah switch is in "middle" position.


in the [c64] section to enable the 1:1 joystick port mapping.



in the [c64] section to enable the 1:1 keyboard mapping for Keyrah



in the [c64] section to enable the 1:1 keyboard mapping for Keyrah

Keyrah V3

They Keyrah V3 keymap was carefully tweaked to the - now standardized - keymaps of VICE 3.7, WinUAE and STeam, and should work out of the box. Make sure to select the "positional" keymap for your system language in the emulator.

The controller ports are now regular HID game controllers, so they can be configured right in the emulator, just like any other game controller.

Caps-Lock issues

Keyrah V3 relies on the Caps-Lock LED status. Since it is perfectly OK to connect two or more USB keyboards to a host computer, and the Caps-Lock key on the keyboard that is connected to Keyrah might be a "locking" key, Keyrah monitors the state of the LED and if that is different than the current state of the locking Caps-Lock, it will produce another Caps-Lock event in order to keep all connected keyboards in sync.

However, apparently (some) Linux distributions for the Rasperry Pi do NOT produce a Caps-Lock LED event:

"It is because technically the Caps Lock key is not functioning as Caps_Lock. The console behaviour built into the kernel only capitalizes dedicated letter keys, and not Unicode letters composed using dead keys or AltGr. To work around that, Debian sets up a complicated keymap in which Caps Lock is really CtrlL_Lock, and there is no LED for that." [1]

as a result, Keyrah V3 will behave irritatingly when Caps-Lock is pressed.

This can be fixed, by adding the following command into some startup script:

echo keycode 58 = Caps_Lock | sudo loadkeys -

For example like this:

Create a script in the home folder called amigasetup.sh, use chmod +x to make it executable.

echo keycode 58 = Caps_Lock | sudo loadkeys -

Then create a service in /etc/systemmd/system/, for example call it amigasetup.service (substitute <yourusername> by your actual user name)

Description=Amiga environment setup
ExecStart=/bin/bash /home/<yourusername>/amigasetup.sh

Save the script, and issue the following commands:

sudo systemctl daemon-reload
sudo systemctl start amigasetup.service
sudo systemctl status amigasetup.service
sudo systemctl enable amigasetup.service

Also see this support forum thread.


Personal tools