From 951f2e2e0df3863b02088d50c313942123ac3086 Mon Sep 17 00:00:00 2001 From: pawndev Date: Fri, 1 May 2026 20:47:45 +0200 Subject: [PATCH] feat(cfw): support for arkos and darkos --- .github/workflows/release.yml | 6 +- README.md | 4 +- app/setup.go | 3 + cfw/arkos/arkos.go | 54 +++++ cfw/arkos/data/platforms.json | 254 ++++++++++++++++++++++ cfw/arkos/input_mapping.go | 59 +++++ cfw/arkos/input_mappings/r40-pro-max.json | 25 +++ cfw/cfw.go | 7 +- cfw/directories.go | 24 +- cfw/metadata.go | 5 +- cfw/platforms.go | 4 + cfw/saves.go | 3 + docs/_includes/cfw-links.md | 2 + docs/getting-started/install-arkos.md | 45 ++++ docs/platforms/arkos.md | 93 ++++++++ mkdocs.yml | 2 + scripts/ArkOS/Grout.sh | 23 ++ taskfiles/package.yml | 14 +- ui/general_settings.go | 2 +- 19 files changed, 619 insertions(+), 10 deletions(-) create mode 100644 cfw/arkos/arkos.go create mode 100644 cfw/arkos/data/platforms.json create mode 100644 cfw/arkos/input_mapping.go create mode 100755 cfw/arkos/input_mappings/r40-pro-max.json create mode 100644 docs/getting-started/install-arkos.md create mode 100644 docs/platforms/arkos.md create mode 100644 scripts/ArkOS/Grout.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e72fc180..e8638f9c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,7 +93,7 @@ jobs: GROUT_VERSION: ${{ needs.prepare.outputs.version }} - name: Package ARM64 platforms - run: task package:next package:muos package:knulli package:rocknix package:trimui package:batocera + run: task package:next package:muos package:knulli package:rocknix package:arkos package:trimui package:batocera - name: Create distributions run: | @@ -101,6 +101,7 @@ jobs: cd dist/muOS && zip -r Grout.muxapp Grout && mv Grout.muxapp ../Grout.muxapp && cd ../.. cd dist/Knulli && zip -r ../Grout-Knulli.zip Grout && cd ../.. cd dist/ROCKNIX && zip -r ../Grout-ROCKNIX.zip Grout.sh Grout && cd ../.. + cd dist/ArkOS && zip -r ../Grout-ArkOS.zip Grout.sh Grout && cd ../.. cd dist/Trimui && zip -r ../Grout-Trimui.zip Grout && cd ../.. cd dist/Batocera-arm64 && zip -r ../Grout-Batocera-arm64.zip Grout.sh Grout && cd ../.. @@ -113,6 +114,7 @@ jobs: dist/Grout.muxapp dist/Grout-Knulli.zip dist/Grout-ROCKNIX.zip + dist/Grout-ArkOS.zip dist/Grout-Trimui.zip dist/Grout-Batocera-arm64.zip build64/grout @@ -300,6 +302,7 @@ jobs: **/Grout-Onion.zip **/Grout-Koriki.zip **/Grout-Knulli.zip + **/Grout-ArkOS.zip **/Grout-ROCKNIX.zip **/Grout-Trimui.zip **/Grout-MinUI.zip @@ -379,6 +382,7 @@ jobs: "Grout-Allium.zip" "Grout-Onion.zip" "Grout-Koriki.zip" + "Grout-ArkOS.zip" "Grout-MinUI.zip" "Grout-Batocera-arm64.zip" "Grout-Batocera-amd64.zip" diff --git a/README.md b/README.md index 248c16c2..cfeb8933 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A RomM Client for your retro doo-dad. -[Allium][allium] · [Batocera][batocera] · [Knulli][knulli] · [Koriki][koriki] · [MinUI][minui] · [muOS][muos] · [NextUI][nextui] · [Onion][onion] · [ROCKNIX][rocknix] · [Spruce][spruce] · [SprigUI][sprigui] · [TwigUI][twigui] · [TrimUI][trimui] +[Allium][allium] · [ArkOS][arkos] · [Batocera][batocera] · [dArkOS][darkos] · [Knulli][knulli] · [Koriki][koriki] · [MinUI][minui] · [muOS][muos] · [NextUI][nextui] · [Onion][onion] · [ROCKNIX][rocknix] · [Spruce][spruce] · [SprigUI][sprigui] · [TwigUI][twigui] · [TrimUI][trimui]
@@ -87,6 +87,8 @@ If you enjoy using Grout and feel inclined to pay it forward, go do something ni [allium]: https://github.com/goweiwen/Allium +[arkos]: https://github.com/christianhaitian/arkos +[darkos]: https://github.com/christianhaitian/dArkOS [batocera]: https://batocera.org [knulli]: https://knulli.org [koriki]: https://github.com/Rparadise-Team/Koriki diff --git a/app/setup.go b/app/setup.go index a09d4154..2d58b912 100644 --- a/app/setup.go +++ b/app/setup.go @@ -5,6 +5,7 @@ import ( "grout/cache" "grout/cfw" "grout/cfw/allium" + "grout/cfw/arkos" "grout/cfw/koriki" "grout/cfw/minui" "grout/cfw/muos" @@ -91,6 +92,8 @@ func setupInputMapping(currentCFW cfw.CFW) { mappingBytes, mappingErr = spruce.GetInputMappingBytes() case cfw.ROCKNIX: mappingBytes, mappingErr = rocknix.GetInputMappingBytes() + case cfw.ArkOS: + mappingBytes, mappingErr = arkos.GetInputMappingBytes() } if mappingBytes != nil && mappingErr == nil { diff --git a/cfw/arkos/arkos.go b/cfw/arkos/arkos.go new file mode 100644 index 00000000..aa7cb44a --- /dev/null +++ b/cfw/arkos/arkos.go @@ -0,0 +1,54 @@ +package arkos + +import ( + "embed" + "grout/internal/jsonutil" + "os" + "path/filepath" +) + +//go:embed data/*.json +var embeddedFiles embed.FS + +var ( + Platforms = jsonutil.MustLoadJSONMap[string, []string](embeddedFiles, "data/platforms.json") +) + +func GetBasePath() string { + if basePath := os.Getenv("BASE_PATH"); basePath != "" { + return basePath + } + return "/roms" +} + +func GetRomDirectory() string { + return GetBasePath() +} + +func GetBIOSDirectory() string { + return filepath.Join(GetBasePath(), "bios") +} + +func GetBaseSavePath() string { + return GetRomDirectory() +} + +func GetArtDirectory(romDir string) string { + return filepath.Join(romDir, "images") +} + +func GetGroutGamelist() string { + return filepath.Join(GetRomDirectory(), "ports", "gamelist.xml") +} + +func GetVideoDirectory(romDir string) string { + return filepath.Join(romDir, "videos") +} + +func GetManualDirectory(romDir string) string { + return filepath.Join(romDir, "manuals") +} + +func GetBezelDirectory(romDir string) string { + return filepath.Join(romDir, "bezels") +} diff --git a/cfw/arkos/data/platforms.json b/cfw/arkos/data/platforms.json new file mode 100644 index 00000000..f1f61121 --- /dev/null +++ b/cfw/arkos/data/platforms.json @@ -0,0 +1,254 @@ +{ + "3do": [ + "3do" + ], + "3ds": [ + "3ds" + ], + "acpc": [ + "amstradcpc" + ], + "amiga": [ + "amiga", + "amigacd32" + ], + "arcade": [ + "arcade", + "mame", + "fbneo", + "neogeo" + ], + "arduboy": [ + "arduboy" + ], + "atari-st": [ + "atarist" + ], + "atari2600": [ + "atari2600" + ], + "atari5200": [ + "atari5200" + ], + "atari7800": [ + "atari7800" + ], + "atari800": [ + "atari800" + ], + "c128": [ + "c128" + ], + "c16": [ + "c16" + ], + "c64": [ + "c64" + ], + "cave-story": [], + "colecovision": [ + "coleco" + ], + "cpet": [ + "pet" + ], + "dc": [ + "dreamcast" + ], + "dos": [ + "pc" + ], + "fairchild-channel-f": [ + "channelf" + ], + "famicom": [ + "famicom" + ], + "fds": [ + "fds" + ], + "g-and-w": [ + "gameandwatch" + ], + "galaksija": [], + "gamegear": [ + "gamegear" + ], + "gb": [ + "gb" + ], + "gba": [ + "gba" + ], + "gbc": [ + "gbc" + ], + "genesis": [ + "megadrive" + ], + "intellivision": [ + "intellivision" + ], + "j2me": [ + "j2me" + ], + "jaguar": [ + "atarijaguar" + ], + "lynx": [ + "atarilynx" + ], + "mega-duck-slash-cougar-boy": [ + "megaduck" + ], + "msx": [ + "msx", + "msx2" + ], + "n64": [ + "n64" + ], + "nds": [ + "nds", + "ndsiware" + ], + "neo-geo-cd": [ + "neocd" + ], + "neo-geo-pocket": [ + "ngp" + ], + "neo-geo-pocket-color": [ + "ngpc" + ], + "neogeoaes": [ + "neogeo" + ], + "neogeomvs": [ + "neogeo" + ], + "nes": [ + "nes" + ], + "ngc": [ + "gamecube" + ], + "odyssey": [ + "odyssey" + ], + "openbor": [ + "openbor" + ], + "pc-8000": [ + "pc88" + ], + "pc-9800-series": [ + "pc98" + ], + "pc-fx": [ + "pcfx" + ], + "philips-cd-i": [ + "cdi" + ], + "pico": [ + "pico-8" + ], + "pico-8": [ + "pico-8" + ], + "pokemon-mini": [ + "pokemini" + ], + "ps2": [ + "ps2" + ], + "ps3": [ + "ps3" + ], + "psp": [ + "psp" + ], + "psx": [ + "psx" + ], + "saturn": [ + "saturn" + ], + "sega32": [ + "sega32x" + ], + "segacd": [ + "segacd" + ], + "sfam": [ + "snes" + ], + "sg1000": [ + "sg-1000" + ], + "sharp-x68000": [ + "x68000" + ], + "sms": [ + "mastersystem" + ], + "snes": [ + "snes" + ], + "supergrafx": [ + "sgfx" + ], + "supervision": [ + "supervision" + ], + "tg16": [ + "pcengine", + "tg16", + "tg16cd" + ], + "tic-80": [ + "tic-80" + ], + "turbografx-cd": [ + "pcenginecd" + ], + "vectrex": [ + "vectrex" + ], + "vic-20": [], + "vic20": [ + "vic20" + ], + "videopac": [ + "videopac" + ], + "virtualboy": [ + "virtualboy" + ], + "wii": [ + "wii", + "wiiware" + ], + "wiiu": [ + "wiiu" + ], + "windows": [ + "windows" + ], + "wonderswan": [ + "wonderswan" + ], + "wonderswan-color": [ + "wonderswancolor" + ], + "x1": [ + "x1" + ], + "zx81": [ + "zx81" + ], + "zxs": [ + "zxspectrum" + ] +} \ No newline at end of file diff --git a/cfw/arkos/input_mapping.go b/cfw/arkos/input_mapping.go new file mode 100644 index 00000000..7ef45c33 --- /dev/null +++ b/cfw/arkos/input_mapping.go @@ -0,0 +1,59 @@ +package arkos + +import ( + "embed" + "fmt" + "os" + "path/filepath" + "strings" +) + +//go:embed input_mappings/*.json +var embeddedInputMappings embed.FS + +// Device represents the detected device type on muOS +type Device string + +const ( + DeviceR40ProMax Device = "R40ProMax" + DeviceGeneric Device = "generic" +) + +// DetectDevice detects the device type when running on muOS by checking input devices. +// Returns DeviceTrimui if "TRIMUI" is found in /proc/bus/input/devices, otherwise DeviceAnbernic. +func DetectDevice() Device { + compatible, err := os.ReadFile("/sys/firmware/devicetree/base/compatible") + if err == nil && strings.Contains(string(compatible), "rk3326-odroidgo3-linux") { + return DeviceR40ProMax + } + + return DeviceGeneric +} + +// GetInputMappingBytes returns the embedded input mapping JSON for the detected muOS device +func GetInputMappingBytes() ([]byte, error) { + device := DetectDevice() + return GetInputMappingBytesForDevice(device) +} + +// GetInputMappingBytesForDevice returns the embedded input mapping JSON for a specific device +func GetInputMappingBytesForDevice(device Device) ([]byte, error) { + var filename string + switch device { + case DeviceR40ProMax: + filename = "input_mappings/r40-pro-max.json" + default: + return nil, nil + } + + overridePath := filepath.Join("overrides", "cfw", "arkos", filename) + data, err := os.ReadFile(overridePath) + if err != nil { + data, err = embeddedInputMappings.ReadFile(filename) + if err != nil { + return nil, fmt.Errorf("failed to read embedded input mapping %s: %w", filename, err) + } + } + + return data, nil +} diff --git a/cfw/arkos/input_mappings/r40-pro-max.json b/cfw/arkos/input_mappings/r40-pro-max.json new file mode 100755 index 00000000..ff2084cc --- /dev/null +++ b/cfw/arkos/input_mappings/r40-pro-max.json @@ -0,0 +1,25 @@ +{ + "keyboard_map": {}, + "controller_button_map": { + "0": 6, + "10": 11, + "11": 1, + "12": 2, + "13": 3, + "14": 4, + "2": 7, + "3": 8, + "9": 9 + }, + "controller_hat_map": {}, + "joystick_axis_map": {}, + "joystick_button_map": { + "1": 5, + "12": 14, + "13": 13, + "16": 15, + "6": 10, + "7": 12 + }, + "joystick_hat_map": {} +} \ No newline at end of file diff --git a/cfw/cfw.go b/cfw/cfw.go index b45cde6e..5db8baf2 100644 --- a/cfw/cfw.go +++ b/cfw/cfw.go @@ -18,6 +18,7 @@ const ( Allium CFW = "ALLIUM" Onion CFW = "ONION" Koriki CFW = "KORIKI" + ArkOS CFW = "ARKOS" Batocera CFW = "BATOCERA" MinUI CFW = "MINUI" ) @@ -27,18 +28,18 @@ func GetCFW() CFW { cfw := CFW(cfwEnv) switch cfw { - case MuOS, NextUI, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Koriki, Batocera, MinUI: + case MuOS, NextUI, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Koriki, ArkOS, Batocera, MinUI: return cfw default: log.SetOutput(os.Stderr) - log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Koriki, Batocera, MinUI", cfwEnv) + log.Fatalf("Unsupported CFW: '%s'. Valid options: NextUI, muOS, Knulli, Spruce, ROCKNIX, Trimui, Allium, Onion, Koriki, ArkOS, Batocera, MinUI", cfwEnv) return "" } } func (c CFW) IsBasedOnEmulationStation() bool { switch c { - case Knulli, ROCKNIX, Batocera: + case Knulli, ROCKNIX, ArkOS, Batocera: return true default: return false diff --git a/cfw/directories.go b/cfw/directories.go index 5d648670..493f6a33 100644 --- a/cfw/directories.go +++ b/cfw/directories.go @@ -2,6 +2,7 @@ package cfw import ( "grout/cfw/allium" + "grout/cfw/arkos" "grout/cfw/batocera" "grout/cfw/knulli" "grout/cfw/koriki" @@ -36,6 +37,8 @@ func GetRomDirectory() string { return onion.GetRomDirectory() case Koriki: return koriki.GetRomDirectory() + case ArkOS: + return arkos.GetRomDirectory() case Batocera: return batocera.GetRomDirectory() case MinUI: @@ -77,6 +80,8 @@ func GetBIOSDirectory() string { return onion.GetBIOSDirectory() case Koriki: return koriki.GetBIOSDirectory() + case ArkOS: + return arkos.GetBIOSDirectory() case Batocera: return batocera.GetBIOSDirectory() case MinUI: @@ -128,6 +133,8 @@ func GetArtDirectory(romDir string, platformFSSlug, platformName string) string return onion.GetArtDirectory(romDir) case Koriki: return koriki.GetArtDirectory(romDir) + case ArkOS: + return arkos.GetArtDirectory(romDir) case Batocera: return batocera.GetArtDirectory(romDir) case MinUI: @@ -176,6 +183,8 @@ func BaseSavePath() string { return onion.GetBaseSavePath() case Koriki: return koriki.GetBaseSavePath() + case ArkOS: + return arkos.GetBaseSavePath() case Batocera: return batocera.GetBaseSavePath() case MinUI: @@ -188,6 +197,8 @@ func GetArtMarqueeDirectory(romDir string, platformFSSlug, platformName string) switch GetCFW() { case ROCKNIX: return rocknix.GetArtDirectory(romDir) + case ArkOS: + return arkos.GetArtDirectory(romDir) case Knulli: return knulli.GetArtDirectory(romDir) case Batocera: @@ -201,13 +212,14 @@ func GetArtVideoDirectory(romDir string, platformFSSlug, platformName string) st switch GetCFW() { case ROCKNIX: return rocknix.GetVideoDirectory(romDir) + case ArkOS: + return arkos.GetVideoDirectory(romDir) case Knulli: return knulli.GetVideoDirectory(romDir) case Batocera: return batocera.GetVideoDirectory(romDir) default: return "" - } } @@ -215,6 +227,8 @@ func GetArtThumbnailDirectory(romDir string, platformFSSlug, platformName string switch GetCFW() { case ROCKNIX: return rocknix.GetArtDirectory(romDir) + case ArkOS: + return arkos.GetArtDirectory(romDir) case Knulli: return knulli.GetArtDirectory(romDir) case Batocera: @@ -228,6 +242,8 @@ func GetArtBezelDirectory(romDir string, platformFSSlug, platformName string) st switch GetCFW() { case ROCKNIX: return rocknix.GetBezelDirectory(romDir) + case ArkOS: + return arkos.GetBezelDirectory(romDir) case Knulli: return knulli.GetBezelDirectory(romDir) case Batocera: @@ -241,6 +257,8 @@ func GetManualDirectory(romDir string, platformFSSlug, platformName string) stri switch GetCFW() { case ROCKNIX: return rocknix.GetManualDirectory(romDir) + case ArkOS: + return arkos.GetManualDirectory(romDir) case Knulli: return knulli.GetManualDirectory(romDir) case Batocera: @@ -254,6 +272,8 @@ func GetBoxbackDirectory(romDir string, platformFSSlug, platformName string) str switch GetCFW() { case ROCKNIX: return rocknix.GetArtDirectory(romDir) + case ArkOS: + return arkos.GetArtDirectory(romDir) case Knulli: return knulli.GetArtDirectory(romDir) case Batocera: @@ -267,6 +287,8 @@ func GetFanartDirectory(romDir string, platformFSSlug, platformName string) stri switch GetCFW() { case ROCKNIX: return rocknix.GetArtDirectory(romDir) + case ArkOS: + return arkos.GetArtDirectory(romDir) case Knulli: return knulli.GetArtDirectory(romDir) case Batocera: diff --git a/cfw/metadata.go b/cfw/metadata.go index de344ca1..f6388f29 100644 --- a/cfw/metadata.go +++ b/cfw/metadata.go @@ -1,6 +1,7 @@ package cfw import ( + "grout/cfw/arkos" "grout/cfw/batocera" "grout/cfw/knulli" "grout/cfw/muos" @@ -24,6 +25,8 @@ func AddGroutToGamelist(c CFW) { gamelist.AddGroutEntry(knulli.GetGroutGamelist(), "./Grout/Grout.sh") case ROCKNIX: gamelist.AddGroutEntry(rocknix.GetGroutGamelist(), "./Grout.sh") + case ArkOS: + gamelist.AddGroutEntry(arkos.GetGroutGamelist(), "./Grout.sh") case Batocera: gamelist.AddGroutEntry(batocera.GetGroutGamelist(), "./Grout/Grout.sh") default: @@ -35,7 +38,7 @@ func AddGroutToGamelist(c CFW) { func FillGamesMetadata(entries []gamelist.RomGameEntry) { logger := gaba.GetLogger() switch GetCFW() { - case Knulli, ROCKNIX, Batocera: + case Knulli, ROCKNIX, ArkOS, Batocera: if err := gamelist.AddRomGamesToGamelist(entries, gamelist.GameListFileName); err != nil { logger.Warn("Failed to add games to ES gamelist.xml", "error", err) } diff --git a/cfw/platforms.go b/cfw/platforms.go index 82a5b41c..df5e252f 100644 --- a/cfw/platforms.go +++ b/cfw/platforms.go @@ -2,6 +2,7 @@ package cfw import ( "grout/cfw/allium" + "grout/cfw/arkos" "grout/cfw/batocera" "grout/cfw/knulli" "grout/cfw/koriki" @@ -31,6 +32,7 @@ func buildPlatformAliasMap() map[string][]string { allium.Platforms, onion.Platforms, koriki.Platforms, + arkos.Platforms, batocera.Platforms, minui.Platforms, } @@ -134,6 +136,8 @@ func GetPlatformMap(c CFW) map[string][]string { return onion.Platforms case Koriki: return koriki.Platforms + case ArkOS: + return arkos.Platforms case Batocera: return batocera.Platforms case MinUI: diff --git a/cfw/saves.go b/cfw/saves.go index 4b1d79c2..3f2afd0d 100644 --- a/cfw/saves.go +++ b/cfw/saves.go @@ -2,6 +2,7 @@ package cfw import ( "grout/cfw/allium" + "grout/cfw/arkos" "grout/cfw/batocera" "grout/cfw/knulli" "grout/cfw/koriki" @@ -28,6 +29,8 @@ func EmulatorFolderMap(c CFW) map[string][]string { return spruce.SaveDirectories case ROCKNIX: return rocknix.Platforms // ROCKNIX stores saves alongside ROMs + case ArkOS: + return arkos.Platforms // ArkOS stores saves alongside ROMs case Allium: return allium.SaveDirectories case Onion: diff --git a/docs/_includes/cfw-links.md b/docs/_includes/cfw-links.md index 1fbdf27a..cc6301f4 100644 --- a/docs/_includes/cfw-links.md +++ b/docs/_includes/cfw-links.md @@ -1,4 +1,6 @@ [allium]: https://github.com/goweiwen/Allium +[arkos]: https://github.com/christianhaitian/arkos +[darkos]: https://github.com/christianhaitian/dArkOS [batocera]: https://batocera.org [knulli]: https://knulli.org [koriki]: https://github.com/Rparadise-Team/Koriki diff --git a/docs/getting-started/install-arkos.md b/docs/getting-started/install-arkos.md new file mode 100644 index 00000000..77592554 --- /dev/null +++ b/docs/getting-started/install-arkos.md @@ -0,0 +1,45 @@ +# Installation Guide for ArkOS / dArkOS + +This guide will help you install Grout on devices running [ArkOS][arkos] or [dArkOS][darkos]. + +## Tested Devices + +Grout has been tested on the following devices: + +| Manufacturer | Device | CFW | +|--------------|--------|-----| +| | | | + +_Please help verify compatibility on other devices by reporting your results!_ + +## Prerequisites + +- Device with ArkOS or dArkOS installed +- Device connected to a Wi-Fi network + +## Installation Steps + +1. Download the latest Grout release for ArkOS from the [releases page](https://github.com/rommapp/grout/releases/latest). +2. Unzip the downloaded archive. +3. Copy the `Grout` folder and `Grout.sh` into `/storage/roms/ports/` on your device. +4. From the EmulationStation main menu, press `Start`, navigate to `Game Settings`, and select `Update Gamelist`. +5. Launch Grout from the `Ports` menu and enjoy! + +## Update + +### In-App update (Recommended) + +Grout has a built-in update mechanism. To update Grout, launch the application and navigate to the `Settings` menu. From there, +select `Check for Updates`. If a new version is available, follow the on-screen prompts to download and install the update. + +### Manual update + +To update Grout, simply download the latest release and replace the existing `Grout` folder and `Grout.sh` in `/storage/roms/ports/`. If you +have made any custom configurations, ensure to back them up before replacing the folder. Be sure to keep the `config.json` +file if you do not want to authenticate again, and configure platforms folder mappings again. + +## Next Steps + +After installation is complete, check out the [User Guide](../usage/guide.md) to learn how to use Grout. + +--8<-- "docs/_includes/cfw-links.md" diff --git a/docs/platforms/arkos.md b/docs/platforms/arkos.md new file mode 100644 index 00000000..e934953d --- /dev/null +++ b/docs/platforms/arkos.md @@ -0,0 +1,93 @@ +# ArkOS + +This page covers both [ArkOS][arkos] and [dArkOS][darkos], which share the same Grout build. + +## Platform Mappings + +This table shows the mappings of RomM Fs Slug to ArkOS's platform folders. + +| Platform Name | RomM Fs Slug | Folder(s) | +|-------------------------------|----------------------------|-----------------------------| +| 3DO Interactive Multiplayer | 3do | 3do | +| Amiga | amiga | amiga, amigacd32 | +| Amstrad CPC | acpc | amstradcpc | +| Arcade | arcade | arcade, mame, fbneo, neogeo | +| Arduboy | arduboy | arduboy | +| Atari 2600 | atari2600 | atari2600 | +| Atari 5200 | atari5200 | atari5200 | +| Atari 7800 | atari7800 | atari7800 | +| Atari 800 | atari800 | atari800 | +| Atari Jaguar | jaguar | atarijaguar | +| Atari Lynx | lynx | atarilynx | +| Atari ST/STE | atari-st | atarist | +| Cave Story | cave-story | *(none)* | +| ColecoVision | colecovision | coleco | +| Commodore 128 | c128 | c128 | +| Commodore 16 | c16 | c16 | +| Commodore C64/128/MAX | c64 | c64 | +| Commodore PET | cpet | pet | +| Commodore VIC-20 | vic-20 | *(none)* | +| Commodore VIC-20 | vic20 | vic20 | +| DOS | dos | pc | +| Dreamcast | dc | dreamcast | +| Fairchild Channel F | fairchild-channel-f | channelf | +| Family Computer | famicom | famicom | +| Family Computer Disk System | fds | fds | +| Galaksija | galaksija | *(none)* | +| Game & Watch | g-and-w | gameandwatch | +| Game Boy | gb | gb | +| Game Boy Advance | gba | gba | +| Game Boy Color | gbc | gbc | +| Intellivision | intellivision | intellivision | +| J2ME | j2me | j2me | +| Mega Duck/Cougar Boy | mega-duck-slash-cougar-boy | megaduck | +| MSX | msx | msx, msx2 | +| Neo Geo AES | neogeoaes | neogeo | +| Neo Geo CD | neo-geo-cd | neocd | +| Neo Geo MVS | neogeomvs | neogeo | +| Neo Geo Pocket | neo-geo-pocket | ngp | +| Neo Geo Pocket Color | neo-geo-pocket-color | ngpc | +| Nintendo 3DS | 3ds | 3ds | +| Nintendo 64 | n64 | n64 | +| Nintendo DS | nds | nds, ndsiware | +| Nintendo Entertainment System | nes | nes | +| Nintendo GameCube | ngc | gamecube | +| Odyssey | odyssey | odyssey | +| OpenBOR | openbor | openbor | +| PC Engine SuperGrafx | supergrafx | sgfx | +| PC-8000 | pc-8000 | pc88 | +| PC-9800 Series | pc-9800-series | pc98 | +| PC-FX | pc-fx | pcfx | +| Philips CD-i | philips-cd-i | cdi | +| Philips Videopac G7000 | videopac | videopac | +| PICO-8 | pico | pico-8 | +| PICO-8 | pico-8 | pico-8 | +| PlayStation | psx | psx | +| PlayStation 2 | ps2 | ps2 | +| PlayStation 3 | ps3 | ps3 | +| PlayStation Portable | psp | psp | +| Pokemon Mini | pokemon-mini | pokemini | +| Sega 32X | sega32 | sega32x | +| Sega CD | segacd | segacd | +| Sega Game Gear | gamegear | gamegear | +| Sega Genesis | genesis | megadrive | +| Sega Master System | sms | mastersystem | +| Sega Saturn | saturn | saturn | +| SG-1000 | sg1000 | sg-1000 | +| Sharp X1 | x1 | x1 | +| Sharp X68000 | sharp-x68000 | x68000 | +| Super Famicom | sfam | snes | +| Super Nintendo | snes | snes | +| Supervision | supervision | supervision | +| TIC-80 | tic-80 | tic-80 | +| TurboGrafx-16 | tg16 | pcengine, tg16, tg16cd | +| TurboGrafx-CD | turbografx-cd | pcenginecd | +| Vectrex | vectrex | vectrex | +| Virtual Boy | virtualboy | virtualboy | +| Wii | wii | wii, wiiware | +| Wii U | wiiu | wiiu | +| Windows | windows | windows | +| WonderSwan | wonderswan | wonderswan | +| WonderSwan Color | wonderswan-color | wonderswancolor | +| ZX Spectrum | zxs | zxspectrum | +| ZX81 | zx81 | zx81 | \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 8377774f..68f2d1be 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -67,6 +67,7 @@ nav: - Quick Start: - getting-started/index.md - Allium: getting-started/install-allium.md + - ArkOS / dArkOS: getting-started/install-arkos.md - Batocera: getting-started/install-batocera.md - Knulli: getting-started/install-knulli.md - MinUI: getting-started/install-minui.md @@ -83,6 +84,7 @@ nav: - Save Sync: usage/save-sync.md - CFW Specific Info: - Allium: platforms/allium.md + - ArkOS / dArkOS: platforms/arkos.md - Batocera: platforms/BATOCERA.md - Knulli: platforms/knulli.md - Koriki: platforms/koriki.md diff --git a/scripts/ArkOS/Grout.sh b/scripts/ArkOS/Grout.sh new file mode 100644 index 00000000..ad72946b --- /dev/null +++ b/scripts/ArkOS/Grout.sh @@ -0,0 +1,23 @@ +#!/bin/bash +CUR_DIR="$(dirname "$0")" +FLAG_FILE="./es_restart_request" +cd "$CUR_DIR/Grout" || exit 1 + +# Apply pending update +if [ -d "../.update" ]; then + cp -rf ../.update/* .. + rm -rf ../.update +fi + +export CFW=ARKOS +export LD_LIBRARY_PATH="$CUR_DIR/Grout/lib:$LD_LIBRARY_PATH" + +./grout + +if [ -f "$FLAG_FILE" ]; then + rm -f "$FLAG_FILE" + killall emulationstation + nohup bash -c "sleep 3 && batocera-es-swissknife --restart" >/dev/null 2>&1 & +fi + +exit 0 diff --git a/taskfiles/package.yml b/taskfiles/package.yml index 9007c443..6245be87 100644 --- a/taskfiles/package.yml +++ b/taskfiles/package.yml @@ -4,9 +4,9 @@ tasks: all: desc: Package for all platforms - deps: [ next, muos, knulli, spruce, rocknix, trimui, allium, onion, koriki, minui, batocera, batocera-x86, batocera-amd64 ] + deps: [ next, muos, knulli, spruce, rocknix, arkos, trimui, allium, onion, koriki, minui, batocera, batocera-x86, batocera-amd64 ] cmds: - - echo "Packaging complete (14 platforms)" + - echo "Packaging complete (15 platforms)" silent: true next: @@ -85,6 +85,16 @@ tasks: - chmod a+x dist/Koriki/App/Grout/launch.sh dist/Koriki/.simplemenu/apps/Grout.sh silent: true + arkos: + cmds: + - rm -rf dist/ArkOS + - mkdir -p dist/ArkOS/Grout/lib + - cp scripts/ArkOS/Grout.sh dist/ArkOS/ + - cp build64/grout scripts/ROCKNIX/logo.png README.md LICENSE dist/ArkOS/Grout/ + - cp -R build64/lib/* dist/ArkOS/Grout/lib/ + - chmod a+x dist/ArkOS/Grout/grout dist/ArkOS/Grout.sh + silent: true + rocknix: cmds: - rm -rf dist/ROCKNIX diff --git a/ui/general_settings.go b/ui/general_settings.go index a684f588..eb119787 100644 --- a/ui/general_settings.go +++ b/ui/general_settings.go @@ -66,7 +66,7 @@ func (s *GeneralSettingsScreen) Draw(input GeneralSettingsInput) (GeneralSetting func (s *GeneralSettingsScreen) buildMenuItems(config *internal.Config) []gaba.ItemWithOptions { c := cfw.GetCFW() isMuOS := c == cfw.MuOS - isESBasedOS := c == cfw.Knulli || c == cfw.ROCKNIX + isESBasedOS := c.IsBasedOnEmulationStation() showArtKind := atomic.Bool{} showArtKind.Store(config.DownloadArt) displayDownloadArtPreview := atomic.Bool{}