LASRecomp README

The project's README from github.com/peiikai/LASRecomp. As one markdown file: README.md.

LAS Recomp

[!IMPORTANT] This project was made almost exclusively with AI. Nearly all of the code, tooling, reverse engineering and documentation in this repository was written by and will be maintained by an AI (Anthropic's Claude, through Claude Code), directed, tested and reviewed by a human. As a huge fan of this game, I made this for myself. Sharing it is a courtesy. If you don't agree with the use of AI or don't trust code written by AI, that is your right, but I'm not interested in the controversy in relation to this project. You may simply ignore this project and its code. As with anything on the internet, you run the code at your own discretion.

LAS Recomp is a static recompilation of The Legend of Zelda: Link's Awakening (Nintendo Switch, 2019) into a native Windows, macOS and Linux application.

[!NOTE] Currently supported platforms:

  • macOS - Apple Silicon only, Metal graphics backend + MetalFX
  • Windows - x86-64 only, Vulkan graphics backend
  • Linux - x86-64, Vulkan graphics backend (AppImage)
  • Linux aarch64 (ARM) - experimental: built but untested on real hardware; reports welcome (docs/linux.md lists what to include)

Mabe Village in a 21:9 window: the unlocked aspect ratio shows more of the island

[!NOTE] No game files are included. LAS Recomp needs your own legally obtained copy of the extracted game files of Link's Awakening v1.0.0. Instructions on how to obtain these files will NOT be provided. On first launch the app sets up what it needs, including the actual recompilation locally. No game files, assets or fonts are included. The screenshot shows the start screen after setup; no Nintendo artwork is included until provided by the user.

The start screen: choose vanilla or a randomizer seed, set up your game files, settings

Project Discord

https://discord.gg/DhrgdYqdcY

Status

This is a beta release. That means bugs are likely, crashes could occur, randomizer seeds could possibly be unsolvable (dungeon room shuffle modes are especially experimental at this point) and some graphics issues remain (especially in wide and ultrawide aspect ratios). This is a work in progress, hence the beta designation. To report a bug or a possible randomizer logic issue, use either the Discord or a GitHub issue - see CONTRIBUTING.md for what to include.

Known issues

Features

Runs natively

Randomizer

Building from source

Every platform needs your own v1.0.0 game files: build first, then use the start screen's game-file setup. make gen then recompiles the game code from your own game files into generated/, and make builds it into its own library next to the app (build/lasgame.*); without it the start screen builds that library itself, as it does for players. Release builds hold none of the game's code: the start screen builds it on each player's machine from their own game files, with the bundled generator (make gen-helper) and compiler (tools/fetch_zig.sh).

macOS

Requirements: Apple Silicon, Xcode command line tools (clang), Homebrew sdl3 and ffmpeg, Python 3.12.

  1. Build: make -j10 -> build/lasrecomp. Set up your game files (above), then make gen and make -j10 again.
  2. Randomizer: create the Python environment for LAS-Randomizer, from third_party/LAS-Randomizer: python3.12 -m venv venv && venv/bin/pip install -r requirements.txt.
  3. Run: ./build/lasrecomp extracted (start screen) or ./build/lasrecomp extracted --play (straight into the game).
  4. Package: make deps (once: SDL3, FFmpeg, keystone and Python from pinned sources, built for macOS 15), make rando-helper (the seed generator as a standalone helper, so players need no Python), make gen-helper and tools/fetch_zig.sh (what the start screen builds the game code with), then make app -> build/LAS Recomp.app (macOS 15+, Apple Silicon) and make dmg -> build/dist/LAS Recomp-<version>-macOS.dmg.

Windows

Requirements: Windows 10+ x86-64, a CPU with AVX2 and a GPU with Vulkan 1.3. More detail in docs/BUILD-windows.md.

  1. One-time setup, in PowerShell from the repo root: powershell -ExecutionPolicy Bypass -File tools\setup_windows.ps1. It installs MSYS2 (UCRT64: clang, make, SDL3, FFmpeg, Vulkan, shaderc), Python 3.12 for the tools and the randomizer (third_party\LAS-Randomizer\venv) and switches the clone to LF line endings.
  2. Build, from an MSYS2 UCRT64 shell (or Git Bash with export PATH="/c/msys64/ucrt64/bin:/c/msys64/usr/bin:$PATH"): make -j -> build/lasrecomp.exe. Set up your game files (above), then make gen and make -j again.
  3. Run: ./build/lasrecomp.exe extracted, from a shell with C:\msys64\ucrt64\bin on PATH (for the DLLs).
  4. Package: make deps-windows (once: LGPL FFmpeg), make rando-helper RANDO_PY="<path to python.org Python 3.12>" (MSYS2's Python has no oead wheel), then make dist -> build/dist/LAS Recomp-<version>-windows.zip.

Linux

Requirements: x86-64 with AVX2 (or aarch64, experimental), a GPU with Vulkan 1.3, clang, SDL 3, FFmpeg, shaderc and Vulkan Memory Allocator from your distribution, Python 3.12. Packages, cross builds and details in docs/linux.md.

  1. Build: make -j -> build/lasrecomp. Set up your game files (above), then make gen and make -j again.
  2. Run: ./build/lasrecomp extracted.
  3. Package: make appimage (this machine's arch; ARCH=aarch64 cross-compiles) or make appimages (both) -> build/dist/LAS_Recomp-<version>-<arch>.AppImage, built in Ubuntu 22.04 containers (podman). make smoketest checks the x86-64 AppImage before a release.

Where files live (game files, saves, seeds, settings, caches, imported fonts):

Credits

LAS-Randomizer - the randomizer at the heart of this project's randomizer features, vendored (with local changes) in third_party/LAS-Randomizer under the MIT license. Huge thanks to its authors and community:

Community mods - some options re-implement ideas from these GameBanana mods (re-implemented in the recomp; none of their files are used):

Libraries and tools

LAS Recomp is a fan project. It is not affiliated with, endorsed by or sponsored by Nintendo. The Legend of Zelda and Link's Awakening are trademarks of Nintendo. No game files, game code, assets or fonts are included - not in this repository and not in release builds. You must provide your own legally obtained copy of the game files to play.

License

LAS Recomp's own code (the recompiler tools, the runtime, the randomizer additions) is open source under the MIT License. Third-party components keep their own licenses: LAS-Randomizer (MIT), Dear ImGui (MIT), Vulkan Memory Allocator (MIT), SMAA (MIT), AMD FSR 1 (MIT), the Baloo 2 font (SIL OFL 1.1), SDL 3 (zlib), FFmpeg (LGPL 2.1+, linked dynamically), the Zig compiler (MIT; its LLVM / Clang / LLD: Apache 2.0 with LLVM exceptions; its C library headers keep their own licenses), and the generator helpers' bundled libraries listed under Credits (oead / evfl / Keystone in the seed generator and Unicorn in the game code generator are under the GPL, versions in the table below: each helper is a separate program the game runs, and its sources are this repository plus those projects' published sources). The license covers LAS Recomp's code only - it grants nothing for Nintendo's game, which you must supply yourself.

Source code of bundled third-party components

Release builds include these components; their source code for the exact versions shipped is available here:

Component Version License Source
Keystone (seed generator) 0.9.2 GPL 2.0 https://github.com/keystone-engine/keystone/releases/tag/0.9.2
oead (seed generator) 1.3.0 GPL 2.0+ https://github.com/zeldamods/oead/releases/tag/v1.3.0
evfl (seed generator) 1.2.0 GPL 2.0+ https://github.com/zeldamods/evfl/releases/tag/v1.2.0
quicktex (seed generator) 0.2.1 LGPL 3.0 https://github.com/drewcassidy/quicktex/releases/tag/v0.2.1
PyInstaller (packs the seed and game code generators) 6.22.3 GPL 2.0+ with bootloader exception https://github.com/pyinstaller/pyinstaller/releases/tag/v6.22.3
CPython (seed and game code generators) 3.12.14 (macOS), 3.12.10 (Windows), 3.12.15 (Linux) PSF https://github.com/python/cpython/releases/tag/v3.12.14, https://github.com/python/cpython/releases/tag/v3.12.10, https://github.com/python/cpython/releases/tag/v3.12.15
Zig (builds the game code during setup; includes LLVM, Clang, LLD) 0.17.0 MIT; LLVM: Apache 2.0 with LLVM exceptions https://ziglang.org/download/0.17.0/zig-0.17.0.tar.xz
Capstone (game code generator) 5.0.9 BSD 3-clause https://pypi.org/project/capstone/5.0.9/
Unicorn (game code generator) 2.1.4 GPL 2.0 (Python bindings: BSD) https://pypi.org/project/unicorn/2.1.4/, https://github.com/unicorn-engine/unicorn
python-lz4 (game code generator; includes LZ4) 4.4.5 BSD 3-clause; LZ4: BSD 2-clause https://pypi.org/project/lz4/4.4.5/
FFmpeg (LGPL configuration, macOS, Windows and Linux builds) 9.0.2 LGPL 2.1+ https://ffmpeg.org/releases/
SDL 3 3.4.18 (macOS, Windows), 3.4.16 (Linux) zlib https://github.com/libsdl-org/SDL/releases/tag/release-3.4.18, https://github.com/libsdl-org/SDL/releases/tag/release-3.4.16
shaderc (Windows, Linux: GLSL to SPIR-V; Linux: with glslang, SPIRV-Tools inside) 2026.4 (Windows), 2026.3 (Linux) Apache 2.0 https://github.com/google/shaderc
libiconv (Windows: used by SDL 3) 1.19 LGPL 2.1+ https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.19.tar.gz
GCC runtime: libgcc, libstdc++ (Windows) 16.2.0 GPL 3.0 with the GCC Runtime Library Exception https://gcc.gnu.org/
winpthreads (Windows, mingw-w64) 14.0.0 MIT / BSD https://www.mingw-w64.org/
Baloo 2 font (SemiBold) 1.640 SIL OFL 1.1 https://github.com/EkType/Baloo2
SMAA (shader and lookup textures, built in) 2013 (repository master) MIT https://github.com/iryoku/smaa

The exact build scripts that fetch and build these (with checksums) are in this repository: tools/build_deps_macos.sh, tools/build_deps_windows.sh, tools/linux/build_deps.sh and tools/rando/rando_gen.spec. The Windows build takes SDL 3, shaderc, libiconv and the compiler runtime from MSYS2's UCRT64 packages (https://packages.msys2.org, which links each package's source).

LASRecomp (peiikai/LASRecomp)

Searching Database…

这是什么?LAS Recomp 会把《塞尔达传说:织梦岛》(任天堂 Switch 版,2019 年)静态重编译成可在 Windows、macOS 和 Linux 上原生运行的应用程序,并内置随机化器。
这是模拟器吗?不是——它把 Switch 游戏的原始代码提前转换成本地机器码(静态重编译),所以能以原生方式运行在各个操作系统上,而不是在运行时模拟 Switch 硬件。
怎么构建和运行它?先安装对应平台的工具链(macOS 上是 Xcode CLT 和 Homebrew,Windows 上是提供的适用于 MSYS2 的 PowerShell 配置脚本,Linux 上是 clang/SDL3/FFmpeg/Vulkan),运行 make 构建 'lasrecomp',准备好你自己的游戏文件,然后运行 make gen 并再次构建。
我需要自己提供游戏吗?是的——项目不附带任何游戏文件、素材或字体;你必须提供自己合法获取的织梦岛 v1.0.0 提取镜像,应用会在首次启动时在本地对它进行重编译。
现在玩起来稳定吗?目前仍是测试版,还有一些已知的 bug:部分光照显示异常,在汪汪妈妈的房间里检查衣柜时会崩溃,自定义设置按钮会导致崩溃,另外实验性的迷宫房间打乱模式偶尔会生成无法通关的种子。
支持哪些平台和硬件?macOS(仅支持 Apple Silicon,使用 Metal 和 MetalFX)、Windows(x86-64 且需要 AVX2,使用 Vulkan),以及 Linux(x86-64 Vulkan AppImage,另有实验性、未经测试的 aarch64 版本)。
这些代码到底是谁写的?据项目介绍,代码几乎全部由 Anthropic 的 Claude 通过 Claude Code 编写,由一位喜欢这款游戏的玩家进行指导、测试和审核。
内置的随机化器能做什么?它会生成种子,打乱物品、敌人、音乐和迷宫入口的位置,并提供诸如完整的迷宫房间打乱(Coherent、Chaos 或 Madness 模式)、每个种子独立存档以及可分享的种子 ID 等选项。
'Potsanity' 和 'Digsanity' 是什么?它们是两种极端的随机化选项:开启 Potsanity 后每个罐子都变成一个单独的道具检查点;开启 Digsanity 后,大地图上每一块可挖掘的地块——大约有 5000 块——也都会变成单独的道具检查点。
我可以用手柄代替键盘吗?可以,键盘和手柄都完全支持,而且可以重新映射按键;界面还会根据你的手柄显示对应的 Xbox、PlayStation 或任天堂按键提示。
Creator
peiikai
Size
7.3 MB
Stars
1.3K
Age
11d
Commits · 90 Days