Hi yuz-ers, we’re here with the March progress report to offer you our latest news! We continue to update the Kernel, some considerations have been made for specific hardware, we have several changes and fixes to discuss, and we have a sneak peek at the progress on Project Hades.
Those who have paid attention to our previous progress reports will notice that we sometimes write about when a service is
stubbed (ignored, basically) to allow a game to progress further.
This process requires manual intervention each and every time a game update or new game uses a new unimplemented service.
To mitigate user frustration, epicboy implemented Auto-Stubbing, continuing previous work from ogniK.
With this toggle, games will just ignore any unimplemented services and continue running, allowing developers to focus on the services that need urgent, proper implementations. This is not a new invention by any means. Several emulators in the past have used this feature to great benefit, reducing the load on developers and providing a better experience for the end user.
Keep in mind that auto-stub will be always disabled by default on each boot, so it has to be manually enabled for each session by going to
Emulation > Configure > General > Debug > Enable Auto-Stub.
Morph took it upon himself to update the emulated Switch firmware version to 11.0.1, and the NgWord version, improving compatibility with recent games, and solving some odd bugs.
Disgaea games no longer require a firmware dump to be playable.
We now have some new additions to our command line arguments thanks to german77.
Users can select which user profile to load by adding the
-u # argument to their command, with
# being the profile number.
For example, by using
yuzu.exe -u 1 -g "path_to_game", the second profile will be selected.
In an attempt to reduce file size when downloading yuzu and also reduce the download size when building it from source, toastUnlimited reworked how FFmpeg is linked. This way, only what is needed for yuzu is built, reducing the size and build time required for this module, and as an added bonus Linux users will avoid problems with possible outdated versions included in their distributions. Data capped users rejoice!
ivan-boikov fixed an issue where pressing Cancel would result in the wrong destination folder in the file system configuration. Nothing beats quality of life fixes!
Microsoft Visual Studio, by default, will compile applications with the character set corresponding to the region of the local developer’s PC.
This limitation can cause issues for certain regions like Asia when trying to build our source.
Morph bypassed this limitation by forcing the UTF-8 character set.
As an added benefit, some UI elements like up and down arrows started rendering. Free bonus.
While a ton of work is needed to make
MONSTER HUNTER RISE run, including finishing the shader decompiler rewrite and implementing the asynchronous software keyboard, that doesn’t mean ogniK can’t start some preliminary work.
In this particular case, the focus is to improve
Parental Control emulation, bringing it closer to the Switch’s native hardware implementation.
Since the introduction of
Asynchronous shaders, we noticed that not all drivers like the feature.
In particular, Intel Windows OpenGL, and the proprietary AMD drivers (for both Windows with Adrenalin, and Linux with AMDGPU-PRO) despise the setting, with Intel ignoring it at a driver level, and AMD outright skipping frames, resulting in massive stuttering.
toastUnlimited added a blacklist for our red and blue GPU users, ensuring no performance or graphical regressions occur while attempting to use a feature that their drivers can’t support in OpenGL anyway. It’s worth mentioning that Asynchronous shaders work as intended in Vulkan and all free Linux OpenGL drivers, be it for AMD or Intel. Nvidia works as expected on any combination of API or OS with their proprietary drivers. Thanks to theboy181 for the suggestion!
bunnei implemented an optimization that affects all graphic caches (texture, buffer, shader).
By using a flat array, cache performance is improved slightly, with the bonus of some memory bandwidth saved due to better resource allocation.
A small but measurable 5% performance bump can be experienced, for example, in
Super Mario Odyssey.
The dynarmic submodule has been recently updated in this PR, merging the latest changes with yuzu.
Thanks to the efforts of merry and lioncash, many
thumb32 instructions (a subset of ARM instructions) were implemented, increasing the amount of instructions supported for 32-bit games on yuzu.
Additionally, all floating-point instructions received minor optimizations, and a couple of bugs in the implementation of AVX-512 extensions were fixed too.
There was also a problem with
AMD CPUs, where previously dynarmic disabled the use of the
BMI instruction set (used for bit manipulation), due to being extremely slow in those processors.
However, on Zen 3 and newer, the performance of these instructions has increased considerably, so now dynarmic allows these
AMD processors to use
BMI instructions if the detected CPU is fast enough to perform them.
All of these changes were possible thanks to the contribution of Wunkolo to dynarmic (which eventually made it to yuzu), so shoutouts for the great work!
Going back to kernel updates, bunnei reworked and cleaned the kernel memory management code. As the name implies, this is the part of the OS that allocates memory resources for games when they request them. With this change, the implementation matches more closely that of the Nintendo Switch. As always, these changes make it easier to support any future hardware revisions, along with all other kernel changes that are currently ongoing.
Bunnei also fixed a memory leak caused by
These dummies are used by yuzu to interact with our emulated kernel.
Every “real” emulated thread has a dummy associated with it.
As explained in the previous progress report, yuzu utilizes fibers in order to emulate threads.
However, these dummy threads don’t actually use fibers.
With this change, bunnei removed some unnecessary memory overhead by removing the creation of fibers (which would only be needed for “real” emulated threads), thus reducing the memory usage by a bit.
Another bug that was also fixed by bunnei was related to how JIT states are saved between page table changes. A page table is a scheme used to map physical memory into virtual memory, used to give processes the impression they’re working with a unique, contiguous section of memory, regardless of where and how this memory is actually stored. Due to the way dynarmic is coded, whenever yuzu changes the page table that is currently in use, it needs to recreate the CPU JIT. But, until now, yuzu wasn’t saving and restoring the state of this JIT properly when this happened. However, with this change, all the context needed by the JIT is now stored and retrieved correctly.
Not all devices can do
N-key rollover, meaning pressing many keys/buttons at the same time without some inputs being missed.
For this, german77 implemented a toggle to hold a button for you.
This way you can ask yuzu to keep pressing a button, freeing your hand and devices from it, while you move to something else!
To access this feature, right click the Modifier button in control settings, and select
For those using Cemuhook to provide motion via an Android device, german77 has a nice stability improvement for you! Each individual socket connection now needs its unique client ID.
In a separate PR, german77 tests using a single UDP connection per server instead of per controller, reducing the error rate thanks to simplified communications. The end result of this work is more stable connections for motion devices.
Xbox 360 and Xbox One controllers were incorrectly displayed as just
Xinput Controller in our device list, causing confusion to our users.
Additionally, the default Pro Controller mapping had its face buttons swapped by mistake.
german77 fixed both issues. Bad defaults are bad.
Project Hades, our rewrite of the shader decompiler, is taking shape. On the games that can be booted now, we can already measure performance increases and countless bugs fixed.
Here’s a sneak peak, fresh from the source.
While our graphics devs continue to rewrite all shader instructions, we can inform everyone that the new pipeline cache for Vulkan is fully working, storing and loading just as well as OpenGL’s shader cache, while even being faster!
No more hard crashes (Fire Emblem: Three Houses)
On top of that, Rodrigo also implemented a new kind of asynchronous shader “secret technique” that scales better with the number of threads available, and produces zero graphical glitches!
We will expand this information once Hades is out and has its own dedicated article.
That’s all folks! Thank you so much for allowing us to take some of your time, and see you next month!