[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111572":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},111572,"Switch2RECOMP","SwitchRECOMP-Dev\u002FSwitch2RECOMP","SwitchRECOMP-Dev","Static recompiler for Nintendo Switch and Switch 2 games, by MZ Labs. Windows and Linux, OpenGL and Vulkan.",null,"C",159,18,3,5,0,12,77,1,57.54,"GNU Affero General Public License v3.0",false,"main",true,[],"2026-11-13 14:13:45","2026-11-23 01:52:15","# Switch2Recomp\n\nStatic recompiler for Nintendo Switch and Switch 2 games, by MZ Labs. The game's code (ExeFS) is translated from\nARM64 to C once and compiled into a native module for Windows or Linux. A C runtime emulates the Horizon OS services\nand the GPU. The game's data (RomFS) is read as it is.\n\nThis repository has the source only. No games, keys or firmware are included, and none are downloaded. You need your\nown dump of a game you own.\n\nPlayer manual (recompiling a game, controls, `.ini` options): `README.txt`.\nCode layout, logs and traces: `DEVELOPER_GUIDE.md`. Changes: `CHANGELOG.txt`.\n\n## Renderers\n\nThe game's `.ini` picks one with `renderer=`:\n\n| Value | What it does | Platforms |\n| --- | --- | --- |\n| `opengl` (default) | The runtime's own GPU emulation, with Ampere (Switch 2) shaders lowered and turned into GLSL | Windows, Linux |\n| `vulkan` | The game's NVN calls drawn directly with Vulkan; shaders translated to SPIR-V while the game runs | Windows, Linux |\n| `eden` | The runtime's command processing feeding Eden's Vulkan GPU | Windows, Linux |\n\n`renderer=vulkan` needs Python 3 and the .NET 10 runtime for its shader translator. The first time a shader is used it\nshows up about a second and a half later, and later runs read it from `\u003Cgame>_nvn\u002Fcache`. On Linux it also needs\n`sudo sysctl vm.mmap_min_addr=0` once, because games read through NULL pointers and expect zeros there.\n\n## Layout\n\n| Path | Contents |\n| --- | --- |\n| `switchrecomp.py`, `a64.py`, `codegen.py`, `nxloader.py`, `brt.py`, `tools_sym.py` | The recompiler (Python 3) |\n| `runtime\u002F` | The runtime (C): kernel, IPC, services, GPU, audio, video, window backends |\n| `runtime\u002Fnvn\u002F` | The Vulkan renderer (NVN layer) |\n| `runtime\u002Fedenvk\u002F` | The Eden renderer: Eden's video_core and shader_recompiler with the glue to our runtime |\n| `tools\u002Fnxshader\u002F` | The live shader translator used by `renderer=vulkan` |\n| `tool\u002F` | The GUI (`SwitchRecomp.exe`) and the install helpers |\n| `tests\u002F` | Unit and regression tests (`REGRESSION.md`) |\n\n## Building\n\nRequirements on Linux (Debian\u002FUbuntu names):\n\n```sh\nsudo apt install build-essential python3 libsdl2-dev libx11-dev libgl-dev libegl-dev \\\n    mingw-w64 gcc-mingw-w64-x86-64-win32 cmake ninja-build glslang-tools\n```\n\nThe Windows builds are cross-compiled with the win32 thread model variant of `x86_64-w64-mingw32-gcc`.\n\nThe two Vulkan renderers are static libraries built first. Each is optional: without it the runtime builds with the\nother renderers.\n\n```sh\npython3 tools\u002Fbuild_nvn.py              # renderer=vulkan, Windows: build\u002Fnvn\u002Flibnvn.a\npython3 tools\u002Fbuild_nvn.py --linux      # renderer=vulkan, Linux:   build\u002Fnvn_lin\u002Flibnvn.a\n\ncmake -S runtime\u002Fedenvk -B runtime\u002Fedenvk\u002Fbuild -G Ninja && ninja -C runtime\u002Fedenvk\u002Fbuild    # renderer=eden, Linux\ncmake -S runtime\u002Fedenvk -B runtime\u002Fedenvk\u002Fbuildw -G Ninja \\\n      -DCMAKE_TOOLCHAIN_FILE=runtime\u002Fedenvk\u002Fmingw.cmake && ninja -C runtime\u002Fedenvk\u002Fbuildw     # renderer=eden, Windows\n# then copy libedenvk.a and libsirit.a into runtime\u002Fedenvk\u002Flin\u002F or runtime\u002Fedenvk\u002Fwin\u002F\n```\n\n`tools\u002Fbuild_nvn.py` expects Vulkan-Headers in `external\u002Fdeps\u002FVulkan-Headers` (or `VULKAN_SDK`).\n\nThen the runtimes, from the repository root:\n\n```sh\npython3 switchrecomp.py --build-runtime --target win64 --backend win32 --cc x86_64-w64-mingw32-gcc\npython3 switchrecomp.py --build-runtime --target linux --backend x11   --cc gcc\n```\n\nThe results go to `bin\u002F`.\n\n## Recompiling a game\n\n```sh\npython3 switchrecomp.py \u002Fpath\u002Fto\u002Fgame -o MyGame\n```\n\n`\u002Fpath\u002Fto\u002Fgame` holds the `exefs\u002F` and `romfs\u002F` folders extracted from a legally owned copy. `README.txt` has the\nfull steps and the options.\n\n## License\n\nSwitchRecomp is under the GNU AGPL v3 (`LICENSE.txt`) with the additional terms in `NOTICE.txt`: copies, forks and\nderived works keep the credit to \"SwitchRecomp by MZ Labs\" and the startup screen. The code from Eden is\nGPL-3.0-or-later, and a runtime built with `renderer=eden` is a GPL-3.0 work. Third-party components keep their own\nlicenses; `NOTICE.txt` lists them.\n","Switch2RECOMP 是一个静态重编译器，用于将任天堂 Switch 和 Switch 2 游戏的 ARM64 机器码（ExeFS）一次性翻译为 C 源码，并编译为 Windows\u002FLinux 原生可执行模块。其核心包含轻量级 C 运行时，模拟 Horizon OS 系统服务与 GPU 行为；支持 OpenGL、Vulkan 和 Eden 三种渲染后端，其中 Vulkan 模式通过动态 SPIR-V 着色器翻译实现高性能图形映射。项目不包含任何游戏内容或密钥，仅处理用户自有游戏镜像。适用于本地运行已拥有版权的 Switch\u002FSwitch 2 游戏，尤其适合开发者调试、逆向分析及跨平台兼容性研究。",2,"2026-11-24 04:41:12","CREATED_QUERY"]