mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2024-05-20 05:10:53 -04:00
Compare commits
41 commits
b08ea38575
...
1bd51275d5
Author | SHA1 | Date | |
---|---|---|---|
1bd51275d5 | |||
5e0ab1f859 | |||
2c955ef02a | |||
6105ee21d5 | |||
d47d4c55b6 | |||
b3fc3bed50 | |||
eaa8a13885 | |||
fe5bf11159 | |||
fac3ec4659 | |||
01ca2520eb | |||
c8bbdc4de1 | |||
b0a36e9dec | |||
87bf691cfb | |||
28c62fdf1f | |||
88ae6aecb9 | |||
ce1a5a322c | |||
1fd390f968 | |||
f8cfb729a5 | |||
01bd5365c3 | |||
81106ea4f7 | |||
ac1dce6307 | |||
1da8bdd2c4 | |||
cf0e098106 | |||
9aa86b8f2d | |||
790aa470b7 | |||
6eb80fbb8f | |||
4dbf5856e0 | |||
ac1493cb43 | |||
656a478ed7 | |||
b0ceb14f12 | |||
17f41aa933 | |||
26e5e04bb3 | |||
93f630d21f | |||
9e1838b314 | |||
1b45100740 | |||
2518994e6c | |||
19865c363d | |||
08f9cc69c6 | |||
0c9e4d132f | |||
2824bddb87 | |||
f113a80f36 |
|
@ -7,7 +7,7 @@ ags_fullname="Adventure Game Studio"
|
|||
amiga_exts=".adf .adz .chd .cue .dms .ipf .lha .m3u .sh .uae .zip"
|
||||
amiga_fullname="Commodore Amiga"
|
||||
|
||||
amstradcpc_exts=".cdt .cpc .dsk .zip"
|
||||
amstradcpc_exts=".cdt .cpc .cpr .dsk .m3u .tap .zip"
|
||||
amstradcpc_fullname="Amstrad CPC"
|
||||
|
||||
apple2_exts=".po .dsk .nib"
|
||||
|
@ -57,7 +57,7 @@ coleco_platform="colecovision"
|
|||
crvision_exts=".rom .zip"
|
||||
crvision_fullname="CreatiVision"
|
||||
|
||||
daphne_exts=".daphne"
|
||||
daphne_exts=".daphne .ogv"
|
||||
daphne_fullname="Daphne"
|
||||
|
||||
dragon32_exts=".cas .wav .bas .asc .dmk .jvc .os9 .dsk .vdk .rom .ccc .sna"
|
||||
|
@ -164,7 +164,7 @@ oric_fullname="Oric 1"
|
|||
pc88_exts=".d88 .cmt .m3u .t88"
|
||||
pc88_fullname="NEC PC-8801"
|
||||
|
||||
pc98_exts=".d88 .d98 .88d .98d .fdi .fdd .xdf .hdm .dup .2hd .tfd .hdi .thd .nhd .hdd .zip"
|
||||
pc98_exts=".2hd .88d .98d .cmd .d88 .d98 .dup .fdi .fdd .hdd .hdi .hdm .nhd .thd .tfd .xdf .zip"
|
||||
pc98_fullname="NEC PC-9801"
|
||||
|
||||
pc_exts=".bat .com .conf .cue .dosz .exe .ins .ima .img .iso .m3u .m3u8 .sh .vhd .zip"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
|
||||
#
|
||||
|
||||
__version="4.8.6"
|
||||
__version="4.8.7"
|
||||
|
||||
[[ "$__debug" -eq 1 ]] && set -x
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ ConfirmStop = False
|
|||
[General]
|
||||
ISOPath0 = "$home/RetroPie/roms/gc"
|
||||
ISOPath1 = "$home/RetroPie/roms/wii"
|
||||
ISOPaths = 2
|
||||
[Core]
|
||||
AutoDiscChange = True
|
||||
_EOF_
|
||||
|
|
|
@ -18,11 +18,20 @@ rp_module_section="opt"
|
|||
rp_module_flags="sdl2"
|
||||
|
||||
function _get_branch_dosbox-staging() {
|
||||
# use 0.80.1 for VideoCore devices, 0.81 and later require OpenGL
|
||||
if isPlatform "videocore"; then
|
||||
echo "v0.80.1"
|
||||
return
|
||||
fi
|
||||
download https://api.github.com/repos/dosbox-staging/dosbox-staging/releases/latest - | grep -m 1 tag_name | cut -d\" -f4
|
||||
}
|
||||
|
||||
function depends_dosbox-staging() {
|
||||
getDepends cmake libasound2-dev libglib2.0-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-net-dev libsdl2-image-dev libspeexdsp-dev meson ninja-build
|
||||
local depends
|
||||
depends=(cmake libasound2-dev libglib2.0-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-net-dev libspeexdsp-dev meson ninja-build zlib1g-dev)
|
||||
[[ "$__os_debian_ver" -ge 11 ]] && depends+=(libslirp-dev libfluidsynth-dev)
|
||||
|
||||
getDepends "${depends[@]}"
|
||||
}
|
||||
|
||||
function sources_dosbox-staging() {
|
||||
|
@ -35,7 +44,7 @@ function sources_dosbox-staging() {
|
|||
}
|
||||
|
||||
function build_dosbox-staging() {
|
||||
local params=(-Dprefix="$md_inst" -Ddatadir="resources")
|
||||
local params=(-Dprefix="$md_inst" -Ddatadir="resources" -Dtry_static_libs="iir,mt32emu")
|
||||
# use the build local Meson installation if found
|
||||
local meson_cmd="meson"
|
||||
[[ -f "$md_build/meson/meson.py" ]] && meson_cmd="python3 $md_build/meson/meson.py"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
rp_module_id="hatari"
|
||||
rp_module_desc="Atari emulator Hatari"
|
||||
rp_module_help="ROM Extensions: .st .stx .img .rom .raw .ipf .ctr .zip\n\nCopy your Atari ST games to $romdir/atarist\n\nCopy Atari ST BIOS (tos.img) to $biosdir"
|
||||
rp_module_licence="GPL2 https://git.tuxfamily.org/hatari/hatari.git/plain/gpl.txt"
|
||||
rp_module_repo="git git://git.tuxfamily.org/gitroot/hatari/hatari.git v2.3.1"
|
||||
rp_module_licence="GPL2 https://raw.githubusercontent.com/hatari/hatari/master/gpl.txt"
|
||||
rp_module_repo="git https://github.com/hatari/hatari v2.4.1"
|
||||
rp_module_section="opt"
|
||||
rp_module_flags=""
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .int .bin .rom\n\nCopy your Intellivision roms t
|
|||
rp_module_licence="GPL2 http://spatula-city.org/%7Eim14u2c/intv/"
|
||||
rp_module_repo="file $__archive_url/jzintv-20200712-src.zip"
|
||||
rp_module_section="opt"
|
||||
rp_module_flags="sdl2"
|
||||
rp_module_flags="sdl2 nodistcc"
|
||||
|
||||
function depends_jzintv() {
|
||||
getDepends libsdl2-dev libreadline-dev
|
||||
|
@ -45,7 +45,7 @@ function build_jzintv() {
|
|||
cd jzintv/src
|
||||
|
||||
make clean
|
||||
DISTCC_HOSTS="" make
|
||||
make
|
||||
|
||||
md_ret_require="$md_build/jzintv/bin/jzintv"
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@ rp_module_section="exp"
|
|||
rp_module_flags="!mali !armv6"
|
||||
|
||||
function _get_branch_mame() {
|
||||
# starting with 0.265, GCC 10.3 or later is required for full C++17 support
|
||||
if [[ "$__gcc_version" -lt 10 ]]; then
|
||||
echo "mame0264"
|
||||
return
|
||||
fi
|
||||
download https://api.github.com/repos/mamedev/mame/releases/latest - | grep -m 1 tag_name | cut -d\" -f4
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ rp_module_help="ROM Extensions: .z64 .n64 .v64\n\nCopy your N64 roms to $romdir/
|
|||
rp_module_licence="GPL2 https://raw.githubusercontent.com/mupen64plus/mupen64plus-core/master/LICENSES"
|
||||
rp_module_repo=":_pkg_info_mupen64plus"
|
||||
rp_module_section="main"
|
||||
rp_module_flags="sdl2"
|
||||
rp_module_flags="sdl2 nodistcc"
|
||||
|
||||
function depends_mupen64plus() {
|
||||
local depends=(cmake libsamplerate0-dev libspeexdsp-dev libsdl2-dev libpng-dev libfreetype6-dev fonts-freefont-ttf libboost-filesystem-dev)
|
||||
|
@ -169,14 +169,14 @@ function build_mupen64plus() {
|
|||
isPlatform "x86" && params+=("SSE=SSE2")
|
||||
isPlatform "armv6" && params+=("HOST_CPU=armv6")
|
||||
isPlatform "armv7" && params+=("HOST_CPU=armv7")
|
||||
isPlatform "armv8" && params+=("HOST_CPU=armv8")
|
||||
isPlatform "aarch64" && params+=("HOST_CPU=aarch64")
|
||||
# we don't ship a Vulkan enabled front-end, so disable Vulkan in the core project
|
||||
params+=("VULKAN=0")
|
||||
|
||||
[[ "$dir" == "mupen64plus-ui-console" ]] && params+=("COREDIR=$md_inst/lib/" "PLUGINDIR=$md_inst/lib/mupen64plus/")
|
||||
make -C "$dir/projects/unix" "${params[@]}" clean
|
||||
# temporarily disable distcc due to segfaults with cross compiler and lto
|
||||
DISTCC_HOSTS="" make -C "$dir/projects/unix" all "${params[@]}" OPTFLAGS="$CFLAGS -O3 -flto"
|
||||
make -C "$dir/projects/unix" all "${params[@]}" OPTFLAGS="$CFLAGS -O3 -flto"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
rp_module_id="retroarch"
|
||||
rp_module_desc="RetroArch - frontend to the libretro emulator cores - required by all lr-* emulators"
|
||||
rp_module_licence="GPL3 https://raw.githubusercontent.com/libretro/RetroArch/master/COPYING"
|
||||
rp_module_repo="git https://github.com/retropie/RetroArch.git retropie-v1.16.0"
|
||||
rp_module_repo="git https://github.com/retropie/RetroArch.git retropie-v1.18.0"
|
||||
rp_module_section="core"
|
||||
|
||||
function depends_retroarch() {
|
||||
|
@ -282,6 +282,13 @@ function configure_retroarch() {
|
|||
# enable video shaders
|
||||
iniSet "video_shader_enable" "true"
|
||||
|
||||
# enable overlays by default
|
||||
iniSet "input_overlay_enable" "true"
|
||||
|
||||
# disable save paths under sub-folders
|
||||
iniSet "sort_savestates_enable" "false"
|
||||
iniSet "sort_savefiles_enable" "false"
|
||||
|
||||
copyDefaultConfig "$config" "$configdir/all/retroarch.cfg"
|
||||
rm "$config"
|
||||
|
||||
|
@ -313,6 +320,13 @@ function configure_retroarch() {
|
|||
# don't save input remaps by default
|
||||
_set_config_option_retroarch "remap_save_on_exit" "false"
|
||||
|
||||
# enable overlays by default on upgrades
|
||||
_set_config_option_retroarch "input_overlay_enable" "true"
|
||||
|
||||
# don't sort save files in sub-folders
|
||||
_set_config_option_retroarch "sort_savefiles_enable" "false"
|
||||
_set_config_option_retroarch "sort_savestates_enable" "false"
|
||||
|
||||
# remapping hack for old 8bitdo firmware
|
||||
addAutoConf "8bitdo_hack" 0
|
||||
}
|
||||
|
@ -338,7 +352,7 @@ function keyboard_retroarch() {
|
|||
local value
|
||||
local values
|
||||
readarray -t values <<<"$choice"
|
||||
iniConfig " = " "" "$configdir/all/retroarch.cfg"
|
||||
iniConfig " = " '"' "$configdir/all/retroarch.cfg"
|
||||
i=0
|
||||
for value in "${values[@]}"; do
|
||||
iniSet "${key[$i]}" "$value" >/dev/null
|
||||
|
@ -438,7 +452,7 @@ function _set_config_option_retroarch()
|
|||
{
|
||||
local option="$1"
|
||||
local value="$2"
|
||||
iniConfig " = " "\"" "$configdir/all/retroarch.cfg"
|
||||
iniConfig " = " '"' "$configdir/all/retroarch.cfg"
|
||||
iniGet "$option"
|
||||
if [[ -z "$ini_value" ]]; then
|
||||
iniSet "$option" "$value"
|
||||
|
|
|
@ -13,7 +13,7 @@ rp_module_id="scummvm"
|
|||
rp_module_desc="ScummVM"
|
||||
rp_module_help="Copy your ScummVM games to $romdir/scummvm"
|
||||
rp_module_licence="GPL3 https://raw.githubusercontent.com/scummvm/scummvm/master/COPYING"
|
||||
rp_module_repo="git https://github.com/scummvm/scummvm.git v2.8.0"
|
||||
rp_module_repo="git https://github.com/scummvm/scummvm.git v2.8.1"
|
||||
rp_module_section="opt"
|
||||
rp_module_flags="sdl2"
|
||||
|
||||
|
|
55
scriptmodules/libretrocores/lr-dirksimple.sh
Normal file
55
scriptmodules/libretrocores/lr-dirksimple.sh
Normal file
|
@ -0,0 +1,55 @@
|
|||
#!/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="lr-dirksimple"
|
||||
rp_module_desc="laserdisc emu - DirkSimple"
|
||||
rp_module_help="ROM Extensions: .ogv .dirksimple\n\nCopy your laserdisc movies in Ogg Theora format to $romdir/daphne"
|
||||
rp_module_licence="zlib https://raw.githubusercontent.com/icculus/DirkSimple/main/LICENSE.txt"
|
||||
rp_module_repo="git https://github.com/icculus/DirkSimple.git main"
|
||||
rp_module_section="exp"
|
||||
|
||||
function depends_lr-dirksimple() {
|
||||
getDepends cmake
|
||||
}
|
||||
|
||||
function sources_lr-dirksimple() {
|
||||
gitPullOrClone
|
||||
}
|
||||
|
||||
function build_lr-dirksimple() {
|
||||
rm -fr build && mkdir build
|
||||
cd build
|
||||
cmake -DDIRKSIMPLE_LIBRETRO=ON -DDIRKSIMPLE_SDL=OFF ..
|
||||
make dirksimple_libretro
|
||||
md_ret_require="$md_build/build/dirksimple_libretro.so"
|
||||
}
|
||||
|
||||
function install_lr-dirksimple() {
|
||||
md_ret_files=(
|
||||
'build/dirksimple_libretro.so'
|
||||
'data'
|
||||
'LICENSE.txt'
|
||||
)
|
||||
}
|
||||
|
||||
function configure_lr-dirksimple() {
|
||||
mkRomDir "daphne"
|
||||
defaultRAConfig "daphne"
|
||||
|
||||
rm -rf "$biosdir/DirkSimple"
|
||||
mkUserDir "$biosdir/DirkSimple"
|
||||
cp -rf "$md_inst/data" "$biosdir/DirkSimple/"
|
||||
chown -R $user:$user "$biosdir/DirkSimple"
|
||||
|
||||
addEmulator 0 "$md_id" "daphne" "$md_inst/dirksimple_libretro.so"
|
||||
addSystem "daphne"
|
||||
}
|
||||
|
|
@ -13,12 +13,19 @@ rp_module_id="lr-mame"
|
|||
rp_module_desc="MAME emulator - MAME (current) port for libretro"
|
||||
rp_module_help="ROM Extension: .zip\n\nCopy your MAME roms to either $romdir/mame-libretro or\n$romdir/arcade"
|
||||
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/mame/master/COPYING"
|
||||
rp_module_repo="git https://github.com/libretro/mame.git master"
|
||||
rp_module_repo="git https://github.com/libretro/mame.git master :_get_version_lr-mame"
|
||||
rp_module_section="exp"
|
||||
rp_module_flags=""
|
||||
|
||||
function _get_version_lr-mame() {
|
||||
local tagname
|
||||
if [[ "$__gcc_version" -lt 10 ]]; then
|
||||
tagname="lrmame0264"
|
||||
fi
|
||||
echo "$tagname"
|
||||
}
|
||||
function _get_params_lr-mame() {
|
||||
local params=(OSD=retro RETRO=1 NOWERROR=1 OS=linux OPTIMIZE=2 TARGETOS=linux CONFIG=libretro NO_USE_MIDI=1 NO_USE_PORTAUDIO=1 TARGET=mame)
|
||||
local params=(OSD=retro RETRO=1 PYTHON_EXECUTABLE=python3 NOWERROR=1 OS=linux OPTIMIZE=2 TARGETOS=linux CONFIG=libretro NO_USE_MIDI=1 NO_USE_PORTAUDIO=1 TARGET=mame)
|
||||
isPlatform "64bit" && params+=(PTR64=1)
|
||||
echo "${params[@]}"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ rp_module_id="lr-mess"
|
|||
rp_module_desc="MESS emulator - MESS Port for libretro"
|
||||
rp_module_help="see wiki for detailed explanation"
|
||||
rp_module_licence="GPL2 https://raw.githubusercontent.com/libretro/mame/master/COPYING"
|
||||
rp_module_repo="git https://github.com/libretro/mame.git master"
|
||||
rp_module_repo="git https://github.com/libretro/mame.git master :_get_version_lr-mame"
|
||||
rp_module_section="exp"
|
||||
rp_module_flags=""
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ rp_module_desc="Sega 8/16 bit emu - picodrive arm optimised libretro core"
|
|||
rp_module_help="ROM Extensions: .32x .iso .cue .sms .smd .bin .gen .md .sg .zip\n\nCopy your Megadrive / Genesis roms to $romdir/megadrive\nMasterSystem roms to $romdir/mastersystem\nSega 32X roms to $romdir/sega32x and\nSegaCD roms to $romdir/segacd\nThe Sega CD requires the BIOS files us_scd1_9210.bin, eu_mcd1_9210.bin, jp_mcd1_9112.bin copied to $biosdir"
|
||||
rp_module_licence="NONCOM https://raw.githubusercontent.com/libretro/picodrive/master/COPYING"
|
||||
rp_module_repo="git https://github.com/libretro/picodrive.git master"
|
||||
rp_module_section="main"
|
||||
rp_module_section="main nodistcc"
|
||||
|
||||
function sources_lr-picodrive() {
|
||||
gitPullOrClone
|
||||
|
|
|
@ -14,7 +14,7 @@ rp_module_desc="Super Nintendo emu - Snes9x (current) port for libretro"
|
|||
rp_module_help="ROM Extensions: .bin .smc .sfc .fig .swc .mgd .zip\n\nCopy your SNES roms to $romdir/snes"
|
||||
rp_module_licence="NONCOM https://raw.githubusercontent.com/libretro/snes9x/master/LICENSE"
|
||||
rp_module_repo="git https://github.com/libretro/snes9x.git master"
|
||||
rp_module_section="main armv6=opt armv7=opt"
|
||||
rp_module_section="main armv6=opt armv7=opt nodistcc"
|
||||
|
||||
function sources_lr-snes9x() {
|
||||
gitPullOrClone
|
||||
|
@ -26,8 +26,7 @@ function build_lr-snes9x() {
|
|||
|
||||
cd libretro
|
||||
make "${params[@]}" clean
|
||||
# temporarily disable distcc due to segfaults with cross compiler and lto
|
||||
DISTCC_HOSTS="" make "${params[@]}"
|
||||
make "${params[@]}"
|
||||
md_ret_require="$md_build/libretro/snes9x_libretro.so"
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,16 @@ function rp_callModule() {
|
|||
return 3
|
||||
fi
|
||||
|
||||
# skip for modules 'builder' and 'setup' so that distcc settings do not propagate from them
|
||||
if [[ "$md_id" != "builder" && "$md_id" != "setup" ]]; then
|
||||
# if distcc is used and the module doesn't exclude it, add /usr/lib/distcc to PATH and MAKEFLAGS
|
||||
if [[ -n "$DISTCC_HOSTS" ]] && ! hasFlag "${__mod_info[$md_id/flags]}" "nodistcc"; then
|
||||
# use local variables so they are available to all child functions without changing the globals
|
||||
local PATH="/usr/lib/distcc:$PATH"
|
||||
local MAKEFLAGS="$MAKEFLAGS PATH=$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# parameters _auto_ _binary or _source_ (_source_ is used if no parameters are given for a module)
|
||||
case "$mode" in
|
||||
# install the module if not installed, and update if it is
|
||||
|
|
|
@ -259,6 +259,15 @@ fi
|
|||
TTY=\$(tty)
|
||||
export TTY="\${TTY:8:1}"
|
||||
|
||||
# exit vlc before launching on kms or ES won't be able to open the display (not required on legacy drivers or fkms)
|
||||
if [[ -d /sys/module/vc4 ]] && grep -q "okay" /proc/device-tree/soc/hvs@7e400000/status 2>/dev/null; then
|
||||
vlc_pid="/tmp/vlc.pid"
|
||||
if [[ -f "\$vlc_pid" ]]; then
|
||||
kill \$(<\$vlc_pid)
|
||||
rm "\$vlc_pid"
|
||||
fi
|
||||
fi
|
||||
|
||||
clear
|
||||
tput civis
|
||||
"$md_inst/emulationstation.sh" "\$@"
|
||||
|
|
43
scriptmodules/supplementary/kmsxx.sh
Normal file
43
scriptmodules/supplementary/kmsxx.sh
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/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="kmsxx"
|
||||
rp_module_desc="library and utilities for Linux kernel mode setting"
|
||||
rp_module_licence="MPL2 https://raw.githubusercontent.com/cmitu/kmsxx/master/LICENSE"
|
||||
rp_module_repo="git https://github.com/cmitu/kmsxx retropie"
|
||||
rp_module_section="depends"
|
||||
rp_module_flags=""
|
||||
|
||||
function depends_kmsxx() {
|
||||
getDepends meson ninja-build libdrm-dev libfmt-dev pkg-config
|
||||
}
|
||||
|
||||
function sources_kmsxx() {
|
||||
gitPullOrClone
|
||||
}
|
||||
|
||||
function build_kmsxx() {
|
||||
rm -fr build
|
||||
meson setup --prefix="$md_inst" -Dbuildtype=release -Ddefault_library=static -Domap=disabled -Dpykms=disabled -Dkmscube=false build
|
||||
ninja -C build
|
||||
|
||||
md_ret_require="$md_build/build/utils/kmsprint-rp"
|
||||
}
|
||||
|
||||
function install_kmsxx() {
|
||||
md_ret_files=(
|
||||
build/utils/kmsprint-rp
|
||||
build/utils/kmsprint
|
||||
build/utils/kmsview
|
||||
build/utils/kmsblank
|
||||
build/utils/fbtest
|
||||
)
|
||||
}
|
|
@ -52,7 +52,7 @@ function install_bin_runcommand() {
|
|||
|
||||
# needed for KMS modesetting (debian buster or later only)
|
||||
if [[ "$__os_debian_ver" -ge 10 ]]; then
|
||||
rp_installModule "mesa-drm" "_autoupdate_"
|
||||
rp_installModule "kmsxx" "_autoupdate_"
|
||||
fi
|
||||
|
||||
md_ret_require="$md_inst/runcommand.sh"
|
||||
|
|
|
@ -90,7 +90,7 @@ JOY2KEY="$ROOTDIR/admin/joy2key/joy2key"
|
|||
|
||||
# modesetting tools
|
||||
TVSERVICE="/opt/vc/bin/tvservice"
|
||||
KMSTOOL="$ROOTDIR/supplementary/mesa-drm/modetest"
|
||||
KMSTOOL="$ROOTDIR/supplementary/kmsxx/kmsprint-rp"
|
||||
XRANDR="xrandr"
|
||||
|
||||
source "$ROOTDIR/lib/inifuncs.sh"
|
||||
|
@ -129,7 +129,7 @@ function get_config() {
|
|||
if [[ -n "$DISPLAY" ]] && $XRANDR &>/dev/null; then
|
||||
HAS_MODESET="x11"
|
||||
# copy kms tool output to global variable to avoid multiple invocations
|
||||
elif [[ -c /dev/dri/card0 ]] && KMS_BUFFER="$($KMSTOOL -r 2>/dev/null)"; then
|
||||
elif [[ -c /dev/dri/card0 ]] && KMS_BUFFER="$($KMSTOOL 2>/dev/null)"; then
|
||||
HAS_MODESET="kms"
|
||||
elif [[ -f "$TVSERVICE" ]]; then
|
||||
HAS_MODESET="tvs"
|
||||
|
@ -241,37 +241,23 @@ function get_all_tvs_modes() {
|
|||
|
||||
function get_all_kms_modes() {
|
||||
declare -Ag MODE
|
||||
local default_mode="$(echo "$KMS_BUFFER" | grep -Em1 "^Mode:.*(driver|userdef).*crtc")"
|
||||
local crtc="$(echo "$default_mode" | awk '{ print $(NF-1) }')"
|
||||
local crtc_encoder="$(echo "$KMS_BUFFER" | grep "Encoder map:" | awk -v crtc="$crtc" '$5 == crtc { print $3 }')"
|
||||
|
||||
local info
|
||||
local line
|
||||
local mode_id
|
||||
default_mode="$(echo "$KMS_BUFFER" | grep -Em1 "^Mode: [0-9]+ crtc")"
|
||||
crtc="$(echo "$default_mode" | cut -d' ' -f 4)"
|
||||
crtc_encoder="$(echo "$KMS_BUFFER" | grep "Encoder map:" | awk -v crtc="$crtc" '$5 == crtc { print $3 }')"
|
||||
|
||||
# add default mode as fallback in case real mode cannot be mapped
|
||||
MODE[def-def]="$(echo "$default_mode" | awk '{--NF --NF --NF; print}' | cut -c7-)"
|
||||
MODE[def-def]="$(echo "$default_mode" | cut -d' ' -f5-)"
|
||||
|
||||
while read -r line; do
|
||||
# encoder id
|
||||
encoder_id="$(echo "$line" | awk '{ print $(NF-1) }')"
|
||||
# parse only the video modes connected to the current active crtc
|
||||
while read -r mode_str mode_id con encoder_id info; do
|
||||
# we only need 2nd column (mode index) and the 5+ columns (resolution info)
|
||||
# populate resolution info into arrays (using mapped crtc encoder value)
|
||||
MODE_ID+=($crtc-$mode_id)
|
||||
MODE[$crtc-$mode_id]="$info"
|
||||
|
||||
# only match encoders that are linked to the currently active crtc
|
||||
if [[ "$encoder_id" == "$crtc_encoder" ]]; then
|
||||
# mode id
|
||||
mode_id="$(echo "$line" | awk '{ print $NF }')"
|
||||
|
||||
# make output more human-readable
|
||||
info="$(echo "$line" | awk '{--NF --NF --NF; print}' | cut -c7-)"
|
||||
|
||||
# populate resolution into arrays (using mapped crtc encoder value)
|
||||
MODE_ID+=($crtc-$mode_id)
|
||||
MODE[$crtc-$mode_id]="$info"
|
||||
|
||||
# if string matches default mode, add a special mapped entry
|
||||
[[ "$default_mode" =~ "$info" ]] && MODE[map-map]="$crtc $mode_id"
|
||||
fi
|
||||
done < <(echo "$KMS_BUFFER" | grep "Mode:" | grep "connector")
|
||||
# if string matches default mode, add a special mapped entry
|
||||
[[ "$default_mode" =~ "$info" ]] && MODE[map-map]="$crtc $mode_id"
|
||||
done < <(echo "$KMS_BUFFER" | grep -E "^Mode: [0-9]+ connector $crtc_encoder")
|
||||
}
|
||||
|
||||
function get_all_x11_modes()
|
||||
|
@ -373,7 +359,7 @@ function get_kms_mode_info() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# split resolution
|
||||
# split resolution (1st column)
|
||||
status=(${MODE[${mode_id[0]}-${mode_id[1]}]/x/ })
|
||||
|
||||
# get crtc id
|
||||
|
@ -384,13 +370,14 @@ function get_kms_mode_info() {
|
|||
|
||||
# get mode resolution
|
||||
mode_info[2]="${status[0]}"
|
||||
mode_info[3]="${status[1]}"
|
||||
# yres may have an ending 'i'(nterlace) flag
|
||||
mode_info[3]="${status[1]/i/}"
|
||||
|
||||
# get aspect ratio
|
||||
# get aspect ratio (5th column)
|
||||
mode_info[4]="${status[5]}"
|
||||
|
||||
# get refresh rate
|
||||
mode_info[5]="${status[3]}"
|
||||
# get refresh rate (4th column, remove surrounding brackets)
|
||||
mode_info[5]="${status[4]//[()]/}"
|
||||
|
||||
echo "${mode_info[@]}"
|
||||
}
|
||||
|
@ -1091,7 +1078,8 @@ function retroarch_append_config() {
|
|||
touch "$conf"
|
||||
iniConfig " = " '"' "$conf"
|
||||
|
||||
if [[ -n "$HAS_MODESET" && "${MODE_CUR[5]}" -gt 0 ]]; then
|
||||
# strip any suffix decimals appearing in refresh rate, just for comparison
|
||||
if [[ -n "$HAS_MODESET" && "${MODE_CUR[5]%.*}" -gt 0 ]]; then
|
||||
# set video_refresh_rate in our config to the same as the screen refresh
|
||||
iniSet "video_refresh_rate" "${MODE_CUR[5]}"
|
||||
fi
|
||||
|
|
|
@ -290,17 +290,21 @@ function _init_config_skyscraper() {
|
|||
rm -f "$home/.bash_completion.d/Skyscraper.bash"
|
||||
}
|
||||
|
||||
# Scrape one system, passed as parameter
|
||||
function _scrape_skyscraper() {
|
||||
local system="$1"
|
||||
# read scriptmodule's skyscraper.cfg and prepare the command line parameters
|
||||
function _get_clioptions_skyscraper() {
|
||||
local system=$1
|
||||
local scrape_module=$2
|
||||
|
||||
[[ -z "$system" ]] && return
|
||||
local params=()
|
||||
local flags
|
||||
|
||||
iniConfig " = " '"' "$configdir/all/skyscraper.cfg"
|
||||
eval $(_load_config_skyscraper)
|
||||
|
||||
local -a params=(-p "$system")
|
||||
local flags="unattend,skipped,"
|
||||
[[ "$system" != "<platform>" ]] && system=\"$system\"
|
||||
|
||||
params+=(-p "$system")
|
||||
flags="unattend,skipped,"
|
||||
|
||||
[[ "$download_videos" -eq 1 ]] && flags+="videos,"
|
||||
|
||||
|
@ -330,7 +334,7 @@ function _scrape_skyscraper() {
|
|||
|
||||
# If 2nd parameter is unset, use the configured scraping source, otherwise scrape from cache.
|
||||
# Scraping from cache means we can omit '-s' from the parameter list.
|
||||
if [[ -z "$2" ]]; then
|
||||
if [[ -z "$scrape_module" ]]; then
|
||||
params+=(-s "$scrape_source")
|
||||
fi
|
||||
|
||||
|
@ -340,11 +344,24 @@ function _scrape_skyscraper() {
|
|||
flags=${flags::-1}
|
||||
|
||||
params+=(--flags "$flags")
|
||||
echo "${params[@]}"
|
||||
}
|
||||
|
||||
|
||||
# Scrape one system, passed as parameter
|
||||
function _scrape_skyscraper() {
|
||||
local system="$1"
|
||||
local scrape_module="$2"
|
||||
|
||||
[[ -z "$system" ]] && return
|
||||
|
||||
local params
|
||||
params=$(_get_clioptions_skyscraper "$system" "$scrape_module")
|
||||
declare -a "params_arr=($params)"
|
||||
# trap ctrl+c and return if pressed (rather than exiting retropie-setup etc)
|
||||
trap 'trap 2; return 1' INT
|
||||
sudo -u "$user" stdbuf -o0 "$md_inst/Skyscraper" "${params[@]}"
|
||||
echo -e "\nCOMMAND LINE USED:\n $md_inst/Skyscraper" "${params[@]}"
|
||||
sudo -u "$user" stdbuf -o0 "$md_inst/Skyscraper" "${params_arr[@]}"
|
||||
echo -e "\nCOMMAND LINE USED:\n $md_inst/Skyscraper" "${params}"
|
||||
sleep 2
|
||||
trap 2
|
||||
}
|
||||
|
@ -377,14 +394,24 @@ function _scrape_chosen_skyscraper() {
|
|||
[[ ${#choices[@]} -eq 0 || $? -eq 1 ]] && return 1
|
||||
|
||||
# Confirm with the user that scraping can start
|
||||
dialog --clear --colors --yes-label "Proceed" --no-label "Abort" --yesno "This will start the gathering process, which can take a long time if you have a large game collection.\n\nYou can interrupt this process anytime by pressing \ZbCtrl+C\Zn.\nProceed ?" 12 70 2>&1 >/dev/tty
|
||||
local cli=("$md_inst/Skyscraper ")
|
||||
cli+=$(_get_clioptions_skyscraper "<platform>" "")
|
||||
|
||||
local sky_cmd
|
||||
sky_cmd=$(echo "${cli[@]}" | sed 's/ -/ \\\\n -/g')
|
||||
|
||||
local msg="This will start the gathering process, which can take a long time if you have a large game collection.\n\n"
|
||||
msg+="You can interrupt this process anytime by pressing \ZbCtrl+C\Zn.\n\n"
|
||||
msg+="For each selected <platform> Skyscraper is run with these commandline options:\n\n$sky_cmd"
|
||||
|
||||
dialog --clear --colors --yes-label "Proceed" --no-label "Abort" --yesno "$msg" 20 70 2>&1 >/dev/tty
|
||||
[[ ! $? -eq 0 ]] && return 1
|
||||
|
||||
local choice
|
||||
|
||||
for choice in "${choices[@]}"; do
|
||||
choice="${options[choice*3-2]}"
|
||||
_scrape_skyscraper "$choice" "$@"
|
||||
_scrape_skyscraper "$choice" ""
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -417,7 +444,7 @@ function _generate_chosen_skyscraper() {
|
|||
|
||||
for choice in "${choices[@]}"; do
|
||||
choice="${options[choice*3-2]}"
|
||||
_scrape_skyscraper "$choice" "cache" "$@"
|
||||
_scrape_skyscraper "$choice" "cache"
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -520,8 +547,10 @@ function gui_skyscraper() {
|
|||
[1]=screenscraper
|
||||
[2]=arcadedb
|
||||
[3]=thegamesdb
|
||||
[4]=openretro
|
||||
[5]=worldofspectrum
|
||||
[4]=mobygames
|
||||
[5]=openretro
|
||||
[6]=igdb
|
||||
[7]=worldofspectrum
|
||||
)
|
||||
s_source+=(
|
||||
[10]=esgamelist
|
||||
|
@ -532,8 +561,10 @@ function gui_skyscraper() {
|
|||
[1]=ScreenScraper
|
||||
[2]=ArcadeDB
|
||||
[3]=TheGamesDB
|
||||
[4]=OpenRetro
|
||||
[5]="World of Spectrum"
|
||||
[4]=MobyGames
|
||||
[5]=OpenRetro
|
||||
[6]="Internet Game Database"
|
||||
[7]="World of Spectrum"
|
||||
)
|
||||
s_source_names+=(
|
||||
[10]="EmulationStation Gamelist"
|
||||
|
|
|
@ -32,9 +32,7 @@ function _video_exts_splashscreen() {
|
|||
}
|
||||
|
||||
function depends_splashscreen() {
|
||||
local params=(insserv)
|
||||
isPlatform "32bit" && params+=(omxplayer)
|
||||
getDepends "${params[@]}"
|
||||
getDepends vlc
|
||||
}
|
||||
|
||||
function install_bin_splashscreen() {
|
||||
|
@ -48,6 +46,7 @@ ConditionPathExists=$md_inst/asplashscreen.sh
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=$user
|
||||
ExecStart=$md_inst/asplashscreen.sh
|
||||
RemainAfterExit=yes
|
||||
|
||||
|
@ -55,8 +54,6 @@ RemainAfterExit=yes
|
|||
WantedBy=sysinit.target
|
||||
_EOF_
|
||||
|
||||
rp_installModule "omxiv" "_autoupdate_"
|
||||
|
||||
gitPullOrClone "$md_inst"
|
||||
|
||||
cp "$md_data/asplashscreen.sh" "$md_inst"
|
||||
|
@ -66,6 +63,9 @@ _EOF_
|
|||
iniSet "DATADIR" "$datadir"
|
||||
iniSet "REGEX_IMAGE" "$(_image_exts_splashscreen)"
|
||||
iniSet "REGEX_VIDEO" "$(_video_exts_splashscreen)"
|
||||
if isPlatform "videocore"; then
|
||||
iniSet "VLC_OPTS" "--mmal-layer 10001"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$configdir/all/$md_id.cfg" ]]; then
|
||||
iniConfig "=" '"' "$configdir/all/$md_id.cfg"
|
||||
|
@ -107,9 +107,6 @@ function disable_splashscreen() {
|
|||
function configure_splashscreen() {
|
||||
[[ "$md_mode" == "remove" ]] && return
|
||||
|
||||
# remove legacy service
|
||||
[[ -f "/etc/init.d/asplashscreen" ]] && insserv -r asplashscreen && rm -f /etc/init.d/asplashscreen
|
||||
|
||||
disable_plymouth_splashscreen
|
||||
enable_splashscreen
|
||||
[[ ! -f /etc/splashscreen.list ]] && default_splashscreen
|
||||
|
@ -229,7 +226,7 @@ function preview_splashscreen() {
|
|||
|
||||
local path
|
||||
local file
|
||||
local omxiv="/opt/retropie/supplementary/omxiv/omxiv"
|
||||
local vlc="sudo -u $user vlc --intf dummy --quiet --play-and-exit --image-duration 6"
|
||||
while true; do
|
||||
local cmd=(dialog --backtitle "$__backtitle" --menu "Choose an option." 22 86 16)
|
||||
local choice=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
|
@ -241,13 +238,13 @@ function preview_splashscreen() {
|
|||
1)
|
||||
file=$(choose_splashscreen "$path" "image")
|
||||
[[ -z "$file" ]] && break
|
||||
$omxiv -b "$file"
|
||||
$vlc "$file"
|
||||
;;
|
||||
2)
|
||||
file=$(mktemp)
|
||||
find "$path" -type f ! -regex ".*/\..*" ! -regex ".*LICENSE" ! -regex ".*README.*" ! -regex ".*\.sh" | sort > "$file"
|
||||
if [[ -s "$file" ]]; then
|
||||
$omxiv -t 6 -T blend -b --once -f "$file"
|
||||
tr "\n" "\0" <"$file" | xargs -0 $vlc
|
||||
else
|
||||
printMsgs "dialog" "There are no splashscreens installed in $path"
|
||||
fi
|
||||
|
@ -257,7 +254,7 @@ function preview_splashscreen() {
|
|||
3)
|
||||
file=$(choose_splashscreen "$path" "video")
|
||||
[[ -z "$file" ]] && break
|
||||
omxplayer --no-osd -b --layer 10000 "$file"
|
||||
$vlc "$file"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -270,10 +267,6 @@ function download_extra_splashscreen() {
|
|||
}
|
||||
|
||||
function gui_splashscreen() {
|
||||
if [[ ! -d "$md_inst" ]]; then
|
||||
rp_callModule splashscreen depends
|
||||
rp_callModule splashscreen install
|
||||
fi
|
||||
local cmd=(dialog --backtitle "$__backtitle" --menu "Choose an option." 22 86 16)
|
||||
while true; do
|
||||
local enabled=0
|
||||
|
|
|
@ -4,27 +4,17 @@ ROOTDIR=""
|
|||
DATADIR=""
|
||||
REGEX_VIDEO=""
|
||||
REGEX_IMAGE=""
|
||||
VLC_OPTS=""
|
||||
|
||||
# Load user settings
|
||||
. /opt/retropie/configs/all/splashscreen.cfg
|
||||
|
||||
is_fkms() {
|
||||
if grep -q okay /proc/device-tree/soc/v3d@7ec00000/status 2> /dev/null || grep -q okay /proc/device-tree/soc/firmwarekms@7e600000/status 2> /dev/null ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
do_start () {
|
||||
local config="/etc/splashscreen.list"
|
||||
local line
|
||||
local re="$REGEX_VIDEO\|$REGEX_IMAGE"
|
||||
local omxiv="/opt/retropie/supplementary/omxiv/omxiv"
|
||||
local vlc="vlc --intf dummy --quiet --no-video-title-show --play-and-exit "
|
||||
case "$RANDOMIZE" in
|
||||
disabled)
|
||||
line="$(head -1 "$config")"
|
||||
;;
|
||||
retropie)
|
||||
line="$(find "$ROOTDIR/supplementary/splashscreen" -type f | grep "$re" | shuf -n1)"
|
||||
;;
|
||||
|
@ -38,36 +28,34 @@ do_start () {
|
|||
line="$(cat "$config" | shuf -n1)"
|
||||
;;
|
||||
esac
|
||||
if $(echo "$line" | grep -q "$REGEX_VIDEO"); then
|
||||
# wait for dbus
|
||||
while ! pgrep "dbus" >/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
omxplayer --no-osd -o both -b --layer 10001 "$line"
|
||||
elif $(echo "$line" | grep -q "$REGEX_IMAGE"); then
|
||||
if [ "$RANDOMIZE" = "disabled" ]; then
|
||||
local count=$(wc -l <"$config")
|
||||
else
|
||||
local count=1
|
||||
fi
|
||||
[ $count -eq 0 ] && count=1
|
||||
[ $count -gt 12 ] && count=12
|
||||
|
||||
# Default duration is 12 seconds, check if configured otherwise
|
||||
[ -z "$DURATION" ] && DURATION=12
|
||||
local delay=$((DURATION/count))
|
||||
if [ "$RANDOMIZE" = "disabled" ]; then
|
||||
"$omxiv" --once -t $delay -b --layer 10001 -f "$config" >/dev/null 2>&1
|
||||
else
|
||||
"$omxiv" --once -t $delay -b --layer 10001 -r "$line" >/dev/null 2>&1
|
||||
fi
|
||||
if [ "$RANDOMIZE" = "disabled" ]; then
|
||||
local count=$(wc -l <"$config")
|
||||
else
|
||||
local count=1
|
||||
fi
|
||||
|
||||
[ $count -eq 0 ] && count=1
|
||||
[ $count -gt 12 ] && count=12
|
||||
|
||||
# Default duration is 12 seconds, check if configured otherwise
|
||||
[ -z "$DURATION" ] && DURATION=12
|
||||
local delay=$((DURATION/count))
|
||||
|
||||
vlc="$vlc --image-duration $delay"
|
||||
if [ "$RANDOMIZE" = "disabled" ]; then
|
||||
tr "\n" "\0" <"$config" | xargs -0 $vlc & 2>/dev/null
|
||||
else
|
||||
$vlc "$line" & 2>/dev/null
|
||||
fi
|
||||
echo $! >/tmp/vlc.pid
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|"")
|
||||
do_start &
|
||||
do_start
|
||||
;;
|
||||
restart|reload|force-reload)
|
||||
echo "Error: argument '$1' not supported" >&2
|
||||
|
|
|
@ -145,12 +145,6 @@ function conf_build_vars() {
|
|||
export ASFLAGS="$__asflags"
|
||||
export MAKEFLAGS="$__makeflags"
|
||||
|
||||
# if using distcc, add /usr/lib/distcc to PATH/MAKEFLAGS
|
||||
if [[ -n "$DISTCC_HOSTS" ]]; then
|
||||
PATH="/usr/lib/distcc:$PATH"
|
||||
MAKEFLAGS+=" PATH=$PATH"
|
||||
fi
|
||||
|
||||
# if __use_ccache is set, then add ccache to PATH/MAKEFLAGS
|
||||
if [[ "$__use_ccache" -eq 1 ]]; then
|
||||
PATH="/usr/lib/ccache:$PATH"
|
||||
|
|
Loading…
Reference in a new issue