Experimental Nintendo Switch Emulator written in C#
Find a file
riperiperi d461d4f68b
Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217)
OpenGL game overlays and hooks tend to make a lot of assumptions about how games present frames to the screen, since presentation in OpenGL kind of sucks and they would like to have info such as the size of the screen, or if the contents are SRGB rather than linear.

There are two ways of getting this. OBS hooks swap buffers to get a frame for video capture, but it actually checks the bound framebuffer at the time. I made sure that this matches the output framebuffer (the window) so that the output matches the size. RTSS checks the viewport size by default, but this was actually set to the last used viewport by the game, causing the OSD to fly all across the screen depending on how it was used (or res scale). The viewport is now manually set to match the output framebuffer size.

In the case of RTSS, it also loads its resources by destructively setting a pixel pack parameter without regard to what it was set to by the guest application. OpenGL state can be set for a long period of time and is not expected to be set before each call to a method, so randomly changing it isn't great practice. To fix this, I've added a line to set the pixel unpack alignment back to 4 after presentation, which should cover RTSS loading its incredibly ugly font.

- RTSS and overlays that use it should no longer cause certain textures to load incorrectly. (mario kart 8, pokemon legends arceus)
- OBS Game Capture should no longer crop the game output incorrectly, flicker randomly, or capture with incorrect gamma.

This doesn't fix issues with how RTSS reports our frame timings.
2022-03-20 13:37:45 -03:00
.github Address comment from gdkchan: we are starting at 1.1.3 now 2022-01-22 18:05:30 +01:00
ARMeilleure InstEmitMemoryEx: Barrier after write on ordered store (#3193) 2022-03-19 10:32:35 -03:00
distribution/linux Preparation for initial Flatpack and FlatHub integration (#3173) 2022-03-04 18:03:16 +01:00
Ryujinx Ui: Add option to show/hide console window (Windows-only) (#3170) 2022-03-15 02:35:41 +01:00
Ryujinx.Audio amadeus: Fix wrong Span usage in CopyHistories (#3181) 2022-03-07 09:49:29 +01:00
Ryujinx.Audio.Backends.OpenAL UI - Add Volume Controls + Mute Toggle (F2) (#2871) 2021-12-23 13:33:56 -03:00
Ryujinx.Audio.Backends.SDL2 Use minimum stream sample count on SDL2 audio backend (#2948) 2021-12-27 18:25:21 -03:00
Ryujinx.Audio.Backends.SoundIo Ship SoundIO library only for the specified runtime (#3103) 2022-02-11 00:15:13 +01:00
Ryujinx.Common ntc: Implement IEnsureNetworkClockAvailabilityService (#3192) 2022-03-15 04:07:07 +01:00
Ryujinx.Cpu Enable CPU JIT cache invalidation (#2965) 2022-02-18 02:53:18 +01:00
Ryujinx.Graphics.Device infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Graphics.GAL Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
Ryujinx.Graphics.Gpu Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
Ryujinx.Graphics.Host1x infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Graphics.Nvdec infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Graphics.Nvdec.FFmpeg Use ReadOnlySpan<byte> compiler optimization for static data (#3130) 2022-02-17 21:38:50 +01:00
Ryujinx.Graphics.Nvdec.Vp9 Use ReadOnlySpan<byte> compiler optimization for static data (#3130) 2022-02-17 21:38:50 +01:00
Ryujinx.Graphics.OpenGL Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217) 2022-03-20 13:37:45 -03:00
Ryujinx.Graphics.Shader Initialize indexed inputs used on next shader stage (#3198) 2022-03-14 20:02:50 -03:00
Ryujinx.Graphics.Texture Use BitOperations methods and delete now unused BitUtils methods (#3134) 2022-02-18 02:35:23 +01:00
Ryujinx.Graphics.Vic infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Graphics.Video infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Headless.SDL2 Implement rotate stick 90 degrees clockwise (#3084) 2022-03-12 18:23:48 +01:00
Ryujinx.HLE oslc: Fix condition in GetSaveDataBackupSetting (#3208) 2022-03-20 13:25:29 -03:00
Ryujinx.Input Adjusting how deadzones are calculated (#3079) 2022-02-16 11:06:52 +01:00
Ryujinx.Input.SDL2 Implement rotate stick 90 degrees clockwise (#3084) 2022-03-12 18:23:48 +01:00
Ryujinx.Memory Allow textures to have their data partially mapped (#2629) 2022-02-22 13:34:16 -03:00
Ryujinx.Memory.Tests infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.SDL2.Common Preparation for initial Flatpack and FlatHub integration (#3173) 2022-03-04 18:03:16 +01:00
Ryujinx.ShaderTools infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
Ryujinx.Tests KThread: Fix GetPsr mask (#3180) 2022-03-11 03:16:32 +01:00
Ryujinx.Tests.Unicorn ARMeilleure: Thumb support (All T16 instructions) (#3105) 2022-02-17 19:39:45 -03:00
.editorconfig Adding .editorconfig so code style can be consistent and localized (#1131) 2020-05-03 00:58:58 +02:00
.gitattributes aloha 2018-02-04 20:08:20 -03:00
.gitignore Adjusting how deadzones are calculated (#3079) 2022-02-16 11:06:52 +01:00
global.json infra: Migrate to .NET 6 (#2829) 2021-11-28 21:24:17 +01:00
LICENSE.txt Update license (#788) 2019-10-12 23:48:31 -03:00
README.md Fix the pronunciation of Ryujinx (#3059) 2022-01-31 18:34:21 +01:00
Ryujinx.sln Remove Appveyor from Readme and SLN (#3026) 2022-01-30 16:41:22 +01:00
Ryujinx.sln.DotSettings Add features to GUI (#757) 2019-11-29 15:32:51 +11: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 January 2022, Ryujinx has been tested on approximately 3,500 titles; over 3,200 boot past menus and into gameplay, with roughly 2,500 of those being considered playable. You can check out the compatibility list here. Anyone is free to submit an updated test on an existing game 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 8GB 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 .

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 6.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 the OpenGL API (version 4.5 minimum) through a custom build of OpenTK. There are currently four graphics enhancements available to the end user in Ryujinx: disk shader caching, resolution scaling, aspect ratio adjustment and anisotropic filtering. 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 the developers working on the project do so on 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, LDN servers, IDA)
  • Web hosting and infrastructure maintenance

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.
The Ryujinx.Audio project is licensed under the terms of the LGPLv3 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.