Skip to content

Commit

Permalink
added amiberry - fixes RetroPie#1880
Browse files Browse the repository at this point in the history
  • Loading branch information
joolswills committed Apr 20, 2017
1 parent 03aac01 commit e2d1985
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 11 deletions.
42 changes: 42 additions & 0 deletions scriptmodules/emulators/amiberry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#

rp_module_id="amiberry"
rp_module_desc="Amiga emulator with JIT support (forked from uae4arm)"
rp_module_help="ROM Extension: .adf\n\nCopy your Amiga games to $romdir/amiga\n\nCopy the required BIOS files\nkick13.rom\nkick20.rom\nkick31.rom\nto $biosdir"
rp_module_licence="GPL3 https://raw.githubusercontent.com/midwan/amiberry/master/COPYING"
rp_module_section="opt"
rp_module_flags="!x86 !mali"

function depends_amiberry() {
depends_uae4arm
}

function sources_amiberry() {
gitPullOrClone "$md_build" https://github.com/midwan/amiberry/
}

function build_amiberry() {
make clean
CXXFLAGS="" make PLATFORM="$__platform"
md_ret_require="$md_build/amiberry"
}

function install_amiberry() {
md_ret_files=(
'data'
'amiberry'
)
}

function configure_amiberry() {
configure_uae4arm
}
21 changes: 13 additions & 8 deletions scriptmodules/emulators/uae4arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,21 @@ function configure_uae4arm() {
copyDefaultConfig "$conf" "$md_conf_root/amiga/$md_id/conf/rp-a1200.uae"
rm "$conf"

cp -v "$md_data/uae4arm.sh" "$md_inst/"
cat > "$romdir/amiga/+Start UAE4Arm.sh" << _EOF_
# copy launch script (used for uae4arm and amiberry)
sed "s/EMULATOR/$md_id/" "$scriptdir/scriptmodules/$md_type/uae4arm/uae4arm.sh" >"$md_inst/$md_id.sh"
chmod a+x "$md_inst/$md_id.sh"

local script="+Start UAE4Arm.sh"
[[ "$md_id" == "amiberry" ]] && script="+Start Amiberry.sh"
cat > "$romdir/amiga/$script" << _EOF_
#!/bin/bash
"$md_inst/uae4arm.sh"
"$md_inst/$md_id.sh"
_EOF_
chmod a+x "$romdir/amiga/+Start UAE4Arm.sh"
chown $user:$user "$romdir/amiga/+Start UAE4Arm.sh"
chmod a+x "$romdir/amiga/$script"
chown $user:$user "$romdir/amiga/$script"

addEmulator 1 "$md_id" "amiga" "$md_inst/uae4arm.sh auto %ROM%"
addEmulator 1 "$md_id-a500" "amiga" "$md_inst/uae4arm.sh rp-a500.uae %ROM%"
addEmulator 1 "$md_id-a1200" "amiga" "$md_inst/uae4arm.sh rp-a1200.uae %ROM%"
addEmulator 1 "$md_id" "amiga" "$md_inst/$md_id.sh auto %ROM%"
addEmulator 1 "$md_id-a500" "amiga" "$md_inst/$md_id.sh rp-a500.uae %ROM%"
addEmulator 1 "$md_id-a1200" "amiga" "$md_inst/$md_id.sh rp-a1200.uae %ROM%"
addSystem "amiga"
}
8 changes: 5 additions & 3 deletions scriptmodules/emulators/uae4arm/uae4arm.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/bash

emulator="./EMULATOR"
config="$1"
rom="$2"
rom_bn="${rom%.*}"

pushd "${0%/*}" >/dev/null
if [[ -z "$rom" ]]; then
./uae4arm
"$emulator"
elif [[ "$rom" == *.uae ]]; then
./uae4arm -config="$rom" -G
"$emulator" -config="$rom" -G
else
source "../../lib/archivefuncs.sh"

Expand Down Expand Up @@ -50,7 +52,7 @@ else
config="conf/$config"
fi

./uae4arm -config="$config" "${images[@]}" -G
"$emulator" -config="$config" "${images[@]}" -G
archiveCleanup
fi

Expand Down

0 comments on commit e2d1985

Please sign in to comment.