diff --git a/.gitattributes b/.gitattributes index 0316295..6c4a2a6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,3 +8,5 @@ *.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 index cb807c5..6303cf5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,57 +7,16 @@ on: pull_request: jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # vendor/ holds the console's own SDL2 headers + libSDL2.so, extracted - # from the console's firmware - proprietary, so it isn't committed to - # this (public) repo. It's too large for a GitHub Secret (2.6MB, the - # limit is ~48-64KB), so it's kept in a separate PRIVATE repo instead - # and cloned here with a fine-grained PAT (repo secret VENDOR_REPO_PAT, - # read-only access to that one private repo). - - name: Restore vendor/ from private repo - run: | - git clone --depth 1 "https://x-access-token:${{ secrets.VENDOR_REPO_PAT }}@github.com/${{ secrets.VENDOR_REPO }}.git" vendor - - - name: Build cross-compile toolchain image - run: docker build -f Dockerfile.jessie-armhf -t optionsmenu-toolchain:jessie . - - # On a tag push (release build), force MOD_VER to the tag name itself - # rather than trusting `git describe` inside the container -- checkout - # is shallow by default, and describe can't reliably resolve tags - # without full history. Branch/PR builds just use the Makefile's own - # git-describe-based default (fine, since the exact string doesn't - # matter for a plain compile check). - - name: Compile - run: | - MOD_VER_ARG="" - if [ "${{ github.ref_type }}" = "tag" ]; then - MOD_VER_ARG="MOD_VER=${{ github.ref_name }}" - fi - docker run --rm -v "${{ github.workspace }}:/src" optionsmenu-toolchain:jessie make -f Makefile.docker CROSS_PREFIX=arm-linux-gnueabihf- $MOD_VER_ARG - - - name: Upload .hmod build artifact - uses: actions/upload-artifact@v4 - with: - name: options-menu-hmod - path: out/*.hmod - - release: - needs: build - if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest - steps: - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - name: options-menu-hmod - path: out - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - files: out/*.hmod - generate_release_notes: true + hmod: + # Keep in sync with the vendor/hmod-build submodule tag. + uses: DefKorns/hmod-build/.github/workflows/hmod.yml@v1.3.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 index a371cc1..d3025d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "toolchain"] - path = toolchain - url = https://github.com/DefKorns/hakchi-toolchain.git +[submodule "hmod-build"] + path = vendor/hmod-build + url = https://github.com/DefKorns/hmod-build.git diff --git a/Makefile b/Makefile index 2ad39db..178391a 100644 --- a/Makefile +++ b/Makefile @@ -1,47 +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/localization.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/nineslice.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 mod/etc/options_menu/scripts/gen_splash - $(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 - $(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/scripts/gen_splash - 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 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/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/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) -mod/etc/options_menu/scripts/gen_splash: src/gen_splash.o src/localization.o - $(CROSS_PREFIX)$(CXX) src/gen_splash.o src/localization.o $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/scripts/gen_splash +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/scripts/gen_splash 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/Makefile.docker b/Makefile.docker deleted file mode 100644 index f933975..0000000 --- a/Makefile.docker +++ /dev/null @@ -1,100 +0,0 @@ -MOD_CREATOR := CompCom -MOD_BUILDER := DefKorns -MOD_CATEGORY := System -MOD_VER ?= $(shell git describe --tags --abbrev=0 2>/dev/null || echo v1.3.5) -ESC_MOD_VER := $(subst .,_,$(MOD_VER)) -TARGET_NAME = options_deluxe_$(ESC_MOD_VER) -MOD_NAME := Options Menu $(MOD_VER) -GIT_COMMIT := $(shell git describe --always --dirty=.dirty 2>/dev/null) -BUILD_NUM_FILE := .build_number -CXX = g++ -STRIP = strip -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 libpng) -SDL_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs sdl2 libpng) -PNG_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs libpng) -LDFLAGS = -Wl,--allow-shlib-undefined -else -SDL_CFLAGS = $(shell sdl2-config --cflags) -SDL_LIBS = $(shell sdl2-config --libs) -lpng -PNG_LIBS = -lpng -LDFLAGS = -#FIX_SDL2_SONAME = true -endif -CXXFLAGS = -std=c++11 -Os $(SDL_CFLAGS) -DMOD_VERSION=\"$(MOD_VER)\" -LDLIBS = $(SDL_LIBS) -SOURCES = src/main.cpp src/command.cpp src/localization.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/nineslice.cpp src/framework/controller.cpp src/framework/powerwatch.cpp -OBJECTS = $(SOURCES:.cpp=.o) -DEV_DIR = $(shell realpath .) -OUT = $(DEV_DIR)/out -TMP = $(DEV_DIR)/temp - -define inject-readme = - mkdir -p $(OUT)/ $(TMP)/ - cp mod/readme.md temp/readme.md - - printf "%s\n" \ - "---" \ - "Name: $(MOD_NAME)" \ - "Creator: $(MOD_CREATOR)" \ - "Category: $(MOD_CATEGORY)" \ - "Version: $(MOD_VER) build #$(shell cat $(BUILD_NUM_FILE))$(if $(GIT_COMMIT), ($(GIT_COMMIT)))" \ - "Built on: $(shell date +"%A, %d %b %Y - %T") by $(MOD_BUILDER)" \ - "---" > mod/readme.md - - sed 1d temp/readme.md >> mod/readme.md -endef - -all: $(OUT)/$(TARGET_NAME).hmod $(OUT)/$(TARGET_NAME)_b_down.hmod - -bump-build-number: - echo $$(( $$(cat $(BUILD_NUM_FILE) 2>/dev/null || echo 0) + 1 )) > $(BUILD_NUM_FILE) - -$(OUT)/$(TARGET_NAME)_b_down.hmod: $(OUT)/$(TARGET_NAME).hmod bump-build-number - $(inject-readme) - cp button.cfg mod/etc/options_menu/ - cd mod/; tar -czvf "../out/$(TARGET_NAME)_b_down.hmod" * - cp temp/readme.md mod/readme.md - -$(OUT)/$(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 mod/etc/options_menu/scripts/gen_splash bump-build-number - $(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 - upx --lzma mod/etc/options_menu/mod_uninstall/mod_uninstall - $(CROSS_PREFIX)$(STRIP) mod/bin/standby_watchdog - upx --lzma mod/bin/standby_watchdog - $(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/scripts/gen_splash - $(inject-readme) - - rm -f mod/etc/options_menu/button.cfg - cd mod/; tar -czvf "../out/$(TARGET_NAME).hmod" * - - cp temp/readme.md mod/readme.md - find -name "*.o" -type f -delete - rm -rf $(TMP) - -mod/etc/options_menu/options: $(OBJECTS) - $(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/options - -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 - -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/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 - -mod/etc/options_menu/scripts/gen_splash: src/gen_splash.o src/localization.o - $(CROSS_PREFIX)$(CXX) src/gen_splash.o src/localization.o $(PNG_LIBS) $(LDFLAGS) -o mod/etc/options_menu/scripts/gen_splash - -%.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/scripts/gen_splash mod/etc/options_menu/button.cfg $(TARGET_NAME).hmod $(TARGET_NAME)_b_down.hmod - rm -rf out/ temp/ - -.PHONY: clean bump-build-number diff --git a/README.md b/README.md index c49ac90..403763b 100644 --- a/README.md +++ b/README.md @@ -1,316 +1,274 @@ -# Options Menu Documentation +# Options Menu -## What is the options menu? +[![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) -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. +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. -The options menu is easily extendible, allowing for other developers to add their own custom commands to the menu via hmods. +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: -## Options Explained +- **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++` -Below is a detailed guide on what specific options actually do and what their purpose is. +## Install -## Default Options +**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. -#### Hibernate/Standby +**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**). -This option launches Swingflip’s power menu. The power menu will provide the following options: +Installing it replaces CompCom's Options Menu (`options_deluxe`) and the old Hibernate mod, and keeps your button combo, language and Home combo settings. -- **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. +> **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. -> **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. +## Opening it -To wake the console when in hibernate or standby please refer to the below table: +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**. -|Button combination|Hibernate Mode |Standby Mode | -|------------------|---------------|-----------------| -| L + R + UP |Resume Console |Reboot Console | -| L + R + DOWN |Reboot Console |Shutdown Console | +| 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 | -#### Shutdown Device +The footer always shows the buttons for the current screen. -This option will safely shut down the console.\* +## Menus -#### Restart Device +### Main menu -This option will safely restart the console.\* +| 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 +\*Don't shut down or restart from the menu while RetroArch is running: exit RetroArch first, or you may lose saves. -This option will open a menu for managing retroarch configurations (see below). +**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: -#### Advanced Options +| Combo | From Hibernate | From Standby | +| --- | --- | --- | +| L + R + Up | Resume | Reboot | +| L + R + Down | Reboot | Shut down | -This option will open a menu containing more advanced features (see below). +### RetroArch ->\***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. +Works with RetroArch Neo and with the `_km` RetroArch Xtreme (Ozone). -## Retroarch Options +| 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 | -#### Restore Default Settings (All) +The USB entries only show up with a USB/SD drive connected. -Replaces your current retroarch config files with the default files included in the module. This option deletes all game/core overrides and remap files. +### Network -#### Restore Default Settings +| 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 | -Replaces your current retroarch config files with the default files included in the module. Does not erase your game/core overrides and remap files. +Restore entries only show up when there's a backup to restore. -#### Backup Settings to NAND +### Save Manager -Copies your current retroarch config files to a backup file located at /etc/ra_backup/ +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**). -#### Backup Settings to USB (usb only) +| 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 | -Copies your current retroarch config files to a backup file located at USB:/data/ra_backup/ +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. -#### Restore Settings from NAND +#### Game names -Overwrites your retroarch configs with the backups located at /etc/ra_backup/ +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. -#### Restore Settings from USB (usb only) +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: -Overwrites your retroarch configs with the backups located at USB:/data/ra_backup/ +```powershell +.\push_game_names.ps1 --ip 192.168.1.50 +``` -#### Delete all settings backups +- `--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. -Removes all backup files on both NAND and USB. +If Windows refuses to run scripts, use `powershell -ExecutionPolicy Bypass -File push_game_names.ps1 --ip 192.168.1.50`. -#### Transfer BIOS file(s) +The names it sends are added to the ones already on the console. -Copies bios files to USB:/data/ra_bios. Restores bios files from this folder to NAND. +### Advanced Options -#### Delete game and core overrides +| 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) | -Removes only the game and core overrides. Does not modify the Retroarch settings and remap files. +**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. -#### Delete remap files +#### Controller -Removes only the remap files. Does not modify the Retroarch settings, game and core overrides. +| 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 | -#### Delete BIOS file(s) from NAND +Changes apply right away, without restarting. -Removes all bios files from NAND only. +#### Diagnostics -#### Toggle RA and Canoe load screens +| 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` | -Toggle the RetroArch and Canoe loading screens on or off. +The USB entries only show up with a USB/SD drive connected. They're the logs to attach when reporting a problem. -## Advanced Options +## For mod developers -#### Module Uninstaller +Your hmod can add entries and whole screens to the menu. -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. +### How it works ->**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. +`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. -#### Display Temp +`options` takes these arguments (always call it by its full path, `/etc/options_menu/options`): -This option will display the current temperature of the CPU. +| Argument | Description | +| --- | --- | +| `--commandPath ` | Commands folder for this screen | +| `--scriptPath ` | Scripts folder, available as `%script_dir%` | +| `--title ` | Screen title (a translation key or plain text) | -#### Run Top +### Command files -This option runs and displays the output of the top binary. This shows the current CPU, memory usage and list of running processes. +One file per entry, named `cNNNN_Name`; entries are sorted by name. Each line is `FIELD=value`, no spaces around `=`, case sensitive. -#### Benchmark Tool +| Field | Description | +| --- | --- | +| `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 | -This option will go through and echo out useful information regarding your console. -It will also include information on your: +`COMMAND_STR`, `DELETE_STR` and `STATE_STR` can use `%options_path%` (the folder with the `options` binary) and `%script_dir%` (the current `--scriptPath`). -- Current disk mounting information -- CPU analysis information -- RAM analysis information +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. -> **Note:** The information is displayed in 4 parts and has a 2 second wait between each part +### Translations -#### Dump File Structure (to USB) +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. -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: +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. - /media/data/log/Hakchi_file_structure.log +### Colors - > **Note:** If these folders do not exist, they will be created when the option is ran. +`/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. -The log file will also include information on: +| 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 | -- Symbolic Links (Overmounts) -- File and directory permissions +Apps built on the same framework read this file too, so they match the menu. -#### Toggle Write Access on USB +### Icons -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. +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. - > **Note:** If you already use external saves. You don't need to use this toggle. +## Building -#### Modern UI +```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 +``` -Toggles between the redesigned "settings dialog" look (dialog frame, selection highlight bar, button-hint badges, real toggle switches) and the original plain menu style. Switching restarts the Options Menu so the change applies immediately. +`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-`. -#### RetroArch Debugger (USB logs) +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`). -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: +## Credits - /media/data/log/RetroArchConfig +- **[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 -The full verbose log will be located here: +### Third-party assets - /media/data/log/Hakchi_retroarch_debug.log - -> **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. - -#### 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. - -#### 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. - -#### Language Options - -This option opens a submenu where you can choose the display language for the Options Menu. Currently available: English, Portuguese, French, German, Spanish, Italian and Dutch. The Options Menu automatically restarts in the selected language. - -## 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. - -#### Reconnect - -This option will restart the network service on your device if you are not connected to the internet already. - -#### Search for SSIDs - -This option will scan and display a list of available SSIDs. - -#### Backup Wifi Config (NAND) - -Copies your current wifi config (wpa_supplicant.conf) to a backup folder on your NAND, named after your SSID: - - /etc/wifi_backup/your_ssid_name - -#### Backup Wifi Config (USB) - -Copies your current wifi config (wpa_supplicant.conf) to a backup folder on your mounted USB/SD card, named after your SSID: - - /media/data/wifi_backup/your_ssid_name - -#### Restore Wifi Config (NAND) - -Overwrites your wifi config with a backup located at: - - /etc/wifi_backup/ - -and reconnects to the network. - -While browsing the list of saved backups, press **X** to delete the -selected backup (you will be asked to confirm with **A**, or cancel with -**B**). The list refreshes automatically after deleting. - -#### Restore Wifi Config (USB) - -Overwrites your wifi config with a backup located at: - - /media/data/wifi_backup/ - -and reconnects to the network. - -While browsing the list of saved backups, press **X** to delete the -selected backup (you will be asked to confirm with **A**, or cancel with -**B**). The list refreshes automatically after deleting. - -## 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 - -|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.| - -### Command Files - -Command Files must be named in the following format: - - cxxxx_CommandName - -Command Files should contain the following fields: - -|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.| -|USB_ONLY|If set to `TRUE`, the command is only loaded when a USB/SD card is mounted.| -|IGNORE_INTERRUPT|If set to `TRUE`, pressing B will not interrupt an internal command while its output is being displayed.| -|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.| -|DELETE_STR|Optional command string to run when the user presses X on this entry and confirms. Used to make list entries deletable (e.g. the wifi backup restore list).| -|DELETE_CONFIRM_KEY|Optional translation key for the confirmation prompt shown before running DELETE_STR. Falls back to a generic "Delete this item?" if not set.| -|STATE_STR|Optional command string that prints the current on/off state of this entry (its first line of output, case-insensitively `1`/`on`/`y`/`yes`/`true` for on, anything else for off). Presence of this field renders the entry as a toggle switch instead of a plain row; it is only read to draw the switch, not to change behavior, so COMMAND_STR is still what actually flips the setting.| - ->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 - -#### Docker toolchain (recommended) - -The repo includes a Docker-based ARM cross-compile toolchain, which is the tested and supported way to build a release-ready `.hmod`. It needs only Docker installed - no local SDL2/libpng/ARM toolchain setup required. - - ./build.sh # Linux/macOS/Git Bash - ./build.ps1 # Windows PowerShell - -This builds the toolchain image (`Dockerfile.jessie-armhf`) if needed, then runs `Makefile.docker` inside it, producing `out/*.hmod`. - -#### Native / manual build - -The options menu can also be compiled using the plain `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 -- Network commands courtesy by Advokaten and DefKorns -- Wifi Backup courtesy of DefKorns -- Preview image aspect ratio courtesy of DefKorns -- Wifi backup delete feature (press X on a saved backup) courtesy of DefKorns -- Multi-language localization system (i18n) and translations courtesy of DefKorns -- Docker-based ARM cross-compile toolchain and build tooling courtesy of DefKorns -- Redesigned "Modern UI" (dialog frame, selection highlight, toggle switches, button-hint badges) courtesy of DefKorns -- Thanks to ThanosRD for assistance with UI Layout/Design +- [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. +Thanks to DNA64 (viral_dna) and Swingflip for always testing, and to Aranthys, AxelStone, BsLeNuL, DR1001, Patton Plays and ThanosRD. -Also thanks to the following people for testing the options menu: +## License -- BsLeNuL -- DefKorns -- DR1001 -- Patton Plays -- ThanosRD +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/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/c9998_separator b/mod/etc/options_menu/advanced_commands/c0018_separator similarity index 100% rename from mod/etc/options_menu/advanced_commands/c9998_separator rename to mod/etc/options_menu/advanced_commands/c0018_separator 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 8e4e749..0000000 --- a/mod/etc/options_menu/advanced_commands/c0020_ModUninstall +++ /dev/null @@ -1,5 +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 & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/advanced_commands/c0500_USB_RW b/mod/etc/options_menu/advanced_commands/c0030_USB_RW similarity index 69% rename from mod/etc/options_menu/advanced_commands/c0500_USB_RW rename to mod/etc/options_menu/advanced_commands/c0030_USB_RW index 1761373..743e17a 100644 --- a/mod/etc/options_menu/advanced_commands/c0500_USB_RW +++ b/mod/etc/options_menu/advanced_commands/c0030_USB_RW @@ -3,4 +3,4 @@ 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_placeholder.png +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 66% rename from mod/etc/options_menu/advanced_commands/c0900_ClearCache rename to mod/etc/options_menu/advanced_commands/c0040_ClearCache index b3b5fef..1a217a8 100644 --- a/mod/etc/options_menu/advanced_commands/c0900_ClearCache +++ b/mod/etc/options_menu/advanced_commands/c0040_ClearCache @@ -1,4 +1,4 @@ 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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_clear_cache.png 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/c0510_ModernUI b/mod/etc/options_menu/advanced_commands/c0510_ModernUI deleted file mode 100644 index 3742d93..0000000 --- a/mod/etc/options_menu/advanced_commands/c0510_ModernUI +++ /dev/null @@ -1,6 +0,0 @@ -COMMAND_NAME=TOGGLE_MODERN_UI -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=[ "$(cat /etc/options_menu/ui_style.cfg 2>/dev/null)" = "classic" ] && echo modern > /etc/options_menu/ui_style.cfg || echo classic > /etc/options_menu/ui_style.cfg; usleep 50000 && %options_path%/options --commandPath %options_path%/advanced_commands/ --title "ADVANCED_OPTIONS" & -STATE_STR=[ "$(cat /etc/options_menu/ui_style.cfg 2>/dev/null)" = "classic" ] && echo off || echo on -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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 77aa816..0000000 --- a/mod/etc/options_menu/advanced_commands/c0890_ChangeCombo +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=CHANGE_BUTTON_COMBO -COMMAND_TYPE=INTERNAL -IGNORE_INTERRUPT=TRUE -COMMAND_STR=exec %script_dir%/ChangeCombo -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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 c605f4b..0000000 --- a/mod/etc/options_menu/advanced_commands/c9999_Back +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=BACK -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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 804d7ff..0000000 --- a/mod/etc/options_menu/advanced_commands/c9999_Exit +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=EXIT -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/commands/c9998_separator b/mod/etc/options_menu/commands/c0025_separator similarity index 100% rename from mod/etc/options_menu/commands/c9998_separator rename to mod/etc/options_menu/commands/c0025_separator diff --git a/mod/etc/options_menu/commands/c0060_RetroarchOptions b/mod/etc/options_menu/commands/c0060_RetroarchOptions index 0fdbff3..20fc8e5 100644 --- a/mod/etc/options_menu/commands/c0060_RetroarchOptions +++ b/mod/etc/options_menu/commands/c0060_RetroarchOptions @@ -1,5 +1,7 @@ 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/c0080_NetworkOptions b/mod/etc/options_menu/commands/c0070_NetworkOptions similarity index 92% rename from mod/etc/options_menu/commands/c0080_NetworkOptions rename to mod/etc/options_menu/commands/c0070_NetworkOptions index 8a7de8e..def5f61 100644 --- a/mod/etc/options_menu/commands/c0080_NetworkOptions +++ b/mod/etc/options_menu/commands/c0070_NetworkOptions @@ -1,5 +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/advanced_commands/c0910_LanguageOptions b/mod/etc/options_menu/commands/c0078_LanguageOptions similarity index 72% rename from mod/etc/options_menu/advanced_commands/c0910_LanguageOptions rename to mod/etc/options_menu/commands/c0078_LanguageOptions index 2f12a54..053f6d5 100644 --- a/mod/etc/options_menu/advanced_commands/c0910_LanguageOptions +++ b/mod/etc/options_menu/commands/c0078_LanguageOptions @@ -1,5 +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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_language.png diff --git a/mod/etc/options_menu/commands/c0070_AdvancedOptions b/mod/etc/options_menu/commands/c0080_AdvancedOptions similarity index 95% rename from mod/etc/options_menu/commands/c0070_AdvancedOptions rename to mod/etc/options_menu/commands/c0080_AdvancedOptions index 2b87622..ab6bd68 100644 --- a/mod/etc/options_menu/commands/c0070_AdvancedOptions +++ b/mod/etc/options_menu/commands/c0080_AdvancedOptions @@ -1,5 +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/c9999_Exit b/mod/etc/options_menu/commands/c9999_Exit deleted file mode 100644 index 804d7ff..0000000 --- a/mod/etc/options_menu/commands/c9999_Exit +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=EXIT -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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/language/commands/c9998_separator b/mod/etc/options_menu/controller/commands/c0008_separator similarity index 100% rename from mod/etc/options_menu/language/commands/c9998_separator rename to mod/etc/options_menu/controller/commands/c0008_separator 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/network/commands/c9998_separator b/mod/etc/options_menu/controller/commands/c0025_separator similarity index 100% rename from mod/etc/options_menu/network/commands/c9998_separator rename to mod/etc/options_menu/controller/commands/c0025_separator 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..e5b0697 --- /dev/null +++ b/mod/etc/options_menu/controller/scripts/clovercon.sh @@ -0,0 +1,78 @@ +#!/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" + +getCfg() { + eval "echo \"\$cfg_clovercon_$1\"" +} + +apply() { + 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) + [ "$(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 68% rename from mod/etc/options_menu/advanced_commands/c0030_DisplayTemp rename to mod/etc/options_menu/diagnostics/commands/c0020_DisplayTemp index 7344be0..7039828 100644 --- a/mod/etc/options_menu/advanced_commands/c0030_DisplayTemp +++ b/mod/etc/options_menu/diagnostics/commands/c0020_DisplayTemp @@ -1,4 +1,4 @@ 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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_temp.png diff --git a/mod/etc/options_menu/advanced_commands/c0040_DisplayTop b/mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop similarity index 51% rename from mod/etc/options_menu/advanced_commands/c0040_DisplayTop rename to mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop index f8411ed..3fdb39d 100644 --- a/mod/etc/options_menu/advanced_commands/c0040_DisplayTop +++ b/mod/etc/options_menu/diagnostics/commands/c0030_DisplayTop @@ -1,4 +1,4 @@ COMMAND_NAME=RUN_TOP COMMAND_TYPE=INTERNAL COMMAND_STR=top -b -n 1 -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_top.png diff --git a/mod/etc/options_menu/advanced_commands/c0050_BenchMark b/mod/etc/options_menu/diagnostics/commands/c0040_BenchMark similarity index 59% rename from mod/etc/options_menu/advanced_commands/c0050_BenchMark rename to mod/etc/options_menu/diagnostics/commands/c0040_BenchMark index 9a9ac77..72320a1 100644 --- a/mod/etc/options_menu/advanced_commands/c0050_BenchMark +++ b/mod/etc/options_menu/diagnostics/commands/c0040_BenchMark @@ -1,4 +1,4 @@ COMMAND_NAME=BENCHMARK_TOOL COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/BenchMark.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_benchmark.png diff --git a/mod/etc/options_menu/network/restore/commands/c9998_separator b/mod/etc/options_menu/diagnostics/commands/c0045_separator similarity index 100% rename from mod/etc/options_menu/network/restore/commands/c9998_separator rename to mod/etc/options_menu/diagnostics/commands/c0045_separator diff --git a/mod/etc/options_menu/advanced_commands/c0700_RADebug b/mod/etc/options_menu/diagnostics/commands/c0050_RADebug similarity index 70% rename from mod/etc/options_menu/advanced_commands/c0700_RADebug rename to mod/etc/options_menu/diagnostics/commands/c0050_RADebug index 8598175..0acbb52 100644 --- a/mod/etc/options_menu/advanced_commands/c0700_RADebug +++ b/mod/etc/options_menu/diagnostics/commands/c0050_RADebug @@ -3,4 +3,4 @@ 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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_debug.png diff --git a/mod/etc/options_menu/advanced_commands/c0060_DumpFile b/mod/etc/options_menu/diagnostics/commands/c0060_DumpFile similarity index 63% rename from mod/etc/options_menu/advanced_commands/c0060_DumpFile rename to mod/etc/options_menu/diagnostics/commands/c0060_DumpFile index 61d83d7..02f2ad2 100644 --- a/mod/etc/options_menu/advanced_commands/c0060_DumpFile +++ b/mod/etc/options_menu/diagnostics/commands/c0060_DumpFile @@ -2,4 +2,4 @@ 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_placeholder.png +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 index f37cd63..2769683 100644 Binary files a/mod/etc/options_menu/images/preview_advanced.png 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 index e504ae7..0260643 100644 Binary files a/mod/etc/options_menu/images/preview_hibernate.png 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 index e6e50b2..208eac2 100644 Binary files a/mod/etc/options_menu/images/preview_network.png 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 index 755b70f..66ae0dc 100644 Binary files a/mod/etc/options_menu/images/preview_placeholder.png 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 index e8c30cf..d8204eb 100644 Binary files a/mod/etc/options_menu/images/preview_reboot.png 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 index 68571c4..f4f126d 100644 Binary files a/mod/etc/options_menu/images/preview_retroarch.png 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 index 0595c77..fcfaf0c 100644 Binary files a/mod/etc/options_menu/images/preview_shutdown.png 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/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/frame.png b/mod/etc/options_menu/images/ui/frame.png deleted file mode 100644 index ded4399..0000000 Binary files a/mod/etc/options_menu/images/ui/frame.png and /dev/null differ diff --git a/mod/etc/options_menu/images/ui/gear.png b/mod/etc/options_menu/images/ui/gear.png index ed033a8..cdb23f2 100644 Binary files a/mod/etc/options_menu/images/ui/gear.png and b/mod/etc/options_menu/images/ui/gear.png differ diff --git a/mod/etc/options_menu/images/ui/highlight.png b/mod/etc/options_menu/images/ui/highlight.png deleted file mode 100644 index e96daea..0000000 Binary files a/mod/etc/options_menu/images/ui/highlight.png and /dev/null differ diff --git a/mod/etc/options_menu/images/ui/switch_off.png b/mod/etc/options_menu/images/ui/switch_off.png index c3a5708..61ba4b5 100644 Binary files a/mod/etc/options_menu/images/ui/switch_off.png 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 index 4330afa..22d7c0d 100644 Binary files a/mod/etc/options_menu/images/ui/switch_on.png 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 index 9aa218e..cad52e5 100644 --- a/mod/etc/options_menu/language/commands/c0010_English +++ b/mod/etc/options_menu/language/commands/c0010_English @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_ENGLISH +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_placeholder.png +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/c0040_French b/mod/etc/options_menu/language/commands/c0020_French similarity index 61% rename from mod/etc/options_menu/language/commands/c0040_French rename to mod/etc/options_menu/language/commands/c0020_French index f149dea..470d7cc 100644 --- a/mod/etc/options_menu/language/commands/c0040_French +++ b/mod/etc/options_menu/language/commands/c0020_French @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_FRENCH +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_placeholder.png +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/c0050_German b/mod/etc/options_menu/language/commands/c0030_German similarity index 61% rename from mod/etc/options_menu/language/commands/c0050_German rename to mod/etc/options_menu/language/commands/c0030_German index c87c2ed..25e206c 100644 --- a/mod/etc/options_menu/language/commands/c0050_German +++ b/mod/etc/options_menu/language/commands/c0030_German @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_GERMAN +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_placeholder.png +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/c0060_Spanish b/mod/etc/options_menu/language/commands/c0040_Spanish similarity index 61% rename from mod/etc/options_menu/language/commands/c0060_Spanish rename to mod/etc/options_menu/language/commands/c0040_Spanish index cd4dc01..ec93ed0 100644 --- a/mod/etc/options_menu/language/commands/c0060_Spanish +++ b/mod/etc/options_menu/language/commands/c0040_Spanish @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_SPANISH +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_placeholder.png +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/c0070_Italian b/mod/etc/options_menu/language/commands/c0050_Italian similarity index 61% rename from mod/etc/options_menu/language/commands/c0070_Italian rename to mod/etc/options_menu/language/commands/c0050_Italian index 91f305e..21fe205 100644 --- a/mod/etc/options_menu/language/commands/c0070_Italian +++ b/mod/etc/options_menu/language/commands/c0050_Italian @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_ITALIAN +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_placeholder.png +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/c0080_Dutch b/mod/etc/options_menu/language/commands/c0060_Dutch similarity index 61% rename from mod/etc/options_menu/language/commands/c0080_Dutch rename to mod/etc/options_menu/language/commands/c0060_Dutch index 9883fba..5a784a9 100644 --- a/mod/etc/options_menu/language/commands/c0080_Dutch +++ b/mod/etc/options_menu/language/commands/c0060_Dutch @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_DUTCH +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_placeholder.png +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/c0020_Portuguese b/mod/etc/options_menu/language/commands/c0070_Portuguese similarity index 59% rename from mod/etc/options_menu/language/commands/c0020_Portuguese rename to mod/etc/options_menu/language/commands/c0070_Portuguese index d63f751..e76ee89 100644 --- a/mod/etc/options_menu/language/commands/c0020_Portuguese +++ b/mod/etc/options_menu/language/commands/c0070_Portuguese @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_PORTUGUESE +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_placeholder.png +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/c0030_Japanese b/mod/etc/options_menu/language/commands/c0090_Japanese similarity index 61% rename from mod/etc/options_menu/language/commands/c0030_Japanese rename to mod/etc/options_menu/language/commands/c0090_Japanese index 269f52e..b907b0a 100644 --- a/mod/etc/options_menu/language/commands/c0030_Japanese +++ b/mod/etc/options_menu/language/commands/c0090_Japanese @@ -1,5 +1,6 @@ -COMMAND_NAME=LANG_JAPANESE +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_placeholder.png +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/commands/c9999_Back b/mod/etc/options_menu/language/commands/c9999_Back deleted file mode 100644 index 606b62d..0000000 --- a/mod/etc/options_menu/language/commands/c9999_Back +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=BACK -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options --commandPath %options_path%/advanced_commands/ --title "ADVANCED_OPTIONS" & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/language/commands/c9999_Exit b/mod/etc/options_menu/language/commands/c9999_Exit deleted file mode 100644 index 804d7ff..0000000 --- a/mod/etc/options_menu/language/commands/c9999_Exit +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=EXIT -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/language/de-DE.lang b/mod/etc/options_menu/language/de-DE.lang index 5edf242..18de9d2 100644 --- a/mod/etc/options_menu/language/de-DE.lang +++ b/mod/etc/options_menu/language/de-DE.lang @@ -1,22 +1,27 @@ HIBERNATE=Ruhezustand/Standby SHUTDOWN_DEVICE=Gerät ausschalten REBOOT_DEVICE=Gerät neu starten -RETROARCH_OPTIONS=RetroArch-Optionen ADVANCED_OPTIONS=Erweiterte Optionen -NETWORK_OPTIONS=Netzwerkoptionen +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 -TOGGLE_MODERN_UI=Moderne Oberfläche RA_DEBUGGER=RetroArch-Debugger (USB-Logs) CHANGE_BUTTON_COMBO=Tastenkombination ändern CLEAR_CACHE=Cache leeren BACK=Zurück -LANGUAGE_OPTIONS=Sprachoptionen +LANGUAGE_OPTIONS=Sprache DISPLAY_IP=IP-Adresse anzeigen RECONNECT=Erneut verbinden SEARCH_SSIDS=Nach SSIDs suchen @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=B drücken zum Beenden. -LANG_ENGLISH=Englisch -LANG_PORTUGUESE=Portugiesisch -LANG_JAPANESE=Japanisch -LANG_FRENCH=Französisch -LANG_GERMAN=Deutsch -LANG_SPANISH=Spanisch -LANG_ITALIAN=Italienisch -LANG_DUTCH=Niederländisch +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_HINT=A = Ja B = Nein DELETE_CONFIRM_GENERIC=Dieses Element löschen? -WIFI_DELETE_HINT_FOOTER=X = Löschen A = Wiederherstellen HINT_SELECT=Wählen HINT_BACK=Zurück -HINT_DELETE=Löschen +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 index 17168f5..e89537c 100644 --- a/mod/etc/options_menu/language/en-US.lang +++ b/mod/etc/options_menu/language/en-US.lang @@ -1,22 +1,28 @@ HIBERNATE=Hibernate/Standby SHUTDOWN_DEVICE=Shutdown Device REBOOT_DEVICE=Reboot Device -RETROARCH_OPTIONS=Retroarch Options +RETROARCH_OPTIONS=RetroArch ADVANCED_OPTIONS=Advanced Options -NETWORK_OPTIONS=Network 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 -TOGGLE_MODERN_UI=Modern UI RA_DEBUGGER=RetroArch Debugger (USB logs) CHANGE_BUTTON_COMBO=Change Options Button Combo CLEAR_CACHE=Clear Cache BACK=Back -LANGUAGE_OPTIONS=Language Options +LANGUAGE_OPTIONS=Language DISPLAY_IP=Display IP Address RECONNECT=Reconnect SEARCH_SSIDS=Search for SSIDs @@ -38,23 +44,84 @@ 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 -PRESS_B_EXIT=Press B to exit. -LANG_ENGLISH=English -LANG_PORTUGUESE=Portuguese -LANG_JAPANESE=Japanese -LANG_FRENCH=French -LANG_GERMAN=German -LANG_SPANISH=Spanish -LANG_ITALIAN=Italian -LANG_DUTCH=Dutch +LOADING=Loading... WIFI_BACKUP_SPLASH_LINE1=Backup Wifi Config File WIFI_BACKUP_SPLASH_LINE2=Please Wait . . . DELETE_BACKUP_CONFIRM=Delete this backup? -DELETE_CONFIRM_HINT=A = Yes B = No DELETE_CONFIRM_GENERIC=Delete this item? -WIFI_DELETE_HINT_FOOTER=X = Delete A = Restore HINT_SELECT=Select HINT_BACK=Back -HINT_DELETE=Delete +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 index a789d2b..60c1923 100644 --- a/mod/etc/options_menu/language/es-ES.lang +++ b/mod/etc/options_menu/language/es-ES.lang @@ -1,22 +1,27 @@ HIBERNATE=Hibernar/Reposo SHUTDOWN_DEVICE=Apagar dispositivo REBOOT_DEVICE=Reiniciar dispositivo -RETROARCH_OPTIONS=Opciones de Retroarch ADVANCED_OPTIONS=Opciones avanzadas -NETWORK_OPTIONS=Opciones de red +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 -TOGGLE_MODERN_UI=Interfaz moderna RA_DEBUGGER=Depurador de RetroArch (logs USB) CHANGE_BUTTON_COMBO=Cambiar combinación de botones CLEAR_CACHE=Vaciar caché BACK=Atrás -LANGUAGE_OPTIONS=Opciones de idioma +LANGUAGE_OPTIONS=Idioma DISPLAY_IP=Mostrar dirección IP RECONNECT=Reconectar SEARCH_SSIDS=Buscar SSID @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=Pulsa B para salir. -LANG_ENGLISH=Inglés -LANG_PORTUGUESE=Portugués -LANG_JAPANESE=Japonés -LANG_FRENCH=Francés -LANG_GERMAN=Alemán -LANG_SPANISH=Español -LANG_ITALIAN=Italiano -LANG_DUTCH=Neerlandés +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_HINT=A = Sí B = No DELETE_CONFIRM_GENERIC=¿Borrar este elemento? -WIFI_DELETE_HINT_FOOTER=X = Borrar A = Restaurar HINT_SELECT=Seleccionar HINT_BACK=Atrás -HINT_DELETE=Borrar +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 index e6a8244..67b10c6 100644 --- a/mod/etc/options_menu/language/fr-FR.lang +++ b/mod/etc/options_menu/language/fr-FR.lang @@ -1,22 +1,27 @@ HIBERNATE=Hibernation/Veille SHUTDOWN_DEVICE=Éteindre l'appareil REBOOT_DEVICE=Redémarrer l'appareil -RETROARCH_OPTIONS=Options RetroArch ADVANCED_OPTIONS=Options avancées -NETWORK_OPTIONS=Options réseau +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 -TOGGLE_MODERN_UI=Interface moderne RA_DEBUGGER=Débogueur RetroArch (logs USB) CHANGE_BUTTON_COMBO=Changer la combinaison de boutons CLEAR_CACHE=Vider le cache BACK=Retour -LANGUAGE_OPTIONS=Options de langue +LANGUAGE_OPTIONS=Langue DISPLAY_IP=Afficher l'adresse IP RECONNECT=Reconnecter SEARCH_SSIDS=Rechercher des SSID @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=Appuyez sur B pour quitter. -LANG_ENGLISH=Anglais -LANG_PORTUGUESE=Portugais -LANG_JAPANESE=Japonais -LANG_FRENCH=Français -LANG_GERMAN=Allemand -LANG_SPANISH=Espagnol -LANG_ITALIAN=Italien -LANG_DUTCH=Néerlandais +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_HINT=A = Oui B = Non DELETE_CONFIRM_GENERIC=Supprimer cet élément? -WIFI_DELETE_HINT_FOOTER=X = Supprimer A = Restaurer HINT_SELECT=Sélect. HINT_BACK=Retour -HINT_DELETE=Suppr. +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 index 6fbe850..8ca5d06 100644 --- a/mod/etc/options_menu/language/it-IT.lang +++ b/mod/etc/options_menu/language/it-IT.lang @@ -1,22 +1,27 @@ HIBERNATE=Ibernazione/Standby SHUTDOWN_DEVICE=Spegni dispositivo REBOOT_DEVICE=Riavvia dispositivo -RETROARCH_OPTIONS=Opzioni RetroArch ADVANCED_OPTIONS=Opzioni avanzate -NETWORK_OPTIONS=Opzioni di rete +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 -TOGGLE_MODERN_UI=Interfaccia moderna RA_DEBUGGER=Debugger RetroArch (log USB) CHANGE_BUTTON_COMBO=Cambia combinazione pulsanti CLEAR_CACHE=Svuota cache BACK=Indietro -LANGUAGE_OPTIONS=Opzioni lingua +LANGUAGE_OPTIONS=Lingua DISPLAY_IP=Mostra indirizzo IP RECONNECT=Riconnetti SEARCH_SSIDS=Cerca SSID @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=Premi B per uscire. -LANG_ENGLISH=Inglese -LANG_PORTUGUESE=Portoghese -LANG_JAPANESE=Giapponese -LANG_FRENCH=Francese -LANG_GERMAN=Tedesco -LANG_SPANISH=Spagnolo -LANG_ITALIAN=Italiano -LANG_DUTCH=Olandese +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_HINT=A = Sì B = No DELETE_CONFIRM_GENERIC=Eliminare questo elemento? -WIFI_DELETE_HINT_FOOTER=X = Elimina A = Ripristina HINT_SELECT=Seleziona HINT_BACK=Indietro -HINT_DELETE=Elimina +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 index 906243d..cf1fc29 100644 --- a/mod/etc/options_menu/language/ja-JP.lang +++ b/mod/etc/options_menu/language/ja-JP.lang @@ -1,22 +1,27 @@ HIBERNATE=ねむらせる SHUTDOWN_DEVICE=でんげんをきる REBOOT_DEVICE=さいきどうする -RETROARCH_OPTIONS=RetroArchのせってい ADVANCED_OPTIONS=じょうきゅうせってい -NETWORK_OPTIONS=Networkのせってい +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へのかきこみをきりかえ -TOGGLE_MODERN_UI=Modern UI RA_DEBUGGER=RAのDebugger (USB Log) CHANGE_BUTTON_COMBO=Buttonくみあわせをへんこう CLEAR_CACHE=Cacheをけす BACK=もどる -LANGUAGE_OPTIONS=げんごせってい +LANGUAGE_OPTIONS=げんご DISPLAY_IP=IP Addressをひょうじ RECONNECT=さいせつぞく SEARCH_SSIDS=SSIDをさがす @@ -38,23 +43,84 @@ RA_DELETE_BIOS=BIOS Fileをさくじょ (NAND) RA_TOGGLE_LOAD_SCREENS=RAとCanoeのLoadingがめんをきりかえ RESTORE_WIFI_CONFIG=Wifiせっていをもどす OPTIONS_TITLE=せってい -PRESS_B_EXIT=Bでおわる -LANG_ENGLISH=英語 -LANG_PORTUGUESE=ポルトガル語 -LANG_JAPANESE=日本語 -LANG_FRENCH=フランス語 -LANG_GERMAN=ドイツ語 -LANG_SPANISH=スペイン語 -LANG_ITALIAN=イタリア語 -LANG_DUTCH=オランダ語 +LOADING=よみこみちゅう... WIFI_BACKUP_SPLASH_LINE1=Wifiせってい Fileの Backup WIFI_BACKUP_SPLASH_LINE2=おまちください . . . DELETE_BACKUP_CONFIRM=このBackupをさくじょしますか? -DELETE_CONFIRM_HINT=A = はい B = いいえ DELETE_CONFIRM_GENERIC=これをさくじょしますか? -WIFI_DELETE_HINT_FOOTER=X = さくじょ A = もどす HINT_SELECT=けってい HINT_BACK=もどる -HINT_DELETE=けす +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 index d49e1ab..67b789a 100644 --- a/mod/etc/options_menu/language/nl-NL.lang +++ b/mod/etc/options_menu/language/nl-NL.lang @@ -1,22 +1,27 @@ HIBERNATE=Slaapstand SHUTDOWN_DEVICE=Apparaat uitschakelen REBOOT_DEVICE=Apparaat herstarten -RETROARCH_OPTIONS=RetroArch-opties ADVANCED_OPTIONS=Geavanceerde opties -NETWORK_OPTIONS=Netwerkopties +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 -TOGGLE_MODERN_UI=Moderne interface RA_DEBUGGER=RetroArch-debugger (USB-logs) CHANGE_BUTTON_COMBO=Knoppencombinatie wijzigen CLEAR_CACHE=Cache wissen BACK=Terug -LANGUAGE_OPTIONS=Taalopties +LANGUAGE_OPTIONS=Taal DISPLAY_IP=IP-adres weergeven RECONNECT=Opnieuw verbinden SEARCH_SSIDS=SSID's zoeken @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=Druk op B om af te sluiten. -LANG_ENGLISH=Engels -LANG_PORTUGUESE=Portugees -LANG_JAPANESE=Japans -LANG_FRENCH=Frans -LANG_GERMAN=Duits -LANG_SPANISH=Spaans -LANG_ITALIAN=Italiaans -LANG_DUTCH=Nederlands +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_HINT=A = Ja B = Nee DELETE_CONFIRM_GENERIC=Dit item verwijderen? -WIFI_DELETE_HINT_FOOTER=X = Verwijderen A = Herstellen HINT_SELECT=Kiezen HINT_BACK=Terug -HINT_DELETE=Wissen +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 index 6d1bde8..ccb097f 100644 --- a/mod/etc/options_menu/language/pt-PT.lang +++ b/mod/etc/options_menu/language/pt-PT.lang @@ -1,22 +1,27 @@ HIBERNATE=Hibernar/Standby SHUTDOWN_DEVICE=Desligar Dispositivo REBOOT_DEVICE=Reiniciar Dispositivo -RETROARCH_OPTIONS=Opções do Retroarch ADVANCED_OPTIONS=Opções Avançadas -NETWORK_OPTIONS=Opções de Rede +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 -TOGGLE_MODERN_UI=Interface Moderna RA_DEBUGGER=Depurador do RetroArch (logs USB) CHANGE_BUTTON_COMBO=Mudar Combinação de Botões CLEAR_CACHE=Limpar Cache BACK=Voltar -LANGUAGE_OPTIONS=Opções de Idioma +LANGUAGE_OPTIONS=Idioma DISPLAY_IP=Mostrar Endereço IP RECONNECT=Reconectar SEARCH_SSIDS=Procurar SSIDs @@ -38,23 +43,84 @@ 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 -PRESS_B_EXIT=Pressione B para sair. -LANG_ENGLISH=Inglês -LANG_PORTUGUESE=Português -LANG_JAPANESE=Japonês -LANG_FRENCH=Francês -LANG_GERMAN=Alemão -LANG_SPANISH=Espanhol -LANG_ITALIAN=Italiano -LANG_DUTCH=Neerlandês +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_HINT=A = Sim B = Não DELETE_CONFIRM_GENERIC=Apagar este item? -WIFI_DELETE_HINT_FOOTER=X = Apagar A = Restaurar HINT_SELECT=Selecionar HINT_BACK=Voltar -HINT_DELETE=Apagar +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 7bd1fc0..f6ee588 100644 --- a/mod/etc/options_menu/network/commands/c0010_ShowIP +++ b/mod/etc/options_menu/network/commands/c0010_ShowIP @@ -1,4 +1,4 @@ COMMAND_NAME=DISPLAY_IP COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/show-my-ip.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 711e772..1d06333 100644 --- a/mod/etc/options_menu/network/commands/c0011_Reconnect +++ b/mod/etc/options_menu/network/commands/c0011_Reconnect @@ -1,4 +1,4 @@ COMMAND_NAME=RECONNECT COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/reconnect.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 f6ba44e..46831d0 100644 --- a/mod/etc/options_menu/network/commands/c0012_ShowSSID +++ b/mod/etc/options_menu/network/commands/c0012_ShowSSID @@ -1,4 +1,4 @@ COMMAND_NAME=SEARCH_SSIDS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/show-ssid.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_net_ssid.png diff --git a/mod/etc/options_menu/network/commands/c0030_BackupNand b/mod/etc/options_menu/network/commands/c0030_BackupNand index edcba10..48467a3 100644 --- a/mod/etc/options_menu/network/commands/c0030_BackupNand +++ b/mod/etc/options_menu/network/commands/c0030_BackupNand @@ -1,4 +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_placeholder.png +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 index 492b772..00f5dd1 100644 --- a/mod/etc/options_menu/network/commands/c0040_BackupUsb +++ b/mod/etc/options_menu/network/commands/c0040_BackupUsb @@ -2,4 +2,4 @@ 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_placeholder.png +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 index 675aaf0..d03b167 100644 --- a/mod/etc/options_menu/network/commands/c0050_RestoreNand +++ b/mod/etc/options_menu/network/commands/c0050_RestoreNand @@ -1,4 +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_placeholder.png +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 index 280f89a..7532a8a 100644 --- a/mod/etc/options_menu/network/commands/c0060_RestoreUsb +++ b/mod/etc/options_menu/network/commands/c0060_RestoreUsb @@ -1,5 +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_placeholder.png +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 c605f4b..0000000 --- a/mod/etc/options_menu/network/commands/c9999_Back +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=BACK -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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 804d7ff..0000000 --- a/mod/etc/options_menu/network/commands/c9999_Exit +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=EXIT -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/network/restore/commands/c9999_Back b/mod/etc/options_menu/network/restore/commands/c9999_Back deleted file mode 100644 index cf28a50..0000000 --- a/mod/etc/options_menu/network/restore/commands/c9999_Back +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=BACK -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" & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/network/scripts/backup-wifi.sh b/mod/etc/options_menu/network/scripts/backup-wifi.sh index 3e536e3..fc9bb19 100644 --- a/mod/etc/options_menu/network/scripts/backup-wifi.sh +++ b/mod/etc/options_menu/network/scripts/backup-wifi.sh @@ -28,7 +28,7 @@ ssid_lower="$(echo "$ssid" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9_.-')" [ "$1" = "nand" ] && backup_path="$rootfs/etc/wifi_backup" network="$backup_path/$ssid_lower" -Backup_Wifi() { +backupWifi() { if [ -d "$backup_path" ]; then [ -d "$network" ] && rm -rf "$network" fi @@ -38,7 +38,7 @@ Backup_Wifi() { } -Restore_Wifi() { +restoreWifi() { if [ -n "$1" ]; then backup_conf="$backup_path/$1/wpa_supplicant.conf" rm -f "$wpa_supplicant_conf" @@ -55,14 +55,14 @@ Restore_Wifi() { case "$2" in backup) - "$omScripts/gen_splash" /tmp/wifi_backup_splash.png WIFI_BACKUP_SPLASH_LINE1 WIFI_BACKUP_SPLASH_LINE2 && decodepng /tmp/wifi_backup_splash.png >/dev/fb0 - Backup_Wifi + "$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 "$omScripts/om_network" + sh "$om_scripts/om_network" ;; restore) - Restore_Wifi $3 - sh "$omNetworkScripts/reconnect.sh" + 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 index f1f84b3..50882c8 100644 --- a/mod/etc/options_menu/network/scripts/om_vars +++ b/mod/etc/options_menu/network/scripts/om_vars @@ -19,21 +19,21 @@ source $mountpoint/etc/options_menu/scripts/om_functions script_init -omNetwork="$optionsMenu/network" -omNetworkCmds="$omNetwork/commands" -omNetworkScripts="$omNetwork/scripts" -omWifiRestore="$omNetwork/restore" -omWifiRestoreCmds="$omWifiRestore/commands" -omWifiRestoreScripts="$omWifiRestore/scripts" +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" -disableRestoreUSB="$omNetworkCmds/_RestoreUsb" -disableRestoreNAND="$omNetworkCmds/_RestoreNand" -enableRestoreUSB="$omNetworkCmds/c0060_RestoreUsb" -enableRestoreNAND="$omNetworkCmds/c0050_RestoreNand" +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" -dst="usb" +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 index c860320..8727c8f 100644 --- a/mod/etc/options_menu/network/scripts/restore_settings.sh +++ b/mod/etc/options_menu/network/scripts/restore_settings.sh @@ -21,10 +21,11 @@ script_init if [ "$1" = "nand" ]; then backup_path="$rootfs/etc/wifi_backup" - dst="$1" + backup_dest="$1" fi -find "$omWifiRestoreCmds" -type f -name 'c0001_*' -exec rm {} \; +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" @@ -35,9 +36,15 @@ find "$backup_path/." -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n 1 ba echo "COMMAND_NAME=$ssid COMMAND_TYPE=INTERNAL RESTART_UI=FALSE -COMMAND_STR=sh $omNetworkScripts/backup-wifi.sh $dst restore $ssid_lower -DELETE_STR=rm -rf \"$backup_path/$wifi_network\" && sh $omNetworkScripts/restore_settings.sh $1 -DELETE_CONFIRM_KEY=DELETE_BACKUP_CONFIRM" >"$omWifiRestoreCmds/c0001_$ssid_lower" +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 -$optionsMenu/options --commandPath $omWifiRestoreCmds/ --scriptPath $omWifiRestoreScripts --title "RESTORE_WIFI_CONFIG" & +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 b17db34..fa37b3c 100644 --- a/mod/etc/options_menu/network/scripts/show-my-ip.sh +++ b/mod/etc/options_menu/network/scripts/show-my-ip.sh @@ -6,11 +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) 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 764acc7..2aa7171 100644 --- a/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll +++ b/mod/etc/options_menu/retroarch/commands/c0010_DefaultSettingsAll @@ -1,4 +1,4 @@ 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_placeholder.png +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 71dc0c6..b2e84d4 100644 --- a/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings +++ b/mod/etc/options_menu/retroarch/commands/c0020_DefaultSettings @@ -1,4 +1,4 @@ COMMAND_NAME=RA_RESTORE_DEFAULTS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/default-settings.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 c082dcc..31c5d9c 100644 --- a/mod/etc/options_menu/retroarch/commands/c0030_BackupNand +++ b/mod/etc/options_menu/retroarch/commands/c0030_BackupNand @@ -1,4 +1,4 @@ COMMAND_NAME=RA_BACKUP_NAND COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/backup-nand.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 5f28bc0..0a37b21 100644 --- a/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb +++ b/mod/etc/options_menu/retroarch/commands/c0040_BackupUsb @@ -2,4 +2,4 @@ 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_placeholder.png +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 2cb8e13..5cc613d 100644 --- a/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand +++ b/mod/etc/options_menu/retroarch/commands/c0050_RestoreNand @@ -1,4 +1,4 @@ COMMAND_NAME=RA_RESTORE_NAND COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/restore-nand.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 6489aa6..b1fd3e7 100644 --- a/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb +++ b/mod/etc/options_menu/retroarch/commands/c0060_RestoreUsb @@ -2,4 +2,4 @@ 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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_restore_usb.png diff --git a/mod/etc/options_menu/retroarch/commands/c0061_SyncBios b/mod/etc/options_menu/retroarch/commands/c0061_SyncBios index 1f21450..fd998f6 100644 --- a/mod/etc/options_menu/retroarch/commands/c0061_SyncBios +++ b/mod/etc/options_menu/retroarch/commands/c0061_SyncBios @@ -2,4 +2,4 @@ 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_placeholder.png +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 index 673f860..b4a2362 100644 --- a/mod/etc/options_menu/retroarch/commands/c0065_DeleteBackups +++ b/mod/etc/options_menu/retroarch/commands/c0065_DeleteBackups @@ -1,4 +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_placeholder.png +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 ec785f1..2bccf6a 100644 --- a/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides +++ b/mod/etc/options_menu/retroarch/commands/c0070_DeleteOverrides @@ -1,4 +1,4 @@ COMMAND_NAME=RA_DELETE_OVERRIDES COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/delete-overrides.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 f8e0b7c..0058fed 100644 --- a/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps +++ b/mod/etc/options_menu/retroarch/commands/c0080_DeleteRemaps @@ -1,4 +1,4 @@ COMMAND_NAME=RA_DELETE_REMAPS COMMAND_TYPE=INTERNAL COMMAND_STR=sh %script_dir%/delete-remaps.sh -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png +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 index a4a04d8..6404e39 100644 --- a/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios +++ b/mod/etc/options_menu/retroarch/commands/c0082_DeleteBios @@ -2,4 +2,4 @@ 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_placeholder.png +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 1318eb0..022dfd6 100644 --- a/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens +++ b/mod/etc/options_menu/retroarch/commands/c0090_ToggleLoadScreens @@ -1,4 +1,5 @@ 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_placeholder.png +PREVIEW_IMAGE=/etc/options_menu/images/preview_ra_load_screens.png diff --git a/mod/etc/options_menu/retroarch/commands/c9998_separator b/mod/etc/options_menu/retroarch/commands/c9998_separator deleted file mode 100644 index e69de29..0000000 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 c605f4b..0000000 --- a/mod/etc/options_menu/retroarch/commands/c9999_Back +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=BACK -COMMAND_TYPE=EXTERNAL -RESTART_UI=FALSE -COMMAND_STR=usleep 50000 && %options_path%/options & -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png 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 804d7ff..0000000 --- a/mod/etc/options_menu/retroarch/commands/c9999_Exit +++ /dev/null @@ -1,5 +0,0 @@ -COMMAND_NAME=EXIT -COMMAND_TYPE=EXTERNAL -RESTART_UI=TRUE -COMMAND_STR=echo "Closing Options Menu" -PREVIEW_IMAGE=/etc/options_menu/images/preview_placeholder.png diff --git a/mod/etc/options_menu/retroarch/scripts/backup-nand.sh b/mod/etc/options_menu/retroarch/scripts/backup-nand.sh index 7a1d97d..62977fd 100644 --- 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 index 022009b..a32bcbf 100644 --- 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 index 4fd4813..ed5c832 100644 --- 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 index cefda0c..e13a645 100644 --- 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-overrides.sh b/mod/etc/options_menu/retroarch/scripts/delete-overrides.sh index f2b84dc..1d2c114 100644 --- 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 index ba44872..7b55772 100644 --- 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 index 06dc219..28c7d92 100644 --- 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 index 70115d3..cdb991f 100644 --- 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/toggle-loadscreens.sh b/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh index 738f171..321bd4e 100644 --- a/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh +++ b/mod/etc/options_menu/retroarch/scripts/toggle-loadscreens.sh @@ -26,5 +26,5 @@ fi 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 5210df3..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 e6030ea..f8087ad 100644 --- a/mod/etc/options_menu/scripts/RADebug.sh +++ b/mod/etc/options_menu/scripts/RADebug.sh @@ -12,9 +12,9 @@ rm -rf /media/data/log/RetroArchConfig/* { chmod -R 777 /etc/libretro #Set full permissions for retroarch echo "Dumping retroarch config to log folder..." - RA_CONFIG=/etc/libretro/.config - [ -d "$RA_CONFIG" ] || RA_CONFIG=/etc/libretro/config - cp -r "$RA_CONFIG" /media/data/log/RetroArchConfig + 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 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_state.sh b/mod/etc/options_menu/scripts/USB_RW_state.sh index 4f807db..385aacd 100644 --- a/mod/etc/options_menu/scripts/USB_RW_state.sh +++ b/mod/etc/options_menu/scripts/USB_RW_state.sh @@ -14,8 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Reports current USB write-access state ("on"/"off") for the toggle switch -# in the menu - read-only counterpart to USB_RW.sh, which flips it. +# "on"/"off" for the USB write toggle; USB_RW.sh flips it source /etc/preinit script_init 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/gen_splash b/mod/etc/options_menu/scripts/gen_splash deleted file mode 100644 index d4d9c9b..0000000 Binary files a/mod/etc/options_menu/scripts/gen_splash and /dev/null differ diff --git a/mod/etc/options_menu/scripts/om_functions b/mod/etc/options_menu/scripts/om_functions index 0762d35..e8cf18e 100644 --- a/mod/etc/options_menu/scripts/om_functions +++ b/mod/etc/options_menu/scripts/om_functions @@ -1,5 +1,5 @@ #!/bin/sh -# shellcheck disable=SC2154,SC1091,SC2034,SC2068,SC2039,SC3051,SC3046 +# 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 @@ -28,7 +28,7 @@ string_path="resources/strings" root_bin="$rootfs/bin" usb_path="$mountpoint/media/$modname" font_dir="$usb_path/fonts" -state_path="$mountpoint$profilepath/$modname" +mod_state_path="$mountpoint$profilepath/$modname" [ ! -d "$font_dir" ] && font_dir="$nand_path/fonts" @@ -59,36 +59,38 @@ snes) esac # OM PATHS -optionsMenu="$mountpoint/etc/options_menu" -omCommands="$optionsMenu/commands" -omScripts="$optionsMenu/scripts" -omImages="$optionsMenu/images" +options_menu="$mountpoint/etc/options_menu" +om_commands="$options_menu/commands" +om_scripts="$options_menu/scripts" +om_images="$options_menu/images" # FUNCTIONS -gStorage="$(findGameStorage)" +game_storage="$(findGameStorage)" rename() { [ -f "$1" ] && mv "$1" "$2" } translate() { - key="$1" - langCode="en-US" - [ -f "$optionsMenu/language.cfg" ] && langCode="$(cat "$optionsMenu/language.cfg")" - [ -z "$langCode" ] && langCode="en-US" - - value="" - for langDir in "$optionsMenu/lang" "$optionsMenu"/*/lang; do - [ -z "$value" ] && [ -f "$langDir/$langCode.lang" ] && value="$(grep "^${key}=" "$langDir/$langCode.lang" 2>/dev/null | tail -1 | cut -d= -f2-)" - [ -z "$value" ] && [ -f "$langDir/en-US.lang" ] && value="$(grep "^${key}=" "$langDir/en-US.lang" 2>/dev/null | tail -1 | cut -d= -f2-)" + 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() { - for f in "$@"; do - [ -f "$f" ] || [ -d "$f" ] && rm -rf "$f" + local target + for target in "$@"; do + [ -f "$target" ] || [ -d "$target" ] && rm -rf "$target" done } @@ -104,26 +106,32 @@ create() { [ ! -f "$1" ] && touch "$1" } -enable_cmds() { - for arg in "$@"; do - in="disable$arg" - out="enable$arg" - # shellcheck disable=SC2086 - eval "rename "\$$in" "\$$out"" +enableCmds() { + local cmd_name + for cmd_name in "$@"; do + eval "rename \"\$disable_$cmd_name\" \"\$enable_$cmd_name\"" done } -disable_cmds() { - for arg in "$@"; do - in="enable$arg" - out="disable$arg" - # shellcheck disable=SC2086 - eval "rename "\$$in" "\$$out"" +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 ! nc -z 8.8.8.8 53 >/dev/null 2>&1; then + if hasInternet; then translate NO_PKG_ERR else translate NO_NET_ERR @@ -131,33 +139,54 @@ netChecker() { } toggleDownloads() { - nc -z 8.8.8.8 53 >/dev/null 2>&1 - # shellcheck disable=SC2181 - if [ $? -eq 0 ]; then - enable_cmds "Downloads" + if hasInternet; then + enableCmds "downloads" else - disable_cmds "Downloads" + disableCmds "downloads" fi } -is_classic_ui() { - # [X]-in-title markers only apply in classic UI; modern UI has a real switch - [ "$(cat /etc/options_menu/ui_style.cfg 2>/dev/null)" = "classic" ] +# 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 } -switchOff() { - is_classic_ui || return 0 - for item in "$@"; do - [ -f "$item" ] && sed -r -i 's/ \[X\]//g' "$item" - done - +# omDownload [fallback_url...] +omDownload() { + local rc + "$om_scripts/downloader" --progress --free-label "$(translate FREE_SPACE)" "$@" 2>&1 + rc=$? + downloadError "$rc" + return "$rc" } -switchOn() { - is_classic_ui || return 0 - for item in "$@"; do - [ -f "$item" ] && sed -r -i "1 s|$| [X]|" "$item" +# 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() { diff --git a/mod/etc/options_menu/scripts/om_network b/mod/etc/options_menu/scripts/om_network index 47801a9..001a48f 100644 --- a/mod/etc/options_menu/scripts/om_network +++ b/mod/etc/options_menu/scripts/om_network @@ -19,8 +19,4 @@ source $mountpoint/etc/options_menu/network/scripts/om_vars script_init -enable_cmds "RestoreUSB RestoreNAND" -[ ! -d "$usb_backup" ] && disable_cmds "RestoreUSB" -[ ! -d "$nand_backup" ] && disable_cmds "RestoreNAND" - -usleep 50000 && $optionsMenu/options --commandPath $omNetworkCmds/ --scriptPath $omNetworkScripts --title "NETWORK_OPTIONS" & +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.md b/mod/readme.md index d3281cf..0233d66 100644 --- a/mod/readme.md +++ b/mod/readme.md @@ -1,40 +1,55 @@ - ## 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. +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 -Current features provided by the options menu include: +### How to open -- Hmod Uninstaller -- Hibernate Mod -- Retroarch Settings Management -- Wifi Backup -- Latin Font Support +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 -- Network commands courtesy by Advokaten and DefKorns -- Wifi Backup courtesy of DefKorns -- Preview image aspect ratio courtesy of DefKorns -- 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 359b78a..d6b65e3 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -9,6 +9,7 @@ #include "command.h" #include "framework/controller.h" +#include "framework/draw_helpers.h" #include "localization.h" #include @@ -16,8 +17,62 @@ #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); +} -// std::stoi throws on non-numeric input; avoid crashing on a bad command file static int SafeStoi(const std::string & value, int fallback = 0) { try @@ -58,6 +113,10 @@ Command::Command(std::ifstream & in) 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; @@ -67,6 +126,8 @@ Command::Command(std::ifstream & in) 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) @@ -77,35 +138,59 @@ Command::Command(std::ifstream & in) previewImageWidth = SafeStoi(value, -1); else if(param.compare("PREVIEW_IMAGE_HEIGHT")==0) 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, bool modernUI, const NineSlice & frame, Uint8 bgR, Uint8 bgG, Uint8 bgB) 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; - if(modernUI) - SDL_SetRenderDrawColor(renderer, UiTheme::BgR, UiTheme::BgG, UiTheme::BgB, SDL_ALPHA_OPAQUE); - else - SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE); + SetDrawColor(renderer, UiTheme::Bg); char buffer[128] = {0}; - const int textX = modernUI ? UiTheme::FrameRect.x + UiTheme::FrameInset : 30; - const int textFirstY = modernUI ? UiTheme::HeaderDividerY + 24 : 100; + const int textX = UiTheme::FrameRect.x + UiTheme::FrameInset; + const int textFirstY = UiTheme::HeaderDividerY + 24; + + 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 = [&](Texture * closeText = nullptr) + auto render = [&]() { sdl_context.StartFrame(); - if(modernUI) - frame.Draw(renderer, UiTheme::FrameRect); - else - { - menuU.Draw(renderer); - menuL.Draw(renderer); - } + 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) { @@ -113,23 +198,33 @@ void Command::RunCommand(SDL_Context & sdl_context, Controller * controller, Spr 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(); }; - int fd = fileno(pipe); - 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)) { - // poll with a short timeout instead of blocking fgets, so a script - // that stalls without output doesn't also freeze input/rendering + // stdio can hold lines poll() never sees, so fgets drains every pass struct pollfd pfd{fd, POLLIN, 0}; - if(poll(&pfd, 1, 100) > 0 && fgets(buffer, 128, pipe) != nullptr) + 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'; + // 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) @@ -137,22 +232,36 @@ void Command::RunCommand(SDL_Context & sdl_context, Controller * controller, Spr 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(Translate("PRESS_B_EXIT"), 12, renderer, textX, modernUI ? UiTheme::CreditY : 610); + FinishCommand(process, aborted); + if(textList.empty() || aborted) + { + SetDrawColor(renderer, bg); + return; + } while (!controller->GetButtonStatus(B)) { controller->Update(); - render(&closeText); + render(); } - SDL_SetRenderDrawColor(renderer, bgR, bgG, bgB, 0xFF); + SetDrawColor(renderer, bg); } } @@ -168,7 +277,6 @@ void Command::UpdateState() char buffer[64] = {0}; std::string result; - // state scripts are expected to be near-instant; don't let a stuck one block menu load struct pollfd pfd{fileno(pipe), POLLIN, 0}; if(poll(&pfd, 1, 1000) > 0 && fgets(buffer, sizeof(buffer), pipe)) result = buffer; diff --git a/src/command.h b/src/command.h index 1204a7b..1af0c69 100644 --- a/src/command.h +++ b/src/command.h @@ -14,18 +14,28 @@ 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, bool modernUI, const NineSlice & frame, Uint8 bgR = 0x6e, Uint8 bgG = 0x6e, Uint8 bgB = 0x6e) 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; @@ -33,12 +43,20 @@ struct Command bool child = false; bool isToggle = false; bool stateOn = false; + bool hasSubmenu = false; Texture texture; std::string previewImage; - int previewImageX = 920; // default position when a command sets PREVIEW_IMAGE without _X/_Y + 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