mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
170 lines
10 KiB
Markdown
170 lines
10 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
|
||
|
||
`app/src/main/assets/recomps/catalog.json` is bundled. `RecompCatalog.load` prefers
|
||
`Droid-Deck/DroidDeck-Components/main/recomps.json` once that file exists, so the list can change
|
||
without an app release. Schema 1 (an app refuses a newer schema and uses the bundled copy):
|
||
|
||
```json
|
||
{
|
||
"id": "devilutionx", // [a-z0-9-], also the install's recomp-id
|
||
"name": "DevilutionX", "game": "Diablo", "origin": "PC", "type": "recomp|port|engine",
|
||
"repo": "diasurgical/DevilutionX", "license": "...", "art": "https://...",
|
||
"prerelease": false,
|
||
"release": { "tag": "1.5.5", "published": "..." }, // written by tools/recomps/pin_catalog.py
|
||
"builds": {
|
||
"linux-arm64": { "asset": "<regex>", "entry": "devilutionx", "args": ["--data-dir", "{data}"],
|
||
"file": "devilutionx-linux-aarch64.tar.xz", "sha256": "..." },
|
||
"linux-x64": { "asset": "...", "entry": "...", "workdir": "data" },
|
||
"windows-x64": { "asset": "...", "entry": "devilutionx.exe" },
|
||
"android": { "asset": "..." }
|
||
},
|
||
"data": {
|
||
"kind": "store|rom|dump|none", "label": "Diablo (GOG)",
|
||
"stores": [{ "store": "gog", "id": "1412601690" }], // Store enum names; Steam ids are appids
|
||
"probe": "DIABDAT.MPQ", // relative path that marks the data folder
|
||
"sha1": ["..."], "note": "..."
|
||
}
|
||
}
|
||
```
|
||
|
||
The build is chosen in the order linux-arm64 (native), linux-x64 (FEX), windows-x64 (Proton).
|
||
Android builds are only listed for now.
|
||
|
||
Run `tools/recomps/pin_catalog.py` (needs `gh` signed in or `GITHUB_TOKEN` set) after changing the
|
||
catalog. It pins every entry to its newest matching release and records the file names and
|
||
GitHub's sha256 digests. `--check` exits 1 when a pin is out of date, which a scheduled job in
|
||
DroidDeck-Components can use. Installs download the pinned file from
|
||
`github.com/<repo>/releases/download/`, which GitHub does not rate-limit. The releases API (60
|
||
unauthenticated calls an hour, shared by every device on one address) is used only for entries
|
||
without a pin. On a household with several devices, that budget was already spent by update
|
||
checks during testing.
|
||
|
||
## 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 once more when the result is a single archive (Zelda's zip holds a
|
||
tar.gz). 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 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. Writes `recomp-id`, `recomp-tag`, `recomp-published` and `recomp-platform` beside the
|
||
install. `RecompInstaller.installed` finds installs by those files. An update installs the
|
||
new release first and then deletes the old folder, carrying the data link over.
|
||
|
||
## Game data
|
||
|
||
`RecompData.inputs` collects the installs DroidDeck knows about:
|
||
|
||
- store installs, from their `.droiddeck-store.json` sidecar;
|
||
- Steam client libraries, from `SteamLibraryFolders.installed`, giving each game's host and
|
||
guest path;
|
||
- owned games, from `StoresState.library` and the Steam games on the Steam page.
|
||
|
||
`RecompData.resolve` returns one of these states:
|
||
|
||
| State | When | Card |
|
||
|---|---|---|
|
||
| Found | an install holds `probe` (each path part matched without case, shallowest folder up to 3 levels down) | green "Game files found (Steam)", and the guest folder |
|
||
| Incomplete | installed, but `probe` is missing | "Installed on GOG, but the needed files are missing" |
|
||
| Owned | owned, not installed | "Install game" starts the store install |
|
||
| Missing | not owned | "Store page" |
|
||
| BringYourOwn | ROM or dump | the label and the recomp's own instructions |
|
||
|
||
Found writes the guest folder to `recomp-data`. The wrapper reads it at every launch: it passes
|
||
`args` with `{data}` replaced, or, for `workdir: data` (Fallout 2 CE reads from its working
|
||
directory), `cd`s there first. Without a link it starts the program with no extra arguments, so
|
||
the recomp's own folder picker still works. AppImage installs (OpenRCT2) cannot take the
|
||
arguments, so the card shows the folder to choose in the program.
|
||
|
||
## UI
|
||
|
||
A page header, one line saying what the tab does, and filter chips with counts: All, You own
|
||
the game, Bring your own files, Installed. Cards are sorted installed first, then found, owned,
|
||
bring-your-own and the rest. Each card shows art (the project icon, or the store's 600×900
|
||
capsule), the game and kind, a build chip (green once installed), a data chip and an "Android
|
||
app too" chip. Its actions are Install, or Play / Open in Games; Update to <tag> when the catalog
|
||
pins a newer release; the store action; and Remove or Project page. The page shows two columns
|
||
from 820 dp and one below. Controller focus enters on the first card's primary button.
|
||
|
||
## Tested
|
||
|
||
- Zelda 64: Recompiled v1.2.2, linux-arm64, on the Retroid Pocket Duo: Install from the card,
|
||
Play, and it reached its own Select ROM screen natively. The top screen shows the page; the
|
||
bottom screen's rail is labelled Recomps.
|
||
- Ironwail v0.8.2 (Quake), linux-x64, on the Duo through FEX: pinned install in about 5 s, then
|
||
launch. With no Quake install linked, it asks for `-basedir`, which is the argument the
|
||
wrapper passes once Steam or GOG Quake is found.
|
||
- Pocket FIT Elite (portrait 1080×1920): the More tile and the single-column page. The first
|
||
install attempt there got 403 from the releases API (rate limit), which led to the pinned
|
||
downloads. After pinning, the install worked. Launching then 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; the card should say so (see below).
|
||
- Unit tests: `RecompsTest`, which runs the wrapper under `/bin/sh` and covers release picking
|
||
and pinning, data probing and resolution, and catalog validation, and `NavTabsTest`.
|
||
|
||
## Not done yet
|
||
|
||
- **Android APKs (Recompa).** Install the `android` build through `PackageInstaller`, verify it
|
||
against Recompa's `signer_sha256`, and hand ROMs over with their `delivery` rules. Consuming
|
||
Recompa's `index.json` needs its author's permission (the data has no licence).
|
||
- **Recomp Launcher's catalog and `recomplauncher.json`.** Xarishark offered help on the DroidDeck
|
||
Discord (2026-11-12). Two things would be worth asking for:
|
||
- permission to read `pc-catalog.json`, or a feed filtered to entries with arm64 or x86-64
|
||
Linux builds;
|
||
- support for its `inputs` / `prepare` steps, so recomps that build from the player's dump
|
||
(Unleashed, Marathon) can be set up from DroidDeck.
|
||
- **Linking your own folder.** For data copied from a PC: a folder picker that sets `recomp-data`
|
||
by hand.
|
||
- **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.
|
||
- **Steam ownership** relies on the Steam page's library or the Steam store sign-in. A game
|
||
installed by the Steam client counts as Found regardless.
|
||
- **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.
|