1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-12 20:16:39 +00:00
Experimental Nintendo Switch Emulator written in C#
Find a file
LDj3SNuD 5e724cf24e
Add Profiled Persistent Translation Cache. (#769)
* Delete DelegateTypes.cs

* Delete DelegateCache.cs

* Add files via upload

* Update Horizon.cs

* Update Program.cs

* Update MainWindow.cs

* Update Aot.cs

* Update RelocEntry.cs

* Update Translator.cs

* Update MemoryManager.cs

* Update InstEmitMemoryHelper.cs

* Update Delegates.cs

* Nit.

* Nit.

* Nit.

* 10 fewer MSIL bytes for us

* Add comment. Nits.

* Update Translator.cs

* Update Aot.cs

* Nits.

* Opt..

* Opt..

* Opt..

* Opt..

* Allow to change compression level.

* Update MemoryManager.cs

* Update Translator.cs

* Manage corner cases during the save phase. Nits.

* Update Aot.cs

* Translator response tweak for Aot disabled. Nit.

* Nit.

* Nits.

* Create DelegateHelpers.cs

* Update Delegates.cs

* Nit.

* Nit.

* Nits.

* Fix due to #784.

* Fixes due to #757 & #841.

* Fix due to #846.

* Fix due to #847.

* Use MethodInfo for managed method calls.

Use IR methods instead of managed methods about Max/Min (S/U).
Follow-ups & Nits.

* Add missing exception messages.

Reintroduce slow path for Fmov_Vi.
Implement slow path for Fmov_Si.

* Switch to the new folder structure.

Nits.

* Impl. index-based relocation information. Impl. cache file version field.

* Nit.

* Address gdkchan comments.

Mainly:
- fixed cache file corruption issue on exit; - exposed a way to disable AOT on the GUI.

* Address AcK77 comment.

* Address Thealexbarney, jduncanator & emmauss comments.

Header magic, CpuId (FI) & Aot -> Ptc.

* Adaptation to the new application reloading system.

Improvements to the call system of managed methods.
Follow-ups.
Nits.

* Get the same boot times as on master when PTC is disabled.

* Profiled Aot.

* A32 support (#897).

* #975 support (1 of 2).

* #975 support (2 of 2).

* Rebase fix & nits.

* Some fixes and nits (still one bug left).

* One fix & nits.

* Tests fix (by gdk) & nits.

* Support translations not only in high quality and rejit.

Nits.

* Added possibility to skip translations and continue execution, using `ESC` key.

* Update SettingsWindow.cs

* Update GLRenderer.cs

* Update Ptc.cs

* Disabled Profiled PTC by default as requested in the past by gdk.

* Fix rejit bug. Increased number of parallel translations. Add stack unwinding stuffs support (1 of 2).

Nits.

* Add stack unwinding stuffs support (2 of 2). Tuned number of parallel translations.

* Restored the ability to assemble jumps with 8-bit offset when Profiled PTC is disabled or during profiling.

Modifications due to rebase.
Nits.

* Limited profiling of the functions to be translated to the addresses belonging to the range of static objects only.

* Nits.

* Nits.

* Update Delegates.cs

* Nit.

* Update InstEmitSimdArithmetic.cs

* Address riperiperi comments.

* Fixed the issue of unjustifiably longer boot times at the second boot than at the first boot, measured at the same time or reference point and with the same number of translated functions.

* Implemented a simple redundant load/save mechanism.

Halved the value of Decoder.MaxInstsPerFunction more appropriate for the current performance of the Translator.
Replaced by Logger.PrintError to Logger.PrintDebug in TexturePool.cs about the supposed invalid texture format to avoid the spawn of the log.
Nits.

* Nit.

Improved Logger.PrintError in TexturePool.cs to avoid log spawn.
Added missing code for FZ handling (in output) for fp max/min instructions (slow paths).

* Add configuration migration for PTC

Co-authored-by: Thog <me@thog.eu>
2020-06-16 20:28:02 +02:00
.github Also use Github Actions as a CI" (#847) 2019-12-23 06:36:24 +11:00
ARMeilleure Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx.Audio Upgrade projects to C#8 (#1193) 2020-05-04 12:14:48 +10:00
Ryujinx.Common Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx.Cpu Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
Ryujinx.Debugger Upgrade projects to C#8 (#1193) 2020-05-04 12:14:48 +10:00
Ryujinx.Graphics.GAL Fix wrong face culling once and for all (#1277) 2020-05-28 09:03:07 +10:00
Ryujinx.Graphics.Gpu Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx.Graphics.Nvdec Refactor shader GPU state and memory access (#1203) 2020-05-06 11:02:28 +10:00
Ryujinx.Graphics.OpenGL Fix wrong face culling once and for all (#1277) 2020-05-28 09:03:07 +10:00
Ryujinx.Graphics.Shader Fix wrong face culling once and for all (#1277) 2020-05-28 09:03:07 +10:00
Ryujinx.Graphics.Texture Optimize texture format conversion, and MethodCopyBuffer (#1274) 2020-06-13 19:31:06 -03:00
Ryujinx.HLE Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx.LLE Upgrade projects to C#8 (#1193) 2020-05-04 12:14:48 +10:00
Ryujinx.Memory Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
Ryujinx.Memory.Tests Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
Ryujinx.ShaderTools Refactor shader GPU state and memory access (#1203) 2020-05-06 11:02:28 +10:00
Ryujinx.Tests Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
Ryujinx.Tests.Unicorn Upgrade projects to C#8 (#1193) 2020-05-04 12:14:48 +10:00
.editorconfig Adding .editorconfig so code style can be consistent and localized (#1131) 2020-05-03 00:58:58 +02:00
.gitattributes
.gitignore
appveyor.yml Update .NET Core to 3.1, and update NuGet Packages (#1121) 2020-04-22 14:13:41 +10:00
CONFIG.md Add Profiled Persistent Translation Cache. (#769) 2020-06-16 20:28:02 +02:00
KEYS.md Rename "RyuFs" directory to "Ryujinx" and use the same savedata system the Switch uses (#801) 2020-01-05 12:49:44 +01:00
LICENSE.txt Update license (#788) 2019-10-12 23:48:31 -03:00
README.md Update .NET Core to 3.1, and update NuGet Packages (#1121) 2020-04-22 14:13:41 +10:00
Ryujinx.sln Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
Ryujinx.sln.DotSettings Add features to GUI (#757) 2019-11-29 15:32:51 +11:00

Ryujinx

An Experimental Switch emulator written in C#

A lot of games boot, but only some are playable. See the compatiblity list here.

Usage

To run this emulator, you need the .NET Core 3.1 (or higher) SDK.

If you use a pre-built version, you can use the graphical interface to run your games and homebrew.

If you build it yourself you will need to: Run dotnet run -c Release -- path\to\homebrew.nro inside the Ryujinx project folder to run homebrew apps. Run dotnet run -c Release -- path\to\game.nsp/xci to run official games.

Every file related to Ryujinx is stored in the Ryujinx folder. Located in C:\Users\USERNAME\AppData\Roaming\ for Windows, /home/USERNAME/.config for Linux or /Users/USERNAME/Library/Application Support/ for macOS. It can also be accessed by clicking Open Ryujinx Folder under the File menu in the GUI.

Latest build

These builds are compiled automatically for each commit on the master branch, and may be unstable or completely broken.

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

Requirements

  • Switch Keys

    Everything on the Switch is encrypted, so if you want to run anything other than homebrew, you have to dump encryption keys from your console. To get more information please take a look at our Keys Documentation.

  • System Titles

    Some of our System Module implementations, like time, require System Data Archives. You can install them by mounting your nand partition using HacDiskMount and copying the content to Ryujinx/bis/system.

  • Executables

    Ryujinx is able to run both official games and homebrew.

    Homebrew is available on many websites, such as the Switch Appstore.

    A hacked Nintendo Switch is needed to dump games, which you can learn how to do here. Once you have hacked your Nintendo Switch, you will need to dump your own games with NxDumpTool to get an XCI or NSP dump.

Features

  • Audio

    Everything for audio is partially supported. We currently use a C# wrapper for libsoundio, and we support OpenAL (installation needed) too as a fallback. Our current Opus implementation is pretty incomplete.

  • CPU

    The CPU emulator, ARMeilleure, emulates an ARMv8 CPU, and currently only has support for the new 64-bit ARMv8 instructions (with a few instructions still missing). It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code. To handle that, we use our own JIT called ARMeilleure, which uses the custom IR and compiles the code to x86.

  • GPU

    The GPU emulator emulates the Switch's Maxwell GPU using the OpenGL API (version 4.2 minimum) through a custom build of OpenTK.

  • Input

    We currently have support for keyboard, mouse, touch input, JoyCon input support emulated through the keyboard, and some controllers too. You can set up everything inside the configuration menu.

  • Configuration

    The emulator has settings for dumping shaders, 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.

    For more information you can go here (Outdated).

Compatibility

You can check out the compatibility list here.

Don't hesitate to open a new issue if a game isn't already on there.

Help

If you have homebrew that currently doesn't work within the emulator, you can contact us through our Discord with the .NRO/.NSO and source code, if possible. We'll take note of whatever is causing the app/game to not work, on the watch list and fix it at a later date.

If you need help with setting up Ryujinx, you can ask questions in the support channel of our Discord server.

Contact

If you have contributions, need support, have suggestions, or just want to get in touch with the team, join our Discord server!

If you'd like to donate, please take a look at our Patreon.