Merge pull request #33 from spycat88/lime3ds

emulators: rename lime-sa > lime3ds-sa and log to /var/log
This commit is contained in:
spycat88 2024-04-01 22:04:38 +01:00 committed by GitHub
commit 5ce9656845
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 106 additions and 84 deletions

View file

@ -72,7 +72,7 @@ This document describes all available systems emulators and cores available for
|Nintendo|Game Boy Color (Hacks) (gbch)|1998|`gbch`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)<br>**retroarch:** sameboy<br>**retroarch:** gearboy<br>**retroarch:** tgbdual<br>**retroarch:** mgba<br>**retroarch:** vbam<br>|
|Nintendo|GameCube (gamecube)|2001|`gamecube`|.gcm .iso .gcz .ciso .wbfs .rvz .dol|**dolphin:** dolphin-sa-gc (default)<br>**retroarch:** dolphin<br>|
|Nintendo|NES (Hacks) (nesh)|1985|`nesh`|.nes .unif .unf .zip .7z|**retroarch:** nestopia (default)<br>**retroarch:** fceumm<br>**retroarch:** quicknes<br>**retroarch:** mesen<br>|
|Nintendo|Nintendo 3DS (3ds)|2010|`3ds`|.3ds .3dsx .elf .axf .cci .cxi .app|**lime:** lime-sa (default)<br>|
|Nintendo|Nintendo 3DS (3ds)|2010|`3ds`|.3ds .3dsx .elf .axf .cci .cxi .app|**lime3ds:** lime3ds-sa (default)<br>|
|Nintendo|Nintendo 64 (n64)|1996|`n64`|.z64 .n64 .v64 .zip .7z|**retroarch:** mupen64plus_next (default)<br>**retroarch:** mupen64plus<br>**retroarch:** parallel_n64<br>**mupen64plus:** mupen64plus-sa<br>|
|Nintendo|Nintendo DS (nds)|2005|`nds`|.nds .zip .7z|**drastic:** drastic-sa (default)<br>**retroarch:** melonds<br>|
|Nintendo|Nintendo Entertainment System (nes)|1985|`nes`|.nes .unif .unf .zip .7z|**retroarch:** nestopia (default)<br>**retroarch:** fceumm<br>**retroarch:** quicknes<br>**retroarch:** mesen<br>|

View file

@ -1,22 +0,0 @@
diff --git a/src/common/common_paths.h b/src/common/common_paths.h
index f12eedb..6f37046 100644
--- a/src/common/common_paths.h
+++ b/src/common/common_paths.h
@@ -29,7 +29,7 @@
// For compatibility with XDG paths.
#define EMU_DATA_DIR "citra-emu"
#else
-#define EMU_DATA_DIR "citra-emu"
+#define EMU_DATA_DIR "lime-emu"
#endif
#endif
@@ -55,7 +55,7 @@
// Filenames
// Files in the directory returned by GetUserPath(UserPath::LogDir)
-#define LOG_FILE "citra_log.txt"
+#define LOG_FILE "lime_log.txt"
// Files in the directory returned by GetUserPath(UserPath::ConfigDir)
#define EMU_CONFIG "emu.ini"

View file

@ -65,7 +65,7 @@ touch_device=
# Most desktop operating systems do not expose a way to poll the motion state of the controllers
# so as a way around it, cemuhook created a udp client/server protocol to broadcast the data directly
# from a controller device to the client program. Lime has a client that can connect and read
# from a controller device to the client program. Lime3DS has a client that can connect and read
# from any cemuhook compatible motion program.
# IPv4 address of the udp input server (Default "127.0.0.1")
@ -280,15 +280,15 @@ sdmc_directory =
nand_directory =
[System]
# The system model that Lime will try to emulate
# The system model that Lime3DS will try to emulate
# 0: Old 3DS, 1: New 3DS (default)
is_new_3ds =
# The system region that Lime will use during emulation
# The system region that Lime3DS will use during emulation
# -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan
region_value =
# The clock to use when Lime starts
# The clock to use when Lime3DS starts
# 0: System clock (default), 1: fixed time
init_clock =
@ -344,7 +344,7 @@ renderer_debug =
enable_telemetry = 0
# URL for Web API
web_api_url = https://api.citra-emu.org
# Username and token for Lime Web Service
# Username and token for Lime3DS Web Service
# See https://profile.citra-emu.org/ for more info
citra_username =
citra_token =

View file

@ -1,13 +1,13 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
PKG_NAME="lime-sa"
PKG_VERSION="235697e41f0f28237a9dd594f94e6b9038c2d04b"
PKG_NAME="lime3ds-sa"
PKG_VERSION="6bd64d83b770ca5ee7d0faaba400693950367822"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Lime3DS/Lime3DS"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain ffmpeg mesa SDL2 boost zlib libusb boost zstd control-gen"
PKG_LONGDESC="Lime - Nintendo 3DS emulator"
PKG_LONGDESC="Lime3DS - Nintendo 3DS emulator"
PKG_TOOLCHAIN="cmake"
if [ ! "${OPENGL}" = "no" ]; then
@ -31,9 +31,9 @@ PKG_CMAKE_OPTS_TARGET+="-DENABLE_QT=OFF \
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/bin/MinSizeRel/lime ${INSTALL}/usr/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/bin/MinSizeRel/lime ${INSTALL}/usr/bin/lime3ds
cp ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/config/lime-emu
cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/lime-emu
mkdir -p ${INSTALL}/usr/config/lime3ds
cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/lime3ds
}

View file

@ -0,0 +1,44 @@
diff --git a/src/common/common_paths.h b/src/common/common_paths.h
index f12eedb..1390abe 100644
--- a/src/common/common_paths.h
+++ b/src/common/common_paths.h
@@ -29,7 +29,7 @@
// For compatibility with XDG paths.
#define EMU_DATA_DIR "citra-emu"
#else
-#define EMU_DATA_DIR "citra-emu"
+#define EMU_DATA_DIR "lime3ds"
#endif
#endif
@@ -44,7 +44,7 @@
#define SDMC_DIR "sdmc"
#define NAND_DIR "nand"
#define SYSDATA_DIR "sysdata"
-#define LOG_DIR "log"
+#define LOG_DIR "/var/log"
#define CHEATS_DIR "cheats"
#define DLL_DIR "external_dlls"
#define SHADER_DIR "shaders"
@@ -55,7 +55,7 @@
// Filenames
// Files in the directory returned by GetUserPath(UserPath::LogDir)
-#define LOG_FILE "citra_log.txt"
+#define LOG_FILE "lime3ds.log"
// Files in the directory returned by GetUserPath(UserPath::ConfigDir)
#define EMU_CONFIG "emu.ini"
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index cda752e..c645390 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -819,7 +819,7 @@ void SetUserPath(const std::string& path) {
g_paths.emplace(UserPath::NANDDir, user_path + NAND_DIR DIR_SEP);
g_paths.emplace(UserPath::SysDataDir, user_path + SYSDATA_DIR DIR_SEP);
// TODO: Put the logs in a better location for each OS
- g_paths.emplace(UserPath::LogDir, user_path + LOG_DIR DIR_SEP);
+ g_paths.emplace(UserPath::LogDir, LOG_DIR DIR_SEP);
g_paths.emplace(UserPath::CheatsDir, user_path + CHEATS_DIR DIR_SEP);
g_paths.emplace(UserPath::DLLDir, user_path + DLL_DIR DIR_SEP);
g_paths.emplace(UserPath::ShaderDir, user_path + SHADER_DIR DIR_SEP);

View file

@ -4,24 +4,24 @@
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
. /etc/profile
set_kill set "-9 lime"
set_kill set "-9 lime3ds"
# Load gptokeyb support files
control-gen_init.sh
source /storage/.config/gptokeyb/control.ini
get_controls
# Make sure Lime config directory exists
[ ! -d /storage/.config/lime-emu ] && cp -r /usr/config/lime-emu /storage/.config
# Make sure Lime3DS config directory exists
[ ! -d /storage/.config/lime3ds ] && cp -r /usr/config/lime3ds /storage/.config
# Move sdmc & nand to 3ds roms folder
[ ! -d /storage/roms/3ds/lime-sa/sdmc ] && mkdir -p /storage/roms/3ds/lime-sa/sdmc
rm -rf /storage/.config/lime-emu/sdmc
ln -sf /storage/roms/3ds/lime-sa/sdmc /storage/.config/lime-emu/sdmc
[ ! -d /storage/roms/3ds/lime3ds/sdmc ] && mkdir -p /storage/roms/3ds/lime3ds/sdmc
rm -rf /storage/.config/lime3ds/sdmc
ln -sf /storage/roms/3ds/lime3ds/sdmc /storage/.config/lime3ds/sdmc
[ ! -d /storage/roms/3ds/lime-sa/nand ] && mkdir -p /storage/roms/3ds/lime-sa/nand
rm -rf /storage/.config/lime-emu/nand
ln -sf /storage/roms/3ds/lime-sa/nand /storage/.config/lime-emu/nand
[ ! -d /storage/roms/3ds/lime3ds/nand ] && mkdir -p /storage/roms/3ds/lime3ds/nand
rm -rf /storage/.config/lime3ds/nand
ln -sf /storage/roms/3ds/lime3ds/nand /storage/.config/lime3ds/nand
# Emulation Station Features
@ -35,75 +35,75 @@ SLAYOUT=$(get_setting screen_layout 3ds "${GAME}")
# CPU Underclock
case "${CPU}" in
0) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 100' /storage/.config/lime-emu/sdl2-config.ini;;
1) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 90' /storage/.config/lime-emu/sdl2-config.ini;;
2) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 80' /storage/.config/lime-emu/sdl2-config.ini;;
3) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 70' /storage/.config/lime-emu/sdl2-config.ini;;
4) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 60' /storage/.config/lime-emu/sdl2-config.ini;;
5) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 50' /storage/.config/lime-emu/sdl2-config.ini;;
0) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 100' /storage/.config/lime3ds/sdl2-config.ini;;
1) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 90' /storage/.config/lime3ds/sdl2-config.ini;;
2) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 80' /storage/.config/lime3ds/sdl2-config.ini;;
3) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 70' /storage/.config/lime3ds/sdl2-config.ini;;
4) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 60' /storage/.config/lime3ds/sdl2-config.ini;;
5) sed -i '/cpu_clock_percentage =/c\cpu_clock_percentage = 50' /storage/.config/lime3ds/sdl2-config.ini;;
esac
# Resolution Scale
case "${RES}" in
0) sed -i '/resolution_factor =/c\resolution_factor = 0' /storage/.config/lime-emu/sdl2-config.ini;;
1) sed -i '/resolution_factor =/c\resolution_factor = 1' /storage/.config/lime-emu/sdl2-config.ini;;
2) sed -i '/resolution_factor =/c\resolution_factor = 2' /storage/.config/lime-emu/sdl2-config.ini;;
0) sed -i '/resolution_factor =/c\resolution_factor = 0' /storage/.config/lime3ds/sdl2-config.ini;;
1) sed -i '/resolution_factor =/c\resolution_factor = 1' /storage/.config/lime3ds/sdl2-config.ini;;
2) sed -i '/resolution_factor =/c\resolution_factor = 2' /storage/.config/lime3ds/sdl2-config.ini;;
esac
# Rotate Screen
case "${ROTATE}" in
0) sed -i '/upright_screen =/c\upright_screen = 0' /storage/.config/lime-emu/sdl2-config.ini;;
1) sed -i '/upright_screen =/c\upright_screen = 1' /storage/.config/lime-emu/sdl2-config.ini;;
0) sed -i '/upright_screen =/c\upright_screen = 0' /storage/.config/lime3ds/sdl2-config.ini;;
1) sed -i '/upright_screen =/c\upright_screen = 1' /storage/.config/lime3ds/sdl2-config.ini;;
esac
# Screen Layout
case "${SLAYOUT}" in
0)
sed -i '/layout_option =/c\layout_option = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime3ds/sdl2-config.ini
;;
1a)
sed -i '/layout_option =/c\layout_option = 1' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 1' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime3ds/sdl2-config.ini
;;
1b)
sed -i '/layout_option =/c\layout_option = 1' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 1' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 1' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 1' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime3ds/sdl2-config.ini
;;
2)
sed -i '/layout_option =/c\layout_option = 2' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 2' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime3ds/sdl2-config.ini
;;
3)
sed -i '/layout_option =/c\layout_option = 3' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 3' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 0' /storage/.config/lime3ds/sdl2-config.ini
;;
4)
sed -i '/layout_option =/c\layout_option = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 1' /storage/.config/lime-emu/sdl2-config.ini
sed -i '/layout_option =/c\layout_option = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/swap_screen =/c\swap_screen = 0' /storage/.config/lime3ds/sdl2-config.ini
sed -i '/custom_layout =/c\custom_layout = 1' /storage/.config/lime3ds/sdl2-config.ini
;;
esac
# Video Backend
case "${RENDERER}" in
1) sed -i '/graphics_api =/c\graphics_api = 1' /storage/.config/lime-emu/sdl2-config.ini;;
*) sed -i '/graphics_api =/c\graphics_api = 2' /storage/.config/lime-emu/sdl2-config.ini;;
1) sed -i '/graphics_api =/c\graphics_api = 1' /storage/.config/lime3ds/sdl2-config.ini;;
*) sed -i '/graphics_api =/c\graphics_api = 2' /storage/.config/lime3ds/sdl2-config.ini;;
esac
rm -rf /storage/.local/share/lime-emu
ln -sf /storage/.config/lime-emu /storage/.local/share/lime-emu
rm -rf /storage/.local/share/lime3ds
ln -sf /storage/.config/lime3ds /storage/.local/share/lime3ds
# Run Lime Emulator
if [ "${EMOUSE}" = "0" ]; then
/usr/bin/lime "${1}"
/usr/bin/lime3ds "${1}"
else
${GPTOKEYB} lime -c /storage/.config/lime-emu/lime.gptk &
/usr/bin/lime "${1}"
${GPTOKEYB} lime3ds -c /storage/.config/lime3ds/lime3ds.gptk &
/usr/bin/lime3ds "${1}"
kill -9 "$(pidof gptokeyb)"
fi

View file

@ -542,9 +542,9 @@
</core>
</cores>
</emulator>
<emulator name="lime">
<emulator name="lime3ds">
<cores>
<core name="lime-sa">"
<core name="lime3ds-sa">"
<features>
<feature name="cpu speed">
<choice name="100%" value="0"/>
@ -786,7 +786,7 @@
<core name="handy" features="netplay, rewind, autosave, cheevos" />
<core name="hatari" features="netplay, rewind, autosave" />
<core name="jaxe" features="netplay, rewind, autosave"/>
<core name="lime" features="autosave" />
<core name="lime3ds" features="autosave" />
<core name="mame2003_plus" features="netplay, rewind, autosave">
<features>
<feature name="netplay" />

View file

@ -60,7 +60,7 @@ case "${DEVICE}" in
;;
S922X*)
[ "${ENABLE_32BIT}" == "true" ] && EMUS_32BIT="box86 pcsx_rearmed-lr"
PKG_EMUS+=" amiberry aethersx2-sa dolphin-sa drastic-sa lime-sa mupen64plus-sa yabasanshiro-sa \
PKG_EMUS+=" amiberry aethersx2-sa dolphin-sa drastic-sa lime3ds-sa mupen64plus-sa yabasanshiro-sa \
box64 portmaster"
LIBRETRO_CORES+=" uae4arm beetle-psx-lr bsnes-lr bsnes-hd-lr dolphin-lr flycast-lr"
PKG_RETROARCH+=" retropie-shaders"
@ -127,7 +127,7 @@ makeinstall_target() {
### Nintendo 3DS
case ${DEVICE} in
S922X*)
add_emu_core 3ds lime lime-sa true
add_emu_core 3ds lime3ds lime3ds-sa true
add_es_system 3ds
;;
esac