Dolphin Progress Report: December 2022 and January 2023

We've got a lot of exciting news and features packed into this Progress Report. On top of the normal emulator development, Dolphin's infrastructure has seen a massive overhaul. While most of the work has gone into optimizing our backend and hardware to meet new demands, users may notice some upgrades to user facing features like the Dolphin Wiki and FifoCI.

Some focus on the infrastructure doesn't mean there was a slowdown in progress for the actual emulator, though! A bevy of new contributors to the project mixed with the efforts of stalwarts has brought together some massive new features no one will want to miss. Headlining this Progress Report is a massive new performance hack called VBI Skip. If you're on a weak device that can't consistently play a game full-speed, VBI Skip is a powerful tool that can help make the game more playable and keep audio crisp and clear. If you're looking for higher performance overall, a ton of Vulkan optimizations and general emulator optimizations have given Dolphin a pretty large performance increase. A new option called Cull Vertices on the CPU can also greatly improve the framerate in many games.

If you're instead looking to enjoy some unique games, the Skylanders games can now be played without needing a physical Portal of Power connected. You can even use your own figurine data to continue where you left off with powerful Skylanders!

We have a lot to get through... but first.


It's that time again - we have to warn users of a rather annoying problem that can decimate Dolphin's performance, particularly in mobile devices. The culprit this time is NVIDIA based Optimus laptops - users have been reporting that the discrete NVIDIA graphics card has been giving them a fraction of the performance of Intel's onboard graphics!

We're unsure of what is wrong and haven't been able to determine exactly when it started happening. However, if you find that Dolphin is suddenly running slower than before, you can work-around the issue! Simply add Dolphin to the 3D Settings in the Nvidia Control Panel and set our Power Management setting to "Prefer Maximum Performance." That has been the only way to consistently fix performance.

A global Maximum Performance Profile does not work, you can only work around the issue by creating a profile specifically for Dolphin Emulator and setting it to Maximum Performance.

We also have one more announcement to make. For Android users who want the latest development builds on their phone without wanting to wait, we now have an Open Testing Program on the Play Store app.



Selecting this option will keep your Dolphin up to date with the latest development builds. This means you'll have access to the latest optimizations and features immediately, without having to wait for the next beta update. However, as with our development builds on desktop, there is always the risk of bugs and/or regressions slipping in and going unnoticed for a bit. If you want to live on the bleeding edge, Dolphin's Open Testing Program is here.

Now with all of that out of the way, let's finally get on with December and January's Notable Changes.

Notable Changes

5.0-18271 - Video Hack - VBI Skip by Sam-Belliveau

It's very rare that we merge a rather egregious hack. But when one shows up with such potential to drastically improve playability with a minimal impact on maintenance, it was a bit too much to pass up on. The entire story around how this change came out is rather strange.

The key thing to note is that Sam-Belliveau had a stress-inducing final exam and college applications quickly approaching during all of this. Thankfully for all of us, their only solace for procrastination was messing with Dolphin. One of the things they were working on was improving Dolphin's throttling, which led to them messing with what happens when a frame was presented. They then ended up messing with the timing of Vertical Blank Interrupts (VBIs). This is going to be a huge simplification, but they are essentially interrupts timed to the Vertical Blanking Interval on a CRT television (also abbreviated as VBI, though more commonly as VBLANK). Since the Vertical Blanking Interval is how a CRT understands the start/end of each frame, the GameCube, being designed for analog televisions, uses an interrupt to track these and also uses said interrupt to mark of the start/end of each frame internally.

During this experimentation, Sam-Belliveau's experimented what would happen if Dolphin simply ignored or skipped a Vertical Blanking Interrupt when Dolphin was lagging. While their goal was to improve framepacing, the result they got when testing Wii Sports Resort was something no one expected.

Despite running at ~45 FPS, the game audio was sounding crisp and clear in our first glimpse of the hack in action. Enable audio to see why this turned heads when it was shown off.

Sam-Belliveau announced what was discovered with a longer version of the video above. It displayed a game lagging significantly while maintaining crisp audio and snappy controls. This turned a lot of heads, and the feature was quickly given the name VI Skip. ...but that was too close to Video Interface which we regularly abbreviate to VI, so we renamed it to VBI Skip for clarity.

A hack like this would normally be a bigger controversy, but the method in which it worked made it a lot more enticing. The initial version of VBI Skip was only 11 lines of code! Additionally, it would only activate itself if Dolphin was lagging. And just because VBI Skip is active doesn't mean game logic will slowdown - some games can instead frameskip instead, depending on how the game works.


Developers were initially skeptical about the compatibility of a hack like this. Thankfully, Sam-Belliveau quickly unleashed it for everyone to test. And while VBI Skip doesn't directly improve framerate, it can drastically improve the playability of a game that isn't running at full speed.

To see the pure potential of VBI Skip, we can show a compatible game with an underpowered device. For example, Crash Bandicoot: Wrath of Cortex is far too demanding for a Pixel 3a featuring an Adreno 615. The opening cutscene makes this readily apparent.

The framerate tanks and audio lags as the poor Pixel 3a can't keep up.

However, Crash Bandicoot is compatible with VBI Skip and can give the weak device a fighting chance to run the game.

Though it isn't as smooth as it should be, the game runs at a playable speed, without slowing down or distorting the audio. Note however that the framerate is still lower, but due to the limited motion in this cutscene it isn't as as obvious here as it would be in game.

VBI Skip is a powerful tool for weaker devices, especially in games that struggle. Paper Mario: The Thousand Year Door's Bounding Box effects are torture for weaker phones, but VBI Skip gives them a fighting chance. It's obviously not perfect, but the mixture of slowdown and frameskip keeps the game fairly playable.

During Bounding Box effects like the boat flip, this poor phone ends up skipping a lot of VBIs!

But here comes the rather interesting part of this. We once had a frameskip implementation, but it only worked under very specific conditions, didn't actually improve performance much at all, and was completely broken for years before it was ultimately removed. Dolphin's developers were convinced that due to the complexity of the GameCube and Wii, a frameskip-like hack was effectively impossible for Dolphin. Yet, here is VBI Skip accomplishing the same feature with higher compatibility and bigger gains, all while dynamically activating and deactivating itself depending on if Dolphin is lagging. Why does VBI Skip work where frameskip did not?


No one knows.

Veterans of the Dolphin project said that VBI Skip should run games at half speed or crash outright. Developers from outside of the project called it "disgusting." We even had friends at PCSX2 quickly hack in the feature and test the PS2 version of Crash Bandicoot: Wrath of Cortex, where the game immediately froze. And yet the majority of games in Dolphin are okay with this egregious hack, and we have no idea why. There are some theories that the environment the games were developed under did something to make them tolerant of this, but we genuinely do not know why VBI Skip works at all.

But it does.

However, though this hack is an amazing thing that shouldn't exist but does... it isn't without flaws. It works for a lot of games but not all games. And because the hack itself is quite simple and we don't have a great understanding of why VBI Skip works, there isn't much that we can do about it.

The good news is that VBI Skip tends to fail rather obviously when it isn't compatible with a game, making it easy to flag down those games and disable the feature. For instance, both The Legend of Zelda: The Wind Waker and Twilight Princess stop rendering if VBI Skip is active in-game. This is because they don't actually use Vertical Blanking Interupts, but instead use shadow registers to manage their own timings for presentation. Wind Waker in particular is extremely touchy. The game's developers went so far as to lock the PAL version of the game to 30 FPS in PAL50, just so they wouldn't have to touch those timings!

Other games, like many in the Need for Speed series, have a strange "dynamic" framerate that doesn't play nicely with the hack - causing even worse lag.

VBI Skip is also compatible with some games that you might not expect. For instance, it can be used in Dual Core sensitive titles like Star Wars: Rogue Squadron III that tend to reject a lot of Dolphin's other performance hacks.

Overall compatibility is actually surprisingly good, though we're sure that more edge-cases and potential issues will crop up through wider testing. More quirks are bound to be found now that VBI Skip is out in the wild, but we are confident enough in our early testing to push it through so that users can try it out. We know a lot of our users are on limited hardware and this is a feature that can turn a painful experience into an enjoyable one.


Note: VBI Skip was originally named VI Skip. However, during the process of writing this article we realized just how easy it was to confuse with VIdeo Interface (VI), and after consulting with samb and other developers, we decided to rush to rename it to VBI Skip. As a consequence, the beta build that is being released along side this Progress Report still lists it as VI Skip. However, it was changed in 5.0-18628 so dev builds reflect this change, and all subsequent beta builds will call it VBI Skip. We apologize for any confusion this may have caused, but we decided that this was the best course of action to limit confusion long term.

5.0-18086 - New FrameTime/VBlank Analyzer + Graph by Sam-Belliveau

Did you notice the branch name that Sam-Belliveau's was on during the first video with VBI Skip? And did you see that frametime graph that was being used to check for framepacing? Well that was what Sam-Belliveau was working on when they discovered VBI Skip. In fact, VBI Skip was actually merged afterwards, and the initial changes made for measuring framepacing were actually integral towards implementing the hack.

The new graphs are powerful and give developers a bigger picture on performance and framepacing.

For most users, the new graphs are a bit overkill. However, there are some other new features to our performance statistics display that might give users a better idea of how they're performing. The most notable of which is a new "speed" display that actually will tell you what your current performance and what your potential maximum performance would be without having to disable the framelimiter. These features can be enabled in the performance statistics section of Graphics Settings -> Advanced on desktop builds and now Android builds as well.

5.0-18299 - Implement Emulated Skylanders Portal of Power by deReeperJosh and mandar1jn with code relicenced to GPLV2+ for Dolphin from RipleyTom

Together, these games make up four adventure platformers with hundreds of unique characters and a racing game. Regardless of the type of game, at the center of each game, the key to playing them revolves around figurines you can get called "Skylanders" which enter the game through a USB device called the Portal of Power.

Does your Portal of Power look this cool?

There were ~450 different figurines and 172 base characters and 39 magic items. The Trap Team portal also features a speaker that boss characters could taunt you through. Some figurines could even unlock new areas in games.


For all the potential of a game like this, there is a cruel reality to it. The figurines are simply containers for the Near Field Communication (NFC) chips that get read by the portal. They hold very little data: just an ID, character stats, and the applied hat. All of the real data is on the disc. The game just uses the ID to "unlock" that content and give the illusion that the figure is being sucked into the game. However, this is more than just a gimmick. The Skylanders games will not allow you to play without a figurine - they are a fundamental part of their business model the game. They even went as far as to gate significant features behind specific figurines!

In Dolphin, setting up a Skylanders game was a unique experience. Dolphin has long supported the physical Skylanders Portal of Power. It was a little cumbersome, but once set up, Dolphin's USB HID implementation allows users to play their IRL figures in Dolphin just as the game was designed. However, this feature was unavailable on Android, making the Skylanders series inaccessible to our Dolphin Android users.

deReeperJosh has been requesting support for several years hoping to be able to enjoy the games on Dolphin without having to dig out their portal every time. Using the RPCS3 Emulated Portal of Power implementation as the basis for a Dolphin implementation, deReeperJosh took matters into their own hands to try to bring an Emulated Portal of Power over to Dolphin. A lot of the code from RipleyTom's RPCS3 implementation was used at the core of the change but deReeperJosh still had a lot of work to do to make it work within Dolphin. mandar1jn provided expertise along with tools that allowed for testing data from the generated figurines and comparing them to figurine data from a real portal.

Using the new emulated Portal you can create blank Skylanders, or load real figurine data complete with save progress.

For Dolphin on Android users, deReeperJosh decided to put in some extra work after the initial merge and as of 5.0-18497, the emulated portal GUI has been ported over to Android. Considering that USB HID passthrough isn't available on Android, this is the only option for playing these games. For our Android users, the feature is located Options -> Wii and has to be enabled there.

All of this together results in the arrival of a long requested feature. Again, we have to thank RipleyTom for the original implementation for RPCS3 and allowing the code to be licensed under GPLv2+ for Dolphin.

Note: As with all electronics, Skylanders figurines have a chance of failure, resulting in a useless figurine. While Skylanders figurines don't have batteries and are powered by the portal itself, their NFC chips do have a slight failure rate and they are likely only guaranteed to a certain number of read/writes before failure.

5.0-18355 - Allow Dolphin to Manually Cull Vertices on the CPU by TellowKrinkle

Normally, this would be a headlining feature of most Progress Reports. But you know, VBI Skip. Still, we couldn't let the juggernaut in the room completely drown out this excellent performance improvement.

For many years, the Metroid Prime games and their insane way of drawing the map with a mixture of line-width, point-size, and triangles has decimated performance on modern GPUs. The way they alternate between lines, points, and triangles makes our batching optimizations inapplicable, forcing Dolphin to use a tremendous number of draw calls in order to emulate what the games are doing. This isn't an isolated incident, either, The Legend of Zelda: Twilight Princess does a similar thing when drawing its own minimap, just on a much more damaging level to the point where developers initially patched it out directly in Dolphin's source code!

TellowKrinkle noticed that a lot of these triangles weren't actually getting used, suggesting that these extra triangles may have been trying to avoid a hardware bug. If Dolphin could somehow detect this, we could reduce the number of draw calls significantly and reduce the performance impact of these tremendously damaging scenes. And thus, Cull Vertices on the CPU was born.



In cases where games are using a lot of triangles but not all of them are actually visible, Cull Vertices on the CPU can ease the drawcall bottleneck. Unlike some of the existing solutions to make these maps faster, such as disabling geometry shader support in old builds or the famous Hyrule Field Speed Hack, Cull Vertices on the CPU doesn't actually result in any graphical glitching. This allows players to finally run Hyrule Field at full speed without having to compromise the look of the minimap.

The "Hyrule Field Speed Hack" patch greatly reduces the number of draw calls but affects the look of the minimap.
With CPU Cull on and the patch disabled, the minimap will look correct while still delivering a sizeable performance increase.

For people on lower-end hardware, the "Hyrule Field Speed Hack" patch is still faster than CPU Culling because it removes some triangles/lines/points that are actually visible. But, if you want the minimap to look correct, CPU Cull is an effective alternative for higher end devices. Without either of these options, the game is left incredibly slow in Hyrule Field and Faron Woods.

Twilight Princess has to be considered an extreme example. After all, there were already targeted hacks and patches toward its difficult rendering method. But, a game doesn't have to be doing something exceptional to see improvements from Cull Vertices on the CPU. Densha de Go! sees significant benefits simply because it isn't very optimal with culling vertices, and Dolphin usually saves more than enough draw calls to gain a sizeable performance boost in every zone of the game.

As a train driver, I'm always on time but I never stop.

There is the case where a game is so optimized that Dolphin trying to cull vertices on the CPU actually ends up lowering performance because it isn't saving enough draw calls to make back the CPU overhead. As such, it is no accident that Super Mario Galaxy shows up slower on the graph above with CPU culling enabled. It takes an extra ~2 - 3% of CPU performance to analyze things and try to cull vertices, and we just don't gain enough in this game in most areas.

Because we can't guarantee this option will be faster in most games, we've decided to default CPU culling to off. It's a safe feature that won't cause crashes or graphical issues, but we wanted to give it a trial period where users can enable it and see how it affects their favorite games.

For games that see a huge benefit, we've currently enabled it by default via GameINI.

5.0-18192 - Emulate PPC Datacache by mkwcat

Proper CPU dcache emulation was something that none of us were really expecting. After all, dcache emulation was going to be very slow, and most uses of dcache emulation were caused by game bugs. Patching the games was not only easier in most cases, but also didn't come with the hefty performance penalty that correctly emulating those bugs would entail.

But none of that mattered to mkwcat. They were on a different kind of mission. They were on a personal challenge to crack into CTGP-R's anti-emulation/cheat security. For those that don't know, CTGP-R is a prestigious Mario Kart Wii mod where many top players compete for the fastest time trial times. On top of being a trusted closed garden for time trial competition, CTGP-R also has hundreds of custom tracks and many new offline and online game modes.

While Dolphin developers usually focus on officially released titles, we occasionally get issue reports regarding popular mods that users want to run in Dolphin. These issues are usually treated as valid - after all, these mods and romhacks run on the real console, so it doesn't seem unreasonable to try to make sure they are emulated properly when possible. CTGP-R ended up a special case - the developers absolutely did not want Dolphin running their mod. They went as far as to add features to their hack to detect and prevent Dolphin from running it.

This decision by the CTGP-R developers wasn't entirely unwarranted. They wanted to have a closed, trusted environment where players could run time-trials and be confident that the times they were running against weren't cheated. They saw the ability to run the mod on Dolphin as a huge security liability, and took measures to make sure it didn't happen. There are other listed reasons, but this was the main crux of the issue. Because of the situation, we told users we had no intention of going out of our way to emulate the mod.

With both CTGP-R and Dolphin's developers turning them away, Dolphin's users took matters into their own hands.

Given the situation, our users have developed a bit of animosity toward the CTGP-R project. After all, the MKWii mod is going out of its way to make sure it doesn't run under emulation. But if you travel back to when a lot of development was happening, their fears of cheating aren't exactly unfounded.

Back when Wiimmfi was new and the Nintendo Wi-Fi Connect services had just shut down, Dolphin was a very popular tool to go onto Mario Kart Wii and cheat. It was way easier to do this on the emulator than to do it on the console. And if you got banned on Dolphin, it was a lot easier to spoof a new console ID than on a real Wii.

The early days of Wi-Fi replacement servers were rife with users using item hacks, timer hacks, and more.

Dolphin's easy to access cheat system meant that users could create and enable cheats for just about anything, and just as easily take them online.

Thankfully, Wiimmfi didn't end up completely banning Dolphin users, but instead mandated more authentication for Dolphin users that required such steps as using a real Wii NAND dump and a seven day wait period for all new users. Considering how much work and thought Wiimmfi developers have gone through in order to make things fair for players online, it's hard to fault CTGP-R developers for their stance.

However, times change, and over the years Dolphin's emulation has improved dramatically. While developers never directly targeted CTGP-R, overall improvements of Wii emulation brought Dolphin closer to being able to run it. In fact, by the time mkwcat showed up, their goal wasn't even to get CTGP-R running on Dolphin. They were simply examining some of the anti-hacking and anti-emulation code in the executable, and realized that Dolphin wasn't very far from being able to run it.


I decided to take a look at it in detail and figure out what specific parts of the code were not being emulated properly. I found I could make four instruction patches to get it to at least boot, but there was one particular issue with the UPMC registers not mirroring the PMC registers which was not easy to simply patch out, so I decided to fix the issue in Dolphin itself.

After seeing the icache implementation, I thought it was feasible to adapt it into a data cache, and it really was. After only a few hours iirc I was able to make it accurate enough to emulate CTGP's boot stage correctly using Interpreter, though it broke everything else from working properly.

mkwcat

A few weeks later, a user from the Mario Kart Wii community mentioned a branch of Dolphin that could run CTGP-R by implementing dcache emulation. This caught the eye of Dolphin's developers, and a discussion soon took place which then pulled in the branch's creator, mkwcat. Realizing there was interest in dcache emulation from the main project, they submitted a pull request and after a lengthy review process, dcache emulation hit Dolphin.

The first step to running CTGP-R in Dolphin is going through a painfully long installation process.

Before you go installing CTGP-R in Dolphin, please remember that dcache emulation is incredibly expensive. Only on the most powerful of computers will you manage to get decent speed on tracks in time trial mode. Even if you can reach full speed in sections, because memory operations are so much more expensive, expect stutters whenever anything is loaded.

And for those with nefarious intentions, don't even try to use Dolphin to cheat in CTGP-R. While Dolphin can boot and run CTGP-R, the mod still has additional layers of detection that are able to detect Dolphin and prevent the submission of times and ghosts. As well, Dolphin openly announces itself to mods with a special device Wii mods can access.

Once in game, the single player more or less works. To help performance, you can disable dcache emulation after completing the boot process by saving state, turning off dcache, loading Mario Kart Wii, and then loading the savestate you made in CTGP-R.

Outside of CTGP-R, dcache emulation can also be applied to other dcache sensitive titles if you want to run them without hacks/patches applied. This includes games like Ten Pin Alley 2, Resident Evil 2, Resident Evil 3, Dead to Rights, and Casper's Scare School: Spooky Sports Day.

This also allows Disney Infinity and Cars 2 to boot without any special hacks. However, performance is reduced even more than normal. As such, for any dcache sensitive game with an existing patch, we highly recommend that players use our included hacks when possible.

5.0-18242 - Change default user directory location to AppData on Windows and 5.0-18238 - Menubar: Add action which opens the user folder by OatmealDome

Dolphin's Global User directory has stayed in the same place on Windows since it was first introduced with the launch of Dolphin 4.0. Placed within My Documents, we wanted to keep the User directory in an easily findable place because it stores more than just save files. Users can find screenshots, resource packs, logs, configurations, and more all within the Global User Directory. While many of our users do use Portable Mode or move the directory themselves, most users simply use the default setup.

When this choice was made, My Documents was the perfect choice. It was a mixture of an easy to find spot and a fairly safe spot where the user isn't going to accidentally delete their save data. Unfortunately, the ever changing landscape of computers has made using My Documents more of a headache than it is worth.

One of the biggest problems is Microsoft's very own OneDrive. While OneDrive may be good at backing up files, it is an absolute nightmare to use with Dolphin. Emulating the Wii NAND often has Dolphin making lots of small writes to a lot of files. However, OneDrive will lock down any files it is currently backing up, even if Dolphin is still using it. In extreme cases, OneDrive can actually cause Wii games to stop booting on a Windows PC, and cause savedata loss in GameCube games.

The other problem is a recent(ish) wave of malware that would encrypt important files on your computer and require you to pay a fee to get them unencrypted. Again, Dolphin's handling of Wii NAND emulation with tons of small writes to a lot of files in My Documents makes machine learning based anti-virus/anti-malware programs go on alert and block writes. This can cause Wii games to not boot and end up corrupting the NAND. We've let these vendors know about the problem, and they were more than happy to whitelist us. However, due to simple hash-based whitelisting procedures, every new build of Dolphin would have to be whitelisted separately after being reported by a user. This was not great.

The only way to alleviate these problems was for Dolphin to place its files where these applications expected programs to keep their files - AppData. This hidden folder is basically the Windows catch-all place for programs to keep their stuff, and Windows has strong restrictions in place there to limit programs to only their own little nook. Thanks to those protections, antivirus programs know that they don't need to watch AppData as closely, and have explicit exceptions for the folder. OneDrive also doesn't back up this folder (outside of specific files), so it will never interfere with writing files there. AppData is the only place like this on Windows. While we like the accessibility of My Documents, we had no choice but to move our default global user directory location to AppData to get these applications to stop bothering us and our users.

For those of you who are using My Documents with no problems, don't worry. We aren't going to change anything. If Dolphin (even new builds) see the Global User Directory in My Documents, it will continue to use it as normal. However for new Windows installs of Dolphin, the AppData directory will be chosen instead.

Because the AppData folder is a hidden directory that can be hard to find, we've added a new option to the Menu Bar that will open a file browser window directly in the Global User Directory. We hope that this compromise eases some of the inconveniences of the new location.

Handy! But be careful in there - that's where your saves and settings are stored.

5.0-18025 - Add Option for Force Nearest Or Linear Texture Filtering by leo60228 and AdmiralCurtiss

This is another long awaited option that has been debated for quite a while. Originally submitted by leo60228 nearly three years ago, the ability to force various texture filtering modes has been up for debate ever since.

The biggest question was about the value of the feature. Games already set texture filtering on their own - and with Manual Texture Sampling, we can emulate that to a very exact degree. Forcing it to render differently could not only cause bugs, but could make games look blurry or pixelated.

However, as time went on and we saw more user feedback, AdmiralCurtiss determined the feature did have some merit and decided to rebase the original changes and reorganize the GUI in order to make it cost less space.

The old Anisotropic Filtering menu has been repurposed for all texture filtering features!

While giving users the ability to customize the look of the games they are playing is a definite perk, the reason for finally giving users this control is that it presents a work around for game bugs. Usually, a game developer making games on the GameCube will choose whatever texture filtering is best for the game. However, there are many cases where the original developer choose poorly, and presenting this option allows users to correct it. There are even cases where a game is outright broken on console due to texture sampling issues, and forcing nearest neighbor can actually work-around those defects!

Sexy Poker has texture defects even on console, but they're incredibly visible in Dolphin at higher resolutions.
Forcing Nearest Neighbor can erase the defects allowing you to immerse yourself into this legendary card game.

If you're looking for a more notable example than the venerable Sexy Poker, the GameCube version of Sonic CD in Sonic Gems Collection is significantly blurrier than the Playstation 2 version because everything is bilinearly filtered in the internal emulator. While some users may prefer that, most players have deemed it to be a flaw. By forcing nearest in Dolphin, you can finally have the crisp pixels you crave in the GameCube version.

Even Digital Foundry complained about how blurry Sonic CD looks on GameCube.
At least now you can choose to change one of the port's differences.

One of the reasons we chose to finally present forcing nearest texture filtering is because we already had a feature for forcing linear texture filtering. This "Force Texture Filtering" option was added long long ago to work around a quirk of two premiere Nintendo titles - New Super Mario Bros. Wii and The Legend of Zelda: Skyward Sword.

Skyward Sword's shading gets chunky at higher than native internal resolutions.
Forcing linear texture filtering resolves this issue.

Now the existing "Force Texture Filtering" option has been collected together with all the other texture filtering controls in one place, ready for users to adjust as they see fit.

5.0-18017 - JitARM64 - Implement AccurateNaNs by JosJuice

This is a change with a rather funny story behind it, and actually goes back several years. Jump back to June of 2015 and AccurateNaNs was being implemented for our x86-64 JIT. Essentially, it makes emulation of NaNs (Not A Number) more accurate by having our own custom handlers for them rather than just letting the host processor handle it. This is slower, but is necessary to prevent calamities like this one in Dragon Ball: Revenge of King Piccolo

If you remember this, then you're truly one of the OGs of the Dolphin Blog. Note that you have to defeat all the enemies to proceed, but some of them are sent to a far away place...

However, this was never implemented in our AArch64 JIT for ARM 64-bit processors. Because, quite frankly, it didn't need it. The NaN behavior on AArch64 matched PowerPC closely enough that these games just worked without needing special handling.

But wait, the title of this section is Implement AccurateNaNs on AArch64. What changed?

Well, AArch64 and PPC NaN handling aren't exactly the same, it was just getting good enough results at the time. But Dolphin recently changed how we handle FMA (Fused-Multiply Add) instructions in order to fix online desyncs between real console and Dolphin in Inazuma Eleven GO: Strikers 2013.

Unlike the Dragonball issue, this one effected both our x86-64 JIT and our AArch64 JITback in the day!
Click/Tap to play. Click HERE for a higher quality version.

This fix was applied to both JITs, and no one was the wiser that we had inadvertently broken Dragon Ball: Revenge of King Piccolo. Some FMA instructions invert the sign of output, but only if the output is not NaN. The Inazuma FMA fix changed how we handle FMA instructions just enough, that on AArch64 the sign of NaNs for nmadd / nmsub instructions were inverted, breaking Revenge of King Piccolo. A user reported that the game was broken to some very confused developers, but considering we had seen this exact bug before in our x86-64 JIT, it was just a matter of fixing it in the other JIT. As our resident AArch64 JIT maintainer, JosJuice was pulled into action to implement Accurate NaNs on ARM.

Because emulating NaNs in this manner is a slight performance reduction, it is only enabled in one title currently: Dragon Ball: Revenge of King Piccolo.

5.0-18257 - Remove Boot from DVD Backup by MayImilae

Unlike many other consoles from the era, the GameCube and Wii use modified DVDs that can't be read by conventional DVD drives used on desktops. These modified DVDs are physically identical to normal DVDs, but Nintendo partnered with Panasonic, one of the creators of DVD, to slightly modify the sector format and error correction. A regular DVD drive doesn't understand this format and thinks every single sector is corrupted, never returning any data to your computer. This differs from many Playstation and Playstation 2 emulators, which can directly run original games

Yet despite that fact, Dolphin had the ability to boot from the host computer's DVD drives. This was implemented so Dolphin could read GameCube and Wii games burned to DVD backup discs. And yes, that requires a user to rip their games from their Wii, then burn them back onto blank DVD media.

Why would anyone want to do that? Back in the early through mid 2000s, drive space was much more limited than what we have today. The average hard-drive size was just 120 GB. Even if you bought that drive just for GameCube and Wii emulation, as few as 14 uncompressed Wii dumps would fill that entire drive! Burning backup discs may have been a hassle, but using cheap DVD media to free up space on an expensive hard drive made a lot of sense at the time.

Don't mixup backup discs and real discs! Thankfully, our discs are certified.

Unfortunately, playing games on a DVD backup wasn't a great experience. Dolphin wasn't designed to read from slow optical media. Even in 2003 hard drives were leaps and bounds faster than any optical drive, so Dolphin assumes that storage will never be a bottleneck. If for some reason storage is a bottleneck, Dolphin will halt entirely and wait for the storage to catch up. This appears as a stutter to the end user. If a game only read from the disc at explicit loading screens this would not be an issue, but most games do smaller loads at a regular basis throughout play. And some games, like Metroid Prime, constantly load from the disc during gameplay, introducing persistent stutter that can make playing the game a nightmare.

Another problem is that DiscTracK (DTK) audio games will have problems keeping up with the expected timings. Same for streaming videos, like those found at the start of Metroid Prime 2. We were unable to find a disc drive that could keep up, and in games like Ikaruga this can lead to hangs.

With the cost of hard drives now far below the cost of equivalent stacks of DVDs and multi-terabyte mass storage hard drives becoming the norm, the motivation to burn GC/Wii backups to discs has evaporated. In fact, most new computers forgo a DVD drive entirely! The only reason to use DVD backups with Dolphin in the modern era was to preserve the aspect of inserting a game into the system, but when the performance is so lackluster and the feature is confusing, the costs just didn't add up.

In the end, a mixture of poor performance and the fact it was confusing users into thinking Dolphin could boot nonbackup discs lead to the feature's removal. Does that mean the ability to play DVD backups is gone forever? Maybe not. After the feature was removed, a few diehard users of the feature spoke up on its behalf. In response to that, a list of improvements needed for the feature to return was written and that's where we stand for now.

5.0-18171 - IndexGenerator: Fix off-by-one in GetRemainingIndices by Pokechu22

This is a longstanding bug in Dolphin that has gone hidden in almost every game. A Vertex Loader Cleanup by degasus unknowingly introduced an off-by-one error into the vertex loader. Oddly enough, this causes error spam in Super Mario Sunshine during the Red Coin Field secret area.

Dolphin veterans are all too familiar with this secret stage.

Because nothing was visibly broken, this issue went mostly unnoticed. At least, not until a strange European only racing game arrived on our issue tracker. Pocoyo Racing is a licensed racing game based off of the kid's show Pocoyo. If you play Mario Kart Wii with tilt controls, you'll be right at home in this simple racing game aimed at children. However, when booting this game in Dolphin, things won't look quite right on the Ocean tracks.

The vertex issues provided intangible obstacles that made driving the track slightly more difficult.

Unlike Super Mario Sunshine, the fixes to the Vertex Loader Cleanup back then did not fix this issue, meaning it's remained dormant for a decade. However, thanks to a user stumbling upon this weird bug in this weird game, we were able to get a look at the issue manifesting and were able to locate the problem and repair it. Namely, IndexGenerator was broken for large numbers of vertices in one draw call, which is the function that gives a unique number to each unique vertex. Using the visible error in Pocoyo Racing, Pokechu22 quickly narrowed down the problem and solved the issue.

The game finally looks right in the latest Dolphin builds.

This also fixes the error log spam in Super Mario Sunshine when it renders the grass special stage.

5.0-17833 - Fix normal/tangent/binormal with Index3 Set by Pokechu22

This is a change that we missed from the last Progress Report, but thought it might be interesting to those that love seeing edge of emulation style of fixes. It was reported the several lighting effects in Quake GX (a homebrew port of Quake Shareware to the Wii) were broken in Dolphin. What made these effects interesting was that they were achieving normal mapping on the Wii.

Though the glorious bastards at Factor5 implemented bump mapping without any assistance from the hardware, this homebrew takes it even further by implementing full normal mapping. Dolphin was fully capable of emulating the effects, except it was getting confused by Quake GX having normalindex3 enabled in the vertex format. It wasn't actually doing anything with this, so simply disabling normalindex3 would fix the bugs.

Even though it looks alright at a glance, some of this demo's coolest effects were completely missing.
You can see reflections of light on the walls and other normal mapped effects.

However, that wasn't a good enough solution for Pokechu22 who dove in to fix the bug correctly. Through hardware testing, they determined the behavior of normal/tangent/binormal with Index 3 being set in order to fix the Vertex Loader to generate these cases correctly.

Last Month's Contributors...

Special thanks to all of the contributors that incremented Dolphin from 5.0-17997 through to 5.0-18498!

You can continue the discussion in the forum thread of this article.

Next entry

Previous entry

Similar entries