Skip to content

Commit e8ff00f

Browse files
authored
Merge pull request #3126 from joolswills/lr-vice_targets
lr-vice - added additional targets to lr-vice
2 parents a65ded7 + 1c97943 commit e8ff00f

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

scriptmodules/libretrocores/lr-vice.sh

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,59 @@
1010
#
1111

1212
rp_module_id="lr-vice"
13-
rp_module_desc="C64 emulator - port of VICE for libretro"
14-
rp_module_help="ROM Extensions: .cmd .crt .d64 .d71 .d80 .d81 .g64 .m3u .prg .t64 .tap .x64 .zip .vsf\n\nCopy your Commodore 64 games to $romdir/c64"
13+
rp_module_desc="C64 / C128 / PET / Plus4 / VIC20 emulator - port of VICE for libretro"
14+
rp_module_help="ROM Extensions: .cmd .crt .d64 .d71 .d80 .d81 .g64 .m3u .prg .t64 .tap .x64 .zip .vsf\n\nCopy your games to $romdir/c64"
1515
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/vice-libretro/master/vice/COPYING"
1616
rp_module_repo="git https://github.com/libretro/vice-libretro.git master"
1717
rp_module_section="opt"
1818
rp_module_flags=""
1919

20+
function _get_targets_lr-vice() {
21+
echo x64 x64dtv x64sc x128 xpet xplus4 xvic
22+
}
23+
2024
function sources_lr-vice() {
2125
gitPullOrClone
2226
}
2327

2428
function build_lr-vice() {
25-
make clean
26-
make
27-
md_ret_require="$md_build/vice_x64_libretro.so"
29+
mkdir -p "$md_build/cores"
30+
local target
31+
for target in $(_get_targets_lr-vice); do
32+
make clean
33+
make EMUTYPE="$target"
34+
cp "$md_build/vice_${target}_libretro.so" "cores/"
35+
md_ret_require+=("$md_build/cores/vice_${target}_libretro.so")
36+
done
2837
}
2938

3039
function install_lr-vice() {
3140
md_ret_files=(
3241
'vice/data'
3342
'vice/COPYING'
34-
'vice_x64_libretro.so'
3543
)
44+
local target
45+
for target in $(_get_targets_lr-vice); do
46+
md_ret_files+=("cores/vice_${target}_libretro.so")
47+
done
3648
}
3749

3850
function configure_lr-vice() {
3951
mkRomDir "c64"
4052
ensureSystemretroconfig "c64"
4153

42-
addEmulator 1 "$md_id" "c64" "$md_inst/vice_x64_libretro.so"
43-
addSystem "c64"
54+
local target
55+
local name
56+
local def
57+
for target in $(_get_targets_lr-vice); do
58+
def=0
59+
name="-${target}"
60+
if [[ "$target" == "x64" ]]; then
61+
name=""
62+
def=1
63+
fi
64+
addEmulator "$def" "$md_id${name}" "c64" "$md_inst/vice_${target}_libretro.so"
65+
done
4466

4567
[[ "$md_mode" == "remove" ]] && return
4668

0 commit comments

Comments
 (0)