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)

Ищем в базе…

Что это?Это PC-порт Metroid Dread, созданный методом статической рекомпиляции: один Windows EXE собирает и запускает нативную сборку вашей собственной снятой в дамп копии игры для Switch, включая мастер настройки, экран «Играть» с настройками и внутриигровое меню.
Это эмулятор или что-то другое?Это не эмулятор. Это «SwitchRecomp» — транслятор ARM64 в C от MZ Labs, поставляемый вместе с интерфейсом, заточенным под Metroid Dread. Он с помощью встроенного GCC компилирует код вашей игры из дампа в нативный исполняемый файл.
Как мне всё запустить?Скачайте архив релиза (не этот репозиторий с исходниками) и запустите Windows EXE. При первом запуске он попросит указать путь к файлам игры и автоматически скомпилирует её. На Linux вместо этого запустите linux/run.sh или самодостаточный AppImage.
Мне нужно что-то ещё для работы?Нужно самому владеть легальной копией Metroid Dread 2.1.0 и снять с неё дамп: ExeFS (код игры) и RomFS (данные игры с уже включённым обновлением 2.1.0). EXE содержит собственные GCC и Python, поэтому отдельно устанавливать компилятор не нужно.
Чего ждать на старте?Проект ещё до версии 1.0 и прямо заявлен как ранний предварительный релиз: сбои, проблемы с установкой и проблемы на непроверенном оборудовании ожидаемы. На Linux пока недоступны нативный рендерер Vulkan, свободное прицеливание мышью и запись по F7.
На каких платформах это работает?Для Windows есть самодостаточный EXE. Для Linux (X11 или Wayland) есть скрипты сборки и самодостаточный AppImage, который также работает на Steam Deck через «Add to Steam».
Что такое SwitchRecomp?SwitchRecomp — это базовый транслятор ARM64 в C (от MZ Labs, лицензия Apache-2.0), который этот проект оборачивает мастером настройки, экраном «Играть» и внутриигровым меню, заточенными под Metroid Dread.
Есть ли в репозитории файлы игр Nintendo?Нет. В нём есть только небольшие файлы с патчами (dreadv210patches.json) и манифест файлов RomFS с именами, размерами и хешами, который используется для проверки вашего дампа. Игрового кода, данных RomFS, ключей или сгенерированного C-кода здесь нет.
Можно ли использовать с этим NVIDIA DLSS/DLAA?Код интеграции DLAA (dlss.c) есть в репозитории, но собственных файлов NVIDIA там нет, поэтому релизы поставляются без них. Добавить их самостоятельно можно по инструкции DLSS.md, однако сборка с DLSS предназначена только для личного использования и никогда не должна распространяться.
Использовался ли ИИ при создании проекта?Да. Claude (Anthropic) указан как «ИИ-парный программист», который написал большую часть исправлений среды выполнения, работ по производительности, интерфейса, настройки и сборки для Linux. Каждое изменение было проверено на реальном железе перед выпуском.
Какие есть похожие проекты?pt-pc, LostOdysseyRecomp, nolfsrc, SpartanPort, Yakumo, MarathonRecomp, TheSimpsonsGameRecomp, ShadowRecomp
Размер
10.5 MB
Звёзды
441
Возраст
2 мес
Коммиты · 90 дней