From 0e8b0bd7ae4b6dcada2fb6c0524e79a4bd168823 Mon Sep 17 00:00:00 2001 From: Sophia Hadash Date: Tue, 22 Jun 2021 21:01:12 +0200 Subject: [PATCH 1/6] add switch platform --- es-app/src/PlatformId.cpp | 1 + es-app/src/PlatformId.h | 1 + es-app/src/scrapers/ScreenScraper.cpp | 1 + resources/systems/macos/es_systems.xml | 9 +++++++++ resources/systems/unix/es_systems.xml | 9 +++++++++ resources/systems/windows/es_systems.xml | 9 +++++++++ 6 files changed, 30 insertions(+) diff --git a/es-app/src/PlatformId.cpp b/es-app/src/PlatformId.cpp index 5e8ffc05a..3b32ddc0e 100644 --- a/es-app/src/PlatformId.cpp +++ b/es-app/src/PlatformId.cpp @@ -109,6 +109,7 @@ namespace PlatformIds "stratagus", // Stratagus game engine "sufami", // Bandai SuFami Turbo "supergrafx", // NEC SuperGrafx + "switch", // Nintendo SWITCH "ti99", // Texas Instruments TI-99 "tic80", // TIC-80 game engine "trs-80", // Tandy TRS-80 diff --git a/es-app/src/PlatformId.h b/es-app/src/PlatformId.h index 2dfe0e144..3dc470bc5 100644 --- a/es-app/src/PlatformId.h +++ b/es-app/src/PlatformId.h @@ -127,6 +127,7 @@ namespace PlatformIds GAMEENGINE_Z_MACHINE, SINCLAIR_ZX81_SINCLAR, SINCLAIR_ZX_SPECTRUM, + SWITCH, PLATFORM_IGNORE, // Do not allow scraping for this system. PLATFORM_COUNT diff --git a/es-app/src/scrapers/ScreenScraper.cpp b/es-app/src/scrapers/ScreenScraper.cpp index b8dbfc493..ed171a39c 100644 --- a/es-app/src/scrapers/ScreenScraper.cpp +++ b/es-app/src/scrapers/ScreenScraper.cpp @@ -107,6 +107,7 @@ const std::map screenscraper_platformid_map { { SONY_PLAYSTATION_PORTABLE, 61 }, { SAMCOUPE, 213 }, { SUPER_NINTENDO, 4 }, + { SWITCH, 225 }, { NEC_SUPERGRAFX, 105 }, { GAMEENGINE_TIC80, 222 }, { NEC_PC_8800, 221}, diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index 018b3ee26..f6a4c5e96 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -1045,6 +1045,15 @@ supergrafx supergrafx + + switch + Nintendo SWITCH + %ROMPATH%/switch + .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI + PLACEHOLDER %ROM% + switch + switch + tanodragon Tano Dragon diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 97fb791ea..0462c4b88 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -1045,6 +1045,15 @@ supergrafx supergrafx + + switch + Nintendo SWITCH + %ROMPATH%/switch + .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI + /opt/yuzu/yuzu.AppImage %ROM% + switch + switch + tanodragon Tano Dragon diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index 82eb78c30..fdba569d4 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -1045,6 +1045,15 @@ supergrafx supergrafx + + switch + Nintendo SWITCH + %ROMPATH%/switch + .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI + PLACEHOLDER %ROM% + switch + switch + tanodragon Tano Dragon From f25980f43bd41c84499afa3b9c73a02da6171c6a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 23 Jun 2021 17:49:47 +0200 Subject: [PATCH 2/6] Fixed an issue where the home directory was not expanded for the staticpath find rule. --- es-app/src/FileData.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 32d9e9cc3..a67e54f63 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1143,6 +1143,10 @@ std::string FileData::findEmulatorPath(std::string& command) } for (std::string path : emulatorStaticPaths) { + path = Utils::FileSystem::expandHomePath(path); + #if defined(_WIN64) + path = Utils::String::replace(path, "/", "\\"); + #endif if (Utils::FileSystem::isRegularFile(path) || Utils::FileSystem::isSymlink(path)) { command.replace(0, endPos + 1, path); From 02832b7bd6db29f29610dfeb183495d8feafa933 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 23 Jun 2021 17:52:33 +0200 Subject: [PATCH 3/6] Fixed an issue with the PlatformId for Nintendo Switch. --- es-app/src/PlatformId.cpp | 2 +- es-app/src/PlatformId.h | 2 +- es-app/src/scrapers/ScreenScraper.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/es-app/src/PlatformId.cpp b/es-app/src/PlatformId.cpp index 3b32ddc0e..a10aa4971 100644 --- a/es-app/src/PlatformId.cpp +++ b/es-app/src/PlatformId.cpp @@ -109,7 +109,7 @@ namespace PlatformIds "stratagus", // Stratagus game engine "sufami", // Bandai SuFami Turbo "supergrafx", // NEC SuperGrafx - "switch", // Nintendo SWITCH + "switch", // Nintendo Switch "ti99", // Texas Instruments TI-99 "tic80", // TIC-80 game engine "trs-80", // Tandy TRS-80 diff --git a/es-app/src/PlatformId.h b/es-app/src/PlatformId.h index 3dc470bc5..e8be86f4e 100644 --- a/es-app/src/PlatformId.h +++ b/es-app/src/PlatformId.h @@ -109,6 +109,7 @@ namespace PlatformIds GAMEENGINE_STRATAGUS, BANDAI_SUFAMI_TURBO, NEC_SUPERGRAFX, + NINTENDO_SWITCH, TEXAS_INSTRUMENTS_TI99, GAMEENGINE_TIC80, TANDY_TRS80, @@ -127,7 +128,6 @@ namespace PlatformIds GAMEENGINE_Z_MACHINE, SINCLAIR_ZX81_SINCLAR, SINCLAIR_ZX_SPECTRUM, - SWITCH, PLATFORM_IGNORE, // Do not allow scraping for this system. PLATFORM_COUNT diff --git a/es-app/src/scrapers/ScreenScraper.cpp b/es-app/src/scrapers/ScreenScraper.cpp index ed171a39c..01d38b4ff 100644 --- a/es-app/src/scrapers/ScreenScraper.cpp +++ b/es-app/src/scrapers/ScreenScraper.cpp @@ -80,6 +80,7 @@ const std::map screenscraper_platformid_map { { NINTENDO_GAME_AND_WATCH, 52 }, { NINTENDO_POKEMON_MINI, 211 }, { NINTENDO_SATELLAVIEW, 107 }, + { NINTENDO_SWITCH, 225 }, { BANDAI_SUFAMI_TURBO, 108 }, { DOS, 135 }, { PC, 135 }, @@ -107,7 +108,6 @@ const std::map screenscraper_platformid_map { { SONY_PLAYSTATION_PORTABLE, 61 }, { SAMCOUPE, 213 }, { SUPER_NINTENDO, 4 }, - { SWITCH, 225 }, { NEC_SUPERGRAFX, 105 }, { GAMEENGINE_TIC80, 222 }, { NEC_PC_8800, 221}, From ca2ab8df196a1d4a8995a13de8448fda355a2e68 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 23 Jun 2021 17:54:07 +0200 Subject: [PATCH 4/6] Added the Yuzu emulator to the find rules for Unix and Windows. Also added better RetroArch detection on Linux. --- resources/systems/unix/es_find_rules.xml | 23 +++++++++++++++++++-- resources/systems/windows/es_find_rules.xml | 9 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/resources/systems/unix/es_find_rules.xml b/resources/systems/unix/es_find_rules.xml index 0401d373b..83d7c11a0 100644 --- a/resources/systems/unix/es_find_rules.xml +++ b/resources/systems/unix/es_find_rules.xml @@ -4,19 +4,38 @@ retroarch + org.libretro.RetroArch + RetroArch-Linux-x86_64.AppImage /var/lib/flatpak/exports/bin/org.libretro.RetroArch + ~/Applications/RetroArch-Linux-x86_64.AppImage + ~/.local/bin/RetroArch-Linux-x86_64.AppImage + ~/bin/RetroArch-Linux-x86_64.AppImage + + + + + + yuzu + org.yuzu_emu.yuzu + yuzu.AppImage + + + /var/lib/flatpak/exports/bin/org.yuzu_emu.yuzu + ~/Applications/yuzu.AppImage + ~/.local/bin/yuzu.AppImage + ~/bin/yuzu.AppImage - - ~/.config/retroarch/cores ~/snap/retroarch/current/.config/retroarch/cores ~/.var/app/org.libretro.RetroArch/config/retroarch/cores + + ~/.config/retroarch/cores /usr/lib/x86_64-linux-gnu/libretro diff --git a/resources/systems/windows/es_find_rules.xml b/resources/systems/windows/es_find_rules.xml index 88219f349..b3f6dc384 100644 --- a/resources/systems/windows/es_find_rules.xml +++ b/resources/systems/windows/es_find_rules.xml @@ -18,6 +18,15 @@ %ESPATH%\..\RetroArch\retroarch.exe + + + + yuzu.exe + + + ~\AppData\Local\yuzu\yuzu-windows-msvc\yuzu.exe + + %EMUPATH%\cores From 2c784ca238ec1abaa0d578922c75cc758c44f7b0 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 23 Jun 2021 17:55:26 +0200 Subject: [PATCH 5/6] Some adjustments to the configuration for the Nintendo Switch system. --- resources/systems/macos/es_systems.xml | 4 ++-- resources/systems/unix/es_systems.xml | 6 +++--- resources/systems/windows/es_systems.xml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/systems/macos/es_systems.xml b/resources/systems/macos/es_systems.xml index f6a4c5e96..acfabaa6a 100644 --- a/resources/systems/macos/es_systems.xml +++ b/resources/systems/macos/es_systems.xml @@ -1047,9 +1047,9 @@ switch - Nintendo SWITCH + Nintendo Switch %ROMPATH%/switch - .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI + .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP PLACEHOLDER %ROM% switch switch diff --git a/resources/systems/unix/es_systems.xml b/resources/systems/unix/es_systems.xml index 0462c4b88..38f10b781 100644 --- a/resources/systems/unix/es_systems.xml +++ b/resources/systems/unix/es_systems.xml @@ -1047,10 +1047,10 @@ switch - Nintendo SWITCH + Nintendo Switch %ROMPATH%/switch - .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI - /opt/yuzu/yuzu.AppImage %ROM% + .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP + %EMULATOR_YUZU% %ROM% switch switch diff --git a/resources/systems/windows/es_systems.xml b/resources/systems/windows/es_systems.xml index fdba569d4..229b919c7 100644 --- a/resources/systems/windows/es_systems.xml +++ b/resources/systems/windows/es_systems.xml @@ -1047,10 +1047,10 @@ switch - Nintendo SWITCH - %ROMPATH%/switch - .nsp .NSP .zip .ZIP .7z .nso .NSO .nro .NRO .nca .NCA .xci .XCI - PLACEHOLDER %ROM% + Nintendo Switch + %ROMPATH%\switch + .nca .NCA .nro .NRO .nso .NSO .nsp .NSP .xci .XCI .7z .7Z .zip .ZIP + %EMULATOR_YUZU% %ROM% switch switch From 8109b4b1a7a8b1dc32c04cf7293371918cf38847 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 23 Jun 2021 17:56:26 +0200 Subject: [PATCH 6/6] Added a rbsimple-DE theme for Nintendo Switch. --- themes/rbsimple-DE/switch/colors.xml | 18 +++ themes/rbsimple-DE/switch/images/console.svg | 3 + .../rbsimple-DE/switch/images/consolegame.svg | 3 + .../rbsimple-DE/switch/images/controller.svg | 3 + themes/rbsimple-DE/switch/images/logo.svg | 140 ++++++++++++++++++ themes/rbsimple-DE/switch/systeminfo.xml | 30 ++++ themes/rbsimple-DE/switch/theme.xml | 28 ++++ 7 files changed, 225 insertions(+) create mode 100644 themes/rbsimple-DE/switch/colors.xml create mode 100644 themes/rbsimple-DE/switch/images/console.svg create mode 100644 themes/rbsimple-DE/switch/images/consolegame.svg create mode 100644 themes/rbsimple-DE/switch/images/controller.svg create mode 100644 themes/rbsimple-DE/switch/images/logo.svg create mode 100644 themes/rbsimple-DE/switch/systeminfo.xml create mode 100644 themes/rbsimple-DE/switch/theme.xml diff --git a/themes/rbsimple-DE/switch/colors.xml b/themes/rbsimple-DE/switch/colors.xml new file mode 100644 index 000000000..803b8344d --- /dev/null +++ b/themes/rbsimple-DE/switch/colors.xml @@ -0,0 +1,18 @@ + + 6 + + + + DA4A4B + + + 65BADE + + + 000000 + + + EBECEE + + + diff --git a/themes/rbsimple-DE/switch/images/console.svg b/themes/rbsimple-DE/switch/images/console.svg new file mode 100644 index 000000000..345a518f0 --- /dev/null +++ b/themes/rbsimple-DE/switch/images/console.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/rbsimple-DE/switch/images/consolegame.svg b/themes/rbsimple-DE/switch/images/consolegame.svg new file mode 100644 index 000000000..345a518f0 --- /dev/null +++ b/themes/rbsimple-DE/switch/images/consolegame.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/rbsimple-DE/switch/images/controller.svg b/themes/rbsimple-DE/switch/images/controller.svg new file mode 100644 index 000000000..345a518f0 --- /dev/null +++ b/themes/rbsimple-DE/switch/images/controller.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/rbsimple-DE/switch/images/logo.svg b/themes/rbsimple-DE/switch/images/logo.svg new file mode 100644 index 000000000..04414e24f --- /dev/null +++ b/themes/rbsimple-DE/switch/images/logo.svg @@ -0,0 +1,140 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/rbsimple-DE/switch/systeminfo.xml b/themes/rbsimple-DE/switch/systeminfo.xml new file mode 100644 index 000000000..700710504 --- /dev/null +++ b/themes/rbsimple-DE/switch/systeminfo.xml @@ -0,0 +1,30 @@ + + 6 + + + + Manufacturer : Nintendo + + + Year of Release : 2017 + + + Units sold : 84 million + + + Best-selling game : Mario Kart 8 Deluxe + + + CPU : ARM 4 Cortex-A57 cores @ 1.02 GHz + + + RAM : 4 GB LPDDR4 @ 1331/1600 MHz + + + Video : 256 Maxwell-based CUDA cores @ 307.2–768 MHz + + + Screen : 6.2-inch, 1280 × 720 LCD (237 ppi) + + + diff --git a/themes/rbsimple-DE/switch/theme.xml b/themes/rbsimple-DE/switch/theme.xml new file mode 100644 index 000000000..1ef216328 --- /dev/null +++ b/themes/rbsimple-DE/switch/theme.xml @@ -0,0 +1,28 @@ + + 6 + ./../theme.xml + ./colors.xml + ./systeminfo.xml + + + + ./images/controller.svg + + + + + + 262626 + 262626 + + + + + + ./images/logo.svg + + + ./images/consolegame.svg + + +