[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116220":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":16,"stars7d":17,"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},116220,"PS5_Longshot","heydemoura\u002FPS5_Longshot","heydemoura","Longshot for the PlayStation 5: a port of Longshot (static recompilation) to the PS5, with the Longshot PS5 Builder for Linux and Windows. No PC builds of the game.",null,"C++",233,45,7,40,0,18,111,85,94.99,"GNU General Public License v3.0",false,"main",true,[],"2026-11-21 19:07:14","2026-11-23 16:54:10","\u003Ch1 align=\"center\">\n  \u003Cbr>\n  \u003Ca>\n  \u003Cimg src=\"ps5\u002Fsce_sys\u002Ficon0.png\" alt=\"Longshot\" width=\"200\">\n\u003C\u002Fa>\n\n  \u003Cbr>\n  \u003Cb>Longshot\u003C\u002Fb>\n  \u003Cbr>\n\u003C\u002Fh1>\n\n\u003Ch4 align=\"center\">Longshot for the PlayStation 5: a supported console game running natively on the PS5, without emulation.\n\u003C\u002Fh4>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"ps5\u002Fbuilder\u002FREADME.md\">\u003Cb>The PS5 Builder\u003C\u002Fb>\u003C\u002Fa> |\n  \u003Ca href=\"ps5\u002FREADME.md\">\u003Cb>The port\u003C\u002Fb>\u003C\u002Fa> |\n  \u003Ca href=\"https:\u002F\u002Flongshot.magicbean.dev\u002F\">Longshot for PC (upstream)\u003C\u002Fa>\n\u003C\u002Fp>\n\n> [!IMPORTANT]\n> **This repository is the PlayStation 5 version of Longshot.** It is a port of\n> [Longshot](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot) to the PS5, with\n> [PS5_Vulkan](https:\u002F\u002Fgithub.com\u002Fmihawk-99\u002FPS5_Vulkan) as its Vulkan driver, and it builds one thing: the PS5 title.\n>\n> **No PC builds of Longshot are included or released here.** There is no Windows or Linux game, launcher or builder\n> in this repository's releases. For Longshot on a PC, go to [Longshot itself](https:\u002F\u002Flongshot.magicbean.dev\u002F).\n>\n> What the releases here hold is the **Longshot PS5 Builder**: a desktop program for Linux (an AppImage) and Windows\n> (a portable folder) that makes the PS5 title folder from your own copy of the game, on your own computer. It holds\n> no game files.\n>\n> - Using it, and what it does: [ps5\u002Fbuilder\u002FREADME.md](ps5\u002Fbuilder\u002FREADME.md)\n> - The port: what runs, how it was measured, the console's profiles: [ps5\u002FREADME.md](ps5\u002FREADME.md)\n>\n> It runs on the **PS5 Pro** and on the **base PS5** (PS5 and PS5 Slim): the builder asks which one the folder is for.\n>\n> A jailbroken PS5 with a homebrew environment is needed to run the title. The game is not included, and nothing here\n> explains how to get it.\n\n**[Install and play](#install-and-play)** and **[In-game menu](#in-game-menu)** below are this port's. The other\nsections are **Longshot's own README, for its PC versions**, kept as they are for reference: the status table, mods,\nbuilding from source and the rest describe the PC game, not this port.\n\n---\n\nLongshot is a static recompilation of a supported console game. The game's code is translated to C and compiled into a Windows or Linux program, rebuilding the graphics on Vulkan, with the console's system software reimplemented. All of this happens **on your PC, from your own copy of the game**.\n\nLongshot is a continuation of [Hookshot](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot). The top maintainers have moved to this project.\n\n**[Join us on Discord](https:\u002F\u002Fdiscord.gg\u002Fmagicbean)!**\n\u003Cbr>\n\n> [!IMPORTANT]\n> This repository **does not contain the game, keys or an executable**, and it does not explain how to get them. You\n> need your own copy. Everything the build creates (`longshot.exe`, the generated code, the shader caches and your\n> saves) comes from your game and stays on your PC. Never share those files.\n\n## Project status\n\nExperimental. Players have reported on many PCs, from Kokiri Forest to the dungeons: the table says what works and\nwhat does not yet. Open problems are collected in tracking issues, linked below.\n\n| What | Status |\n|---|---|\n| Kokiri Forest: reaching gameplay and walking around | ✅ Works |\n| Sound, controller, keyboard and saves | ✅ Works |\n| In-game menu, frame generation and upscaling | ✅ Works |\n| Flicker (the picture flashing too bright while moving) | ✅ Fixed in v2.0.2 ([#645](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F645)) |\n| Ground fog vanishing when looking down | ✅ Fixed in v2.0.2 ([#638](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F638)) |\n| Models with missing pieces (doors, fences, parts of trees) | ✅ Fixed where tested, more play needed |\n| Stutter when entering new areas | ⚠️ Still happens the first time you visit a place. The next visits are smooth |\n| Performance | ⚠️ Depends on the PC: some reach a steady 60 fps, others stay below it, more so in Hyrule Field |\n| Hyrule Field, Castle Town, Kakariko and the dungeons | ⚠️ Players got there, with open bugs: lighting and shadows ([#1004](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F1004)), crashes and freezes ([#2507](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F2507)) |\n| Ultrawide and 4:3 | ✅ Works. The Aspect ratio row's default, Monitor's shape, widens the 3D to the screen and keeps the HUD and movies in the middle 16:9 ([#2119](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F2119)) |\n| NVIDIA cards | ✅ Works. The most tested |\n| AMD cards | ⚠️ Many tested: reports from the RX 6600, RX 6800 XT, RX 7800 XT, RX 7900 XTX and RX 9070 XT. On Windows, the RX 6600 to RX 6950 XT and their mobile and Pro models (Navi 21, 22 and 23) draw task and mesh shaders through the compute fallback by default: the driver lost the GPU on their own mesh shaders on an RX 6700 XT, an RX 6800 XT and, in one report in Mako, an RX 6600 ([#1747](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F1747), [#1992](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F1992), [#2215](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fpull\u002F2215)); another RX 6600 played 15-20 minutes on them ([Longshot #130](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot\u002Fissues\u002F130)). The RX 6400 and 6500 XT (Navi 24) keep their own mesh shaders, as no report has them losing the GPU; `RX_VK_TASK_MESH_FALLBACK=1` tries the fallback. Driver crashes and device lost are still reported ([#996](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F996)) |\n| Intel cards | ❓ Few reports, many of them black screens or crashes ([#999](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F999)). On Windows, Intel's shader compiler is entered by one thread, and a shader it faults on is left out instead of closing the game, on later starts too ([#252](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot\u002Fpulls\u002F252)). Made for an Intel UHD laptop with 4 threads and 16 GB that crashed in `igvk64.dll` (see [Intel laptops](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot#intel-laptops)): not yet tested on an Intel GPU |\n| Pre-rendered movies on a slow CPU | ⚠️ Shown rather than skipped when the decoder is slower than the movie, so the picture can fall behind the sound. With 4 logical processors or fewer the decoder uses 2 threads, leaving the game its own. The first picture can still be black on some PCs |\n| Cards without mesh shaders (such as NVIDIA GTX 10 and AMD RX 5000) | ⚠️ Run through the compute fallback (since v2.0.6), which runs the mesh programs as compute shaders on cards with buffer device addresses: slower, and it leaves out the mesh draws that take their count from a buffer ([#640](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F640)) |\n| Linux | ✅ Works with the AppImage. Tested on several distributions (CachyOS, Fedora, Bazzite, SteamOS) and cards, with open problems on some AMD cards ([#1000](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F1000)) |\n\n## Install and play\n\nLongshot for the PS5 does not come ready to play. The title is built **on your computer, from your own copy of the\ngame**, by the **Longshot PS5 Builder**, then copied to the console.\n\n### [Download the Longshot PS5 Builder](https:\u002F\u002Fgithub.com\u002Fheydemoura\u002FPS5_Longshot\u002Freleases\u002Flatest)\n\n| Your computer | File |\n|---|---|\n| Linux | `LongshotPS5Builder-\u003Cversion>-x86_64.AppImage` |\n| Windows | `LongshotPS5Builder-\u003Cversion>-windows-x64.zip` (a portable folder: no installer) |\n\nEach file has a `.sha256` beside it. There is no macOS builder, and no PC version of the game here.\n\n### What you need\n\n**Your game copy:** program `0400486024DEC000` · update **v131072** · build `e0f3ccfa`, as a `.nup` file. Other\nversions are not supported. The same file is used twice: the builder reads the game's program from it on your\ncomputer, and the console reads the game's data from it while you play.\n\n**A PlayStation 5 that runs homebrew:** a jailbroken console with a homebrew environment that starts titles from\n`\u002Fdata\u002Fhomebrew`, and an FTP server on it to copy files with (the builder's Send to PS5 uses port 2121 unless you\nchange it). This repository does not explain how to set that up.\n\n**A computer to build on:**\n\n| | |\n|---|---|\n| **System** | 64-bit Windows 10 or 11, or 64-bit Linux with glibc 2.35 or newer (Ubuntu 22.04, Debian 12, Fedora, Arch, SteamOS). |\n| **Memory** | About 10 GB free while it builds. The translation alone holds about 6 GB. |\n| **Storage** | About 6 GB free where you build, and 1 GB for the builder itself. |\n| **Time** | 40 to 70 minutes on a 6-core computer, most of it the compile step. A second build for the other console model takes seconds. |\n| **Internet** | Only to download the builder. The build itself downloads nothing. |\n\nThe builder carries its own compiler, Python and the ready-built parts of the title: there is nothing else to install.\n\n### Build the title\n\n1. **Start the builder.**\n   - Linux: make the AppImage executable (`chmod +x LongshotPS5Builder-*.AppImage`) and start it.\n   - Windows: unpack the zip anywhere, open the `LongshotPS5Builder` folder and start `LongshotPS5Builder.exe`.\n     Keep the folder whole: the program needs what is beside it.\n2. **Game file:** choose your `.nup`.\n3. **Build into:** choose a folder on your computer.\n4. **Console:** choose your model. The folder is built for one of them.\n   - **PS5 \u002F PS5 Slim:** the base console's memory, textures of at most 512 texels.\n   - **PS5 Pro:** its faster processor mode and larger memory, textures of at most 1024 texels.\n\n   A folder built for the base console also runs on a Pro, in the base console's mode.\n5. Press **Build**. The window shows the five steps and, under Show details, the log. Stop keeps what is done: the\n   next Build goes on from there.\n\nWhen it ends you have a folder named **`LGSH00001`** in the folder you chose. It is made from your game: **never\nshare it.**\n\n### Put it on the console\n\n1. Copy the whole **`LGSH00001`** folder to **`\u002Fdata\u002Fhomebrew\u002F`** on the console, so that it is\n   `\u002Fdata\u002Fhomebrew\u002FLGSH00001`. Either type the console's address in the builder and press **Send to PS5**, or copy it\n   with any FTP program.\n2. Copy your game file to the console as **`\u002Fdata\u002Feglantineps5\u002Froms\u002Foot.nup`** (make the folders if they are not\n   there). It is 25 GB: this is the long copy. A file already there for another program, under\n   `\u002Fdata\u002Flichii\u002Froms\u002Foot\u002Foot.nup`, is found too.\n3. Start **Longshot** from the console's home screen, or from your homebrew launcher.\n\nThe first visit to each place stutters while its shaders are made; they are kept, and later visits are smooth.\n\n### What to expect\n\nMeasured on a PS5 Pro, in Kokiri Forest, at 1920x1080:\n\n- The game itself runs at 31 to 34 frames a second there (the processor is the limit), 60 at the title screen and in\n  movies. Frame generation is on from the start and shows about twice that: 63 to 68 a second in the forest.\n- Played so far: a new game from the title screen through the opening to Link's house, a later start from that\n  autosave, and Kokiri Forest. **Nothing beyond the forest has been played**, and sound and a real controller were\n  not checked by a person: the test runs used scripted input.\n- **It also runs on a base PS5** (PS5 and PS5 Slim), built with the builder's PS5 \u002F PS5 Slim profile, at **about 20\n  frames a second less than a Pro, with frame generation on**: about 45 shown in Kokiri Forest where a Pro shows 63 to\n  68. That figure is from play on a base console, not from a logged run; the other numbers here are a Pro's. The base console's memory was measured, on a Pro started in the base console's mode\n  (12 GB): the forest plays with about 2 GB free.\n\n[ps5\u002FREADME.md](ps5\u002FREADME.md) has the measurements.\n\n### Language\n\nThe game starts in the console's language (Settings > System > Language) when the game has it: English (US and UK),\nFrench (France and Canada), German, Italian, Spanish (Spain and Latin America), Portuguese (Brazil, also given to a\nconsole set to Portuguese (Portugal)), Dutch, Polish, Russian, Japanese, Korean and Chinese (Simplified and\nTraditional). Any other language starts it in English (US). The menu's **Game language** row (Gameplay tab) has\n**Follow the console** first, then each of the game's languages: pick one to keep it whatever the console's is, or\nFollow the console to go back. It applies after a restart, which the menu offers when you close it.\n\n### Updating\n\nDownload the new builder, build again and copy the new `LGSH00001` folder over the one on the console. Your saves\nand settings are in that folder on the console and are not in the one you copy: they stay.\n\n**From v0.1.4 or earlier (title ID `PPSA99025`):** Longshot has its own title ID now, `LGSH00001`, because\n`PPSA99025` is also another homebrew's (#29). Copy the new `LGSH00001` folder to `\u002Fdata\u002Fhomebrew\u002F` as usual and start\nit: its first start copies your saves and settings from `\u002Fdata\u002Fhomebrew\u002FPPSA99025` and moves the old folder's shader\ncaches over, so it does not prepare the shaders again. A notice says when it has; the old folder can then be deleted,\nand its tile on the home screen with it.\n\n### Where the files go\n\nOn the console, everything of Longshot's is in `\u002Fdata\u002Fhomebrew\u002FLGSH00001`:\n\n| | |\n|---|---|\n| `eboot.bin`, `image.bin` | The title, made from your game. |\n| `user\u002F` | Your saves. |\n| `longshot_options.ini` | Your settings. |\n| `language.txt` | The menu's Game language: a language's code, or no code line for Follow the console. |\n| `longshot_env.txt` | The switches of the profile the folder was built for. A line you add is kept until you copy a new folder over it. |\n| `cache\u002F`, `radv-shader-cache\u002F` | Shaders made as you play. Safe to delete: they are made again. |\n| `logs\u002F`, `bug-reports\u002F` | What the title wrote about its runs. |\n\nOn your computer, the folder you built into holds `LGSH00001` and `longshot-ps5-work`, the build's own files (about\n3 GB). Keep the second one and the next build is short; delete it and nothing is lost but time.\n\n### What it connects to\n\nThe builder connects to nothing on its own. **Send to PS5** connects to the address you type, over FTP, on your\nnetwork. The title on the console does not look for updates.\n\n### If something goes wrong\n\n- **The build stops in \"Translating it to C\" or \"Compiling for the console\" with no clear error:** it ran out of\n  memory. Close other programs; for the compile step, lower **Compile at once** (each file takes up to 1.4 GB).\n- **\"the game file gave no program\":** the file is not the supported game and version, or is not a `.nup`.\n- **Linux, the AppImage does not start:** it needs FUSE (`libfuse2` on Ubuntu and Debian), or start it with\n  `--appimage-extract-and-run`.\n- **Windows shows a warning when the builder starts:** it is not code-signed.\n- **Send to PS5 fails:** the console has to be on, with its FTP server running, at that address and port.\n- **Longshot is not on the home screen:** the folder has to be `\u002Fdata\u002Fhomebrew\u002FLGSH00001` itself, with `eboot.bin`\n  directly inside it, and your homebrew environment has to list titles from there.\n- **The title does not reach the game's logos:** check the game file's name and place in \"Put it on the console\"\n  first. What happens without the file was not tried.\n- **Without the window:** `--cli --game \u003Cfile> --out \u003Cfolder> --model base|pro` after the AppImage's name, or after\n  `LongshotPS5Builder.exe`. `--cli --check` checks the builder's own parts.\n\n## In-game menu\n\nLongshot's own menu (resolution, frame generation, sound, controls) is in the PS5 title too, opened and moved in with\nthe controller.\n\n**Opening it:** press the **touch pad's click and Options together**. They are the Switch's − and +, and the menu\nopens on the two pressed together. The PS button stays the console's own. There is no keyboard or mouse on the\nconsole, so the menu's \u003Ckbd>Insert\u003C\u002Fkbd>, \u003Ckbd>F1\u003C\u002Fkbd> and \u003Ckbd>Esc\u003C\u002Fkbd> keys do not apply.\n\n**Moving in it:** L1 and R1 change tab, the D-pad chooses a row and changes it, Circle (the Switch's A) changes it too\nor opens a page, Cross (the Switch's B) goes back or closes the menu.\n\n**What is worth changing on a PS5:**\n\n| Row | On the console |\n|---|---|\n| **Output resolution** (Graphics) | 1920x1080 by default. Choosing 2560x1440 switches the console to that display mode **at the next start**. Measured in Kokiri Forest on a Pro: 31 to 32 game frames a second at 1920x1080, 29 at 2560x1440. 3840x2160 works on a Pro too: played there, about 40 frames a second shown with frame generation on (seen in play, not from the log). |\n| **Quality preset** (Graphics) | \"Auto\" picks Balanced on the console: the full picture, not a reduced one. |\n| **Upscaler** (Graphics) | AMD FSR 3.1 from the next release on, where \"Auto\" chooses. The game's own network is still on the row. |\n| **Frame generation** (Graphics) | On, 2x, from the start: PS5_MihawkGen's network makes one frame between each two of the game's. |\n| **Volume**, **Text speed**, **Field of view**, **Camera** rows | The game's own; nothing console-specific. |\n\n**What does not apply:** NVIDIA DLSS, AMD FSR 4, Intel XeSS, NVIDIA Reflex and AMD Anti-Lag (PC graphics cards'),\nFullscreen and V-Sync (the console has one display mode at a time), the keyboard and mouse rows, the microphone, motion\ncontrols (the DualSense's sensors are not read yet) and the Discord status.\n\nYour choices are saved in `longshot_options.ini` in the title's folder on the console\n([Where the files go](#where-the-files-go)). To go back to the defaults, delete that file.\n\nEvery row of the menu is described in\n[Longshot's own README](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot#in-game-menu), for the PC game.\n\n### Controls\n\nThe DualSense of the user who started the title. By default the buttons sit where the Switch's do:\n\n| Switch | DualSense |\n|---|---|\n| A | Circle |\n| B | Cross |\n| X | Triangle |\n| Y | Square |\n| L, R | L1, R1 |\n| ZL, ZR | L2, R2 |\n| − | Touch pad's click |\n| + | Options |\n| Sticks, stick clicks, D-pad | The same |\n\nRumble goes to the controller. Motion controls, the touch pad's surface and the microphone are not read. The menu's\nControls tab can move the buttons.\n\n## Mods\n\nPut mods in a `mods` folder in the game folder, beside `longshot.exe` (or point `HOS_MODS` at another folder), in the\nlayout emulators use: `mods\u002F\u003Cname>\u002Fromfs\u002F...` holds files that replace or add to the game's own. Deeper layouts such as\n`mods\u002Fcontents\u002F\u003Ctitle id>\u002F\u003Cname>\u002Fromfs` work too. A folder whose name starts with `-` or `_` is off. When two mods\nhave the same file, the one whose whole path relative to `mods` sorts last (ignoring case) wins. Use `01-...`, `02-...`\nat the same level to set the order. Stop the game before changing mods, then restart.\n\nOne of the game's texts names the console: the hint for playing the ocarina by microphone says to use its built-in one.\nThe build rewords it for a PC (\"your microphone\") in your own text files, in each of the game's languages, into the game\nfolder's `texts` folder, and the game reads those instead. A mod's own text file wins, and `HOS_TEXTS=0` in\n`longshot_env.txt` shows the game's own.\n\nOnly RomFS mods are loaded. `exefs` patches (`.pchtxt`, `.ips`) are left out: Longshot compiles the game's code ahead\nof time, so patching its instructions would need a rebuild. The log (`longshot_log.txt`) names each mod and the files\nread from it.\n\nA mod file larger than the game's own does not load unless the resource size table allows for it:\n`System\u002FResource\u002FResourceSizeTable.Product.111.Nin_Ounce_NVN2.rsizetable.zs` gives each file the memory the game sets\naside for it (by the CRC32 of its path without `.zs`; for a texture, its decompressed size + 280). Past that, the game\ngoes on without the mod's file, or a loading screen waits for good. A mod that makes files bigger (HD\ntextures, longer parameter files) ships the table with its entries grown. Since only one mod's table is used, mods that\neach grow files need one table with all their entries, in the mod that sorts last. Longshot merges the button prompts'\nentries into that table (each file gets the larger of the two), so your controller's icons stay in texts; the log says\n`(with the button prompts' sizes merged in)` after the table's line. A table it cannot read that way (not the game's\nformat, or a zstd frame that does not give its size) is used as it is, with the Switch's icons.\nIf a mod includes tables for several game versions, the prompts use the table name from the game's own RomFS,\nnot the first table found in the mod. Other versions' tables do not change the prompts' font or its size entries.\n\nFor authors: the [existing file contract and game-free example](docs\u002Fmods.md) cover discovery, conflicting files,\ndisabling and what this loader does not provide. The example contains only invented text, not a seed or game data.\n\n## Build from source\n\nFor developers, and for players who prefer the command line. The launcher and the builders run the same script,\n`nx2\u002Fmake_game.py`. [CONTRIBUTING.md](CONTRIBUTING.md) has more.\n\n\u003Cdetails>\n\u003Csummary>Windows, from the command line\u003C\u002Fsummary>\n\n```powershell\npython -I nx2\u002Fmake_game.py --nup \"C:\\path\\your-game.nup\" --out \"C:\\Games\\Longshot\" --language en-US\npython -I nx2\u002Fmake_game.py --romfs \"C:\\path\\romfs\" --exefs \"C:\\path\\exefs\" --out \"C:\\Games\\Longshot\" --language en-US\n```\n\nAdd `--check` with your `.nup` or `--exefs` to only check the game's version. It builds nothing.\nAdd `--log \"C:\\path\\build.log\"` to also save the build's output to a file (UTF-8, replaced if it exists); it works\nwith `--check` and `--update` too, and on Linux.\n`LONGSHOT_JOBS=\u003Cn>` (or `--jobs \u003Cn>`) limits how many files compile at once.\n`LONGSHOT_MEM_LIMIT_GB=\u003Cn>` lets the compilers take that many GB together, whatever is free now; up to 4 always run.\n\nYou need:\n\n- Python 3 from python.org (the Microsoft Store's Python installs packages where `python -I` does not look), with\n  `pip install -r requirements.txt` (core tools plus the button-prompt packages).\n- [llvm-mingw](https:\u002F\u002Fgithub.com\u002Fmstorsjo\u002Fllvm-mingw) (the `ucrt-x86_64` build), unpacked as `llvm-mingw` in the\n  clone or with `LONGSHOT_MINGW` set to its folder. Without it the build uses the clang from\n  [emsdk](https:\u002F\u002Fgithub.com\u002Femscripten-core\u002Femsdk) at `C:\\emsdk` with Visual Studio's C++ tools and the Windows SDK\n  (`LONGSHOT_MSVC=1` forces that route).\n- What the builder's `tools` folder carries and a clone does not. From an unpacked release zip, run\n  `LongshotBuilder.exe --cli --help` once (it installs the tools, then runs `make_game.py --help`): the folder is\n  `%LOCALAPPDATA%\\LongshotBuilder\\versions\\\u003Cversion>\\LongshotBuilder\\tools`. The builder sets the variables itself;\n  from the command line, set them before you run `make_game.py`:\n  - `tools\\cpm`: the Vulkan headers and FFmpeg. Set `RX_CPM` to this folder. Without it (and without system\n    Vulkan \u002F SPIR-V \u002F VMA headers or `LONGSHOT_*_HEADERS`), the standalone build stops instead of shipping a\n    game with no renderer.\n  - `tools\\third_party`: the prebuilt files a clone lacks (`a64emit`, `lld-link`, `zbic` and SDL2). Copy its `.dll`,\n    `.exe`, `.lib` and `.sha1` files to the same places under `third_party\\`.\n  - `tools\\work`: copy it to `work\\`. It holds the hot-function list, the link order, the profile and the icon;\n    without them the game builds but runs slower.\n- .NET 8, only if you want to change the builder's `--cli` program itself (`builder\u002FLongshotBuilder`).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Linux, the AppImage from the command line\u003C\u002Fsummary>\n\n```sh\n.\u002FLongshot-\u003Cversion>-x86_64.AppImage --cli --nup ~\u002Fyour-game.nup --out ~\u002FGames\u002FLongshot   # make_game.py's options\n.\u002FLongshot-\u003Cversion>-x86_64.AppImage --play ~\u002FGames\u002FLongshot   # the game in that folder\n.\u002FLongshot-\u003Cversion>-x86_64.AppImage --cli --update ~\u002FGames\u002FLongshot # that folder built again with this release\n```\n\n`LONGSHOT_JOBS=\u003Cn>` (or `--jobs \u003Cn>` with `--cli`) limits how many files compile at once.\n`LONGSHOT_MEM_LIMIT_GB=\u003Cn>` lets the compilers take that many GB together, whatever is free now. Linux stops a compiler\nthat does not fit; it is then compiled again alone at the end.\n\nIn a game folder, `longshot` is the launcher and the game itself is `bin\u002Flongshot`. Started with no arguments, the\nAppImage only says to get the Longshot Launcher.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Linux, without the AppImage\u003C\u002Fsummary>\n\nYou need `clang` and `lld` (LLVM 23 or newer reads the play profile; an older one builds without it), Python 3 with\n`pip install -r requirements.txt`, FFmpeg's development files (with dav1d, for the movies) and SDL3 (SDL2 works too).\nThen run `python -I nx2\u002Fmake_game.py ...` as on Windows. Vulkan \u002F SPIR-V \u002F VMA headers come from the distro, from\n`LONGSHOT_*_HEADERS`, or from a CPM cache via `RX_CPM`.\n\n`scripts\u002Flinux\u002Fdeps.sh tools` fetches and builds all of these into `build-linux\u002Fdeps` (the AppImage's own tools,\n`tools.lock`'s Linux lines), and `scripts\u002Flinux\u002Fappimage.sh` makes the AppImage. A folder built from a source checkout has no launcher: `longshot` there is the game.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>The Windows game, built on Linux\u003C\u002Fsummary>\n\nUnpack llvm-mingw's Linux build (`ucrt-ubuntu-22.04-x86_64`), then run `make_game.py` with `RX_TARGET=windows` and\n`LONGSHOT_MINGW` set to its folder. The objects go to `~\u002F.cache\u002Flongshot-builder-windows`, apart from the Linux game's.\nThe game folder runs under Proton or on Windows.\n\n\u003C\u002Fdetails>\n\n### Running the game from the command line\n\nThe built game is `bin\\longshot.exe` on Windows and `bin\u002Flongshot` in a packaged Linux game folder. A build from a\nsource checkout has `longshot.exe` or `longshot` in its build folder, with no launcher beside it. The `longshot.exe`\nor `longshot` launcher in the game folder does not pass these arguments to the game, so start the game directly to\nuse them.\n\n| Argument | What it does |\n|---|---|\n| `image.bin` | The game image to run. Without it the game uses the `image.bin`, `romfs` and `user` in its folder |\n| `--romfs \u003Cfolder>` | The extracted RomFS folder |\n| `--user \u003Cfolder>` | Where the game keeps per-user data: saves, caches and temp files (and `mouse_sens.txt` when `HOS_MOUSE_SENS` is set; the menu keeps the sensitivity otherwise). Default: `user` in the game folder on Windows, `~\u002F.local\u002Fshare\u002Flongshot` on Linux; with an explicit image path, `user` in the current folder |\n| `--trace` | Log every Horizon OS call (the same as `HOS_TRACE=1`) |\n| `--prepare-shaders` | Prepare the shaders as the first start does, then exit without starting the game (no build step runs it) |\n| `--compile-shaders all` or `most` | What a preparation of this run builds, over `compile_shaders` in `longshot_options.ini` (the same as `RX_VK_COMPILE_SHADERS`): `all` the predicted pipelines too, `most` without them. See [Compile shaders](#compile-shaders) |\n\nFor example, keep saves somewhere else:\n\n```powershell\ncd \"C:\\Games\\Longshot\"\n.\\bin\\longshot.exe --user \"D:\\Longshot data\"\n```\n\n```sh\ncd ~\u002FGames\u002FLongshot\n.\u002Fbin\u002Flongshot --user \"$HOME\u002Flongshot-data\"\n```\n\n`longshot_env.txt` and the other test switches are documented below.\n\n\u003Cdetails>\n\u003Csummary>AMD FSR 3.1 (every build)\u003C\u002Fsummary>\n\n**AMD FSR 3.1** in the Graphics tab's **Upscaler** row (`dlss=3` in `longshot_options.ini`; `RX_VK_FSR=1` for one run,\n`RX_VK_FSR=0` never) upscales in place of the game's own network, and with **Frame generation** at 2x its frame\ninterpolation can make the frame in between with `RX_VK_FSR_FG=1` (opt-in: the game draws its HUD into the same picture\nand FSR 3.1 has no HUD-less colour to keep it still, so the HUD smears; by default the renderer's own makes it). Both are AMD's FidelityFX\nSDK 1.1.4 shaders (`third_party\u002Ffidelityfx-sdk`, MIT), compiled into the renderer: no AMD runtime or DLL is needed, and\nthe row offers FSR 3.1 on any Vulkan 1.3 GPU with push descriptors, extended storage image formats and storage writes\nwithout a format (`vk: fsr3: ... can run on this GPU` in the log). It upscales on the same inputs as DLSS and FSR 4: the\nscene's colour, its depth, motion from the camera with the skinned characters' own drawn over it (Link, his shield and\nthe people around him keep their outline while they move), and the same camera jitter (`RX_VK_FSR_JITTER=0` turns it\noff). Things that move by themselves and are not skinned (Navi's body, props) can still trail. `RX_VK_FSR3_CHAIN=0` gives\nit the camera's motion alone, as before.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>NVIDIA DLSS (optional, NVIDIA's SDK under NVIDIA's license)\u003C\u002Fsummary>\n\nA game built with NVIDIA's DLSS SDK offers **NVIDIA DLSS** and **NVIDIA DLAA** in the Graphics tab's **Upscaler** row on\nNVIDIA RTX cards (`dlss=` in `longshot_options.ini`, `RX_VK_DLSS=0\u002F1\u002F2` for one run): DLSS Super Resolution in place of\nthe game's own upscaler, with camera jitter (**NVIDIA Reflex** needs no SDK and is in\nevery build). NVIDIA's files are NVIDIA's, under its own license, the\n[NVIDIA RTX SDKs license](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FDLSS\u002Fblob\u002F9981c6350dc58c0ce21f024fd65e31e851c31689\u002FLICENSE.txt).\nLongshot never includes or redistributes them: each build downloads them for itself, and only after you accept that\nlicense. Never share a game folder built with them, and do not post builds made with them.\n\n- **The Longshot Launcher, Windows and Linux:** turn on **DLSS** in the build's settings. It is off by default and shows\n  NVIDIA's license when you turn it on. The build downloads the SDK into the launcher's folder and puts DLSS's runtime\n  (`nvngx_dlss.dll`, `libnvidia-ngx-dlss.so.\u003Cversion>` on Linux) and DLSS Frame Generation's (`nvngx_dlssg.dll`,\n  `libnvidia-ngx-dlssg.so.\u003Cversion>`) in the game folder's `ngx` folder. An update of that folder keeps DLSS.\n- **A builder from the command line:** `--cli` with make_game.py's `--fetch-ngx-sdk --accept-nvidia-license`\n  (below: what they do). The SDK goes to `work\u002Fngx-sdk` in the Longshot folder, or to `LONGSHOT_NGX_SDK` when that is set\n  (the Builder drops a variable set on the PC, so a launcher has none).\n- **Windows, the command line:** `python -I scripts\u002Fngx_sdk.py --platform windows \u003Csdk folder>` asks you to accept\n  NVIDIA's license (or pass `--accept-nvidia-license`) and fetches the headers, `nvsdk_ngx_s.lib`, `nvngx_dlss.dll` and\n  `nvngx_dlssg.dll`, each checked against its SHA-256. Then build with `LONGSHOT_NGX_SDK=\u003Csdk folder>`: `make_game.py`\n  copies both runtimes into `\u003Cgame folder>\\ngx`. NGX is also pointed at `%LOCALAPPDATA%\\Longshot\\ngx`, and at\n  `RX_VK_DLSS_DIR` when it is set, and uses the newest of each it finds across them (to try a given one, make sure no\n  other folder has a newer one). Without `nvngx_dlssg.dll` there, frame generation takes the driver's own copy, which\n  may be older: one that makes 1 frame at most, or refuses every set. Never copy NGX's core, `_nvngx.dll`, beside\n  the game: it comes with NVIDIA's driver.\n- **Linux, a build from source:** `scripts\u002Flinux\u002Fngx-sdk.sh \u003Csdk folder>` (it runs `scripts\u002Fngx_sdk.py --platform\n  linux`) asks you to accept NVIDIA's license and fetches `libnvsdk_ngx.a` for the build,\n  `libnvidia-ngx-dlss.so.\u003Cversion>`, DLSS's runtime, and `libnvidia-ngx-dlssg.so.\u003Cversion>`, frame generation's. Then\n  run the build with `LONGSHOT_NGX_SDK=\u003Csdk folder>` set: `make_game.py` puts both runtimes in the game folder's `ngx`\n  folder. NGX's core comes with NVIDIA's Linux driver.\n- **Linux, a game folder with other than plain English letters in its path:** NVIDIA's NGX on Linux loads DLSS's\n  runtimes only from a folder whose whole path is ASCII. A game in `~\u002FGames\u002FLongshot` needs nothing more. A game in a\n  folder such as `~\u002FGames\u002FLongshot-Café` (the `é` is not ASCII) cannot use the runtimes in its own `ngx` folder, and the\n  log and the Insert menu say so: copy `libnvidia-ngx-dlss.so.*` and `libnvidia-ngx-dlssg.so.*` from there into\n  `$XDG_DATA_HOME\u002Flongshot\u002Fngx`\n  (`~\u002F.local\u002Fshare\u002Flongshot\u002Fngx`), which the game also looks in, or into any other folder with an ASCII path and name\n  that folder in `RX_VK_DLSS_DIR`.\n\nThe **DLSS model** row chooses DLSS's network, by NVIDIA's preset letter, for every mode: **Transformer (K)**, the\ntransformer model and the one tested most here (the default); **Transformer 2 (M)**, NVIDIA's second-generation\ntransformer as it picks it for Performance; **Transformer 2 (L)**, the same generation as tuned for Ultra Performance;\n**NVIDIA default**, which lets DLSS's runtime pick for each mode, so it can change with a runtime update. The runtime\nthe SDK comes with (310.9.16) has all of them. A change applies at once, without a restart (`dlss_model=` in\n`longshot_options.ini`, 0 to 3 in that order). `RX_VK_DLSS_PRESET=\u003Cletter>` (or `0` for NVIDIA's default) chooses\nthe preset for one run and wins over the row; the log's `vk: NVIDIA DLSS: ... preset \u003Cletter>` line says which one was\nasked for, and with `RX_VK_DLSS_LOG=1` NGX's own `Using App hint Preset \u003Cletter>` lines say which it took.\n\n**8 GB cards:** DLAA draws the 3D at full size, and DLSS and DLAA add images of their own beside the game's. In busy\nareas that can pass what the driver allows the game, and the game then stutters: Quality or Balanced is safer there.\nThe log's `vk: status:` line every 600 frames shows the video memory in use of the allowance, with DLSS's details\n(its images' size, the jitter and the actor motion) appended while it draws, and a `vk: over the driver's\nvideo-memory allowance` line says when the game passed it.\n\nThe game's log says whether DLSS started, and why not when it did not (`vk: NVIDIA DLSS:` lines in `longshot_log.txt`).\nNGX starts on demand: when the Insert menu first opens (to know whether the Upscaler can offer DLSS) or at the first\ngameplay upscale with DLSS chosen, so on the title screen the log has no NGX lines yet.\nWith `RX_VK_DLSS_LOG=1` NGX's own lines go there too (`ngx:`). Some of them look like errors but are not:\n`failed to load NGXCore: 126` (twice) is NVIDIA's library looking for `_nvngx.dll` and `nvngx.dll` beside the game, which\nare not there on purpose, before it loads the driver's; `Feature ... failed to load from cache` is NGX finding no model\nof its own downloads (`C:\\ProgramData\\NVIDIA\\NGX\\models`) before it uses the game folder's `nvngx_dlss.dll`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>AMD FSR 4 (optional, AMD's DLLs not included)\u003C\u002Fsummary>\n\nA game built with FSR 4 offers **AMD FSR 4** and **AMD FSR 4 Native AA** in the Graphics tab's **Upscaler** row: AMD's\nmachine-learned temporal upscaler in place of the game's own, on the same inputs as DLSS (the scene's colour and depth, the\ncamera's and the characters' motion, and the camera jitter). Native AA draws the 3D at full size and smooths its edges.\nWith HDR on **Native**, it takes the game's HDR colour as linear light, so highlights above the paper white are kept\n(`RX_VK_FSR4_HDR=0`: cut at the paper white, as before).\nUnlike FSR 3.1 (above), it runs AMD's own DLLs, so it needs them beside the game. Choose it in the menu (`dlss=4` or `5`\nin `longshot_options.ini`, `RX_VK_FSR4=1` or `2` for one run, `RX_VK_FSR4=0` to leave it out).\n\n- **Windows, the Longshot Launcher:** turn on **FSR 4** in the build's settings. It shows AMD's license first and stays\n  on only if you accept; the build then fetches AMD's DLLs for you (below), into the launcher's folder and the game\n  folder.\n- **The command line:** `make_game.py --fsr` (or `LONGSHOT_FSR=1` for `nx2\u002Fbuild.py`). Rebuilding a folder built with\n  it (`--update`) keeps it; `--no-fsr` takes it out.\n- **AMD's files:** Longshot includes only AMD's MIT-licensed API headers (`third_party\u002Ffidelityfx`). Put\n  `amd_fidelityfx_loader_vk.dll` and `amd_fidelityfx_upscaler_vk.dll` from the\n  [FidelityFX SDK](https:\u002F\u002Fgithub.com\u002FGPUOpen-LibrariesAndSDKs\u002FFidelityFX-SDK) 2.4 release (`Kits\u002FFidelityFX\u002Fsignedbin`)\n  beside the game's exe (`bin\\longshot.exe`) or in the game folder. (`RX_VK_FSR_DIR` names another folder, for testing:\n  set it in the environment or a `HOS_ENV_FILE` file; `longshot_env.txt` takes no paths.) Without them the Upscaler row\n  says so and offers the rest. On Linux, a Vulkan FSR 4 library (`amd_fidelityfx_upscaler_vk.so`, such as fsr4-vk's)\n  takes their place: AMD publishes none for Linux, so you put it beside the game yourself. A Linux build with FSR 4\n  (`--fsr`) compiles it into the Vulkan back end, which every build compiles.\n- **Or fetched for you (Windows):** `make_game.py --fsr --fetch-fsr-runtime --accept-amd-license` downloads those two\n  DLLs and AMD's license from AMD's FidelityFX SDK repository at the v2.4.0 tag, checks each against its SHA-256, and\n  puts them in the game folder (`LONGSHOT_FFX_SDK=\u003Cfolder>` keeps them between builds, default `work\ffx-sdk`).\n  `python -I scripts\u002Fffx_sdk.py --accept-amd-license --game \u003Cgame folder>` does the same for a game built already.\n  Without `--accept-amd-license` nothing is downloaded (the script asks when run by hand), as with NVIDIA's license for\n  DLSS. AMD DLLs already in the game folder that are not v2.4.0's (a newer SDK put there by hand) are left alone, and\n  the build says so. They are AMD's, under\n  [AMD's FSR SDK license](https:\u002F\u002Fgithub.com\u002FGPUOpen-LibrariesAndSDKs\u002FFidelityFX-SDK\u002Fblob\u002F7539ae8b6568ad29ed78a753404351daf3b5cca7\u002FKits\u002FFidelityFX\u002Fdocs\u002Flicense.md)\n  (`LICENSE-AMD-FSR-SDK.md` beside them). On Linux the flag does nothing but say so.\n\nThe log's `vk: AMD FSR 4:` lines say which of AMD's upscalers it found for the card and which it uses (the newest FSR 4;\nnever an older FSR in its place), and why not when it did not start. Tested on an RX 6700 XT (RDNA 2).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Intel XeSS (optional, Windows, Intel's DLL not included)\u003C\u002Fsummary>\n\nEvery Windows build offers **Intel XeSS** and **Intel XeSS Native AA** in the Graphics tab's **Upscaler** row once Intel's\n`libxess.dll` is beside the game: XeSS Super Resolution, Intel's machine-learned temporal upscaler, through its Vulkan\nAPI, in place of the game's own, on the same inputs as DLSS and FSR 4 (the scene's colour and depth, the camera's and the\ncharacters' motion, and the camera jitter). Native AA draws the 3D at full size and smooths its edges. It runs on Intel\nArc and Iris Xe GPUs, and on other GPUs whose Vulkan driver has what XeSS asks for (storage image writes without a format,\n`VK_EXT_mutable_descriptor_type`). With HDR on **Native**, it takes the game's HDR colour as linear light, with XeSS's own\nexposure (`RX_VK_XESS_HDR=0`: cut at the paper white, as with the other upscalers before).\nChoose it in the menu (`dlss=7` or `8` in `longshot_options.ini`, `RX_VK_XESS=1` or `2` for one run, `RX_VK_XESS=0` to\nleave it out: then the library is not even loaded). The Auto (this PC) preset never chooses it; it says in the log when\nthe DLL is there.\n\n- **Intel's file:** Longshot includes only Intel's MIT-licensed XeSS API headers (`third_party\u002Fxess`). `libxess.dll` is\n  Intel's, under the Intel Simplified Software License, and Longshot does not ship it. Take it from the\n  `bin` folder of a recent [Intel XeSS SDK](https:\u002F\u002Fgithub.com\u002Fintel\u002Fxess\u002Freleases) release (one whose `inc` folder has\n  `xess_vk.h`: the Vulkan path), or from a game that ships it, and put it beside the game's exe (`bin\\longshot.exe`) or in the game folder.\n  (`RX_VK_XESS_DIR` names another folder, for testing: set it in the environment or a `HOS_ENV_FILE` file;\n  `longshot_env.txt` takes no paths.) Without it the Upscaler row does not offer XeSS and its hint says why.\n- **Or fetched for you:** RecompLauncher's **Intel XeSS** tick (Windows; off until you accept Intel's license, which it\n  shows), or `make_game.py --fetch-xess-runtime --accept-intel-license`, downloads `libxess.dll` 2.0.2.68 (78 MB, signed\n  by Intel) with Intel's license and third-party notices from Intel's XeSS SDK repository, at the commit\n  `third_party\u002Fxess`'s headers come from, checks each against its SHA-256, and puts them in the game folder\n  (`LONGSHOT_XESS_SDK=\u003Cfolder>` keeps them between builds, default `work\u002Fxess-sdk`).\n  `python -I scripts\u002Fxess_sdk.py --accept-intel-license --game \u003Cgame folder>` does the same for a game built already.\n  Without `--accept-intel-license` nothing is downloaded (the script asks when run by hand), as with AMD's and NVIDIA's\n  licenses. A `libxess.dll` already in the game folder that is not this one (a newer SDK's, put there by hand) is left\n  alone, and the build says so. It is Intel's, under the\n  [Intel Simplified Software License](https:\u002F\u002Fgithub.com\u002Fintel\u002Fxess\u002Fblob\u002Fde0fb9c1c510661c571164e1418ceca8101dab69\u002FLICENSE.txt)\n  (`LICENSE-INTEL-XESS-SDK.txt` beside it). On Linux the flag does nothing but say so.\n- **Windows only.** Intel makes no XeSS library for Linux, so a Linux build has no XeSS, and the row says so. XeSS Frame\n  Generation and Intel's latency reduction (XeLL) are Direct3D 12 only and are not in Longshot.\n\nThe Render resolution row's stops run under the XeSS mode whose range holds them (since XeSS 1.3 each mode takes any size\nfrom its own ratio up to the output: Ultra Quality Plus 1.3x, Ultra Quality 1.5x, Quality 1.7x, Balanced 2x, Performance\n2.3x, Ultra Performance 3x), so the game's dynamic resolution at Auto runs under one mode too. The log's\n`vk: Intel XeSS:` lines say which DLL it loaded and its version, the extensions and features it asked of the Vulkan\ndriver, the mode it was made with, and why not when it did not start. Not yet run in the game: reports from Intel GPUs\nare welcome.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Switches for testing (longshot_env.txt)\u003C\u002Fsummary>\n\nSwitches to test (`RX_VK_NOOPT=1` and the others) go in `longshot_env.txt` in the game folder, one `NAME=VALUE` a\nline, on Windows and Linux. The running game reads it, not the builder. A test run can name another file with\n`HOS_ENV_FILE=\u003Cpath>`; the game then reads that one instead and leaves `longshot_env.txt` alone.\n`longshot_env.txt` sets only the game's own switches (names that start with `RX_`, `HOS_`, `LONGSHOT_`, `EDEN_`,\n`NVN_` or `SDL_`, but not SDL's library names such as `SDL_VULKAN_LIBRARY`), and no value that is a path except\n`RX_VK_DLSS_DIR`'s (a folder on this PC, not a network share), and no value at all for the switches that name a file\nor folder (`HOS_AUDIO_DUMP`, `RX_VK_SHOTS` and the like) or press buttons on a timer (`HOS_INPUT_SCRIPT`,\n`RX_VK_MENU_SCRIPT`); other lines are left out, and the log says so. Switches that need a path, or other variables, go\nin a file named by `HOS_ENV_FILE`.\nA switch set in the environment the game is started with (a shell's `HOS_FULLSCREEN=0 .\u002Flongshot`, a launcher's own)\ngoes over the same name in the file, and the log says so; within the file, a later line replaces an earlier one. A\nswitch that stands in for a menu row (`RX_VK_PACE`, `RX_VK_UPSCALE`, `RX_VK_FRAMEGEN_MULT`, `HOS_REALTIME_STEP`,\n`HOS_DYNRES`, `HOS_OUTPUT_RES`) applies to that run only: `longshot_options.ini` keeps the value chosen in the menu.\n\nTo enable the debug tools, turn **Debug tools** on in the menu's Debug tab (or add `HOS_OOT_CHEATS=1` to\n`longshot_env.txt` in the game folder). The tools then show below it on the same tab. **Damage taken** is in the\n**Player** group beside **Heart protection**: Half, Normal (the default), Double or Quadruple (`damage_taken=0\u002F1\u002F2\u002F3`\nin `longshot_options.ini`). It applies only while Debug tools is on: off, Link takes Normal damage, and the saved\nchoice returns when the tools do. Heart protection takes priority while enabled. Half scales the full hit before life\nis clamped to zero: with two quarter hearts left, a four-quarter hit still kills. The tab's Developer section, always\nshown, has the Descriptor reuse, Sampler cache, Robust buffers and ASTC as RGBA8 rows, and on Intel graphics on\nWindows the Intel shader compiles row.\n\nA save whose minimap stopped showing after a Teleport on an earlier build (the area left had hidden it, and the flag\nstayed set in the save) is mended by the Teleport itself: teleport to an outdoor area, wait until you can move, then\nsave from the game's System menu. The minimap then stays after a restart.\n\n`RX_VK_UI_GAME_FONT=0` draws the menu with the included font (Libertinus) even when the game's files have the game's own\nmenu font. `RX_VK_UI_PROMPTS=pad` (or `keys`) shows the controller's (or the keyboard's) prompts whatever was used last,\nfor screenshots.\n\nFor a first run on a 4 GB card such as a GTX 1650, `RX_VK_LOW_SPEC=1` starts with the Minimum (4GB) preset, with\nframe generation and upscaling off. It applies only when there is no `longshot_options.ini` yet; after that, change\nthe settings in the in-game menu.\n\nOn **Minimum (4GB)**, when the driver reports a nonzero VRAM budget of at most 4.5 GiB, or the GPU is integrated\nand the PC has 16 GB of RAM or less (its \"VRAM\" is that RAM, whatever budget the driver reports), sampled ASTC textures\nuse a 1024 dimension limit and an 8 MiB decoded-size threshold for leaving out their top mip levels. This lowers texture\ndetail to reduce the working set. Other presets and larger or unknown budgets keep the 2048 \u002F 64 MiB defaults;\nuncompressed render targets, depth images and the separate `RX_VK_TEX_MAX_MB` allocation limit keep their handling.\nThe driver budget is sampled at the first texture creation and kept for the session. It is a heuristic, not a physical\nVRAM measurement: other applications can lower the budget even on a larger card.\n\n`RX_VK_LOW_VRAM_MIPS=0` (also `off`, `false` or `no`) disables the automatic rule. `RX_VK_TEX_MAX_DIM` overrides only\nthe dimension limit, so setting it to 2048 still leaves the automatic 8 MiB threshold active on Minimum with a small\nbudget. `RX_VK_TEX_SKIP_MB` overrides that threshold using its existing parsing. For a more aggressive experiment,\nuse `RX_VK_TEX_MAX_DIM=512 RX_VK_TEX_SKIP_MB=2`. Changes to these environment switches take effect after a restart.\n\n`RX_VK_MOVIE_UPSCALE=linear` replaces the movies' neural upscale with the plain linear one. The default, `auto`, keeps\nthe networks and falls back only when a movie frame takes the GPU more than 40 ms. That is on NVIDIA cards: on other\ncards, or where the GPU cannot multiply the networks' matrices itself, the movies always get the linear upscale. It does\nnot change the gameplay upscaler, and movies can look softer. `RX_VK_NETWORK_KEEP=all` takes precedence and keeps the\nmovie networks.\n\nA movie whose pictures take longer to decode than the time between them is shown, rather than skipped until the sound\nhas moved on: on a slow CPU the opening used to drop most of its pictures. How fast the decoder is counts from its recent\npictures, so a slow first picture does not stop a decoder that keeps up from catching up later, and catching up takes at\nmost one picture's time in a frame. With a decoder slower than the movie, the picture can fall behind the sound.\n`HOS_VIDEO_NO_CATCHUP=1` skips nothing. Each picture is waited for for about a tenth of a second\n(`HOS_VIDEO_ACQUIRE_TRIES=1`: a count of sleeps instead of the clock). After a movie stops or is flushed, and nothing new\nhas been submitted, there is no wait. The first picture can still be black on some PCs; why is not known yet.\n\nA PC with 4 logical processors or fewer decodes the movies on 2 threads rather than one per processor, so the decoder\nleaves the game's own threads their time. A 4-thread laptop with Intel UHD Graphics showed the title and the opening\nmovie at about 35 fps of 60, with the game's thread waiting 14 to 24 ms on most frames; that report was not run again\nwith this change. `HOS_DAV1D_THREADS=\u003Cn>` sets the count on any PC.\n\nOn Windows, Intel's compiler (UHD and Arc) is entered by one thread. A fault inside it leaves that shader out instead\nof closing the game, and the program is written to `longshot_driver_faults.txt` so that later starts on the same\ndriver leave it out too (delete the file to try again). This covers the game's shaders and the renderer's own (texture\ndecoding, upscaling, frame generation). A draw that only asks whether its pipeline is ready never waits behind another\nthread's compile: while one is compiling, the answer is \"not yet\", even for a pipeline already in a cache, and the\ndraw is left out until a worker has made it (the log's `vk: asked cold: Intel's gate busy` lines count these). The\nrenderer's own pipelines made at their first use (the movie's upscale, the texture decoders, a masked clear, the\nwrite-back and late-page fixes) do wait for a compile under way. Whether the driver keeps working after a caught fault\nhas not been tested. The first scene can still pause while shaders compile, especially when they were not prepared at\nthe build. If a build's preparation stopped (\"the GPU driver stopped responding\"), the game leaves a\n`longshot_prepare_skipped` file in its `cache` folder and every start after that builds shaders only when first drawn.\nBuild again with **Prepare shaders now** ticked, or delete that file, to prepare them with this fix.\nThe Debug tab's **Intel shader compiles** row (Developer section, shown on Intel graphics on Windows) chooses: **One at\na time**, the safe choice on a CPU with 4 cores or fewer; **Side by side**, faster builds on a CPU with many cores, but\nIntel's driver can crash the game while building them; or **Auto**, the default: side by side on the Arc B-series with\ndriver 101.9154 or newer (on a B580 a new area's first visit froze the picture for four to seven minutes one at a time,\nand not at all side by side, with no fault in ten areas), one at a time on every other Intel GPU. It applies after a\nrestart. `RX_VK_NO_INTEL_SERIAL=1` is Side by side for a run and `=0` One at a time, whatever the row says. NVIDIA, AMD, and Intel on other systems are\nunchanged.\n\n`RX_VK_SKIP_CODE=\u003Cprefix,...>` leaves out the draws of every program with a stage whose native code key starts with one\nof the prefixes (the keys the log prints after \"its code:\"). On a Steam Deck, `RX_VK_SKIP_CODE=2c56dc1006942f74`\navoids a GPU hang in Kokiri Forest and the Great Deku Tree: the GPU runs for seconds in the programs that share that\ntask shader (a culling pass) until the kernel resets it ([#817](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot\u002Fissues\u002F817)).\nIt is a workaround, not a fix: those are task + mesh programs, so the geometry they draw goes with them, and key models\nare missing while it is set. Off unless set.\n\nThe switches for scripted test runs, screenshots, frame dumps and profiles are in the\n[development guide](docs\u002Fdevelopment.md#switches-for-testing-and-debugging).\n\n`RX_VK_WB_MAX_KB=\u003CKB>` (off by default; 1024 is the tested value) is the size from which a written GPU binding may go\nwithout most of its write-back. The game\nwrites tens of MB of culling lists and per-frame buffers through the GPU that the CPU never reads, and copying them back\nsat on every submit's memory sync: in Hyrule Field on a 10 GB RTX 3080, about 66 MB and 4.4 ms a submit, holding the\nscene at 45-48 fps. The CPU does read and write parts of some large ones, so a binding over the size is written back\nwhole for the first `RX_VK_WB_PROBATION` submissions that write it (default 8), and after that only the ranges the CPU\nread or wrote meanwhile, and its first and last page when it shares them, are written back (`gpu\u002Fvk\u002Fwb_learn.h`). The\ntrade-off: a range the CPU first touches only after that (read more rarely than every 8 frames) gets the stale copy\nonce, and is written back from then on; the log names each one (`in a binding whose write-back was left out`).\nUnset or `0`, every written binding is copied back whole. It is off by default because, measured so far (an RTX 3060 Ti\non Windows, an RX 580 on Linux with its mirror forced on), it copies back ~50 MB a frame less at the same frame rate:\nresults from laptops and other slow PCIe links are wanted. `RX_VK_LOG_WB_SKIPS=1` lists the bindings left out every\n600 submits.\n\n`RX_VK_PROGRAM_CACHE_ZSTD=1` keeps the translated shader programs in `longshot_programs.zst.bin`, each record\ncompressed with zstd and unpacked when it is read. The uncompressed cache is about 6.9 GB; in the reference cache\n(46,587 programs) zstd's level 3 made it 1.83 GB (3.75x). It is a file of its own: an existing\n`longshot_programs.bin` is left alone, and the first run translates the programs into the compressed cache.\n\n\u003C\u002Fdetails>\n\n## How it works\n\n1. `nx2\u002Flift.py` translates the game's ARM64 code to C.\n2. `nx2\u002Fbuild.py` compiles that C together with `host\u002F`, which plays the part of the console's system.\n3. `host\u002Fnvn_native.c` records the game's NVN2 graphics calls, and `gpu\u002Fvk\u002F` replays them on Vulkan.\n4. Switch 2 Ampere shaders are lowered to Maxwell (`lower_to_maxwell.h`) and translated to SPIR-V by Eden's shader\n   recompiler.\n\nMore detail is in the [development guide](docs\u002Fdevelopment.md) and the [design notes](docs\u002Fdesign.md).\n\n## Want to help?\n\nTesting on other graphics cards and reporting the result already helps a lot, and so does playing further into the\ngame than anyone has yet.\n\n### Send your pipeline list\n\nThe first time the game meets a pipeline it builds it on the spot, which stutters. Releases build a list of known\npipelines before the title, and every player's play adds to it. To send yours:\n\n1. In the game, open the menu (Insert or F1), go to the **Debug** tab and choose **Save my pipeline list** (under Developer). Or,\n   from a clone, run `python -I nx2\u002Fpipeline_share.py \u003Cgame folder>`.\n2. It saves `longshot-pipelines-\u003Cdate>.zip` in your Downloads folder, copies a filled-in report to the clipboard and\n   opens the [Submit your pipelines](https:\u002F\u002Fgit.magicbean.dev\u002FMagicBeanDev\u002FLongshot\u002Fissues\u002F14) issue in your browser.\n3. Attach the zip to a comment there, paste the report and fill in where you played.\n\nThe zip holds only `longshot_pipeline_states.bin` (shader hashes, formats and draw state, and the hashes of the compute\nprograms your play ran, so that a release can keep those ready too: no game code, game data or personal info) and the\nreport (the version, OS, GPU and driver, output and render resolution, upscaler, frame\ngeneration, HDR and the mods the game loaded). Nothing is uploaded for you. If the list is missing or damaged, it says\nso and saves nothing. In a run without a window (`HOS_HEADLESS`) the menu saves the zip but opens nothing.\n\nBigger ways to help:\n\n- **Linux testing.** The Linux build (`host\u002Fposix`) has been tested on several distributions and cards: reports from\n  others still help.\n- **Fixes in your own fork.** Fork the project, fix what you find and send the change back. Keep game files, keys and\n  anything generated from your game out of it.\n\n[CONTRIBUTING.md](CONTRIBUTING.md) has the setup, the test commands, the code conventions and what a good pull request\nlooks like.\n\n## License\n\nLongshot is free software under the [GNU General Public License, version 3 or later](LICENSE) (GPL-3.0-or-later).\nIt is a modified version of Hookshot, which NotRexed released under the same license; the changes made since the fork\nare Longshot's.\n\n    Hookshot: Copyright (C) 2026 NotRexed and the Hookshot contributors\n    Longshot: Copyright (C) 2026 the Longshot contributors\n\nIt includes code from Eden and suyu, which are under the GPL too. Third-party parts under other licenses that\nwork with the GPL (Sirit, the Vulkan Memory Allocator, SDL, Opus, Dear ImGui, zstd, the Libertinus fonts, zbic and the\na64-kit tools) keep their own notices in their folders.\n\nLongshot is an unofficial fan project, not affiliated with or endorsed by Nintendo. The Legend of Zelda and Ocarina of\nTime are trademarks of Nintendo.\n\n## Credits\n\nLongshot is a fork of NotRexed's [Hookshot](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot), and exists thanks to the work of many\npeople:\n\n- **NotRexed**: [Hookshot](https:\u002F\u002Fgithub.com\u002FNotRexed\u002FHookshot), which Longshot is a fork of, BlueShell (Mario Kart World),\n  Skybound (Tears of the Kingdom) and the a64-kit tools.\n- **[Eden](https:\u002F\u002Fgit.eden-emu.dev\u002Feden-emu\u002Feden)** and **Eglantine**: the shader recompiler and Switch 2 shader work.\n- **suyu**: the graphics decoders and the AArch64 translator.\n- **[seedds\u002Fnxnative](https:\u002F\u002Fgithub.com\u002Fseedds\u002Fnxnative)**: reference for how task and mesh shaders work.\n- **[EvilBoyce \u002F evilmfkr](https:\u002F\u002Fgithub.com\u002Fevilmfkr\u002FHookshot)** (EvilOOT): the GPU culling that brings back Kokiri's foliage\n  (trees, ferns, grass, falling leaves, fireflies), the ambient light probes, the pond's water, the game's own fog, the freeze\n  after Load (Horizon's mutex handoff) and the exposure flicker fix.\n- **[zortos293\u002FLichii](https:\u002F\u002Fgithub.com\u002Fzortos293\u002FLichii)**: reference for Ampere shader lowering, and its compare-exchange retry fix.\n- **[mstorsjo\u002Fllvm-mingw](https:\u002F\u002Fgithub.com\u002Fmstorsjo\u002Fllvm-mingw)**: the bundled Windows compiler (no Visual Studio needed).\n- **NVIDIA DLSS**: builds made with NVIDIA's DLSS SDK (optional, downloaded by each build, never bundled) use NVIDIA DLSS\n  Super Resolution, NVIDIA's technology. NVIDIA and DLSS are trademarks of NVIDIA Corporation.\n- **AMD FSR 3.1 and FSR 4**: every build has AMD FidelityFX Super Resolution 3.1, built from AMD's MIT-licensed FidelityFX\n  SDK shaders; builds made with FSR 4 (optional; AMD's DLLs are never bundled) use AMD FidelityFX Super Resolution 4\n  through AMD's MIT-licensed FSR API headers. Both are AMD's technology. AMD, Radeon and FidelityFX are trademarks of Advanced Micro\n  Devices, Inc.\n- **[kinnay\u002Fzbic](https:\u002F\u002Fgithub.com\u002Fkinnay\u002Fzbic)**, **Opus** and **SDL**: decompression, audio and controllers.\n- **[sostenesfreitas\u002Focarina-recomp](https:\u002F\u002Fgithub.com\u002Fsostenesfreitas\u002Focarina-recomp)**: this README's layout, and its notes\n  confirmed the mesh stage's control section.\n- **[MythosOfs\u002FOrchid](https:\u002F\u002Fgithub.com\u002FMythosOfs\u002FOrchid)**: the fog and exposure workaround the game used before\n  its fog and lighting were fixed.\n- **Mesa (NAK)**: the reference for Ampere's instruction encoding.\n- Everyone who sent fixes: SkippySteve (Linux and the AppImage, and many more), monsterlag, klimovich008, hckrman101 (NVIDIA\n  DLSS, DLAA and Reflex, the exposure flicker and fog fixes, build speed, CI), madebyjordan (AMD FSR 4.1), N3oTraX (FSR 4 on\n  Linux), shayderrr, gab9281, Wpaif, nicholasgower, ZurielAtr, Joey-Magnus, Zorkats,\n  d3zessete, chrispository, vzeol, leonidasmark, Segmentree, ShyVortex, hiKareeem and i900gaming, among others.\n","这是一个将游戏 Longshot 静态重编译并原生移植到 PlayStation 5 的开源项目，不依赖模拟器，而是通过 PS5_Vulkan 驱动实现 Vulkan 图形渲染。核心功能包括提供跨平台（Linux\u002FWindows）的 PS5 构建工具（Builder），用于从用户本地已有的游戏镜像生成可在越狱 PS5（含标准版、Slim 和 Pro）上运行的原生 PS5 应用包；整个流程在用户本地完成，不包含游戏文件或密钥。适用于具备 PS5 越狱环境、希望在原生硬件上运行经静态重编译优化的主机游戏的开发者与高级玩家。",2,"2026-11-24 04:53:11","CREATED_QUERY"]