Skip to content

Commit 5943911

Browse files
authored
Merge pull request #3400 from FollyMaddy/master
Add libretro module script for pico8
2 parents 202fabd + 7d2d7ea commit 5943911

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

platforms.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ pcengine_theme="pcengine"
177177
pcfx_exts=".pce .ccd .cue .iso .chd"
178178
pcfx_fullname="PC-FX"
179179

180+
pico8_exts=".p8 .png .zip"
181+
pico8_fullname="PICO-8"
182+
180183
pokemini_exts=".min .zip"
181184
pokemini_fullname="Pokemon Mini"
182185

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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="lr-retro8"
13+
rp_module_desc="PICO-8 compatible engine - port of retro8 for libretro"
14+
rp_module_help="ROM Extensions: .p8 .p8.png .zip\n\nCopy your roms to $romdir/pico8"
15+
rp_module_licence="GPL3 https://raw.githubusercontent.com/libretro/retro8/master/LICENSE"
16+
rp_module_repo="git https://github.com/libretro/retro8.git master"
17+
rp_module_section="exp"
18+
19+
function sources_lr-retro8() {
20+
gitPullOrClone
21+
}
22+
23+
function build_lr-retro8() {
24+
make clean
25+
make
26+
md_ret_require="$md_build/retro8_libretro.so"
27+
}
28+
29+
function install_lr-retro8() {
30+
md_ret_files=(
31+
'retro8_libretro.so'
32+
'README.md'
33+
'LICENSE'
34+
)
35+
}
36+
37+
function configure_lr-retro8() {
38+
mkRomDir "pico8"
39+
40+
addEmulator 1 "$md_id" "pico8" "$md_inst/retro8_libretro.so"
41+
addSystem "pico8"
42+
43+
[[ "$md_mode" == "remove" ]] && return
44+
45+
ensureSystemretroconfig "pico8"
46+
47+
# disable retroarch built-in imageviewer so we can run .p8.png files
48+
iniConfig " = " '"' "$md_conf_root/pico8/retroarch.cfg"
49+
iniSet "builtin_imageviewer_enable" "false"
50+
}

0 commit comments

Comments
 (0)