kar-recomp
kar-recomp is a port of Kirby Air Riders for Nintendo Switch.
- Type: PC port
- Game: Kirby Air Riders
- Runs on Windows and Linux
- By gooner-team
- Latest release v0.2.5, 2026-12-01
- Source: https://gitlab.com/gooner-team/kar-recomp
README
kar-recomp
Static recompilation of Kirby Air Riders (Nintendo Switch 2, SOL-AVES 0.28.1 / Aurora renderer, Title ID 040077201BE50000, v1.3.3 / v458752) to native x86-64 Linux and Windows PC executables with Vulkan 1.3 rendering, AMD FSR 1 / FSR 3.1-4 / DLSS upscaling, and SDL3 audio/input.
Repository: https://gitlab.com/gooner-team/kar-recomp
RecompLauncher: recomplauncher.com/game/kar-recomp
License: MIT (see LICENSE and LEGAL.md).
Legal Notice: This repository contains zero copyrighted game assets, executable code, shaders, keys, decryption tools, screenshots, or generated C/SPIR-V derived from the game. You must supply your own legally obtained, already-decrypted dump of the game to extract shaders, lift AArch64 binaries, and build a local binary. See LEGAL.md for full details.
Architecture & Highlights
kar-recomp is an ahead-of-time static recompilation (no CPU interpreter/JIT, no GPU emulation below NVN2):
- AArch64 -> C Static Lifter (
recomp/)- Lifts all 3 game NSO modules (
main,effect_script,sdk— 269,346 functions, 0 unsupported instructions) directly into x86-64-v3 C translation units.
- Lifts all 3 game NSO modules (
- Horizon OS / NintendoSDK 20.5.26 HLE Runtime (
runtime/sdk/)- Switch 2 OS, memory, threads, persistent save transactions (
nn::fs::CommitSaveData,KAR_APPLICATION_ID,ShowUserSelector),nn::hid,nn::oe,nn::ro(runtime NRO modules),nn::fs(.nup/ loose RomFS),nn::codec(libvpx VP9 video + libopus single-stream and multi-stream Opus decoders),nn::audio(AudioOut+OutputStreamvia SDL3 with 5.1-to-stereo fold-down), and POSIXclock_gettime/gettimeofdayhooks.
- Switch 2 OS, memory, threads, persistent save transactions (
- Offline SM86 SASS -> GLSL -> SPIR-V Translator (
sm86/,tools/shaders/)- Extracts all 19,711 unique SM86 shader stages from SOL-AVES
.ndsrandassets.cat(PARC/PDAT/PMAP) archives viatools/shaders/extract_kar.py. - Translates Ampere SM86 instructions including Vulkan 1.2 descriptor-indexed bindless texture/sampler access (
set = 2),LDC.IS,MUFU.F16,F2FP.MERGE_C,HMUL2,HFMA2,F2F,BREV,ATOMS,ULEAcarry-out, andCSMTEST. - Achieves 19,624 / 19,711 valid SPIR-V (99.6% total / 99.94% of VS+PS+CS) verified with
glslc --target-env=vulkan1.3andspirv-val --target-env vulkan1.3.
- Extracts all 19,711 unique SM86 shader stages from SOL-AVES
- NVN2 -> Vulkan 1.3 Backend & Zero-OOM Shader Prewarm (
runtime/gfx/)- Native Vulkan 1.2 global bindless descriptor set (
set = 2: 32,768 texture slots x 9 view types, 4,096 samplers, 4,096 shadow samplers, metadata SSBO forTXQ.B), per-stageNVNprogrambinding (stage_prog[8]), 7-entry NVN2 computec[0]resource tables, and Graphics Pipeline Library (GPL) fast linking. - Chunked Zero-OOM Shader Prewarm (
--prewarm-kar): offline precompilation of 27,830+ shader stages (pipeline-cache.bin+pipeline-unions.bin) with bounded RAM usage, eliminating mid-gameplay shader compilation stutter. - Native SOL-AVES Resolution Scaling & AMD FSR 4.1.2 Lite: supports 540p–2160p tiers (including crisp 720p 3D + native 1080p UI scaling without cropping) and live upscaler toggling from the in-game menu (
F1/Esc). - Procedural Vector UI Font: optional crisp TrueType font generation (
kar-ui-font.ttf) for the in-game overlay/menu. - Tested on AMD Radeon 880M (RADV, Mesa 26.3.x, Vulkan 1.4) at 720p/1080p/1440p with 0 Vulkan validation errors.
- Native Vulkan 1.2 global bindless descriptor set (
Building from Your Own Game Dump
Prerequisites
- Linux x86-64 with Vulkan 1.3+ GPU driver (Mesa RADV / NVIDIA)
clang,ninja,uv(Python 3.12+),glslc,spirv-val- System libraries:
SDL3,libopus,libvpx,zstd,vulkan-headers
Steps
-
(Optional, recommended) Build the native Rust PyO3 accelerators (
rust/kar-sm86&rust/kar-recomp, abi3 Python 3.12+):make rustkar_sm86: accelerates 128-bit SM86 SASS decoding by ~246x and full SM86 → GLSL translation (including structured control flow & BLAKE2b oracle verification) by ~7.2x with 0/400 byte-for-byte mismatches.kar_recomp: accelerates AArch64 local register allocation and NZCV flag dataflow/rewriting by ~1.7x end-to-end with 0/3,000 byte-for-byte mismatches.- Pure Python remains available as an automatic fallback (or force it via
KAR_NO_RUST=1).
-
Place your legally dumped game archive and decrypted ExeFS (
main,effect_script,sdk) undergame/(gitignored):game/romfs(symlink or directory pointing to your game.nup/ RomFS)game/exefs/{main,effect_script,sdk}
-
Extract shaders and translate SM86 -> SPIR-V offline:
uv run tools/shaders/extract_kar.py --romfs game/romfs --out build/shaders uv run tools/shaders/translate.py --shaders build/shaders --out build/spirv --progress -
Lift AArch64 modules and build
build/kar:make generated make build -
(Recommended) Prewarm Vulkan shader pipelines once offline:
KAR_GPU=vulkan KAR_SPIRV=build/spirv ./build/kar --prewarm-kar -
Run verification suites:
./build/kar --selftest ./build/kar --probe-gfx-abi ./build/kar --probe-cfg KAR_VK_VALIDATION=1 ./build/kar --probe-vkexec make check -
Play:
KAR_GPU=vulkan KAR_LANG=en-US KAR_SPIRV=build/spirv ./build/kar --profile build/profile --play
Settings are stored in kar.ini beside the binary (with automatic backward compatibility for legacy mkw.ini and MKW_* environment variables), and logs are written to logs/kar.log.
DMCA & Repository Hygiene
Before making any commit, enable the bundled pre-commit hook and run make check:
git config core.hooksPath tools/git
make check
This automatically blocks any accidental commit of game dumps, console binaries, keys, .spv shaders, screenshots, lifted game-derived C files, personal paths, or tokens. The same checks are enforced in .gitlab-ci.yml.
Credits & Upstream MIT Attribution
kar-recomp adapts and extends MIT-licensed work from:
adriadam10/mkw-recomp(MIT, LICENSE.mkw-recomp)valentderah/totk-pc-recomp(MIT, recomp/LICENSE.totk-pc-recomp, runtime/LICENSE.totk-pc-recomp)0xD0GF00D/DocumentSASS&reoLantern/nvsass-disassembler(MIT, sm86/spec/LICENSE.DocumentSASS, sm86/decode/LICENSE.nvsass-disassembler)