Files
DroidDeck/docs/development/recomps.md
T
Kurt Himebauch 3f0952fece feat(recomps): add Decomp Buddy's catalog and plans, and install arm64 twins
Decomp Buddy's catalog.json and plans.json become the first source: its
plans name the exact release file, the program in it, a scanned sha256
and the game files needed. The 32 MB plans file is read as a stream.
Store installs are matched with Decomp Buddy's title rules, and a plan's
expected file finds the folder inside the install.

Before installing an x86-64 Linux build, the release is checked for its
arm64 twin with a plain download request. When a project's own download
fails, Decomp Buddy's scanned copy is used. Debian packages unpack to
their data.tar, and installs are also matched by repo.
2026-12-01 11:13:15 -05:00

12 KiB
Raw Blame History

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.

  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.

Game data

For PC ports (Decomp Buddy's "PC (Windows)" and "IBM PC (MS-DOS)", Recomp Launcher's pc), RecompData matches the game's title against the player's installs (store sidecars and Steam client libraries) and owned games. It uses Decomp Buddy's rules:

  • A subtitle after a colon or dash is fine, so "Fallout 2: A Post Nuclear Role Playing Game" is Fallout 2.
  • A leading possessive such as "Sid Meier's" is dropped.
  • Only store-edition words (GOTY, Gold, Complete, Definitive, ...) may follow the title, so "Fallout 2" is not "Fallout".

Where a plan names the file the port needs in a folder (expected_filename, for example DIABDAT.MPQ), the folder holding that file inside the install is the one shown. An install without that file does not count.

  • Installed: "Installed on Steam" and the guest folder to point the port at.
  • Owned: "Install game".
  • Otherwise: what the catalog says the game needs. Console recomps are never matched.

UI

  • Top of the page: a header, one line saying what the tab does, a search box (name, game, origin, repo), filter chips with counts (All, Installed, You own the game, Runs natively), and a row of system chips built from the origins in the list, with the most entries first.
    • "Runs natively" means the build that would install is arm64 Linux or an Android APK.
    • Almost every entry needs the player's own game files, so that is shown on each card, not offered as a filter.
  • List: a lazy grid, two columns from 820 dp and one below, capped at 300 cards until the player searches. Cards are sorted installed first, then games installed from a store, then owned games, then the rest by download count.
  • Each card:
    • The catalog's art, the game and its origin.
    • Chips for the build (green once installed), the data, "Android app too", "Needs setup first", and "via Recomp Launcher" / "via Recompa".
    • Actions: Install, or Play / Open in Games; Update to when a feed names a newer release; Install game; and Remove or Project page.
  • Credits: a line at the end of the page names both catalogs.
  • Focus: controller focus enters on the first card's primary button.

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.

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.
  • Steam ownership relies on the Steam page's library or the Steam store sign-in. A game installed by the Steam client counts as installed regardless. Title matching can miss renamed editions.
  • 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.