Hard-fork of the Ryujinx project
Go to file
riperiperi a64fee29dc
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.

* Vulkan: add situational "Fast Flush" mode

The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.

However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.

The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.

The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.

This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.

Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).

* Add conversions in milliseconds next to flush timers.
2023-04-11 09:23:41 +02:00
.github CI: add a version tag to correlate release versions with commits (#4572) 2023-03-22 13:17:28 +01:00
ARMeilleure ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661) 2023-04-11 08:55:04 +02:00
distribution Misc: Support space in path on macOS distribution (#4462) 2023-03-12 17:21:21 +01:00
Ryujinx gtk: Fix a NRE when disposing OpenGL (#4648) 2023-04-10 17:00:23 +02:00
Ryujinx.Audio Misc performance tweaks (#4509) 2023-03-11 17:05:48 -03:00
Ryujinx.Audio.Backends.OpenAL Use NuGet Central Package Management to manage package versions solution-wise (#4095) 2022-12-12 16:03:10 +01:00
Ryujinx.Audio.Backends.SDL2 audout: Fix a possible crash with SDL2 when the SDL2 audio backend is dummy (#4605) 2023-03-27 20:56:36 +02:00
Ryujinx.Audio.Backends.SoundIo Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
Ryujinx.Ava Force activate parent window before dialog is shown (#4663) 2023-04-11 00:04:31 +02:00
Ryujinx.Common Fix missing string enum converters for the config (#4634) 2023-04-03 15:37:27 +02:00
Ryujinx.Cpu Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
Ryujinx.Graphics.Device Use method overloads that support trimming. Mark some types to be trimming friendly (#4083) 2022-12-12 15:10:05 +01:00
Ryujinx.Graphics.GAL Use index fragment shader output when dual source blend is enabled (#4404) 2023-04-05 05:25:19 +02:00
Ryujinx.Graphics.Gpu Use index fragment shader output when dual source blend is enabled (#4404) 2023-04-05 05:25:19 +02:00
Ryujinx.Graphics.Host1x misc: Use official names for NVDEC registers (#4192) 2023-01-02 14:48:46 +00:00
Ryujinx.Graphics.Nvdec misc: Use official names for NVDEC registers (#4192) 2023-01-02 14:48:46 +00:00
Ryujinx.Graphics.Nvdec.FFmpeg Replace DllImport usage with LibraryImport (#4084) 2022-12-15 18:07:31 +01:00
Ryujinx.Graphics.Nvdec.Vp9 Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
Ryujinx.Graphics.OpenGL OpenGL: Fix OBS/Overlays again by binding FB before present (#4668) 2023-04-11 08:32:31 +02:00
Ryujinx.Graphics.Shader Use index fragment shader output when dual source blend is enabled (#4404) 2023-04-05 05:25:19 +02:00
Ryujinx.Graphics.Texture Update range for remapped sparse textures instead of recreating them (#4442) 2023-03-14 17:08:44 -03:00
Ryujinx.Graphics.Vic Accelerate NVDEC VIC surface read/write and colorspace conversion with Arm64 HW intrinsics (#4351) 2023-02-07 02:38:54 +00:00
Ryujinx.Graphics.Video Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
Ryujinx.Graphics.Vulkan Vulkan: add situational "Fast Flush" mode (#4667) 2023-04-11 09:23:41 +02:00
Ryujinx.Headless.SDL2 Source generated json serializers (#4582) 2023-04-03 10:14:19 +00:00
Ryujinx.HLE Eliminate boxing allocations caused by ISampledData structs (#4556) 2023-04-05 17:42:32 -03:00
Ryujinx.Horizon Slight Code Refactoring (#4373) 2023-03-28 14:59:43 +02:00
Ryujinx.Horizon.Common HIPC: Fix reply possibly also receiving one request (#4232) 2023-01-08 15:34:49 -03:00
Ryujinx.Horizon.Generators nuget: bump Microsoft.CodeAnalysis.Analyzers from 3.3.3 to 3.3.4 (#4310) 2023-01-21 20:04:39 +00:00
Ryujinx.Horizon.Kernel.Generators Slight Code Refactoring (#4373) 2023-03-28 14:59:43 +02:00
Ryujinx.Input Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
Ryujinx.Input.SDL2 Misc performance tweaks (#4509) 2023-03-11 17:05:48 -03:00
Ryujinx.Memory Remove MultiRange Min/MaxAddress and rename GetSlice to Slice (#4566) 2023-03-19 17:31:35 +01:00
Ryujinx.Memory.Tests Misc performance tweaks (#4509) 2023-03-11 17:05:48 -03:00
Ryujinx.SDL2.Common Include a start.sh file with correct launch options (#4013) 2023-01-07 09:06:13 +01:00
Ryujinx.ShaderTools Use NuGet Central Package Management to manage package versions solution-wise (#4095) 2022-12-12 16:03:10 +01:00
Ryujinx.Tests ARMeilleure: Respect FZ/RM flags for all floating point operations (#4618) 2023-04-10 12:22:58 +02:00
Ryujinx.Tests.Unicorn Replace unicorn bindings with Nuget package (#4378) 2023-02-09 02:24:32 +01:00
Ryujinx.Ui.Common Source generated json serializers (#4582) 2023-04-03 10:14:19 +00:00
Ryujinx.Ui.LocaleGenerator nuget: bump Microsoft.CodeAnalysis.Analyzers from 3.3.3 to 3.3.4 (#4310) 2023-01-21 20:04:39 +00:00
Spv.Generator infra: Migrate to .NET 7 (#3795) 2022-11-09 20:22:43 +01:00
.editorconfig Source generated json serializers (#4582) 2023-04-03 10:14:19 +00:00
.gitattributes misc: Enforce LF (#4253) 2023-01-10 19:00:14 +01:00
.gitignore GUI: Add option to register file types (#4250) 2023-01-22 17:39:00 +00:00
crowdin.yml Update Crowdin configuration file 2022-12-02 15:22:21 +01:00
Directory.Packages.props nuget: bump System.IdentityModel.Tokens.Jwt from 6.27.0 to 6.28.1 (#4639) 2023-04-05 07:55:57 +02:00
global.json [Flatpak] Add release github workflow (#4529) 2023-03-11 19:04:13 +01:00
LICENSE.txt Update license (#788) 2019-10-12 23:48:31 -03:00
nuget.config [Headless] Fix for not receiving any SDL events on Linux (#4182) 2022-12-29 15:09:18 +01:00
README.md Add post processing feature to the readme (#4499) 2023-03-04 02:15:29 +00:00
Ryujinx.sln Readd Ryujinx.Ui.LocaleGenerator removed in #4188 (again) 2023-01-05 00:23:17 +01:00
Ryujinx.sln.DotSettings Fix SpirV parse failure (#3597) 2022-08-18 01:49:43 +02:00


Ryujinx
Ryujinx
(REE-YOU-JINX)

Ryujinx is an open-source Nintendo Switch emulator, created by gdkchan, written in C#. This emulator aims at providing excellent accuracy and performance, a user-friendly interface and consistent builds. It was written from scratch and development on the project began in September 2017. Ryujinx is available on Github under the MIT license.

Discord

Compatibility

As of November 2022, Ryujinx has been tested on approximately 3,800 titles; over 3,600 boot past menus and into gameplay, with roughly 3,200 of those being considered playable. You can check out the compatibility list here. Anyone is free to submit a new game test or update an existing game test entry; simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue. Use the search function to see if a game has been tested already!

Usage

To run this emulator, your PC must be equipped with at least 8GiB of RAM; failing to meet this requirement may result in a poor gameplay experience or unexpected crashes.

See our Setup & Configuration Guide on how to set up the emulator.

For our Local Wireless and LAN builds, see our Multiplayer: Local Play/Local Wireless Guide .

Avalonia UI comes with translations for various languages. See Crowdin for more information.

Latest build

These builds are compiled automatically for each commit on the master branch. While we strive to ensure optimal stability and performance prior to pushing an update, our automated builds may be unstable or completely broken.

If you want to see details on updates to the emulator, you can visit our Changelog.

The latest automatic build for Windows, macOS, and Linux can be found on the Official Website.

Building

If you wish to build the emulator yourself, follow these steps:

Step 1

Install the X64 version of .NET 7.0 (or higher) SDK.

Step 2

Either use git clone https://github.com/Ryujinx/Ryujinx on the command line to clone the repository or use Code --> Download zip button to get the files.

Step 3

To build Ryujinx, open a command prompt inside the project directory. You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting Open command window here. Then type the following command: dotnet build -c Release -o build the built files will be found in the newly created build directory.

Ryujinx system files are stored in the Ryujinx folder. This folder is located in the user folder, which can be accessed by clicking Open Ryujinx Folder under the File menu in the GUI.

Features

  • Audio

    Audio output is entirely supported, audio input (microphone) isn't supported. We use C# wrappers for OpenAL, and SDL2 & libsoundio as fallbacks.

  • CPU

    The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions, including partial 32-bit support. It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code. There are three memory manager options available depending on the user's preference, leveraging both software-based (slower) and host-mapped modes (much faster). The fastest option (host, unchecked) is set by default. Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads. The net result is a significant reduction in load times (the amount of time between launching a game and arriving at the title screen) for nearly every game. NOTE: this feature is enabled by default in the Options menu > System tab. You must launch the game at least twice to the title screen or beyond before performance improvements are unlocked on the third launch! These improvements are permanent and do not require any extra launches going forward.

  • GPU

    The GPU emulator emulates the Switch's Maxwell GPU using either the OpenGL (version 4.5 minimum), Vulkan, or Metal (via MoltenVK) APIs through a custom build of OpenTK or Silk.NET respectively. There are currently six graphics enhancements available to the end user in Ryujinx: Disk Shader Caching, Resolution Scaling, Anti-Aliasing, Scaling Filters (including FSR), Anisotropic Filtering and Aspect Ratio Adjustment. These enhancements can be adjusted or toggled as desired in the GUI.

  • Input

    We currently have support for keyboard, mouse, touch input, JoyCon input support, and nearly all controllers. Motion controls are natively supported in most cases; for dual-JoyCon motion support, DS4Windows or BetterJoy are currently required. In all scenarios, you can set up everything inside the input configuration menu.

  • DLC & Modifications

    Ryujinx is able to manage add-on content/downloadable content through the GUI. Mods (romfs, exefs, and runtime mods such as cheats) are also supported; the GUI contains a shortcut to open the respective mods folder for a particular game.

  • Configuration

    The emulator has settings for enabling or disabling some logging, remapping controllers, and more. You can configure all of them through the graphical interface or manually through the config file, Config.json, found in the user folder which can be accessed by clicking Open Ryujinx Folder under the File menu in the GUI.

Contact

If you have contributions, suggestions, need emulator support or just want to get in touch with the team, join our Discord server. You may also review our FAQ.

Donations

If you'd like to support the project financially, Ryujinx has an active Patreon campaign.

All developers working on the project do so in their free time, but the project has several expenses:

  • Hackable Nintendo Switch consoles to reverse-engineer the hardware
  • Additional computer hardware for testing purposes (e.g. GPUs to diagnose graphical bugs, etc.)
  • Licenses for various software development tools (e.g. Jetbrains, IDA)
  • Web hosting and infrastructure maintenance (e.g. LDN servers)

All funds received through Patreon are considered a donation to support the project. Patrons receive early access to progress reports and exclusive access to developer interviews.

License

This software is licensed under the terms of the MIT license.
This project makes use of code authored by the libvpx project, licensed under BSD and the ffmpeg project, licensed under LGPLv3. See LICENSE.txt and THIRDPARTY.md for more details.

Credits

  • LibHac is used for our file-system.
  • AmiiboAPI is used in our Amiibo emulation.