Happy New Year!
We hope you all had a festive end to a truly incredible year. So much ground has been covered each and every month of 2022, and December wasn’t about to break that trend. Performance improvements, fewer black-screening games and some upstreaming work for macOS littered the thirty-one day span, with more than just rampant consumerism for all to enjoy.
So strap yourselves in for the finishing touches of 2022, laid out by a witty, engaging and, if another word were to be used, handsome writer report. Before all that though: let’s take a gander down to our remaining patreon incentive goals.
$2000/month - Texture Packs / Replacement Capabilities - getting close!
This will facilitate the replacement of in-game graphics textures which enables custom texture enhancements, alternate controller button graphics, and more.
$2500/month - One full-time developer - Not yet met.
This amount of monthly donations will allow the project's founder, gdkchan, to work full-time on developing Ryujinx. All our contributors currently only work on the project in their spare time!
$5000/month - Additional full-time developer - Not yet met.
This amount of monthly donations will allow an additional Ryujinx team developer to work full-time on the project.
Pokémon once again has to steal the entrance to the GPU section this month with what we hope was the final issue with the game. Anyone who played at launch, or even late into November will probably have experienced completely random vertex explosions: moments where your character, an NPC, other Pokémon, or literally any other environmental asset could lose its grasp on reality and become either a minor glitch or a giant wall of beige-tinted spikes.
As with most vertex explosions, this was being caused by simple data loss. Flushes on certain buffers would occasionally flush uninitialized data which could cascade into the results seen above. By tracking these troublesome buffers and flushing their source, instead of their possibly incomplete copy, most of the vertex explosions in Scarlet & Violet are massively reduced. There is still a very slim chance that NPCs may still exhibit minor explosions, but these took hours to appear in testing and were resolved with reloading an area.
Some smaller changes this month included: a reduction to texture operations in shaders which may give a slight boost to lower end iGPUs, SNorm buffer textures are now cleared for use with Vulkan (we previously enforced an OpenGL workaround even in Vulkan), and a couple more improvements to shader specialization and shader bindings array gave our usual benchmark game of Super Mario Odyssey a further 3-4% performance bump!
With a new Zelda game drawing near, it’s only natural that some of our longest standing bugs to its predecessor are now in the spotlight for fixing. Considering that The Legend of Zelda: Breath of the Wild has never had any sustained focus from our development team, it was already in relatively good shape with only a few notable issues remaining. One of these was the lack of any motion on wind and grass particle effects.
As witnessed, the grass seems to simply fade in and out of existence on Ryujinx while the effect on Switch is more of a gentle breeze, blowing the grass out of focus. By adding further fallback parameters for the LDG to constant buffer binding, another item gets crossed off the list.
Game of the Year for 2022 was the latest FromSoft offering: Elden Ring, which promised to be larger, more diverse and far more stuttery than any piece of software that came before. But take a moment to cast your mind back just over eleven years ago… Skyrim is on the horizon, your phone still has a 3.5mm headphone jack and Game of Thrones is premiering on TV. More important than all of that was the release of FromSoft’s mainstream hit, Dark Souls.
Now fast forward eleven years again. There you are. Wanting to play this certified classic on your personal computer. Ryujinx is immediately booted up (of course it is) and Dark Souls is double-clicked… “Was it always this dark?” a million voices cry out in despair.
Egregiously-long and questionably humourous gags aside, no, vision-impairment hasn’t yet been added as a skill-check to any Soulsborne titles. However, if it was, fans would claim it was revolutionizing difficulty and rejecting the “hand-holdy” nature of properly lighting a 3D world.
On our side though, the simple implementation of PrimitiveID output on the geometry shader was enough to completely resolve this issue:
The Stanley Parable: Ultra Deluxe highlighted a slight bug in the FSWZADD shader helper function that was causing a LUT index to be out of bounds. Fixing this instruction allows the text to render correctly.
Textures in games make use of a variety of compression formats in order to reduce their file size and impact on video memory. Due to the many different environments games are developed in, some of these formats aren’t supported on desktop GPUs and others aren’t supported on mobile GPUs. As the Switch is effectively a mobile device, it in turn can make use of some texture compression formats that your Nvidia or AMD desktop card simply doesn’t know what to do with. One type you may have already heard discussed in relation to both Astral Chain and Bayonetta 3 is the ASTC compression format, where we need to manually decompress the texture in software before it can be used. If you’re wondering, this is why those two games use a lot of VRAM compared to other titles, as the fully uncompressed texture is being loaded into VRAM before use!
ASTC is only one type of unsupported compression though; we have some other decoders to convert any unsupported texture into a format more easily readable by your GPU. Except two. ETC2 and EAC compression formats were still lacking a software decoder which meant any games using these formats would simply crash with an unsupported format error. Luckily for us, EAC doesn’t appear to be used by any title we’re aware of, so only an ETC2 software decoder was implemented.
Games such as Vegas Party and Paradigm Paradox are now playable on Nvidia and AMD GPUs (Intel ironically already natively support the format!).
Implementing missing GPU quirks continues with both implementing another non-indexed draw method which solves some rendering in Ikaruga, and fixing the vertex buffer size of DrawArrays, fixing Sphinx and the Cursed Mummy’s rendering on OpenGL.
For any OpenGL enjoyers out there, the Xenoblade titles have been one of the few remaining holdouts for that agenda. Unfortunately, all good things must come to an end and in December Vulkan finally took the performance crown. With a 30% performance uplift in the Colony 4 hotspot for Xenoblade Chronicles 3, Vulkan now outperforms OpenGL by 5-8% on average while of course keeping its other advantages such as shader compile speed.
On the topic of Xenoblade, a recent Vulkan fix for XC2’s cutscene shadows by using a custom border color was causing a lot of headaches for Linux users. Shortly after merge, it was discovered that the open-source RADV drivers didn’t like this at all and were crashing in a wide variety of games including: Super Smash Bros: Ultimate, The Legend of Zelda: Breath of the Wild and Metroid Dread. Not small titles to say the least. External contributor DadSchoorse discovered that RADV requires the custom border features to be explicitly enabled before use which finally ended that miserable saga, especially for the influx of Steam Deck users!
Finally, the texture and sampler pools will now be forced to rebind when the pool itself changes, to mitigate a regression caused by the shader specialization optimization mentioned above. This change was causing minor issues in “The New Prince of Tennis: LET'S GO!! ~Daily Life~ from RisingBeat” (incredible name) which a pool rebind fixes.
A new section this month. As is laid out in this issue, there were a considerable number of changes made to Ryujinx in a private branch to provide support for macOS on both Intel and Apple Silicon Macs. Merging these all at once would be a nightmare for code reviews and also impossible to regression track, therefore the decision has been made to methodically upstream every change in piecemeal format. This allows proper code review and regression tracking, but also allows time for some implementations to be cleaned up. The journey has already begun!
A couple of mundane changes were initially needed for anything to be done:
- macOS requires the SDL_event pump to occur on the main thread.
- CI files for packaging and dependency distribution were also required to actually build anything.
The above changes allowed the program to both build and to boot, but only into the GUI. Launching any game would still be impossible as no valid Vulkan devices exist on macOS. It is therefore also necessary to create a Metal surface render window to which MoltenVK can eventually draw to. This actually allows extremely basic games like Undertale to run on a self-compiled mac build via Rosetta:
From this point some other GPU and MVK workarounds were merged:
- Non-MS to MS copies using draws were implemented which is required as Apple Silicon GPUs have no support for image load or store to multisample images.
- Shader storage buffer search was restricted when a match fails. This avoids macOS getting out of storage buffer bindings in certain scenarios.
- Fallbacks for 16-bit texture formats were implemented as while these are supported under native conditions, they aren’t supported under Rosetta for some reason.
Services. Don’t we all just love ‘em?
‘IsIlluminanceAvailable’, and ‘GetCurrentIlluminanceEx’ were both stubbed in December which allows the Labo VR Kit application to get to the title screen.
Nothing can really be played yet due to the absolute mess of niche services and HID implementations this game requires, but notable nonetheless!
‘Select’ was fully implemented in the BSD sockets which finally allows Saints Row: The Third and Saints Row IV to access their LAN play modes for campaign co-op.
Some other more minor fixes, stubs and implementations in December include:
- Mesosphere’s current process ID is now part of the HOS InfoType enum. This allows homebrew to easily get their own process ID.
- REV11 of the audio renderer added a ‘compressor’ effect which was implemented.
- Support for atmosphere dns_mitm was implemented. This allows for simple DNS misdirection used by some mods or homebrew.
- PCMFloat, PCM32 and PCM8 conversions were added to allow SoundIO to be used on systems that may not support PCM16 audio.
A fun final one is the stub of ‘CheckNetworkServiceAvailabilityAsync’ which allows everyone's most requested application to boot: Hulu! Unfortunately, some other issues remain for this title, so don’t try to use Ryujinx to tune into Forged in Fire: Beat the Judges just yet.
Let’s talk GUI, let’s talk Avalonia. With the macOS release exclusively using the new framework we’re now fully in the endgame. The endgame consists primarily of “fixing the jank” as new contributor IsaacMarovitz so aptly put it. All of the basics of a GUI now work and are fully in place, but random stuff just sometimes looks a little odd.
Dialogs were made a little more intuitive across the board based on OS-specific design stylization. Our recent influx of macOS users perhaps necessitated the need for platform based UX language.
If you’re on Windows the style remains vastly the same, but with an accent over the confirmation option:
If you’re on macOS, you’ll instead see (when a new macOS update is pushed) a more natural inverted layout:
A few different cleanups to both input classing, the status bar, and the project file structure itself took place and a bug where the software keyboard was invisible on Linux was finally stamped out. Closer alignment with the principles of fluentUI and WinUI3 was achieved which improved readability and reduced instances of the ‘selection bean’ and the wide box-type selector clipping each other.
Feature-wise: a Save Manager was added to make it simple to find user-profile specific saves without the need to switch but also has the power to recover lost accounts that still have saves tied to them! Very nifty feature all-in-all!
Oh, and you can’t update Ryujinx while a game is being played anymore. Far too many of you were somehow running a game and then decided right now was the best time to let the emulator download and replace files. So yeah. Stop that.
End of Year recap: 2022
Many people are saying that 2022 was, in fact, a year. One of the years of all time even.
Who wants some stats? Everyone loves some stats, they seem to be all the rage.
To get some terminology out of the way early, our definitions are very strict and on the harsher end of most emulators. To be given “playable” status, a game must have zero bugs. It must be identical to a hardware playthrough with no workarounds and be full-speed on ‘reasonable’ hardware. In-game means that the title enters the main gameplay loop but could have graphical, audio, input, service or performance limitations. The others are fairly self-explanatory from there.
We begin 2023 with a staggering 84.2% of the currently tested Switch library having no recorded bugs. A further 11.6% of titles are in-game but with at least a single issue; this can range from major graphical errors all the way down to a single texture corruption in the credits. As such we wager that most of these “ingame” titles are probably what other sources would consider ‘playable’ already! Only 3.5% of titles booted but, for one reason or another, couldn’t reach gameplay, and an absolutely miniscule 0.8% of titles (30 to be exact), are not responsive at all. The fact that in less than 5 years of development time we’re already down to just 30 titles that can’t boot is a monumental achievement. We have no doubt that more games will be released and continue to test us, but right here, right now, it’s looking mighty good. In the meantime, there are still thousands of untested Switch games (mostly multi-platform shovelware, but the point remains) that we need your help testing & cataloging.
2022 saw major feature releases up the eyeballs:
- First Switch emulator with macOS and Apple Silicon support.
- First Switch emulator to support LDN connectivity with a CFW Switch
- Vulkan backend finished and merged into main builds.
- Being the 2nd .NET application ever to be on FlatHub.
- First Switch emulator to support advanced modding capabilities for games such as Super Smash Bros. Ultimate and Splatoon 2.
It’s been a wild ride and we’d like to thank you all for supporting our endeavors over this period. A question a lot of people are asking us is ‘What’s next?’. What does 2023 hold for Ryujinx? Well, truthfully, even we don’t know! But, we’ve got cool things to show…
Ryujinx on a Raspberry Pi, anyone? Admittedly the performance is fairly abysmal because… it’s a Raspberry Pi! This is simply a proof of concept that the work put into porting to macOS is transferable to other platforms and should, when suitable Windows/Linux ARM systems arrive, be an excellent platform to run your Switch games on.
That’s all from us in 2022 (says a report published in 2023).
As always, if you know some C#, .NET, 3D-graphics or low-level engineering, and need a good new years resolution, we’re always on the hunt for developers who can continue to bring those compatibility stats up. If that's all alchemy & wizardry to you then donating to our Patreon, or being active in testing and bug-reporting really does help out a bunch.
Happy new year!