Metroid-Dread-Recomp README

项目的 README,来自 github.com/yozander2009-stack/Metroid-Dread-Recomp。合并为一个 markdown 文件:README.md。

Metroid Dread — recompiled for PC

Listed on PlayPorted

Work in progress. This project was shared on Reddit and elsewhere before it was ready: the planned first proper release is 1.0.0, and current builds (0.x) are early previews. Expect crashes, setup problems and rough edges on hardware it has not been tested on. If something breaks, please open an issue and attach the .log file from the game folder, plus your CPU, GPU, RAM and Windows version. I'll do the best I can to resolve the errors and make this a good experience.

One Windows EXE that sets up, configures and runs a native PC build of your own copy of Metroid Dread 2.1.0. It is the SwitchRecomp runtime (by MZ Labs) with a Metroid Dread front end built in: first-run setup that compiles the game with a bundled GCC, a Play / settings screen, and an in-game menu (F1 or the Home / Guide button).

The Play screen

No Nintendo files are in this repository: no game code, no RomFS, no keys, no generated C.

Layout

path what
switchrecomp.py, codegen.py, a64.py, nxloader.py, metroid_perf.py SwitchRecomp: ARM64 → C translator (Apache-2.0)
runtime/ the runtime: kernel, services, GPU → OpenGL, audio, video, input
runtime/dread_ui/ front end: fe.cpp (setup, Play, settings), ov.cpp (in-game menu), ui.cpp (theme, widgets, settings table)
runtime/snxvk/ ScarletNX's native Vulkan renderer (GPL-3.0, main 112db409) in src_new/, vendored, symbols prefixed snxv_; our DLSS code in src_new/nx/gpu/vk/dlss.c
dread/ setup driver run by the EXE, patch set, RomFS manifest, release script, design notes
third_party/imgui-1.92.5/ Dear ImGui (MIT)
linux/ scripts for the Linux / Steam Deck build

Setting up the game (players)

Download the release zip, not this repository. On first start the EXE asks for your game files and compiles the game. It needs both parts of your own dumped copy of Metroid Dread 2.1.0:

A RomFS dump on its own is not enough. Choose the folder that holds both; they can be a few folders down (a dump folder with one folder per title is fine). If you have the base game and the update as separate dumps, choose the update as "Update folder". Every RomFS file is checked against the 2.1.0 file list before anything is compiled.

Updates: the Play screen checks this repository's releases and offers UPDATE when there is a new version. Only the game's own files that changed are downloaded (a few MB), each one is checked against its SHA-256 before anything is replaced, and the replaced files are kept so UNDO can go back. If the game-code patches changed, the game is rebuilt from the files setup already installed, without asking for your game folder again. Saves, settings and mods are never touched. It can be switched off on the Play screen.

Not sure which settings to pick? Press AUTO-SET on the Play screen. It reads your graphics card, screen and memory and picks resolution, frame rate and quality to match; a new installation gets these automatically after setup. Anything can still be changed afterwards.

NVIDIA DLAA (RTX cards, OpenGL or Native Vulkan): Play screen → Graphics → NVIDIA DLAA → GET. It downloads NVIDIA's DLSS file (59 MB) from NVIDIA's own GitHub, checks its SHA-256 and turns DLAA on. Pressing GET means accepting NVIDIA's licence (READ opens it). NVIDIA's file is never part of the release. See DLSS.md.

Found a bug? See CONTRIBUTING.md: please attach the .log.

Screenshots

Graphics settings Controls
Graphics settings Controls

Build from source (Windows)

The toolchain is not in this repository and never was: the paths below are where you put your own downloads. The release zip bundles the same GCC and Python so that setup can compile the game on the player's PC.

build.bat checks for all three and runs the steps below (build.bat release X.Y.Z also packs a release):

python\python.exe work-profiler\build_imgui.py
set GLSLANG=<path to glslang.exe 16.6.0> && python\python.exe work-profiler\build_snxvk2.py
set SWR_RELEASE=1 && python\python.exe switchrecomp.py --build-runtime --cc gcc
python\python.exe dread\make_release.py release <empty folder> --version X.Y.Z --exe bin\runtime_win64_win32.exe

The release step also needs redist\zlib1.dll (zlib 1.3.1, x64) and redist\SDL2.dll (SDL 2.x x64 release), the two DLLs the game ships beside it. They are not in this repository.

Build and play on Linux

Native Linux (X11 or Wayland through XWayland, OpenGL 4.3), built from this repository with the system's GCC. The scripts in linux/ keep everything inside the repository: the runtime in bin/, the installed game in games/. You need your own Metroid Dread 2.1.0 extracted to an ExeFS and a RomFS folder, as for Windows.

bash linux/install_deps.sh                    # gcc, X11/OpenGL headers, static libvpx, SDL2 (asks for sudo)
bash linux/setup_and_build_runtime.sh         # bin/runtime_linux_x11, with the in-game menu
bash linux/setup_game.sh GAME_FOLDER [UPDATE_FOLDER]   # checks the files, compiles games/Metroid Dread_code.so
bash linux/run.sh                             # play; settings in games/Metroid Dread.ini, log in games/Metroid Dread.log

linux/run.sh opens the same Play / setup / settings screens as the Windows EXE (--play skips them, --launcher brings them back when skipped). linux/build_game_so.sh recompiles only what changed (after editing the patches or the translator), linux/package.sh makes the Steam Deck package in linux/dist/ (no game data inside), and run_test.sh, menu_test.sh and run_route_linux.sh run the automated tests on a copy of the game folder (SWR_SOFTGL=1 for Mesa's software OpenGL). The AppImage updates itself from the releases page (Play screen > Updates; publish linux/dist/update-linux.txt with the AppImage, made by VERSION=x.y.z bash linux/make_appimage.sh), and Add to Steam works from Desktop Mode. Native Vulkan needs Linux 6.7 or later (OpenGL otherwise). Not on Linux yet: F7 recording.

AppImage

bash linux/make_appimage.sh builds linux/dist/Metroid_Dread-x86_64.AppImage: one file for players, like the Windows EXE. It has the runtime with the Play / setup screens, the recompiler, a relocatable GCC 14.3 (Bootlin) and Python 3.12 (python-build-standalone), so nothing needs to be installed; no game files are inside. The downloads are checked against their SHA-256 and kept in linux/appimage/cache/. The game is installed in ~/.local/share/MetroidDreadRecomp (or METROID_DREAD_HOME). It needs glibc 2.38 or newer, SDL2 for controllers and an OpenGL 4.3 driver.

What is in this repository

Contributors

Button-icon packs (Controls > Button icons) are community mods downloaded from GameBanana when a player asks for them, not included here: Switch to XBOX Layout by Krydar, Switch to PS4 Layout by Nova77, Switch to PS5 Layout by xSeRosiSx, with PlayStation art from Xelu's FREE Controller Prompts.

The program icon is the Metroid icon created by Smashicons - Flaticon (Flaticon licence, free with attribution).

Third-party work this builds on is credited below and on the game's Credits page.

AI use

Large parts of this project were written with Claude (Anthropic), not only boilerplate: runtime fixes, performance work, the front end, setup and the build scripts. Every change was built and tested on real hardware before release, and each fix was measured. The source is all here: read it, build it yourself, and report anything that looks wrong.

Licences

The released EXE is distributed under GPL-3.0 (LICENSE-GPL-3.0.txt), because it contains the ScarletNX renderer. Each source file keeps its own licence; Apache-2.0 and MIT code is GPL-3.0-compatible.

NVIDIA DLAA: our code calls NVIDIA's NGX through the graphics driver; no NVIDIA SDK code or header is compiled in. NVIDIA's nvngx_dlss.dll is not in this repository or the release: the Play screen downloads it from NVIDIA's own GitHub only when the player presses GET and accepts NVIDIA's licence. See DLSS.md.

Metroid Dread is © Nintendo. This project is not affiliated with or endorsed by Nintendo.

Metroid-Dread-Recomp (yozander2009-stack/Metroid-Dread-Recomp)

正在搜索数据库…

这是什么?这是 Metroid Dread 的 PC 移植版,通过静态重编译实现。一个 Windows EXE 会把你自己导出的 Switch 游戏副本编译成原生版本并运行,还包含安装向导、Play 界面和设置界面,以及游戏内菜单。
这是模拟器还是别的什么东西?它不是模拟器,而是 SwitchRecomp,一个由 MZ Labs 开发的 ARM64 转 C 翻译器。项目还附带了专为 Metroid Dread 设计的前端,它会用内置的 GCC 把你导出的游戏代码编译成原生可执行文件。
我该怎么让它跑起来?请下载发布版压缩包(不是本源代码仓库),然后运行 Windows EXE。首次启动时,它会要求你指定游戏文件的位置,并自动编译游戏。在 Linux 上,请改为运行 linux/run.sh 或独立打包的 AppImage。
使用它还需要别的东西吗?你必须already拥有并合法导出 Metroid Dread 2.1.0,自己提供 ExeFS(游戏代码)和 RomFS(已合并 2.1.0 更新的游戏数据)。EXE 内置了自己的 GCC 和 Python,因此无需单独安装编译器。
进入之前我应该了解什么?该项目还处于 1.0 之前的阶段,并明确标注为早期预览版。预计会出现崩溃、安装配置问题,以及在未经测试的硬件上出现的问题。在 Linux 上,原生 Vulkan 渲染器、鼠标自由瞄准和 F7 录制功能目前尚不可用。
它支持哪些平台?Windows 版提供独立打包的 EXE;Linux(X11 或 Wayland)版提供构建脚本和独立打包的 AppImage,还可以通过 Add to Steam 在 Steam Deck 上使用。
SwitchRecomp 是什么?SwitchRecomp 是底层的 ARM64 转 C 翻译器(由 MZ Labs 开发,采用 Apache-2.0 许可证)。本项目在它之上封装了专为 Metroid Dread 设计的安装向导、Play 界面和游戏内菜单。
这个仓库里有任天堂的游戏文件吗?没有。仓库里只有一些小型补丁文件(dreadv210patches.json),以及一份文件名、大小和哈希值清单,用于校验你自己导出的游戏数据。这里没有游戏代码、RomFS 数据、密钥或生成的 C 代码。
我能在这里使用 NVIDIA DLSS/DLAA 吗?DLAA 集成代码(dlss.c)在仓库中,但 NVIDIA 自家的文件不在其中,因此发布版本不包含该功能。你可以按照 DLSS.md 自行添加;加入 DLSS 的构建版本仅供个人使用,严禁分享。
这个项目用 AI 参与开发了吗?是的。Claude(Anthropic)被列为“AI 结对编程伙伴”,编写了大量运行时修复、性能优化、前端、安装配置和 Linux 构建方面的代码。每项改动在发布前都已在真实硬件上测试。
大小
10.5 MB
星标
441
时长
2个月
提交 · 90 天