Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

FPSLocker Switch: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 13: Line 13:
|donation=https://ko-fi.com/masagrator
|donation=https://ko-fi.com/masagrator
}}
}}
An overlay that with companion SaltyNX plugin [[NX-FPS Switch|NX-FPS]] 1.0+ allows to set custom FPS in Nintendo Switch retail games.
An overlay that with SaltyNX allows to set custom FPS in Nintendo Switch retail games.


You can see the [[#Media|video]] how it works (with [https://gbatemp.net/threads/the-witcher-3-60-fps-and-dynamic-resolution-tweaks.550211/ Witcher 3 dynamic resolution config mod] to make anything above 30 FPS available).
You can see the [[#Media|video]] how it works (with [https://gbatemp.net/threads/the-witcher-3-60-fps-and-dynamic-resolution-tweaks.550211/ Witcher 3 dynamic resolution config mod] to make anything above 30 FPS available).
Line 23: Line 23:
* [[Atmosphere Switch]]
* [[Atmosphere Switch]]
* [[SaltyNX Switch|SaltyNX 0.5.1+]]
* [[SaltyNX Switch|SaltyNX 0.5.1+]]
* [[NX-FPS Switch|NX-FPS 1.5+]]
* Tesla environment: [[NX-ovlloader Switch|ovlloader]] + [[Tesla Menu Switch|Tesla Menu]]
* Tesla environment: [[NX-ovlloader Switch|ovlloader]] + [[Tesla Menu Switch|Tesla Menu]]


Line 30: Line 29:
To install:
To install:
*Download [https://github.com/masagrator/SaltyNX/releases SaltyNX], unpack zip file, copy the folders <code>SaltySD</code> and <code>atmosphere</code> to the root of your SD card, accept any popup about overwriting folders.
*Download [https://github.com/masagrator/SaltyNX/releases SaltyNX], unpack zip file, copy the folders <code>SaltySD</code> and <code>atmosphere</code> to the root of your SD card, accept any popup about overwriting folders.
*Download [https://github.com/masagrator/NX-FPS/releases NX-FPS], unpack zip file, copy <code>SaltySD</code> folder to the root of SD card, accept any popup about overwriting folders.
*Download [https://github.com/WerWolv/nx-ovlloader/releases nx-ovlloader], unpack zip file, copy <code>atmosphere</code> folder to the root of SD card, accept any popup about overwriting folders.
*Download [https://github.com/WerWolv/nx-ovlloader/releases nx-ovlloader], unpack zip file, copy <code>atmosphere</code> folder to the root of SD card, accept any popup about overwriting folders.
*Download [https://github.com/WerWolv/Tesla-Menu/releases Tesla Menu], copy <code>switch</code> folder to the root of SD card, accept any popup about overwriting folders.
*Download [https://github.com/WerWolv/Tesla-Menu/releases Tesla Menu], copy <code>switch</code> folder to the root of SD card, accept any popup about overwriting folders.
*Download [https://github.com/masagrator/Status-Monitor-Overlay/releases Status Monitor Overlay], copy <code>Status-Monitor-Overlay.ovl</code> to <code>switch\.overlays</code> folder. It may not be visible in USB Mass Storage, but it's there.
*Download [https://github.com/masagrator/Status-Monitor-Overlay/releases Status Monitor Overlay], copy <code>Status-Monitor-Overlay.ovl</code> to <code>switch\.overlays</code> folder. It may not be visible in USB Mass Storage, but it's there.
*Download [https://github.com/masagrator/FPSLocker/releases FPSLocker], copy FPSLocker.ovl to <code>switch\.overlays</code> folder. It may not be visible in USB Mass Storage, but it's there.
*Download [https://github.com/masagrator/FPSLocker/releases FPSLocker], copy FPSLocker.ovl to <code>switch\.overlays</code> folder. It may not be visible in USB Mass Storage, but it's there.
*Download [https://github.com/retronx-team/sys-clk/releases sys-clk], copy all 3 folders to the root of SD card, accept any popup about overwriting folders.
*Restart Switch, now you can access overlays by pressing all 3 buttons at once: L, D-Pad Down and Right Stick (aka pressing it).
*Restart Switch, now you can access overlays by pressing all 3 buttons at once: L, D-Pad Down and Right Stick (aka pressing it).


Line 47: Line 47:
If game is supported by SaltyNX and you installed everything correctly, you will see menu where first line states <code>NX-FPS plugin is running</code>. Explanation of each line:
If game is supported by SaltyNX and you installed everything correctly, you will see menu where first line states <code>NX-FPS plugin is running</code>. Explanation of each line:


* <code>Interval Mode</code> - Used by NVN API to set limiter to either 30 FPS (2) or 60 FPS (1 or 0 (0 means that game never bothered to set it, it can be also a sign that game is not utilizing NVN but EGL or Vulkan))
* <code>Interval Mode</code> - This setting, controlled by the NVN API, lets you choose between 30 FPS (2) or 60 FPS (1).
* <code>Custom FPS Target</code> - Lock game to certain FPS. If game is using engine proprietary FPS locks, it may not be able to unlock more than 30 FPS without additional patches.
* <code>Custom FPS Target</code> - Use this to lock the game to a specific FPS. If the game has its own FPS locks, unlocking it beyond 30 FPS may require additional patches.
* <code>Big number on the right</code> - Shows how many frames have passed in last second for currently running game. For checking the lock is working as expected.
* <code>Big Number on the Right</code> - This displays the frames passed in the last second for the running game, confirming that the lock is working as expected.
* <code>Increase/Decrease FPS target</code> - Change FPS Target by 5. Minimum is 15 FPS, max is 60 FPS. If FPS is set above 30 FPS, it sets <code>interval mode</code> to 1. Otherwise it sets interval to 2.
* <code>Increase/Decrease FPS Target</code> - Adjust the FPS target by 5 (between 15 FPS and 60 FPS). If set above 30 FPS, it switches the interval mode to 1; otherwise, it sets it to 2.
* <code>Disable custom FPS target</code> - Removes FPS Target. Since we cannot predict what interval mode is expected at this point, it is in user's discretion to manipulate FPS to bring back correct interval before disabling FPS target.
* <code>Disable Custom FPS Target</code> - Removes the FPS target. Since the expected interval mode cannot be predicted, it's up to you to adjust the FPS to restore the correct interval before disabling the FPS target.
* Advanced settings (submenu):
* Advanced Settings (Submenu):
** If game is using NVN:
** If Game is Using NVN:
*** <code>Window Sync Wait</code> - This is dangerous setting that disabled in most cases will crash game (for example Witcher 3 and Breath of The Wild), but in some can bring benefit of disabling double buffer at the cost of small graphical glitches (for example Xenoblade Chronicles 3). Use it with caution.
*** <code>Window Sync Wait</code> - This can be risky as disabling it may crash the game, but for some, it brings the benefit of disabling double buffer vsync with minor graphical glitches (check the [https://github.com/masagrator/FPSLocker?tab=readme-ov-file#sync-wait list of compatible games]). Use it cautiously, and it won't show if the game doesn't use double buffer.
*** <code>Set Buffering</code> - If game is not using double buffer, this option will show that will allow you to force game to run at double buffer for better framepacing and lower input lag. It is recommended only for games that have near perfect performance at 30 or 60 FPS, but suffer from bad framepacing or big input lag. If you will force double buffer in games with uneven performance, FPS drops will be very severe. It can be applied only at boot of game, so after changing buffering you must save settings in FPSLocker and restart game.
*** <code>Set Buffering</code> - If the game uses buffering other than double, this option allows you to force the game to run at a different buffering level not higher than the original one. Lowering the buffer is recommended for games with near-perfect performance at 30 or 60 FPS but suffer from frame pacing or significant input lag. Apply this only at the game's boot, saving settings in FPSLocker and restarting the game. Explanation of Set/Active/Available Buffers:
** <code>Convert config to patch file</code> - If proper config file exists for this game and version, you will get an option to convert it to patch file that will be loaded when you will run this game next time. Patch is saved to <code>SaltySD/plugins/FPSLocker/patches/*titleid_uppercase*/*buildid_uppercase*.bin</code>
**** Set - Indicates how many buffers were set using <code>nvnWindowSetNumActiveTextures</code>. If not used by the game, it's 0. Games may use this to set a lower buffer value than the reserved space allows. If detected and lower than available buffers, you can use the &quot;(force)&quot; variant next to the default option. Without &quot;(force),&quot; it resets to default settings.
** <code>Delete patch file</code> - If proper config file exists for this game and version, you will get an option to delete patch file so it won't be loaded when you will run this game next time.
**** Active - Displays how many buffers are actively used by the game.
* <code>Save settings</code> - Save profile for currently running game that will be loaded next time by plugin on boot automatically. Don't use it if you disabled Sync Wait and you didn't test it properly that it won't cause crash. Profile is saved in <code>SaltySD/plugins/FPSLocker/*titleid_uppercase*.dat</code>
**** Available - Indicates how many buffers are provided to NVN. This helps force games to use all buffers when they are not doing so.
* <code>Convert Config to Patch File</code> - If a proper config file exists for the game and version, you can convert it to a patch file to load when running the game next time. The patch is saved to <code>SaltySD/plugins/FPSLocker/patches/*titleid_uppercase*/*buildid_uppercase*.bin</code>.
* <code>Delete Patch File</code> - If a proper config file exists, you can delete the patch file to prevent it from loading when running the game next time.
* <code>Check/Download Config File</code> - This option checks the Warehouse repository for the game and version's config file. If it exists, it is downloaded and compared with the one on the SD card. If different, the overlay removes the existing patch and config file. Users must manually convert the new config to a patch file. If the config doesn't exist in the repository, an &quot;Err 404&quot; indicates non-existence, while a 0x312 error suggests an unexpected file from GitHub, and other errors point to potential connection or GitHub server issues.
* <code>Save Settings</code> - Save the profile for the currently running game, automatically loaded by the plugin on the next boot. Avoid using it if Sync Wait is disabled and hasn't been properly tested to avoid potential crashes. The profile is saved in <code>SaltySD/plugins/FPSLocker/*titleid_uppercase*.dat</code>.


===When game is not running===
===When game is not running===
Line 69: Line 73:
Games where you can disable double buffer vsync by turning off Window Sync Wait in FPSLocker:
Games where you can disable double buffer vsync by turning off Window Sync Wait in FPSLocker:


*Batman - The Telltale Series (Warehouse patch enables triple buffer, so there is no need to use this option)
*Pokemon Legends: Arceus
*Pokemon Legends: Arceus
*Pokemon Scarlet
*Pokemon Scarlet
*Pokemon Violet
*Pokemon Violet
*Sonic Frontier
*The Legend of Zelda: Tears of the Kingdom
*The Legend of Zelda: Tears of the Kingdom
*Xenoblade Chronicles: Definitive Edition
*Xenoblade Chronicles: Definitive Edition

Revision as of 13:15, 7 February 2024

FPSLocker
Fpslockernx.png
General
Authormasagrator
TypeOverlays
Version1.2.7
LicenseMIT License
Last Updated2024/02/03
Links
Download
Website
Source
Support Author

An overlay that with SaltyNX allows to set custom FPS in Nintendo Switch retail games.

You can see the video how it works (with Witcher 3 dynamic resolution config mod to make anything above 30 FPS available).

Note: Tool is utilizing detection of graphics API to manipulate FPS, and in special cases it requires using patches made per game for each version to get more than 30 FPS. You can find those patches here. Max supported yaml size is 32kB, though it can be expanded in the future.

Installation

Requirements:

Atmosphere CFW is required. SX OS and other CFWs are not supported. It's advised to use Atmosphere's USB Transfer Tool homebrew to transfer files. If you use Hekate's USB Mass Storage and you will be putting files using any other Operating System than Windows, you must run Hekate's Archive Bit Fixer after putting all files.

To install:

  • Download SaltyNX, unpack zip file, copy the folders SaltySD and atmosphere to the root of your SD card, accept any popup about overwriting folders.
  • Download nx-ovlloader, unpack zip file, copy atmosphere folder to the root of SD card, accept any popup about overwriting folders.
  • Download Tesla Menu, copy switch folder to the root of SD card, accept any popup about overwriting folders.
  • Download Status Monitor Overlay, copy Status-Monitor-Overlay.ovl to switch\.overlays folder. It may not be visible in USB Mass Storage, but it's there.
  • Download FPSLocker, copy FPSLocker.ovl to switch\.overlays folder. It may not be visible in USB Mass Storage, but it's there.
  • Download sys-clk, copy all 3 folders to the root of SD card, accept any popup about overwriting folders.
  • Restart Switch, now you can access overlays by pressing all 3 buttons at once: L, D-Pad Down and Right Stick (aka pressing it).

Additionally for FPSLocker download newest set of patches from FPSLocker Warehouse for games that need more things to be tweaked to get proper FPS boost.

User guide

Overlay runs in two modes:

  • When game is running.
  • When game is not running.

When game is running

If game is supported by SaltyNX and you installed everything correctly, you will see menu where first line states NX-FPS plugin is running. Explanation of each line:

  • Interval Mode - This setting, controlled by the NVN API, lets you choose between 30 FPS (2) or 60 FPS (1).
  • Custom FPS Target - Use this to lock the game to a specific FPS. If the game has its own FPS locks, unlocking it beyond 30 FPS may require additional patches.
  • Big Number on the Right - This displays the frames passed in the last second for the running game, confirming that the lock is working as expected.
  • Increase/Decrease FPS Target - Adjust the FPS target by 5 (between 15 FPS and 60 FPS). If set above 30 FPS, it switches the interval mode to 1; otherwise, it sets it to 2.
  • Disable Custom FPS Target - Removes the FPS target. Since the expected interval mode cannot be predicted, it's up to you to adjust the FPS to restore the correct interval before disabling the FPS target.
  • Advanced Settings (Submenu):
    • If Game is Using NVN:
      • Window Sync Wait - This can be risky as disabling it may crash the game, but for some, it brings the benefit of disabling double buffer vsync with minor graphical glitches (check the list of compatible games). Use it cautiously, and it won't show if the game doesn't use double buffer.
      • Set Buffering - If the game uses buffering other than double, this option allows you to force the game to run at a different buffering level not higher than the original one. Lowering the buffer is recommended for games with near-perfect performance at 30 or 60 FPS but suffer from frame pacing or significant input lag. Apply this only at the game's boot, saving settings in FPSLocker and restarting the game. Explanation of Set/Active/Available Buffers:
        • Set - Indicates how many buffers were set using nvnWindowSetNumActiveTextures. If not used by the game, it's 0. Games may use this to set a lower buffer value than the reserved space allows. If detected and lower than available buffers, you can use the "(force)" variant next to the default option. Without "(force)," it resets to default settings.
        • Active - Displays how many buffers are actively used by the game.
        • Available - Indicates how many buffers are provided to NVN. This helps force games to use all buffers when they are not doing so.
  • Convert Config to Patch File - If a proper config file exists for the game and version, you can convert it to a patch file to load when running the game next time. The patch is saved to SaltySD/plugins/FPSLocker/patches/*titleid_uppercase*/*buildid_uppercase*.bin.
  • Delete Patch File - If a proper config file exists, you can delete the patch file to prevent it from loading when running the game next time.
  • Check/Download Config File - This option checks the Warehouse repository for the game and version's config file. If it exists, it is downloaded and compared with the one on the SD card. If different, the overlay removes the existing patch and config file. Users must manually convert the new config to a patch file. If the config doesn't exist in the repository, an "Err 404" indicates non-existence, while a 0x312 error suggests an unexpected file from GitHub, and other errors point to potential connection or GitHub server issues.
  • Save Settings - Save the profile for the currently running game, automatically loaded by the plugin on the next boot. Avoid using it if Sync Wait is disabled and hasn't been properly tested to avoid potential crashes. The profile is saved in SaltySD/plugins/FPSLocker/*titleid_uppercase*.dat.

When game is not running

It will list installed games (max 32) and as first option it's available "All" submenu. Inside each one you will find two options:

  • Delete settings - Delete file created by "Save settings" option.
  • Delete patches - Delete file created by "Convert config to patch file" option.

Sync Wait

Games where you can disable double buffer vsync by turning off Window Sync Wait in FPSLocker:

  • Batman - The Telltale Series (Warehouse patch enables triple buffer, so there is no need to use this option)
  • Pokemon Legends: Arceus
  • Pokemon Scarlet
  • Pokemon Violet
  • Sonic Frontier
  • The Legend of Zelda: Tears of the Kingdom
  • Xenoblade Chronicles: Definitive Edition
  • Xenoblade Chronicles 2
  • Xenoblade Chronicles 3

Media

FPSLocker on Switch homebrew to unlock FPS in game (Tralala LS)

Changelog

1.2.7 2024/02/03

  • Add support for downloading additional files from Warehouse if config file have "Addons" entry. Used currently only to fix compability issue in Tears of the Kingdom with atmosphere's romfs listing cache creation which allows loading romfs mods.

1.2.6a 2023/12/28

  • Fix overlay lock not working since libnx 4.5.0 release.

v1.2.6 2023/12/08

  • Add option in Advanced Settings to download config from repository Check/download config file. More in README.
  • Slightly redesign Advanced Settings UI.

v1.2.5a 2023/11/21

  • Fix saving settings if "plugins" folder doesn't exist inside SaltySD folder.

v1.2.5 2023/10/01

  • Add support for SaltyNX 0.7.0+.

v1.2.4 2023/06/09

  • Print titleid and buildid if no config is found
  • Allow using all available buffers when game is not using all of them.
  • For this release to properly work it is required to update NX-FPS to version 1.5.4

v1.2.3 2023/05/30

  • Allow in games using Quadruple Buffering (for example Assassin's Creed The Ezio Collection) to force Triple Buffering.
  • When saving settings with different Buffering than Double, Window Sync will be reseted to Enabled.

v1.2.2 2023/05/23

  • Allow setting double buffer in games that are using triple buffer.
  • More in README.
  • NX-FPS 1.5.2+ is required.

v1.2.1 2023/05/20

  • Add "Semi-Enabled" option for Window Sync that doesn't timeout nvnSyncWait if at least second consecutive frame was rendered below 8.3ms.
  • At cost of slightly worse performance it solved issues in Tears of the Kingdom with longer loading times and screen tearing in menus at 60 FPS.
  • It is required to update NX-FPS to version 1.5.1+ for this to work.

v1.2.0 2023/05/16

  • Add support for MASTER_WRITE entry in FPSLocker patches that allows to patch any part of main before game is booted (when applied in Advanced Settings you will see "Master Write was loaded to game"). This is to allow patches to redirect assembly that normally read values from Read Only sections to code caves or patching executable to disable double buffer.
  • Change name "Sync Wait" to "Window Sync Wait"
  • Now if game config that can be converted to patch is not available, instead of error code overlay will print Game config file not found.
  • NX-FPS 1.5.0+ is required to properly support new patches.

v1.1.4 2023/05/06

  • FPSLocker now can show how many framebuffers is used by NVN and show it in Advanced Settings.
    • "Buffered frames: 2" = game is using real double buffer.
  • Since this number cannot be changed on the fly, this is just an information update.

v1.1.3 2023/04/05

  • Provide better API detection.
  • Now you can see if game is using NVN, EGL or Vulkan in Advanced Settings.
  • Requires updating NX-FPS to at least 1.3 version.

v1.1.2 2023/04/02

  • Fix RTLD detection in older games to get proper BID (f.e. in L.A. Noire).

v1.1.1 2023/04/02

  • Updated libtesla to fix random crash in docked mode related to freeing framebuffer.

v1.1.0 2023/03/19

  • Add support for creating LOCK patches from yaml configs.

v1.0.0 2023/03/08

  • First Release.

Credits

Thanks to ~WerWolv for creating Tesla environment, and ~cucholix + ~Monked for tests.

External links

Advertising: