mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Each Linux recomp gets a play script and becomes a native non-Steam shortcut: written to the session's shortcut listing next to the Epic launcher, added to a running Steam client at once, and removed with the recomp. They also show in a Recomps chip in the Library and always start as the Linux app. Windows recomps were already added games. An APK without code for the device's CPUs (a 64-bit-only device and a 32-bit-only port) is stopped before Android's prompt, remembered as not for this device, and skipped when choosing a build. Install failures say what went wrong, name the game and stay on its page. Also finds AppImage recomps again: the scan looked one folder too high.
283 lines
18 KiB
Markdown
283 lines
18 KiB
Markdown
# Recomps
|
||
|
||
The Recomps tab (More → Recomps, key `recomps`) lists PC builds of console and PC games made
|
||
by static recompilation, decompilation or engine reimplementation. It installs the build that
|
||
runs best on the device and links the game files the player already owns from a store
|
||
DroidDeck is signed in to. It never downloads ROMs, disc images or game files.
|
||
|
||
## The ecosystem (researched 2026-11-30)
|
||
|
||
- **Recomp Launcher** (`elripalda/RecompLauncher`, GPL-3.0; Xarishark is its most active
|
||
contributor). A Tauri desktop launcher for Windows, Linux x86-64 and macOS. It has no Android
|
||
or arm64 Linux build. Its catalog `https://recomplauncher.com/pc-catalog.json` lists about 2,270
|
||
apps, each with fields such as `repo, tag, assets{windows|linux|macos}, files{sha256}, needs,
|
||
setup_steps`. It never ships game data: "Easy Setup" asks for the player's disc or folder,
|
||
then runs the recomp's own prepare step. Recomps can describe that step in a
|
||
`recomplauncher.json` in their release (schema at
|
||
`https://recomplauncher.com/schema/recomplauncher.json`). The FAQ says it is free, has no ads
|
||
and keeps usage stats opt-in. The catalog data has no stated licence, and many `needs` lines
|
||
are machine-written.
|
||
- **Recompa** (`kalasyan/recompa`, GPL-3.0). An Android hub for recomps shipped as APKs. Its
|
||
`https://recompa.app/index.json` lists about 790 ports with Android package names, signer
|
||
hashes, ABIs and game-data requirements (accepted sha1s, conversions such as v64→z64, and
|
||
where the file goes). The data has no stated licence.
|
||
- **PortMaster** (`PortsMaster/PortMaster-New`, MIT). Its `ports.json` lists about 1,500 arm64
|
||
Linux ports. 266 of them link a Steam page and about 64 a GOG page, so they can be matched to
|
||
owned games. Ports expect PortMaster's runtime (`control.txt`, gptokeyb, gl4es).
|
||
- Most recomps need a console dump: N64 ROMs (Zelda64Recomp, Starfox64Recomp, BanjoRecomp, the
|
||
Ship of Harkinian family) or Xbox 360 files (XenonRecomp: UnleashedRecomp, MarathonRecomp).
|
||
The ones that fit DroidDeck's stores are source ports and engine reimplementations whose data
|
||
is sold on Steam or GOG: OpenMW (Morrowind), DevilutionX (Diablo, GOG), OpenRCT2, Fallout 1/2
|
||
CE, Quake ports, Xash3D (Half-Life), Julius/Augustus (Caesar III), VCMI and fheroes2 (Heroes
|
||
III and II), CorsixTH and OpenLoco.
|
||
- N64Recomp projects (Zelda, Starfox, Banjo), DevilutionX, Xash3D and fheroes2 publish **arm64
|
||
Linux** builds, which run natively in DroidDeck's runtime. Most others publish x86-64 Linux,
|
||
which runs through FEX, and Windows, which runs through Proton.
|
||
|
||
## Catalog
|
||
|
||
DroidDeck keeps no catalog. `RecompCatalog` downloads three community catalogs, caches them in
|
||
`files/recomps/`, revalidates each with its ETag after 6 hours, and merges them on the device. An
|
||
earlier catalog wins every field it sets; a later one with the same GitHub repo (or id) adds builds the
|
||
entry lacks.
|
||
|
||
> Decomp Buddy also keeps copies of projects taken down by a legal notice. DroidDeck does not use
|
||
> those copies (`RecompCatalog.DECOMP_BUDDY_MIRROR = false`) until that is decided. Its catalog and
|
||
> plans are read.
|
||
|
||
1. **Decomp Buddy** (`TanookiStudios/decomp-buddy`, GPL-3.0):
|
||
- `https://tanookistudios.com/decomp-buddy/catalog.json`, about 4,900 games.
|
||
- `plans.json`, about 32 MB. `DecompBuddyPlans` reads it as a stream and keeps only the `windows`,
|
||
`linux`, `linux-arm64` and `android` targets: the release file, its tag, the program, the scanned
|
||
sha256, the Android package and the game files needed.
|
||
- Games without a `release` plan are left out.
|
||
2. **Recomp Launcher** (`https://recomplauncher.com/pc-catalog.json`):
|
||
- `assets` globs and `files` pins; `boot.start` / `start_linux` name the program.
|
||
- `setup_required` / `setup_steps` become the setup note.
|
||
- Archived, `soon`, non-GitHub, `installer` / `not-a-game` / `source` entries and Flatpak bundles are
|
||
left out.
|
||
3. **Recompa** (`https://recompa.app/index.json`): Android APKs with a package name and signing
|
||
certificate. A Recompa signer is added to a Decomp Buddy APK with the same package.
|
||
|
||
As of 2026-12-01 this gives 4,764 entries, 1,812 of them found in more than one catalog:
|
||
|
||
| Build | Entries |
|
||
|---|---|
|
||
| Linux arm64 | 214 |
|
||
| Linux x86-64 | 2,349 |
|
||
| Windows x86-64 | 4,036 |
|
||
| Android | 836 |
|
||
|
||
The two parses and the merge take about 1.3 s on a desktop JVM. 96% of builds name their release
|
||
file, so they download without the GitHub releases API.
|
||
|
||
The build is chosen in the order linux-arm64 (native), android, linux-x64 (FEX), windows-x64
|
||
(Proton).
|
||
- **Linux x86-64:** before installing, the release is checked for an arm64 twin, the same file name
|
||
with `aarch64`/`arm64` in place of `x86_64`/`amd64`/`x64` (Decomp Buddy's `armSibling` rule). The
|
||
check uses a plain request to the download URL. If the twin exists, it is installed natively instead.
|
||
- **No program named:** an AppImage, else the executable ELF closest to the project's name (Linux), or
|
||
`GameExePicker`'s best exe (Windows).
|
||
- **Download fails:** if the project's own download fails and Decomp Buddy scanned that file, it is
|
||
fetched from `files.decompbuddy.com/<sha256>/<name>`. That copy is a fallback only, because Decomp
|
||
Buddy's hosting runs on donations.
|
||
|
||
## Installing
|
||
|
||
`RecompInstaller.install`:
|
||
|
||
1. Downloads the asset, checking its sha256.
|
||
2. **Linux build:** `bsdtar` in the guest unpacks it into the app cache, keeping modes and
|
||
symlinks, and unpacks again when the result is a single archive (Zelda's zip holds a tar.gz) or
|
||
a Debian package (its `data.tar`), up to three levels. It then finds `entry` up to four folders down. An AppImage, whether downloaded
|
||
directly or found inside the archive, goes to `AppImageManager.import`. Anything else becomes
|
||
a user app (`UserApps.addPrepared`): the unpacked tree moves to
|
||
`/opt/droiddeck-apps/<id>/files`, and a `droiddeck-recomp` wrapper, which starts the program from
|
||
its own folder, becomes its entry.
|
||
`droiddeck-script-run` launches it, so `droiddeck-fex` decides between native and FEX from
|
||
the folder's ELFs, exactly as for any added Linux app. It also shows on the Desktop page.
|
||
3. **Windows build:** unpacks into `<first Games folder or the store install root>/Recomps/<id>`
|
||
and registers the exe with `AddedGames.addExe`. It then appears in the Library (Custom) and
|
||
runs through Proton.
|
||
4. **Android build:** checks the APK's package name and signing certificate against the catalog,
|
||
then installs it through `PackageInstaller` (`RecompAndroid`). The confirmation prompt comes from
|
||
the system. The install shows as Play and Remove on the card, and in the Apps tab. The installed tag
|
||
is kept in `files/recomps-android/<package>`.
|
||
5. Writes `recomp-id`, `recomp-tag`, `recomp-published`, `recomp-platform` and `recomp-repo` beside the
|
||
install. `RecompInstaller.installed` finds installs by those files. An install belongs to the entry
|
||
with its id, or else its repo, since a higher-ranked catalog can rename an entry. An update installs the
|
||
new release first and then deletes the old folder.
|
||
|
||
## In Steam and the Library
|
||
|
||
- **Linux recomps** (script apps and AppImages) are non-Steam games (`RecompShortcuts`):
|
||
- Each install gets a `play` script beside it that runs `droiddeck-script-run` or the AppImage
|
||
launcher, and the catalog's cover and icon are saved there.
|
||
- The shortcut is native (no compatibility tool) and its ID is Steam's CRC of the quoted program and
|
||
name.
|
||
- It is written to the session's shortcut listing next to the Epic launcher, so the next Steam start
|
||
has it. It is also added to a running client at once, and removed when the recomp is.
|
||
- **Windows recomps** are added games, so they are already non-Steam games.
|
||
- **Android apps** cannot be Steam shortcuts and stay in Apps.
|
||
- **Library:** Linux recomps also show in a **Recomps** chip, after Custom; it can be hidden like Custom.
|
||
Starting one from the Library always runs it as the Linux app, even when DroidDeck launches without
|
||
Steam.
|
||
|
||
## Android installs
|
||
|
||
- **CPU check:** before Android's prompt, the APK's `lib/<abi>/` folders are checked against
|
||
`Build.SUPPORTED_ABIS`. Many newer handhelds (the Pocket FIT included) run 64-bit code only, so a
|
||
port that only ships `armeabi-v7a` can never install there. Such an APK is stopped with a sentence
|
||
naming both sets of CPUs.
|
||
- **Remembered:** the package is recorded in `files/recomps-android/incompatible` (as is one Android
|
||
refuses with `NO_MATCHING_ABIS`). Install then picks another build, "Runs natively" stops counting
|
||
it, and its build row says "Not for this device".
|
||
- **Failures in words, naming the game:**
|
||
- wrong CPU;
|
||
- another copy signed by someone else;
|
||
- a newer version installed;
|
||
- not enough space;
|
||
- cancelled, blocked, or a damaged APK.
|
||
|
||
The last failure stays on the recomp's page until the next attempt.
|
||
|
||
## Game data
|
||
|
||
PC ports need the original PC game's files, which a store sells. For these entries (Decomp Buddy's "PC
|
||
(Windows)" and "IBM PC (MS-DOS)", Recomp Launcher's `pc` origin), DroidDeck works out whether the player
|
||
already has them.
|
||
|
||
**1. Which store release is the game: `RecompStoreIds`.** None of the catalogs names one.
|
||
- **IGDB slug:** Recomp Launcher gives each game's IGDB slug (`about.url`). Other ports of the same PC
|
||
game take it when the title leads to one slug (`shareIgdb`). That covers 390 of 1,104 PC entries.
|
||
- **Wikidata:** links IGDB slugs (P5794) to Steam app IDs (P1733), GOG slugs (P2725) and Epic store
|
||
slugs (P6278). It is asked in batches of 150 over SPARQL and cached in `files/recomps/store-ids.json`
|
||
for 14 days. 144 PC games get at least one store ID: 121 Steam, 90 GOG, 18 Epic.
|
||
- **GOG:** GOG's public products API (`api.gog.com/products?ids=…`, 50 per call) gives the slug of each
|
||
GOG product the player owns or installed. Kept in `gog-slugs.json`, since slugs don't change.
|
||
|
||
**2. Matching an install or owned game.**
|
||
- For a store with known IDs for the game, only the ID counts: a Steam app ID, or a GOG product's slug.
|
||
A title match is not used there, so DOOM (2016) never stands in for Doom (1993).
|
||
- Epic IDs can't be compared yet: DroidDeck keeps an Epic game's namespace and app name, not its store
|
||
slug. So Epic, and any store without IDs for the game, falls back to Decomp Buddy's title rules (from
|
||
`src/stores.js`):
|
||
- A subtitle after a colon or dash is fine.
|
||
- A leading possessive such as "Sid Meier's" is dropped.
|
||
- Only store-edition words (GOTY, Gold, Complete, Definitive, ...) may follow the title.
|
||
- Installs come from store sidecars and the Steam client libraries, internal or SD card. Owned games
|
||
come from the store libraries and the Steam page.
|
||
|
||
**3. The right files.**
|
||
- **The file:** Decomp Buddy's `expected_filename` or Recomp Launcher's `inputs[game].check.file` (112
|
||
PC entries) names a file the port needs. It is looked for as a relative path, without case, up to 4
|
||
folders into the install. The folder holding it is the one shown.
|
||
- **The version:** when Decomp Buddy gives `expected_hashes` (sha1, sha256, md5, crc32) or
|
||
`expected_size` (31 PC entries), the file must match. Hashes are kept in `hashes.json` by path, size
|
||
and modified time.
|
||
|
||
| State | Card |
|
||
|---|---|
|
||
| Found, file checked | green "Installed on Steam · files checked", and the folder |
|
||
| Found by ID, no file to check | green "Installed on Steam" |
|
||
| Found by title only | grey "Installed on Steam · matched by name" |
|
||
| Incomplete | "Installed on GOG, but DIABDAT.MPQ is missing", or "… is a different version" |
|
||
| Owned | "You own it on Steam. Install it first", with "Install game" |
|
||
| Otherwise | what the catalog says the game needs |
|
||
|
||
Console recomps are never matched, because no store sells their dumps.
|
||
|
||
## UI
|
||
|
||
The page follows the Library.
|
||
|
||
- **Header:** `ModeHeader` with the title and the count shown, search, and Filter, Sort and Display
|
||
buttons. These use the Library's `Steps` popovers, and Display is the Library's own tile size and
|
||
title/detail toggles.
|
||
- **Filter:** multi-select, each choice with its count: Installed, You own the game, Runs natively
|
||
(the build that would install is arm64 Linux or an APK), Android app, Update available, Ready without
|
||
setup ("No setup steps"). Filters in use show as removable chips under the header, with "Clear all", and the Filter
|
||
button gets a dot.
|
||
- **Build filters:** "Has a build for" Linux ARM64, Linux x86-64, Windows or Android, in their own group
|
||
of the Filter menu. Like every filter they combine with AND, so all three desktop builds ticked leaves
|
||
only projects that publish all three.
|
||
- **Sort:** Best for you (installed, then found in a store install, then owned, then native, each by
|
||
popularity), Most popular, Recently updated, Newly listed, A–Z.
|
||
- **Systems:** a row of the original systems in the current results, most entries first.
|
||
- **Grid:** box-art tiles (`ArtCard`, capsule art from the catalogs' covers), sized by `LevelCells` like
|
||
the Library. Each tile shows the name, "System · Native/Android/FEX/Proton", and corner badges for
|
||
installed, the store you own it on, and an available update.
|
||
- **Detail page** (opening a tile):
|
||
- Cover, name, game and kind, chips for how it runs and its data state.
|
||
- Actions: Install, Play or Open in Games, Update, Install game, Project page, Remove.
|
||
- "What it needs": the folder found, or the file it looks for, or the catalog's note.
|
||
- "Builds": every build as a choice. The one that would install is selected. Picking another changes
|
||
the main button to "Install <build>", or "Install <build> instead" when a different build is
|
||
installed. A picked build installs exactly as listed, with no arm64 twin swapped in.
|
||
- Switching replaces the old install, except an Android app, which Android asks the player to remove.
|
||
The last pick is kept in `files/recomps/choices.json`, so the card shows that build when two are
|
||
installed.
|
||
- "About": repo, licence, sources.
|
||
- Back returns to the grid.
|
||
- **Kept in memory** (`RecompsView`): search, filters, sort and system, so leaving the tab keeps your place.
|
||
|
||
## Tested
|
||
|
||
These device runs used the earlier hand-made list. Each recomp is still installed and launched by the
|
||
same code.
|
||
|
||
- **Retroid Pocket Duo:**
|
||
- Zelda 64: Recompiled v1.2.2 (linux-arm64) installed and reached its own Select ROM screen natively.
|
||
- Ironwail v0.8.2 (linux-x64) ran through FEX and asked for its `-basedir` (Quake's folder).
|
||
- Ship of Harkinian (Android, Recompa): the APK passed the package and signer checks, Android's
|
||
install prompt appeared, and after confirming it the card showed Play, which launched the app.
|
||
- Ports already installed were recognised.
|
||
- The top screen shows the page; the bottom screen's rail is labelled Recomps.
|
||
- **Pocket FIT Elite (portrait 1080×1920):**
|
||
- The More tile, the one-column page and installs work.
|
||
- A launch of an x86 Linux build stopped with exit 126: FEX needs the Steam Linux Runtime
|
||
(sniper), and that device had never opened Steam. This applies to every x86 Linux app in
|
||
DroidDeck.
|
||
- **Unit tests:** `RecompsTest` parses and merges sample feeds and covers pins, signed APKs, title
|
||
matching, release picking, program guessing and the wrapper (run under `/bin/sh`). `NavTabsTest`
|
||
covers the tab.
|
||
|
||
- GZDoom 4.14.2 from Decomp Buddy's `linux-arm64` plan (a `.deb` naming no program), on the Pocket FIT:
|
||
installed in about 5 s and started natively to its own "Cannot find a game IWAD" screen. With all
|
||
three catalogs the FIT loaded 4,764 entries in 6 s.
|
||
|
||
- AYN Thor:
|
||
- With all three catalogs: 4,764 entries in 11 s, 1,003 running natively.
|
||
- Sonic Mania, installed on Steam on the SD card, was matched to the Sonic Mania decomp, showing
|
||
`/mnt/droiddeck-sd/steamapps/common/Sonic Mania`.
|
||
- Zelda 64: Recompiled v1.2.2 installed from Decomp Buddy's `linux-arm64` plan in about 5 s and
|
||
reached its Select ROM screen natively.
|
||
|
||
- AYN Thor, with store IDs: both Sonic Mania ports matched the Steam install on the SD card by app ID
|
||
(via IGDB and Wikidata), not by title.
|
||
|
||
## Not done yet
|
||
|
||
- **Recompa delivery rules.** Hand a chosen ROM to an Android port the way Recompa's `delivery`
|
||
says: an in-app picker, a shared folder or an intent.
|
||
- **Recomp Launcher setup.** Run its `recomplauncher.json` `inputs` / `prepare` steps, so recomps that
|
||
build from the player's dump (Unleashed, Marathon, the `setup` entries) can be set up from DroidDeck.
|
||
Xarishark offered help on the DroidDeck Discord (2026-11-12).
|
||
- **Choosing a build.** Let the player choose another build when an entry has several (for example
|
||
the Android port instead of the FEX one).
|
||
- **Linking your own folder.** For data copied from a PC: a folder picker the card remembers.
|
||
- **Native builds the catalogs miss.** Recomp Launcher lists one Linux build per app, usually x86-64.
|
||
Several projects (Zelda64Recomp, Starfox64Recomp, BanjoRecomp, DevilutionX) also publish arm64
|
||
builds. Trying the arm64 sibling of a Linux asset first would run those natively instead of
|
||
through FEX.
|
||
- **ROM checks.** Hash a chosen ROM against `sha1` and say whether it is the right one.
|
||
- **x86 runtime hint.** A linux-x64 build needs Steam opened once so the FEX runtime (sniper) is
|
||
installed. Show that on the card, or fall back to the Windows build.
|
||
- **Epic IDs.** Epic store slugs from Wikidata could be compared once DroidDeck keeps each owned Epic
|
||
game's product slug (Epic's catalog has it as `productSlug` / page mappings).
|
||
- **Store IDs upstream.** A `stores` field on Recomp Launcher inputs (Steam app IDs, GOG product IDs)
|
||
would make Wikidata a fallback. It has been proposed but not filed yet.
|
||
- **Recomp setup steps.** Some recomps build themselves from the player's data with bundled
|
||
Python (Recompia). They need executable storage, so they must stay inside the Linux root, never
|
||
under `/media`; see the Discord thread on Recompia from 2026-11-15.
|