1 introduction
The other day I saw two Switch emulators on Github:
- yuzu
- Ryujinx
So I decided to try to play Switch on Linux.
This paper first briefly introduces the two simulators, followed by the installation and use of the two simulators and their basic configuration. The appendix includes comparisons between Vulkan and OpenGL and between Ryujinx and Yuzu. Let’s take a look at what the two emulators are.
Simulator, platform and compatibility
2.1 About the Simulator
yuzu
:Citra
Creator of an open source writtenNS
Simulator, withC++
Write, gouda14.2 k star
, features includeVulkan API
Support, flexible simulator configuration, game configuration, and moreRyujinx
Based on:.NET 5.x
withC#
The open sourceNS
The simulator features includeOpenAL
Audio output,PPTC
(described below), supports multiple inputs and supportsDLC
And so on,5.8 k star
2.2 About Platform
The two emulators currently support only Windows and Linux:
As for Mac, Yuzu does not specify support, while Ryujinx is planning to see the Mac icon on the download page (above), but in gray.
In addition, I also found an issue running on M1 Mac:
Have a look at the waiting list for November 2021. NET 6 support, so Mac party will have to wait.
2.3 About Compatibility
The official list of game compatibility is as follows:
yuzu
:Compatibility listRyujinx
:Compatibility list
3 environmental
The author tested the environment as follows:
- The notebook
- System:
Manjaro
- Video:
RTX 2060
- Firmware Version:
The Firmware 11.0.1
- Test game: Super Mario 3D World
4 Preparations
Whether using Yuzu or Ryujinx, you need to prepare:
prod.keys
- The game of ontology
If you are using Ryujinx, you will need to prepare additional firmware.
Let’s start with Prod. keys.
4.1 prod.keys
Both Yuzu and Ryujinx require Prod. keys, which contain the keys required by NS devices and need to be generated by some column tools such as Hekate. This part is complicated, so the appendix at the end of this article directly provides prod.keys.
In addition, the official document of Yuzu also mentioned the need to use title.key. The author actually found that title.key is not necessary and can be automatically generated:
In Ryujinx, title.key is not required, just prod.keys in the system folder.
4.2 Game Ontology
Game ontology here recommended three sites to download:
- The game is rings
- The game VAT
- Teil play
Note: The game should be placed in a folder once downloaded.
4.3 firmware (Ryujinx
)
Additional Firmware is required in Ryujinx. The Firmware version needs to be the same as prod.keys. The Firmware can be downloaded here or from the link provided at the end of this article.
5 yuzu
5.1 download
Yuzu provides AppImage, which you can download directly and add execute permission to:
Add execute permission:
chmod u+x yuzu-*.AppImage
./yuzu-*.AppImage
Copy the code
5.2 prod.keys
Select the File->Open Yuzu Folder in the upper right corner. After opening it, create a new key Folder:
Put prod.keys in and restart.
5.3 Adding a Game
Click Add New Game Directory and select the Game Directory to Add:
After adding the game, you can double-click directly to start the game.
5.4 configuration
Yuzu has a variety of configurations. In addition to the configuration of the simulator itself, each game also has its own configuration:
5.4.1 General Configuration
Common configurations include the system language and some hotkeys. Generally, keep the default Settings:
In addition, in the configuration of keys, you can choose your own appropriate keys according to your needs, according to the form of single handle and double handle configuration:
5.4.2 Graphical Configuration
The configuration here is important:
Mainly include:
API
Settings:yuzu
supportOpenGL
There areVulkan
, the author actually found thatVulkan
It will run more smoothly and at a higher frame rate, depending on your personal situation, as mentioned in the appendix at the end of this articleUse disk shader cache
: Disk shader cache, recommended to enable, so that you do not have to recompile every time, but directly from disk to memoryUse asynchronous GPU emulation
:GPU
Asynchronous simulation,yuzu
Rewrite theGPU
Video memory manager, which speeds up the caching mechanism, makes frame count visible while improving performance by 40-400% (fromBSoD Gaming
Test data, link at end of article)Use NVDEC emulation
:NVDEC
Is a hardware transcoding technology that can reduce the burden of CPU in computation-intensive tasks during transcoding, which isNvidia
A technique that makes cutscenes much smoother
5.4.3 Game Configuration
Yuzu can be configured individually for each game. Right-click on the corresponding game and select the Properties TAB to enter the following interface:
Most of the Settings are the same as the simulator Settings, but I won’t go into details.
5.5 Starting the Game
Double click and the game begins happily.
6 Ryujinx
6.1 download
Ryujinx can be downloaded directly from the official website:
6.2 key
With the firmware
/Ryujinx /Ryujinx /Ryujinx
Select OK first, then select File->Open Ryujinx Folder, put prod.keys into system and restart.
After the system restarts, choose Tools > Install Firmware > Install a Firmware from XCI or ZIP to Install the downloaded Firmware.
6.3 Adding a Game
Open Options -> Settings, select Add and select the corresponding game folder to Add.
6.4 configuration
After adding the game, you can see the game. Before you open it, do some general Settings first. Ryujinx has fewer configuration options than Yuzu, but that doesn’t mean it doesn’t need to be configured. The three most important ones are Input, System, and Graphics.
6.4.1 Input
Here are some input configurations. Like Yuzu, you can also set the keys of the keyboard according to the type of dual and single gamepad:
6.4.2 System
This is some time zone and system language Settings, generally use the operating system Settings, do not need to change, here are the three options checked:
VSync
: Vertical sync. When the graphics card’s rendering frame rate per second is greater than the screen’s refresh rate, it will coordinate the graphics card’s output with the screen’s refresh rate to prevent the picture from tearing, such as the screen’s refresh rate60Hz
If the original graphics card can render per second120 frames
, then enableVsync
It syncs the graphics card with the refresh rate of the screenPPTC
: This is a technique that reduces the load time of a game. It is actually a caching technique that is created or updated when the game is first launched.info
The file from which to translate functions and how to translate them when the game is started the second time, and updated each time the game is over. These cache files are located inThe User 's AppData \ Roaming \ Ryujinx \ "and \" game id > \ cache \ CPU
or~/.config/Ryujinx/games/<game id>/cache/cpu
inside
FS Integrity Checks
: This is a security check option
6.4.3 Graphics
Here are some graphics card-related options, including:
- Enable shader cache or not: It is recommended to enable it. This is a technique that can improve user experience. Shaders are compiled and put into hard disk, which is loaded into memory with the next boot
- Anisotropic filter: used to filter and deal with the texture errors caused by the tilt of 3D object surface caused by the change of perspective. The value can be set from 2 times to 16 times. The higher the value is, the higher the requirements for the graphics card
- Resolution scaling: The default is native 720p or 1080p, which can be scaled according to the display
- Screen ratio: 16 to 9 by default, set according to the screen
6.5 Starting the Game
Double click happily launches the game.
7 a screenshot
I was lazy enough to grab two of Mario’s:
Appendix a:Vulkan
orOpenGL
?
This is for Yuzu because Ryujinx only provides OpenGL apis.
Yuzu provides two graphical apis:
Vulkan
OpenGL
The author tried to play Super Mario 3D World, and found that OpenGL would often freeze, which was not smooth to play. Even a gold coin would freeze for about 1 second, which was a very bad user experience. However, Vulkan had no problem.
Of course, it could be the game itself, I didn’t test as many games. Here are Vulkan’s advantages over OpenGL:
- Closer to the bottom:
API
Closer to the driver and hardware for developers to optimize - Multithreading:
Vulkan
Multithreading is naturally supported, as well as asynchronous data interaction and parallel drawing
We tested Dota2 and Mad Max on Linux at RX 560 and GTX 1050 Ti in different scenarios at different resolutions, including frame count and CPU usage (July 2018). First, the Dota2 data:
Here’s Mad Max, graphics preset low, 1080p:
Graphics preset to low, 2K resolution:
Graphics preset to high, 1080p:
Graphics default, 2K resolution:
You can see that Vulkan performs better than OpenGL for the most part, and in GTX 1050 Ti, both 1080p and 2K maintain lower CPU utilization at higher frame rates.
However, although Vulkan can show better performance, but it is much more complex than OpenGL, because the author is not learning graphics, I will not expand, please refer to the information required.
Appendix 2:Ryujinx
oryuzu
?
Again, using other people’s tests (BSoD Gaming, August 2020, link at the end), there were two environments:
i5 4690k + GTX 1080 Ti
i7 8700k + GTX 1080 Ti
Here are some screenshots of the evaluation, showing CPU usage and frame count in different environments:
In particular, legend of Zelda: Breath of the Wild, you can see that there is only one set of variables, because it can’t be tested on a low-spec machine, while on the i7 8700K, you can see that Ryujinx’s frame count is much lower than Yuzu’s, and Ryujinx’s CPU usage is much higher than Yuzu’s:
In addition, yuzu has a higher framerate than Ryujinx, but the wrong material appears, as shown below:
Here are the advantages:
Ryujinx
: newbie friendly, easy and quick configuration, and with resolution scaling function, andMac
Platform support (currently planned)yuzu
: More detailed configuration for the hardware and game, rather than likeRyujinx
With that unified global configuration, games load faster and, more importantly, withVulkan API
Support, that’s the biggest advantage
Disadvantages:
Ryujinx
: New games load slowly and take a long time to load, but there they arePPTC
Help, load time is much fasteryuzu
: configuration is more complex, and does not have the function of resolution scaling, will have better memory utilization and page file utilization
How to choose the choice depends on the readers.
Appendix III: Resource download
Prod. keys, the latest Windows+Linux emulator, firmware and the game used in the test are provided. Please follow the links of the public account “Ice Road” and reply the key word Switch to obtain.
reference
1, PPTC Ryujinx –
Yuzu-new Feature release-NVdec emulation!
3, YouTube – Yuzu Emulator – The Async GPU Update | 40-400% Performance Improvements
4. Vulkan vs. OpenGL Performance For Linux Games
5, Zhihu-Opengl, Vulkan for clarification?
6. What are the advantages and disadvantages of Zhihu-Vulkan compared with OpenGL, DX12, Metal and Mantle?
7, YouTube-What is the Best Nintendo Switch Emulator? Performance & Features Tested