Skip to content

Commit

Permalink
retroarch: add vice core
Browse files Browse the repository at this point in the history
  • Loading branch information
john-tornblom committed Dec 20, 2024
1 parent 6052baa commit e220af6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/retroarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk ./homebrew/RetroArch/build-fceumm.sh
PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk ./homebrew/RetroArch/build-snes9x2010.sh
PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk ./homebrew/RetroArch/build-fbneo.sh
PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk ./homebrew/RetroArch/build-vice.sh
- name: Upload
uses: actions/upload-artifact@v3
Expand Down
43 changes: 43 additions & 0 deletions homebrew/RetroArch/build-vice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Copyright (C) 2024 John Törnblom
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not see
# <http://www.gnu.org/licenses/>.

VER="master"
URL="https://github.com/libretro/vice-libretro/archive/refs/heads/master.tar.gz"
INFO="https://raw.githubusercontent.com/libretro/libretro-core-info/refs/heads/master/vice_x64_libretro.info"

SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"

if [[ -z "$PS5_PAYLOAD_SDK" ]]; then
echo "error: PS5_PAYLOAD_SDK is not set"
exit 1
fi

source "${PS5_PAYLOAD_SDK}/toolchain/prospero.sh" || exit 1

TEMPDIR=$(mktemp -d)
trap 'rm -rf -- "$TEMPDIR"' EXIT

wget -O $TEMPDIR/vice-libretro.tar.gz "${URL}" || exit 1
tar xf $TEMPDIR/vice-libretro.tar.gz -C $TEMPDIR || exit 1

cd $TEMPDIR/vice-libretro-$VER || exit 1
${MAKE} || exit 1

mkdir -p "${SCRIPT_DIR}/.config/retroarch/cores" || exit 1
mv $TEMPDIR/vice-libretro-$VER/vice_x64_libretro.so "${SCRIPT_DIR}/.config/retroarch/cores/" || exit 1
wget $INFO -O "${SCRIPT_DIR}/.config/retroarch/cores/vice_x64_libretro.info"

0 comments on commit e220af6

Please sign in to comment.