[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112755":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":12,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":8,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},112755,"Resistance2Port","miroslavdanutalexandru-alt\u002FResistance2Port","miroslavdanutalexandru-alt",null,"C",85,3,1,8,0,16,28,14,51.61,"Other",false,"main",[],"2026-11-21 00:22:24","2026-11-22 17:51:20","# Resistance 2 — native PC port\u002Frecomp (work in progress)\n\nA static recompilation of the PS3 game *Resistance 2* into a native Windows program. No emulation of the CPU: the game's PowerPC and SPU code is translated to C\u002FC++ and compiled for your PC. Graphics go through RPCS3's Vulkan renderer, with NVIDIA DLSS \u002F AMD FSR upscaling, 60 fps, keyboard and mouse controls, and higher resolutions.\n\n> ⚠️ **Not Perfect.** I have only tested it **on my PC** (Ryzen 5 5600X, GeForce RTX 5070, 32 GB RAM, Windows 11, 1080p screen) and haven't beaten the game. The campaign has been played through the opening Iceland levels; past that it's untested, so things could go wrong. Some crashes or freezes may happen.\n\n> **No game files and no translated game code are distributed, in this repository or in the installer.** You need your own copy of the game. Setup decrypts its program on your PC, translates it into C\u002FC++ and builds the game there; the generated code and the built game never leave your PC, and no prebuilt game program is released. The repository holds the port's own code plus the small references it needs to find its place in the game's program: function addresses, patch values and short context lines from the generated code (`tools\u002Fhooks\u002F` and `project\u002Fr2_patches.cpp`).\n\n## What you need\n\n- A PC running Windows 10 or 11 (64-bit).\n- A CPU with AVX2: Intel 4th gen or newer, or any AMD Ryzen. Older CPUs without AVX2 won't run it.\n- A Vulkan 1.3 GPU. DLSS needs a GeForce RTX card; everything else (including FSR) works on AMD, NVIDIA and Intel. Only tested on NVIDIA so far.\n- Your own dump of **Resistance 2, EU disc (BCES00226), version 1.00**. This is the folder that contains `PS3_GAME`, the same kind of folder RPCS3 uses. Other regions and patched versions are not supported yet.\n- About 35 GB of free disk space: ~22 GB for the game files and the rest for the build tools and the build.\n- An internet connection for the setup.\n\n## Install\n\n**Quick install (recommended):**\n\n1. Download the release zip from the Releases page and unzip all of it to a folder with no spaces in the path, for example `C:\\Games\\Resistance2Port`.\n2. Run **`Setup.exe`** in that folder. (It is not code-signed: if Windows says *\"Windows protected your PC\"*, click **More info → Run anyway**.)\n3. Pick your game: **ISO...** or **Folder...**. Setup checks the copy at once and says what to do if it can't be used (see *If your game copy is not accepted* below).\n4. Click **Install** and wait. Setup installs the missing build tools (one administrator prompt), copies your game files, builds the game with as many parallel jobs as your RAM allows, adds Start-menu and desktop shortcuts and starts the launcher. It shows the progress and the time left. If it stops (error, sleep, power cut), run `Setup.exe` again and click **Resume**.\n\nThe release contains no game code: the game is always built from your own copy. Requirements, disk space, build times, uninstalling and troubleshooting (SmartScreen, antivirus, low RAM, no winget): [docs\u002FINSTALL.md](docs\u002FINSTALL.md).\n\n### Manual install (advanced)\n\n**With the Inno installer** (if a `-Setup-\u003Cversion>.exe` is on the Releases page): download `Resistance2Port-Setup-\u003Cversion>.exe` from the Releases page and run it. It installs the port (default `C:\\Games\\Resistance2Port`), adds Start-menu and desktop shortcuts, and asks for your game. It lists the copies it finds on the PC (common folders and RPCS3's game list); you can also type or paste a path, or use the **ISO...** \u002F **Folder...** buttons. It checks the copy before going on and says what is wrong and what to do if it can't be used (see *If your game copy is not accepted* below). At the end it opens **Setup**, the window with the progress bar, with your game already filled in: click **Install** there (step 2 below). The installer contains only the port; the game files always come from your own copy. Use a decrypted ISO or a game folder (the same kind RPCS3 uses). Tick **Portable mode** to keep settings only in the install folder.\n\n**By hand:**\n\n1. Download this repository: click on Code at the top, then Download ZIP, then unzip it somewhere with no spaces in the path, for example `C:\\Games\\Resistance2Port`.\n2. Double-click **`Setup.bat`**. It will:\n   - install the free build tools if they're missing (Visual Studio 2022 Build Tools, LLVM, CMake, Ninja, Python, Git), using `winget`;\n   - look for your game (an ISO or a game folder), check it, then copy it into the port folder (or move a folder, if it's on the same drive);\n   - decrypt the game's program file, using the application keys from RPCS3's public source code;\n   - download RPCS3's source at a fixed version and apply this port's renderer patch (`ps3recomp\u002Fpatches\u002Fr2-rpcs3.patch`);\n   - generate the game code from your copy and build the game.\n\n   The first run takes a while: tool installs plus a 20–60 minute build. At the end, Setup offers to put a \"Resistance 2\" shortcut to the launcher on your desktop.\n3. Play with **`Launcher.exe`**. It has the settings (display mode, resolution, frame rate, VSync, anti-aliasing, upscaling, texture filtering, sharpening) and the key bindings.\n\nYou only need to run Setup again after downloading a newer version of the port; otherwise just use the launcher.\n\n**Choosing the game in Setup.bat:** it lists the copies it found, numbered. Type a number, or type or paste the path of the ISO or game folder (you can also drag it into the window). **B** opens a file picker (Windows only). `Setup.bat -Game \"\u003Cpath>\"` skips the question. The path can be an ISO, the game folder, or a file inside it. An ISO is opened by Windows, copied from and closed again; if Windows can't open it, Setup reads it directly.\n\n### If your game copy is not accepted\n\nThe installer and Setup check the copy before copying anything. The supported version is **Resistance 2 (EU disc, BCES00226)**, about 23.3 GB.\n\n| Message | What to do |\n|---|---|\n| compressed archive (.zip, .7z, .rar) | Extract it first, then pick the ISO or folder inside. |\n| PlayStation Store package (.pkg) \u002F game update folder | Pick the disc copy. Game updates are not needed. |\n| not &lt;game&gt; \u002F from another region | Use the supported disc version listed above. |\n| PlayStation Store version | Only the disc version is supported. |\n| encrypted disc image \u002F PARAM.SFO is not valid | Decrypt the ISO first (for example PS3Dec with the disc key from the `.dkey` file), or use a game folder from a PS3 or RPCS3. |\n| program file was decrypted or replaced (plain ELF) | Use the original, unmodified files. Setup decrypts them itself. |\n| files are missing \u002F smaller than expected | The copy is incomplete. Copy or dump it again. |\n| different from the known file (warning) | The copy may be modified. You can continue; Setup stops later if the decrypted program is not the supported version. |\n| not enough free space | Free up space, or install on another drive. |\n\nThe checks run on your PC only. Nothing is uploaded.\n\n**Updates:** the launcher checks this repository's Releases page once at start and says when a newer version is out (it only opens the download page; nothing is downloaded or replaced). Turn it off with the launcher's *Check for updates* option (Advanced page) or the environment variable `PORT_NO_UPDATE_CHECK=1`. The installed version is in the `VERSION` file.\n\n**Settings and controls** (`settings.ini`, `settings.bat`, `controls.txt`, `mouselook.cfg`) are also kept in `%USERPROFILE%\\Saved Games\\Resistance 2\\config`. Missing files are restored from there when the launcher or game starts, so they survive reinstalling or updating the port. To keep everything in the port folder only, create an empty file named `portable.txt` next to `Launcher.exe` (the installer's *Portable mode* does this). Saves are still kept in the port folder (`gamedata`); the uninstaller asks before deleting it, and its default is to keep it.\n\n**No console window:** the launcher starts the game without a console. The game's output goes to `logs\\run.log`.\n\n**First launch:** the game shows its own one-time setup screens and an autosave notice. Before the game starts, the launcher prepares the shader cache from your game files (a progress panel; **Skip for now** or Esc skips it), and the game then compiles every known shader behind a **Compiling shaders N \u002F M** panel (see *Shader precompile*), so levels play without shader stutter from the first visit. Shaders are cached for later starts.\n\n## Controls\n\nKeyboard and mouse are supported out of the box (WASD, mouse look, Mouse1 fire, Mouse2 aim, R reload, G grenade, E use, V\u002FMouse4 melee, Q \u002F wheel switch weapon, T flashlight, M map, Esc pause). Controllers work too. All keyboard and mouse bindings can be changed in the launcher.\n\n**Button prompts follow the device you used last.** Touch the keyboard or mouse and the on-screen prompts (hints, menu legends, tutorial text) show your keys; press a button or move a stick on a controller and they switch to that controller's buttons. Switching is instant and works mid-game. With an Xbox \u002F XInput controller (or any non-PlayStation pad) the prompts show Xbox buttons, drawn by the port as simple coloured letters (no copied artwork):\n\n| PS3 | Xbox | PS3 | Xbox |\n|---|---|---|---|\n| Cross | A | L1 \u002F R1 | LB \u002F RB |\n| Circle | B | L2 \u002F R2 | LT \u002F RT |\n| Square | X | L3 \u002F R3 | LS \u002F RS (stick click) |\n| Triangle | Y | Select \u002F Start | View \u002F Menu |\n| D-pad | D-pad | Left \u002F right stick | Left \u002F right stick |\n\nWith the XInput backend (`PAD_BACKEND=xinput`), a Sony DualShock 3\u002F4 or DualSense that is plugged in (detected by its USB\u002FBluetooth ID, used through DS4Windows \u002F Steam Input as XInput) keeps the PlayStation symbols; with SDL3 (default) the prompts follow the controller type, see *Controllers (SDL3)* below. The launcher's **Controller button prompts** option forces Xbox or PlayStation. Prompts name the game's default button layout; if you remap buttons in the game's own options, the prompts still name the default ones.\n\n**Mouse look is direct:** raw mouse counts turn the camera's yaw and pitch each frame (× the launcher's sensitivity × the game's own Look Sensitivity), not an emulated right stick — no acceleration, dead zone or speed cap. While aiming down sights the turn rate is scaled by the scope zoom so the same mouse movement covers the same part of the screen (`R2_ZOOM_SENS`: 1 = default, 0 = no scaling, up to 2). The game's aim assist only acts on stick input, so it doesn't pull against the mouse, and while the mouse is in use the right stick's turn rate is ignored so the two never add up. Mouse counts made while the camera isn't yours (menus, pause, cutscenes, scripted sequences) are dropped, so the view doesn't jump afterwards. The launcher's **Mouse aiming = Classic** switches back to stick emulation. The game has no mouse pointer in its menus; they are driven by the keyboard (arrows \u002F Enter \u002F Esc) or a controller. F8 frees the cursor.\n\n**Controllers (SDL3).** The port reads controllers through SDL3 (built in, no extra DLL): Xbox, DualShock 4, DualSense, DualShock 3 (with its Windows driver), Switch Pro and Joy-Con work directly. **DS4Windows and Steam Input are no longer needed** (they still work; if they expose a virtual Xbox pad next to the real controller, the port ignores the duplicate so it doesn't become a ghost player 2). Controllers can be plugged in and out at any time, no restart, up to 8. Rumble works on every pad that has it (DualSense included), and a DualShock 4 \u002F DualSense light bar shows the player's colour (player 1 blue, player 2 red). If SDL3 can't start, the port falls back to XInput automatically (`logs\\run.log` shows `[cellPad] controllers: SDL3` or `SDL3 could not start`).\n\n**Button prompts by controller type:** with *Controller button prompts = Auto*, a PlayStation pad (DualShock 3\u002F4, DualSense) shows PlayStation symbols and an Xbox or other pad shows Xbox letters. Switch controllers are read by button position (the bottom button is Cross); with *Nintendo button layout = Nintendo style* A (right) confirms and B cancels as on a Switch, and the prompts show the Xbox-style letters. Under Steam Input the real controller type is used when SDL reports it; otherwise set the prompts by hand.\n\n**Gyro aiming** (DualShock 4, DualSense, Switch Pro, Joy-Con; off by default): turning the controller turns the view, added directly to the camera like the mouse (smooth, not limited by the stick). *While aiming* only uses it with the Aim button (L1 \u002F LB) held. Leave the controller still for about a second after it connects so the resting drift is calibrated. In split-screen co-op each player's gyro moves only their own view (as a right-stick input, like the second player's mouse).\n\n| Option (launcher Controls page \u002F in game *More PC Options*) | Values | Variable |\n|---|---|---|\n| Controller support | **SDL3**, XInput | `PAD_BACKEND=sdl3\\|xinput` (restart). `sdl2` is accepted and uses SDL3 |\n| Gyro aiming | **Off**, On, While aiming | `PAD_GYRO=0\\|1\\|aim` |\n| Gyro sensitivity | **2x**, 0.5x-6x | `PAD_GYRO_SENS=\u003C0.05..20>` (view degrees per controller degree) |\n| Gyro vertical | **Normal**, Inverted | `PAD_GYRO_INVERT_Y=1` (on top of the game's own invert setting) |\n| Gyro turning axis | **Controller**, Player | `PAD_GYRO_SPACE=local\\|player` (player = yaw around gravity, works flat or upright) |\n| Gyro calibration | **On connect**, Off | `PAD_GYRO_CALIBRATE=0` turns off the 1 s still-calibration |\n| Light bar | **Player colour**, Off | `PAD_LIGHTBAR=0` |\n| Nintendo button layout | **By position**, Nintendo style | `PAD_NINTENDO_SWAP=1` |\n| (no launcher option) | **On** | `PAD_DEDUP=0` keeps virtual duplicates (Steam Input \u002F DS4Windows \u002F ViGEm) as separate controllers |\n| (no launcher option) | **360** | `PAD_GYRO_STICK_DPS=\u003Cdeg\u002Fs>`: gyro speed that equals a full right stick (co-op \u002F classic mouse aiming, where gyro drives the stick) |\n\nWith `PAD_BACKEND=xinput` the old behaviour returns: XInput only (up to four), PlayStation pads through DS4Windows \u002F Steam Input, no gyro or light bar.\n\n## Local co-op\n\nTwo players on one PC, split-screen, as on PS3. No PSN account is needed: the port provides a second local user.\n\n**Starting it:** plug in two controllers (or one, with *Player 2 uses keyboard and mouse*). Main menu → **Co-op** → the offline \u002F split-screen co-op staging screen (the online options need PSN and don't work). On the staging screen player 2 presses **START** (or Enter \u002F Esc on the keyboard for a keyboard player 2) to join: on PS3 this opens the \"select a user\" box; the port answers it at once with a local user named **Player 2**, and player 2 shows as logged in. Start the mission and the screen splits.\n\nOnly the offline, split-screen part of co-op works: everything that needs PSN (online co-op, competitive, the lobby browser) stays unavailable.\n\n**Who is who:**\n\n- Player 1 = the keyboard and mouse plus the first controller found (as in single player).\n- Player 2 = the next controller. A controller keeps its player while it stays plugged in. A controller plugged in later takes the lowest free player; when one is unplugged, its player has no input until it is plugged back.\n- With two local players the direct mouse look is off. The mouse then moves the keyboard player's view like a right stick (it would otherwise turn both heroes).\n\n**Options** (launcher, Controls page; or `settings.bat`):\n\n| Option | Values | Variable |\n|---|---|---|\n| Local co-op (split-screen) | **On**, Off | `PAD_COOP=0`: the game sees only player 1. Extra controllers (or duplicate virtual pads from Steam Input \u002F DS4Windows) can't join |\n| Player 1 controller | **Automatic**, Controller 1-8 | `PAD_P1_CONTROLLER=\u003C1..8>`: the controller that is player 1 (SDL3: in the order they were connected; XInput: 1-4, Windows' XInput order) |\n| Player 2 controller | **Automatic**, Controller 1-8 | `PAD_P2_CONTROLLER=\u003C1..8>`: the controller that is player 2 (numbered as above) |\n| Player 2 uses keyboard and mouse | **Off**, On | `PAD_P2_KEYBOARD=1`: player 1 = the first controller only, player 2 = keyboard and mouse |\n| (no launcher option) | **2** | `PS3_LOCAL_USERS=\u003C1..4>`: local users the game sees. `1` = player 2 can't sign in. `PS3_USER2_NAME=\u003Cname>` renames player 2 |\n\n`logs\\run.log` shows which controller each player got (`[cellPad] player 2 \u003C- controller 2`) and when the game counts two local players (`[coop] local players: 2`).\n\n**Known limits:** Player 2's progress and settings are not saved separately (as on PS3 for a guest player). If you use NVIDIA DLSS, it may not work right in split-screen. Turn it off (or use FSR \u002F no upscaler) for co-op if the image smears or one half looks wrong.\n\n## PC features\n\n- **PC menu (Resume \u002F PC Options \u002F Quit to Desktop):** press **F10**, or hold **View + Menu** (Select + Start) on a controller for 1.5 s — from gameplay, the game's pause menu or the main menu. The game is paused and gets no input while it is open. It always opens on **Resume**; the mouse takes over the highlight only once it is moved. Navigate with arrows \u002F W S A D, Enter \u002F Space \u002F A = OK, Esc \u002F Backspace \u002F B = back, F10 = close; the mouse works too (hover, left click = OK \u002F next value, right click = previous value). A controller's d-pad or left stick moves the selection.\n  - **Quit to Desktop** asks *Quit to desktop?* — Enter \u002F Space \u002F A = yes, Esc \u002F Backspace \u002F B = back to the PC menu. On yes (and also when the window is closed with Alt+F4 or the X button) the port waits for a save in progress to finish (up to 15 s, \"Saving...\"), flushes open files and exits.\n  - **PC Options**: *Frame rate* (30 \u002F 60 \u002F 120 \u002F 144 \u002F Match display \u002F Uncapped), *Upscaler \u002F anti-aliasing* (Off \u002F AMD FSR 3.1 \u002F NVIDIA DLSS), *Mouse sensitivity* (0.10–4.00, steps of 0.05), *Field of view* (Original \u002F Wider \u002F Widest — the Extended FOV patch below, can misalign some shadows), *Button prompts* (Auto \u002F Keyboard keys \u002F Xbox \u002F PlayStation). Mouse sensitivity, field of view and button prompts apply at once; frame rate and upscaler are marked `*` and apply the next time the game starts. Every change is saved straight to the launcher's files (`settings.ini`, `settings.bat`, `controls.txt`), so the launcher shows it too.\n  - **Hint:** when you open the game's own pause menu (Esc \u002F Enter \u002F Start during play) a small box at the bottom says *PC menu: F10 or hold View + Menu*, and the same box shows once ~12 s after start-up (for the main menu). `R2_MENU_PC_HINT=0` hides it (it is off by default with exclusive fullscreen).\n  - `R2_MENU_PC=0` turns the PC menu off: F10 \u002F View+Menu then open only the old *Quit to desktop?* box.\n  - The entries are an overlay drawn by the port, not rows inside the game's Scaleform menus (see *Not done* below).\n- **PC wording in the game's text:** strings that talk about the console are rewritten as the text files load (rules in `project\\r2_pctext.cpp`). In English: the health warning (*…see the WARNING section in the Safety and Support Manual included with your PS3™ system* → *Before playing, please read the health and safety warnings for this game.*), the auto-save and save-icon notices (*…do not quit the game or turn off your PC*), *Press and hold the PS button…* → *Press F10 to quit the game.*, HDD wording → disk wording, *PlayStation®Network* → *online service* \u002F *online account*, *PSN Friends* → *Friends*, *wireless controller* → *controller* \u002F mouse, *PLAYSTATION®3* \u002F *PS3™ system* → *PC*, the XrossMediaBar cable help → *your PC's display settings*. Other languages: *PLAYSTATION®3* \u002F *PS3* → *PC*, *PlayStation®Network* → *Online*, *PlayStation®Store* → *Store*, the PS button in quit messages → F10, and *SIXAXIS™* \u002F *PSN* are dropped. Credits and trademark lines are left as they are. Only replacements that fit in the original string are made, and only the text in memory changes (the game files aren't touched). `R2_PC_TEXT=0` turns it off.\n- **Alt+Enter** switches between borderless fullscreen and windowed. **Alt+Tab** is safe in borderless and windowed mode.\n- **Monitor** (launcher, Display › Screen): which screen the window opens on (`RSX_MONITOR=\u003Cn>`, 1-based in Windows' order; empty = primary).\n- **When the game is in the background** (launcher): *Pause and mute* (default) freezes the game and silences it when the window loses focus; *Mute only*; *Keep running* (`R2_BACKGROUND=pause|mute|run`). While paused (this way or by the PC menu) the SPU and RSX threads idle instead of spinning a core each. On focus loss the cursor is always released and shown; it is shown while the quit box is up or the game is paused this way, and captured\u002Fhidden again when you click back in.\n- **Skip intro logo** (launcher, default on): skips the Insomniac logo video by pressing Start\u002FCross for the game during it (`R2_SKIP_INTRO=0` to watch it).\n- **Screenshots:** **F12** or **PrtScn** saves `screenshots\\R2_\u003Cdate>_\u003Ctime>.png` in the game folder (a short \"Screenshot saved\" note appears). The launcher's About page has **Open screenshots**.\n- **Saves** are in the game folder: `gamedata\\dev_hdd0\\home\\00000001\\savedata\\BCES00226_SAVE_0`. The launcher's **Saves & tools** page lists them and backs them up (see *PC extras* below). **Open save folder** (launcher, About) opens it. `PS3_GAMEDATA_ROOT=\u003Cdir>` moves the whole `gamedata` tree elsewhere (saves then go to `\u003Cdir>\\dev_hdd0\\home\\00000001\\savedata`). Settings are `settings.ini` \u002F `settings.bat` and `controls.txt` in the game folder.\n- **Reset all to defaults** (launcher, About) resets display, graphics, PC options, keys and mouse (saves untouched). **Auto-detect** (Display, Graphics and Upscaling & Frame Gen pages) resets only display and graphics; **Restore default controls** only the controls.\n- These features (F10 PC menu, F12, pause on focus loss, monitor choice) are in the Compatible (RPCS3) and Native Vulkan renderers' window. The port's menus, overlay and notifications are drawn into the game's own image (`PORT_OSD`, default), so they also show in exclusive fullscreen; `PORT_OSD=layered` uses the old separate windows, which exclusive fullscreen hides. Exclusive fullscreen can still give black screenshots; borderless is recommended.\n\n### All launcher options\n\nThe options are sorted into pages, each with group headings (the same pages as the Resistance: Fall of Man launcher). `Launcher.exe --page N` opens on page N: 0 Display, 1 Graphics, 2 Upscaling & Frame Gen, 3 Performance, 4 Controls, 5 Audio, 6 Interface & Notifications, 7 Advanced, 8 Trophies, 9 Saves & tools, 10 About. The Display, Graphics and Upscaling & Frame Gen pages start with the *Recommended for this PC* panel; **Rebuild shader cache** is on the Performance page. Any option no group lists would appear on the Advanced page under *Other*.\n\n| Page | Option | Values (default first) | Environment variable |\n|---|---|---|---|\n| Display › Screen | Display mode | Borderless, Exclusive fullscreen, Windowed | `RSX_DISPLAY` |\n| Display › Screen | Window size | 1280x720 … 3840x2160 (1920x1080) | `RSX_WINDOW` |\n| Display › Frame rate | Frame rate | 60, 30, 120, 144, Match display, Just under refresh (VRR), Uncapped | `R2_FPS` (`vrr`) |\n| Display › Frame rate | VSync | Off, On, Adaptive (FIFO relaxed), Auto (On when capped at or under the refresh) | `RSX_VSYNC` |\n| Display › Screen | Monitor | Primary, Monitor 1…n | `RSX_MONITOR` |\n| Display › Screen | Ultrawide \u002F aspect ratio | 16:9, Fit window, 21:9, 32:9 | `R2_ASPECT` |\n| Display › Frame rate | Presentation mode | Default, Immediate (VRR), Mailbox, FIFO | `R2_PRESENT` |\n| Display › Frame rate | Refresh rate switch (exclusive fullscreen) | **Off**, On | `PORT_REFRESH_SWITCH` (`1` = on, experimental) |\n| Display › Screen | Resizable window \u002F Alt+Enter | On, Off | `RSX_RESIZABLE` \u002F `RSX_ALT_ENTER` (`0` = off) |\n| Display › HDR | HDR output \u002F paper white \u002F peak | Off, HDR10, scRGB \u002F 200, 100…300 nits \u002F 1000, 400…1500 nits | `R2_HDR` (`1`\u002F`scrgb`), `R2_HDR_PAPER`, `R2_HDR_PEAK` |\n| Display › Screen | Ultrawide HUD | Stretched, Centred 16:9 (experimental) | `RSX_HUD_FIX` |\n| Graphics › Effects and accessibility | Screen blur \u002F Camera shake \u002F Cinematic black bars | On, Off | `R2_FX_SCREEN_BLUR` \u002F `R2_FX_CAMERA_SHAKE` \u002F `R2_FX_LETTERBOX` (`0` = off) |\n| Graphics › Effects and accessibility | Colour-blind filter | Off, Protanopia, Deuteranopia, Tritanopia | `R2_COLORBLIND` (`1`\u002F`2`\u002F`3`) |\n| Graphics › View | Field of view | Original, Wider (0.85), Widest (0.7) | `R2_PATCH_FOV_VALUE` |\n| Graphics › Quality | Level of detail distance | Original, 1.25x, 1.5x, 2x, 3x, 4x | `R2_PATCH_LOD_SCALE` |\n| Graphics › Quality | Shadow resolution | Original, 2x, 4x | `RSX_SHADOW_SCALE` |\n| Graphics › Quality | Effects resolution | Original, Full, Full (all) | `RSX_FX_FULLRES` |\n| Graphics › Quality | Ambient occlusion | Off, On (experimental) | `RSX_SSAO`. Ambient occlusion is disabled with DLSS in this beta (`RSX_SSAO_DLSS=1` forces it on). |\n| Graphics › Resolution | Render resolution, Scaling | see the Graphics page help | `RSX_RES_SCALE`, `RSX_FILTER` |\n| Graphics › Quality | Texture filtering, and the other quality options | see the Graphics page help | `RSX_ANISO`, `R2_PATCH_*` |\n| Graphics › Renderer | Renderer | see the Graphics page help | `R2_RSX` |\n| Upscaling & Frame Gen › Frame generation and latency | NVIDIA Reflex | Off, On, On + Boost | `R2_REFLEX` (`1`\u002F`2`) |\n| Upscaling & Frame Gen › Frame generation and latency | Frame Generation (RTX 40\u002F50: DLSS-G, needs NVIDIA DLSS; other GPUs: FSR 3 2x) | **Off**, 2x, 3x, 4x, FSR 3 2x (only what the GPU supports) | `R2_DLSS_FG` (`2`\u002F`3`\u002F`4`\u002F`fsr3`), `R2_FG_BACKEND` |\n| Upscaling & Frame Gen › Anti-aliasing and upscaling | Anti-aliasing, Upscaling, Sharpening | see the Upscaling & Frame Gen page help | `RSX_FSR`, `RSX_UPSCALE`, `RSX_SHARPEN` |\n| Performance › Processor | CPU profile | Auto, Low, Mid, High | `PORT_CPU_PROFILE` |\n| Performance › Shader cache | Shader compilation | see the Performance page help | `R2_SHADER_MODE` |\n| Controls › Controller | Controller button prompts | Auto, Xbox, PlayStation, Keyboard keys | `R2_PAD_GLYPHS` (`auto`\u002F`xbox`\u002F`ps`\u002F`keys`) |\n| Controls › Aiming and sticks | Extra crosshair | Off, Dot, Cross | `R2_CROSSHAIR` (`dot`\u002F`cross`) |\n| Controls | Keys (two per action), Mouse sensitivity, Invert vertical look, Mouse aiming (Direct \u002F Classic), Free the mouse cursor key (F8) | | `controls.txt` |\n| Controls › Aiming and sticks | Vertical mouse sensitivity, Aiming sensitivity, Aim mode, Stick deadzone, Stick response curve | see *Options* below | `PAD_MOUSE_SENS_Y`, `R2_ADS_SENS`, `PAD_AIM_TOGGLE`, `PAD_DEADZONE`, `PAD_CURVE` |\n| Controls › Controller, Gyro | Controller support, Gyro aiming, Gyro sensitivity, Gyro vertical, Gyro turning axis, Gyro calibration, Light bar, Nintendo button layout | see *Controllers (SDL3)* under Controls | `PAD_BACKEND`, `PAD_GYRO`, `PAD_GYRO_SENS`, `PAD_GYRO_INVERT_Y`, `PAD_GYRO_SPACE`, `PAD_GYRO_CALIBRATE`, `PAD_LIGHTBAR`, `PAD_NINTENDO_SWAP` |\n| Controls › Controller | Pause when the controller disconnects | On, Off | `R2_PAD_DISCONNECT_PAUSE` (`0` = off) |\n| Controls › Controller | Swap sticks (southpaw) | Off, On | `PAD_SOUTHPAW=1` |\n| Controls › Controller buttons | Button A … Menu: what each button does | Default, Acts as … | `PAD_MAP_A` … `PAD_MAP_START` (`A B X Y LB RB LT RT LS RS BACK START`) |\n| Audio › In the background | When the game is in the background | Pause and mute, Mute only, Keep running | `R2_BACKGROUND` |\n| Audio › Sound | Speaker layout | **5.1 surround**, 7.1 surround, Stereo | `PORT_SPEAKERS` (`8` \u002F `2`) |\n| Audio › Sound | Audio buffer | **Auto** (100 ms; 150 ms under 12 CPU threads), 80, 100, 150, 200 ms | `PORT_AUDIO_BUFFER_MS` |\n| Interface & Notifications › Overlays | Performance overlay | Off (F3 shows it), On at start, Disabled | `R2_OVERLAY` |\n| Interface & Notifications › Notifications | Trophy notifications | On, Off | `R2_TROPHY_TOAST` |\n| Interface & Notifications › Photo mode and Discord | Discord Rich Presence | Off, On | `R2_DISCORD=1` (+ `R2_DISCORD_APPID` or `discord_appid.txt`) |\n| Interface & Notifications › Photo mode, Movies | Photo mode (F7) \u002F Hold to skip movies | On, Off | `R2_PHOTO` \u002F `R2_CUTSCENE_SKIP` (`0` = off) |\n| Interface & Notifications › Movies | Show cutscene skip hint | **On**, Off | `PORT_SKIP_HINT` (`0` = off; `R2_SKIP_HINT` also read) |\n| Advanced › Start-up | Skip intro logo | On, Off | `R2_SKIP_INTRO` |\n| Advanced › Mods and textures | Mods folder | Off, On | `R2_MODS` |\n| Advanced › Saves | Back up saves before playing | On (keep 10), keep 5, keep 30, Off | `R2_SAVE_BACKUP` (`5`\u002F`30`\u002F`0`; read by the launcher) |\n| Advanced › Mods and textures | Texture pack \u002F Dump textures | Off, On | `RSX_TEXPACK` \u002F `RSX_TEXDUMP` |\n| Trophies | Progress summary (earned \u002F total, %, per grade), every trophy with its icon, grade and unlock date | | read-only: `TROPHY.TRP`, `gamedata\\trophies\\NPWR00291.json`, `Saved Games\\Resistance 2\\trophies.json` |\n| Saves & tools | Saved games, Back up now, Restore \u002F Delete a backup, Open folders, Run benchmark, Open results | | `save_backups\\`, `logs\\bench\\` |\n\nOther switches (set them in `settings.bat` yourself): `R2_KEY_PROMPTS=0` turns off all prompt replacement (PS3 symbols always), `R2_MENU_PC=0` \u002F `R2_MENU_PC_HINT=0` \u002F `R2_PC_TEXT=0` (above), `R2_ZOOM_SENS` (above), `PS3_GAMEDATA_ROOT` (above).\n\n**Not done, and why:** rows inside the game's own menus (the main and pause menus are Scaleform Flash movies, `frontend.swf` \u002F `pausemenu.swf`, driven by the PS3 menu code; adding a row means patching ActionScript and the code behind it blind, without running the game — so the PC menu is an overlay opened with F10 \u002F View+Menu, and a hint appears with the pause menu instead); a frame cap for menus (the port has no reliable \"in a menu\" signal); a mouse pointer in menus (the game has no pointer support); moving saves to `%APPDATA%` (would orphan existing saves — use `PS3_GAMEDATA_ROOT` if you want that); native DualSense\u002FDualShock input without an XInput wrapper (only the button symbols detect them).\n\n## Options\n\nPC-port options added on top of the PS3 game. Each one is an environment variable that the launcher writes to `settings.bat` (set it there yourself, or in the launcher; unset = the default shown first). The overlay toggle is also exported for the in-game PC menu (`r2pf_overlay_set`).\n\n**Display**\n\n- **Ultrawide \u002F arbitrary aspect** — `R2_ASPECT` = *(unset)* \u002F `off` \u002F `16:9`: the PS3 16:9 picture, pillarboxed on wider screens (default). `auto` (launcher *Fit window*): the 3D view takes the window's shape, re-read live when the window is resized. `21:9` (= 64:27), `32:9`, `W:H`, `WxH` or a plain ratio (`2.4`) force one. The port widens the game's camera frustum Hor+ (horizontal FOV grows, vertical FOV stays as on PS3; the aspect handed to the projection follows) by hooking the game's two frustum setters, and the RPCS3 renderer then stretches the frame to the window instead of letting it in a 16:9 box. The HUD and menus are stretched to the width: the game draws them in the same 16:9 render target as the 3D scene, and they could not be told apart reliably enough to keep them in a centred 16:9 region (so `R2_HUD_MODE=center` is not available). Only the main 3D camera is widened; with a narrower than 16:9 window (e.g. 4:3) the view is Vert-.\n- **Presentation mode** — `R2_PRESENT` = `immediate` (also `vrr`, `tearing`): never wait for vblank (best with G-Sync \u002F FreeSync); `mailbox`: newest frame each vblank, no tearing, but at the fixed refresh, so G-Sync \u002F FreeSync do not follow it (falls back to FIFO-relaxed); `fifo` (or `vsync`): classic VSync. Unset follows the VSync setting (`RSX_VSYNC`). Compatible (RPCS3) renderer only; the Native Vulkan renderer keeps `RSX_VSYNC`.\n- **Frame rate just under refresh** — `R2_FPS=vrr`: caps at refresh − refresh²\u002F3600 (≈ 57.1 on 60 Hz, 138 on 144 Hz, 228 on 240 Hz) so a VRR display never leaves its range. Pair it with *Presentation mode = Immediate* or VSync off.\n- Exclusive fullscreen \u002F borderless \u002F windowed, monitor choice and Alt+Enter: see *PC features* above.\n\n**Frame pacing, VSync and G-Sync \u002F FreeSync** (Compatible renderer)\n\n- Present mode per setting (the log prints it once: `[display] Vulkan present mode FIFO, 3840 x 2160`): VSync *Off* \u002F `R2_PRESENT=immediate` = IMMEDIATE; *On* \u002F `fifo` = FIFO; *Adaptive* = FIFO relaxed (MAILBOX if the driver has no FIFO relaxed); `R2_PRESENT=mailbox` = MAILBOX. *Auto* (`RSX_VSYNC=auto`) = FIFO whenever the frame rate is capped at or under the display refresh (the cap means it never waits on vblank) and Adaptive when uncapped or above the refresh.\n- G-Sync \u002F FreeSync follow FIFO, FIFO relaxed and IMMEDIATE. MAILBOX shows the newest frame at the fixed refresh, so VRR does not follow it: 60 fps on a 144 Hz screen then holds frames for 2, then 3 refreshes (judder) even with G-Sync on. Earlier builds mapped *Auto* and *Adaptive* to MAILBOX; they now use FIFO \u002F FIFO relaxed.\n- Without VRR, a fixed-refresh display is only even at a divisor of its rate (60 on 60 \u002F 120 \u002F 240 Hz, 72 or 48 on 144 Hz); the log warns (`[fps] note: ...`). **Refresh rate switch** — `PORT_REFRESH_SWITCH` (default off, `1` = on, experimental: every switch blanks the screen and can glitch audio; launcher *Display › Frame rate › Refresh rate switch*): in exclusive fullscreen (`RSX_DISPLAY=exclusive`) the display is switched to the nearest mode at the same resolution whose refresh is a multiple of the frame rate (`[fps] display switched 144->120 Hz`), and back to the desktop rate when the game loses focus, is minimised, leaves fullscreen, closes or crashes. Borderless and windowed never switch (use G-Sync \u002F FreeSync or an even frame rate there). With VRR the switch is harmless but unnecessary; `0` avoids the mode-change flash.\n- With `PORT_OSD=layered`, popup windows over the game (performance overlay, extra crosshair, toasts) make Windows compose the screen, which can turn G-Sync off while they are visible. By default they are drawn into the game image and do not.\n\n**Hitch logger** — `PORT_HITCH_LOG` (default on, `0` = off; `PORT_HITCH_MS=\u003Cms>`, default 25): every game frame over 25 ms (or over 2x the frame-time target) prints one `[hitch]` line with where that frame went (game, limiter, sync waits, pad, RSX flip interval, present \u002F acquire \u002F GPU wait \u002F DLSS, pipeline compiles, texture uploads, audio wait, and `present-iv` = the longest present-to-present interval). Every 5 s: `[hitch] 5 s:` (CPU frame time p50 \u002F p99 \u002F max) and `[hitch] present 5 s:` (present-to-present interval p50 \u002F p99 \u002F max, `uneven` = intervals more than 4 ms off the median, and how many frames a fixed-refresh display would hold for 1 \u002F 2 \u002F 3 \u002F 4+ refreshes; a mix of 2 and 3 = judder unless VRR is active). Since this build the `[hitch]` line also splits `guestwait` (the game thread's own guest waits) into spin \u002F sleep \u002F lwmutex \u002F lwcond and names the guest call site that waited longest (`top 0x... X ms`), shows the game thread's CPU time (`game X (cpu Y)`: a gap = the thread was preempted), and breaks down the RSX thread: `fifo-idle` (waiting for commands), `label ms\u002Fn` (NV406E semaphore waits), `zcull ms\u002Fn` (occlusion report reads waiting for the GPU), `hard-sync ms\u002Fn`, `submits n` and `rsx-limit` (RPCS3 flip limiter sleep). Hot-thread log lines (`[pipe]`, `[fps]`, `[hitch]`) are queued to a writer thread (`PORT_LOG_SYNC=1` writes them at once).\n\n**Frame pacing** — one pacer: when the frame rate is not 30, the game limiter (`R2_FPS`) paces the frame loop and the RPCS3 flip limiter is off (it was a second 60 Hz clock: the RSX thread slept in the flip while the game waited on it, then the next frame ran at once). `GCM_FRAME_LIMIT=vblank` restores the old double pacing.\n\n**Performance overlay** — **F3** in game shows or hides a small box in the top-left corner: game fps and frame time (average and worst of the last 0.5 s), and on the Compatible renderer the RSX (GPU-side) frame rate, draws per frame and average µs of render-thread time per draw. `R2_OVERLAY=1` shows it at start, `R2_OVERLAY=0` disables F3; `R2_OVERLAY_POS=tl|tr|bl|br` picks the corner. It is drawn into the game's own image (`PORT_OSD`), so it also shows in exclusive fullscreen; while it is shown the renderer's profiling counters run (a small cost; `R2_RSX_PROF=1` also prints them to the log every 5 s).\n\n**Trophies → local achievements** — every trophy the game awards is recorded (the runtime's `gamedata\\trophies\\NPWR00291.json`, plus a readable copy in `%USERPROFILE%\\Saved Games\\Resistance 2\\trophies.json` with names, grades and unlock times). The names come from the game's own `TROPHY.TRP` in `gamefiles\\PS3_GAME\\TROPDIR` (read at run time; nothing is shipped). A notification slides in at the top-right of the game window for 5 s (`R2_TROPHY_TOAST=0` turns it off; drawn into the game image like the overlay). The platinum is awarded once every trophy it counts is earned. The launcher's **Trophies** page shows a summary at the top (earned \u002F total, percentage, a progress bar and the count per grade), then every trophy with its icon from `TROPHY.TRP` (greyed until earned), name, description, grade and the date it was earned, newest first. Hidden trophies show as *Hidden trophy* until earned. It merges both records (a trophy counts if either has it; the earliest time wins), so the platinum the port awards also shows. Before anything is earned it says *Play the game to start earning trophies*. The page reads nothing until it is opened, re-reads only when those files change, and never writes to them.\n\n**Input** (launcher: Controls › Aiming and sticks)\n\n- Key \u002F mouse-button rebinding: Controls page (`controls.txt`).\n- `PAD_MOUSE_SENS_Y=\u003C0.1..4>` — vertical mouse sensitivity relative to horizontal (direct and classic mouse aiming).\n- `R2_ADS_SENS=\u003C0.1..3>` — mouse sensitivity while aiming down sights \u002F scoped, relative to hip fire (on top of `R2_ZOOM_SENS`).\n- `PAD_AIM_TOGGLE=1` — Aim (L1 \u002F Mouse2 \u002F LB) toggles instead of hold, for keyboard and controller; menus and the pause screen release it.\n- `PAD_DEADZONE=\u003C0..0.9>` — controller stick deadzone, radial (unset: the XInput standard 24 % per axis, as before).\n- `PAD_CURVE=\u003C0.5..3>` — stick response exponent past the deadzone (1 linear, >1 finer near the centre, \u003C1 faster).\n- Invert vertical look: Controls page (`controls.txt`). DualShock 4 \u002F DualSense \u002F Switch: supported natively through SDL3 (see *Controllers (SDL3)* under Controls); Steam Input and DS4Windows are not needed.\n\n**Mods folder** — `R2_MODS=1` (launcher: Mods folder = On) loads files from `mods\\` next to the game (`R2_MODS=\u003Cfolder>` names another folder). Each sub-folder is one mod laid out like the game's `PS3_GAME` folder: `mods\\MyMod\\USRDIR\\\u003Cpath of the file to replace>`. Mods are applied in alphabetical order (a later one wins on the same file); a folder name starting with `_` or `-` is skipped. Every file layer of the runtime (cellFs, sys_fs) uses the replacement. `logs\\run.log` lists each mod and override at start-up (`[mods] override: ...`) and the first use of each (`[mods] using ...`). Single members of a `.psarc` archive and single level assets (by tuid) can be replaced as well: see [docs\u002FMODDING.md](docs\u002FMODDING.md). Single textures by content hash go through the renderer's texture packs (*Graphics enhancements*, `RSX_TEXPACK`).\n\n**Shaders** — the Compatible renderer keeps every GPU pipeline it builds in `shadercache\\rpcs3\\` and, at start-up, builds all of them again before the first frame (RPCS3's shader cache preload), so after the first play-through nothing is compiled in game. The log shows the progress (`[r2rsx] shader preload: compiling n\u002FN pipelines`, then the total time); `R2_SHADER_PRELOAD=0` keeps the preload but without the log lines. `R2_VK_PIPE_CACHE` (default on) also keeps the graphics driver's own pipeline cache on disk (`shaders_cache\u002Fvk_pipeline_cache.bin`, used only by the same GPU and driver build), so the start-up preload mostly reloads instead of recompiling; `0` starts with an empty driver cache every run as RPCS3 does. Every pipeline first linked during play is logged (`[r2rsx] shader cache miss #n during play`) and is preloaded from the next start. With `R2_RSX_PROF=1`, the `r8 per frame` line's *in-memory misses* and *draws skipped (program not ready)* should stay at 0 in a level you have played before. `R2_SHADER_CACHE=0` turns the disk cache off; `R2_SHADER_MODE` (launcher: Shader compilation) picks asynchronous \u002F interpreter \u002F synchronous compilation for pipelines that are not in the cache yet. The pipelines depend on the game's state and cannot be generated before they are first seen, but they can be recorded and shipped:\n\n- `R2_FOSSILIZE=record` writes every pipeline built in a session (with its shaders, layouts and render pass) to `shadercache\\rpcs3\\shaders_cache\\r2_pipelines.foz` (Valve's Fossilize format, the one Steam's shader pre-caching uses; sessions append). By default (`auto`) the renderer replays that file, if it is there, on low-priority threads after the start-up preload, so a new GPU or driver compiles them into its pipeline cache in the background. `0` = off; `R2_FOSSILIZE_DB=\u003Cpath>` = another file.\n- `R2_PRELOAD_ASYNC` (default on with the asynchronous shader mode, off otherwise) compiles every cached shader before the first frame but links only the first `R2_PRELOAD_BOOT` (384) pipelines recorded; `R2_PRELOAD_THREADS` (default a quarter of the CPU threads, 1 to 4) background threads link the rest while you play (`[r2rsx] shader preload: background done ...`). `0` = everything before the first frame, as before.\n- `R2_VK_GPL` (default on when the GPU supports `VK_EXT_graphics_pipeline_library` with fast linking, logged as `[r2rsx] pipeline libraries (R2_VK_GPL): on`): a pipeline first needed during play is linked in well under a millisecond from separately cached parts, and the fully optimised pipeline is compiled in the background and swapped in. Same shaders and state; `0` = the normal path.\n- `R2_PIPE_LOG` (default on) prints a `[pipe]` line every 5 seconds with the time the render thread spent waiting for shader or pipeline compilation, the number of waits over 2 ms (histogram) and the fast-link \u002F background counts.\n\n**Not done:** native HDR rendering (the game produces an 8-bit SDR image; the opt-in HDR output below maps that image into an HDR swapchain at a chosen paper white - brighter UI and correct SDR-in-HDR, but no extra highlight range; real HDR needs the game's tone mapping rewritten). Frame generation is available (see *PC extras*). A centred 16:9 HUD at ultrawide is available as an experiment (`RSX_HUD_FIX=1`, *Graphics enhancements*).\n\n### PC extras\n\nAll of these are in the launcher (on the Display, Graphics, Upscaling & Frame Gen, Controls, Interface & Notifications and Advanced pages, see *All launcher options*, and the **Saves & tools** page) and most also in game: **F9**, or **F10 › More PC Options**. The in-game page writes the same `settings.ini` \u002F `settings.bat` lines as the launcher. Rows marked *(next start)* apply after a restart; the rest apply at once. Code: `project\\r2_pcextra.cpp` (game side), `project\\launcher_extra.inc` (launcher), `ps3recomp\\third_party\\rpcs3\\rpcs3\\Emu\\RSX\\VK\\VKR2PcExtras.cpp` (Vulkan HDR \u002F colour-blind \u002F Reflex).\n\n- **Skip intro logos** — `R2_SKIP_INTRO` (default on; `0` = watch them). Skips the logo movie. The legal\u002Fhealth notice is a game screen that waits for input and is not skipped automatically (the code that sequences it was not located).\n- **Key rebinding** — keyboard and mouse: launcher Controls page or in game *More PC Options › Key bindings* (Enter = press the new key, Esc = cancel; written to `controls.txt` and re-read at once). Controller: launcher *Controller buttons* or in game *More PC Options › Controller layout* — each Xbox button can act as another one (`PAD_MAP_\u003Cbutton>=\u003Cbutton>`, e.g. `PAD_MAP_A=B`), `PAD_SOUTHPAW=1` swaps the sticks. The remap is applied to the XInput state before the game sees it, so it also changes the game's prompts' meaning (the prompt still shows the PS3 button the game expects).\n- **Automatic prompts** — `R2_PAD_GLYPHS=auto` (default): the prompts follow the last device used (keyboard\u002Fmouse → key names, controller → Xbox or PlayStation symbols by the controller's type). Already in the port; listed here for completeness.\n- **Post effects** — `R2_FX_SCREEN_BLUR=0` (damage \u002F sprint \u002F explosion full-screen blur), `R2_FX_CAMERA_SHAKE=0`, `R2_FX_LETTERBOX=0` (cutscene black bars). Implemented by pointing the game's Lua script bindings for these effects at a no-op, so they switch live. Resistance 2 has no film grain, depth-of-field, chromatic aberration or vignette pass of its own to turn off (none were found among its render passes or script functions).\n- **Colour-blind filter** — `R2_COLORBLIND=1|2|3` (protanopia \u002F deuteranopia \u002F tritanopia): daltonization in the final output pass (Compatible renderer). Applies at once.\n- **Extra crosshair** — `R2_CROSSHAIR=dot|cross`: a small marker at the window centre during play (shown while the game's look input is active; hidden in menus, the PC menu and photo mode).\n- **Window** — `RSX_RESIZABLE` (default on): the windowed-mode window has a sizing border and the swapchain follows the new size. `RSX_ALT_ENTER` (default on): Alt+Enter switches windowed ↔ borderless fullscreen.\n- **Frame rate** — the cap stays the game's own frame limiter (`R2_FPS`, launcher *Frame rate*); there is only one limiter. 120 \u002F 144 \u002F Uncapped are marked *experimental*: the game measures real time per frame and the port rescales its 30 Hz frame-counted timers (`r2_timing_frames`, `R2_PATCH_TIMING_FRAMECOUNT`), so the game does not speed up, but its physics step is fixed at 60 Hz, so above 60 fps moving objects judder slightly and some camera smoothing was written for 30\u002F60 fps and was not audited frame by frame.\n- **NVIDIA Reflex** — `R2_REFLEX=1` (`2` = + Boost), opt-in, Compatible renderer, GeForce with `VK_NV_low_latency2`: low-latency mode plus the Reflex sleep at the start of each frame. It does not cap the frame rate (the game's limiter still does); no latency markers are sent, so the NVIDIA overlay's latency readout stays empty. Does nothing when the extension is missing.\n- **DLSS Frame Generation** — `R2_DLSS_FG=2|3|4` (launcher: Upscaling & Frame Gen › *Frame Generation*; `0`\u002Funset = Off), Compatible renderer, GeForce RTX 40 (2x) or RTX 50 (up to 4x Multi Frame Generation), Anti-aliasing = NVIDIA DLSS, setup's optional NVIDIA Streamline download. The GPU inserts 1-3 generated frames between the game's own (`ps3recomp\\third_party\\rpcs3\\rpcs3\\Emu\\RSX\\VK\\VKR2FrameGen.cpp`, NVIDIA Streamline 2.14.16, manual hooking). Smoother motion when the CPU is the limit; adds a little input lag, so Reflex is switched on with it (Streamline drives Reflex while FG is set up; `R2_REFLEX=2` = Boost). The frame-rate setting caps the game's own frames; the Reflex cap keeps rendered × multiplier under the refresh rate. The HUD is split from the scene in the renderer (HUD draws after the 3D pass go to a UI layer that is composited after generation), so HUD text does not warp; when a frame's HUD can't be separated cleanly it is passed through untouched. FG pauses in menus, movies, loading screens, split-screen, while the game is paused and on scRGB HDR, and turns itself off (one `[fg-vk] frame generation off: ...` log line) on other GPUs, without the DLLs, or with FSR \u002F XeSS \u002F no AA. Debug: `R2_DLSS_FG_HUD=0` (no HUD split), `R2_DLSS_FG_HUD_DEBUG=1` (show the HUD-less image), `R2_DLSS_FG_MENU_OFF=0`, `R2_DLSS_FG_CAP=0`, `R2_DLSS_FG_YFLIP=0`, `R2_DLSS_FG_DEBUG=1`. With a fixed-refresh display and no G-Sync, vsync is replaced by the Reflex cap and may tear.\n- **FSR 3 Frame Generation (fallback)** — `R2_DLSS_FG=fsr3` (launcher: *Frame Generation* › *FSR 3 2x*, listed on GPUs that are not RTX 40\u002F50), or `R2_FG_BACKEND=auto|dlss|fsr3` (auto = default: DLSS-G first, then FSR 3 2x when DLSS-G is unavailable; `dlss` = DLSS-G only; `fsr3` = FSR 3 only, also on RTX cards). AMD FidelityFX frame interpolation (FidelityFX API 1.1.4, `tools\\ffx_vk\\amd_fidelityfx_vk.dll`, MIT, shipped with the port) on any Vulkan GPU with a spare present-capable queue and timeline semaphores; 2x only. Needs Anti-aliasing = FSR, DLSS or XeSS (for depth and motion vectors) and SDR or HDR10 output. Uses the same inputs, HUD split (the HUD-less scene goes to interpolation, the HUD layer is composited on every shown frame), camera-cut resets and pause rules as DLSS-G. No Reflex while it is selected (FidelityFX's swapchain has no low-latency mode), so it adds a little more input lag than DLSS-G; the game's frame cap still applies to its own frames and FSR 3 paces the generated ones. Turning it on or off mid-game waits for the GPU once (a short hitch). HDR10 works on the usual A2B10G10R10 swapchain; a driver that only offers A2R10G10B10 for HDR10, and scRGB HDR, keep FG paused. Debug: `R2_DLSS_FG_DEBUG=2` (FidelityFX tear lines and reset markers); the HUD switches above apply too. Off reasons are logged as `[fg-vk] ...` lines.\n- **HDR output** — `R2_HDR=1` (HDR10 \u002F PQ, `VK_COLOR_SPACE_HDR10_ST2084_EXT`) or `R2_HDR=scrgb` (FP16 extended linear sRGB), opt-in, Compatible renderer, Windows HDR must be on. The final output pass converts the SDR image to linear and scales it so SDR white = `R2_HDR_PAPER` nits (default 200), then encodes PQ or scRGB; `R2_HDR_PEAK` (default 1000) is sent as `VK_EXT_hdr_metadata` and caps highlights. Falls back to SDR when the display\u002Fdriver has no HDR surface format (the log says so). The F3 overlay, PC menu and screenshots (GDI) stay SDR.\n- **Hold to skip movies** — `R2_CUTSCENE_SKIP` (default on): hold Space \u002F Enter \u002F A \u002F Menu for 1 s while a pre-rendered movie plays and the port presses the game's own skip button (the game lets you skip its movies). In-engine cutscenes are not skipped (not safe: they drive level scripting). The *Hold Space \u002F A to skip* notification shown when a movie starts can be hidden with launcher *Show cutscene skip hint: Off* (`PORT_SKIP_HINT=0`, or `R2_SKIP_HINT=0`); holding still skips.\n- **Subtitles** — not available: the subtitles are drawn by the game's Scaleform movies at a fixed size; there is no size or background setting to hook.\n- **Discord Rich Presence** — `R2_DISCORD=1`, opt-in. Talks to the local Discord app over `\\\\.\\pipe\\discord-ipc-0..9` (no SDK): *Resistance 2* plus the current level (from the level files the game opens). Needs an application id: create one at discord.com\u002Fdevelopers and put the number in `discord_appid.txt` in the game folder or `R2_DISCORD_APPID`. Silent when Discord isn't running (retries every minute).\n- **Photo mode** — `R2_PHOTO` (default on; `0` = off): **F7** pauses the game, hides the port's overlays (F3, crosshair, hints) and shows a short note; **F12** takes the screenshot; F7 again resumes. There is no free camera (the game's camera is driven by its own update code that is not hooked safely yet) and the game's HUD cannot be hidden separately (it is drawn into the same target as the 3D scene).\n- **Pause when the controller disconnects** — `R2_PAD_DISCONNECT_PAUSE` (default on): when the controller in use disappears the game pauses with a message until it is reconnected or Enter is pressed.\n- **Benchmark** — launcher *Saves & tools › Run benchmark* (or `R2_BENCH=1`): the game follows a fixed input script from start-up into the first level (`R2_BENCH_SCRIPT`, the `scratch\\heliboot.ps1` route), measures `R2_BENCH_SECONDS` (default 60) and quits (`R2_BENCH_QUIT=0` keeps it running). Writes `logs\\bench\\R2_bench_\u003Cdate>.txt` (average, 1 % and 0.1 % low fps, median \u002F p99 \u002F max frame time, draws per frame, µs per draw) and appends `logs\\bench\\bench_history.csv`; the launcher shows the last result. The launcher's button also sets `R2_BACKGROUND=run` and turns the pad-loss pause off for the run.\n- **Save manager** — launcher **Saves & tools**: lists the saves (title from `PARAM.SFO`, date, size), *Back up now*, per-backup *Restore* (the current saves are backed up first as `_before-restore`) and *Delete*, and *Open* buttons. *Back up saves before playing* (`R2_SAVE_BACKUP`, default on, keeps the newest 10 automatic backups; `5` \u002F `30`; `0` = off): Play copies the save folder to `save_backups\\\u003Cdate>_auto` when it changed since the newest backup.\n\n**How to check them in game:** F9 opens *More PC Options*; toggle Screen blur and take damage \u002F sprint; Colour-blind filter changes colours at once; F7 = photo mode; unplug the controller during play = pause message; hold Space during the intro movie of a level = skip; drag the window edge in windowed mode; Alt+Enter; `logs\\run.log` lines start with `[r2x]` (options, level names, Discord, benchmark result).\n\n## Graphics options\n\n- **Frame rate:** 60 fps by default (the game was 30 fps on PS3). The game's own frame limiter is replaced by a precise PC-side one, the same idea as RPCS3's \"Unlock FPS\" patch. 30 fps is still available in the launcher.\n- **Display mode:** borderless fullscreen, exclusive fullscreen or windowed, with VSync off \u002F on \u002F adaptive.\n- **Anti-aliasing → NVIDIA DLSS** uses DLSS on GeForce RTX cards and falls back to FSR 3.1 on other GPUs. The DLSS SDK is downloaded by Setup into `tools\\dlss` (if that fails, the port still builds without it).\n- **Upscaling** (with FSR or DLSS on): Native (DLAA), Quality, Balanced or Performance. The default is DLSS Performance at a 4K render resolution, which is then downscaled to your screen: sharper than native at about the cost of native. Menus and HUD stay at full resolution.\n- **Intel XeSS (experimental, Compatible renderer):** XeSS 2 (`rpcs3\u002FEmu\u002FRSX\u002FVK\u002FVKR2XeSS.cpp`, Vulkan `xessVK*` API, Intel's `libxess.dll`; runs on any GPU through DP4a) is hooked into the RPCS3 renderer's upscaler. Pick **Intel XeSS** in the launcher's upscaling option, or set `RSX_FSR=4`. If XeSS can't start, or on the native renderer, FSR 3.1 is used instead. The preset follows the Upscaling ratio (Native → Native AA, Quality → Ultra Quality, Balanced → Quality \u002F Balanced, Performance → Balanced \u002F Performance). `RSX_XESS_QUALITY=aa|uqp|uq|q|b|p|up` asks for a preset, `RSX_XESS_JITTER_SIGN=-1` \u002F `RSX_XESS_JITTER_SIGN_Y=-1` flip the jitter, and `RSX_XESS_LOG=1` logs XeSS's own messages. Setup downloads the XeSS SDK (`tools\u002Fxess\u002F`) after you accept Intel's licence.\n- Moving objects (like rotating weapon pickups) are masked for DLSS so they don't leave ghost copies.\n- **Low-end PCs:** the launcher's **Recommended for this PC** button picks settings for your CPU and GPU. Tuned for a 4-core CPU, a GTX 1050-class GPU and 8 GB of RAM; on 4 cores the first level holds 60 fps. On CPUs with fewer than 8 threads the port stops raising thread priorities and pinning threads to cores, and its busy-wait loops give the CPU to other threads. If a 4-core PC still stutters, use 30 fps. Advanced: `PS3_PRIO_BOOST=0\u002F1` forces priority boosts off or on; `PORT_MAIN_CPU=\u003Cn>` pins the main thread to CPU n.\n- **Shader-program re-sends** (renderer, on by default): the game sends the same shader programs again hundreds of times per frame. A re-sent fragment program with the same code only has its constants refreshed (`R2_FP_REBIND=0` turns this off), a vertex program uploaded or selected again with the same code keeps its analysis (`R2_VP_REBIND=0`), and when only render state changed and the previous draw's pipeline still matches it is reused without a cache lookup (`R2_PIPE_MEMO=0`). `R2_RSX_PROF=1` shows them as *re-sent FP\u002FVP kept* and *pipeline memo hits*. All renderer switches are listed in `ps3recomp\u002Fthird_party\u002Frpcs3\u002FREADME.port.md`.\n- **Skipped re-uploads** (renderer round 8, on by default, output byte-identical): transform constants that have not changed since the last upload for the same vertex program are not uploaded again (`R2_XFORM_MEMO=0` turns this off), and an index range identical to one already converted this frame reuses the converted copy (`R2_IDX_DEDUP=0`). `R2_FIFO_MERGE=1` (off by default) lets RPCS3 merge back-to-back draws from 400 draws per frame instead of 2,000 (`R2_FIFO_MERGE=\u003Cn>` sets the threshold). Asynchronous texture streaming (`R2_ASYNC_TEX=1`) stays off: it only moves the GPU copy to another queue (the CPU work stays on the render thread), stops texture memory reuse and adds queue hand-overs, and the profiler shows almost no texture uploads in play (`texture uploads` on the `r8 per frame` line). `R2_RSX_PROF=1` prints two `r8` lines (where the end of each draw goes, Vulkan recording share, skipped bytes, pipeline misses, FIFO redundancy); adding `R2_RSX_CENSUS=1` prints `r9 census` lines (most frequent GPU commands, render-target, depth and texture formats) used to pick the next game-specific fast paths.\n- **ZCULL labels over a flip** (`R2_ZCULL_FLIP_LAG=\u003Cn>`, experimental, **default 0 = off**): in strict ZCULL mode, lets occlusion labels still waiting on the GPU be carried over up to `n` flips instead of waiting at every flip. They are also released whenever the RSX command queue runs dry. It hung Resistance 3 in one bench, so leave it off unless you are testing it.\n- **CPU profile** (Performance page): Auto picks from the cores the game can use (logged as `[cpu]`). Low (≤4 cores) turns off the timing spin-waits, folds the Vulkan submit thread into the render thread and uses fewer shader-compiler threads. Mid (6 cores) shortens the spin-waits. High changes nothing. The port also spreads its main, RSX and FIFO threads over separate cores, keeps them on P-cores on hybrid Intel CPUs and lowers background threads. Advanced: `PORT_CPU_PROFILE=auto|low|mid|high|off` (env settings you set yourself always win); `PORT_THREAD_PLACEMENT=0` turns off thread placement. See *CPU performance switches* below.\n\n## Shader precompile and rebuilding the shader cache\n\nShader caches are never shipped with the port: they are built on your PC, from the shaders your game uses, the first time each one is seen. Launcher, Performance page, **SHADER CACHE**:\n\n- **Compile shaders before playing** (default On, `R2_PRELOAD_BOOT=-1`): at start-up the Compatible renderer builds every pipeline in its disk cache before the game gets its first frame (the game's RSX context waits for it), so nothing seen before compiles during play. Progress: a centred **Compiling shaders N \u002F M** panel with a progress bar, drawn into the game image (`R2_PRELOAD_OSD=0` uses a separate window, not shown over exclusive fullscreen) and log lines `[r2rsx] shader preload: compiling every cached pipeline before the game starts on N threads`, `compiling n\u002FN pipelines`, then `done, every cached pipeline is ready`. A few seconds with a warm driver cache, a minute or two after a driver update or a rebuild. Off (`R2_PRELOAD_BOOT` unset, 384 by default): only the first 384 recorded pipelines are built before the first frame and the rest in the background while you play (can hitch briefly).\n- **Shader compile threads** (`R2_PRELOAD_BOOT_THREADS`, default Auto = every logical core but one, 1 to 64): the threads that build the pipelines before the game starts.\n- **Shader interpreter while compiling** (`R2_SHADER_INTERP=1`, default Off): RPCS3's \"Async with Shader Interpreter\": a shader that isn't compiled yet is drawn by the interpreter instead of being skipped (no briefly invisible geometry on a cache miss; slower frames while it is active).\n- **Rebuild shader cache** (button, asks first; refused while `Resistance2.exe` is running) deletes the compiled, driver-specific part and keeps the list of shaders and pipelines to build, so the next start with Compile shaders before playing on rebuilds all of them. Deleted, from `shadercache\\` and from its backup in `%LOCALAPPDATA%\\Resistance2Port\\shadercache` (`run.bat` restores missing files from there):\n  - `rpcs3\\shaders_cache\\vk_pipeline_cache.bin` (and `.bin.tmp`): the Vulkan driver's pipeline cache (driver blobs)\n  - `rpcs3\\shaders_cache\\r2_gpu_stamp.txt`: the GPU and driver that cache was built for\n  - `rpcs3\\shaders_cache\\shaderscan.stamp`: makes the launcher run shaderscan again on the next Play (see below)\n  - `rpcs3\\shaders_cache\\r2_pipelines.foz`, `r3_pipelines.foz`: Fossilize databases (`R2_FOSSILIZE`)\n  - `vk_pipeline_cache.bin`: the native renderer's Vulkan pipeline cache\n\n  Kept: `rpcs3\\shaders_cache\\pipelines\\vulkan\\...\\*.bin` and `raw\\*.vp` \u002F `*.fp` (RPCS3's pipeline list and shader programs: what gets rebuilt) and the native renderer's `vk_pipeline_variants.bin`, `rsx_engine_programs.bin` and `pipelines_*.db` lists.\n- **GPU or driver change:** `r2_gpu_stamp.txt` records vendor, device, driver version, pipeline cache UUID and GPU name when the driver cache is saved. When they differ at start-up the log says `[r2rsx] vk pipeline cache: GPU or driver changed since the cache was built (was: ..., now: ...)`, the old `vk_pipeline_cache.bin` is deleted and every pipeline is rebuilt from the kept list (before play with the option on).\n- **Offline shader scan:** [shaderscan](https:\u002F\u002Fgithub.com\u002Fmiroslavdanutalexandru-alt\u002Fshaderscan) (GPL-2.0, its own repository) is downloaded by Setup \u002F `build.bat` into `tools\\shaderscan.exe`: `tools\\get_shaderscan.ps1` fetches the release pinned in `tools\\shaderscan.version` and checks its SHA-256 (offline: skipped; set `SHADERSCAN_EXE=\u003Cpath>` to use your own build). It is not part of the port's source or Setup, and the launcher works without it. When `shaderscan.exe` is next to `Launcher.exe` (or in `tools\\`), Play first runs `shaderscan --check --out shadercache\\rpcs3\\shaders_cache`; if that says the cache isn't seeded (first launch, a new shaderscan version, or after Rebuild shader cache), it runs `shaderscan --game \u003Cfolder> --out ... --progress`, which extracts every RSX shader from your game files into the cache so Compile shaders before playing covers the whole game without a playthrough. The launcher shows a progress panel (Esc or **Skip for now** stops it; the game starts either way) and logs the tool's output to `logs\\shaderscan.log`. It runs at most once per launcher session.\n- **Object motion vectors** (`RSX_DLSS_OBJMV`, default Off, Compatible renderer): DLSS\u002FFSR get per-object motion for moving characters and objects (sharper, less ghosting on them) at some CPU cost; Off = camera motion only.\n\n## CPU performance switches and builds\n\nThe frame rate in heavy scenes is set by two threads: the game's main PPU thread and **rawSPU0**, the SPU job kernel (the main thread waits on its jobs). Env switches (unset = default):\n\n- `PORT_SPU0_CPU=\u003Cn>` — with ≥ 12 logical CPUs rawSPU0 gets logical CPU 6 and an empty SMT sibling, like the main thread (`PORT_MAIN_CPU`, default 2) and the RSX thread (`PORT_FIFO_CPU`, default 4). `-1` turns this off. In the Compatible (RPCS3) renderer the RSX core is the thread named `rsx::thread`, which now gets the `PORT_FIFO_CPU` core (it was left with the other threads before and that core sat idle). Everything else shares the remaining cores. The log prints `[affinity] ... pinned` lines. `PORT_MAIN_CORE=0` turns off all of this pinning.\n- `PORT_PCORE_HOT=0` — on Intel hybrid CPUs (P + E cores), main, rawSPU0, `rsx::thread` and the FIFO \u002F RSX engine threads get thread CPU sets for the P-cores (`SetThreadSelectedCpuSets`), also with fewer than 4 P-cores. Hard pins only use P-cores. AMD and other uniform CPUs are not changed.\n- `PORT_KEEPER_MS=\u003Cms>` — the two thread-placement keepers rescan the process threads every 1–2 s while new threads appear, then every 5000 ms (each scan walks every thread on the system; at 1 Hz they cost 4–7 % CPU each).\n- `PORT_PIN_TOPO=0` — the default pin CPUs above (main, RSX, rawSPU0) are now taken from the detected CPU topology: the first logical CPU of physical cores 1, 2 and 3 (P-cores first on hybrid CPUs). On a 6-core\u002F12-thread CPU that is still 2, 4 and 6; on CPUs without SMT it is 1, 2 and 3 instead of two hot threads sharing a core. `=0` uses the old fixed 2 \u002F 4 \u002F 6. The `[affinity] main thread ...` line shows the CPUs and the switch values.\n- `PORT_REST_SMT=\u003C0|1|2>` — where all other threads (SPURS lanes, rawSPU1, RSX workers, driver, audio) may run. `0` (default): only cores that have no pinned hot thread, so every hot thread keeps its SMT sibling idle (on 6C\u002F12T that is mask `0xF03`). `1`: also the siblings of the rawSPU0 and RSX cores. `2`: also the main thread's sibling. Try `1` if the `[thrcpu]` lines show the SPURS lanes starved; it costs the hot threads some SMT throughput.\n- `PS3_USLEEP_NOTIFY_PUT=0` — a short guest `usleep` poll (under 1 ms) already ends early when an SPU atomic writes guest memory (`PS3_USLEEP_NOTIFY`). It now also ends early on a plain SPU DMA PUT, so the main thread's SPU-job wait (`guestwait` at `0x006B8D3C`) re-checks as soon as a job writes its result instead of finishing its 128 µs sleep. It costs nothing while no thread is waiting. `=0` turns this off. Logged once as `[usleep] PS3_USLEEP_NOTIFY=1 PS3_USLEEP_NOTIFY_PUT=1 ...`.\n- `SPU_INLINE_CH=0` — the lifted SPU code writes the MFC DMA parameter channels (LSA, EAH, EAL, size, tag, tag mask) and reads the status channels directly instead of calling the channel runtime (thousands of call sites, each of which also reloaded every live register). The command and blocking channels still go through the runtime. `=0` restores the calls. Build option `-DPORT_SPU_INLINE_CH=OFF`.\n- `PORT_SPU_SPINWAIT=old|backoff|wait` — how a raw SPU spins in a b","这是一个将PS3游戏《Resistance 2》静态重编译为原生Windows可执行程序的开源项目，不依赖CPU模拟器，而是将原始PowerPC\u002FSPU代码翻译为C\u002FC++并本地编译。核心功能包括通过RPCS3 Vulkan渲染器实现图形输出、支持NVIDIA DLSS与AMD FSR超分辨率、60 FPS稳定帧率、键盘鼠标操作及高分辨率显示。项目要求用户自备EU版（BCES00226 v1.00）游戏镜像，所有代码翻译与构建均在本地完成，不分发任何游戏资产或预编译二进制。适用于具备AVX2 CPU和Vulkan 1.3 GPU的Windows 10\u002F11平台，适合希望在PC上以接近原生性能运行该独占游戏的技术型玩家。",2,"2026-11-24 04:44:01","CREATED_QUERY"]