diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6c4a2a6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# The mod's scripts and command config files are parsed/executed by the +# console's BusyBox shell and this project's own line-based parsers, neither +# of which tolerate CRLF (a stray \r ends up embedded in paths/values, +# e.g. COMMAND_STR=sh %script_dir%/om_network\r causes "No such file"). +# Force LF regardless of platform checkout settings (core.autocrlf, etc.). +* text=auto eol=lf + +*.png binary +*.xz binary +*.hmod binary +*.ttf binary +mod/etc/options_menu/retroarch/scripts/RASettingsBackup binary diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0a209d9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build + +on: + push: + branches: ['**'] + tags: ['v*'] + pull_request: + +jobs: + hmod: + # Keep in sync with the vendor/hmod-build submodule tag. + uses: DefKorns/hmod-build/.github/workflows/hmod.yml@v1.5.0 + with: + release-name: Options Menu + docker: true + # the compat build relinks with its own rpath and adds a private libstdc++ + make: | + hmod + hmod FIX_LIBSTDCXX=1 + secrets: inherit + permissions: + contents: write diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..31482e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +*.o +.build-flags +src/cacert.pem +out/ +local/ +mod/bin/ +!mod/bin/standby +mod/etc/options_menu/lib/ +mod/etc/options_menu/optiond +mod/etc/options_menu/options +mod/etc/options_menu/mod_uninstall/mod_uninstall +mod/etc/options_menu/save_manager/save_manager +mod/etc/options_menu/scripts/ChangeCombo +mod/etc/options_menu/scripts/gen_splash +mod/etc/options_menu/scripts/downloader +mod/etc/options_menu/fonts/NotoSansJP-Latin-subset.ttf diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d3025d7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "hmod-build"] + path = vendor/hmod-build + url = https://github.com/DefKorns/hmod-build.git diff --git a/Makefile b/Makefile index f8586ae..178391a 100644 --- a/Makefile +++ b/Makefile @@ -1,43 +1,149 @@ -TARGET_NAME = options_deluxe +# FIX_LIBSTDCXX=1 builds the _compat variant: it ships a private libstdc++.so.6 +# via rpath, immune to other hmods replacing the system copy (~225KB more). +ifdef FIX_LIBSTDCXX +MOD_ID := options_menu_compat +MOD_NAME := Options Menu (compat) +VARIANT := compat +else +MOD_ID := options_menu +MOD_NAME := Options Menu +VARIANT := plain +endif +MOD_CREATOR := CompCom, DefKorns +MOD_CATEGORY := Options Menu +BINARIES := mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/etc/options_menu/save_manager/save_manager mod/bin/standby_watchdog mod/etc/options_menu/scripts/gen_splash mod/etc/options_menu/scripts/ChangeCombo mod/etc/options_menu/scripts/downloader + CXX = g++ STRIP = strip -CXXFLAGS = -std=c++11 -Os `sdl2-config --cflags` -LDLIBS = `sdl2-config --libs` -lpng -LDFLAGS = -SOURCES = src/main.cpp src/command.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/controller.cpp src/framework/powerwatch.cpp +ifdef CROSS_PREFIX +PKG_CONFIG_LIBDIR = /usr/lib/arm-linux-gnueabihf/pkgconfig +SDL_CFLAGS = -I/usr/include/arm-linux-gnueabihf $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --cflags sdl2 SDL2_ttf libpng) +SDL_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs sdl2 SDL2_ttf libpng) +PNG_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs libpng) +LDFLAGS = -Wl,--allow-shlib-undefined +VENDORED_LIBS = mod/etc/options_menu/lib/libSDL2_ttf-2.0.so.0 mod/etc/options_menu/lib/libfreetype.so.6 +ifdef FIX_LIBSTDCXX +VENDORED_LIBS += mod/etc/options_menu/lib/libstdc++.so.6 +STDCXX_RPATH = -Wl,-rpath,/etc/options_menu/lib +STDCXX_RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN/lib' +endif +else +SDL_CFLAGS = $(shell sdl2-config --cflags) $(shell pkg-config --cflags SDL2_ttf) +SDL_LIBS = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_ttf) -lpng +PNG_LIBS = -lpng +LDFLAGS = +VENDORED_LIBS = +endif +CXXFLAGS = -std=c++11 -Os $(SDL_CFLAGS) -DMOD_VERSION=\"v$(MOD_VER)\" +LDLIBS = $(SDL_LIBS) +SOURCES = src/main.cpp src/command.cpp src/localization.cpp src/framework/badge.cpp src/framework/dialog.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/controller.cpp src/framework/powerwatch.cpp src/framework/draw_helpers.cpp src/framework/utf8.cpp src/framework/font8x8_lookup.cpp src/framework/uitheme.cpp src/framework/list_jump.cpp OBJECTS = $(SOURCES:.cpp=.o) +ALL_OBJECTS = $(OBJECTS) src/daemon.o src/mod_uninstall.o src/save_manager.o src/standby_watchdog.o src/gen_splash.o src/change_combo.o + +MOD_DEPS := $(BINARIES) $(VENDORED_LIBS) +ifndef FIX_LIBSTDCXX +# a prior compat build leaves this behind in mod/ +MOD_DEPS += no-private-libstdcxx +endif + +# built into the toolchain image from Noto Sans JP (see its README), not tracked +FONT_LATIN := mod/etc/options_menu/fonts/NotoSansJP-Latin-subset.ttf +MOD_DEPS += $(FONT_LATIN) + +all: hmod + +compile: $(BINARIES) $(VENDORED_LIBS) -all: $(TARGET_NAME).hmod $(TARGET_NAME)_b_down.hmod +# relink everything when switching variant (different rpaths) or version (MOD_VERSION) +.build-flags: FORCE + @[ "$$(cat $@ 2>/dev/null)" = "$(VARIANT) $(MOD_VER)" ] || echo "$(VARIANT) $(MOD_VER)" > $@ -$(TARGET_NAME)_b_down.hmod: $(TARGET_NAME).hmod - cp button.cfg mod/etc/options_menu/ - cd mod/; tar -czvf "../$(TARGET_NAME)_b_down.hmod" * +$(ALL_OBJECTS): .build-flags -$(TARGET_NAME).hmod: mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/bin/standby_watchdog - $(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/options - $(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/optiond - $(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/mod_uninstall/mod_uninstall - $(CROSS_PREFIX)$(STRIP) mod/bin/standby_watchdog - rm -f mod/etc/options_menu/button.cfg - cd mod/; tar -czvf "../$(TARGET_NAME).hmod" * +no-private-libstdcxx: + rm -f mod/etc/options_menu/lib/libstdc++.so.6 +# SDL2_ttf/freetype aren't on the console's own rootfs; shipped as +# mod/etc/options_menu/lib/*.so and found via rpath instead. mod/etc/options_menu/options: $(OBJECTS) - $(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/options + $(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -Wl,-rpath,'$$ORIGIN/lib' -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + +mod/etc/options_menu/lib: + mkdir -p $@ + +# always copied, so a new image can't leave a stale font behind +$(FONT_LATIN): FORCE + cp /opt/options-menu/fonts/NotoSansJP-Latin-subset.ttf $@ + +# built from source in the toolchain image, copied in each build +mod/etc/options_menu/lib/libSDL2_ttf-2.0.so.0: | mod/etc/options_menu/lib + cp /usr/lib/arm-linux-gnueabihf/libSDL2_ttf-2.0.so.0 $@ + +mod/etc/options_menu/lib/libfreetype.so.6: | mod/etc/options_menu/lib + cp /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 $@ + +mod/etc/options_menu/lib/libstdc++.so.6: | mod/etc/options_menu/lib + cp $$($(CROSS_PREFIX)$(CXX) -print-file-name=libstdc++.so.6) $@ + $(CROSS_PREFIX)$(STRIP) --strip-unneeded $@ mod/etc/options_menu/optiond: src/daemon.o src/framework/controller.o - $(CROSS_PREFIX)$(CXX) $(LDFLAGS) src/daemon.o src/framework/controller.o -o mod/etc/options_menu/optiond + $(CROSS_PREFIX)$(CXX) $(LDFLAGS) $^ $(STDCXX_RPATH_ORIGIN) -o $@ + $(CROSS_PREFIX)$(STRIP) $@ -mod/etc/options_menu/mod_uninstall/mod_uninstall: src/mod_uninstall.o - $(CROSS_PREFIX)$(CXX) src/mod_uninstall.o src/framework/*.o $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/mod_uninstall/mod_uninstall +mod/etc/options_menu/mod_uninstall/mod_uninstall: src/mod_uninstall.o src/localization.o $(filter src/framework/%,$(OBJECTS)) + $(CROSS_PREFIX)$(CXX) $^ $(LDLIBS) $(LDFLAGS) -Wl,-rpath,/etc/options_menu/lib -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + upx --lzma $@ + +mod/etc/options_menu/save_manager/save_manager: src/save_manager.o src/localization.o $(filter src/framework/%,$(OBJECTS)) + $(CROSS_PREFIX)$(CXX) $^ $(LDLIBS) $(LDFLAGS) -Wl,-rpath,/etc/options_menu/lib -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + upx --lzma $@ mod/bin/standby_watchdog: src/standby_watchdog.o src/framework/controller.o src/framework/powerwatch.o - $(CROSS_PREFIX)$(CXX) src/standby_watchdog.o src/framework/controller.o src/framework/powerwatch.o -o mod/bin/standby_watchdog + $(CROSS_PREFIX)$(CXX) $(LDFLAGS) $^ $(STDCXX_RPATH) -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + upx --lzma $@ + +mod/etc/options_menu/scripts/gen_splash: src/gen_splash.o src/localization.o src/framework/utf8.o src/framework/font8x8_lookup.o src/framework/uitheme.o + $(CROSS_PREFIX)$(CXX) $^ $(PNG_LIBS) $(LDFLAGS) $(STDCXX_RPATH) -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + +mod/etc/options_menu/scripts/ChangeCombo: src/change_combo.o src/framework/controller.o src/localization.o + $(CROSS_PREFIX)$(CXX) $^ $(LDFLAGS) $(STDCXX_RPATH) -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + upx --lzma $@ + +# plain C against the toolchain's static curl: no libstdc++, same in both variants +CC = gcc +CURL_PREFIX = /opt/curl-static +CFLAGS = -std=gnu99 -O2 -Wall -I$(CURL_PREFIX)/include +CURL_LDLIBS = $(shell $(CURL_PREFIX)/bin/curl-config --static-libs) + +src/cacert.pem: + curl -fL -o $@ https://curl.se/ca/cacert.pem + +# built from inside src/ so the symbols are _binary_cacert_pem_* +src/ca_bundle.o: src/cacert.pem + cd src && $(CROSS_PREFIX)ld -r -b binary -o ca_bundle.o cacert.pem + +mod/etc/options_menu/scripts/downloader: src/downloader.o src/ca_bundle.o + $(CROSS_PREFIX)$(CC) $^ $(CURL_LDLIBS) -o $@ + $(CROSS_PREFIX)$(STRIP) $@ + upx --lzma $@ + +%.o: %.c + $(CROSS_PREFIX)$(CC) $(CFLAGS) -c $< -o $@ %.o: %.cpp $(CROSS_PREFIX)$(CXX) $(CXXFLAGS) -c $< -o $@ clean: - find -name "*.o" -type f -delete - rm -f mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/bin/standby_watchdog mod/etc/options_menu/button.cfg $(TARGET_NAME).hmod $(TARGET_NAME)_b_down.hmod + find . -name "*.o" -type f -not -path "./vendor/*" -delete + rm -f $(BINARIES) .build-flags + rm -rf mod/etc/options_menu/lib out/ + +include vendor/hmod-build/hmod.mk -.PHONY: clean +.PHONY: all compile clean no-private-libstdcxx diff --git a/README.md b/README.md index 6e938ad..403763b 100644 --- a/README.md +++ b/README.md @@ -1,197 +1,274 @@ -# Options Menu Documentation -## What is the options menu? -The Options Menu is a custom menu that can be launched via a controller button combo at any point during the console’s operation. It features a variety of commands to enhance the user experience of the console. +# Options Menu -The options menu is easily extendible, allowing for other developers to add their own custom commands to the menu via hmods. +[![Build](https://github.com/DefKorns/OptionsMenu/actions/workflows/build.yml/badge.svg)](https://github.com/DefKorns/OptionsMenu/actions/workflows/build.yml) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE) -## Options Explained -Below is a detailed guide on what specific options actually do and what their purpose is. -## Default Options +A menu you can open at any moment on your NES, SNES, Famicom or Super Famicom Classic — on the Home screen or in the middle of a game — to power off, back up your saves and settings, manage Wi-Fi and RetroArch, tweak the controllers and more. Other hmods can add their own entries and screens to it. -#### Hibernate/Standby -This option launches Swingflip’s power menu. The power menu will provide the following options: +This is my continuation of [CompCom's Options Menu](https://github.com/CompCom/OptionsMenu) (last release 1.3.4, 2019). Version 2 is a rewrite of the interface and a large part of the scripts: - - **Hibernate** - Put the console in a low power state, turn the screen off and when woken up the console will resume whatever you were doing before you put the console in hibernate. - - **Standby** - Put the console in lowest power state possible, turn the screen off and when woken up the console will reboot and start the console from a fresh boot. +- **New look:** smooth TTF fonts, preview icons, toggle switches, submenu markers and button hints, with colors you can change (`theme.cfg`) +- **9 languages:** English, Français, Deutsch, Español, Italiano, Nederlands, Português, Русский, 日本語 +- **New menus:** Controller (autofire, Home combo, Start on the 2nd Famicom controller), Diagnostics, Saved Games, Wi-Fi backups, epilepsy protection +- **Safer behaviour:** entries that need a USB/SD drive or a missing component are hidden instead of failing, and lists such as Wi-Fi backups let you delete entries +- **NES/Famicom friendly:** the opening combo is picked automatically for consoles without shoulder buttons +- A **compat** build for setups where another hmod replaces the console's `libstdc++` -> **Note:** Basically... Standby saves more energy however when you remotely wake the console it will start up as a fresh boot where hibernate will resume where ever you left off when you put it in to hibernate. +## Install -To wake the console when in hibernate or standby please refer to the below table: +**From my Mod Hub (recommended):** in hakchi open **Manage repositories**, add `https://defkorns.github.io/hakchi-repo/` and install **Options Menu** from it. Updates show up there automatically. -|Button combination|Hibernate Mode |Standby Mode | -|------------------|---------------|-----------------| -| L + R + UP |Resume Console |Reboot Console | -| L + R + DOWN |Reboot Console |Shutdown Console | +**By hand:** download `options_menu.hmod` from [Releases](https://github.com/DefKorns/OptionsMenu/releases), put it in hakchi's `user_mods` folder (or drag and drop it onto the hakchi window), then install it from hakchi (**Modules → Install extra modules**). -#### Shutdown Device -This option will safely shut down the console.\* +Installing it replaces CompCom's Options Menu (`options_deluxe`) and the old Hibernate mod, and keeps your button combo, language and Home combo settings. +> **Which build?** Use `options_menu`. Pick `options_menu_compat` only if you have an hmod that replaces the console's `libstdc++` (e.g. RetroArch 1.8.4 Xtreme SC) and the menu doesn't open with the normal build. Installing one removes the other. -#### Restart Device -This option will safely restart the console.\* +## Opening it -#### Retroarch Options -This option will open a menu for managing retroarch configurations (see below). +Hold **L + R** for about a second. On consoles without shoulder buttons (NES Classic, Famicom Classic, Famicom Shonen Jump), hold **B + Down** instead. You can change the combo in **Advanced Options → Controller**. -#### Advanced Options -This option will open a menu containing more advanced features (see below). +| Button | Action | +| --- | --- | +| Up / Down | Move (hold to repeat) | +| A or Start | Run the entry or open its submenu (marked **›**) | +| B | Back; closes the menu on the main screen | +| B (hold ~1 second) | Delete the selected entry, on lists that allow it — confirm with A | +The footer always shows the buttons for the current screen. ->\***Note:** You should **NOT** turn off your console via the options/power menu while running retroarch. Ensure you properly exit retroarch before shutting down/restarting or you may experience a loss of saves. +## Menus +### Main menu +| Entry | What it does | +| --- | --- | +| Hibernate/Standby | Opens Swingflip's power menu (see below) | +| Shutdown Device | Safely turns the console off\* | +| Reboot Device | Safely restarts the console\* | +| RetroArch › | RetroArch settings, backups and BIOS files. Shown when RetroArch is installed | +| Network › | IP address, Wi-Fi scan and Wi-Fi config backups | +| Save Manager › | Back up, restore and clean up your saves. Needs a USB/SD drive | +| Language › | Menu language; the menu restarts in the new language | +| Advanced Options › | Controller, diagnostics and system tools | -## Retroarch Options -#### Restore Default Settings (All) -Replaces your current retroarch config files with the default files included in the module. This option deletes all game/core overrides and remap files. -#### Restore Default Settings -Replaces your current retroarch config files with the default files included in the module. Does not erase your game/core overrides and remap files. -#### Backup Settings to NAND -Copies your current retroarch config files to a backup file located at /etc/ra_backup/ -#### Backup Settings to USB (usb only) -Copies your current retroarch config files to a backup file located at USB:/data/ra_backup/ -#### Restore Settings from NAND -Overwrites your retroarch configs with the backups located at /etc/ra_backup/ -#### Restore Settings from USB (usb only) -Overwrites your retroarch configs with the backups located at USB:/data/ra_backup/ -#### Delete all settings backups -Removes all backup files on both NAND and USB. -#### Transfer BIOS file(s) -Copies bios files to USB:/data/ra_bios. Restores bios files from this folder to NAND. -#### Delete game and core overrides -Removes only the game and core overrides. Does not modify the Retroarch settings and remap files. -#### Delete remap files -Removes only the remap files. Does not modify the Retroarch settings, game and core overrides. -#### Delete BIOS file(s) from NAND -Removes all bios files from NAND only. -#### Toggle RA and Canoe load screens -Toggle the RetroArch and Canoe loading screens on or off. +\*Don't shut down or restart from the menu while RetroArch is running: exit RetroArch first, or you may lose saves. -## Advanced Options -#### Module Uninstaller -This option launches the module uninstaller program. This program allows you to remove modules from your device. Press the up and down buttons to select a module. Press A to add a module to the uninstall list. Press B to remove a module from the uninstall list. Pressing start will exit if no modules are added to the uninstall list. If there are modules on the uninstall this you will be prompted to ensure you want to remove them press START+SELECT to remove selected modules or B to cancel. +**Hibernate** turns the screen off and keeps everything in memory, so waking up resumes exactly where you were. **Standby** uses even less power, but waking up boots the console from scratch. To wake it: ->**Caution:** The uninstaller will list all modules on the device including the default hakchi modules. Only delete modules you have added yourself. Deleting the default hakchi modules can have unintended effects on your console. +| Combo | From Hibernate | From Standby | +| --- | --- | --- | +| L + R + Up | Resume | Reboot | +| L + R + Down | Reboot | Shut down | +### RetroArch -#### Display Temp -This option will display the current temperature of the CPU. +Works with RetroArch Neo and with the `_km` RetroArch Xtreme (Ozone). -#### Run Top -This option runs and displays the output of the top binary. This shows the current CPU, memory usage and list of running processes. +| Entry | What it does | +| --- | --- | +| Restore Default Settings (All) | Puts back the default RetroArch config **and** deletes every game/core override and remap | +| Restore Default Settings | Puts back the default RetroArch config, keeping overrides and remaps | +| Backup Settings to NAND / USB | Copies your RetroArch config to `/etc/ra_backup/` or `USB:/data/ra_backup/` | +| Restore Settings from NAND / USB | Restores the config from those backups | +| Transfer BIOS file(s) | Copies BIOS files to `USB:/data/ra_bios` and restores them from there to NAND | +| Delete all settings backups | Removes the NAND and USB backups | +| Delete game and core overrides | Removes only the overrides | +| Delete remap files | Removes only the remaps | +| Delete BIOS file(s) from NAND | Removes the BIOS files from NAND | +| Toggle RA and Canoe load screens | Turns the RetroArch and Canoe loading screens on or off | -#### Benchmark Tool -This option will go through and echo out useful information regarding your console. -It will also include information on your: +The USB entries only show up with a USB/SD drive connected. - - Current disk mounting information - - CPU analysis information - - RAM analysis information +### Network -> **Note:** The information is displayed in 4 parts and has a 2 second wait between each part +| Entry | What it does | +| --- | --- | +| Display IP Address | Shows your local and public IP | +| Reconnect | Restarts the network when you're not connected | +| Search for SSIDs | Lists the Wi-Fi networks in range | +| Backup Wifi Config (NAND / USB) | Saves your `wpa_supplicant.conf` to `/etc/wifi_backup/` or `/media/data/wifi_backup/` | +| Restore Wifi Config (NAND / USB) › | Lists your backups; pick one to restore it and reconnect, or hold **B** to delete it | -#### Dump File Structure (to USB) -This option will map and echo out your complete file and directory structure for your console and any mounted disks. The log file will be saved to your mounted USB/SD card at: +Restore entries only show up when there's a backup to restore. - /media/data/log/Hakchi_file_structure.log +### Save Manager - > **Note:** If these folders do not exist, they will be created when the option is ran. +Needs a USB/SD drive with your saves on it. One screen lists the actions on the left; the right panel explains the selected one and shows how many saves are on the console, in the USB backup, left over from removed games and moved aside. Every action asks for confirmation (**Start + Select**). -The log file will also include information on: +| Action | What it does | +| --- | --- | +| Backup Saved Games to USB | Mirrors your saves folder to `/media/data/saves_backup`. Saves you deleted since the last backup are removed from it too; system folders (`FOLDER`, `hakchi`, `home-menu`, `mcp-state`) are skipped | +| Restore Saved Games from USB › | Lists the saves in the backup (none marked); mark the ones you want back with **A** and press **Start**. They overwrite saves with the same name and leave the others alone. **Select all** restores the whole backup | +| Clean Saves of Removed Games › | Lists the save folders of games that are no longer in any menu (all marked; **A** unmarks) and moves the marked ones to `/media/data/deleted_games_saves`. Menu folders (`CLV-S-*`) are never touched | +| Restore Saves of Removed Games › | Lists what was moved aside; mark the ones you want back with **A** and press **Start**. A save already on the console is never overwritten | - - Symbolic Links (Overmounts) - - File and directory permissions +In the long lists (here and in the Module Uninstaller), **Left**/**Right** page up and down on a tap and walk the list letter by letter while held; **L**/**R** jump a letter at a time. -#### Toggle Write Access on USB -This option will toggle read write access on your USB device. By default, if you don't have a saves folder located on your USB/SD, write access is disabled. If you wish to write logs or use your external mounted storage and **not** use external saves... This is the toggle for you. +#### Game names - > **Note:** If you already use external saves. You don't need to use this toggle. +The two "Removed Games" lists show the names of the removed games instead of their codes (`CLV-H-ABCDE`). Every time the console starts, it remembers the names of the games installed at that moment in `game_names.txt` in your saves folder, and a name stays there after its game is removed. The backup keeps the file with your saves, and a restore adds its names without replacing newer ones. Saves without a known name keep showing their code. Getting the names never changes or moves a save. -#### RetroArch Debugger (USB logs) -This option will run your locally installed RetroArch in full verbose mode. It will also copy the config files for your RetroArch and save them to: +Games removed before this version was installed were never seen on the console, so their names can only come from your Hakchi CE library. The console can't read your PC, so the PC sends them. With the console on and reachable by Hakchi CE (USB or Wi-Fi), run [`pc/push_game_names.ps1`](pc/push_game_names.ps1) from a PowerShell window: - /media/data/log/RetroArchConfig +```powershell +.\push_game_names.ps1 --ip 192.168.1.50 +``` -The full verbose log will be located here: +- `--ip`: the console's IP address, shown in Hakchi CE or in Options Menu › Network › Display IP Address. Defaults to `169.254.13.37`, the console connected over USB. +- `--hakchi-path`: the Hakchi CE folder that has the `games` folders. Usually not needed: the script looks in its own folder first, so copying it next to `hakchi.exe` (portable Hakchi CE) is enough. It also finds the library of an open Hakchi CE, and `Documents\hakchi2` for non-portable installs. - /media/data/log/Hakchi_retroarch_debug.log +If Windows refuses to run scripts, use `powershell -ExecutionPolicy Bypass -File push_game_names.ps1 --ip 192.168.1.50`. +The names it sends are added to the ones already on the console. -> **Note:** Depending on what you are trying to do, you might have limited functionality within RetroArch when running it via the debugger. This app is primarily designed to debug cores, custom configs and themes. +### Advanced Options -#### Change Options Button Combo -This option will allow you to change the button combo used to launch the options menu. You will need to restart the console after setting a new combo. +| Entry | What it does | +| --- | --- | +| Controller › | See below | +| Diagnostics › | See below | +| Toggle Write Access on USB | Makes the USB/SD drive writable even if you don't keep your saves on it (it's read-only otherwise). Not needed if you use USB saves | +| Epilepsy protection (NES) | The console's own dimming of fast flashes in NES/Famicom games. On by default; turn it off to see games exactly as they were. NES/Famicom only | +| Clear Cache | Asks the kernel to free cached memory. Rarely needed | +| Module Uninstaller | Remove installed hmods from the console (see below) | -#### Clear Cache -This option will force the kernel to clear the page cache and free up unused memory. You should not need to call this as the system should manage memory fine on it's own. +**Module Uninstaller:** installed mods are on the left, the ones queued for removal on the right. **A** queues the selected mod, **B** takes the last one off the queue, **Start** exits — or, with mods queued, asks you to press **Start + Select** to remove them (**B** cancels). It lists hakchi's own modules too: only remove mods you installed yourself. -## Network Options -#### Display IP Address -This option will display both your public and internal ip addresses if you have a network adapter connected to your device. +#### Controller -#### Reconnect -This option will restart the network service on your device if you are not connected to the internet already. +| Entry | What it does | +| --- | --- | +| Change Options Button Combo | Press the buttons you want to open the menu with. Restart the console afterwards. Overrides the automatic L+R / B+Down choice | +| Autofire | Turbo for the controllers, with **Fast / Normal / Slow** speed | +| Use X/Y as turbo A/B | X and Y act as turbo A and B | +| Home menu button combo | Turns off the combo that sends you from a game back to the Home menu, so you can't press it by accident | +| Start on 2nd controller | Famicom only: the 2nd Famicom controller has no Start button; this gives it one | -#### Search for SSIDs -This option will scan and display a list of available SSIDs. +Changes apply right away, without restarting. -## Developer Information -### General Information -The options mod is comprised of two executables. The `optiond` executable acts as a watchdog that waits for the controller combo to be held down and executes the `options` executable. All files are stored with the `/etc/options_menu/` folder. There are two important folders for the usage of the options menu these are the commands and scripts folders. The commands folder stores the options to be displayed on the menu. The scripts folder contains scripts executed by these commands. -### Command Line Arguments ->Note: The options menu should always be called with the full file path. ->/etc/options_menu/options +#### Diagnostics -| Argument | Description | -|----------|-------------| -|--commandPath <Command Folder Path>|Set a custom command folder.| -|--scriptPath <Script Folder Path>|Set custom script folder.| -|--title <Window Title>|Set custom title for options menu screen.| +| Entry | What it does | +| --- | --- | +| System Information | Console type and region, hakchi/kernel/boot versions, firmware, free space on NAND and USB/SD, size of your saves | +| Display Temp | CPU temperature | +| Run Top | CPU and memory use and the running processes | +| Benchmark Tool | Mounts, CPU and RAM information, in 4 parts | +| RetroArch Debugger (USB logs) | Runs RetroArch in verbose mode and saves its config and log to `/media/data/log/` | +| Dump File Structure (to USB) | Writes every file and folder, with permissions and links, to `/media/data/log/Hakchi_file_structure.log` | +| Save kernel log (to USB) | Writes `dmesg` to `/media/data/log/dmesg.log` | + +The USB entries only show up with a USB/SD drive connected. They're the logs to attach when reporting a problem. + +## For mod developers + +Your hmod can add entries and whole screens to the menu. -### Command Files -Command Files must be named in the following format: +### How it works + +`optiond` waits for the button combo and launches `options`. Everything lives in `/etc/options_menu/`: each screen is a `commands/` folder with one file per entry, and the scripts they run go in a `scripts/` folder. + +`options` takes these arguments (always call it by its full path, `/etc/options_menu/options`): + +| Argument | Description | +| --- | --- | +| `--commandPath ` | Commands folder for this screen | +| `--scriptPath ` | Scripts folder, available as `%script_dir%` | +| `--title ` | Screen title (a translation key or plain text) | - cxxxx_CommandName +### Command files -Command Files should contain the following fields: +One file per entry, named `cNNNN_Name`; entries are sorted by name. Each line is `FIELD=value`, no spaces around `=`, case sensitive. | Field | Description | -|-------|-------------| -|COMMAND_NAME|Display Name of command.| -|COMMAND_TYPE|Specifies whether command is run inside the options menu pseudo terminal (internally) or run externally. Possible values `INTERNAL` or `EXTERNAL`| -|RESTART_UI|Specifies if the paused UI should be resumed after running command (external commands only). If you set this value to `FALSE` you must manually resume the UI using `/bin/sh /etc/options_menu/script/ResumeUI.sh` after executing your code.| -|COMMAND_STR|Command string to be executed. Commands must be single line only. To execute multi-line scripts use a script file.| -|PREVIEW_IMAGE|Specifies the path to a thumbnail/icon to the oprion menu.| -|PREVIEW_IMAGE_X|Position the thumbnail/icon on the X axys| -|PREVIEW_IMAGE_Y|Position the thumbnail/icon on the Y axys.| -|PREVIEW_IMAGE_WIDTH|Sets the width for the thumbnail/icon.| -|PREVIEW_IMAGE_HEIGHT|Sets the height for the thumbnail/icon.| - ->Note: Fields and values are case sensitive. Values should be separated from fields using '=' without spaces. - -#### Command String Variables -The command string supports the use of the following variables: - -|Variable | Description| -|---------|------------| -|%options_path% | Path to the folder containing the options binary.| -|%script_dir% | Path to the current script folder set in the options binary.| - -### Compiling Options Menu -The options menu can be compiled using the makefile provided. To compile the options menu you must have the SDL2 and libpng libraries as well as GNU Make installed. To cross-compile the options menu call `make` with the `CROSS_PREFIX` set to the prefix of your cross-compiler toolchain eg. `make CROSS_PREFIX=arm-linux-gnueabihf-`. - -## Contributions and Thanks -### Contributions -- Hibernate Mod and Hakchi-Option-Pack scripts courtesy of Swingflip -- Retroarch Configuration scripts courtesy of BsLeNuL -- Thanks to ThanosRD for assistance with UI Layout/Design +| --- | --- | +| `COMMAND_NAME` | Label shown, or a translation key | +| `COMMAND_TYPE` | `INTERNAL` shows the command's output in the menu's console; `EXTERNAL` runs it with the menu paused | +| `COMMAND_STR` | Single-line command to run. Use a script for anything longer | +| `RESTART_UI` | External commands only. `FALSE` leaves the UI paused; resume it yourself with `/bin/sh /etc/options_menu/scripts/ResumeUI.sh` | +| `IGNORE_INTERRUPT` | `TRUE`: B doesn't interrupt an internal command while it runs | +| `USB_ONLY` | `TRUE`: only shown when a USB/SD drive is mounted | +| `ENABLE_IF` | Shell condition; the entry is only shown if it exits 0. `/etc/preinit` is sourced and `script_init` called first, so `$rootfs`, `$mountpoint`, `$sftype`... work, e.g. `ENABLE_IF=[ -d "$rootfs/etc/wifi_backup" ]` | +| `SUBMENU` | `TRUE`: draws **›**, for entries that open another screen. Ignored on toggles | +| `CHILD` | `TRUE`: indents the entry under the one above it | +| `STATE_STR` | Command whose first output line is the entry's state (`1`/`on`/`y`/`yes`/`true` = on). Turns the entry into a toggle switch; `COMMAND_STR` still does the toggling | +| `DELETE_STR` | Command run when the user holds B on the entry and confirms — makes list entries deletable | +| `DELETE_CONFIRM_KEY` | Translation key for that confirmation; defaults to a generic "Delete this item?" | +| `PREVIEW_IMAGE` | PNG shown in the detail panel, scaled to fit | + +`COMMAND_STR`, `DELETE_STR` and `STATE_STR` can use `%options_path%` (the folder with the `options` binary) and `%script_dir%` (the current `--scriptPath`). + +The shared framework also reads a few grid-only fields (`PREVIEW_NEAREST`, `PREVIEW_SQUARE`, `PREVIEW_GRID_COLS`, `PREVIEW_FIT_CONTAIN`, `PREVIEW_HIDE_LABEL`). The menu itself always shows a list; they're for apps built on the shared framework that use a grid layout. `PREVIEW_IMAGE_X/Y/WIDTH/HEIGHT` from the original format are accepted and ignored. + +### Translations + +Strings live in `/etc/options_menu/language/.lang` as `KEY=Text`; the chosen language is in `/etc/options_menu/language.cfg`. `en-US` is always loaded first, so missing keys fall back to English. + +Your hmod can ship its own strings in `/etc/options_menu//lang/.lang`. Every such folder with an `en-US.lang` is merged in at startup. + +### Colors + +`/etc/options_menu/theme.cfg` holds the UI colors, one `Key=R,G,B` per line (0–255, `#` for comments). It's read once at startup: reopen the menu to see a change. A missing file, line or key uses the default. + +| Key | Default | Used for | +| --- | --- | --- | +| `Bg` | `12,15,22` | Background | +| `Border` | `42,44,51` | Dividers, box outlines, unselected tile border | +| `Accent` | `240,196,61` | Selected entry border, section title bar, **›**, highlights | +| `SelectedRowBg` | `20,22,26` | Selected entry and tile fill. If only `Bg` is set, it follows `Bg` (slightly lighter) so rounded corners don't show the old color | +| `Text` | `255,255,255` | Titles, entry labels, button hints | +| `TextDim` | `141,141,147` | Secondary text, e.g. column headers | +| `ScrollArrow` | follows `Text` | List scroll arrows | +| `BadgeLetter` | `28,22,22` | Letter inside the button-hint badges | +| `BadgeA` / `BadgeADark` | `76,175,110` / `46,107,66` | A badge (Select): fill / rim | +| `BadgeB` / `BadgeBDark` | `225,85,84` / `140,52,51` | B badge (Back): fill / rim | +| `BadgeX` / `BadgeXDark` | `108,142,191` / `63,89,127` | Hold-to-delete hint: fill / rim | +| `BadgeStart` / `BadgeStartDark` | `194,168,94` / `116,101,56` | Start pill: fill / rim | +| `BadgeY` / `BadgeYDark` | `201,123,132` / `143,71,80` | Reserved | +| `CheckboxOn` | follows `BadgeB` | Module Uninstaller: marked checkbox | +| `CheckboxOff` | follows `TextDim` | Module Uninstaller: unmarked checkbox | + +Apps built on the same framework read this file too, so they match the menu. + +### Icons + +Preview images (`/etc/options_menu/images/`, 200×140 PNG) and the UI glyphs in `images/ui/` are rendered from [Bootstrap Icons](https://icons.getbootstrap.com/). The `images/ui/` glyphs are white and tinted with the theme colors at runtime. + +## Building + +```sh +git clone --recursive https://github.com/DefKorns/OptionsMenu.git +cd OptionsMenu +./build.sh # out/options_menu.hmod (./build.ps1 on PowerShell) +./build.sh FIX_LIBSTDCXX=1 # out/options_menu_compat.hmod +./build.sh MOD_VER=test-dev # override the version for a test build +``` + +`build.sh` builds the [classicmini-cross-toolchain](https://github.com/DefKorns/classicmini-cross-toolchain) Docker image if needed and runs `make` inside it — no local ARM toolchain required. Outside Docker, the same `Makefile` works with SDL2, SDL2_ttf, libpng and `make CROSS_PREFIX=arm-linux-gnueabihf-`. + +Packaging and versioning come from [hmod-build](https://github.com/DefKorns/hmod-build): the version is the latest `v*` git tag, and the `.hmod` name has no version, so hakchi sees every release as the same mod. Pushing a tag builds both variants and publishes a GitHub Release (a prerelease for tags with a hyphen, e.g. `v2.0.0-alpha5`). + +## Credits + +- **[CompCom](https://github.com/CompCom)** — the original Options Menu +- **[DefKorns](https://github.com/DefKorns)** — version 2: the new interface, TTF text, theme colors and icons, translations, Network (with Advokaten), Wi-Fi backups, Save Manager, Controller and Diagnostics menus, build tooling +- **Swingflip** — Hibernate Mod and Hakchi-Option-Pack scripts +- **[BsLeNuL](https://github.com/bslenul)** — RetroArch configuration scripts +- **Advokaten** — Network commands +- **ThanosRD** — layout and design of the original interface +- **[MadFranko008](https://www.reddit.com/user/MadFranko008/)** — idea for the Saved Games backup + +### Third-party assets + +- [Bootstrap Icons](https://icons.getbootstrap.com/) — preview icons and UI glyphs (MIT License) +- [Noto Sans JP](https://fonts.google.com/noto/specimen/Noto+Sans+JP) — UI font, subset (SIL Open Font License, see `fonts/OFL.txt`) +- [Misaki font](http://littlelimit.net/misaki.htm) by Num Kadoma — 8×8 kana and kanji glyphs + ### Testing -Extra thanks to DNA64 (viral_dna) and Swingflip for always testing features. -Also thanks to the following people for testing the options menu: +Thanks to DNA64 (viral_dna) and Swingflip for always testing, and to Aranthys, AxelStone, BsLeNuL, DR1001, Patton Plays and ThanosRD. + +## License -- BsLeNuL -- DefKorns -- DR1001 -- Patton Plays -- ThanosRD \ No newline at end of file +GPLv3 or later — see [LICENSE](LICENSE). diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..8818326 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,37 @@ +$ErrorActionPreference = "Stop" +if (-not (Test-Path "vendor/hmod-build/toolchain-image.sh")) { + Write-Host "==> Fetching vendor/hmod-build submodule..." + git submodule update --init vendor/hmod-build +} + +# same pin as vendor/hmod-build/toolchain-image.sh +$IMAGE = $env:TOOLCHAIN_IMAGE +if (-not $IMAGE) { + $IMAGE = (Select-String -Path "vendor/hmod-build/toolchain-image.sh" -Pattern 'TOOLCHAIN_IMAGE:-([^}]+)').Matches[0].Groups[1].Value +} +docker image inspect $IMAGE *> $null +if ($LASTEXITCODE -ne 0) { + Write-Host "==> Pulling $IMAGE..." + docker pull $IMAGE + if ($LASTEXITCODE -ne 0) { + Write-Host "Docker pull failed (exit code $LASTEXITCODE)." -ForegroundColor Red + exit $LASTEXITCODE + } +} + +# the outermost work tree is mounted, so a submodule checkout's gitdir resolves for git describe +$here = (git rev-parse --show-toplevel) + "/" + (git rev-parse --show-prefix) +$root = git rev-parse --show-toplevel +while ($super = git -C $root rev-parse --show-superproject-working-tree) { $root = $super } +$rel = $here.Substring($root.Length).Trim("/") + +Write-Host "==> Running make inside the container..." +docker run --rm -v "${root}:/ws" -w "/ws/$rel" $IMAGE ` + sh -c 'git config --global --add safe.directory ''*'' 2>/dev/null; exec make CROSS_PREFIX=arm-linux-gnueabihf- $@' make @args +if ($LASTEXITCODE -ne 0) { + Write-Host "make failed (exit code $LASTEXITCODE)." -ForegroundColor Red + exit $LASTEXITCODE +} + +Write-Host "==> Build complete. Files in out\:" +Get-ChildItem out diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..41f1d25 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail + +[ -f vendor/hmod-build/docker-make.sh ] || git submodule update --init vendor/hmod-build + +sh vendor/hmod-build/docker-make.sh "$@" + +[ ! -d out/ ] || ls -la out/ diff --git a/button.cfg b/button.cfg deleted file mode 100644 index 5b1929e..0000000 --- a/button.cfg +++ /dev/null @@ -1 +0,0 @@ -305 707 707 \ No newline at end of file diff --git a/mod/bin/standby b/mod/bin/standby index e2baf89..2e26b35 100644 --- a/mod/bin/standby +++ b/mod/bin/standby @@ -3,7 +3,7 @@ source /etc/preinit script_init -Hibernate() +hibernate() { xz -dc "$rootfs/etc/hibernate_mod/hibernating.png.xz" > /dev/fb0 echo "Initiating shutdown followed by hibernate mode..." @@ -13,7 +13,7 @@ Hibernate() echo "Hibernation mode active! Awaiting input..." } -Standby() +standby() { xz -dc "$rootfs/etc/hibernate_mod/hibernating.png.xz" > /dev/fb0 /etc/init.d/S8103OptionsMenu stop @@ -22,51 +22,51 @@ Standby() killall udevd modprobe -r clvcon killall -9 clover-mcp - Uikill TERM + uiKill TERM echo 0 > /sys/devices/virtual/disp/disp/attr/lcd [ -b '/dev/sda1' ] && umount /dev/sda1 echo "Initialising standby mode..." #echo "Core Temperature at the time of standby: $(hakchi hwmon)c" - echo "Standby mode active! Awaiting input..." + echo "standby mode active! Awaiting input..." } #UI Commands from latest hakchi version -Uilist(){ +uiList(){ lsof -n | grep -F "/dev/fb0" | grep -v "standby" | grep -v "busybox" | awk '{print $1}' | sort -u } -Uikill(){ +uiKill(){ [ -z "$1" ] && return 1 - Uilist | xargs -r kill -s "$1" + uiList | xargs -r kill -s "$1" } -DisplayMenu() +displayMenu() { - Uikill STOP + uiKill STOP #xz -dc "$rootfs/etc/hibernate_mod/1.png.xz" > /dev/fb0 } -Resume() +resume() { rm -f /tmp/power_menu_screen - Uikill CONT + uiKill CONT } -HibernateReboot() +hibernateReboot() { echo "Shutting down console out from hibernation mode..." - Resume + resume sync reboot } -ReloadImagePayload() +reloadImagePayload() { - payloadCount=$(find "$rootfs/etc/hibernate_mod/" -type f -name *.png.xz | wc -l) - #echo $payloadCount - payloadCount=$(($payloadCount-1)) #Deduct 1 to account for the hibernate.png.xz - #echo $payloadCount - if [ $payloadCount = 1 ]; then #lite version in play... + payload_count=$(find "$rootfs/etc/hibernate_mod/" -type f -name *.png.xz | wc -l) + #echo $payload_count + payload_count=$(($payload_count-1)) #Deduct 1 to account for the hibernate.png.xz + #echo $payload_count + if [ $payload_count = 1 ]; then #lite version in play... #echo "Lite version in play" if [ ! -f /tmp/power_menu_screen ]; then #echo "File doesn't exist" @@ -74,14 +74,14 @@ ReloadImagePayload() fi else #echo "Deluxe version in play" - DIFF=$(($payloadCount-1+1)) + image_range=$(($payload_count-1+1)) RANDOM=$$ - selectedImage="$rootfs/etc/hibernate_mod/"$(($(($RANDOM%$DIFF))+1))".png.xz" - #echo $selectedImage + selected_image="$rootfs/etc/hibernate_mod/"$(($(($RANDOM%$image_range))+1))".png.xz" + #echo $selected_image rm -f /tmp/power_menu_screen #Just incase - xz -dc $selectedImage > /tmp/power_menu_screen + xz -dc $selected_image > /tmp/power_menu_screen fi } diff --git a/mod/etc/init.d/S8103OptionsMenu b/mod/etc/init.d/S8103OptionsMenu old mode 100755 new mode 100644 diff --git a/mod/etc/init.d/S8104OptionsMenuTasks b/mod/etc/init.d/S8104OptionsMenuTasks new file mode 100644 index 0000000..6979a51 --- /dev/null +++ b/mod/etc/init.d/S8104OptionsMenuTasks @@ -0,0 +1,54 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# the home menu only reads .png and _small.png +cleanExtraCovers() { + game_storage="$(findGameStorage)" + [ -d "$game_storage" ] || return 0 + find "$game_storage" -type f \( -name "*_mdmini.png" -o -name "*_original.png" \) -exec rm -f {} + +} + +# left by RetroArch hmods' install, missed by their uninstall +cleanRetroarchDefaults() { + [ -e /bin/retroarch ] || [ -e /bin/retroarch-clover ] && return 0 + rm -rf "$mountpoint/etc/options_menu/retroarch/default_files" +} + +# the console restarts after every Hakchi sync, so each new game is seen before it can be removed +rememberGameNames() { + sh /etc/options_menu/scripts/OrphanSaves.sh sync-names +} + +tasks() { + source /etc/preinit + script_init + + cleanExtraCovers + cleanRetroarchDefaults + rememberGameNames +} + +case "$1" in +start) + tasks & +;; +stop|restart) +;; +*) + echo "OptionsMenuTasks: Please use start." + exit 1 +;; +esac diff --git a/mod/etc/options_menu/advanced_commands/c0010_ControllerOptions b/mod/etc/options_menu/advanced_commands/c0010_ControllerOptions new file mode 100644 index 0000000..4ed2114 --- /dev/null +++ b/mod/etc/options_menu/advanced_commands/c0010_ControllerOptions @@ -0,0 +1,6 @@ +COMMAND_NAME=CONTROLLER_OPTIONS +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/controller/commands/ --scriptPath %options_path%/controller/scripts/ --title "CONTROLLER_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_controller.png diff --git a/mod/etc/options_menu/advanced_commands/c0015_DiagnosticsOptions b/mod/etc/options_menu/advanced_commands/c0015_DiagnosticsOptions new file mode 100644 index 0000000..e2f9f35 --- /dev/null +++ b/mod/etc/options_menu/advanced_commands/c0015_DiagnosticsOptions @@ -0,0 +1,6 @@ +COMMAND_NAME=DIAGNOSTICS_OPTIONS +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/diagnostics/commands/ --scriptPath %options_path%/scripts/ --title "DIAGNOSTICS_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_diagnostics.png diff --git a/mod/etc/options_menu/advanced_commands/c0018_separator b/mod/etc/options_menu/advanced_commands/c0018_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/advanced_commands/c0020_ModUninstall b/mod/etc/options_menu/advanced_commands/c0020_ModUninstall deleted file mode 100644 index 96b3d91..0000000 --- a/mod/etc/options_menu/advanced_commands/c0020_ModUninstall +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Module Uninstaller -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=%options_path%/mod_uninstall/mod_uninstall && sh %script_dir%/ResumeUI.sh & diff --git a/mod/etc/options_menu/advanced_commands/c0030_USB_RW b/mod/etc/options_menu/advanced_commands/c0030_USB_RW new file mode 100644 index 0000000..743e17a --- /dev/null +++ b/mod/etc/options_menu/advanced_commands/c0030_USB_RW @@ -0,0 +1,6 @@ +COMMAND_NAME=TOGGLE_USB_WRITE +COMMAND_TYPE=INTERNAL +USB_ONLY=TRUE +COMMAND_STR=sh %script_dir%/USB_RW.sh +STATE_STR=sh %script_dir%/USB_RW_state.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_usb_rw.png diff --git a/mod/etc/options_menu/advanced_commands/c0035_EpilepsyProtection b/mod/etc/options_menu/advanced_commands/c0035_EpilepsyProtection new file mode 100644 index 0000000..6fa471e --- /dev/null +++ b/mod/etc/options_menu/advanced_commands/c0035_EpilepsyProtection @@ -0,0 +1,6 @@ +COMMAND_NAME=EPILEPSY_PROTECTION +COMMAND_TYPE=INTERNAL +ENABLE_IF=[ "$sftype" = "nes" ] || [ "$sftype" = "hvcj" ] +COMMAND_STR=sh %script_dir%/armet.sh toggle +STATE_STR=sh %script_dir%/armet.sh state +PREVIEW_IMAGE=/etc/options_menu/images/preview_epilepsy.png diff --git a/mod/etc/options_menu/advanced_commands/c0900_ClearCache b/mod/etc/options_menu/advanced_commands/c0040_ClearCache similarity index 52% rename from mod/etc/options_menu/advanced_commands/c0900_ClearCache rename to mod/etc/options_menu/advanced_commands/c0040_ClearCache index 1efb6d7..1a217a8 100644 --- a/mod/etc/options_menu/advanced_commands/c0900_ClearCache +++ b/mod/etc/options_menu/advanced_commands/c0040_ClearCache @@ -1,3 +1,4 @@ -COMMAND_NAME=Clear Cache +COMMAND_NAME=CLEAR_CACHE COMMAND_TYPE=INTERNAL COMMAND_STR=free -m && sync && echo 1 > /proc/sys/vm/drop_caches && free -m +PREVIEW_IMAGE=/etc/options_menu/images/preview_clear_cache.png diff --git a/mod/etc/options_menu/advanced_commands/c0040_DisplayTop b/mod/etc/options_menu/advanced_commands/c0040_DisplayTop deleted file mode 100644 index 87f0ad7..0000000 --- a/mod/etc/options_menu/advanced_commands/c0040_DisplayTop +++ /dev/null @@ -1,3 +0,0 @@ -COMMAND_NAME=Run Top -COMMAND_TYPE=INTERNAL -COMMAND_STR=top -b -n 1 diff --git a/mod/etc/options_menu/advanced_commands/c0050_BenchMark b/mod/etc/options_menu/advanced_commands/c0050_BenchMark deleted file mode 100644 index 10bf737..0000000 --- a/mod/etc/options_menu/advanced_commands/c0050_BenchMark +++ /dev/null @@ -1,3 +0,0 @@ -COMMAND_NAME=Benchmark Tool -COMMAND_TYPE=INTERNAL -COMMAND_STR=sh %script_dir%/BenchMark.sh diff --git a/mod/etc/options_menu/advanced_commands/c0050_ModUninstall b/mod/etc/options_menu/advanced_commands/c0050_ModUninstall new file mode 100644 index 0000000..4a7aa44 --- /dev/null +++ b/mod/etc/options_menu/advanced_commands/c0050_ModUninstall @@ -0,0 +1,5 @@ +COMMAND_NAME=MODULE_UNINSTALLER +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=sh %options_path%/mod_uninstall/launch_uninstaller.sh %options_path% & +PREVIEW_IMAGE=/etc/options_menu/images/preview_mod_uninstall.png diff --git a/mod/etc/options_menu/advanced_commands/c0060_DumpFile b/mod/etc/options_menu/advanced_commands/c0060_DumpFile deleted file mode 100644 index 6a02f27..0000000 --- a/mod/etc/options_menu/advanced_commands/c0060_DumpFile +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Dump File Structure (to USB) -COMMAND_TYPE=INTERNAL -USB_ONLY=TRUE -COMMAND_STR=sh %script_dir%/DumpFile.sh diff --git a/mod/etc/options_menu/advanced_commands/c0500_USB_RW b/mod/etc/options_menu/advanced_commands/c0500_USB_RW deleted file mode 100644 index 14aace6..0000000 --- a/mod/etc/options_menu/advanced_commands/c0500_USB_RW +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Toggle Write Access on USB -COMMAND_TYPE=INTERNAL -USB_ONLY=TRUE -COMMAND_STR=sh %script_dir%/USB_RW.sh diff --git a/mod/etc/options_menu/advanced_commands/c0890_ChangeCombo b/mod/etc/options_menu/advanced_commands/c0890_ChangeCombo deleted file mode 100644 index f5722a6..0000000 --- a/mod/etc/options_menu/advanced_commands/c0890_ChangeCombo +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Change Options Button Combo -COMMAND_TYPE=INTERNAL -IGNORE_INTERRUPT=TRUE -COMMAND_STR=exec %script_dir%/ChangeCombo diff --git a/mod/etc/options_menu/advanced_commands/c9999_Back b/mod/etc/options_menu/advanced_commands/c9999_Back deleted file mode 100644 index 651d780..0000000 --- a/mod/etc/options_menu/advanced_commands/c9999_Back +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Back -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & \ No newline at end of file diff --git a/mod/etc/options_menu/advanced_commands/c9999_Exit b/mod/etc/options_menu/advanced_commands/c9999_Exit deleted file mode 100644 index 6a60cb3..0000000 --- a/mod/etc/options_menu/advanced_commands/c9999_Exit +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Exit -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" diff --git a/mod/etc/options_menu/commands/c0009_hibernate b/mod/etc/options_menu/commands/c0009_hibernate index e20eee3..c39973a 100644 --- a/mod/etc/options_menu/commands/c0009_hibernate +++ b/mod/etc/options_menu/commands/c0009_hibernate @@ -1,4 +1,5 @@ -COMMAND_NAME=Hibernate/Standby +COMMAND_NAME=HIBERNATE COMMAND_TYPE=EXTERNAL RESTART_UI=FALSE -COMMAND_STR=standby_watchdog --displayMenu && sh %script_dir%/ResumeUI.sh & \ No newline at end of file +COMMAND_STR=standby_watchdog --displayMenu && sh %script_dir%/ResumeUI.sh & +PREVIEW_IMAGE=/etc/options_menu/images/preview_hibernate.png diff --git a/mod/etc/options_menu/commands/c0010_shutdown b/mod/etc/options_menu/commands/c0010_shutdown index b93a2a7..d93f381 100644 --- a/mod/etc/options_menu/commands/c0010_shutdown +++ b/mod/etc/options_menu/commands/c0010_shutdown @@ -1,4 +1,5 @@ -COMMAND_NAME=Shutdown Device +COMMAND_NAME=SHUTDOWN_DEVICE COMMAND_TYPE=EXTERNAL RESTART_UI=FALSE COMMAND_STR=sh %script_dir%/ResumeUI.sh && sh %script_dir%/shutdown.sh & +PREVIEW_IMAGE=/etc/options_menu/images/preview_shutdown.png diff --git a/mod/etc/options_menu/commands/c0020_reboot b/mod/etc/options_menu/commands/c0020_reboot index c444bfb..55b0dad 100644 --- a/mod/etc/options_menu/commands/c0020_reboot +++ b/mod/etc/options_menu/commands/c0020_reboot @@ -1,4 +1,5 @@ -COMMAND_NAME=Reboot Device +COMMAND_NAME=REBOOT_DEVICE COMMAND_TYPE=EXTERNAL RESTART_UI=FALSE COMMAND_STR=sh %script_dir%/ResumeUI.sh && sh %script_dir%/reboot.sh & +PREVIEW_IMAGE=/etc/options_menu/images/preview_reboot.png diff --git a/mod/etc/options_menu/commands/c0025_separator b/mod/etc/options_menu/commands/c0025_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/commands/c0060_RetroarchOptions b/mod/etc/options_menu/commands/c0060_RetroarchOptions index a088d5f..20fc8e5 100644 --- a/mod/etc/options_menu/commands/c0060_RetroarchOptions +++ b/mod/etc/options_menu/commands/c0060_RetroarchOptions @@ -1,4 +1,7 @@ -COMMAND_NAME=Retroarch Options +COMMAND_NAME=RETROARCH_OPTIONS COMMAND_TYPE=EXTERNAL RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/retroarch/commands/ --scriptPath %options_path%/retroarch/scripts --title "Retroarch Options" & +SUBMENU=TRUE +ENABLE_IF=[ -e /bin/retroarch ] || [ -e /bin/retroarch-clover ] +COMMAND_STR=sh %script_dir%/om_retroarch +PREVIEW_IMAGE=/etc/options_menu/images/preview_retroarch.png diff --git a/mod/etc/options_menu/commands/c0070_AdvancedOptions b/mod/etc/options_menu/commands/c0070_AdvancedOptions deleted file mode 100644 index fab0ee2..0000000 --- a/mod/etc/options_menu/commands/c0070_AdvancedOptions +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Advanced Options -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/advanced_commands/ --title "Advanced Options" & diff --git a/mod/etc/options_menu/commands/c0070_NetworkOptions b/mod/etc/options_menu/commands/c0070_NetworkOptions new file mode 100644 index 0000000..def5f61 --- /dev/null +++ b/mod/etc/options_menu/commands/c0070_NetworkOptions @@ -0,0 +1,6 @@ +COMMAND_NAME=NETWORK_OPTIONS +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +COMMAND_STR=sh %script_dir%/om_network +PREVIEW_IMAGE=/etc/options_menu/images/preview_network.png diff --git a/mod/etc/options_menu/commands/c0073_SavedGamesOptions b/mod/etc/options_menu/commands/c0073_SavedGamesOptions new file mode 100644 index 0000000..10da3a0 --- /dev/null +++ b/mod/etc/options_menu/commands/c0073_SavedGamesOptions @@ -0,0 +1,7 @@ +COMMAND_NAME=SAVE_MANAGER +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +USB_ONLY=TRUE +COMMAND_STR=sh %options_path%/save_manager/launch_save_manager.sh %options_path% & +PREVIEW_IMAGE=/etc/options_menu/images/preview_saved_games.png diff --git a/mod/etc/options_menu/commands/c0078_LanguageOptions b/mod/etc/options_menu/commands/c0078_LanguageOptions new file mode 100644 index 0000000..053f6d5 --- /dev/null +++ b/mod/etc/options_menu/commands/c0078_LanguageOptions @@ -0,0 +1,6 @@ +COMMAND_NAME=LANGUAGE_OPTIONS +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_language.png diff --git a/mod/etc/options_menu/commands/c0080_AdvancedOptions b/mod/etc/options_menu/commands/c0080_AdvancedOptions new file mode 100644 index 0000000..ab6bd68 --- /dev/null +++ b/mod/etc/options_menu/commands/c0080_AdvancedOptions @@ -0,0 +1,6 @@ +COMMAND_NAME=ADVANCED_OPTIONS +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +SUBMENU=TRUE +COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/advanced_commands/ --title "ADVANCED_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_advanced.png diff --git a/mod/etc/options_menu/commands/c0080_NetworkOptions b/mod/etc/options_menu/commands/c0080_NetworkOptions deleted file mode 100644 index feaff6b..0000000 --- a/mod/etc/options_menu/commands/c0080_NetworkOptions +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Network Options -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/network/commands/ --scriptPath %options_path%/network/scripts --title "Network Options" & diff --git a/mod/etc/options_menu/commands/c9999_Exit b/mod/etc/options_menu/commands/c9999_Exit deleted file mode 100644 index 6a60cb3..0000000 --- a/mod/etc/options_menu/commands/c9999_Exit +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Exit -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" diff --git a/mod/etc/options_menu/controller/commands/c0005_ChangeCombo b/mod/etc/options_menu/controller/commands/c0005_ChangeCombo new file mode 100644 index 0000000..1378b36 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0005_ChangeCombo @@ -0,0 +1,5 @@ +COMMAND_NAME=CHANGE_BUTTON_COMBO +COMMAND_TYPE=INTERNAL +IGNORE_INTERRUPT=TRUE +COMMAND_STR=exec %options_path%/scripts/ChangeCombo +PREVIEW_IMAGE=/etc/options_menu/images/preview_change_combo.png diff --git a/mod/etc/options_menu/controller/commands/c0008_separator b/mod/etc/options_menu/controller/commands/c0008_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/controller/commands/c0010_Autofire b/mod/etc/options_menu/controller/commands/c0010_Autofire new file mode 100644 index 0000000..f30ed69 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0010_Autofire @@ -0,0 +1,5 @@ +COMMAND_NAME=AUTOFIRE +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/clovercon.sh toggle autofire +STATE_STR=sh %script_dir%/clovercon.sh state autofire +PREVIEW_IMAGE=/etc/options_menu/images/preview_autofire.png diff --git a/mod/etc/options_menu/controller/commands/c0011_AutofireFast b/mod/etc/options_menu/controller/commands/c0011_AutofireFast new file mode 100644 index 0000000..57d76b5 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0011_AutofireFast @@ -0,0 +1,6 @@ +COMMAND_NAME=AUTOFIRE_SPEED_FAST +COMMAND_TYPE=INTERNAL +CHILD=TRUE +COMMAND_STR=sh %script_dir%/clovercon.sh set autofire_interval 4 +STATE_STR=sh %script_dir%/clovercon.sh is autofire_interval 4 +PREVIEW_IMAGE=/etc/options_menu/images/preview_autofire_speed.png diff --git a/mod/etc/options_menu/controller/commands/c0012_AutofireNormal b/mod/etc/options_menu/controller/commands/c0012_AutofireNormal new file mode 100644 index 0000000..f5402b9 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0012_AutofireNormal @@ -0,0 +1,6 @@ +COMMAND_NAME=AUTOFIRE_SPEED_NORMAL +COMMAND_TYPE=INTERNAL +CHILD=TRUE +COMMAND_STR=sh %script_dir%/clovercon.sh set autofire_interval 8 +STATE_STR=sh %script_dir%/clovercon.sh is autofire_interval 8 +PREVIEW_IMAGE=/etc/options_menu/images/preview_autofire_speed.png diff --git a/mod/etc/options_menu/controller/commands/c0013_AutofireSlow b/mod/etc/options_menu/controller/commands/c0013_AutofireSlow new file mode 100644 index 0000000..c492205 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0013_AutofireSlow @@ -0,0 +1,6 @@ +COMMAND_NAME=AUTOFIRE_SPEED_SLOW +COMMAND_TYPE=INTERNAL +CHILD=TRUE +COMMAND_STR=sh %script_dir%/clovercon.sh set autofire_interval 16 +STATE_STR=sh %script_dir%/clovercon.sh is autofire_interval 16 +PREVIEW_IMAGE=/etc/options_menu/images/preview_autofire_speed.png diff --git a/mod/etc/options_menu/controller/commands/c0020_AutofireXY b/mod/etc/options_menu/controller/commands/c0020_AutofireXY new file mode 100644 index 0000000..88cad77 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0020_AutofireXY @@ -0,0 +1,5 @@ +COMMAND_NAME=AUTOFIRE_XY +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/clovercon.sh toggle autofire_xy +STATE_STR=sh %script_dir%/clovercon.sh state autofire_xy +PREVIEW_IMAGE=/etc/options_menu/images/preview_autofire_xy.png diff --git a/mod/etc/options_menu/controller/commands/c0025_separator b/mod/etc/options_menu/controller/commands/c0025_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/controller/commands/c0030_HomeCombo b/mod/etc/options_menu/controller/commands/c0030_HomeCombo new file mode 100644 index 0000000..3181d4b --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0030_HomeCombo @@ -0,0 +1,5 @@ +COMMAND_NAME=HOME_COMBO +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/clovercon.sh home toggle +STATE_STR=sh %script_dir%/clovercon.sh home state +PREVIEW_IMAGE=/etc/options_menu/images/preview_home_combo.png diff --git a/mod/etc/options_menu/controller/commands/c0040_FcStart b/mod/etc/options_menu/controller/commands/c0040_FcStart new file mode 100644 index 0000000..59b8df5 --- /dev/null +++ b/mod/etc/options_menu/controller/commands/c0040_FcStart @@ -0,0 +1,6 @@ +COMMAND_NAME=FC_START +COMMAND_TYPE=INTERNAL +ENABLE_IF=[ "$sftype" = "nes" ] && [ "$sfregion" = "jpn" ] +COMMAND_STR=sh %script_dir%/clovercon.sh toggle fc_start +STATE_STR=sh %script_dir%/clovercon.sh state fc_start +PREVIEW_IMAGE=/etc/options_menu/images/preview_fc_start.png diff --git a/mod/etc/options_menu/controller/scripts/clovercon.sh b/mod/etc/options_menu/controller/scripts/clovercon.sh new file mode 100644 index 0000000..28bfb7f --- /dev/null +++ b/mod/etc/options_menu/controller/scripts/clovercon.sh @@ -0,0 +1,97 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# clovercon.sh state|toggle +# clovercon.sh is|set +# clovercon.sh home state|toggle +# Saves cfg_clovercon_ and applies it live through sysfs. +source /etc/preinit +script_init + +home_disabled="0x7FFF" +home_default="0x0024" +home_prev_file="$mountpoint/etc/options_menu/controller/home_combination.prev" + +validName() { + case "$1" in + "" | *[!A-Za-z0-9_]*) return 1 ;; + esac +} + +validValue() { + case "$1" in + "" | *[!A-Za-z0-9_.x-]*) return 1 ;; + esac +} + +getCfg() { + eval "echo \"\$cfg_clovercon_$1\"" +} + +apply() { + validName "$1" && validValue "$2" || return 1 + eval "cfg_clovercon_$1='$2'" + save_config + param_file="/sys/module/clovercon/parameters/$1" + [ -w "$param_file" ] && echo "$2" > "$param_file" +} + +onOff() { + if [ "$1" = "y" ]; then echo "on"; else echo "off"; fi +} + +homeEnabled() { + current="$(getCfg home_combination)" + [ -n "$current" ] && [ "$(printf '%d' "$current")" != "$(printf '%d' "$home_disabled")" ] +} + +case "$1" in +state | toggle | is | set) + validName "$2" || exit 1 + ;; +esac + +case "$1" in +state) + [ "$(getCfg "$2")" = "1" ] && onOff y || onOff n + ;; +toggle) + if [ "$(getCfg "$2")" = "1" ]; then apply "$2" 0; else apply "$2" 1; fi + ;; +is) + [ "$(getCfg "$2")" = "$3" ] && onOff y || onOff n + ;; +set) + apply "$2" "$3" + ;; +home) + case "$2" in + state) + homeEnabled && onOff y || onOff n + ;; + toggle) + if homeEnabled; then + mkdir -p "$(dirname "$home_prev_file")" + getCfg home_combination > "$home_prev_file" + apply home_combination "$home_disabled" + else + prev="$(cat "$home_prev_file" 2>/dev/null)" + apply home_combination "${prev:-$home_default}" + fi + ;; + esac + ;; +esac diff --git a/mod/etc/options_menu/diagnostics/commands/c0010_SystemInfo b/mod/etc/options_menu/diagnostics/commands/c0010_SystemInfo new file mode 100644 index 0000000..89dd329 --- /dev/null +++ b/mod/etc/options_menu/diagnostics/commands/c0010_SystemInfo @@ -0,0 +1,4 @@ +COMMAND_NAME=SYSTEM_INFO +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/system_info.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_system_info.png diff --git a/mod/etc/options_menu/advanced_commands/c0030_DisplayTemp b/mod/etc/options_menu/diagnostics/commands/c0020_DisplayTemp similarity index 57% rename from mod/etc/options_menu/advanced_commands/c0030_DisplayTemp rename to mod/etc/options_menu/diagnostics/commands/c0020_DisplayTemp index 472eb38..7039828 100644 --- a/mod/etc/options_menu/advanced_commands/c0030_DisplayTemp +++ b/mod/etc/options_menu/diagnostics/commands/c0020_DisplayTemp @@ -1,3 +1,4 @@ -COMMAND_NAME=Display Temp +COMMAND_NAME=DISPLAY_TEMP COMMAND_TYPE=INTERNAL COMMAND_STR=echo "Current Temperature: $(cat "/sys/class/thermal/thermal_zone0/temp")c" +PREVIEW_IMAGE=/etc/options_menu/images/preview_temp.png diff --git a/mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop b/mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop new file mode 100644 index 0000000..3fdb39d --- /dev/null +++ b/mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop @@ -0,0 +1,4 @@ +COMMAND_NAME=RUN_TOP +COMMAND_TYPE=INTERNAL +COMMAND_STR=top -b -n 1 +PREVIEW_IMAGE=/etc/options_menu/images/preview_top.png diff --git a/mod/etc/options_menu/diagnostics/commands/c0040_BenchMark b/mod/etc/options_menu/diagnostics/commands/c0040_BenchMark new file mode 100644 index 0000000..72320a1 --- /dev/null +++ b/mod/etc/options_menu/diagnostics/commands/c0040_BenchMark @@ -0,0 +1,4 @@ +COMMAND_NAME=BENCHMARK_TOOL +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/BenchMark.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_benchmark.png diff --git a/mod/etc/options_menu/diagnostics/commands/c0045_separator b/mod/etc/options_menu/diagnostics/commands/c0045_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/advanced_commands/c0700_RADebug b/mod/etc/options_menu/diagnostics/commands/c0050_RADebug similarity index 59% rename from mod/etc/options_menu/advanced_commands/c0700_RADebug rename to mod/etc/options_menu/diagnostics/commands/c0050_RADebug index 30385b8..0acbb52 100644 --- a/mod/etc/options_menu/advanced_commands/c0700_RADebug +++ b/mod/etc/options_menu/diagnostics/commands/c0050_RADebug @@ -1,5 +1,6 @@ -COMMAND_NAME=RetroArch Debugger (USB logs) +COMMAND_NAME=RA_DEBUGGER COMMAND_TYPE=EXTERNAL RESTART_UI=FALSE USB_ONLY=TRUE COMMAND_STR=sh %script_dir%/RADebug.sh && sh %script_dir%/ResumeUI.sh & +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_debug.png diff --git a/mod/etc/options_menu/diagnostics/commands/c0060_DumpFile b/mod/etc/options_menu/diagnostics/commands/c0060_DumpFile new file mode 100644 index 0000000..02f2ad2 --- /dev/null +++ b/mod/etc/options_menu/diagnostics/commands/c0060_DumpFile @@ -0,0 +1,5 @@ +COMMAND_NAME=DUMP_FILE_STRUCTURE +COMMAND_TYPE=INTERNAL +USB_ONLY=TRUE +COMMAND_STR=sh %script_dir%/DumpFile.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_dump_file.png diff --git a/mod/etc/options_menu/diagnostics/commands/c0070_SaveDmesg b/mod/etc/options_menu/diagnostics/commands/c0070_SaveDmesg new file mode 100644 index 0000000..d838fdc --- /dev/null +++ b/mod/etc/options_menu/diagnostics/commands/c0070_SaveDmesg @@ -0,0 +1,5 @@ +COMMAND_NAME=SAVE_DMESG +COMMAND_TYPE=INTERNAL +USB_ONLY=TRUE +COMMAND_STR=sh %script_dir%/save_dmesg.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_dmesg.png diff --git a/mod/etc/options_menu/fonts/OFL.txt b/mod/etc/options_menu/fonts/OFL.txt new file mode 100644 index 0000000..1c9f432 --- /dev/null +++ b/mod/etc/options_menu/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source' + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/mod/etc/options_menu/images/banner.png b/mod/etc/options_menu/images/banner.png deleted file mode 100644 index c0dfb2b..0000000 Binary files a/mod/etc/options_menu/images/banner.png and /dev/null differ diff --git a/mod/etc/options_menu/images/flag_de_small.png b/mod/etc/options_menu/images/flag_de_small.png new file mode 100644 index 0000000..54f1163 Binary files /dev/null and b/mod/etc/options_menu/images/flag_de_small.png differ diff --git a/mod/etc/options_menu/images/flag_en_small.png b/mod/etc/options_menu/images/flag_en_small.png new file mode 100644 index 0000000..5bb5fc9 Binary files /dev/null and b/mod/etc/options_menu/images/flag_en_small.png differ diff --git a/mod/etc/options_menu/images/flag_es_small.png b/mod/etc/options_menu/images/flag_es_small.png new file mode 100644 index 0000000..ee163a2 Binary files /dev/null and b/mod/etc/options_menu/images/flag_es_small.png differ diff --git a/mod/etc/options_menu/images/flag_fr_small.png b/mod/etc/options_menu/images/flag_fr_small.png new file mode 100644 index 0000000..0256e9e Binary files /dev/null and b/mod/etc/options_menu/images/flag_fr_small.png differ diff --git a/mod/etc/options_menu/images/flag_it_small.png b/mod/etc/options_menu/images/flag_it_small.png new file mode 100644 index 0000000..4d0a05d Binary files /dev/null and b/mod/etc/options_menu/images/flag_it_small.png differ diff --git a/mod/etc/options_menu/images/flag_ja_small.png b/mod/etc/options_menu/images/flag_ja_small.png new file mode 100644 index 0000000..16265d9 Binary files /dev/null and b/mod/etc/options_menu/images/flag_ja_small.png differ diff --git a/mod/etc/options_menu/images/flag_nl_small.png b/mod/etc/options_menu/images/flag_nl_small.png new file mode 100644 index 0000000..ce61145 Binary files /dev/null and b/mod/etc/options_menu/images/flag_nl_small.png differ diff --git a/mod/etc/options_menu/images/flag_pt_small.png b/mod/etc/options_menu/images/flag_pt_small.png new file mode 100644 index 0000000..7d30c2c Binary files /dev/null and b/mod/etc/options_menu/images/flag_pt_small.png differ diff --git a/mod/etc/options_menu/images/flag_ru_small.png b/mod/etc/options_menu/images/flag_ru_small.png new file mode 100644 index 0000000..7e89421 Binary files /dev/null and b/mod/etc/options_menu/images/flag_ru_small.png differ diff --git a/mod/etc/options_menu/images/preview_advanced.png b/mod/etc/options_menu/images/preview_advanced.png new file mode 100644 index 0000000..2769683 Binary files /dev/null and b/mod/etc/options_menu/images/preview_advanced.png differ diff --git a/mod/etc/options_menu/images/preview_autofire.png b/mod/etc/options_menu/images/preview_autofire.png new file mode 100644 index 0000000..4d92f23 Binary files /dev/null and b/mod/etc/options_menu/images/preview_autofire.png differ diff --git a/mod/etc/options_menu/images/preview_autofire_speed.png b/mod/etc/options_menu/images/preview_autofire_speed.png new file mode 100644 index 0000000..5af165a Binary files /dev/null and b/mod/etc/options_menu/images/preview_autofire_speed.png differ diff --git a/mod/etc/options_menu/images/preview_autofire_xy.png b/mod/etc/options_menu/images/preview_autofire_xy.png new file mode 100644 index 0000000..2d1f8e0 Binary files /dev/null and b/mod/etc/options_menu/images/preview_autofire_xy.png differ diff --git a/mod/etc/options_menu/images/preview_backup_nand.png b/mod/etc/options_menu/images/preview_backup_nand.png new file mode 100644 index 0000000..c06d831 Binary files /dev/null and b/mod/etc/options_menu/images/preview_backup_nand.png differ diff --git a/mod/etc/options_menu/images/preview_backup_usb.png b/mod/etc/options_menu/images/preview_backup_usb.png new file mode 100644 index 0000000..7aa857b Binary files /dev/null and b/mod/etc/options_menu/images/preview_backup_usb.png differ diff --git a/mod/etc/options_menu/images/preview_benchmark.png b/mod/etc/options_menu/images/preview_benchmark.png new file mode 100644 index 0000000..cf0fe4b Binary files /dev/null and b/mod/etc/options_menu/images/preview_benchmark.png differ diff --git a/mod/etc/options_menu/images/preview_change_combo.png b/mod/etc/options_menu/images/preview_change_combo.png new file mode 100644 index 0000000..57eeb3b Binary files /dev/null and b/mod/etc/options_menu/images/preview_change_combo.png differ diff --git a/mod/etc/options_menu/images/preview_clear_cache.png b/mod/etc/options_menu/images/preview_clear_cache.png new file mode 100644 index 0000000..918c231 Binary files /dev/null and b/mod/etc/options_menu/images/preview_clear_cache.png differ diff --git a/mod/etc/options_menu/images/preview_controller.png b/mod/etc/options_menu/images/preview_controller.png new file mode 100644 index 0000000..6a0bc11 Binary files /dev/null and b/mod/etc/options_menu/images/preview_controller.png differ diff --git a/mod/etc/options_menu/images/preview_diagnostics.png b/mod/etc/options_menu/images/preview_diagnostics.png new file mode 100644 index 0000000..8514010 Binary files /dev/null and b/mod/etc/options_menu/images/preview_diagnostics.png differ diff --git a/mod/etc/options_menu/images/preview_dmesg.png b/mod/etc/options_menu/images/preview_dmesg.png new file mode 100644 index 0000000..12435a1 Binary files /dev/null and b/mod/etc/options_menu/images/preview_dmesg.png differ diff --git a/mod/etc/options_menu/images/preview_dump_file.png b/mod/etc/options_menu/images/preview_dump_file.png new file mode 100644 index 0000000..ccf6fd7 Binary files /dev/null and b/mod/etc/options_menu/images/preview_dump_file.png differ diff --git a/mod/etc/options_menu/images/preview_epilepsy.png b/mod/etc/options_menu/images/preview_epilepsy.png new file mode 100644 index 0000000..1056eab Binary files /dev/null and b/mod/etc/options_menu/images/preview_epilepsy.png differ diff --git a/mod/etc/options_menu/images/preview_fc_start.png b/mod/etc/options_menu/images/preview_fc_start.png new file mode 100644 index 0000000..68868d3 Binary files /dev/null and b/mod/etc/options_menu/images/preview_fc_start.png differ diff --git a/mod/etc/options_menu/images/preview_hibernate.png b/mod/etc/options_menu/images/preview_hibernate.png new file mode 100644 index 0000000..0260643 Binary files /dev/null and b/mod/etc/options_menu/images/preview_hibernate.png differ diff --git a/mod/etc/options_menu/images/preview_home_combo.png b/mod/etc/options_menu/images/preview_home_combo.png new file mode 100644 index 0000000..04a98ec Binary files /dev/null and b/mod/etc/options_menu/images/preview_home_combo.png differ diff --git a/mod/etc/options_menu/images/preview_lang_de.png b/mod/etc/options_menu/images/preview_lang_de.png new file mode 100644 index 0000000..0129188 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_de.png differ diff --git a/mod/etc/options_menu/images/preview_lang_en.png b/mod/etc/options_menu/images/preview_lang_en.png new file mode 100644 index 0000000..c546d17 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_en.png differ diff --git a/mod/etc/options_menu/images/preview_lang_es.png b/mod/etc/options_menu/images/preview_lang_es.png new file mode 100644 index 0000000..9e1795d Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_es.png differ diff --git a/mod/etc/options_menu/images/preview_lang_fr.png b/mod/etc/options_menu/images/preview_lang_fr.png new file mode 100644 index 0000000..21d2ca6 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_fr.png differ diff --git a/mod/etc/options_menu/images/preview_lang_it.png b/mod/etc/options_menu/images/preview_lang_it.png new file mode 100644 index 0000000..1958d44 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_it.png differ diff --git a/mod/etc/options_menu/images/preview_lang_ja.png b/mod/etc/options_menu/images/preview_lang_ja.png new file mode 100644 index 0000000..04e8477 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_ja.png differ diff --git a/mod/etc/options_menu/images/preview_lang_nl.png b/mod/etc/options_menu/images/preview_lang_nl.png new file mode 100644 index 0000000..97152a7 Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_nl.png differ diff --git a/mod/etc/options_menu/images/preview_lang_pt.png b/mod/etc/options_menu/images/preview_lang_pt.png new file mode 100644 index 0000000..e33370a Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_pt.png differ diff --git a/mod/etc/options_menu/images/preview_lang_ru.png b/mod/etc/options_menu/images/preview_lang_ru.png new file mode 100644 index 0000000..bef63da Binary files /dev/null and b/mod/etc/options_menu/images/preview_lang_ru.png differ diff --git a/mod/etc/options_menu/images/preview_language.png b/mod/etc/options_menu/images/preview_language.png new file mode 100644 index 0000000..644bad5 Binary files /dev/null and b/mod/etc/options_menu/images/preview_language.png differ diff --git a/mod/etc/options_menu/images/preview_mod_uninstall.png b/mod/etc/options_menu/images/preview_mod_uninstall.png new file mode 100644 index 0000000..58eba80 Binary files /dev/null and b/mod/etc/options_menu/images/preview_mod_uninstall.png differ diff --git a/mod/etc/options_menu/images/preview_net_ip.png b/mod/etc/options_menu/images/preview_net_ip.png new file mode 100644 index 0000000..dd2d882 Binary files /dev/null and b/mod/etc/options_menu/images/preview_net_ip.png differ diff --git a/mod/etc/options_menu/images/preview_net_reconnect.png b/mod/etc/options_menu/images/preview_net_reconnect.png new file mode 100644 index 0000000..7fcef86 Binary files /dev/null and b/mod/etc/options_menu/images/preview_net_reconnect.png differ diff --git a/mod/etc/options_menu/images/preview_net_ssid.png b/mod/etc/options_menu/images/preview_net_ssid.png new file mode 100644 index 0000000..390e498 Binary files /dev/null and b/mod/etc/options_menu/images/preview_net_ssid.png differ diff --git a/mod/etc/options_menu/images/preview_network.png b/mod/etc/options_menu/images/preview_network.png new file mode 100644 index 0000000..208eac2 Binary files /dev/null and b/mod/etc/options_menu/images/preview_network.png differ diff --git a/mod/etc/options_menu/images/preview_placeholder.png b/mod/etc/options_menu/images/preview_placeholder.png new file mode 100644 index 0000000..66ae0dc Binary files /dev/null and b/mod/etc/options_menu/images/preview_placeholder.png differ diff --git a/mod/etc/options_menu/images/preview_ra_debug.png b/mod/etc/options_menu/images/preview_ra_debug.png new file mode 100644 index 0000000..f0ce548 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_debug.png differ diff --git a/mod/etc/options_menu/images/preview_ra_defaults.png b/mod/etc/options_menu/images/preview_ra_defaults.png new file mode 100644 index 0000000..b79dfe7 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_defaults.png differ diff --git a/mod/etc/options_menu/images/preview_ra_defaults_all.png b/mod/etc/options_menu/images/preview_ra_defaults_all.png new file mode 100644 index 0000000..3ab13c3 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_defaults_all.png differ diff --git a/mod/etc/options_menu/images/preview_ra_delete_backups.png b/mod/etc/options_menu/images/preview_ra_delete_backups.png new file mode 100644 index 0000000..fff2115 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_delete_backups.png differ diff --git a/mod/etc/options_menu/images/preview_ra_delete_bios.png b/mod/etc/options_menu/images/preview_ra_delete_bios.png new file mode 100644 index 0000000..f144655 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_delete_bios.png differ diff --git a/mod/etc/options_menu/images/preview_ra_delete_overrides.png b/mod/etc/options_menu/images/preview_ra_delete_overrides.png new file mode 100644 index 0000000..c323fcb Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_delete_overrides.png differ diff --git a/mod/etc/options_menu/images/preview_ra_delete_remaps.png b/mod/etc/options_menu/images/preview_ra_delete_remaps.png new file mode 100644 index 0000000..4132058 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_delete_remaps.png differ diff --git a/mod/etc/options_menu/images/preview_ra_load_screens.png b/mod/etc/options_menu/images/preview_ra_load_screens.png new file mode 100644 index 0000000..886034a Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_load_screens.png differ diff --git a/mod/etc/options_menu/images/preview_ra_sync_bios.png b/mod/etc/options_menu/images/preview_ra_sync_bios.png new file mode 100644 index 0000000..0acc6f5 Binary files /dev/null and b/mod/etc/options_menu/images/preview_ra_sync_bios.png differ diff --git a/mod/etc/options_menu/images/preview_reboot.png b/mod/etc/options_menu/images/preview_reboot.png new file mode 100644 index 0000000..d8204eb Binary files /dev/null and b/mod/etc/options_menu/images/preview_reboot.png differ diff --git a/mod/etc/options_menu/images/preview_restore_nand.png b/mod/etc/options_menu/images/preview_restore_nand.png new file mode 100644 index 0000000..638ba30 Binary files /dev/null and b/mod/etc/options_menu/images/preview_restore_nand.png differ diff --git a/mod/etc/options_menu/images/preview_restore_usb.png b/mod/etc/options_menu/images/preview_restore_usb.png new file mode 100644 index 0000000..062e0e4 Binary files /dev/null and b/mod/etc/options_menu/images/preview_restore_usb.png differ diff --git a/mod/etc/options_menu/images/preview_retroarch.png b/mod/etc/options_menu/images/preview_retroarch.png new file mode 100644 index 0000000..f4f126d Binary files /dev/null and b/mod/etc/options_menu/images/preview_retroarch.png differ diff --git a/mod/etc/options_menu/images/preview_saved_games.png b/mod/etc/options_menu/images/preview_saved_games.png new file mode 100644 index 0000000..e2c98db Binary files /dev/null and b/mod/etc/options_menu/images/preview_saved_games.png differ diff --git a/mod/etc/options_menu/images/preview_saves_backup_usb.png b/mod/etc/options_menu/images/preview_saves_backup_usb.png new file mode 100644 index 0000000..34b843d Binary files /dev/null and b/mod/etc/options_menu/images/preview_saves_backup_usb.png differ diff --git a/mod/etc/options_menu/images/preview_saves_restore_usb.png b/mod/etc/options_menu/images/preview_saves_restore_usb.png new file mode 100644 index 0000000..da4fba1 Binary files /dev/null and b/mod/etc/options_menu/images/preview_saves_restore_usb.png differ diff --git a/mod/etc/options_menu/images/preview_shutdown.png b/mod/etc/options_menu/images/preview_shutdown.png new file mode 100644 index 0000000..fcfaf0c Binary files /dev/null and b/mod/etc/options_menu/images/preview_shutdown.png differ diff --git a/mod/etc/options_menu/images/preview_system_info.png b/mod/etc/options_menu/images/preview_system_info.png new file mode 100644 index 0000000..588fca0 Binary files /dev/null and b/mod/etc/options_menu/images/preview_system_info.png differ diff --git a/mod/etc/options_menu/images/preview_temp.png b/mod/etc/options_menu/images/preview_temp.png new file mode 100644 index 0000000..8f2957e Binary files /dev/null and b/mod/etc/options_menu/images/preview_temp.png differ diff --git a/mod/etc/options_menu/images/preview_top.png b/mod/etc/options_menu/images/preview_top.png new file mode 100644 index 0000000..40e7829 Binary files /dev/null and b/mod/etc/options_menu/images/preview_top.png differ diff --git a/mod/etc/options_menu/images/preview_usb_rw.png b/mod/etc/options_menu/images/preview_usb_rw.png new file mode 100644 index 0000000..85b8481 Binary files /dev/null and b/mod/etc/options_menu/images/preview_usb_rw.png differ diff --git a/mod/etc/options_menu/images/ui/badge_inner.png b/mod/etc/options_menu/images/ui/badge_inner.png new file mode 100644 index 0000000..cf3db5e Binary files /dev/null and b/mod/etc/options_menu/images/ui/badge_inner.png differ diff --git a/mod/etc/options_menu/images/ui/badge_outer.png b/mod/etc/options_menu/images/ui/badge_outer.png new file mode 100644 index 0000000..7c168ef Binary files /dev/null and b/mod/etc/options_menu/images/ui/badge_outer.png differ diff --git a/mod/etc/options_menu/images/ui/checkbox_off.png b/mod/etc/options_menu/images/ui/checkbox_off.png new file mode 100644 index 0000000..ba6f48a Binary files /dev/null and b/mod/etc/options_menu/images/ui/checkbox_off.png differ diff --git a/mod/etc/options_menu/images/ui/checkbox_on.png b/mod/etc/options_menu/images/ui/checkbox_on.png new file mode 100644 index 0000000..3af58c8 Binary files /dev/null and b/mod/etc/options_menu/images/ui/checkbox_on.png differ diff --git a/mod/etc/options_menu/images/ui/chevron_right.png b/mod/etc/options_menu/images/ui/chevron_right.png new file mode 100644 index 0000000..8454d9b Binary files /dev/null and b/mod/etc/options_menu/images/ui/chevron_right.png differ diff --git a/mod/etc/options_menu/images/ui/chevron_up.png b/mod/etc/options_menu/images/ui/chevron_up.png new file mode 100644 index 0000000..06d53b5 Binary files /dev/null and b/mod/etc/options_menu/images/ui/chevron_up.png differ diff --git a/mod/etc/options_menu/images/ui/gear.png b/mod/etc/options_menu/images/ui/gear.png new file mode 100644 index 0000000..cdb23f2 Binary files /dev/null and b/mod/etc/options_menu/images/ui/gear.png differ diff --git a/mod/etc/options_menu/images/ui/switch_off.png b/mod/etc/options_menu/images/ui/switch_off.png new file mode 100644 index 0000000..61ba4b5 Binary files /dev/null and b/mod/etc/options_menu/images/ui/switch_off.png differ diff --git a/mod/etc/options_menu/images/ui/switch_on.png b/mod/etc/options_menu/images/ui/switch_on.png new file mode 100644 index 0000000..22d7c0d Binary files /dev/null and b/mod/etc/options_menu/images/ui/switch_on.png differ diff --git a/mod/etc/options_menu/language/commands/c0010_English b/mod/etc/options_menu/language/commands/c0010_English new file mode 100644 index 0000000..cad52e5 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0010_English @@ -0,0 +1,6 @@ +COMMAND_NAME=English +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo en-US > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_en.png +ROW_ICON=/etc/options_menu/images/flag_en_small.png diff --git a/mod/etc/options_menu/language/commands/c0020_French b/mod/etc/options_menu/language/commands/c0020_French new file mode 100644 index 0000000..470d7cc --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0020_French @@ -0,0 +1,6 @@ +COMMAND_NAME=Français +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo fr-FR > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_fr.png +ROW_ICON=/etc/options_menu/images/flag_fr_small.png diff --git a/mod/etc/options_menu/language/commands/c0030_German b/mod/etc/options_menu/language/commands/c0030_German new file mode 100644 index 0000000..25e206c --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0030_German @@ -0,0 +1,6 @@ +COMMAND_NAME=Deutsch +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo de-DE > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_de.png +ROW_ICON=/etc/options_menu/images/flag_de_small.png diff --git a/mod/etc/options_menu/language/commands/c0040_Spanish b/mod/etc/options_menu/language/commands/c0040_Spanish new file mode 100644 index 0000000..ec93ed0 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0040_Spanish @@ -0,0 +1,6 @@ +COMMAND_NAME=Español +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo es-ES > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_es.png +ROW_ICON=/etc/options_menu/images/flag_es_small.png diff --git a/mod/etc/options_menu/language/commands/c0050_Italian b/mod/etc/options_menu/language/commands/c0050_Italian new file mode 100644 index 0000000..21fe205 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0050_Italian @@ -0,0 +1,6 @@ +COMMAND_NAME=Italiano +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo it-IT > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_it.png +ROW_ICON=/etc/options_menu/images/flag_it_small.png diff --git a/mod/etc/options_menu/language/commands/c0060_Dutch b/mod/etc/options_menu/language/commands/c0060_Dutch new file mode 100644 index 0000000..5a784a9 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0060_Dutch @@ -0,0 +1,6 @@ +COMMAND_NAME=Nederlands +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo nl-NL > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_nl.png +ROW_ICON=/etc/options_menu/images/flag_nl_small.png diff --git a/mod/etc/options_menu/language/commands/c0070_Portuguese b/mod/etc/options_menu/language/commands/c0070_Portuguese new file mode 100644 index 0000000..e76ee89 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0070_Portuguese @@ -0,0 +1,6 @@ +COMMAND_NAME=Português (Europeu) +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo pt-PT > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_pt.png +ROW_ICON=/etc/options_menu/images/flag_pt_small.png diff --git a/mod/etc/options_menu/language/commands/c0080_Russian b/mod/etc/options_menu/language/commands/c0080_Russian new file mode 100644 index 0000000..3161462 --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0080_Russian @@ -0,0 +1,6 @@ +COMMAND_NAME=Русский +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo ru-RU > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_ru.png +ROW_ICON=/etc/options_menu/images/flag_ru_small.png diff --git a/mod/etc/options_menu/language/commands/c0090_Japanese b/mod/etc/options_menu/language/commands/c0090_Japanese new file mode 100644 index 0000000..b907b0a --- /dev/null +++ b/mod/etc/options_menu/language/commands/c0090_Japanese @@ -0,0 +1,6 @@ +COMMAND_NAME=日本語 +COMMAND_TYPE=EXTERNAL +RESTART_UI=FALSE +COMMAND_STR=echo ja-JP > /etc/options_menu/language.cfg && usleep 50000 && %options_path%/options --commandPath %options_path%/language/commands/ --title "LANGUAGE_OPTIONS" & +PREVIEW_IMAGE=/etc/options_menu/images/preview_lang_ja.png +ROW_ICON=/etc/options_menu/images/flag_ja_small.png diff --git a/mod/etc/options_menu/language/de-DE.lang b/mod/etc/options_menu/language/de-DE.lang new file mode 100644 index 0000000..18de9d2 --- /dev/null +++ b/mod/etc/options_menu/language/de-DE.lang @@ -0,0 +1,126 @@ +HIBERNATE=Ruhezustand/Standby +SHUTDOWN_DEVICE=Gerät ausschalten +REBOOT_DEVICE=Gerät neu starten +ADVANCED_OPTIONS=Erweiterte Optionen +NETWORK_OPTIONS=Netzwerk +EXIT=Beenden +MODULE_UNINSTALLER=Modul-Deinstallation +DISPLAY_TEMP=Temperatur anzeigen +RUN_TOP=Top ausführen +BENCHMARK_TOOL=Benchmark-Tool +DUMP_FILE_STRUCTURE=Dateistruktur exportieren (auf USB) +BACKUP_SAVES_USB=Spielstände auf USB sichern +RESTORE_SAVES_USB=Spielstände von USB wiederherstellen +BACKUP_SAVES_USB_DONE=Spielstände auf USB:/data/saves_backup gesichert +RESTORE_SAVES_USB_DONE=Spielstände von USB:/data/saves_backup wiederhergestellt +BACKUP_SAVES_USB_FAILED=Sicherung der Spielstände auf USB fehlgeschlagen. +RESTORE_SAVES_USB_FAILED=Wiederherstellung der Spielstände von USB fehlgeschlagen. +RESTORE_SAVES_USB_NOT_FOUND=Keine Spielstand-Sicherung auf USB gefunden. +TOGGLE_USB_WRITE=USB-Schreibzugriff umschalten +RA_DEBUGGER=RetroArch-Debugger (USB-Logs) +CHANGE_BUTTON_COMBO=Tastenkombination ändern +CLEAR_CACHE=Cache leeren +BACK=Zurück +LANGUAGE_OPTIONS=Sprache +DISPLAY_IP=IP-Adresse anzeigen +RECONNECT=Erneut verbinden +SEARCH_SSIDS=Nach SSIDs suchen +WIFI_BACKUP_NAND=Wifi-Konfiguration sichern (NAND) +WIFI_BACKUP_USB=Wifi-Konfiguration sichern (USB) +WIFI_RESTORE_NAND=Wifi-Konfiguration wiederherstellen (NAND) +WIFI_RESTORE_USB=Wifi-Konfiguration wiederherstellen (USB) +RA_RESTORE_DEFAULTS_ALL=Standardeinstellungen wiederherstellen (Alle) +RA_RESTORE_DEFAULTS=Standardeinstellungen wiederherstellen +RA_BACKUP_NAND=Einstellungen auf NAND sichern +RA_BACKUP_USB=Einstellungen auf USB sichern +RA_RESTORE_NAND=Einstellungen von NAND wiederherstellen +RA_RESTORE_USB=Einstellungen von USB wiederherstellen +RA_DELETE_BACKUPS=Alle Einstellungssicherungen löschen +RA_TRANSFER_BIOS=BIOS-Datei(en) übertragen +RA_DELETE_OVERRIDES=Spiel- und Core-Overrides löschen +RA_DELETE_REMAPS=Remap-Dateien löschen +RA_DELETE_BIOS=BIOS-Datei(en) von NAND löschen +RA_TOGGLE_LOAD_SCREENS=RA- und Canoe-Ladebildschirme umschalten +RESTORE_WIFI_CONFIG=Wifi-Konfiguration wiederherstellen +OPTIONS_TITLE=Optionen +LOADING=Wird geladen... +WIFI_BACKUP_SPLASH_LINE1=Wifi-Konfigurationsdatei wird gesichert +WIFI_BACKUP_SPLASH_LINE2=Bitte warten . . . +DELETE_BACKUP_CONFIRM=Diese Sicherung löschen? +DELETE_CONFIRM_GENERIC=Dieses Element löschen? +HINT_SELECT=Wählen +HINT_BACK=Zurück +HINT_DELETE=Löschen (Halten) +NO_NET_ERR=Verbindung zum Server fehlgeschlagen. Bitte Internetverbindung prüfen und erneut versuchen. +NO_PKG_ERR=Das angeforderte Paket ist derzeit nicht verfügbar. Bitte später erneut versuchen. +NOT_ENOUGH_SPACE=Nicht genügend freier Speicher, gib Speicher frei und versuche es erneut. +FREE_SPACE=frei +CHANGE_COMBO_INTRO_1=Wir legen jetzt die Tastenkombination für das Optionsmenü fest. +CHANGE_COMBO_INTRO_2=Du musst die 3 Tasten drücken, die für das Optionsmenü verwendet werden sollen. +CHANGE_COMBO_INTRO_3=Für eine Zwei-Tasten-Kombination einfach die 2. Taste wiederholen. +CHANGE_COMBO_CONTINUE=A zum Fortfahren, B zum Abbrechen. +CHANGE_COMBO_PRESS_1=Jetzt die erste Taste drücken... +CHANGE_COMBO_PRESS_2=Jetzt die zweite Taste drücken... +CHANGE_COMBO_PRESS_3=Jetzt die dritte Taste drücken... +CHANGE_COMBO_CHOSEN=Deine gewählte Kombination ist: +CHANGE_COMBO_CONFIRM=Wenn das stimmt, A drücken. Andernfalls eine beliebige andere Taste zum erneuten Versuch. +CHANGE_COMBO_DONE=Fertig. Bitte neu starten, damit die Änderung wirksam wird. +CHANGE_COMBO_WRITE_ERROR=Die Tastenkombination konnte nicht gespeichert werden. +MOD_UNINSTALLER_TO_REMOVE=Zu deinstallieren +HINT_UNINSTALL=Deinstallieren +MOD_UNINSTALL_CONFIRM=Diese Module entfernen? +HINT_MARK=Markieren +HINT_UNMARK=Abwählen +HINT_CONFIRM=Bestätigen +HINT_CANCEL=Abbrechen +MOD_UNINSTALL_NONE_MARKED=Kein Modul markiert. +MOD_UNINSTALL_NONE_HINT=Drücke A auf einem Modul, um es zu markieren. +MOD_UNINSTALL_EMPTY=Keine Module installiert. +MOD_UNINSTALL_REBOOT_NOTE=Die Konsole startet zum Abschluss neu. +CONTROLLER_OPTIONS=Controller +AUTOFIRE=Dauerfeuer +AUTOFIRE_SPEED_FAST=Schnell +AUTOFIRE_SPEED_NORMAL=Normal +AUTOFIRE_SPEED_SLOW=Langsam +AUTOFIRE_XY=X/Y als Turbo-A/B verwenden +HOME_COMBO=Tastenkombination fürs Hauptmenü +FC_START=Start am 2. Controller +EPILEPSY_PROTECTION=Epilepsieschutz (NES) +SYSTEM_INFO=Systeminformationen +SAVE_DMESG=Kernel-Log speichern (auf USB) +SAVE_DMESG_DONE=Kernel-Log gespeichert unter USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Konsole +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Spielstände +SYSINFO_FREE=frei +DIAGNOSTICS_OPTIONS=Diagnose +SAVE_MANAGER=Spielstand-Verwaltung +SAVE_MANAGER_BACKUP_DESC=Kopiert alle Spielstände nach USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Wähle Spielstände aus der USB-Sicherung und kopiere sie zurück auf die Konsole. Spielstände mit gleichem Namen werden ersetzt. +SAVE_MANAGER_CLEAN=Spielstände entfernter Spiele aufräumen +SAVE_MANAGER_CLEAN_DESC=Verschiebt Spielstände von Spielen, die nicht mehr auf der Konsole sind, nach USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Spielstände entfernter Spiele wiederherstellen +SAVE_MANAGER_RESTORE_DELETED_DESC=Holt verschobene Spielstände zurück, für wieder installierte Spiele. +SAVE_MANAGER_STAT_SAVES=Spielstände auf der Konsole +SAVE_MANAGER_STAT_BACKUP=Spielstände in der USB-Sicherung +SAVE_MANAGER_STAT_NONE=Keine +SAVE_MANAGER_STAT_ORPHANS=Spielstände entfernter Spiele +SAVE_MANAGER_STAT_KEPT=Beiseitegelegt +SAVE_MANAGER_BACKUP_CONFIRM=Spielstände auf USB sichern? +SAVE_MANAGER_RESTORE_CONFIRM=Spielstände von USB wiederherstellen? +SAVE_MANAGER_CLEAN_CONFIRM=Diese Spielstände beiseitelegen? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Diese Spielstände wiederherstellen? +SAVE_MANAGER_TO_MOVE=Zu verschieben +SAVE_MANAGER_TO_RESTORE=Wiederherzustellen +SAVE_MANAGER_NONE_MARKED=Keine Spielstände markiert. +SAVE_MANAGER_NONE_HINT=Drücke A auf einem Spielstand, um ihn zu markieren. +SAVE_MANAGER_NO_ORPHANS=Keine Spielstände entfernter Spiele gefunden. +SAVE_MANAGER_NO_DELETED=Keine beiseitegelegten Spielstände zum Wiederherstellen. +SAVE_MANAGER_CLEAN_NOTE=Aufbewahrt in USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Spielstände, die schon auf der Konsole sind, werden nicht ersetzt. +SAVE_MANAGER_RESTORE_USB_NOTE=Markierte Spielstände ersetzen die gleichnamigen auf der Konsole. +SAVE_MANAGER_WORKING=Wird ausgeführt... +HINT_OK=OK +HINT_MOVE=Verschieben +HINT_RESTORE=Wiederherstellen +SAVE_MANAGER_SELECT_ALL=Alle auswählen diff --git a/mod/etc/options_menu/language/en-US.lang b/mod/etc/options_menu/language/en-US.lang new file mode 100644 index 0000000..e89537c --- /dev/null +++ b/mod/etc/options_menu/language/en-US.lang @@ -0,0 +1,127 @@ +HIBERNATE=Hibernate/Standby +SHUTDOWN_DEVICE=Shutdown Device +REBOOT_DEVICE=Reboot Device +RETROARCH_OPTIONS=RetroArch +ADVANCED_OPTIONS=Advanced Options +NETWORK_OPTIONS=Network +EXIT=Exit +MODULE_UNINSTALLER=Module Uninstaller +DISPLAY_TEMP=Display Temp +RUN_TOP=Run Top +BENCHMARK_TOOL=Benchmark Tool +DUMP_FILE_STRUCTURE=Dump File Structure (to USB) +BACKUP_SAVES_USB=Backup Saved Games to USB +RESTORE_SAVES_USB=Restore Saved Games from USB +BACKUP_SAVES_USB_DONE=Saved games backed up to USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Saved games restored from USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Saved games backup to USB failed. +RESTORE_SAVES_USB_FAILED=Saved games restore from USB failed. +RESTORE_SAVES_USB_NOT_FOUND=No saved games backup found on USB. +TOGGLE_USB_WRITE=Toggle Write Access on USB +RA_DEBUGGER=RetroArch Debugger (USB logs) +CHANGE_BUTTON_COMBO=Change Options Button Combo +CLEAR_CACHE=Clear Cache +BACK=Back +LANGUAGE_OPTIONS=Language +DISPLAY_IP=Display IP Address +RECONNECT=Reconnect +SEARCH_SSIDS=Search for SSIDs +WIFI_BACKUP_NAND=Backup Wifi Config (NAND) +WIFI_BACKUP_USB=Backup Wifi Config (USB) +WIFI_RESTORE_NAND=Restore Wifi Config (NAND) +WIFI_RESTORE_USB=Restore Wifi Config (USB) +RA_RESTORE_DEFAULTS_ALL=Restore Default Settings (All) +RA_RESTORE_DEFAULTS=Restore Default Settings +RA_BACKUP_NAND=Backup Settings to NAND +RA_BACKUP_USB=Backup Settings to USB +RA_RESTORE_NAND=Restore Settings from NAND +RA_RESTORE_USB=Restore Settings from USB +RA_DELETE_BACKUPS=Delete all settings backups +RA_TRANSFER_BIOS=Transfer BIOS file(s) +RA_DELETE_OVERRIDES=Delete game and core overrides +RA_DELETE_REMAPS=Delete remap files +RA_DELETE_BIOS=Delete BIOS file(s) from NAND +RA_TOGGLE_LOAD_SCREENS=Toggle RA and Canoe load screens +RESTORE_WIFI_CONFIG=Restore WIFI Config +OPTIONS_TITLE=Options +LOADING=Loading... +WIFI_BACKUP_SPLASH_LINE1=Backup Wifi Config File +WIFI_BACKUP_SPLASH_LINE2=Please Wait . . . +DELETE_BACKUP_CONFIRM=Delete this backup? +DELETE_CONFIRM_GENERIC=Delete this item? +HINT_SELECT=Select +HINT_BACK=Back +HINT_DELETE=Delete (Hold) +NO_NET_ERR=Error while connecting to server, please check your internet connection and try again. +NO_PKG_ERR=The package you requested isn't available at the moment, please try again later. +NOT_ENOUGH_SPACE=Not enough free space, free some space and try again. +FREE_SPACE=free +CHANGE_COMBO_INTRO_1=We will now set your options menu combo buttons. +CHANGE_COMBO_INTRO_2=You will need to press the 3 buttons you want the options menu set to. +CHANGE_COMBO_INTRO_3=For a two button combo just repeat the 2nd button. +CHANGE_COMBO_CONTINUE=Press A to continue, or B to cancel. +CHANGE_COMBO_PRESS_1=Press the first button now... +CHANGE_COMBO_PRESS_2=Press the second button now... +CHANGE_COMBO_PRESS_3=Press the third button now... +CHANGE_COMBO_CHOSEN=Your chosen options menu combo is: +CHANGE_COMBO_CONFIRM=If this is correct press A. If not press any other button to try again. +CHANGE_COMBO_DONE=Done. Please reboot to take effect. +CHANGE_COMBO_WRITE_ERROR=Could not write button combo to file. +MOD_UNINSTALLER_TO_REMOVE=To Uninstall +HINT_UNINSTALL=Uninstall +MOD_UNINSTALL_CONFIRM=Remove these modules? +HINT_MARK=Mark +HINT_UNMARK=Unmark +HINT_CONFIRM=Confirm +HINT_CANCEL=Cancel +MOD_UNINSTALL_NONE_MARKED=No modules marked. +MOD_UNINSTALL_NONE_HINT=Press A on a module to mark it. +MOD_UNINSTALL_EMPTY=No modules installed. +MOD_UNINSTALL_REBOOT_NOTE=The console reboots to finish. +CONTROLLER_OPTIONS=Controller +AUTOFIRE=Autofire +AUTOFIRE_SPEED_FAST=Fast speed +AUTOFIRE_SPEED_NORMAL=Normal speed +AUTOFIRE_SPEED_SLOW=Slow speed +AUTOFIRE_XY=Use X/Y as turbo A/B +HOME_COMBO=Home menu button combo +FC_START=Start on 2nd controller +EPILEPSY_PROTECTION=Epilepsy protection (NES) +SYSTEM_INFO=System Information +SAVE_DMESG=Save kernel log (to USB) +SAVE_DMESG_DONE=Kernel log saved to USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Console +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Saves +SYSINFO_FREE=free +DIAGNOSTICS_OPTIONS=Diagnostics +SAVE_MANAGER=Save Manager +SAVE_MANAGER_BACKUP_DESC=Copies every saved game to USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Choose saves from the USB backup and copy them back to the console. Saves with the same name are replaced. +SAVE_MANAGER_CLEAN=Clean Saves of Removed Games +SAVE_MANAGER_CLEAN_DESC=Moves saves of games that are no longer on the console to USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Restore Saves of Removed Games +SAVE_MANAGER_RESTORE_DELETED_DESC=Brings moved saves back, for games you installed again. +SAVE_MANAGER_STAT_SAVES=Saves on console +SAVE_MANAGER_STAT_BACKUP=Saves in USB backup +SAVE_MANAGER_STAT_NONE=None +SAVE_MANAGER_STAT_ORPHANS=Saves of removed games +SAVE_MANAGER_STAT_KEPT=Moved aside +SAVE_MANAGER_BACKUP_CONFIRM=Back up saved games to USB? +SAVE_MANAGER_RESTORE_CONFIRM=Restore saved games from USB? +SAVE_MANAGER_CLEAN_CONFIRM=Move these saves aside? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Restore these saves? +SAVE_MANAGER_TO_MOVE=To Move +SAVE_MANAGER_TO_RESTORE=To Restore +SAVE_MANAGER_NONE_MARKED=No saves marked. +SAVE_MANAGER_NONE_HINT=Press A on a save to mark it. +SAVE_MANAGER_NO_ORPHANS=No saves of removed games found. +SAVE_MANAGER_NO_DELETED=No moved saves to restore. +SAVE_MANAGER_CLEAN_NOTE=Kept in USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Saves already on the console are not replaced. +SAVE_MANAGER_RESTORE_USB_NOTE=Marked saves replace the ones with the same name on the console. +SAVE_MANAGER_WORKING=Working... +HINT_OK=OK +HINT_MOVE=Move +HINT_RESTORE=Restore +SAVE_MANAGER_SELECT_ALL=Select all diff --git a/mod/etc/options_menu/language/es-ES.lang b/mod/etc/options_menu/language/es-ES.lang new file mode 100644 index 0000000..60c1923 --- /dev/null +++ b/mod/etc/options_menu/language/es-ES.lang @@ -0,0 +1,126 @@ +HIBERNATE=Hibernar/Reposo +SHUTDOWN_DEVICE=Apagar dispositivo +REBOOT_DEVICE=Reiniciar dispositivo +ADVANCED_OPTIONS=Opciones avanzadas +NETWORK_OPTIONS=Red +EXIT=Salir +MODULE_UNINSTALLER=Desinstalador de módulos +DISPLAY_TEMP=Mostrar temperatura +RUN_TOP=Ejecutar Top +BENCHMARK_TOOL=Herramienta de benchmark +DUMP_FILE_STRUCTURE=Exportar estructura de archivos (a USB) +BACKUP_SAVES_USB=Copiar partidas guardadas a USB +RESTORE_SAVES_USB=Restaurar partidas guardadas desde USB +BACKUP_SAVES_USB_DONE=Partidas guardadas copiadas a USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Partidas guardadas restauradas desde USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Error al copiar las partidas guardadas a USB. +RESTORE_SAVES_USB_FAILED=Error al restaurar las partidas guardadas desde USB. +RESTORE_SAVES_USB_NOT_FOUND=No se encontró ninguna copia de seguridad de partidas guardadas en la USB. +TOGGLE_USB_WRITE=Alternar escritura en USB +RA_DEBUGGER=Depurador de RetroArch (logs USB) +CHANGE_BUTTON_COMBO=Cambiar combinación de botones +CLEAR_CACHE=Vaciar caché +BACK=Atrás +LANGUAGE_OPTIONS=Idioma +DISPLAY_IP=Mostrar dirección IP +RECONNECT=Reconectar +SEARCH_SSIDS=Buscar SSID +WIFI_BACKUP_NAND=Copia de seguridad de Wifi (NAND) +WIFI_BACKUP_USB=Copia de seguridad de Wifi (USB) +WIFI_RESTORE_NAND=Restaurar configuración Wifi (NAND) +WIFI_RESTORE_USB=Restaurar configuración Wifi (USB) +RA_RESTORE_DEFAULTS_ALL=Restaurar valores predeterminados (Todo) +RA_RESTORE_DEFAULTS=Restaurar valores predeterminados +RA_BACKUP_NAND=Copiar ajustes a NAND +RA_BACKUP_USB=Copiar ajustes a USB +RA_RESTORE_NAND=Restaurar ajustes desde NAND +RA_RESTORE_USB=Restaurar ajustes desde USB +RA_DELETE_BACKUPS=Borrar todas las copias de seguridad +RA_TRANSFER_BIOS=Transferir archivo(s) BIOS +RA_DELETE_OVERRIDES=Borrar overrides de juego y core +RA_DELETE_REMAPS=Borrar archivos de remapeo +RA_DELETE_BIOS=Borrar archivo(s) BIOS de NAND +RA_TOGGLE_LOAD_SCREENS=Alternar pantallas de carga de RA y Canoe +RESTORE_WIFI_CONFIG=Restaurar configuración Wifi +OPTIONS_TITLE=Opciones +LOADING=Cargando... +WIFI_BACKUP_SPLASH_LINE1=Copiando archivo de configuración Wifi +WIFI_BACKUP_SPLASH_LINE2=Espere por favor . . . +DELETE_BACKUP_CONFIRM=¿Borrar esta copia de seguridad? +DELETE_CONFIRM_GENERIC=¿Borrar este elemento? +HINT_SELECT=Seleccionar +HINT_BACK=Atrás +HINT_DELETE=Borrar (mantener) +NO_NET_ERR=Error al conectar con el servidor, comprueba tu conexión a internet e inténtalo de nuevo. +NO_PKG_ERR=El paquete solicitado no está disponible en este momento, inténtalo de nuevo más tarde. +NOT_ENOUGH_SPACE=No hay suficiente espacio libre, libera espacio e inténtalo de nuevo. +FREE_SPACE=libres +CHANGE_COMBO_INTRO_1=Ahora vamos a configurar la combinación de botones del menú de opciones. +CHANGE_COMBO_INTRO_2=Tendrás que pulsar los 3 botones que quieras usar para el menú de opciones. +CHANGE_COMBO_INTRO_3=Para una combinación de 2 botones, repite el 2º botón. +CHANGE_COMBO_CONTINUE=Pulsa A para continuar, o B para cancelar. +CHANGE_COMBO_PRESS_1=Pulsa el primer botón ahora... +CHANGE_COMBO_PRESS_2=Pulsa el segundo botón ahora... +CHANGE_COMBO_PRESS_3=Pulsa el tercer botón ahora... +CHANGE_COMBO_CHOSEN=La combinación elegida es: +CHANGE_COMBO_CONFIRM=Si es correcta pulsa A. Si no, pulsa cualquier otro botón para intentarlo de nuevo. +CHANGE_COMBO_DONE=Listo. Reinicia la consola para aplicar los cambios. +CHANGE_COMBO_WRITE_ERROR=No se pudo guardar la combinación en el archivo. +MOD_UNINSTALLER_TO_REMOVE=Para desinstalar +HINT_UNINSTALL=Desinstalar +MOD_UNINSTALL_CONFIRM=¿Eliminar estos módulos? +HINT_MARK=Marcar +HINT_UNMARK=Desmarcar +HINT_CONFIRM=Confirmar +HINT_CANCEL=Cancelar +MOD_UNINSTALL_NONE_MARKED=Ningún módulo marcado. +MOD_UNINSTALL_NONE_HINT=Pulsa A en un módulo para marcarlo. +MOD_UNINSTALL_EMPTY=No hay módulos instalados. +MOD_UNINSTALL_REBOOT_NOTE=La consola se reinicia para terminar. +CONTROLLER_OPTIONS=Mando +AUTOFIRE=Autodisparo +AUTOFIRE_SPEED_FAST=Velocidad rápida +AUTOFIRE_SPEED_NORMAL=Velocidad normal +AUTOFIRE_SPEED_SLOW=Velocidad lenta +AUTOFIRE_XY=Usar X/Y como turbo A/B +HOME_COMBO=Combo para el menú de inicio +FC_START=Start en el 2.º mando +EPILEPSY_PROTECTION=Protección contra epilepsia (NES) +SYSTEM_INFO=Información del sistema +SAVE_DMESG=Guardar log del kernel (en USB) +SAVE_DMESG_DONE=Log del kernel guardado en USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Consola +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Partidas +SYSINFO_FREE=libres +DIAGNOSTICS_OPTIONS=Diagnóstico +SAVE_MANAGER=Gestor de Partidas +SAVE_MANAGER_BACKUP_DESC=Copia todas las partidas guardadas en USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Elige partidas de la copia de seguridad de la USB y cópialas de vuelta a la consola. Las partidas con el mismo nombre se reemplazan. +SAVE_MANAGER_CLEAN=Limpiar Partidas de Juegos Eliminados +SAVE_MANAGER_CLEAN_DESC=Mueve las partidas de juegos que ya no están en la consola a USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Restaurar Partidas de Juegos Eliminados +SAVE_MANAGER_RESTORE_DELETED_DESC=Devuelve las partidas movidas, para juegos que has vuelto a instalar. +SAVE_MANAGER_STAT_SAVES=Partidas en la consola +SAVE_MANAGER_STAT_BACKUP=Partidas en la copia USB +SAVE_MANAGER_STAT_NONE=Ninguna +SAVE_MANAGER_STAT_ORPHANS=Partidas de juegos eliminados +SAVE_MANAGER_STAT_KEPT=Apartadas +SAVE_MANAGER_BACKUP_CONFIRM=¿Copiar las partidas guardadas a la USB? +SAVE_MANAGER_RESTORE_CONFIRM=¿Restaurar las partidas guardadas desde la USB? +SAVE_MANAGER_CLEAN_CONFIRM=¿Apartar estas partidas? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=¿Restaurar estas partidas? +SAVE_MANAGER_TO_MOVE=A Mover +SAVE_MANAGER_TO_RESTORE=A Restaurar +SAVE_MANAGER_NONE_MARKED=Ninguna partida marcada. +SAVE_MANAGER_NONE_HINT=Pulsa A en una partida para marcarla. +SAVE_MANAGER_NO_ORPHANS=No hay partidas de juegos eliminados. +SAVE_MANAGER_NO_DELETED=No hay partidas apartadas para restaurar. +SAVE_MANAGER_CLEAN_NOTE=Guardadas en USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Las partidas que ya están en la consola no se reemplazan. +SAVE_MANAGER_RESTORE_USB_NOTE=Las partidas marcadas reemplazan a las del mismo nombre en la consola. +SAVE_MANAGER_WORKING=Procesando... +HINT_OK=OK +HINT_MOVE=Mover +HINT_RESTORE=Restaurar +SAVE_MANAGER_SELECT_ALL=Seleccionar todo diff --git a/mod/etc/options_menu/language/fr-FR.lang b/mod/etc/options_menu/language/fr-FR.lang new file mode 100644 index 0000000..67b10c6 --- /dev/null +++ b/mod/etc/options_menu/language/fr-FR.lang @@ -0,0 +1,126 @@ +HIBERNATE=Hibernation/Veille +SHUTDOWN_DEVICE=Éteindre l'appareil +REBOOT_DEVICE=Redémarrer l'appareil +ADVANCED_OPTIONS=Options avancées +NETWORK_OPTIONS=Réseau +EXIT=Quitter +MODULE_UNINSTALLER=Désinstalleur de modules +DISPLAY_TEMP=Afficher la température +RUN_TOP=Exécuter Top +BENCHMARK_TOOL=Outil de benchmark +DUMP_FILE_STRUCTURE=Exporter la structure des fichiers (vers USB) +BACKUP_SAVES_USB=Sauvegarder les sauvegardes de jeu sur USB +RESTORE_SAVES_USB=Restaurer les sauvegardes de jeu depuis l'USB +BACKUP_SAVES_USB_DONE=Sauvegardes de jeu copiées sur USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Sauvegardes de jeu restaurées depuis USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Échec de la copie des sauvegardes sur USB. +RESTORE_SAVES_USB_FAILED=Échec de la restauration des sauvegardes depuis USB. +RESTORE_SAVES_USB_NOT_FOUND=Aucune sauvegarde de jeu trouvée sur l'USB. +TOGGLE_USB_WRITE=Activer/désactiver l'écriture USB +RA_DEBUGGER=Débogueur RetroArch (logs USB) +CHANGE_BUTTON_COMBO=Changer la combinaison de boutons +CLEAR_CACHE=Vider le cache +BACK=Retour +LANGUAGE_OPTIONS=Langue +DISPLAY_IP=Afficher l'adresse IP +RECONNECT=Reconnecter +SEARCH_SSIDS=Rechercher des SSID +WIFI_BACKUP_NAND=Sauvegarder la config Wifi (NAND) +WIFI_BACKUP_USB=Sauvegarder la config Wifi (USB) +WIFI_RESTORE_NAND=Restaurer la config Wifi (NAND) +WIFI_RESTORE_USB=Restaurer la config Wifi (USB) +RA_RESTORE_DEFAULTS_ALL=Restaurer les réglages par défaut (Tout) +RA_RESTORE_DEFAULTS=Restaurer les réglages par défaut +RA_BACKUP_NAND=Sauvegarder les réglages sur NAND +RA_BACKUP_USB=Sauvegarder les réglages sur USB +RA_RESTORE_NAND=Restaurer les réglages depuis la NAND +RA_RESTORE_USB=Restaurer les réglages depuis l'USB +RA_DELETE_BACKUPS=Supprimer toutes les sauvegardes +RA_TRANSFER_BIOS=Transférer le(s) fichier(s) BIOS +RA_DELETE_OVERRIDES=Supprimer les overrides de jeu et de core +RA_DELETE_REMAPS=Supprimer les fichiers de remap +RA_DELETE_BIOS=Supprimer le(s) fichier(s) BIOS de la NAND +RA_TOGGLE_LOAD_SCREENS=Activer/désactiver les écrans de chargement RA et Canoe +RESTORE_WIFI_CONFIG=Restaurer la config Wifi +OPTIONS_TITLE=Options +LOADING=Chargement... +WIFI_BACKUP_SPLASH_LINE1=Sauvegarde du fichier de config Wifi +WIFI_BACKUP_SPLASH_LINE2=Veuillez patienter . . . +DELETE_BACKUP_CONFIRM=Supprimer cette sauvegarde? +DELETE_CONFIRM_GENERIC=Supprimer cet élément? +HINT_SELECT=Sélect. +HINT_BACK=Retour +HINT_DELETE=Suppr. (Maintenir) +NO_NET_ERR=Erreur de connexion au serveur, vérifiez votre connexion internet et réessayez. +NO_PKG_ERR=Le paquet demandé n'est pas disponible pour le moment, veuillez réessayer plus tard. +NOT_ENOUGH_SPACE=Espace libre insuffisant, libérez de l'espace et réessayez. +FREE_SPACE=libres +CHANGE_COMBO_INTRO_1=Nous allons maintenant définir la combinaison de boutons du menu d'options. +CHANGE_COMBO_INTRO_2=Tu devras appuyer sur les 3 boutons à utiliser pour le menu d'options. +CHANGE_COMBO_INTRO_3=Pour une combinaison à 2 boutons, répète simplement le 2e bouton. +CHANGE_COMBO_CONTINUE=Appuie sur A pour continuer, ou B pour annuler. +CHANGE_COMBO_PRESS_1=Appuie sur le premier bouton maintenant... +CHANGE_COMBO_PRESS_2=Appuie sur le deuxième bouton maintenant... +CHANGE_COMBO_PRESS_3=Appuie sur le troisième bouton maintenant... +CHANGE_COMBO_CHOSEN=La combinaison choisie est : +CHANGE_COMBO_CONFIRM=Si c'est correct, appuie sur A. Sinon, appuie sur un autre bouton pour réessayer. +CHANGE_COMBO_DONE=Terminé. Redémarre la console pour appliquer les changements. +CHANGE_COMBO_WRITE_ERROR=Impossible d'enregistrer la combinaison dans le fichier. +MOD_UNINSTALLER_TO_REMOVE=À désinstaller +HINT_UNINSTALL=Désinstaller +MOD_UNINSTALL_CONFIRM=Supprimer ces modules ? +HINT_MARK=Cocher +HINT_UNMARK=Décocher +HINT_CONFIRM=Confirmer +HINT_CANCEL=Annuler +MOD_UNINSTALL_NONE_MARKED=Aucun module coché. +MOD_UNINSTALL_NONE_HINT=Appuie sur A sur un module pour le cocher. +MOD_UNINSTALL_EMPTY=Aucun module installé. +MOD_UNINSTALL_REBOOT_NOTE=La console redémarre pour terminer. +CONTROLLER_OPTIONS=Manette +AUTOFIRE=Tir automatique +AUTOFIRE_SPEED_FAST=Vitesse rapide +AUTOFIRE_SPEED_NORMAL=Vitesse normale +AUTOFIRE_SPEED_SLOW=Vitesse lente +AUTOFIRE_XY=Utiliser X/Y comme turbo A/B +HOME_COMBO=Combo pour le menu d'accueil +FC_START=Start sur la 2e manette +EPILEPSY_PROTECTION=Protection contre l'épilepsie (NES) +SYSTEM_INFO=Informations système +SAVE_DMESG=Enregistrer le log du noyau (sur USB) +SAVE_DMESG_DONE=Log du noyau enregistré sur USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Console +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Sauvegardes +SYSINFO_FREE=libres +DIAGNOSTICS_OPTIONS=Diagnostic +SAVE_MANAGER=Gestionnaire de Sauvegardes +SAVE_MANAGER_BACKUP_DESC=Copie toutes les sauvegardes vers USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Choisissez des sauvegardes dans la sauvegarde USB et recopiez-les sur la console. Les sauvegardes portant le même nom sont remplacées. +SAVE_MANAGER_CLEAN=Nettoyer les Sauvegardes de Jeux Supprimés +SAVE_MANAGER_CLEAN_DESC=Déplace les sauvegardes des jeux qui ne sont plus sur la console vers USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Restaurer les Sauvegardes de Jeux Supprimés +SAVE_MANAGER_RESTORE_DELETED_DESC=Remet en place les sauvegardes déplacées, pour les jeux réinstallés. +SAVE_MANAGER_STAT_SAVES=Sauvegardes sur la console +SAVE_MANAGER_STAT_BACKUP=Sauvegardes dans la copie USB +SAVE_MANAGER_STAT_NONE=Aucune +SAVE_MANAGER_STAT_ORPHANS=Sauvegardes de jeux supprimés +SAVE_MANAGER_STAT_KEPT=Mises de côté +SAVE_MANAGER_BACKUP_CONFIRM=Copier les sauvegardes sur la USB ? +SAVE_MANAGER_RESTORE_CONFIRM=Restaurer les sauvegardes depuis la USB ? +SAVE_MANAGER_CLEAN_CONFIRM=Mettre ces sauvegardes de côté ? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Restaurer ces sauvegardes ? +SAVE_MANAGER_TO_MOVE=À Déplacer +SAVE_MANAGER_TO_RESTORE=À Restaurer +SAVE_MANAGER_NONE_MARKED=Aucune sauvegarde cochée. +SAVE_MANAGER_NONE_HINT=Appuyez sur A sur une sauvegarde pour la cocher. +SAVE_MANAGER_NO_ORPHANS=Aucune sauvegarde de jeu supprimé. +SAVE_MANAGER_NO_DELETED=Aucune sauvegarde mise de côté à restaurer. +SAVE_MANAGER_CLEAN_NOTE=Conservées dans USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Les sauvegardes déjà présentes sur la console ne sont pas remplacées. +SAVE_MANAGER_RESTORE_USB_NOTE=Les sauvegardes cochées remplacent celles du même nom sur la console. +SAVE_MANAGER_WORKING=En cours... +HINT_OK=OK +HINT_MOVE=Déplacer +HINT_RESTORE=Restaurer +SAVE_MANAGER_SELECT_ALL=Tout sélectionner diff --git a/mod/etc/options_menu/language/it-IT.lang b/mod/etc/options_menu/language/it-IT.lang new file mode 100644 index 0000000..8ca5d06 --- /dev/null +++ b/mod/etc/options_menu/language/it-IT.lang @@ -0,0 +1,126 @@ +HIBERNATE=Ibernazione/Standby +SHUTDOWN_DEVICE=Spegni dispositivo +REBOOT_DEVICE=Riavvia dispositivo +ADVANCED_OPTIONS=Opzioni avanzate +NETWORK_OPTIONS=Rete +EXIT=Esci +MODULE_UNINSTALLER=Disinstallatore moduli +DISPLAY_TEMP=Mostra temperatura +RUN_TOP=Esegui Top +BENCHMARK_TOOL=Strumento di benchmark +DUMP_FILE_STRUCTURE=Esporta struttura file (su USB) +BACKUP_SAVES_USB=Backup salvataggi su USB +RESTORE_SAVES_USB=Ripristina salvataggi da USB +BACKUP_SAVES_USB_DONE=Salvataggi copiati su USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Salvataggi ripristinati da USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Copia dei salvataggi su USB non riuscita. +RESTORE_SAVES_USB_FAILED=Ripristino dei salvataggi da USB non riuscito. +RESTORE_SAVES_USB_NOT_FOUND=Nessun backup dei salvataggi trovato sulla USB. +TOGGLE_USB_WRITE=Attiva/disattiva scrittura USB +RA_DEBUGGER=Debugger RetroArch (log USB) +CHANGE_BUTTON_COMBO=Cambia combinazione pulsanti +CLEAR_CACHE=Svuota cache +BACK=Indietro +LANGUAGE_OPTIONS=Lingua +DISPLAY_IP=Mostra indirizzo IP +RECONNECT=Riconnetti +SEARCH_SSIDS=Cerca SSID +WIFI_BACKUP_NAND=Backup configurazione Wifi (NAND) +WIFI_BACKUP_USB=Backup configurazione Wifi (USB) +WIFI_RESTORE_NAND=Ripristina configurazione Wifi (NAND) +WIFI_RESTORE_USB=Ripristina configurazione Wifi (USB) +RA_RESTORE_DEFAULTS_ALL=Ripristina impostazioni predefinite (Tutto) +RA_RESTORE_DEFAULTS=Ripristina impostazioni predefinite +RA_BACKUP_NAND=Backup impostazioni su NAND +RA_BACKUP_USB=Backup impostazioni su USB +RA_RESTORE_NAND=Ripristina impostazioni da NAND +RA_RESTORE_USB=Ripristina impostazioni da USB +RA_DELETE_BACKUPS=Elimina tutti i backup delle impostazioni +RA_TRANSFER_BIOS=Trasferisci file BIOS +RA_DELETE_OVERRIDES=Elimina override di gioco e core +RA_DELETE_REMAPS=Elimina file di remap +RA_DELETE_BIOS=Elimina file BIOS da NAND +RA_TOGGLE_LOAD_SCREENS=Attiva/disattiva schermate di caricamento RA e Canoe +RESTORE_WIFI_CONFIG=Ripristina configurazione Wifi +OPTIONS_TITLE=Opzioni +LOADING=Caricamento... +WIFI_BACKUP_SPLASH_LINE1=Backup del file di configurazione Wifi +WIFI_BACKUP_SPLASH_LINE2=Attendere prego . . . +DELETE_BACKUP_CONFIRM=Eliminare questo backup? +DELETE_CONFIRM_GENERIC=Eliminare questo elemento? +HINT_SELECT=Seleziona +HINT_BACK=Indietro +HINT_DELETE=Elimina (tieni premuto) +NO_NET_ERR=Errore di connessione al server, controlla la tua connessione internet e riprova. +NO_PKG_ERR=Il pacchetto richiesto non è disponibile al momento, riprova più tardi. +NOT_ENOUGH_SPACE=Spazio libero insufficiente, libera spazio e riprova. +FREE_SPACE=liberi +CHANGE_COMBO_INTRO_1=Ora imposteremo la combinazione di tasti del menu opzioni. +CHANGE_COMBO_INTRO_2=Dovrai premere i 3 tasti che vuoi impostare per il menu opzioni. +CHANGE_COMBO_INTRO_3=Per una combinazione a 2 tasti, ripeti semplicemente il 2° tasto. +CHANGE_COMBO_CONTINUE=Premi A per continuare, o B per annullare. +CHANGE_COMBO_PRESS_1=Premi il primo tasto ora... +CHANGE_COMBO_PRESS_2=Premi il secondo tasto ora... +CHANGE_COMBO_PRESS_3=Premi il terzo tasto ora... +CHANGE_COMBO_CHOSEN=La combinazione scelta è: +CHANGE_COMBO_CONFIRM=Se è corretta premi A. Altrimenti premi un altro tasto per riprovare. +CHANGE_COMBO_DONE=Fatto. Riavvia la console per applicare le modifiche. +CHANGE_COMBO_WRITE_ERROR=Impossibile salvare la combinazione nel file. +MOD_UNINSTALLER_TO_REMOVE=Da disinstallare +HINT_UNINSTALL=Disinstalla +MOD_UNINSTALL_CONFIRM=Rimuovere questi moduli? +HINT_MARK=Seleziona +HINT_UNMARK=Deseleziona +HINT_CONFIRM=Conferma +HINT_CANCEL=Annulla +MOD_UNINSTALL_NONE_MARKED=Nessun modulo selezionato. +MOD_UNINSTALL_NONE_HINT=Premi A su un modulo per selezionarlo. +MOD_UNINSTALL_EMPTY=Nessun modulo installato. +MOD_UNINSTALL_REBOOT_NOTE=La console si riavvia per completare. +CONTROLLER_OPTIONS=Controller +AUTOFIRE=Fuoco automatico +AUTOFIRE_SPEED_FAST=Velocità rapida +AUTOFIRE_SPEED_NORMAL=Velocità normale +AUTOFIRE_SPEED_SLOW=Velocità lenta +AUTOFIRE_XY=Usa X/Y come turbo A/B +HOME_COMBO=Combo per il menu principale +FC_START=Start sul 2° controller +EPILEPSY_PROTECTION=Protezione epilessia (NES) +SYSTEM_INFO=Informazioni di sistema +SAVE_DMESG=Salva log del kernel (su USB) +SAVE_DMESG_DONE=Log del kernel salvato in USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Console +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Salvataggi +SYSINFO_FREE=liberi +DIAGNOSTICS_OPTIONS=Diagnostica +SAVE_MANAGER=Gestione Salvataggi +SAVE_MANAGER_BACKUP_DESC=Copia tutti i salvataggi su USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Scegli i salvataggi dal backup della USB e ricopiali sulla console. I salvataggi con lo stesso nome vengono sostituiti. +SAVE_MANAGER_CLEAN=Pulisci Salvataggi di Giochi Rimossi +SAVE_MANAGER_CLEAN_DESC=Sposta i salvataggi dei giochi non più presenti sulla console in USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Ripristina Salvataggi di Giochi Rimossi +SAVE_MANAGER_RESTORE_DELETED_DESC=Riporta i salvataggi spostati, per i giochi reinstallati. +SAVE_MANAGER_STAT_SAVES=Salvataggi sulla console +SAVE_MANAGER_STAT_BACKUP=Salvataggi nel backup USB +SAVE_MANAGER_STAT_NONE=Nessuno +SAVE_MANAGER_STAT_ORPHANS=Salvataggi di giochi rimossi +SAVE_MANAGER_STAT_KEPT=Messi da parte +SAVE_MANAGER_BACKUP_CONFIRM=Copiare i salvataggi sulla USB? +SAVE_MANAGER_RESTORE_CONFIRM=Ripristinare i salvataggi dalla USB? +SAVE_MANAGER_CLEAN_CONFIRM=Mettere da parte questi salvataggi? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Ripristinare questi salvataggi? +SAVE_MANAGER_TO_MOVE=Da Spostare +SAVE_MANAGER_TO_RESTORE=Da Ripristinare +SAVE_MANAGER_NONE_MARKED=Nessun salvataggio selezionato. +SAVE_MANAGER_NONE_HINT=Premi A su un salvataggio per selezionarlo. +SAVE_MANAGER_NO_ORPHANS=Nessun salvataggio di giochi rimossi. +SAVE_MANAGER_NO_DELETED=Nessun salvataggio messo da parte da ripristinare. +SAVE_MANAGER_CLEAN_NOTE=Conservati in USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=I salvataggi già presenti sulla console non vengono sostituiti. +SAVE_MANAGER_RESTORE_USB_NOTE=I salvataggi selezionati sostituiscono quelli con lo stesso nome sulla console. +SAVE_MANAGER_WORKING=Elaborazione... +HINT_OK=OK +HINT_MOVE=Sposta +HINT_RESTORE=Ripristina +SAVE_MANAGER_SELECT_ALL=Seleziona tutto diff --git a/mod/etc/options_menu/language/ja-JP.lang b/mod/etc/options_menu/language/ja-JP.lang new file mode 100644 index 0000000..cf1fc29 --- /dev/null +++ b/mod/etc/options_menu/language/ja-JP.lang @@ -0,0 +1,126 @@ +HIBERNATE=ねむらせる +SHUTDOWN_DEVICE=でんげんをきる +REBOOT_DEVICE=さいきどうする +ADVANCED_OPTIONS=じょうきゅうせってい +NETWORK_OPTIONS=Network +EXIT=おわる +MODULE_UNINSTALLER=Moduleのさくじょ +DISPLAY_TEMP=おんどをひょうじ +RUN_TOP=topをじっこう +BENCHMARK_TOOL=Benchmarkのどうぐ +DUMP_FILE_STRUCTURE=Fileこうぞうをほぞん (USBへ) +BACKUP_SAVES_USB=セーブデータのBackup (USB) +RESTORE_SAVES_USB=セーブデータをもどす (USB) +BACKUP_SAVES_USB_DONE=セーブデータをUSB:/data/saves_backupにほぞんしました +RESTORE_SAVES_USB_DONE=セーブデータをUSB:/data/saves_backupからもどしました +BACKUP_SAVES_USB_FAILED=USBへのセーブデータのほぞんにしっぱいしました +RESTORE_SAVES_USB_FAILED=USBからのセーブデータのふくげんにしっぱいしました +RESTORE_SAVES_USB_NOT_FOUND=USBにセーブデータのBackupがみつかりません +TOGGLE_USB_WRITE=USBへのかきこみをきりかえ +RA_DEBUGGER=RAのDebugger (USB Log) +CHANGE_BUTTON_COMBO=Buttonくみあわせをへんこう +CLEAR_CACHE=Cacheをけす +BACK=もどる +LANGUAGE_OPTIONS=げんご +DISPLAY_IP=IP Addressをひょうじ +RECONNECT=さいせつぞく +SEARCH_SSIDS=SSIDをさがす +WIFI_BACKUP_NAND=WifiせっていのBackup (NAND) +WIFI_BACKUP_USB=WifiせっていのBackup (USB) +WIFI_RESTORE_NAND=Wifiせっていをもどす (NAND) +WIFI_RESTORE_USB=Wifiせっていをもどす (USB) +RA_RESTORE_DEFAULTS_ALL=しょきせっていにもどす (すべて) +RA_RESTORE_DEFAULTS=しょきせっていにもどす +RA_BACKUP_NAND=RAせっていのBackup (NAND) +RA_BACKUP_USB=RAせっていのBackup (USB) +RA_RESTORE_NAND=RAせっていをもどす (NAND) +RA_RESTORE_USB=RAせっていをもどす (USB) +RA_DELETE_BACKUPS=ぜんBackupをさくじょ +RA_TRANSFER_BIOS=BIOS Fileをてんそう +RA_DELETE_OVERRIDES=GameとCore Overrideをさくじょ +RA_DELETE_REMAPS=Remap Fileをさくじょ +RA_DELETE_BIOS=BIOS Fileをさくじょ (NAND) +RA_TOGGLE_LOAD_SCREENS=RAとCanoeのLoadingがめんをきりかえ +RESTORE_WIFI_CONFIG=Wifiせっていをもどす +OPTIONS_TITLE=せってい +LOADING=よみこみちゅう... +WIFI_BACKUP_SPLASH_LINE1=Wifiせってい Fileの Backup +WIFI_BACKUP_SPLASH_LINE2=おまちください . . . +DELETE_BACKUP_CONFIRM=このBackupをさくじょしますか? +DELETE_CONFIRM_GENERIC=これをさくじょしますか? +HINT_SELECT=けってい +HINT_BACK=もどる +HINT_DELETE=けす (ながおし) +NO_NET_ERR=Serverへのせつぞくにしっぱいしました. Internetせつぞくをかくにんして, もういちどおためしください. +NO_PKG_ERR=ようきゅうされたPackageは, いま, りようできません. しばらくしてから, もういちどおためしください. +NOT_ENOUGH_SPACE=あきようりょうがたりません. ようりょうをあけて, もういちどおためしください. +FREE_SPACE=空き +CHANGE_COMBO_INTRO_1=これから Optionsmenuの Buttonくみあわせを せっていします +CHANGE_COMBO_INTRO_2=Optionsmenuにつかう3つのButtonをおしてください +CHANGE_COMBO_INTRO_3=2つのButtonくみあわせにするときは, 2ばんめのButtonをもういちどおしてください +CHANGE_COMBO_CONTINUE=Aでつづける, Bでキャンセル +CHANGE_COMBO_PRESS_1=1ばんめのButtonをいまおしてください... +CHANGE_COMBO_PRESS_2=2ばんめのButtonをいまおしてください... +CHANGE_COMBO_PRESS_3=3ばんめのButtonをいまおしてください... +CHANGE_COMBO_CHOSEN=えらんだくみあわせ: +CHANGE_COMBO_CONFIRM=これでよければA, ちがえばほかのButtonをおしてください +CHANGE_COMBO_DONE=かんりょう. てきようするにはさいきどうしてください +CHANGE_COMBO_WRITE_ERROR=くみあわせをFileにほぞんできませんでした +MOD_UNINSTALLER_TO_REMOVE=さくじょするModule +HINT_UNINSTALL=さくじょ +MOD_UNINSTALL_CONFIRM=これらのModuleをさくじょしますか? +HINT_MARK=マーク +HINT_UNMARK=マークをはずす +HINT_CONFIRM=けってい +HINT_CANCEL=キャンセル +MOD_UNINSTALL_NONE_MARKED=マークしたModuleはありません +MOD_UNINSTALL_NONE_HINT=ModuleでAをおすとマークします +MOD_UNINSTALL_EMPTY=さくじょできるModuleはありません +MOD_UNINSTALL_REBOOT_NOTE=かんりょうするとさいきどうします +CONTROLLER_OPTIONS=コントローラー +AUTOFIRE=れんしゃ +AUTOFIRE_SPEED_FAST=はやい +AUTOFIRE_SPEED_NORMAL=ふつう +AUTOFIRE_SPEED_SLOW=おそい +AUTOFIRE_XY=X/YをA/Bのれんしゃにする +HOME_COMBO=ホームメニューへのButtonくみあわせ +FC_START=2PコントローラーでStart +EPILEPSY_PROTECTION=てんかんたいさく (NES) +SYSTEM_INFO=システムじょうほう +SAVE_DMESG=KernelのLogをほぞん (USBへ) +SAVE_DMESG_DONE=KernelのLogをUSB:/data/log/dmesg.logにほぞんしました +SYSINFO_CONSOLE=ほんたい +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=セーブデータ +SYSINFO_FREE=あき +DIAGNOSTICS_OPTIONS=しんだん +SAVE_MANAGER=セーブ管理 +SAVE_MANAGER_BACKUP_DESC=すべてのセーブデータを USB:/data/saves_backup にコピーします。 +SAVE_MANAGER_RESTORE_DESC=USBのバックアップからセーブデータを選んで本体に戻します。同じ名前のセーブデータは上書きされます。 +SAVE_MANAGER_CLEAN=削除したゲームのセーブを整理 +SAVE_MANAGER_CLEAN_DESC=本体にないゲームのセーブデータを USB:/data/deleted_games_saves に移動します。 +SAVE_MANAGER_RESTORE_DELETED=削除したゲームのセーブを復元 +SAVE_MANAGER_RESTORE_DELETED_DESC=移動したセーブデータを、再インストールしたゲームのために戻します。 +SAVE_MANAGER_STAT_SAVES=本体のセーブ数 +SAVE_MANAGER_STAT_BACKUP=USBバックアップのセーブ数 +SAVE_MANAGER_STAT_NONE=なし +SAVE_MANAGER_STAT_ORPHANS=削除したゲームのセーブ +SAVE_MANAGER_STAT_KEPT=移動済み +SAVE_MANAGER_BACKUP_CONFIRM=セーブデータをUSBにバックアップしますか? +SAVE_MANAGER_RESTORE_CONFIRM=USBからセーブデータを復元しますか? +SAVE_MANAGER_CLEAN_CONFIRM=これらのセーブを移動しますか? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=これらのセーブを復元しますか? +SAVE_MANAGER_TO_MOVE=移動する +SAVE_MANAGER_TO_RESTORE=復元する +SAVE_MANAGER_NONE_MARKED=セーブが選択されていません。 +SAVE_MANAGER_NONE_HINT=Aボタンでセーブを選択します。 +SAVE_MANAGER_NO_ORPHANS=削除したゲームのセーブはありません。 +SAVE_MANAGER_NO_DELETED=復元できる移動済みのセーブはありません。 +SAVE_MANAGER_CLEAN_NOTE=USB:/data/deleted_games_saves に保管 +SAVE_MANAGER_RESTORE_NOTE=本体にあるセーブデータは上書きされません。 +SAVE_MANAGER_RESTORE_USB_NOTE=選んだセーブデータは本体にある同じ名前のものを上書きします。 +SAVE_MANAGER_WORKING=処理中... +HINT_OK=OK +HINT_MOVE=移動 +HINT_RESTORE=復元 +SAVE_MANAGER_SELECT_ALL=すべて選択 diff --git a/mod/etc/options_menu/language/nl-NL.lang b/mod/etc/options_menu/language/nl-NL.lang new file mode 100644 index 0000000..67b789a --- /dev/null +++ b/mod/etc/options_menu/language/nl-NL.lang @@ -0,0 +1,126 @@ +HIBERNATE=Slaapstand +SHUTDOWN_DEVICE=Apparaat uitschakelen +REBOOT_DEVICE=Apparaat herstarten +ADVANCED_OPTIONS=Geavanceerde opties +NETWORK_OPTIONS=Netwerk +EXIT=Afsluiten +MODULE_UNINSTALLER=Module-verwijderaar +DISPLAY_TEMP=Temperatuur weergeven +RUN_TOP=Top uitvoeren +BENCHMARK_TOOL=Benchmarktool +DUMP_FILE_STRUCTURE=Bestandsstructuur exporteren (naar USB) +BACKUP_SAVES_USB=Savegames back-uppen naar USB +RESTORE_SAVES_USB=Savegames herstellen vanaf USB +BACKUP_SAVES_USB_DONE=Savegames back-upt naar USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Savegames hersteld vanaf USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Back-up van savegames naar USB mislukt. +RESTORE_SAVES_USB_FAILED=Herstellen van savegames vanaf USB mislukt. +RESTORE_SAVES_USB_NOT_FOUND=Geen savegame-back-up gevonden op de USB. +TOGGLE_USB_WRITE=USB-schrijftoegang schakelen +RA_DEBUGGER=RetroArch-debugger (USB-logs) +CHANGE_BUTTON_COMBO=Knoppencombinatie wijzigen +CLEAR_CACHE=Cache wissen +BACK=Terug +LANGUAGE_OPTIONS=Taal +DISPLAY_IP=IP-adres weergeven +RECONNECT=Opnieuw verbinden +SEARCH_SSIDS=SSID's zoeken +WIFI_BACKUP_NAND=Wifi-configuratie back-uppen (NAND) +WIFI_BACKUP_USB=Wifi-configuratie back-uppen (USB) +WIFI_RESTORE_NAND=Wifi-configuratie herstellen (NAND) +WIFI_RESTORE_USB=Wifi-configuratie herstellen (USB) +RA_RESTORE_DEFAULTS_ALL=Standaardinstellingen herstellen (Alles) +RA_RESTORE_DEFAULTS=Standaardinstellingen herstellen +RA_BACKUP_NAND=Instellingen back-uppen naar NAND +RA_BACKUP_USB=Instellingen back-uppen naar USB +RA_RESTORE_NAND=Instellingen herstellen vanaf NAND +RA_RESTORE_USB=Instellingen herstellen vanaf USB +RA_DELETE_BACKUPS=Alle instellingenback-ups verwijderen +RA_TRANSFER_BIOS=BIOS-bestand(en) overzetten +RA_DELETE_OVERRIDES=Game- en core-overrides verwijderen +RA_DELETE_REMAPS=Remapbestanden verwijderen +RA_DELETE_BIOS=BIOS-bestand(en) van NAND verwijderen +RA_TOGGLE_LOAD_SCREENS=RA- en Canoe-laadschermen schakelen +RESTORE_WIFI_CONFIG=Wifi-configuratie herstellen +OPTIONS_TITLE=Opties +LOADING=Laden... +WIFI_BACKUP_SPLASH_LINE1=Wifi-configuratiebestand back-uppen +WIFI_BACKUP_SPLASH_LINE2=Even geduld . . . +DELETE_BACKUP_CONFIRM=Deze back-up verwijderen? +DELETE_CONFIRM_GENERIC=Dit item verwijderen? +HINT_SELECT=Kiezen +HINT_BACK=Terug +HINT_DELETE=Wissen (vasthouden) +NO_NET_ERR=Verbinding met de server mislukt, controleer je internetverbinding en probeer het opnieuw. +NO_PKG_ERR=Het gevraagde pakket is momenteel niet beschikbaar, probeer het later opnieuw. +NOT_ENOUGH_SPACE=Onvoldoende vrije ruimte, maak ruimte vrij en probeer het opnieuw. +FREE_SPACE=vrij +CHANGE_COMBO_INTRO_1=We gaan nu de knoppencombinatie voor het optiemenu instellen. +CHANGE_COMBO_INTRO_2=Je moet de 3 knoppen indrukken die je voor het optiemenu wilt instellen. +CHANGE_COMBO_INTRO_3=Voor een combinatie van 2 knoppen herhaal je gewoon de 2e knop. +CHANGE_COMBO_CONTINUE=Druk op A om door te gaan, of B om te annuleren. +CHANGE_COMBO_PRESS_1=Druk nu op de eerste knop... +CHANGE_COMBO_PRESS_2=Druk nu op de tweede knop... +CHANGE_COMBO_PRESS_3=Druk nu op de derde knop... +CHANGE_COMBO_CHOSEN=Je gekozen combinatie is: +CHANGE_COMBO_CONFIRM=Als dit klopt, druk op A. Zo niet, druk op een andere knop om opnieuw te proberen. +CHANGE_COMBO_DONE=Klaar. Herstart de console om de wijziging toe te passen. +CHANGE_COMBO_WRITE_ERROR=Kon de combinatie niet opslaan in het bestand. +MOD_UNINSTALLER_TO_REMOVE=Te verwijderen +HINT_UNINSTALL=Verwijderen +MOD_UNINSTALL_CONFIRM=Deze modules verwijderen? +HINT_MARK=Markeren +HINT_UNMARK=Demarkeren +HINT_CONFIRM=Bevestigen +HINT_CANCEL=Annuleren +MOD_UNINSTALL_NONE_MARKED=Geen modules gemarkeerd. +MOD_UNINSTALL_NONE_HINT=Druk op A bij een module om deze te markeren. +MOD_UNINSTALL_EMPTY=Geen modules geïnstalleerd. +MOD_UNINSTALL_REBOOT_NOTE=De console herstart om af te ronden. +CONTROLLER_OPTIONS=Controller +AUTOFIRE=Autofire +AUTOFIRE_SPEED_FAST=Snel +AUTOFIRE_SPEED_NORMAL=Normaal +AUTOFIRE_SPEED_SLOW=Langzaam +AUTOFIRE_XY=X/Y als turbo-A/B gebruiken +HOME_COMBO=Knoppencombinatie voor het hoofdmenu +FC_START=Start op 2e controller +EPILEPSY_PROTECTION=Epilepsiebescherming (NES) +SYSTEM_INFO=Systeeminformatie +SAVE_DMESG=Kernellog opslaan (op USB) +SAVE_DMESG_DONE=Kernellog opgeslagen in USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Console +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Opslagbestanden +SYSINFO_FREE=vrij +DIAGNOSTICS_OPTIONS=Diagnose +SAVE_MANAGER=Opslagbeheer +SAVE_MANAGER_BACKUP_DESC=Kopieert alle opgeslagen spellen naar USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Kies opslagbestanden uit de USB-back-up en kopieer ze terug naar de console. Opslagbestanden met dezelfde naam worden vervangen. +SAVE_MANAGER_CLEAN=Opslag van verwijderde spellen opruimen +SAVE_MANAGER_CLEAN_DESC=Verplaatst opslag van spellen die niet meer op de console staan naar USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Opslag van verwijderde spellen herstellen +SAVE_MANAGER_RESTORE_DELETED_DESC=Zet verplaatste opslag terug, voor spellen die je opnieuw hebt geïnstalleerd. +SAVE_MANAGER_STAT_SAVES=Opslag op de console +SAVE_MANAGER_STAT_BACKUP=Opslag in USB-back-up +SAVE_MANAGER_STAT_NONE=Geen +SAVE_MANAGER_STAT_ORPHANS=Opslag van verwijderde spellen +SAVE_MANAGER_STAT_KEPT=Apart gezet +SAVE_MANAGER_BACKUP_CONFIRM=Opgeslagen spellen naar USB kopiëren? +SAVE_MANAGER_RESTORE_CONFIRM=Opgeslagen spellen van USB herstellen? +SAVE_MANAGER_CLEAN_CONFIRM=Deze opslag apart zetten? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Deze opslag herstellen? +SAVE_MANAGER_TO_MOVE=Te verplaatsen +SAVE_MANAGER_TO_RESTORE=Te herstellen +SAVE_MANAGER_NONE_MARKED=Geen opslag gemarkeerd. +SAVE_MANAGER_NONE_HINT=Druk op A bij opslag om deze te markeren. +SAVE_MANAGER_NO_ORPHANS=Geen opslag van verwijderde spellen gevonden. +SAVE_MANAGER_NO_DELETED=Geen apart gezette opslag om te herstellen. +SAVE_MANAGER_CLEAN_NOTE=Bewaard in USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Opslag die al op de console staat wordt niet vervangen. +SAVE_MANAGER_RESTORE_USB_NOTE=Gemarkeerde opslagbestanden vervangen die met dezelfde naam op de console. +SAVE_MANAGER_WORKING=Bezig... +HINT_OK=OK +HINT_MOVE=Verplaatsen +HINT_RESTORE=Herstellen +SAVE_MANAGER_SELECT_ALL=Alles selecteren diff --git a/mod/etc/options_menu/language/pt-PT.lang b/mod/etc/options_menu/language/pt-PT.lang new file mode 100644 index 0000000..ccb097f --- /dev/null +++ b/mod/etc/options_menu/language/pt-PT.lang @@ -0,0 +1,126 @@ +HIBERNATE=Hibernar/Standby +SHUTDOWN_DEVICE=Desligar Dispositivo +REBOOT_DEVICE=Reiniciar Dispositivo +ADVANCED_OPTIONS=Opções Avançadas +NETWORK_OPTIONS=Rede +EXIT=Sair +MODULE_UNINSTALLER=Desinstalador de Módulos +DISPLAY_TEMP=Ver Temperatura +RUN_TOP=Executar Top +BENCHMARK_TOOL=Ferramenta de Benchmark +DUMP_FILE_STRUCTURE=Exportar Estrutura de Ficheiros (para USB) +BACKUP_SAVES_USB=Cópia de Segurança dos Jogos Guardados (USB) +RESTORE_SAVES_USB=Restaurar Jogos Guardados (USB) +BACKUP_SAVES_USB_DONE=Jogos guardados copiados para USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Jogos guardados restaurados de USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Falha ao copiar os jogos guardados para USB. +RESTORE_SAVES_USB_FAILED=Falha ao restaurar os jogos guardados de USB. +RESTORE_SAVES_USB_NOT_FOUND=Não foi encontrada nenhuma cópia de segurança de jogos guardados na USB. +TOGGLE_USB_WRITE=Alternar Escrita na USB +RA_DEBUGGER=Depurador do RetroArch (logs USB) +CHANGE_BUTTON_COMBO=Mudar Combinação de Botões +CLEAR_CACHE=Limpar Cache +BACK=Voltar +LANGUAGE_OPTIONS=Idioma +DISPLAY_IP=Mostrar Endereço IP +RECONNECT=Reconectar +SEARCH_SSIDS=Procurar SSIDs +WIFI_BACKUP_NAND=Cópia de Segurança da Config. Wifi (NAND) +WIFI_BACKUP_USB=Cópia de Segurança da Config. Wifi (USB) +WIFI_RESTORE_NAND=Restaurar Config. Wifi (NAND) +WIFI_RESTORE_USB=Restaurar Config. Wifi (USB) +RA_RESTORE_DEFAULTS_ALL=Restaurar Predefinições (Tudo) +RA_RESTORE_DEFAULTS=Restaurar Predefinições +RA_BACKUP_NAND=Cópia de Segurança das Configurações (NAND) +RA_BACKUP_USB=Cópia de Segurança das Configurações (USB) +RA_RESTORE_NAND=Restaurar Configurações (NAND) +RA_RESTORE_USB=Restaurar Configurações (USB) +RA_DELETE_BACKUPS=Apagar Todas as Cópias de Segurança +RA_TRANSFER_BIOS=Transferir Ficheiro(s) de BIOS +RA_DELETE_OVERRIDES=Apagar Overrides de Jogo e Core +RA_DELETE_REMAPS=Apagar Ficheiros de Remap +RA_DELETE_BIOS=Apagar Ficheiro(s) de BIOS da NAND +RA_TOGGLE_LOAD_SCREENS=Alternar Ecrãs de Carregamento RA e Canoe +RESTORE_WIFI_CONFIG=Restaurar Configuração Wifi +OPTIONS_TITLE=Opções +LOADING=A carregar... +WIFI_BACKUP_SPLASH_LINE1=Cópia de Segurança Wifi +WIFI_BACKUP_SPLASH_LINE2=Aguarde Por Favor . . . +DELETE_BACKUP_CONFIRM=Apagar esta cópia de segurança? +DELETE_CONFIRM_GENERIC=Apagar este item? +HINT_SELECT=Selecionar +HINT_BACK=Voltar +HINT_DELETE=Apagar (manter premido) +NO_NET_ERR=Erro ao ligar ao servidor, verifica a tua ligação à internet e tenta novamente. +NO_PKG_ERR=O pacote pedido não está disponível de momento, tenta novamente mais tarde. +NOT_ENOUGH_SPACE=Não há espaço livre suficiente, liberta algum espaço e tenta novamente. +FREE_SPACE=livres +CHANGE_COMBO_INTRO_1=Vamos agora definir a combinação de botões do menu de opções. +CHANGE_COMBO_INTRO_2=Vais precisar de premir os 3 botões que queres definir para o menu de opções. +CHANGE_COMBO_INTRO_3=Para uma combinação de 2 botões, repete o 2º botão. +CHANGE_COMBO_CONTINUE=Prime A para continuar, ou B para cancelar. +CHANGE_COMBO_PRESS_1=Prime o primeiro botão agora... +CHANGE_COMBO_PRESS_2=Prime o segundo botão agora... +CHANGE_COMBO_PRESS_3=Prime o terceiro botão agora... +CHANGE_COMBO_CHOSEN=A combinação escolhida é: +CHANGE_COMBO_CONFIRM=Se estiver correta prime A. Caso contrário, prime qualquer outro botão para tentar de novo. +CHANGE_COMBO_DONE=Concluído. Reinicia a consola para aplicar. +CHANGE_COMBO_WRITE_ERROR=Não foi possível guardar a combinação no ficheiro. +MOD_UNINSTALLER_TO_REMOVE=Para desinstalar +HINT_UNINSTALL=Desinstalar +MOD_UNINSTALL_CONFIRM=Remover estes módulos? +HINT_MARK=Marcar +HINT_UNMARK=Desmarcar +HINT_CONFIRM=Confirmar +HINT_CANCEL=Cancelar +MOD_UNINSTALL_NONE_MARKED=Nenhum módulo marcado. +MOD_UNINSTALL_NONE_HINT=Prime A num módulo para o marcar. +MOD_UNINSTALL_EMPTY=Nenhum módulo instalado. +MOD_UNINSTALL_REBOOT_NOTE=A consola reinicia para concluir. +CONTROLLER_OPTIONS=Comando +AUTOFIRE=Autofire +AUTOFIRE_SPEED_FAST=Velocidade rápida +AUTOFIRE_SPEED_NORMAL=Velocidade normal +AUTOFIRE_SPEED_SLOW=Velocidade lenta +AUTOFIRE_XY=Usar X/Y como turbo A/B +HOME_COMBO=Combo para o menu inicial +FC_START=Start no 2.º comando +EPILEPSY_PROTECTION=Proteção contra epilepsia (NES) +SYSTEM_INFO=Informação do sistema +SAVE_DMESG=Guardar log do kernel (no USB) +SAVE_DMESG_DONE=Log do kernel guardado em USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Consola +SYSINFO_FIRMWARE=Firmware +SYSINFO_SAVES=Saves +SYSINFO_FREE=livres +DIAGNOSTICS_OPTIONS=Diagnóstico +SAVE_MANAGER=Gestor de Jogos Guardados +SAVE_MANAGER_BACKUP_DESC=Copia todos os jogos guardados para USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Escolha jogos guardados da cópia de segurança da USB e copie-os de volta para a consola. Os jogos guardados com o mesmo nome são substituídos. +SAVE_MANAGER_CLEAN=Limpar Jogos Guardados de Jogos Removidos +SAVE_MANAGER_CLEAN_DESC=Move os jogos guardados de jogos que já não estão na consola para USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Restaurar Jogos Guardados de Jogos Removidos +SAVE_MANAGER_RESTORE_DELETED_DESC=Devolve os jogos guardados movidos, para jogos que voltaste a instalar. +SAVE_MANAGER_STAT_SAVES=Jogos guardados na consola +SAVE_MANAGER_STAT_BACKUP=Jogos guardados no backup USB +SAVE_MANAGER_STAT_NONE=Nenhum +SAVE_MANAGER_STAT_ORPHANS=Jogos guardados de jogos removidos +SAVE_MANAGER_STAT_KEPT=Movidos à parte +SAVE_MANAGER_BACKUP_CONFIRM=Copiar os jogos guardados para a USB? +SAVE_MANAGER_RESTORE_CONFIRM=Restaurar os jogos guardados da USB? +SAVE_MANAGER_CLEAN_CONFIRM=Mover estes jogos guardados? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Restaurar estes jogos guardados? +SAVE_MANAGER_TO_MOVE=A Mover +SAVE_MANAGER_TO_RESTORE=A Restaurar +SAVE_MANAGER_NONE_MARKED=Nenhum jogo guardado marcado. +SAVE_MANAGER_NONE_HINT=Carrega em A num jogo guardado para o marcar. +SAVE_MANAGER_NO_ORPHANS=Não há jogos guardados de jogos removidos. +SAVE_MANAGER_NO_DELETED=Não há jogos guardados movidos para restaurar. +SAVE_MANAGER_CLEAN_NOTE=Guardados em USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Os jogos guardados que já estão na consola não são substituídos. +SAVE_MANAGER_RESTORE_USB_NOTE=Os jogos guardados marcados substituem os que têm o mesmo nome na consola. +SAVE_MANAGER_WORKING=A trabalhar... +HINT_OK=OK +HINT_MOVE=Mover +HINT_RESTORE=Restaurar +SAVE_MANAGER_SELECT_ALL=Selecionar tudo diff --git a/mod/etc/options_menu/language/ru-RU.lang b/mod/etc/options_menu/language/ru-RU.lang new file mode 100644 index 0000000..e3dbf61 --- /dev/null +++ b/mod/etc/options_menu/language/ru-RU.lang @@ -0,0 +1,126 @@ +HIBERNATE=Спящий режим +SHUTDOWN_DEVICE=Выключить устройство +REBOOT_DEVICE=Перезагрузить устройство +ADVANCED_OPTIONS=Расширенные настройки +NETWORK_OPTIONS=Сеть +EXIT=Выход +MODULE_UNINSTALLER=Удаление модулей +DISPLAY_TEMP=Показать температуру +RUN_TOP=Запустить Top +BENCHMARK_TOOL=Инструмент Benchmark +DUMP_FILE_STRUCTURE=Сохранить структуру файлов (на USB) +BACKUP_SAVES_USB=Резервная копия сохранений (USB) +RESTORE_SAVES_USB=Восстановить сохранения (USB) +BACKUP_SAVES_USB_DONE=Сохранения скопированы на USB:/data/saves_backup +RESTORE_SAVES_USB_DONE=Сохранения восстановлены с USB:/data/saves_backup +BACKUP_SAVES_USB_FAILED=Не удалось скопировать сохранения на USB. +RESTORE_SAVES_USB_FAILED=Не удалось восстановить сохранения с USB. +RESTORE_SAVES_USB_NOT_FOUND=Резервная копия сохранений на USB не найдена. +TOGGLE_USB_WRITE=Переключить запись на USB +RA_DEBUGGER=Отладчик RA (логи на USB) +CHANGE_BUTTON_COMBO=Изменить комбинацию кнопок +CLEAR_CACHE=Очистить кэш +BACK=Назад +LANGUAGE_OPTIONS=Язык +DISPLAY_IP=Показать IP-адрес +RECONNECT=Переподключиться +SEARCH_SSIDS=Поиск SSID +WIFI_BACKUP_NAND=Резервная копия Wifi (NAND) +WIFI_BACKUP_USB=Резервная копия Wifi (USB) +WIFI_RESTORE_NAND=Восстановить Wifi (NAND) +WIFI_RESTORE_USB=Восстановить Wifi (USB) +RA_RESTORE_DEFAULTS_ALL=Восстановить настройки по умолчанию (все) +RA_RESTORE_DEFAULTS=Восстановить настройки по умолчанию +RA_BACKUP_NAND=Резервная копия RA (NAND) +RA_BACKUP_USB=Резервная копия RA (USB) +RA_RESTORE_NAND=Восстановить RA (NAND) +RA_RESTORE_USB=Восстановить RA (USB) +RA_DELETE_BACKUPS=Удалить все резервные копии +RA_TRANSFER_BIOS=Передать файл(ы) BIOS +RA_DELETE_OVERRIDES=Удалить Overrides игр и ядер +RA_DELETE_REMAPS=Удалить файлы Remap +RA_DELETE_BIOS=Удалить файл(ы) BIOS (NAND) +RA_TOGGLE_LOAD_SCREENS=Переключить экраны загрузки RA и Canoe +RESTORE_WIFI_CONFIG=Восстановить настройки Wifi +OPTIONS_TITLE=Настройки +LOADING=Загрузка... +WIFI_BACKUP_SPLASH_LINE1=Резервное копирование Wifi +WIFI_BACKUP_SPLASH_LINE2=Пожалуйста, подождите . . . +DELETE_BACKUP_CONFIRM=Удалить эту резервную копию? +DELETE_CONFIRM_GENERIC=Удалить этот элемент? +HINT_SELECT=Выбрать +HINT_BACK=Назад +HINT_DELETE=Удалить (удерж.) +NO_NET_ERR=Ошибка подключения к серверу, проверьте подключение к интернету и попробуйте снова. +NO_PKG_ERR=Запрошенный пакет сейчас недоступен, попробуйте позже. +NOT_ENOUGH_SPACE=Недостаточно свободного места, освободите место и повторите попытку. +FREE_SPACE=свободно +CHANGE_COMBO_INTRO_1=Сейчас мы настроим комбинацию кнопок для меню опций. +CHANGE_COMBO_INTRO_2=Нажмите 3 кнопки, которые хотите назначить для меню опций. +CHANGE_COMBO_INTRO_3=Для комбинации из 2 кнопок просто повторите 2-ю кнопку. +CHANGE_COMBO_CONTINUE=Нажмите A, чтобы продолжить, или B, чтобы отменить. +CHANGE_COMBO_PRESS_1=Нажмите первую кнопку сейчас... +CHANGE_COMBO_PRESS_2=Нажмите вторую кнопку сейчас... +CHANGE_COMBO_PRESS_3=Нажмите третью кнопку сейчас... +CHANGE_COMBO_CHOSEN=Выбранная комбинация: +CHANGE_COMBO_CONFIRM=Если верно, нажмите A. Если нет, нажмите любую другую кнопку, чтобы попробовать снова. +CHANGE_COMBO_DONE=Готово. Перезагрузите консоль, чтобы применить изменения. +CHANGE_COMBO_WRITE_ERROR=Не удалось сохранить комбинацию в файл. +MOD_UNINSTALLER_TO_REMOVE=Для удаления +HINT_UNINSTALL=Удалить +MOD_UNINSTALL_CONFIRM=Удалить эти модули? +HINT_MARK=Отметить +HINT_UNMARK=Снять +HINT_CONFIRM=Подтвердить +HINT_CANCEL=Отмена +MOD_UNINSTALL_NONE_MARKED=Нет отмеченных модулей. +MOD_UNINSTALL_NONE_HINT=Нажмите A на модуле, чтобы отметить его. +MOD_UNINSTALL_EMPTY=Нет установленных модулей. +MOD_UNINSTALL_REBOOT_NOTE=Консоль перезагрузится для завершения. +CONTROLLER_OPTIONS=Контроллер +AUTOFIRE=Автоогонь +AUTOFIRE_SPEED_FAST=Быстрая скорость +AUTOFIRE_SPEED_NORMAL=Обычная скорость +AUTOFIRE_SPEED_SLOW=Медленная скорость +AUTOFIRE_XY=X/Y как турбо A/B +HOME_COMBO=Комбинация для главного меню +FC_START=Start на 2-м контроллере +EPILEPSY_PROTECTION=Защита от эпилепсии (NES) +SYSTEM_INFO=Информация о системе +SAVE_DMESG=Сохранить лог ядра (на USB) +SAVE_DMESG_DONE=Лог ядра сохранён в USB:/data/log/dmesg.log +SYSINFO_CONSOLE=Консоль +SYSINFO_FIRMWARE=Прошивка +SYSINFO_SAVES=Сохранения +SYSINFO_FREE=свободно +DIAGNOSTICS_OPTIONS=Диагностика +SAVE_MANAGER=Менеджер сохранений +SAVE_MANAGER_BACKUP_DESC=Копирует все сохранения в USB:/data/saves_backup. +SAVE_MANAGER_RESTORE_DESC=Выберите сохранения из резервной копии на USB и скопируйте их обратно на консоль. Сохранения с тем же именем заменяются. +SAVE_MANAGER_CLEAN=Очистить сохранения удалённых игр +SAVE_MANAGER_CLEAN_DESC=Перемещает сохранения игр, которых больше нет на консоли, в USB:/data/deleted_games_saves. +SAVE_MANAGER_RESTORE_DELETED=Восстановить сохранения удалённых игр +SAVE_MANAGER_RESTORE_DELETED_DESC=Возвращает перемещённые сохранения для заново установленных игр. +SAVE_MANAGER_STAT_SAVES=Сохранений на консоли +SAVE_MANAGER_STAT_BACKUP=Сохранений в копии на USB +SAVE_MANAGER_STAT_NONE=Нет +SAVE_MANAGER_STAT_ORPHANS=Сохранений удалённых игр +SAVE_MANAGER_STAT_KEPT=Перемещено +SAVE_MANAGER_BACKUP_CONFIRM=Скопировать сохранения на USB? +SAVE_MANAGER_RESTORE_CONFIRM=Восстановить сохранения с USB? +SAVE_MANAGER_CLEAN_CONFIRM=Переместить эти сохранения? +SAVE_MANAGER_RESTORE_DELETED_CONFIRM=Восстановить эти сохранения? +SAVE_MANAGER_TO_MOVE=К перемещению +SAVE_MANAGER_TO_RESTORE=К восстановлению +SAVE_MANAGER_NONE_MARKED=Сохранения не отмечены. +SAVE_MANAGER_NONE_HINT=Нажмите A на сохранении, чтобы отметить его. +SAVE_MANAGER_NO_ORPHANS=Сохранений удалённых игр не найдено. +SAVE_MANAGER_NO_DELETED=Нет перемещённых сохранений для восстановления. +SAVE_MANAGER_CLEAN_NOTE=Хранятся в USB:/data/deleted_games_saves +SAVE_MANAGER_RESTORE_NOTE=Сохранения, уже имеющиеся на консоли, не заменяются. +SAVE_MANAGER_RESTORE_USB_NOTE=Отмеченные сохранения заменяют сохранения с тем же именем на консоли. +SAVE_MANAGER_WORKING=Выполняется... +HINT_OK=OK +HINT_MOVE=Переместить +HINT_RESTORE=Восстановить +SAVE_MANAGER_SELECT_ALL=Выбрать все diff --git a/mod/etc/options_menu/mod_uninstall/launch_uninstaller.sh b/mod/etc/options_menu/mod_uninstall/launch_uninstaller.sh new file mode 100644 index 0000000..ded33d7 --- /dev/null +++ b/mod/etc/options_menu/mod_uninstall/launch_uninstaller.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# mod_uninstall exit: 0 = back, 2 = uninstalling (reboots), else leave menu +options_path="${1%/}" + +"$options_path/mod_uninstall/mod_uninstall" +case $? in +0) + usleep 50000 + "$options_path/options" --commandPath "$options_path/advanced_commands/" --title "ADVANCED_OPTIONS" + ;; +2) ;; +*) + sh "$options_path/scripts/ResumeUI.sh" + ;; +esac diff --git a/mod/etc/options_menu/network/commands/c0010_ShowIP b/mod/etc/options_menu/network/commands/c0010_ShowIP index 1a8ed04..f6ee588 100644 --- a/mod/etc/options_menu/network/commands/c0010_ShowIP +++ b/mod/etc/options_menu/network/commands/c0010_ShowIP @@ -1,3 +1,4 @@ -COMMAND_NAME=Display IP Address +COMMAND_NAME=DISPLAY_IP COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/show-my-ip.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_net_ip.png diff --git a/mod/etc/options_menu/network/commands/c0011_Reconnect b/mod/etc/options_menu/network/commands/c0011_Reconnect index 7871f31..1d06333 100644 --- a/mod/etc/options_menu/network/commands/c0011_Reconnect +++ b/mod/etc/options_menu/network/commands/c0011_Reconnect @@ -1,3 +1,4 @@ -COMMAND_NAME=Reconnect +COMMAND_NAME=RECONNECT COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/reconnect.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_net_reconnect.png diff --git a/mod/etc/options_menu/network/commands/c0012_ShowSSID b/mod/etc/options_menu/network/commands/c0012_ShowSSID index 3f5dd11..46831d0 100644 --- a/mod/etc/options_menu/network/commands/c0012_ShowSSID +++ b/mod/etc/options_menu/network/commands/c0012_ShowSSID @@ -1,3 +1,4 @@ -COMMAND_NAME=Search for SSIDs +COMMAND_NAME=SEARCH_SSIDS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/show-ssid.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_net_ssid.png diff --git a/mod/etc/options_menu/network/commands/c0020_separator b/mod/etc/options_menu/network/commands/c0020_separator new file mode 100644 index 0000000..e69de29 diff --git a/mod/etc/options_menu/network/commands/c0030_BackupNand b/mod/etc/options_menu/network/commands/c0030_BackupNand new file mode 100644 index 0000000..48467a3 --- /dev/null +++ b/mod/etc/options_menu/network/commands/c0030_BackupNand @@ -0,0 +1,4 @@ +COMMAND_NAME=WIFI_BACKUP_NAND +COMMAND_TYPE=EXTERNAL +COMMAND_STR=sh %script_dir%/backup-wifi.sh nand backup +PREVIEW_IMAGE=/etc/options_menu/images/preview_backup_nand.png diff --git a/mod/etc/options_menu/network/commands/c0040_BackupUsb b/mod/etc/options_menu/network/commands/c0040_BackupUsb new file mode 100644 index 0000000..00f5dd1 --- /dev/null +++ b/mod/etc/options_menu/network/commands/c0040_BackupUsb @@ -0,0 +1,5 @@ +COMMAND_NAME=WIFI_BACKUP_USB +COMMAND_TYPE=EXTERNAL +USB_ONLY=TRUE +COMMAND_STR=sh %script_dir%/backup-wifi.sh usb backup +PREVIEW_IMAGE=/etc/options_menu/images/preview_backup_usb.png diff --git a/mod/etc/options_menu/network/commands/c0050_RestoreNand b/mod/etc/options_menu/network/commands/c0050_RestoreNand new file mode 100644 index 0000000..d03b167 --- /dev/null +++ b/mod/etc/options_menu/network/commands/c0050_RestoreNand @@ -0,0 +1,6 @@ +COMMAND_NAME=WIFI_RESTORE_NAND +COMMAND_TYPE=EXTERNAL +ENABLE_IF=[ -d "$rootfs/etc/wifi_backup" ] +SUBMENU=TRUE +COMMAND_STR=sh %script_dir%/restore_settings.sh nand cmd +PREVIEW_IMAGE=/etc/options_menu/images/preview_restore_nand.png diff --git a/mod/etc/options_menu/network/commands/c0060_RestoreUsb b/mod/etc/options_menu/network/commands/c0060_RestoreUsb new file mode 100644 index 0000000..7532a8a --- /dev/null +++ b/mod/etc/options_menu/network/commands/c0060_RestoreUsb @@ -0,0 +1,7 @@ +COMMAND_NAME=WIFI_RESTORE_USB +COMMAND_TYPE=EXTERNAL +USB_ONLY=TRUE +ENABLE_IF=[ -d /media/data/wifi_backup ] +SUBMENU=TRUE +COMMAND_STR=sh %script_dir%/restore_settings.sh usb +PREVIEW_IMAGE=/etc/options_menu/images/preview_restore_usb.png diff --git a/mod/etc/options_menu/network/commands/c9999_Back b/mod/etc/options_menu/network/commands/c9999_Back deleted file mode 100644 index 651d780..0000000 --- a/mod/etc/options_menu/network/commands/c9999_Back +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Back -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & \ No newline at end of file diff --git a/mod/etc/options_menu/network/commands/c9999_Exit b/mod/etc/options_menu/network/commands/c9999_Exit deleted file mode 100644 index 6a60cb3..0000000 --- a/mod/etc/options_menu/network/commands/c9999_Exit +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Exit -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" diff --git a/mod/etc/options_menu/network/scripts/backup-wifi.sh b/mod/etc/options_menu/network/scripts/backup-wifi.sh new file mode 100644 index 0000000..fc9bb19 --- /dev/null +++ b/mod/etc/options_menu/network/scripts/backup-wifi.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086,SC3046 +source $mountpoint/etc/options_menu/network/scripts/om_vars +script_init + +wpa_supplicant_conf="$wpa_supplicant/wpa_supplicant.conf" +ssid="$(grep -o 'ssid=".*"' "$wpa_supplicant_conf" | sed 's/^ssid="\(.*\)".*/\1/')" +# sanitize: SSID is attacker-controlled and becomes a folder/command-line token +ssid_lower="$(echo "$ssid" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9_.-')" +[ -z "$ssid_lower" ] && ssid_lower="network" + +[ "$1" = "nand" ] && backup_path="$rootfs/etc/wifi_backup" +network="$backup_path/$ssid_lower" + +backupWifi() { + if [ -d "$backup_path" ]; then + [ -d "$network" ] && rm -rf "$network" + fi + mkdir -p "$network" + chmod 777 "$network" + cp -r "$wpa_supplicant_conf" "$network" + +} + +restoreWifi() { + if [ -n "$1" ]; then + backup_conf="$backup_path/$1/wpa_supplicant.conf" + rm -f "$wpa_supplicant_conf" + cp -r "$backup_conf" "$wpa_supplicant" + ifconfig wlan0 down + echo "WIFI config restored." + echo "" + sleep 2 + ifconfig wlan0 up + else + echo "WIFI config does not exist." + fi +} + +case "$2" in +backup) + "$om_scripts/gen_splash" /tmp/wifi_backup_splash.png WIFI_BACKUP_SPLASH_LINE1 WIFI_BACKUP_SPLASH_LINE2 && decodepng /tmp/wifi_backup_splash.png >/dev/fb0 + backupWifi + echo "WIFI config backed up to $network" + sleep 1 + sh "$om_scripts/om_network" + ;; +restore) + restoreWifi $3 + sh "$om_network_scripts/reconnect.sh" + ;; +esac diff --git a/mod/etc/options_menu/network/scripts/om_vars b/mod/etc/options_menu/network/scripts/om_vars new file mode 100644 index 0000000..50882c8 --- /dev/null +++ b/mod/etc/options_menu/network/scripts/om_vars @@ -0,0 +1,39 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090,SC2039 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086 +source $mountpoint/etc/options_menu/scripts/om_functions +script_init + +om_network="$options_menu/network" +om_network_cmds="$om_network/commands" +om_network_scripts="$om_network/scripts" +om_wifi_restore="$om_network/restore" +om_wifi_restore_cmds="$om_wifi_restore/commands" +om_wifi_restore_scripts="$om_wifi_restore/scripts" + +usb_backup="/media/data/wifi_backup" +nand_backup="$rootfs/etc/wifi_backup" +wpa_supplicant="/etc/wpa_supplicant" + +disable_restore_usb="$om_network_cmds/_RestoreUsb" +disable_restore_nand="$om_network_cmds/_RestoreNand" +enable_restore_usb="$om_network_cmds/c0060_RestoreUsb" +enable_restore_nand="$om_network_cmds/c0050_RestoreNand" + +backup_path="/media/data/wifi_backup" +backup_dest="usb" diff --git a/mod/etc/options_menu/network/scripts/reconnect.sh b/mod/etc/options_menu/network/scripts/reconnect.sh index ebe20b1..f1eee96 100644 --- a/mod/etc/options_menu/network/scripts/reconnect.sh +++ b/mod/etc/options_menu/network/scripts/reconnect.sh @@ -1,15 +1,17 @@ #!/bin/bash +# shellcheck source=/dev/null +source $mountpoint/etc/options_menu/scripts/om_functions echo "Testing internet connection..." sleep 1 -if nc -zw1 google.com 443; then +if hasInternet; then echo "You are already connected to the internet." else echo "Restarting network. Please wait." /etc/init.d/S92networking restart echo "Testing internet connection..." sleep 5 - if nc -zw1 google.com 443; then + if hasInternet; then echo "Success! You are now connected to the internet." else echo "Connection failed. Please connect your WiFi adapter." diff --git a/mod/etc/options_menu/network/scripts/restore_settings.sh b/mod/etc/options_menu/network/scripts/restore_settings.sh new file mode 100644 index 0000000..8727c8f --- /dev/null +++ b/mod/etc/options_menu/network/scripts/restore_settings.sh @@ -0,0 +1,50 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086,SC3046 +source $mountpoint/etc/options_menu/network/scripts/om_vars +script_init + +if [ "$1" = "nand" ]; then + backup_path="$rootfs/etc/wifi_backup" + backup_dest="$1" +fi + +mkdir -p "$om_wifi_restore_cmds" +find "$om_wifi_restore_cmds" -type f -name 'c0001_*' -exec rm {} \; + +find "$backup_path/." -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n 1 basename | while IFS= read -r wifi_network; do + wpa_supplicant_conf="$backup_path/$wifi_network/wpa_supplicant.conf" + # sanitize: SSID is attacker-controlled and ends up in a generated command file + ssid="$(grep -o 'ssid=".*"' "$wpa_supplicant_conf" | sed 's/^ssid="\(.*\)".*/\1/' | tr -d '\r\n')" + ssid_lower="$(echo "$ssid" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9_.-')" + [ -z "$ssid_lower" ] && ssid_lower="network" + echo "COMMAND_NAME=$ssid +COMMAND_TYPE=INTERNAL +RESTART_UI=FALSE +COMMAND_STR=sh $om_network_scripts/backup-wifi.sh $backup_dest restore $ssid_lower +DELETE_STR=rm -rf \"$backup_path/$wifi_network\" && sh $om_network_scripts/restore_settings.sh $1 +DELETE_CONFIRM_KEY=DELETE_BACKUP_CONFIRM" >"$om_wifi_restore_cmds/c0001_$ssid_lower" +done + +if ! ls "$om_wifi_restore_cmds"/c0001_* >/dev/null 2>&1; then + rmdir "$backup_path" 2>/dev/null + OM_BACK_STACK="${OM_BACK_STACK%;*}" sh "$options_menu/scripts/om_network" + exit 0 +fi + +$options_menu/options --commandPath $om_wifi_restore_cmds/ --scriptPath $om_wifi_restore_scripts --title "RESTORE_WIFI_CONFIG" & diff --git a/mod/etc/options_menu/network/scripts/show-my-ip.sh b/mod/etc/options_menu/network/scripts/show-my-ip.sh index c45253c..fa37b3c 100644 --- a/mod/etc/options_menu/network/scripts/show-my-ip.sh +++ b/mod/etc/options_menu/network/scripts/show-my-ip.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh echo "Grabbing Internal IP..." @@ -6,13 +6,11 @@ ifconfig | grep "inet " | grep -v 127.0.0.1|awk 'match($0, /([0-9]+\.[0-9]+\.[0- echo "Grabbing External IP... (Might take a bit)" -PUBLIC_IP=$(wget http://ipecho.net/plain -O - -q) +public_ip=$(wget http://ipecho.net/plain -O - -q) -wget -q --tries=10 --timeout=10 --spider http://google.com - -if [[ $? -eq 0 ]]; then +if wget -q --tries=10 --timeout=10 --spider http://google.com; then echo "You are online!" - echo "Your external IP is:" $PUBLIC_IP + echo "Your external IP is:" "$public_ip" else echo "You are offline" fi diff --git a/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll b/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll index 9237ceb..2aa7171 100644 --- a/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll +++ b/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll @@ -1,3 +1,4 @@ -COMMAND_NAME=Restore Default Settings (All) +COMMAND_NAME=RA_RESTORE_DEFAULTS_ALL COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/default-settings-all.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_defaults_all.png diff --git a/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings b/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings index 079b257..b2e84d4 100644 --- a/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings +++ b/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings @@ -1,3 +1,4 @@ -COMMAND_NAME=Restore Default Settings +COMMAND_NAME=RA_RESTORE_DEFAULTS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/default-settings.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_defaults.png diff --git a/mod/etc/options_menu/retroarch/commands/c0030_BackupNand b/mod/etc/options_menu/retroarch/commands/c0030_BackupNand index 53dbca0..31c5d9c 100644 --- a/mod/etc/options_menu/retroarch/commands/c0030_BackupNand +++ b/mod/etc/options_menu/retroarch/commands/c0030_BackupNand @@ -1,3 +1,4 @@ -COMMAND_NAME=Backup Settings to NAND +COMMAND_NAME=RA_BACKUP_NAND COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/backup-nand.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_backup_nand.png diff --git a/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb b/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb index 68f0f71..0a37b21 100644 --- a/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb +++ b/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb @@ -1,4 +1,5 @@ -COMMAND_NAME=Backup Settings to USB +COMMAND_NAME=RA_BACKUP_USB COMMAND_TYPE=INTERNAL USB_ONLY=TRUE COMMAND_STR=sh %script_dir%/backup-usb.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_backup_usb.png diff --git a/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand b/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand index f63d749..5cc613d 100644 --- a/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand +++ b/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand @@ -1,3 +1,4 @@ -COMMAND_NAME=Restore Settings from NAND +COMMAND_NAME=RA_RESTORE_NAND COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/restore-nand.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_restore_nand.png diff --git a/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb b/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb index c8ae66f..b1fd3e7 100644 --- a/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb +++ b/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb @@ -1,4 +1,5 @@ -COMMAND_NAME=Restore Settings from USB +COMMAND_NAME=RA_RESTORE_USB COMMAND_TYPE=INTERNAL USB_ONLY=TRUE COMMAND_STR=sh %script_dir%/restore-usb.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_restore_usb.png diff --git a/mod/etc/options_menu/retroarch/commands/c0061_DeleteBackups b/mod/etc/options_menu/retroarch/commands/c0061_DeleteBackups deleted file mode 100644 index 6466f35..0000000 --- a/mod/etc/options_menu/retroarch/commands/c0061_DeleteBackups +++ /dev/null @@ -1,3 +0,0 @@ -COMMAND_NAME=Delete all settings backups -COMMAND_TYPE=INTERNAL -COMMAND_STR=sh %script_dir%/delete-backups.sh diff --git a/mod/etc/options_menu/retroarch/commands/c0061_SyncBios b/mod/etc/options_menu/retroarch/commands/c0061_SyncBios old mode 100755 new mode 100644 index 34415e6..fd998f6 --- a/mod/etc/options_menu/retroarch/commands/c0061_SyncBios +++ b/mod/etc/options_menu/retroarch/commands/c0061_SyncBios @@ -1,4 +1,5 @@ -COMMAND_NAME=Transfer BIOS file(s) +COMMAND_NAME=RA_TRANSFER_BIOS COMMAND_TYPE=INTERNAL USB_ONLY=TRUE COMMAND_STR=sh %script_dir%/sync-bios.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_sync_bios.png diff --git a/mod/etc/options_menu/retroarch/commands/c0065_DeleteBackups b/mod/etc/options_menu/retroarch/commands/c0065_DeleteBackups new file mode 100644 index 0000000..b4a2362 --- /dev/null +++ b/mod/etc/options_menu/retroarch/commands/c0065_DeleteBackups @@ -0,0 +1,4 @@ +COMMAND_NAME=RA_DELETE_BACKUPS +COMMAND_TYPE=INTERNAL +COMMAND_STR=sh %script_dir%/delete-backups.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_delete_backups.png diff --git a/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides b/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides index 67a03de..2bccf6a 100644 --- a/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides +++ b/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides @@ -1,3 +1,4 @@ -COMMAND_NAME=Delete game and core overrides +COMMAND_NAME=RA_DELETE_OVERRIDES COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/delete-overrides.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_delete_overrides.png diff --git a/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps b/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps index c8fd733..0058fed 100644 --- a/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps +++ b/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps @@ -1,3 +1,4 @@ -COMMAND_NAME=Delete remap files +COMMAND_NAME=RA_DELETE_REMAPS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/delete-remaps.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_delete_remaps.png diff --git a/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios b/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios old mode 100755 new mode 100644 index 93f68d6..6404e39 --- a/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios +++ b/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios @@ -1,4 +1,5 @@ -COMMAND_NAME=Delete BIOS file(s) from NAND +COMMAND_NAME=RA_DELETE_BIOS COMMAND_TYPE=INTERNAL USB_ONLY=TRUE COMMAND_STR=sh %script_dir%/delete-bios.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_delete_bios.png diff --git a/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens b/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens index a2abd91..022dfd6 100644 --- a/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens +++ b/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens @@ -1,3 +1,5 @@ -COMMAND_NAME=Toggle RA and Canoe load screens +COMMAND_NAME=RA_TOGGLE_LOAD_SCREENS COMMAND_TYPE=INTERNAL +ENABLE_IF=[ -f "$rootfs/share/retroarch/assets/RAloading-min.png" ] COMMAND_STR=sh %script_dir%/toggle-loadscreens.sh +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_load_screens.png diff --git a/mod/etc/options_menu/retroarch/commands/c9999_Back b/mod/etc/options_menu/retroarch/commands/c9999_Back deleted file mode 100644 index 651d780..0000000 --- a/mod/etc/options_menu/retroarch/commands/c9999_Back +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Back -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & \ No newline at end of file diff --git a/mod/etc/options_menu/retroarch/commands/c9999_Exit b/mod/etc/options_menu/retroarch/commands/c9999_Exit deleted file mode 100644 index 6a60cb3..0000000 --- a/mod/etc/options_menu/retroarch/commands/c9999_Exit +++ /dev/null @@ -1,4 +0,0 @@ -COMMAND_NAME=Exit -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" diff --git a/mod/etc/options_menu/retroarch/scripts/backup-nand.sh b/mod/etc/options_menu/retroarch/scripts/backup-nand.sh old mode 100755 new mode 100644 index 7a1d97d..62977fd --- a/mod/etc/options_menu/retroarch/scripts/backup-nand.sh +++ b/mod/etc/options_menu/retroarch/scripts/backup-nand.sh @@ -2,8 +2,9 @@ source /etc/preinit script_init +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars -Backup_To_NAND() +backupToNand() { if [ -d "$rootfs/etc/ra_backup" ]; then rm -rf "$rootfs/etc/ra_backup/" @@ -12,7 +13,7 @@ Backup_To_NAND() mkdir -pm 777 "$rootfs/etc/ra_backup" /etc/options_menu/retroarch/scripts/RASettingsBackup "Backup" "/etc/options_menu/retroarch/default_files/retroarch.cfg" "/etc/libretro/retroarch.cfg" "$rootfs/etc/ra_backup/retroarch.cfg" /etc/options_menu/retroarch/scripts/RASettingsBackup "Backup" "/etc/options_menu/retroarch/default_files/retroarch-core-options.cfg" "/etc/libretro/retroarch-core-options.cfg" "$rootfs/etc/ra_backup/retroarch-core-options.cfg" - cp -r /etc/libretro/.config/retroarch/config "$rootfs/etc/ra_backup" + cp -r "$ra_config" "$rootfs/etc/ra_backup/config" } -Backup_To_NAND && echo "Retroarch config backed up to /etc/ra_backup" +backupToNand && echo "Retroarch config backed up to /etc/ra_backup" diff --git a/mod/etc/options_menu/retroarch/scripts/backup-usb.sh b/mod/etc/options_menu/retroarch/scripts/backup-usb.sh old mode 100755 new mode 100644 index 022009b..a32bcbf --- a/mod/etc/options_menu/retroarch/scripts/backup-usb.sh +++ b/mod/etc/options_menu/retroarch/scripts/backup-usb.sh @@ -1,6 +1,8 @@ #!/bin/sh -Backup_To_USB() +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + +backupToUsb() { if [ -d /media/data/ra_backup ]; then rm -rf /media/data/ra_backup/ @@ -9,7 +11,7 @@ Backup_To_USB() mkdir -pm 777 /media/data/ra_backup /etc/options_menu/retroarch/scripts/RASettingsBackup "Backup" "/etc/options_menu/retroarch/default_files/retroarch.cfg" "/etc/libretro/retroarch.cfg" "/media/data/ra_backup/retroarch.cfg" /etc/options_menu/retroarch/scripts/RASettingsBackup "Backup" "/etc/options_menu/retroarch/default_files/retroarch-core-options.cfg" "/etc/libretro/retroarch-core-options.cfg" "/media/data/ra_backup/retroarch-core-options.cfg" - cp -r /etc/libretro/.config/retroarch/config /media/data/ra_backup + cp -r "$ra_config" /media/data/ra_backup/config } -Backup_To_USB && echo "Retroarch config backed up to USB:/data/ra_backup" +backupToUsb && echo "Retroarch config backed up to USB:/data/ra_backup" diff --git a/mod/etc/options_menu/retroarch/scripts/default-settings-all.sh b/mod/etc/options_menu/retroarch/scripts/default-settings-all.sh old mode 100755 new mode 100644 index 4fd4813..ed5c832 --- a/mod/etc/options_menu/retroarch/scripts/default-settings-all.sh +++ b/mod/etc/options_menu/retroarch/scripts/default-settings-all.sh @@ -1,12 +1,14 @@ #!/bin/sh +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + if [ -f "/etc/options_menu/retroarch/default_files/retroarch.cfg" ]; then cp /etc/options_menu/retroarch/default_files/retroarch.cfg /etc/libretro/ cp /etc/options_menu/retroarch/default_files/retroarch-core-options.cfg /etc/libretro/ - rm -r /etc/libretro/.config/retroarch/config/* - mkdir -m 777 /etc/libretro/.config/retroarch/config/remaps + rm -r "${ra_config:?}"/* + mkdir -m 777 "$ra_config/remaps" echo "Restored Default Settings." else echo "Cannot locate default configuration files." - echo "Please ensure you have the latest RetroArch 'Neo' installed" + echo "Please ensure RetroArch is installed." fi diff --git a/mod/etc/options_menu/retroarch/scripts/default-settings.sh b/mod/etc/options_menu/retroarch/scripts/default-settings.sh old mode 100755 new mode 100644 index cefda0c..e13a645 --- a/mod/etc/options_menu/retroarch/scripts/default-settings.sh +++ b/mod/etc/options_menu/retroarch/scripts/default-settings.sh @@ -6,5 +6,5 @@ if [ -f "/etc/options_menu/retroarch/default_files/retroarch.cfg" ]; then echo "Restored Default Settings." else echo "Cannot locate default configuration files." - echo "Please ensure you have the latest RetroArch 'Neo' installed" + echo "Please ensure RetroArch is installed." fi diff --git a/mod/etc/options_menu/retroarch/scripts/delete-backups.sh b/mod/etc/options_menu/retroarch/scripts/delete-backups.sh old mode 100755 new mode 100644 diff --git a/mod/etc/options_menu/retroarch/scripts/delete-bios.sh b/mod/etc/options_menu/retroarch/scripts/delete-bios.sh old mode 100755 new mode 100644 diff --git a/mod/etc/options_menu/retroarch/scripts/delete-overrides.sh b/mod/etc/options_menu/retroarch/scripts/delete-overrides.sh old mode 100755 new mode 100644 index f2b84dc..1d2c114 --- a/mod/etc/options_menu/retroarch/scripts/delete-overrides.sh +++ b/mod/etc/options_menu/retroarch/scripts/delete-overrides.sh @@ -1,6 +1,8 @@ #!/bin/sh -mv /etc/libretro/.config/retroarch/config/remaps /etc/libretro/.config/retroarch/ -rm -r /etc/libretro/.config/retroarch/config/* -mv /etc/libretro/.config/retroarch/remaps /etc/libretro/.config/retroarch/config/ +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + +mv "$ra_config/remaps" /tmp/ra_remaps +rm -r "${ra_config:?}"/* +mv /tmp/ra_remaps "$ra_config/remaps" echo "Overrides deleted." diff --git a/mod/etc/options_menu/retroarch/scripts/delete-remaps.sh b/mod/etc/options_menu/retroarch/scripts/delete-remaps.sh old mode 100755 new mode 100644 index ba44872..7b55772 --- a/mod/etc/options_menu/retroarch/scripts/delete-remaps.sh +++ b/mod/etc/options_menu/retroarch/scripts/delete-remaps.sh @@ -1,4 +1,6 @@ #!/bin/sh -rm -r /etc/libretro/.config/retroarch/config/remaps/* +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + +rm -r "${ra_config:?}/remaps"/* echo "Remaps deleted." diff --git a/mod/etc/options_menu/retroarch/scripts/ra_vars b/mod/etc/options_menu/retroarch/scripts/ra_vars new file mode 100644 index 0000000..862aa62 --- /dev/null +++ b/mod/etc/options_menu/retroarch/scripts/ra_vars @@ -0,0 +1,27 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090,SC2039 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086 +source $mountpoint/etc/options_menu/scripts/om_functions +script_init + +# per-core configs: .config/retroarch/config (Neo) or config/ (_km Ozone) +if [ -d "$rootfs/etc/libretro/.config/retroarch/config" ]; then + ra_config="$rootfs/etc/libretro/.config/retroarch/config" +else + ra_config="$rootfs/etc/libretro/config" +fi diff --git a/mod/etc/options_menu/retroarch/scripts/restore-nand.sh b/mod/etc/options_menu/retroarch/scripts/restore-nand.sh old mode 100755 new mode 100644 index 06dc219..28c7d92 --- a/mod/etc/options_menu/retroarch/scripts/restore-nand.sh +++ b/mod/etc/options_menu/retroarch/scripts/restore-nand.sh @@ -1,11 +1,13 @@ #!/bin/sh +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + if [ ! -f "/etc/ra_backup/retroarch.cfg" ]; then echo "Backup file does not exist." else /etc/options_menu/retroarch/scripts/RASettingsBackup "Restore" "/etc/options_menu/retroarch/default_files/retroarch.cfg" "/etc/libretro/retroarch.cfg" "$rootfs/etc/ra_backup/retroarch.cfg" /etc/options_menu/retroarch/scripts/RASettingsBackup "Restore" "/etc/options_menu/retroarch/default_files/retroarch-core-options.cfg" "/etc/libretro/retroarch-core-options.cfg" "$rootfs/etc/ra_backup/retroarch-core-options.cfg" - rm -rf /etc/libretro/.config/retroarch/config/ - cp -r /etc/ra_backup/config /etc/libretro/.config/retroarch + rm -rf "${ra_config:?}" + cp -r /etc/ra_backup/config "$ra_config" echo "Retroarch configs restored." fi diff --git a/mod/etc/options_menu/retroarch/scripts/restore-usb.sh b/mod/etc/options_menu/retroarch/scripts/restore-usb.sh old mode 100755 new mode 100644 index 70115d3..cdb991f --- a/mod/etc/options_menu/retroarch/scripts/restore-usb.sh +++ b/mod/etc/options_menu/retroarch/scripts/restore-usb.sh @@ -1,11 +1,13 @@ #!/bin/sh +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars + if [ ! -f "/media/data/ra_backup/retroarch.cfg" ]; then echo "Backup file does not exist." else /etc/options_menu/retroarch/scripts/RASettingsBackup "Restore" "/etc/options_menu/retroarch/default_files/retroarch.cfg" "/etc/libretro/retroarch.cfg" "/media/data/ra_backup/retroarch.cfg" /etc/options_menu/retroarch/scripts/RASettingsBackup "Restore" "/etc/options_menu/retroarch/default_files/retroarch-core-options.cfg" "/etc/libretro/retroarch-core-options.cfg" "/media/data/ra_backup/retroarch-core-options.cfg" - rm -rf /etc/libretro/.config/retroarch/config/ - cp -r /media/data/ra_backup/config /etc/libretro/.config/retroarch + rm -rf "${ra_config:?}" + cp -r /media/data/ra_backup/config "$ra_config" echo "Retroarch configs restored." fi diff --git a/mod/etc/options_menu/retroarch/scripts/sync-bios.sh b/mod/etc/options_menu/retroarch/scripts/sync-bios.sh old mode 100755 new mode 100644 diff --git a/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh b/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh index b191c9c..321bd4e 100644 --- a/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh +++ b/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh @@ -15,7 +15,7 @@ if [ -f "$rootfs/share/retroarch/assets/RAloading-min.png" ] && [ -f "$rootfs/sh ok=1 fi -if [ -f "$rootfs/share/retroarch/assets/RAloading-min.png_DISABLED" ] && [ -f "$rootfs/share/retroarch/assets/loading-min.png_DISABLED" ] && [ "$ok" == 0 ]; then +if [ -f "$rootfs/share/retroarch/assets/RAloading-min.png_DISABLED" ] && [ -f "$rootfs/share/retroarch/assets/loading-min.png_DISABLED" ] && [ "$ok" = 0 ]; then mv "$rootfs/share/retroarch/assets/RAloading-min.png_DISABLED" "$rootfs/share/retroarch/assets/RAloading-min.png" echo "RetroArch loading screen enabled..." && echo " " mv "$rootfs/share/retroarch/assets/loading-min.png_DISABLED" "$rootfs/share/retroarch/assets/loading-min.png" @@ -23,8 +23,8 @@ if [ -f "$rootfs/share/retroarch/assets/RAloading-min.png_DISABLED" ] && [ -f "$ ok=1 fi -if [ "$ok" == 1 ]; then +if [ "$ok" = 1 ]; then echo "RetroArch load screen toggle complete!" else - echo "Failed to locate load screens... Please ensure you are using the latest RetroArch 'Neo' Build!" + echo "Failed to locate load screens - this RetroArch build doesn't support this option." fi diff --git a/mod/etc/options_menu/save_manager/launch_save_manager.sh b/mod/etc/options_menu/save_manager/launch_save_manager.sh new file mode 100644 index 0000000..33ab81c --- /dev/null +++ b/mod/etc/options_menu/save_manager/launch_save_manager.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# save_manager exit: 0 = back to the opening menu, else leave +options_path="${1%/}" + +"$options_path/save_manager/save_manager" +if [ $? -ne 0 ]; then + sh "$options_path/scripts/ResumeUI.sh" + exit 0 +fi + +entry="${OM_BACK_STACK##*;}" +remaining="${OM_BACK_STACK%;*}" +[ "$remaining" = "$OM_BACK_STACK" ] && remaining="" +command_path="${entry%%,*}" +rest="${entry#*,}" +script_path="${rest%%,*}" +title_key="${rest#*,}" + +usleep 50000 +if [ -n "$script_path" ]; then + OM_BACK_STACK="$remaining" "$options_path/options" --commandPath "$command_path" --scriptPath "$script_path" --title "$title_key" +else + OM_BACK_STACK="$remaining" "$options_path/options" --commandPath "$command_path" --title "$title_key" +fi diff --git a/mod/etc/options_menu/scripts/BackupSavesUsb.sh b/mod/etc/options_menu/scripts/BackupSavesUsb.sh new file mode 100644 index 0000000..945da44 --- /dev/null +++ b/mod/etc/options_menu/scripts/BackupSavesUsb.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +source /etc/options_menu/scripts/om_functions + +# system state, not saves: a restore must not overwrite it +mkdir -pm 777 /media/data/saves_backup +rsync -a --delete \ + --exclude=FOLDER --exclude=hakchi --exclude=home-menu \ + --exclude=dimming.txt --exclude=lang.txt --exclude=mcp-state \ + /media/hakchi/saves/ /media/data/saves_backup/ || exit 1 +translate BACKUP_SAVES_USB_DONE diff --git a/mod/etc/options_menu/scripts/ChangeCombo b/mod/etc/options_menu/scripts/ChangeCombo deleted file mode 100755 index b28801b..0000000 Binary files a/mod/etc/options_menu/scripts/ChangeCombo and /dev/null differ diff --git a/mod/etc/options_menu/scripts/GetSpriteSheet.sh b/mod/etc/options_menu/scripts/GetSpriteSheet.sh deleted file mode 100644 index de91b3c..0000000 --- a/mod/etc/options_menu/scripts/GetSpriteSheet.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# Get Sprite Sheet code based on External UI hmod by DanTheMan827 - -source /etc/preinit -script_init - -region="$sfregion" -# For backwards compatibility with previous hakchi versions -[ "$(cat "$mountpoint/etc/clover/REGION")" == "EUR" ] && region="eur" - -case "$sftype-$region" in - nes-usa) - echo -ne "$mountpoint/usr/share/clover-ui/resources/sprites/nes.png" - ;; - nes-eur) - echo -ne "$mountpoint/usr/share/clover-ui/resources/sprites/nes.png" - ;; - nes-jpn) - echo -ne "$mountpoint/usr/share/clover-ui/resources/sprites/hvc.png" - ;; - hvcj-jpn) - echo -ne "$mountpoint/usr/share/ui/hvc/resources/sprites/packed.png" - ;; - snes-usa) - echo -ne "$mountpoint/usr/share/ui/snes-usa/resources/sprites/packed.png" - ;; - snes-eur) - echo -ne "$mountpoint/usr/share/ui/snes-eur/resources/sprites/packed.png" - ;; - snes-jpn) - echo -ne "$mountpoint/usr/share/ui/shvc/resources/sprites/packed.png" - ;; -esac diff --git a/mod/etc/options_menu/scripts/OrphanSaves.sh b/mod/etc/options_menu/scripts/OrphanSaves.sh new file mode 100644 index 0000000..47a9c93 --- /dev/null +++ b/mod/etc/options_menu/scripts/OrphanSaves.sh @@ -0,0 +1,265 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Saves of removed games. Entry: CLV-... (SRAM + suspend points) or retroarch/. +# OrphanSaves.sh stats saves, USB backup (-1 = none), orphans, moved aside +# OrphanSaves.sh orphans entries with saves but no game +# OrphanSaves.sh deleted entries already moved aside +# OrphanSaves.sh move FILE move the entries listed in FILE aside +# OrphanSaves.sh restore FILE move them back (never over an existing save) +# OrphanSaves.sh backup entries in the USB backup +# OrphanSaves.sh restore-backup FILE copy FILE's entries back from the USB backup +# OrphanSaves.sh merge-names FILE add the entryname lines in FILE to the cache +# OrphanSaves.sh merge-backup-names add the names in the USB backup, keeping newer ones +# OrphanSaves.sh sync-names add the games installed on the console to the cache +# OrphanSaves.sh cached-names print the name cache +# Name lookups only read Hakchi's .desktop files, saves are never touched. + +source /etc/preinit +script_init + +saves_root=/media/hakchi/saves +backup_root=/media/data/saves_backup +deleted_root=/media/data/deleted_games_saves +names_cache="$profilepath/game_names.txt" +old_names_cache=/media/data/hakchi_game_names +ra_save_suffix='\.(srm|rtc|state([0-9]+)?(\.auto)?)(\.png)?$' + +raContent() { + sed -E "s/$ra_save_suffix//" +} + +saveEntries() { + ls "$1" 2>/dev/null | grep "^CLV-" | grep -v "^CLV-S-" + ls "$1/retroarch" 2>/dev/null | raContent | sed 's#^#retroarch/#' +} + +entriesOnConsole() { + local games_root + games_root="$(dirname "$(findGameStorage)")" + { + find "$games_root" -maxdepth 4 -name "*.desktop" -exec sed -n "s/^Code=//p" {} + + ls "$games_root"/*/.storage "$squashfs/usr/share/games" + { + find "$games_root"/*/.storage "$squashfs/usr/share/games" "$rootfs/usr/share/games" -mindepth 2 -maxdepth 2 -type f + find "$games_root" -maxdepth 4 -name "*.desktop" -exec sed -n "s/^Exec=//p" {} + | tr ' ' '\n' | grep / + } | sed 's#.*/##' | while IFS= read -r rom; do + echo "retroarch/$rom" + echo "retroarch/${rom%.*}" + done + } 2>/dev/null | grep -E "^(CLV-|retroarch/)" | sort -u +} + +listOrphans() { + local on_console + on_console="$(mktemp)" + entriesOnConsole > "$on_console" + saveEntries "$saves_root" | sort -u | comm -23 - "$on_console" + rm -f "$on_console" +} + +isEntry() { + case "$1" in + CLV-S-*|*/*/*|retroarch/|retroarch/.|retroarch/..) return 1 ;; + CLV-*) case "$1" in */*) return 1 ;; esac ;; + retroarch/*) ;; + *) return 1 ;; + esac +} + +moveEntry() { + local from="$1" to="$2" entry="$3" content file + case "$entry" in + retroarch/*) + content="${entry#retroarch/}" + mkdir -p "$to/retroarch" + ls "$from/retroarch" 2>/dev/null | while IFS= read -r file; do + [ "$(echo "$file" | raContent)" = "$content" ] || continue + [ -e "$to/retroarch/$file" ] && [ "$to" = "$saves_root" ] && continue + mv -f "$from/retroarch/$file" "$to/retroarch/$file" + done + rmdir "$from/retroarch" 2>/dev/null + ;; + *) + [ -d "$from/$entry" ] || return + [ -e "$to/$entry" ] && [ "$to" = "$saves_root" ] && return + rm -rf "$to/$entry" + mv "$from/$entry" "$to/$entry" + ;; + esac +} + +moveListed() { + local from="$1" to="$2" list="$3" entry + mkdir -pm 777 "$to" + while IFS= read -r entry; do + isEntry "$entry" && moveEntry "$from" "$to" "$entry" + done < "$list" + rmdir "$deleted_root" 2>/dev/null + sync +} + +copyFromBackup() { + local entry="$1" content file + case "$entry" in + retroarch/*) + content="${entry#retroarch/}" + mkdir -p "$saves_root/retroarch" || return 1 + ls "$backup_root/retroarch" 2>/dev/null | while IFS= read -r file; do + [ "$(echo "$file" | raContent)" = "$content" ] || continue + cp -a "$backup_root/retroarch/$file" "$saves_root/retroarch/$file" || exit 1 + done + ;; + *) + [ -d "$backup_root/$entry" ] || return 0 + cp -a "$backup_root/$entry" "$saves_root/" + ;; + esac +} + +restoreFromBackup() { + local entry + while IFS= read -r entry; do + isEntry "$entry" || continue + copyFromBackup "$entry" || return 1 + done < "$1" + mergeBackupNames +} + +mergeBackupNames() { + [ -f "$backup_root/game_names.txt" ] || { sync; return 0; } + mergeNames "$backup_root/game_names.txt" older +} + +# entryname per game folder under the folders on stdin; RetroArch names from files and Exec= +gameNames() { + local dir + set -- + while IFS= read -r dir; do + [ -d "$dir" ] && set -- "$@" "$dir" + done + [ $# -gt 0 ] || return 0 + { + find "$@" -mindepth 2 -maxdepth 2 -type f -name '*.desktop' -exec awk ' + function flush( n, i, token) { + if(code ~ /^CLV-/ && name != "") { + print "N\t" code "\t" name + n = split(exec, token, " ") + for(i = 1; i <= n; i++) + if(token[i] ~ /\//) { sub(/.*\//, "", token[i]); print "R\t" code "\t" token[i] } + } + code = name = exec = "" + } + FNR == 1 { flush() } + { sub(/\r$/, ""); gsub(/\t/, " ") } + /^Code=/ { code = substr($0, 6) } + /^Name=/ && name == "" { name = substr($0, 6) } + /^Exec=/ { exec = substr($0, 6) } + END { flush() }' {} + 2>/dev/null + find "$@" -mindepth 2 -maxdepth 2 -type f ! -name '*.desktop' ! -name '*.png' 2>/dev/null \ + | awk -F / '{ print "R\t" $(NF-1) "\t" $NF }' + } | awk -F '\t' ' + NF != 3 || $3 == "" { next } + $1 == "N" { if(!($2 in name)) { name[$2] = $3; print $2 "\t" $3 } next } + { rom[++n] = $2 "\t" $3 } + END { + for(i = 1; i <= n; i++) { + split(rom[i], r, "\t") + if(!(r[1] in name)) continue + # game.sfc.gz is saved as game.srm + print "retroarch/" r[2] "\t" name[r[1]] + if(sub(/\.[^.]*$/, "", r[2])) print "retroarch/" r[2] "\t" name[r[1]] + if(sub(/\.[^.]*$/, "", r[2])) print "retroarch/" r[2] "\t" name[r[1]] + } + }' | awk -F '\t' '!seen[$1]++' +} + +installedNames() { + local games_root + games_root="$(dirname "$(findGameStorage)")" + printf '%s\n' "$games_root"/*/* "$games_root"/*/.storage "$squashfs/usr/share/games" | gameNames +} + +# names are never dropped; FILE wins unless $2 = older. Folds in the alpha10 cache once. +mergeNames() { + local tmp="$names_cache.tmp" + { + [ "$2" = older ] || cat "$1" + cat "$names_cache" 2>/dev/null + [ "$2" = older ] && cat "$1" + cat "$old_names_cache" 2>/dev/null + } | awk -F '\t' 'NF == 2 && $2 != "" && !seen[$1]++' | sort > "$tmp" || { rm -f "$tmp"; return 1; } + if cmp -s "$tmp" "$names_cache"; then + rm -f "$tmp" + else + mv -f "$tmp" "$names_cache" || return 1 + fi + [ -f "$old_names_cache" ] && rm -f "$old_names_cache" + sync +} + +addNames() { + local found status + found="$(mktemp)" + "$@" > "$found" + mergeNames "$found" + status=$? + rm -f "$found" + return $status +} + +case "$1" in + stats) + saveEntries "$saves_root" | sort -u | wc -l + if [ -d "$backup_root" ]; then saveEntries "$backup_root" | sort -u | wc -l; else echo -1; fi + listOrphans | wc -l + saveEntries "$deleted_root" | sort -u | wc -l + ;; + orphans) + listOrphans + ;; + deleted) + saveEntries "$deleted_root" | sort -u + ;; + move) + [ -f "$2" ] && moveListed "$saves_root" "$deleted_root" "$2" + ;; + restore) + [ -f "$2" ] && moveListed "$deleted_root" "$saves_root" "$2" + ;; + backup) + saveEntries "$backup_root" | sort -u + ;; + restore-backup) + [ -f "$2" ] && restoreFromBackup "$2" + ;; + merge-names) + [ -f "$2" ] && mergeNames "$2" + ;; + merge-backup-names) + mergeBackupNames + ;; + sync-names) + addNames installedNames + ;; + cached-names) + cat "$names_cache" 2>/dev/null + ;; + *) + echo "usage: $0 stats|orphans|deleted|move FILE|restore FILE|backup|restore-backup FILE|merge-names FILE|merge-backup-names|sync-names|cached-names" >&2 + exit 2 + ;; +esac diff --git a/mod/etc/options_menu/scripts/RADebug.sh b/mod/etc/options_menu/scripts/RADebug.sh index ab7faf2..f8087ad 100644 --- a/mod/etc/options_menu/scripts/RADebug.sh +++ b/mod/etc/options_menu/scripts/RADebug.sh @@ -9,12 +9,16 @@ mkdir -m 777 /media/data/log/RetroArchConfig rm /media/data/log/Hakchi_retroarch_debug.log rm -rf /media/data/log/RetroArchConfig/* -echo "$(chmod -R 777 /etc/libretro)" >> /media/data/log/Hakchi_retroarch_debug.log #Set full permissions for retroarch -echo "Dumping retroarch config to log folder..." >> /media/data/log/Hakchi_retroarch_debug.log -echo "$(cp -r /etc/libretro/.config /media/data/log/RetroArchConfig)" >> /media/data/log/Hakchi_retroarch_debug.log -echo "$(cp -r /etc/libretro/retroarch-core-options.cfg /media/data/log/RetroArchConfig)" >> /media/data/log/Hakchi_retroarch_debug.log -echo "$(cp -r /etc/libretro/retroarch.cfg /media/data/log/RetroArchConfig)" >> /media/data/log/Hakchi_retroarch_debug.log -if /bin/retroarch-mini null &> /media/data/log/Hakchi_retroarch_debug.log ; then +{ + chmod -R 777 /etc/libretro #Set full permissions for retroarch + echo "Dumping retroarch config to log folder..." + ra_base_dir=/etc/libretro/.config + [ -d "$ra_base_dir" ] || ra_base_dir=/etc/libretro/config + cp -r "$ra_base_dir" /media/data/log/RetroArchConfig + cp -r /etc/libretro/retroarch-core-options.cfg /media/data/log/RetroArchConfig + cp -r /etc/libretro/retroarch.cfg /media/data/log/RetroArchConfig +} >> /media/data/log/Hakchi_retroarch_debug.log 2>&1 +if /bin/retroarch-mini null >> /media/data/log/Hakchi_retroarch_debug.log 2>&1 ; then echo "RetroArch successfully ran using the test rig at $(date)" >> /media/data/log/Hakchi_retroarch_debug.log else echo "RetroArch FAILED to run using the test rig at $(date)" >> /media/data/log/Hakchi_retroarch_debug.log diff --git a/mod/etc/options_menu/scripts/RestoreSavesUsb.sh b/mod/etc/options_menu/scripts/RestoreSavesUsb.sh new file mode 100644 index 0000000..c4675a8 --- /dev/null +++ b/mod/etc/options_menu/scripts/RestoreSavesUsb.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +source /etc/options_menu/scripts/om_functions + +if [ ! -d /media/data/saves_backup ]; then + translate RESTORE_SAVES_USB_NOT_FOUND + exit 1 +fi + +rsync -a --exclude=game_names.txt /media/data/saves_backup/ /media/hakchi/saves/ || exit 1 +sh /etc/options_menu/scripts/OrphanSaves.sh merge-backup-names +translate RESTORE_SAVES_USB_DONE diff --git a/mod/etc/options_menu/scripts/USB_RW.sh b/mod/etc/options_menu/scripts/USB_RW.sh index 7a26453..517b4d3 100644 --- a/mod/etc/options_menu/scripts/USB_RW.sh +++ b/mod/etc/options_menu/scripts/USB_RW.sh @@ -7,7 +7,7 @@ script_init script_path="$(dirname "$0")" -if [ "$cfg_usb_rw" == "y" ]; then +if [ "$cfg_usb_rw" = "y" ]; then unset cfg_usb_rw echo "USB write access disabled..." else @@ -19,6 +19,6 @@ save_config echo " " echo "Rebooting console in 5 seconds..." -sleep(5) +sleep 5 reboot \ No newline at end of file diff --git a/mod/etc/options_menu/scripts/USB_RW_state.sh b/mod/etc/options_menu/scripts/USB_RW_state.sh new file mode 100644 index 0000000..385aacd --- /dev/null +++ b/mod/etc/options_menu/scripts/USB_RW_state.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# "on"/"off" for the USB write toggle; USB_RW.sh flips it +source /etc/preinit +script_init + +if [ "$cfg_usb_rw" = "y" ]; then + echo "on" +else + echo "off" +fi diff --git a/mod/etc/options_menu/scripts/armet.sh b/mod/etc/options_menu/scripts/armet.sh new file mode 100644 index 0000000..4282265 --- /dev/null +++ b/mod/etc/options_menu/scripts/armet.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# armet.sh state|toggle +# protection is on unless cfg_disable_armet=y (clover-kachikachi-wr) +source /etc/preinit +script_init + +case "$1" in +state) + if [ "$cfg_disable_armet" = "y" ]; then echo "off"; else echo "on"; fi + ;; +toggle) + if [ "$cfg_disable_armet" = "y" ]; then cfg_disable_armet='n'; else cfg_disable_armet='y'; fi + save_config + ;; +esac diff --git a/mod/etc/options_menu/scripts/om_functions b/mod/etc/options_menu/scripts/om_functions new file mode 100644 index 0000000..e8cf18e --- /dev/null +++ b/mod/etc/options_menu/scripts/om_functions @@ -0,0 +1,194 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC2034,SC2068,SC2039,SC3051,SC3046,SC3043 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck source=/dev/null +source /etc/preinit +script_init + +# PATHS +nand_path="$rootfs/usr/share" +share_path="$mountpoint/usr/share" +ui_path="$share_path/ui" +cloverui_path="$share_path/clover-ui/" +string_path="resources/strings" +root_bin="$rootfs/bin" +usb_path="$mountpoint/media/$modname" +font_dir="$usb_path/fonts" +mod_state_path="$mountpoint$profilepath/$modname" +[ ! -d "$font_dir" ] && font_dir="$nand_path/fonts" + + +system="$sftype" +s_type="$system" +core="$sftype" +case "$sftype" in +hvcj) + system="shonen" + s_type="$system" + system_string="$ui_path/hvc/$string_path" + core="nes" + ;; +nes) + if [ "$sfregion" = "jpn" ]; then + system="hvc" + s_type="$system" + system_string="$cloverui_path/$string_path" + fi + ;; +snes) + system_string="$ui_path/$sftype-$sfregion/$string_path" + if [ "$sfregion" = "jpn" ]; then + system="shvc" + system_string="$ui_path/$system/$string_path" + fi + ;; +esac + +# OM PATHS +options_menu="$mountpoint/etc/options_menu" +om_commands="$options_menu/commands" +om_scripts="$options_menu/scripts" +om_images="$options_menu/images" + +# FUNCTIONS +game_storage="$(findGameStorage)" + +rename() { + [ -f "$1" ] && mv "$1" "$2" +} + +translate() { + local key="$1" + local lang_code="en-US" + local lang_dir + local value="" + [ -f "$options_menu/language.cfg" ] && lang_code="$(cat "$options_menu/language.cfg")" + [ -z "$lang_code" ] && lang_code="en-US" + + for lang_dir in "$options_menu/language" "$options_menu"/*/lang; do + [ -z "$value" ] && [ -f "$lang_dir/$lang_code.lang" ] && value="$(grep "^${key}=" "$lang_dir/$lang_code.lang" 2>/dev/null | tail -1 | cut -d= -f2-)" + [ -z "$value" ] && [ -f "$lang_dir/en-US.lang" ] && value="$(grep "^${key}=" "$lang_dir/en-US.lang" 2>/dev/null | tail -1 | cut -d= -f2-)" + done + [ -z "$value" ] && value="$key" + echo "$value" +} + +remove() { + local target + for target in "$@"; do + [ -f "$target" ] || [ -d "$target" ] && rm -rf "$target" + done +} + +link() { + [ -f "$1" ] && ln -sf "$1" "$2" +} + +copier() { + [ -f "$1" ] && cp -r "$1" "$2" +} + +create() { + [ ! -f "$1" ] && touch "$1" +} + +enableCmds() { + local cmd_name + for cmd_name in "$@"; do + eval "rename \"\$disable_$cmd_name\" \"\$enable_$cmd_name\"" + done +} + +disableCmds() { + local cmd_name + for cmd_name in "$@"; do + eval "rename \"\$enable_$cmd_name\" \"\$disable_$cmd_name\"" + done +} + +# two providers, so one being down or blocked isn't read as offline +hasInternet() { + local host + ip route 2>/dev/null | grep -q '^default' || return 1 + for host in connectivitycheck.gstatic.com cloudflare.com; do + nc -z -w 3 "$host" 443 >/dev/null 2>&1 && return 0 + done + return 1 +} + +netChecker() { + if hasInternet; then + translate NO_PKG_ERR + else + translate NO_NET_ERR + fi +} + +toggleDownloads() { + if hasInternet; then + enableCmds "downloads" + else + disableCmds "downloads" + fi +} + +# downloader exit codes: 0 ok, 1 network/server, 2 usage, 3 no space, 143 cancelled +downloadError() { + case "$1" in + 0 | 143) ;; + 3) translate NOT_ENOUGH_SPACE ;; + *) netChecker ;; + esac +} + +# omDownload [fallback_url...] +omDownload() { + local rc + "$om_scripts/downloader" --progress --free-label "$(translate FREE_SPACE)" "$@" 2>&1 + rc=$? + downloadError "$rc" + return "$rc" +} + +# omDownloadAll [keep] +# runs " " per item; with keep > 0 it must delete the file; 3 stops the batch +omDownloadAll() { + local fifo="/tmp/om_download.$$" dl_pid dl_rc rc=0 item_rc item stale + for stale in /tmp/om_download.*; do + [ -p "$stale" ] && [ ! -d "/proc/${stale##*.}" ] && rm -f "$stale" + done + rm -f "$fifo" + mkfifo "$fifo" || return 1 + # progress (stderr) to the screen, results (stdout) to the fifo + # shellcheck disable=SC2069 + "$om_scripts/downloader" --progress --free-label "$(translate FREE_SPACE)" --keep "${3:-0}" --batch "$1" 2>&1 > "$fifo" & + dl_pid=$! + while read -r item_rc item; do + "$2" "$item_rc" "$item" + [ "$?" = 3 ] && rc=3 && break + done < "$fifo" + kill "$dl_pid" 2> /dev/null + wait "$dl_pid" + dl_rc=$? + [ "$dl_rc" = 3 ] && rc=3 + rm -f "$fifo" + return "$rc" +} + +overlayFS() { + [ -d "$1" ] && mount -t overlayfs -o lowerdir="$2",upperdir="$1" overlayfs "$2" +} diff --git a/mod/etc/options_menu/scripts/om_network b/mod/etc/options_menu/scripts/om_network new file mode 100644 index 0000000..001a48f --- /dev/null +++ b/mod/etc/options_menu/scripts/om_network @@ -0,0 +1,22 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090,SC2039 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086 +source $mountpoint/etc/options_menu/network/scripts/om_vars +script_init + +usleep 50000 && $options_menu/options --commandPath $om_network_cmds/ --scriptPath $om_network_scripts --title "NETWORK_OPTIONS" & diff --git a/mod/etc/options_menu/scripts/om_retroarch b/mod/etc/options_menu/scripts/om_retroarch new file mode 100644 index 0000000..1e58b79 --- /dev/null +++ b/mod/etc/options_menu/scripts/om_retroarch @@ -0,0 +1,22 @@ +#!/bin/sh +# shellcheck disable=SC2154,SC1091,SC1090,SC2039 +# Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck disable=SC2086 +source $mountpoint/etc/options_menu/retroarch/scripts/ra_vars +script_init + +usleep 50000 && $options_menu/options --commandPath $options_menu/retroarch/commands/ --scriptPath $options_menu/retroarch/scripts --title "RETROARCH_OPTIONS" & diff --git a/mod/etc/options_menu/scripts/save_dmesg.sh b/mod/etc/options_menu/scripts/save_dmesg.sh new file mode 100644 index 0000000..24b0abe --- /dev/null +++ b/mod/etc/options_menu/scripts/save_dmesg.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck source=/dev/null +source /etc/preinit +script_init +source "$mountpoint/etc/options_menu/scripts/om_functions" + +log_dir="$mountpoint/media/data/log" +mkdir -pm 777 "$log_dir" +dmesg > "$log_dir/dmesg.log" +translate SAVE_DMESG_DONE diff --git a/mod/etc/options_menu/scripts/system_info.sh b/mod/etc/options_menu/scripts/system_info.sh new file mode 100644 index 0000000..9a33105 --- /dev/null +++ b/mod/etc/options_menu/scripts/system_info.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# Copyright (C) 2026 DefKorns (https://defkorns.github.io/LICENSE) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# shellcheck source=/dev/null +source /etc/preinit +script_init +source "$mountpoint/etc/options_menu/scripts/om_functions" + +diskUsage() { + df -h "$1" 2>/dev/null | tail -1 | awk -v free="$(translate SYSINFO_FREE)" '{ print $3 " / " $2 " (" $4 " " free ")" }' +} + +[ -f /var/version ] && source /var/version + +echo "$(translate SYSINFO_CONSOLE): $sftype-$sfregion" +echo "hakchi: $hakchiVersion" +echo "Kernel: $kernelVersion" +echo "Boot: $bootVersion" +echo "$(translate SYSINFO_FIRMWARE): $(hakchi currentFirmware 2>/dev/null | sed "s/^_nand_$/NAND/")" +echo " " +echo "NAND: $(diskUsage "$mountpoint/var/lib")" +[ -d "$usb_path" ] && echo "USB/SD: $(diskUsage "$usb_path")" +saves="$(readlink -f /var/saves)" +[ -d "$saves" ] && echo "$(translate SYSINFO_SAVES): $(du -sh "$saves" 2>/dev/null | cut -f1)" diff --git a/mod/etc/options_menu/theme.cfg b/mod/etc/options_menu/theme.cfg new file mode 100644 index 0000000..5b26969 --- /dev/null +++ b/mod/etc/options_menu/theme.cfg @@ -0,0 +1,42 @@ +# Options Menu / Theme Manager color palette. Each line is "Key=R,G,B" +# (0-255 each). Delete this file (or a line in it) to fall back to the +# built-in default for that color. Read once at startup - restart the app +# to see a change. + +# overall app background, behind everything +Bg=12,15,22 +# divider lines, box outlines, unselected tile border +Border=42,44,51 +# selected row/tile border, section title accent bar, submenu chevrons, highlights +Accent=240,196,61 +# selected row / grid tile fill - if you change Bg, change this too or the +# rounded tile corners will look like they kept the old background +SelectedRowBg=20,22,26 + +# main text - titles, row labels, badge hints +Text=255,255,255 +# muted secondary text - dimmed labels, column headers +TextDim=141,141,147 +# list scroll arrows - remove this line to follow Text +ScrollArrow=255,255,255 +# the letter drawn inside a badge circle (A/B/X) +BadgeLetter=28,22,22 + +# A badge (Select) - outer ring, then a darker rim shade +BadgeA=76,175,110 +BadgeADark=46,107,66 +# B badge (Back/Exit) +BadgeB=225,85,84 +BadgeBDark=140,52,51 +# X badge (hold-to-delete hint) +BadgeX=108,142,191 +BadgeXDark=63,89,127 +# Y badge (unused right now, kept for future use) +BadgeY=201,123,132 +BadgeYDark=143,71,80 +# Start pill (wide badge instead of a letter circle) +BadgeStart=194,168,94 +BadgeStartDark=116,101,56 +# Module Uninstaller checkboxes (marked / unmarked) +CheckboxOn=225,85,84 +CheckboxOff=141,141,147 diff --git a/mod/install b/mod/install index c8c18b4..5879731 100644 --- a/mod/install +++ b/mod/install @@ -1,4 +1,31 @@ +#!/bin/sh +# shellcheck disable=SC2154 +om_root="$rootfs/etc/options_menu" +om_settings="button.cfg language.cfg controller/home_combination.prev" +om_backup="$temppath/om_settings" + +# remove previous and legacy installs first +rm -rf "$om_backup" +mkdir -p "$om_backup" +for om_file in $om_settings; do + [ -f "$om_root/$om_file" ] && mkdir -p "$(dirname "$om_backup/$om_file")" && cp -p "$om_root/$om_file" "$om_backup/$om_file" +done +for om_unfile in "$installpath/hmod/uninstall-options_deluxe"* \ + "$installpath/hmod/uninstall-options_menu" \ + "$installpath/hmod/uninstall-options_menu_"* \ + "$installpath/hmod/uninstall-hibernate_mod"* \ + "$installpath/hmod/uninstall-om-wifi-backup"* \ + "$installpath/hmod/uninstall-Hakchi_Options_Loadscreen_toggle"; do + [ -f "$om_unfile" ] && pack_uninstall "${om_unfile##*/uninstall-}" +done +cd "$transferpath" || return 1 + transfer_default +for om_file in $om_settings; do + [ -f "$om_backup/$om_file" ] && mkdir -p "$(dirname "$om_root/$om_file")" && cp -p "$om_backup/$om_file" "$om_root/$om_file" +done +rm -rf "$om_backup" + chmod +x "$rootfs/etc/options_menu/options" chmod +x "$rootfs/etc/options_menu/optiond" chmod +x "$rootfs/etc/options_menu/mod_uninstall/mod_uninstall" @@ -7,9 +34,17 @@ chmod +x "$rootfs/etc/options_menu/retroarch/scripts/RASettingsBackup" chmod +x "$rootfs/bin/standby" chmod +x "$rootfs/bin/standby_watchdog" rm -f "$rootfs/etc/init.d/S83standby_watchdog" -rm -f "$rootfs/etc/options_menu/retroarch/commands/c0025_ToggleLoadScreens" -rm -f "$installpath/hmod/uninstall-hibernate_mod"* -rm -f "$installpath/hmod/uninstall-options_deluxe_"* -rm -f "$installpath/hmod/uninstall-options_menu_"* -rm -f "$installpath/hmod/uninstall-Hakchi_Options_Loadscreen_toggle" +rm -f "$rootfs/etc/init.d/S8104OptionsMenuCleanup" +for om_legacy in advanced_commands/c0020_ModUninstall advanced_commands/c0030_DisplayTemp \ + advanced_commands/c0040_DisplayTop advanced_commands/c0050_BenchMark \ + advanced_commands/c0060_DumpFile advanced_commands/c0500_USB_RW \ + advanced_commands/c0700_RADebug advanced_commands/c0890_ChangeCombo \ + advanced_commands/c0900_ClearCache advanced_commands/c9999_Back \ + advanced_commands/c9999_Exit commands/c0070_AdvancedOptions \ + commands/c0080_NetworkOptions commands/c9999_Exit \ + network/commands/c9999_Back network/commands/c9999_Exit \ + retroarch/commands/c0025_ToggleLoadScreens retroarch/commands/c0061_DeleteBackups \ + retroarch/commands/c9999_Back retroarch/commands/c9999_Exit; do + rm -f "$om_root/$om_legacy" +done return 1 diff --git a/mod/readme b/mod/readme deleted file mode 100644 index 8eff62a..0000000 --- a/mod/readme +++ /dev/null @@ -1,14 +0,0 @@ -=== Options Menu v1.3.4 by CompCom === -The Options Menu is a custom menu that can be launched by holding controller button combo (L+R) for more than 1 second at any point during the console’s operation. - -Current features provided by the options menu include: Hmod Uninstaller, Hibernate Mod and Retroarch Settings Management. - -Full documentation for the options menu can be found at https://github.com/CompCom/OptionsMenu - -Contributions: -Hibernate Mod and Hakchi-Option-Pack scripts courtesy of Swingflip -Retroarch Configuration scripts courtesy of BsLeNuL -Thanks to ThanosRD for assistance with UI Layout/Design - -Extra thanks to DNA64 (viral_dna) and Swingflip for always testing features. -Also thanks to the following people for testing the options menu: BsLeNuL, DefKorns, DR1001, Patton Plays, ThanosRD diff --git a/mod/readme.md b/mod/readme.md index 6cd5def..0233d66 100644 --- a/mod/readme.md +++ b/mod/readme.md @@ -1,32 +1,55 @@ ------------------------------- -Name: Options Menu v1.3.4 -Creator: CompCom -Category: System ------------------------------- + ## What is the options menu? -The Options Menu is a custom menu that can be launched by holding controller button combo (L+R) for more than 1 second at any point during the console’s operation. -Current features provided by the options menu include: +The Options Menu is a custom, easily extendable menu for your console, letting other developers add their own commands to it via hmods. + +### Features + +- **Modern UI** with smooth TTF fonts and preview images +- **Power:** Hibernate/Standby, Shutdown, Restart +- **RetroArch:** back up/restore settings (NAND or USB), restore defaults, transfer BIOS files, clean up overrides/remaps/BIOS, toggle load screens +- **Network:** show IP, reconnect, search for SSIDs, back up/restore your wifi config (NAND or USB) +- **Save Manager:** back up/restore saves to USB, and move aside (or bring back) saves of games no longer on the console +- **Language:** English, Français, Deutsch, Español, Italiano, Nederlands, Português, Русский, 日本語 +- **Advanced:** + - Controller: change the menu button combo, autofire (speed, X/Y as turbo A/B), Home menu combo, Start on the 2nd controller + - Diagnostics: system info, temperature, top, benchmark, RetroArch debugger, file structure and kernel log dumps to USB + - Module Uninstaller, Clear Cache, USB write access toggle, epilepsy protection (NES) +- Extendable: other hmods can add their own entries and menus - - Hmod Uninstaller - - Hibernate Mod - - Retroarch Settings Management +### How to open + +Hold **L + R** for about 1 second, at any point during the console's operation. On consoles with no shoulder buttons (NES Classic, Famicom Classic and its variants, e.g. the Famicom Shonen Jump 50th Anniversary edition), hold **B + Down** instead. ## Documentation -Full documentation for the options menu can be found [here](https://github.com/CompCom/OptionsMenu). + +Every menu, step by step, and how to add your own entries from an hmod: [github.com/DefKorns/OptionsMenu/wiki](https://github.com/DefKorns/OptionsMenu/wiki) ## Contributions and Thanks + ### Contributions -- Hibernate Mod and Hakchi-Option-Pack scripts courtesy of Swingflip -- Retroarch Configuration scripts courtesy of BsLeNuL -- Thanks to ThanosRD for assistance with UI Layout/Design + +- **Swingflip** — Hibernate Mod and Hakchi-Option-Pack scripts +- **BsLeNuL** — Retroarch Configuration scripts +- **Advokaten** — Network commands (with DefKorns) +- **DefKorns** + - Network commands (with Advokaten) + - Wifi Backup, preview image aspect ratio, delete feature (hold B on a saved backup) + - Multi-language localization system (i18n) and translations + - Docker-based ARM cross-compile toolchain and build tooling + - Redesigned "Modern UI" (dialog frame, selection highlight, toggle switches, button-hint badges) +- **ThanosRD** — UI Layout/Design assistance (original Classic UI) + ### Testing -Extra thanks to DNA64 (viral_dna) and Swingflip for always testing features. + +Extra thanks to **DNA64 (viral_dna)** and **Swingflip** for always testing features. Also thanks to the following people for testing the options menu: -- BsLeNuL -- DefKorns -- DR1001 -- Patton Plays -- ThanosRD +- **Aranthys** +- **AxelStone** +- **BsLeNuL** +- **DefKorns** +- **DR1001** +- **Patton Plays** +- **ThanosRD** diff --git a/mod/uninstall b/mod/uninstall index 0fe4ab4..5d27e0f 100644 --- a/mod/uninstall +++ b/mod/uninstall @@ -1 +1,10 @@ +#!/bin/sh +# shellcheck disable=SC2154 rm -f "$rootfs/etc/options_menu/button.cfg" +rm -f "$rootfs/etc/options_menu/language.cfg" +rm -f "$rootfs/etc/options_menu/ui_style.cfg" +rm -f "$rootfs/etc/options_menu/controller/home_combination.prev" +rm -f "$rootfs/etc/options_menu/network/restore/commands"/c0001_* +rm -f "$rootfs/etc/options_menu/network/commands"/_* +find "$rootfs/etc/options_menu" -depth -type d -empty -delete 2>/dev/null +find "$rootfs/etc/hibernate_mod" -depth -type d -empty -delete 2>/dev/null diff --git a/pc/push_game_names.ps1 b/pc/push_game_names.ps1 new file mode 100644 index 0000000..5dcf13e --- /dev/null +++ b/pc/push_game_names.ps1 @@ -0,0 +1,138 @@ +<# + Copyright (C) 2026 DefKorns + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 3 + of the License, or (at your option) any later version. + + Sends the game names of a Hakchi CE library to the console, so the Save Manager + shows names instead of codes for saves of removed games. Read-only on both sides + except for game_names.txt in the saves folder; saves are never touched. + + push_game_names.ps1 [--ip CONSOLE_IP] [--hakchi-path DIR] + --ip defaults to 169.254.13.37, the console over USB. +#> +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$Ip = '169.254.13.37', + [string]$HakchiPath, + # in-session calls pass --ip as a plain value, not as a parameter name + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$Rest +) + +$ErrorActionPreference = 'Stop' +$PushPath = '/tmp/hakchi_game_names.push' +$MergeScript = '/etc/options_menu/scripts/OrphanSaves.sh' + +function Stop-WithError([string]$message) { + Write-Host $message -ForegroundColor Red + exit 1 +} + +for ($i = 0; $i -lt $Rest.Count; $i++) { + $option = $Rest[$i] + if ($i + 1 -ge $Rest.Count) { Stop-WithError "Missing value for $option. Usage: push_game_names.ps1 [--ip CONSOLE_IP] [--hakchi-path DIR]" } + switch ($option) { + '--ip' { $Ip = $Rest[++$i] } + '--hakchi-path' { $HakchiPath = $Rest[++$i] } + default { Stop-WithError "Unknown option $option. Usage: push_game_names.ps1 [--ip CONSOLE_IP] [--hakchi-path DIR]" } + } +} + +function Test-Library([string]$dir) { + $dir -and (Test-Path -LiteralPath $dir) -and @(Get-ChildItem -LiteralPath $dir -Directory -Filter 'games*').Count -gt 0 +} + +# portable mode keeps games next to hakchi.exe, non-portable in Documents\hakchi2 +function Find-Library { + $candidates = @($PSScriptRoot) + foreach ($process in @(Get-Process -Name hakchi -ErrorAction SilentlyContinue)) { + if ($process.Path) { $candidates += Split-Path -Parent $process.Path } + } + $candidates += Join-Path ([Environment]::GetFolderPath('MyDocuments')) 'hakchi2' + foreach ($dir in $candidates) { + if (Test-Library $dir) { return $dir } + } + return $null +} + +if (-not $HakchiPath) { $HakchiPath = Find-Library } +if (-not (Test-Library $HakchiPath)) { + Stop-WithError 'Hakchi CE games not found. Put this script next to hakchi.exe, open Hakchi CE first, or pass --hakchi-path with the folder that has the games folders.' +} + +# same rules as OrphanSaves.sh gameNames: code -> Name=, RetroArch content -> name of its game +$utf8 = New-Object System.Text.UTF8Encoding($false) +$gameNames = New-Object 'System.Collections.Generic.Dictionary[string,string]' +$seen = New-Object 'System.Collections.Generic.HashSet[string]' +$lines = New-Object 'System.Collections.Generic.List[string]' +$roms = New-Object 'System.Collections.Generic.List[string[]]' +$skipped = 0 + +function Add-Line([string]$key, [string]$name) { + if ($script:seen.Add($key)) { $script:lines.Add("$key`t$name") } +} + +foreach ($gamesDir in Get-ChildItem -LiteralPath $HakchiPath -Directory -Filter 'games*' | Sort-Object Name) { + foreach ($gameDir in Get-ChildItem -LiteralPath $gamesDir.FullName -Directory) { + foreach ($file in Get-ChildItem -LiteralPath $gameDir.FullName -File) { + if ($file.Extension -cne '.desktop') { + if ($file.Extension -cne '.png') { $roms.Add(@($gameDir.Name, $file.Name)) } + continue + } + try { $text = [IO.File]::ReadAllLines($file.FullName, $utf8) } + catch { $skipped++; continue } + $code = ''; $name = ''; $exec = '' + foreach ($raw in $text) { + $line = $raw.Replace("`t", ' ') + if ($line.StartsWith('Code=')) { $code = $line.Substring(5) } + elseif ($line.StartsWith('Name=') -and $name -eq '') { $name = $line.Substring(5) } + elseif ($line.StartsWith('Exec=')) { $exec = $line.Substring(5) } + } + if (-not $code.StartsWith('CLV-') -or $name -eq '') { $skipped++; continue } + if (-not $gameNames.ContainsKey($code)) { + $gameNames[$code] = $name + Add-Line $code $name + } + foreach ($token in $exec.Split(' ')) { + if ($token.Contains('/')) { $roms.Add(@($code, $token.Substring($token.LastIndexOf('/') + 1))) } + } + } + } +} + +foreach ($rom in $roms) { + $name = $null + if ($rom[1] -eq '' -or -not $gameNames.TryGetValue($rom[0], [ref]$name)) { continue } + # game.sfc.gz is saved as game.srm + $content = $rom[1] + Add-Line "retroarch/$content" $name + for ($i = 0; $i -lt 2 -and $content -match '\.[^.]*$'; $i++) { + $content = $content -replace '\.[^.]*$', '' + Add-Line "retroarch/$content" $name + } +} + +if ($gameNames.Count -eq 0) { + Stop-WithError "No games with a name found in $HakchiPath." +} + +$tmp = [IO.Path]::GetTempFileName() +try { + [IO.File]::WriteAllText($tmp, ($lines -join "`n") + "`n", $utf8) + $remote = "`"cat > $PushPath && sh $MergeScript merge-names $PushPath; status=`$?; rm -f $PushPath; exit `$status`"" + Write-Host "Sending $($gameNames.Count) game names from $HakchiPath to $Ip..." + $ssh = Start-Process -FilePath ssh -NoNewWindow -Wait -PassThru -RedirectStandardInput $tmp ` + -ArgumentList @('-o', 'ConnectTimeout=10', '-o', 'StrictHostKeyChecking=accept-new', "root@$Ip", $remote) + if ($ssh.ExitCode -ne 0) { + Stop-WithError "Could not reach the console at $Ip (ssh exit code $($ssh.ExitCode)). Check that it is on and pass its IP with --ip." + } +} +finally { + Remove-Item -LiteralPath $tmp -ErrorAction SilentlyContinue +} + +Write-Host "Done. Open Save Manager > Clean Saves of Removed Games to see the names." +if ($skipped -gt 0) { Write-Host "$skipped game files without a code or name were skipped." } diff --git a/src/change_combo.cpp b/src/change_combo.cpp new file mode 100644 index 0000000..363a926 --- /dev/null +++ b/src/change_combo.cpp @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2026 DefKorns (https://defkorns.github.io/LICENSE) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "framework/controller.h" +#include "localization.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + const std::string OptionsRoot = "/etc/options_menu/"; + const std::string ButtonConfigPath = OptionsRoot + "button.cfg"; + constexpr useconds_t PollIntervalUs = 50000; + constexpr size_t ComboLength = 3; + + const std::array AllButtons{ { A, B, X, Y, L, R, SELECT, START, LEFT, RIGHT, UP, DOWN } }; + + const char * ButtonName(GameButton button) + { + switch(button) + { + case A: return "A"; + case B: return "B"; + case X: return "X"; + case Y: return "Y"; + case L: return "L"; + case R: return "R"; + case SELECT: return "SELECT"; + case START: return "START"; + case LEFT: return "LEFT"; + case RIGHT: return "RIGHT"; + case UP: return "UP"; + case DOWN: return "DOWN"; + } + return "?"; + } + + void ConsumeHeldButtons(Controller & controller) + { + controller.Update(); + for(const GameButton button : AllButtons) + controller.GetButtonStatus(button); + } + + GameButton WaitForPress(Controller & controller) + { + for(;;) + { + controller.Update(); + for(const GameButton button : AllButtons) + if(controller.GetButtonStatus(button)) + return button; + usleep(PollIntervalUs); + } + } + + void PrintLines(const std::initializer_list keys) + { + for(const char * key : keys) + std::cout << Translate(key) << std::endl; + } + + bool SaveCombo(const std::array & combo) + { + const std::string tmpPath = ButtonConfigPath + ".tmp"; + { + std::ofstream out(tmpPath); + if(!(out << static_cast(combo[0]) << " " << static_cast(combo[1]) << " " << static_cast(combo[2]))) + return false; + } + return std::rename(tmpPath.c_str(), ButtonConfigPath.c_str()) == 0; + } +} + +int main() +{ + // stdout is a pipe here, so it is fully buffered unless flushed + setvbuf(stdout, nullptr, _IONBF, 0); + + LoadLanguageFromConfig(OptionsRoot); + + Controller controller(1); + + PrintLines({ "CHANGE_COMBO_INTRO_1", "CHANGE_COMBO_INTRO_2", "CHANGE_COMBO_INTRO_3", "CHANGE_COMBO_CONTINUE" }); + ConsumeHeldButtons(controller); + GameButton choice = WaitForPress(controller); + while(choice != A && choice != B) + choice = WaitForPress(controller); + if(choice == B) + return 0; + + const std::array prompts{ { "CHANGE_COMBO_PRESS_1", "CHANGE_COMBO_PRESS_2", "CHANGE_COMBO_PRESS_3" } }; + + for(;;) + { + std::array combo{}; + for(size_t i = 0; i < ComboLength; ++i) + { + std::cout << Translate(prompts[i]) << std::endl; + ConsumeHeldButtons(controller); + combo[i] = WaitForPress(controller); + } + + std::cout << Translate("CHANGE_COMBO_CHOSEN") << " " << ButtonName(combo[0]) << " + " << ButtonName(combo[1]) << " + " << ButtonName(combo[2]) << std::endl; + std::cout << Translate("CHANGE_COMBO_CONFIRM") << std::endl; + ConsumeHeldButtons(controller); + if(WaitForPress(controller) == A) + { + if(SaveCombo(combo)) + std::cout << Translate("CHANGE_COMBO_DONE") << std::endl; + else + std::cerr << Translate("CHANGE_COMBO_WRITE_ERROR") << std::endl; + break; + } + } + + return 0; +} diff --git a/src/command.cpp b/src/command.cpp index 20ba452..d6b65e3 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1,18 +1,89 @@ /** - * Copyright (C) 2017-2018 CompCom - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 3 - * of the License, or (at your option) any later version. - */ + * Copyright (C) 2017-2018 CompCom + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + */ #include "command.h" #include "framework/controller.h" +#include "framework/draw_helpers.h" +#include "localization.h" +#include #include #include #include +#include +#include +#include +#include +#include + +struct CommandProcess +{ + FILE * out; + pid_t pid; +}; + +static CommandProcess StartCommand(const std::string & command) +{ + int fds[2]; + if(pipe(fds) != 0) + return { nullptr, -1 }; + const pid_t pid = fork(); + if(pid < 0) + { + close(fds[0]); + close(fds[1]); + return { nullptr, -1 }; + } + if(pid == 0) + { + setpgid(0, 0); + dup2(fds[1], STDOUT_FILENO); + close(fds[0]); + close(fds[1]); + execl("/bin/sh", "sh", "-c", command.c_str(), static_cast(nullptr)); + _exit(127); + } + setpgid(pid, pid); + close(fds[1]); + FILE * out = fdopen(fds[0], "r"); + if(!out) + { + close(fds[0]); + kill(-pid, SIGKILL); + waitpid(pid, nullptr, 0); + return { nullptr, -1 }; + } + return { out, pid }; +} + +static void FinishCommand(const CommandProcess & process, bool abort) +{ + if(process.pid <= 0) + return; + if(abort) + kill(-process.pid, SIGTERM); + if(process.out) + fclose(process.out); + waitpid(process.pid, nullptr, 0); +} + +static int SafeStoi(const std::string & value, int fallback = 0) +{ + try + { + return std::stoi(value); + } + catch(...) + { + return fallback; + } +} Command::Command() {} @@ -22,6 +93,8 @@ Command::Command(std::ifstream & in) while(in.good()) { std::getline(in, temp); + if(!temp.empty() && temp.back() == '\r') + temp.pop_back(); if(temp[0]=='#') continue; int index = temp.find('='); @@ -36,79 +109,188 @@ Command::Command(std::ifstream & in) ignoreInterrupt = (value == "TRUE"); else if(param.compare("COMMAND_STR")==0) command = value; + else if(param.compare("DELETE_STR")==0) + deleteCommand = value; + else if(param.compare("DELETE_CONFIRM_KEY")==0) + deleteConfirmKey = value; + else if(param.compare("CONFIRM_KEY")==0) + confirmKey = value; + else if(param.compare("ENABLE_IF")==0) + enableIfCommand = value; + else if(param.compare("STATE_STR")==0) + { + stateCommand = value; + isToggle = true; + } else if(param.compare("USB_ONLY")==0) usbOnly = (value == "TRUE"); + else if(param.compare("CHILD")==0) + child = (value == "TRUE"); + else if(param.compare("ROW_ICON")==0) + rowIcon = value; else if(param.compare("PREVIEW_IMAGE")==0) previewImage = value; else if(param.compare("PREVIEW_IMAGE_X")==0) - previewImageX = std::stoi(value); + previewImageX = SafeStoi(value, 0); else if(param.compare("PREVIEW_IMAGE_Y")==0) - previewImageY = std::stoi(value); + previewImageY = SafeStoi(value, 0); else if(param.compare("PREVIEW_IMAGE_WIDTH")==0) - previewImageWidth = std::stoi(value); + previewImageWidth = SafeStoi(value, -1); else if(param.compare("PREVIEW_IMAGE_HEIGHT")==0) - previewImageHeight = std::stoi(value); + previewImageHeight = SafeStoi(value, -1); + else if(param.compare("PREVIEW_NEAREST")==0) + previewNearest = (value == "TRUE"); + else if(param.compare("PREVIEW_SQUARE")==0) + previewSquare = (value == "TRUE"); + else if(param.compare("PREVIEW_GRID_COLS")==0) + previewGridCols = SafeStoi(value, -1); + else if(param.compare("PREVIEW_FIT_CONTAIN")==0) + previewFitContain = (value == "TRUE"); + else if(param.compare("PREVIEW_HIDE_LABEL")==0) + previewHideLabel = (value == "TRUE"); + else if(param.compare("SUBMENU")==0) + hasSubmenu = (value == "TRUE"); } + if(isToggle) + hasSubmenu = false; in.close(); } -void Command::RunCommand(SDL_Context & sdl_context, Controller * controller, Sprite & menuL, Sprite & menuU) const +void Command::RunCommand(SDL_Context & sdl_context, Controller * controller, const ModernChrome & chrome, Color bg) const { std::list textList; - FILE* pipe = popen(command.c_str(), "r"); - if(pipe) + const CommandProcess process = StartCommand(command); + FILE * out = process.out; + if(out) { auto renderer = sdl_context.renderer; - SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); + SetDrawColor(renderer, UiTheme::Bg); char buffer[128] = {0}; + const int textX = UiTheme::FrameRect.x + UiTheme::FrameInset; + const int textFirstY = UiTheme::HeaderDividerY + 24; - auto render = [&](Texture * closeText = nullptr) + Texture exitLetter("B", 16, renderer, 0, 0, false, ToAbgr(UiTheme::BadgeLetter), true); + Texture exitLabel(Translate("EXIT"), 16, renderer, 0, 0, false, ToAbgr(UiTheme::Text), true); + int badgeGroupW = UiTheme::BadgeOuterSize + UiTheme::BadgeLabelGap + exitLabel.rect.w; + SDL_Rect exitBadge{ UiTheme::BadgeClusterRightX - badgeGroupW, UiTheme::BadgeBandY, UiTheme::BadgeOuterSize, UiTheme::BadgeOuterSize }; + exitLetter.rect.x = exitBadge.x + (exitBadge.w - exitLetter.rect.w) / 2; + exitLetter.rect.y = exitBadge.y + (exitBadge.h - exitLetter.rect.h) / 2; + exitLabel.rect.x = exitBadge.x + exitBadge.w + UiTheme::BadgeLabelGap; + exitLabel.rect.y = exitBadge.y + (exitBadge.h - exitLabel.rect.h) / 2; + + auto render = [&]() { sdl_context.StartFrame(); - menuU.Draw(renderer); - menuL.Draw(renderer); - int y = 100; + DrawStrokeRect(renderer, UiTheme::OuterRect, UiTheme::Border, UiTheme::BorderWidth, UiTheme::BorderRadius); + chrome.gearIcon.Draw(renderer); + chrome.appTitleText.Draw(renderer); + chrome.appVersionText.Draw(renderer); + DrawHLine(renderer, UiTheme::HeaderDividerX, UiTheme::HeaderDividerX + UiTheme::HeaderDividerW, UiTheme::HeaderDividerY, UiTheme::Border, UiTheme::BorderWidth); + DrawHLine(renderer, UiTheme::OuterRect.x, UiTheme::OuterRect.x + UiTheme::OuterRect.w, UiTheme::FooterDividerY, UiTheme::Border, UiTheme::BorderWidth); + chrome.creditText.Draw(renderer); + DrawRoundedFillRect(renderer, exitBadge, UiTheme::BadgeB, exitBadge.w/2); + exitLetter.Draw(renderer); + exitLabel.Draw(renderer); + int y = textFirstY; for(auto & t : textList) { t.rect.y = y; t.Draw(renderer); y+=10; } - if(closeText) - closeText->Draw(renderer); + SetDrawColor(renderer, UiTheme::Bg); // last color call, or it leaks into the next clear sdl_context.EndFrame(); }; - while(!feof(pipe)) + int fd = fileno(out); + fcntl(fd, F_SETFL, O_NONBLOCK); + const int PollTimeoutMs = 20; + bool aborted = false; + bool lastWasProgress = false; + while(!feof(out)) { - if(fgets(buffer, 128, pipe) > 0) + // stdio can hold lines poll() never sees, so fgets drains every pass + struct pollfd pfd{fd, POLLIN, 0}; + poll(&pfd, 1, PollTimeoutMs); + while(fgets(buffer, 128, out) != nullptr) { std::string sBuffer(buffer); int pos = sBuffer.find('\n'); if(pos > 0) sBuffer[pos] = '\0'; - textList.push_back(Texture(sBuffer, 8, renderer, 30)); + // a leading \r rewrites the previous progress line in place + const bool isProgress = !sBuffer.empty() && sBuffer[0] == '\r'; + if(isProgress) + sBuffer.erase(0, 1); + if(isProgress && lastWasProgress && !textList.empty()) + textList.pop_back(); + lastWasProgress = isProgress; + textList.push_back(Texture(sBuffer, 8, renderer, textX)); if(textList.size() > 40) { textList.erase(textList.begin()); } } + if(!feof(out)) + clearerr(out); - controller->Update(); - if(!ignoreInterrupt && controller->GetButtonStatus(B)) - break; + // ignoreInterrupt commands read the controller themselves + if(!ignoreInterrupt) + { + controller->Update(); + if(controller->GetButtonStatus(B)) + { + aborted = true; + break; + } + } - render(); + if(!textList.empty()) + render(); } - pclose(pipe); - Texture closeText("Press B to exit.", 12, renderer, 30, 610); + FinishCommand(process, aborted); + if(textList.empty() || aborted) + { + SetDrawColor(renderer, bg); + return; + } while (!controller->GetButtonStatus(B)) { controller->Update(); - render(&closeText); + render(); } - SDL_SetRenderDrawColor(renderer, 0x6e, 0x6e, 0x6e, 0xFF); + SetDrawColor(renderer, bg); } } + +void Command::UpdateState() +{ + stateOn = false; + if(stateCommand.empty()) + return; + + FILE * pipe = popen(stateCommand.c_str(), "r"); + if(!pipe) + return; + + char buffer[64] = {0}; + std::string result; + struct pollfd pfd{fileno(pipe), POLLIN, 0}; + if(poll(&pfd, 1, 1000) > 0 && fgets(buffer, sizeof(buffer), pipe)) + result = buffer; + pclose(pipe); + + size_t start = 0; + while(start < result.size() && std::isspace(static_cast(result[start]))) + ++start; + size_t end = result.size(); + while(end > start && std::isspace(static_cast(result[end-1]))) + --end; + result = result.substr(start, end-start); + for(char & ch : result) + ch = std::tolower(static_cast(ch)); + + stateOn = (result == "1" || result == "on" || result == "y" || result == "yes" || result == "true"); +} diff --git a/src/command.h b/src/command.h index 2016744..1af0c69 100644 --- a/src/command.h +++ b/src/command.h @@ -14,24 +14,49 @@ class Controller; +struct ModernChrome +{ + Texture & gearIcon; + Texture & appTitleText; + Texture & appVersionText; + Texture & creditText; +}; + struct Command { Command(); Command(std::ifstream & in); - void RunCommand(SDL_Context & sdl_context, Controller * controller, Sprite & menuL, Sprite & menuU) const; + void RunCommand(SDL_Context & sdl_context, Controller * controller, const ModernChrome & chrome, Color bg = UiTheme::Bg) const; + void UpdateState(); std::string name; std::string command; + std::string deleteCommand; + std::string deleteConfirmKey; + std::string confirmKey; + std::string stateCommand; + std::string enableIfCommand; bool runInternal = true; bool restartUI = false; bool ignoreInterrupt = false; bool usbOnly = false; + bool child = false; + bool isToggle = false; + bool stateOn = false; + bool hasSubmenu = false; Texture texture; std::string previewImage; - int previewImageX = 0; - int previewImageY = 0; + std::string rowIcon; + Texture rowIconTexture; + int previewImageX = 920; + int previewImageY = 300; int previewImageWidth = -1; int previewImageHeight = -1; + bool previewNearest = false; + bool previewSquare = false; + int previewGridCols = -1; + bool previewFitContain = false; + bool previewHideLabel = false; }; #endif diff --git a/src/daemon.cpp b/src/daemon.cpp index 3e5e30c..b512912 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -12,27 +12,42 @@ #include #include #include +#include int main() { Controller c(1); GameButton button1 = L, button2 = R, button3 = R; - + bool haveCustomCombo = false; + std::ifstream in("/etc/options_menu/button.cfg"); if(in.is_open()) { - int temp; - in >> temp; - button1 = (GameButton)temp; - in >> temp; - button2 = (GameButton)temp; - in >> temp; - button3 = (GameButton)temp; + int b1, b2, b3; + if(in >> b1 >> b2 >> b3) + { + button1 = (GameButton)b1; + button2 = (GameButton)b2; + button3 = (GameButton)b3; + haveCustomCombo = true; + } in.close(); } - - system("sh /etc/options_menu/scripts/GetSpriteSheet.sh > /tmp/spritesheet"); - + + if(!haveCustomCombo) + { + // NES/Famicom pads have no L/R, so fall back to B+Down + std::ifstream boardtypeFile("/var/squashfs/etc/clover/boardtype"); + std::string boardtype; + std::getline(boardtypeFile, boardtype); + if(boardtype != "dp-shvc") + { + button1 = B; + button2 = DOWN; + button3 = DOWN; + } + } + const auto waitTime = std::chrono::milliseconds(100); const short holdThreshold = 10; short holdCount = 0; diff --git a/src/downloader.c b/src/downloader.c new file mode 100644 index 0000000..8c0fc06 --- /dev/null +++ b/src/downloader.c @@ -0,0 +1,344 @@ +/* + * Copyright (C) 2026 DefKorns + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* HTTPS downloader: BusyBox wget can't do GitHub's TLS. + * Batch line: \t[\t...]; result on stdout: " ". + * Progress on stderr: "\r