Files
DroidDeck/docs/development/anti-cheat.md
T
maxjivi05 138a018f10 Run games with anti-cheat files on an x86-64 DroidDeck-Proton under FEX
The Proton launchers look for Easy Anti-Cheat or BattlEye bridge files in
the game folder and, when an x86-64 DroidDeck-Proton and the matching Proton
runtime are installed, hand the launch to that Proton under FEX with the
game's own prefix. Picking the x86-64 tool directly also runs it under FEX.
DROIDDECK_ANTICHEAT=off keeps a game on ARM64.
2026-12-02 21:02:26 -05:00

34 lines
2.1 KiB
Markdown

# Easy Anti-Cheat and BattlEye
On a Steam Deck, Proton loads Valve's anti-cheat runtimes (Proton EasyAntiCheat Runtime, app 1826330, and
Proton BattlEye Runtime, app 1161040). Their bridge libraries are x86 only, so the ARM64 DroidDeck-Proton
cannot load them. Games that need them run an x86-64 DroidDeck-Proton under FEX instead.
## Routing
The Proton launchers (`steam-compatibility`: the built-in DroidDeck-Proton launcher and the wrapper put around
every tool in `compatibilitytools.d`) check each `run` and `waitforexitandrun` before any ARM64 setup:
- **Condition.** The game folder (`STEAM_COMPAT_INSTALL_PATH`, three levels deep) holds one of
`EasyAntiCheat/Settings.json`, `easyanticheat_x64.so`, `BEClient_x64.so` or `BEService_x64.exe`. No
title, app ID or device list is involved.
- **Tool.** The newest `compatibilitytools.d/DroidDeck-Proton*` whose layout is x86-64
(`files/lib/wine/x86_64-unix`, no `files/bin-arm64`).
- **Runtime.** `PROTON_EAC_RUNTIME` or `PROTON_BATTLEYE_RUNTIME` when it already points at a folder with the
bridge libraries, otherwise the runtime's folder in any Steam library.
- **Launch.** `droiddeck-fex proton <tool>/proton <verb> <args>`: FEX with the Steam Linux Runtime rootfs,
keeping the game's own `STEAM_COMPAT_DATA_PATH` prefix.
Without the x86-64 tool or the runtime files the launch stays on ARM64 and the launcher logs why.
`DROIDDECK_ANTICHEAT=off` in the game's launch options keeps it on ARM64. Picking the x86-64 tool for a
game in Steam always runs it under FEX.
## Why the x86-64 build needs its own Wine patches
Android kernels use 39-bit user address spaces. Easy Anti-Cheat's launcher maps fixed memory at
`0x7001_0000_0000`, which FEX serves from emulated guest pages (`tools/fex/patches/0026`). The x86-64 Wine
in DroidDeck-Proton carries `ntdll-fixed-allocations-above-host-address-limit.patch` (fixed mappings above
the host limit go to the emulator) and `ntdll-keep-libc-in-native-syscall-dispatch-range.patch` (the
re-armed syscall user dispatch range keeps libc native). Stock x86-64 Proton stops after "Hack native
syscalls" on the same game.