SwitchRecomp
Copyright 2026 MZ Labs
Discord: https://discord.gg/gdRaXmBTY

SwitchRecomp is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License version 3 (LICENSE.txt), with
the additional terms below.

ADDITIONAL TERMS (section 7 of the GNU AGPL v3)
Under section 7(b), anyone who conveys SwitchRecomp, a modified version, a fork
or a work based on it has to preserve these legal notices and author
attributions:

1. The SwitchRECOMP startup screen. The recompiler and every game built with
   SwitchRecomp show it when they start: the SwitchRECOMP logo and the notice
   "SwitchRECOMP (c) 2026 MZ Labs" on a black screen. It has to stay, shown
   at startup, with the logo and the notice unchanged and readable. It is the
   Appropriate Legal Notices of section 5(d) for these programs' interfaces.
2. This NOTICE file and the copyright line above.
3. The credit "SwitchRecomp by MZ Labs" in a place users can see (README,
   credits, about box, release page or video description).

This license covers the SwitchRecomp code (the recompiler, the runtime, the GUI
and the scripts). It does not cover the bundled third-party components, which
keep their own licenses (listed in README.txt), and it does not cover any game.
Games, keys and firmware are not included and remain the property of their
owners.

Some fixes came from the SwitchRecomp fork by Mythrax-ZS under the Apache
License 2.0. Those parts keep that license's notice and are distributed here
as part of the AGPL v3 work.

Background music decoders: dr_wav/dr_mp3 by David Reid and stb_vorbis by
Sean Barrett and contributors. Their licenses are retained in tool/audio_decode/.
Windows tool build libraries: SDL2, SDL2_image, SDL2_ttf (including FreeType and
HarfBuzz); copyright/license notices are retained under tool/deps/.

The launcher implements the NUP v1 format specified by a55uka (MIT, copyright
2026 a55uka, https://github.com/a55uka/nup). SPIN0ZAi's MIT-licensed NUP Extractor
(https://github.com/SPIN0ZAi/nup-extractor) was a second reference for the format.
For Python 3.12 and 3.13, the launcher may download backports.zstd from PyPI.
The verified wheel includes the Python Software Foundation and Zstandard license
notices, which the launcher retains in its local dependency cache.

Switch 2 graphics: the task/mesh pipeline emulation (runtime/gpu_gl.c mesh_run, the ISBE handling in sm86.c and
shader.c) follows the stage buffer layout and register fields documented by the Eden Emulator Project and its
Eglantine nx2 branch (GPL-3.0-or-later, https://git.eden-emu.dev/eden-emu/eden). Thanks to both projects. Several
shader fixes were checked against their behavior too. Field positions of Ampere instructions come from Mesa's NAK
encoder (MIT).

The Ampere instructions added in fix36 (F2IP, IMAD.WIDE, MUFU.TANH, LDGSTS, TXD, BRA.U, textures with the handle in
a uniform register, TLD4 with per-tap offsets) and the rule for sizing global buffers behind bare pointers follow the
behavior described by Lichii's nx2 branch (GPL-3.0-or-later) and its instruction tests; the code here is written
from that description, not copied. Thanks to Lichii. The Ocarina of Time resolution patch (nxloader.py) is the
offset and words from Lichii's built-in patch list. fix37's geometry stage handling (OUT, ISBERD, LEPC, the exit
handler) follows the same notes. The ARMv8.2/8.3 instructions follow the ARM Architecture Reference Manual; qemu was
only used as a test oracle, none of its code is included.

Vulkan renderer (renderer=vulkan): runtime/nvn draws the game's NVN calls with Vulkan, on Windows and Linux. It is based
on nxnative (https://github.com/seedds/nxnative, MIT, (c) seedds) and pokopia-native
(https://github.com/xFractals/pokopia-native, MIT, (c) the pokopia-native contributors), by way of a Switch2Recomp fork
(AGPL v3, part of this work). Their licences are in runtime/nvn/third_party. runtime/nvn/vk/third_party holds
astc-encoder (Apache-2.0), bc7enc_rdo (MIT or Unlicense), stb_dxt by Sean Barrett (public domain or MIT) and RenderDoc's
renderdoc_app.h ((c) Baldur Karlsson, MIT), each with its licence text.

Its shaders are translated while the game runs by tools/nxshader: nxs_live.py (SwitchRecomp), the nxs_*.py and dmsh_*.py
scripts (from the same fork, porting parts of nxnative, MIT) and xlate_bin, nxnative's dmsh_xlate built on Ryujinx's
shader translator (https://github.com/Ryubing, MIT). Their licences are in tools/nxshader/xlate_bin.

Eden renderer (renderer=eden): runtime/edenvk/src contains video_core, shader_recompiler and parts of common from the
Eden Emulator Project (GPL-3.0-or-later, https://git.eden-emu.dev/eden-emu/eden), which includes code from the yuzu
Emulator Project (GPL-2.0-or-later). Those files keep their SPDX headers and are modified for SwitchRecomp (lines
marked "SWR"). Their licence texts are in runtime/edenvk/LICENSE.txt and runtime/edenvk/LICENSES/. runtime/edenvk/deps
carries sirit (BSD-3-Clause), SPIRV-Headers and Vulkan-Headers (Apache-2.0/MIT), Vulkan Memory Allocator (MIT),
Vulkan-Utility-Libraries (Apache-2.0), xbyak (BSD-3-Clause, with a small mingw patch), fmt (MIT), frozen (Apache-2.0),
lz4 (BSD-2-Clause) and zstd (BSD-3-Clause), each with its own licence file. runtime/edenvk/externals has FidelityFX-FSR
(MIT), bc_decoder (MPL-2.0) and stb (MIT/public domain).

Thanks to all of these projects.
