kar-ns2-recomp

kar-ns2-recomp is a native Windows PC port of Kirby Air Riders made by static recompilation with NVN-HLE rendering on Vulkan.

README

kar-ns2-recomp icon: a golden star with three smaller stars trailing it

kar-ns2-recomp

A native Windows PC port of Kirby Air Riders (Nintendo Switch 2), made by static recompilation: the game's code is translated into a regular Windows program on your own PC, and runs on a small runtime that stands in for the console's system software. The picture is drawn by NVN-HLE, which replays the game's graphics calls on Vulkan. It is not an emulator.

No game files are included. You need your own legally dumped copy of the game with update 1.3.3. Everything that reads the game happens on your PC, and nothing is written into your dump. Not affiliated with or endorsed by Nintendo or HAL Laboratory. Kirby, Kirby Air Riders, Nintendo and Nintendo Switch 2 are trademarks of Nintendo.

Status

The game plays: from the opening movie and the title screen into menus and races, at 60 fps.

Picturedrawn by NVN-HLE on Vulkan; the game's own DLSS runs on real NVIDIA DLSS (AMD FSR 3.1 on any GPU as an option)
Outputthe game's 1440p by default; 4K output and a render scale in the F1 menu
Moviesthe opening movie plays
Soundmusic and effects
Inputgamepads out of the box, one Switch player per gamepad (local multiplayer), rumble per player; keyboard bindings on the F1 menu
Savesyes
Windowwindowed or borderless fullscreen (F11), any size
OverlayF1 settings menu (English or Chinese), F10 performance overlay, F12 screenshots

Testing so far has been narrow, so expect rough edges (AMD and Intel GPUs are untried). Frame rates above 60 are experimental. See docs/TROUBLESHOOTING.md, and open an issue with the logs if something goes wrong.

Play it

  1. Download kar-ns2-recomp-<version>-windows-x64.zip from Releases and extract it into a new folder.
  2. Run kar-launcher.exe, pick your dump (the .nup, or the update's ExeFS and RomFS folders), keep Download NVIDIA DLSS ticked if you have an NVIDIA RTX card, and press Build.
  3. When it says your game is ready, press Play.

Nothing needs to be installed. The first build recompiles the game's code on your PC and takes about 15 to 30 minutes depending on the processor: it downloads the compiler once (Zig, about 100 MB, from ziglang.org) and NVIDIA Streamline if you ticked it (276 MB). The very first start then prepares the game's graphics pipelines and plays the opening movie; later starts go straight to the title.

What you need: Windows 10 or 11 (x64), a graphics card with Vulkan 1.3 (NVIDIA RTX for DLSS), 16 GB of RAM (32 GB recommended), about 30 GB of free disk space, and your dump of Kirby Air Riders with update 1.3.3. The update package alone holds the whole 1.3.3 data set.

Keys: F1 menu · F10 performance overlay · F11 fullscreen · F12 screenshot.

Build from source

For developers: the same setup, with the runtime built from this checkout instead of the release's prebuilt one.

toolversionused for
Visual Studio Build Tools (MSVC + Windows SDK)2022+headers and import libraries for clang-cl
LLVM22+clang-cl, llvm-lib
CMake + Ninja3.25+the runtime
Python3.12 with lz4, capstone, zstandardthe recompiler and the dump reader
PowerShell7+ (pwsh)the build scripts

Put them on PATH, or set XC2_ENV to a PowerShell script that does (docs/BUILD.md). Then:

python tools\setup\kar_setup.py --repo . --install work\play --nup "D:\dumps\Kirby Air Riders.nup"
tools\run\play-kar.cmd

The setup downloads the prebuilt NVN-HLE library from the release (set KAR_NVNHLE_DIST to use one you built), builds the runtime, reads the dump, recompiles and links the game (kar/build/133/boot-n2den/kar.exe). With folders instead of a .nup: --exefs <dir> --romfs <dir>. main is about ten times the size of the Xenoblade games' main, so the first compile is long and memory-hungry: limit it with --jobs N. The launcher (launcher/, npm install then npm run tauri build -- --no-bundle) runs the same engine. The release package is made with tools/build/build-release.ps1 and tools/build/make-package-kar.ps1, and checked by tools/build/verify-package-kar.ps1.

kar/Kirby's game folder: lifter profile, hook site lists, supported build, icon
xc2/src/xc2_boot.cppthe boot program (--game kar)
third_party/fefw-recomp/the runtime: system services, input, audio, movies, the overlay, the NVN-HLE adapter
tools/setup/kar_setup.pythe setup engine (the launcher runs it)
launcher/the Tauri launcher

This repository started as an import of xc2-ns2-recomp with its full history, by way of the Xenoblade Chronicles: Definitive Edition Switch 2 Edition port, which shares its system modules with that project. Where a document names Xenoblade, it is the base project's record. The base project's README is kept as README.xc2.md; the Kirby bring-up is in docs/KAR-BOOT.md and docs/KAR-LIFT-CHECK.md.

Credits

  • NVN-HLE, the renderer: duck912 and the Eglantine Community, ported to n2den, and from there into this project. Its source for each release is attached to the release (n2den-nvnhle-src-*.zip).
  • xc2-ns2-recomp (weile10000 and contributors): the base this port is built on, including the settings menu and the launcher.
  • fefw-recomp and nxrecomp: the runtime and the recompiler.
  • n2den and Eden, and everyone before them: Ryujinx, Sudachi, Citron, Torzu, Suyu and Ryubing.
  • The launcher's design follows Longshot's.
  • nxnative and everyone those projects credit; see README.xc2.md and THIRD_PARTY_NOTICES.md.

License: GPL-3.0-or-later (matching the projects it builds on).