Building Amiberry with SDL2

From Jay's Cafe' Wiki

Compile SDL2 from source Dimitris Panokostas edited this page on Feb 11 · 12 revisions Pages 25 Getting Started

   First Installation
   Kickstart ROMs (BIOS)
   Enabling IPF support (Optional)
   F.A.Q.
   Version History

Compiling from source

   Compile Development Branch
   Compile SDL2
   Compile for Tinker board

Loading Amiga Programs

   Loading from Disks (ADF)
   Using HardDrives (HDF and Folders)
   WHDLoad auto-booting
   WHDBooter with RetroPie
   WHDBooter F.A.Q.

Inputs & Controls

   Setting up Input Controllers
   Setting up Keyboard Controllers
   RetroArch Commands
   Customising Controls

Clone this wiki locally

If you want to run the SDL2 version on the Raspberry Pi, you currently need to compile SDL2 from source in order to get support for launching full screen applications from the console. The version bundled with Stretch is not compiled with support for the "kmsdrm" backend, so it only works under X11.

Important note: It's recommended that you use the "fkms" video driver on the RPI, to be able to use both the "KMSDRM" backend and "Dispmanx" at the same time. If you're still using the Legacy driver, it's probably better to stick to the SDL1 + Dispmanx version. If you have the full KMS Driver activated instead, then you cannot use any Dispmanx target since that is disabled with that video driver automatically. Follow these steps to download, compile and install SDL2 from source:

sudo apt-get update && sudo apt-get upgrade

(Minimal requirements)

sudo apt-get install libfreetype6-dev libgl1-mesa-dev libgles2-mesa-dev libgbm-dev libudev-dev libasound2-dev liblzma-dev git build-essential

(...or for the full list of requirements, also add the below)

sudo apt-get install gir1.2-ibus-1.0 libdbus-1-dev libegl1-mesa-dev libibus-1.0-5 libibus-1.0-dev libice-dev libsm-dev libsndio-dev libwayland-bin libwayland-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-video-dev x11proto-xinerama-dev

cd ~

wget https://www.libsdl.org/release/SDL2-2.0.7.tar.gz

tar zxvf SDL2-2.0.7.tar.gz

cd SDL2-2.0.7

./configure --disable-video-rpi --enable-video-kmsdrm; make -j $(nproc --all); sudo make install Next, we need SDL2_image:

cd ~

wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.2.tar.gz

tar zxvf SDL2_image-2.0.2.tar.gz

cd SDL2_image-2.0.2 && mkdir build && cd build

../configure

make -j $(nproc --all)

sudo make install ...and SDL2_ttf:

cd ~

wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz

tar zxvf SDL2_ttf-2.0.14.tar.gz

cd SDL2_ttf-2.0.14 && mkdir build && cd build

../configure

make -j $(nproc --all)

sudo make install

Amiga emulator for the Raspberry Pi and other ARM SoC

Warning: this branch is where Development takes place. It may be unstable, crash, not work from time to time - If you're looking for the latest "stable" version, please use the master branch for now. Compiling SDL2

If you want to run the SDL2 version, you currently need to compile SDL2 from source on the Raspberry Pi, to get support for launching full screen applications from the console. The version bundled with Stretch is not compiled with support for the "rpi" driver, so it only works under X11.

Follow these steps to download, compile and install SDL2 from source:

https://github.com/midwan/amiberry/wiki/Compile-SDL2-from-source

With SDL2 installed, you can proceed to install Amiberry as follows: Pre-requisites

Install the following packages:

 sudo apt-get install libxml2-dev libflac-dev libmpg123-dev libpng-dev libmpeg2-4-dev

Compiling Amiberry

Clone this repo:

 cd ~
 git clone https://github.com/midwan/amiberry
 cd amiberry

The default platform is currently "rpi3", so for Raspberry Pi 3 (SDL1) you can just type:

 make all

For Raspberry Pi 2 (SDL1):

 make all PLATFORM=rpi2

For Raspberry Pi 1/Zero (SDL1):

 make all PLATFORM=rpi1

And for the SDL2 versions, you can use the following:

 make all PLATFORM=rpi3-sdl2

Or for Raspberry Pi 2 (SDL2):

 make all PLATFORM=rpi2-sdl2

Or for Raspberry Pi 1/Zero (SDL2):

 make all PLATFORM=rpi1-sdl2

You can check the Makefile for a full list of supported platforms!


Enabling IPF support Dimitris Panokostas edited this page on Feb 11 · 1 revision


Amiberry provides support for IPF images since v2.13. In order to do this, Amiberry needs an external library (capsimg).

Follow these steps to build that library:

Go in the directory where you have cloned the amiberry sources, then type:

sudo apt-get install autoconf (if you don't have it already)

git submodule update --init (this will populate and update the capsimg submodule included)

cd capsimg

./bootstrap

./configure

make -j 4

If all went well, you should have a library file compiled in the current directory:

capsimg.so

Copy or move the file above into the same directory your amiberry binary is located, so it can open it on startup.

E.g. if you're running RetroPie: sudo cp capsimg.so /opt/retropie/emulators/amiberry/

Start the emulator and try to load IPF images as disks (either from the Quickstart or the Floppy panels).