Skip to content

Commit 64ac746

Browse files
authored
Merge pull request #205 from retropieuser/patch-4
Added Standalone Flycast
2 parents c078464 + 1353d62 commit 64ac746

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

scriptmodules/emulators/flycast.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/usr/bin/env bash
2+
3+
# This file is part of The RetroPie Project
4+
#
5+
# The RetroPie Project is the legal property of its developers, whose names are
6+
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
7+
#
8+
# See the LICENSE.md file at the top-level directory of this distribution and
9+
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
10+
#
11+
12+
rp_module_id="flycast"
13+
rp_module_desc="Multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator"
14+
rp_module_help="Dreamcast ROM Extensions: .cdi .gdi .chd, Naomi/Atomiswave ROM Extension: .zip\n\nCopy your Dreamcast/Naomi roms to $romdir/dreamcast\n\nCopy the required Dreamcast BIOS files dc_boot.bin and dc_flash.bin to $biosdir/dc\n\nCopy the required Naomi/Atomiswave BIOS files naomi.zip/naomigd.zip and awbios.zip to $biosdir/dc"
15+
rp_module_licence="GPL2 https://raw.githubusercontent.com/flyinghead/flycast/master/LICENSE"
16+
rp_module_repo="git https://github.com/flyinghead/flycast.git master"
17+
rp_module_section="opt"
18+
rp_module_flags="!armv6 !videocore !:\$__gcc_version:-lt:9"
19+
20+
function depends_flycast() {
21+
local depends=(zlib1g-dev libgl-dev cmake)
22+
getDepends "${depends[@]}"
23+
}
24+
25+
function sources_flycast() {
26+
gitPullOrClone
27+
}
28+
29+
function build_flycast() {
30+
local params=("-DWITH_SYSTEM_ZLIB=ON -DCMAKE_BUILD_TYPE=Release")
31+
32+
if isPlatform "gles3"; then
33+
params+=("-DUSE_GLES=ON")
34+
elif isPlatform "gles2"; then
35+
params+=("-DUSE_GLES2=ON")
36+
fi
37+
isPlatform "vulkan" && params+=("-DUSE_VULKAN=ON") || params+=("-DUSE_VULKAN=OFF")
38+
39+
rm -fr build && mkdir build
40+
cd build
41+
cmake "${params[@]}" ..
42+
make
43+
44+
md_ret_require="$md_build/build/flycast"
45+
}
46+
47+
function install_flycast() {
48+
md_ret_files=(
49+
'build/flycast'
50+
'LICENSE'
51+
)
52+
}
53+
54+
function configure_flycast() {
55+
local sys
56+
local def
57+
for sys in "arcade" "dreamcast"; do
58+
def=0
59+
isPlatform "kms" && [[ "$sys" == "dreamcast" ]] && def=1
60+
addEmulator $def "$md_id" "$sys" "$md_inst/flycast --config window:fullscreen=yes %ROM%"
61+
addSystem "$sys"
62+
done
63+
64+
[[ "$md_mode" == "remove" ]] && return
65+
66+
for sys in "arcade" "dreamcast"; do
67+
mkRomDir "$sys"
68+
defaultRAConfig "$sys"
69+
done
70+
71+
# Map flycast's Bios path to match Reicast
72+
moveConfigDir "$home/.local/share/flycast" "$biosdir/dc"
73+
mkUserDir "$biosdir/dc"
74+
75+
chown -R $user:$user "$biosdir/dc"
76+
77+
moveConfigDir "$home/.config/flycast" "$md_conf_root/dreamcast/flycast"
78+
mkUserDir "$md_conf_root/dreamcast/flycast"
79+
80+
chown -R $user:$user "$md_conf_root/dreamcast/flycast"
81+
}

0 commit comments

Comments
 (0)