THPS 2X Recompiled: Linux handheld and Android ports
THPS 2X Recompiled is a port of Tony Hawk's Pro Skater 2 for Android and Linux handhelds with an OpenGL ES renderer.
- Type: PC port
- Game: Tony Hawk's Pro Skater 2
- Runs on Windows and Android
- By GASQBDUV
- Latest release v1.0.0-android-rotate, 2026-11-14
- Source: https://github.com/GASQBDUV/thps2x-handheld-ports
README
THPS 2X Recompiled: Linux handheld and Android ports
Patches and glue that run THPS 2X Recompiled on two handhelds with an OpenGL ES renderer instead of Vulkan:
- Anbernic RG DS (RK3568, Mali-G52 on Mesa/Panfrost, GLES 3.1, no Vulkan), running BananaOS: a PortMaster-style launcher.
- Anbernic RG Rotate (Unisoc T618, Mali-G52 with ARM's driver, GLES 3.2), running Android 14: an APK.
Both run the game at about 60 fps on the Rotate and 42-49 fps in levels on the RG DS.
Prebuilt packages are in the releases. No game data is included anywhere (no ISO, ROM or game files): you need your
own copy of the game, with its files extracted from your own disc into the gamedata folder.
The recompiled game code itself is generated from your own copy by the upstream project's tooling and is not in this repository.
What is in here
| Path | What |
|---|---|
patches/xrv-gles-android.patch | against xboxrecomp-vulkan (MIT) at d3f9e8c: the OpenGL ES renderer src/nv2a_gles (its own queue and GL thread, staged vertex data, UBO rings), Linux/Bionic fixes in win32_compat.c, the 1:1 aspect in kernel_xbox.c |
patches/port-linux-android.patch | against THPS2X-Recompiled (GPL-3.0) at 9ca1efb: host_linux.c, the 1:1 aspect, the FXAA-refusal loop in the options screen |
linux/, arm64/ | CMake for the glibc/aarch64 build (the RG DS) |
android/ | CMake for libmain.so, the manifest and a small SDLActivity subclass for the APK |
scripts/portmaster-THPS2X.sh | launcher for PortMaster-style systems |
scripts/build-android.sh | NDK + APK build without Gradle |
Build
git clone https://github.com/almost-drowned-rat/THPS2X-Recompiled repo && git -C repo checkout 9ca1efb && git -C repo apply ../patches/port-linux-android.patch
git clone https://github.com/almost-drowned-rat/xboxrecomp-vulkan xrv && git -C xrv checkout d3f9e8c && git -C xrv apply ../patches/xrv-gles-android.patch
# generate the recompiled C from your own game into private/gen with the upstream tooling
# put SDL 3.2.10 source in sdl3src/SDL3-3.2.10 (Android build only)
ANDROID_NDK=/path/to/ndk-r27c ANDROID_SDK=/path/to/sdk scripts/build-android.sh
adb install -r thps2x-android.apk
Copy your own extracted game files to /sdcard/Android/data/org.thps2x.port/files/gamedata/. Extra settings go in
files/thps2x.env (NAME=value, one per line); saves and logs are in files/save and files/data.
Notes on the OpenGL ES renderer
- ARM's driver rejects what Mesa tolerates:
GL_BGRAas a client format for RGBA8 textures andGL_BGRAas a vertex attribute size. Textures are uploaded as RGBA with a red/blue sampler swizzle and vertex colours are swapped when copied into the ring. glBufferSubDatainto a uniform buffer the GPU still reads made ARM's driver copy the whole buffer (about 1 ms per draw): writes use an unsynchronizedglMapBufferRangeinstead (RECOMP_GL_UBO_MAP=0to compare).- On Panfrost the GL thread is the bottleneck, so draws are staged ahead of it and frames are skipped when it falls two frames
behind, so the game's logic keeps its speed (
RECOMP_GL_FRAMESKIP=0turns that off). - Aspect ratio 1:1 for a square screen (
THPS_WIDESCREEN=1:1, or ASPECT RATIO in RECOMP OPTIONS): the game draws its gameplay for that aspect, menus and movies stay 4:3.RECOMP_GL_FILL=0..1stretches the picture instead. - Debug aids:
RECOMP_GL_PROFILE=1|2,RECOMP_GL_ERR,RECOMP_GL_TRACE,RECOMP_GL_EXT,RECOMP_SHOT_DIRplus a filethps-shot-reqthere for a framebuffer dump.
Licence
GPL-3.0 for the glue (it links the GPL-3.0 port); the toolkit patch stays under the toolkit's MIT licence. See LICENSE.
Not affiliated with the upstream projects or the game's publisher.