dolphin-emu.org - Last entrieshttps://dolphin-emu.org/blog/2024-09-05T15:28:09.736386+00:00The last entries on the site dolphin-emu.orgZinniaDolphin Progress Report: Release 2407 and 2409
2024-09-04T16:35:36+00:002024-09-05T15:28:09.736386+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2024/09/04/dolphin-progress-report-release-2407-2409/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/progressreportheader2409.avif"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2409/progressreportheader2409-mini.avif" />
</header>
<p>After an exciting round of feature articles, it's Progress Report time once again! However, a lot has changed. Dolphin has finally left the 5.0 era behind, and has entered the <em>Release Era</em>. Not only did we get our first release in eight years, but we also established a commitment to continuous releases going forward.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/blog/2024/07/02/dolphin-releases-announcement/">
<img src="https://dolphin-emu.org/m/user/blog/releasesannouncement/releasesheader-still.avif">
</a>
<figcaption></figcaption>
</figure>
</div>
<p>For the Reports, things will be more or less the same, but with a few changes.</p>
<p>Progress Reports are now also <em>release changelogs</em>. We'll be going over the notable additions and changes between each release in every Progress Report going forward, rather than within a range of dates. As such, the name of the Reports will reflect the release accompanying it - if you want the new features, just update to the version at the top or higher and you'll have them! (However, since 2407 had a release article without a changelog, this Report will be covering the changes in both Release 2407 and Release 2409.)</p>
<p>That also means that the next release is happening <em>right now!</em> Accompanying this report is <strong>Dolphin 2409</strong>. It is now rolling out via our updater, and is available for download here on our website.</p>
<p>But there was also another feature article since our last Report. Dolphin now has RetroAchievements support!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/blog/2024/07/15/unlocked-retroachievements-come-dolphin/">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/retroachievementsheader-169.jpg">
</a>
<figcaption></figcaption>
</figure>
</div>
<p>For those waiting for it to show up in a release build, the wait is now over. Throughout the past couple of months, we've ironed out one major issue alongside many smaller issues with RetroAchievements. The first iteration of RetroAchievements in a release build is stable, but not all that flashy. The groundwork is there for future improvements, but many features and options are yet to be finished. As well, Android support is still deadlocked with a few issues. Please pardon our progress!</p>
<p>We have a bunch of cool statistics from the RetroAchievements team regarding the launch, however, we need to get on with the Report! So just <a href="#the-first-month-of-dolphin-retroachievements">click this handy link</a> to be taken to the bottom of the Report if you'd like to read more!</p>
<p>But before we get to the Notable Changes, we have a couple of things to cover.</p>
<h3 id="google-play-update-delay"><strong>Google Play Update Delay</strong><a class="headerlink" href="#google-play-update-delay" title="Permanent link">¶</a></h3>
<p>Last month, we got a surprise email from Google Play saying that Dolphin doesn't comply with their policies because it "installs, but doesn't load". We have gotten emails like this before regarding Android TV, presumably because someone at Google tried to install Dolphin on one out of the vast majority of Android TV devices that don't meet Dolphin's hardware requirements, but this is the first time we've gotten a rejection for Android as a whole. Seeing as Dolphin generally does load correctly on devices that are able to install it, we're not quite sure what happened here.</p>
<p>What does this mean for Dolphin? Dolphin is still available on Google Play, but the next update we release has to be manually checked by Google before it becomes available to users. Because of this, it will take longer than normal for the 2409 release to show up on Google Play, but any updates after that should be smooth sailing again. If you're impatient and want the latest version of Dolphin right now, it's available <a href="https://dolphin-emu.org/download/">on this website</a> as always!</p>
<h3 id="visual-studio-twenty-twenty-woes"><strong>Visual Studio Twenty-Twenty-Woes</strong><a class="headerlink" href="#visual-studio-twenty-twenty-woes" title="Permanent link">¶</a></h3>
<p>During the rollout of the latest release, a lot of people updated Dolphin for the first time in a while! But for some of our Windows users, when they fired up Dolphin 2407 for the first time they were met <em>with a silent crash</em>. They reached out to us, and the support vanguards on our Discord quickly found a solution - reinstalling the 64-bit Microsoft Visual C++ redistributable for Visual Studio 2022 got Dolphin working for them once again.</p>
<p>We're not entirely sure why exactly this happened. But we have a theory.</p>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; width:148px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2019-november/visualstudio2019.svg">
</div>
<p>The Visual C++ 2022 Redistributable is a runtime library that contains everything needed to run programs compiled with Microsoft Visual Studio 2022. However, Visual Studio 2022 <em>is not static</em>: there are many subversions, and it gets regular updates. These updates <em>should</em> be backwards compatible with any other version of Visual Studio 2022. It would be <strong>madness</strong> to make a change to Visual Studio 2022 that breaks compatibility with Visual Studio 2022's own runtime libraries. However, Microsoft did exactly that.</p>
<p>In Visual Studio 2022 v17.10.0, Microsoft made a non-backwards compatible change to <code>std::mutex::lock</code>. This was <a href="https://developercommunity.visualstudio.com/t/Access-violation-with-std::mutex::lock-a/10664660">reported to Microsoft</a>, however, the issue report was marked as "Closed - Not a Bug". Apparently this was intended! </p>
<p>This puts us, as an application that uses Visual Studio, into a weird place. We set up an automated process to update our Visual Studio builder to new subversions as they come out, confident that it will never break anything. It's just subversions. So we have told our Windows users that all they need to run Dolphin is the Visual C++ 2022 Redistributable, confident that it would work. However, Visual Studio automatically utilized the new version of <code>std::mutex::lock</code> when compiling our Windows builds. If a user is running <em>an older version of the Visual C++ 2022 Redistributable</em> before that new version of <code>std::mutex::lock</code> was implemented, they may download and run our program and see a silent crash. And of course, if we ask them if they are using the Visual C++ 2022 runtime, <em>they'll say yes</em>, because they have it installed.</p>
<p>According to Microsoft, this is our problem. Their expectation is for applications to be distributed with installers that will include the redistributable and install it with the app if required. However, they hand out the redistributable to users precisely for applications like us that ship without an installer. It's not like what we're doing is novel. And perhaps Microsoft should have made it fail in a way that communicates to the user that they need to update the redistributable, instead of just crashing silently? Or perhaps just include the Visual C++ 2022 runtime libraries <em>in Windows Update</em> so every user is guaranteed to have the latest version and applications don't even need to worry about it?</p>
<p>...Anyway, unfortunately, we don't have a great solution for this issue. We could disable our automated update process for our Visual Studio builder, but there are security benefits to keeping it, so this is something we'd rather not do. For now, all we can tell our Windows users is that if you run a new version of Dolphin and encounter a crash, redownload and reinstall Visual C++ 2022 Redistributable. As always, we have a link to the redistributable <a href="https://dolphin-emu.org/download/">on our download page</a>.</p>
<p>On a happier note, it's time for our Notable Changes!</p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<p>All of the changes below are available in Release 2409. </p>
<h4 id="50-21462-windows-remove-rounded-corners-on-emulation-render-window-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21462/">5.0-21462 - Windows: Remove rounded corners on emulation render window</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-21462-windows-remove-rounded-corners-on-emulation-render-window-by-filoppi" title="Permanent link">¶</a></h4>
<p>When Windows 11 released in late 2021, it brought the first major visual overhaul to Windows since <a href="https://en.wikipedia.org/wiki/Windows_phone">Windows Phone</a> from 2010. Gone were the sharp edges, bold colours, and dense squares of the <em>Live Tile</em> era, and in their place were soft tones, spacious design, and friendly round edges.</p>
<p>However, as part of this new aesthetic, Windows 11 applies round edges <em>everywhere</em>, even to game windows! Pixels that your computer spent your hard-earned money rendering are now <em>hidden</em> in windowed mode by default.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/windowscorner-before.webp">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/windowscorner-before_thumb.png">
</a>
<figcaption>At 200% UI scale, Windows 11's rounded corners obscure <strong>112 pixels!</strong> With an <span style="white-space: nowrap;">8x native</span>
window, 0.0005% of your pixels cannot be viewed! What?!</figcaption>
</figure>
</div>
<p><br/>
<span style="font-size: 1.25em;"><strong>This was <em>unacceptable!</em></strong></span>
<br/></p>
<p>Recognizing this <em>travesty</em>, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> came to the rescue and saved our pixels. By configuring <code>DWM_WINDOW_CORNER_PREFERENCE</code> in our Windows builds, all pixels that Dolphin renders (on Windows 11 and in windowed mode) are now once again free to be seen by our illustrious eyeballs.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/windowscorner-after.webp">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/windowscorner-after_thumb.png">
</a>
<figcaption>Now Windows 11 users in windowed mode can savour every single pixel of this <a style="white-space: nowrap; color: black; " href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/#50-15330-raise-program-exceptions-on-floating-point-exceptions-by-josjuice">beloved masterpiece.</a></figcaption>
</figure>
</div>
<p>If only such relief could be bestowed upon our macOS users as well...</p>
<h4 id="balloon-tooltip-quality-of-life-updates-50-21123-50-21635-and-2407-130-by-dentomologist"><strong>Balloon Tooltip Quality of Life Updates</strong> - <a href="https://dolphin-emu.org/download/dev/master/5.0-21123/">5.0-21123</a>, <a href="https://dolphin-emu.org/download/dev/master/5.0-21635">5.0-21635</a>, and <a href="https://dolphin-emu.org/download/dev/master/2407-130/">2407-130</a> by <strong><a href="https://github.com/Dentomologist">Dentomologist</a></strong><a class="headerlink" href="#balloon-tooltip-quality-of-life-updates-50-21123-50-21635-and-2407-130-by-dentomologist" title="Permanent link">¶</a></h4>
<p>A few years ago we introduced our <a href="https://dolphin-emu.org/blog/2020/12/10/dolphin-progress-report-october-2020/#50-13163-remove-description-box-in-graphics-tabs-and-use-custom-tooltips-instead-by-iwubcode">custom balloon tooltips</a>. Rather than have a large description area permanently taking up space or a terrible native tooltip defined by the OS, we created our own custom tooltips that gave us the best of both worlds.</p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2020-october/tooltip-descriptiondemo.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/tooltip-descriptiondemo_thumb.png" /></a>
<figcaption>Rather than taking up all this space all the time...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2020-october/tooltips-new.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2020-october/tooltips-new_thumb.png" /></a>
<figcaption>Modern tooltips let us only display it when required!</figcaption>
</figure>
</div></div>
<p>They have been serving us well since. However, after they were rolled out for the graphics area of our config, they haven't really been <em>touched</em> since then. Now that's changing, and our Balloon Tooltips are finally getting some much needed love and a wider rollout!</p>
<p>First is <a href="https://dolphin-emu.org/download/dev/master/5.0-21123/">5.0-21123</a>, which reworked how they are drawn to resolve <em>many</em> longstanding quibbles with the tooltips.</p>
<div class="media-block narrrower">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://github.com/dolphin-emu/dolphin/pull/12314"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/corners-before.png" /></a>
<figcaption>The corners on the tooltips have always been a bit.. off.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://github.com/dolphin-emu/dolphin/pull/12314"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/corners-after.png" /></a>
<figcaption>Now they are much improved!</figcaption>
</figure>
</div></div>
<p>Next is <a href="https://dolphin-emu.org/download/dev/master/5.0-21635/">5.0-21635</a>, which added tooltips to the Interface tab of Config.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/tooltip-interface.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/tooltip-interface_thumb.avif">
</a>
<figcaption></figcaption>
</figure>
</div>
<p>And finally <a href="https://dolphin-emu.org/download/dev/master/2407-130/">2407-130</a>, which rolls out our tooltips to the General tab of Config!</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/tooltip-general.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/tooltip-general_thumb.avif">
</a>
<figcaption></figcaption>
</figure>
</div>
<p><strong><a href="https://github.com/Dentomologist">Dentomologist</a></strong> is still chipping away at the tooltips, so expect them to continue to improve and be applied to more windows over time!</p>
<h4 id="2407-103-cached-interpreter-20-by-mitaclaw"><strong><a href="https://dolphin-emu.org/download/dev/master/2407-103/">2407-103 - Cached Interpreter 2.0</a></strong> by <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong><a class="headerlink" href="#2407-103-cached-interpreter-20-by-mitaclaw" title="Permanent link">¶</a></h4>
<p>After the merge of "Cached Interpreter 2.0", we've seen some misinformation floating around emulation communities regarding what the cached interpreter is and what this change has brought. So for the Progress Report, we felt it was prudent to take a deep dive, and properly explain a bunch of concepts we've been putting off for years now. Strap in everyone, <em>we're going deep!</em></p>
<hr />
<p>The primary task of CPU emulation is translation: we take code that was originally designed for a specific type of CPU and translate it into something that a different type of CPU can understand. This is not free. Even ignoring the work involved in the act of translating in and of itself (more on that later), having to account for hardware differences means that the resulting translated code will usually be many times larger and more complex than the original code was on the original hardware. As such, there are many different approaches to CPU emulation.</p>
<p><strong>Interpretation</strong> is the most basic and literal CPU translation method. An interpreter decodes each individual instruction from the emulated architecture (guest), then translates that into the instruction<strong>s</strong> (plural) that allow the host to perform the same work. And yes, it translates <em>one instruction at a time</em>. This is extremely accurate (able to preserve all nuance) and very straightforward, making interpreters the perfect entry point for most emulators and a fallback for other translation methods. However, interpreters are so straightforward that they have barely any wiggle-room for optimization. Interpreters will always be costly.</p>
<p><strong>Recompilation</strong> gives us that wiggle-room. By translating the code in <em>blocks</em> rather than per instruction, recompilers can peek into what the code is doing and reimplement troublesome code in ways that are faster for the host hardware. However, reimplementation often causes inaccuracy, and correcting for that without sacrificing speed leads to ballooning complexity. Making a recompiler both fast <em>and</em> accurate can easily take thousands of hours from passionate engineers.</p>
<p>There are many different types of recompilers, but we're just going to focus on the primary recompiler type that Dolphin uses: JITs.</p>
<p><strong>Just-In-Time Recompilation</strong> (JIT) recompiles small blocks of code <em>while the program is running</em>. A JIT will fetch blocks of code from the program, analyze and reimplement as much as it can, then pass the JITed code to the host system to be processed and ready <em>just</em> before the program needs to consume those blocks.</p>
<p>"Just-In-Time" is literal.</p>
<div class="media-block narrower">
<figure>
<video autoplay muted loop playsinline style="max-width: 100%;">
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/trainchase-av1.webm" alt="anyminutenow (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/trainchase-vp9.webm" alt="anyminutenow (VP9)" type="video/webm" codecs="vp9"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/trainchase-h264.mp4" alt="anyminutenow (h.264)" type="video/mp4"/>
</video>
</a>
<figcaption>This is an accurate representation of how JITs work.</figcaption>
</figure>
</div>
<p>The live analysis that JITs perform is overhead. While modern JITs will mitigate this somewhat by caching JITed code blocks, the analysis is still work, which some other recompilation techniques avoid. However, JITs have many benefits. By recompiling blocks of code while the program is running, JITs are able to adapt to whatever the program is doing and don't need to rely on assumptions. This allows for maximum optimization potential, even in self-modifying programs!</p>
<hr />
<p>With that, we've covered the two most common CPU emulation techniques. Generally, there is nothing inbetween these two options. Emulator authors make an interpreter first, and use it as a reference for building a recompiler. And that's it. Recompilers <em>are so much faster</em> than interpreters that making an interpreter faster is largely irrelevant.</p>
<p>There are several reasons for this. For example, interpreters can't place guest registers into the host registers, so any time the emulated CPU wants to read its registers, an interpreter has to fetch the registers' contents from host system memory, which is <em>two orders of magnitude</em> slower. Also, for Dolphin, our interpreter has the <a href="https://dolphin-emu.org/blog/2016/09/06/booting-the-final-gc-game/#memory-management-unit-emulation">MMU</a> enabled <em>at all times</em>, and the constant memory manipulation is <em>even slower</em> in the interpreter than it is for a JIT!</p>
<p>However, what slows down interpreters the most is <strong>branching</strong>.</p>
<p>In computer science, a <a href="https://en.wikipedia.org/wiki/Branch_(computer_science)">branch</a> is the act of diverging from the current flow of instructions. If a CPU is executing instructions sequentially, it can process them <em>very very fast</em>. But if an unpredictable branch occurs, the CPU will need to stop everything, flush all its pipelines, and spend the next 10-20 cycles building them back up again before it can resume processing. Branching is one of the most expensive low level operations in computing! As such, modern CPUs do <em>everything they possibly can</em> to improve branch performance, with branch prediction and speculative branch execution trying to get ahead of any branches and keep the pipelines flowing. These features are so important that improved branch prediction is one of the primary reasons why a 2024 CPU core at 4ghz is faster than a 2004 CPU core at 4ghz. It's that significant.</p>
<p>By operating on each instruction from the guest, one at a time, an interpreter will need to branch <em>very frequently</em> - several times for even a single instruction. And these branches are usually <em>unpredictable</em>, directly hurting what makes modern CPUs fast. With all factors combined and in a worst case scenario, a single instruction from the guest could take <strong>over a hundred cycles</strong> for our interpreter to decode! This occurs <em>millions of times per second</em>, thrashing our host CPU.</p>
<p>Interpreters are simple, straightforward, and readable, but they are <em>fundamentally inefficient</em>. A recompiler will always be faster, so there is little incentive to make an interpreter faster. Except, perhaps, <em>for fun</em>.</p>
<div class="media-block narrower">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/gccpu1.avif">
<figcaption></figcaption>
</figure>
</div>
<p>Nine years ago, <a href="https://github.com/degasus">degasus</a> had a fun idea. How fast could an interpreter be made (while still being an interpreter) if we applied a bunch of ideas from JITs? The result of this little experiment was the <em>Cached Interpreter</em>.</p>
<p>With a JIT, code is collected into blocks and recompiled into host-specific <a href="https://en.wikipedia.org/wiki/Machine_code">machine code</a> all together. This allows the JIT to reimplement some of the code to be faster for the host, but also allows the JIT to <em>cache</em> these JITed code blocks, so that any time code is reused, the JIT will just jump to the cache and skip the analysis for a speedup.</p>
<p>Dolphin's <strong>Cached Interpreter</strong> borrows this idea. Code is collected into blocks exactly like a JIT. However, rather than recompile it into JITed machine code, which is specific to the host and may be reimplemented, the code block is instead translated into an <em>intermediate representation</em> - code which stores the decoded instructions as "commands" that can be compiled into machine code that the host CPU can run.</p>
<p>This benefits our Cached Interpreter in many ways. Just like a JIT, the code blocks can be <em>cached</em>. Any time code reappears, the Cached Interpreter can just reuse the already decoded version in the cache, skipping the decode and all its associated branching. The act of interpreting in blocks rather than per instruction also reduces branching outright, down to roughly one branch per command, and makes branches more predictable too. This also reduces the cost of fetching instructions through the MMU, and brings several other benefits from the JIT, such as <a href="https://dolphin-emu.org/blog/2016/11/01/dolphin-progress-report-october-2016/#idle-skipping-option-removal">Idle Skipping</a>. <span class="gh-tooltip-trigger" data-toggle="tooltip" data-placement="top" title="Our interpreter supported Idle Skipping when the Cached Interpreter was first implemented, but improvements to idle skipping broke the interpreter's compatibility with the feature. However, our Cached Interpreter still supports Idle Skipping, largely because of its similarities to our JITs.">*</span></p>
<p>All combined, the Cached Interpreter was over twice as fast as our interpreter when it released! However, it was still an order of magnitude slower than our JITs. For most users, it was more or less irrelevant. However, the Cached Interpreter has found its niches. As it is still an interpreter, it retains the impeccable accuracy that interpreters provide, as well as the ability to run on any architecture - it's our interpreter, but faster. As such, it has become a useful tool for testing and JIT development. Plus, in <a href="https://dolphin-emu.org/blog/2024/04/30/dolphin-progress-report-february-march-and-april-2024/#why-dolphin-isnt-coming-to-the-ios-app-store">situations where JIT recompilers are unavailable</a>, the substantial speedup versus the standard interpreter is always welcome.</p>
<p>But what if the Cached Interpreter could be taken <em>further?</em></p>
<div class="media-block narrower">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/gccpu2.avif">
<figcaption></figcaption>
</figure>
</div>
<p>Fast forward to 2024, and <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong> and <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> got into a competition to see just how optimized the Cached Interpreter could be. Eventually they merged their efforts, in what <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong> dubbed <strong>Cached Interpreter 2.0</strong>.</p>
<p>This change brought <em>many</em> optimizations to the Cached Interpreter, but the biggest change by far was <em>variable sized commands</em>. Previously, the commands inside the Cached Interpreter's intermediate representation had a fixed size, but <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong> and <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> realized that by allowing the commands to be any size, the most common bookkeeping commands could be bundled together into a single command. This significantly reduces the number of bookkeeping commands in total, further reducing the amount of branching in our Cached Interpreter.</p>
<p>Just how big of an impact could these optimizations have? Let's get to the numbers!</p>
<p><br/>
<script>
addChart({"title":{"text":"Cached Interpreter Performance 2024"},"subtitle":{"text":"Intel Xeon w7-3465X @ 4.8 GHz | Nvidia GeForce RTX 4090 FE | 2407-279 <br/> Higher is better. Mouse-over or tap for detail"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"lineWidth":2,"allowPointSelect":false,"crisp":true,"showCheckbox":false,"animation":false,"enableMouseTracking":true,"events":{},"point":{"events":{}},"dataLabels":{"animation":{},"align":"center","borderWidth":0,"defer":true,"padding":5,"style":{"fontSize":"1em","fontWeight":"bold","color":"contrast","textOutline":"1px contrast"},"verticalAlign":"bottom","x":0,"y":0,"enabled":true},"cropThreshold":300,"opacity":1,"pointRange":0,"softThreshold":true,"states":{"normal":{"animation":true},"hover":{"animation":{"duration":150},"lineWidthPlus":1,"marker":{},"halo":{"size":10,"opacity":0.25},"brightness":0.1},"select":{"animation":{"duration":0},"color":"#cccccc","borderColor":"#000000"},"inactive":{"animation":{"duration":150},"opacity":0.2}},"stickyTracking":true,"turboThreshold":0,"findNearestPointBy":"x","borderRadius":3,"centerInCategory":false,"groupPadding":0.2,"pointPadding":0.1,"minPointLength":0,"startFromThreshold":true,"tooltip":{"distance":6},"threshold":0,"borderColor":"#ffffff","pointStart":0,"name":"Interpreter","dataGrouping":{"groupPixelWidth":2,"dateTimeLabelFormats":{"millisecond":["%A, %e %b, %H:%M:%S.%L","%A, %e %b, %H:%M:%S.%L","-%H:%M:%S.%L"],"second":["%A, %e %b, %H:%M:%S","%A, %e %b, %H:%M:%S","-%H:%M:%S"],"minute":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"hour":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"day":["%A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"week":["Week from %A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"month":["%B %Y","%B","-%B %Y"],"year":["%Y","%Y","-%Y"]}},"legendSymbol":"lineMarker"},{"lineWidth":2,"allowPointSelect":false,"crisp":true,"showCheckbox":false,
"animation"
:false,"enableMouseTracking":true,"events":{},"point":{"events":{}},"dataLabels":{"animation":{},"align":"center","borderWidth":0,"defer":true,"padding":5,"style":{"fontSize":"1em","fontWeight":"bold","color":"contrast","textOutline":"1px contrast"},"verticalAlign":"bottom","x":0,"y":0,"enabled":true},"cropThreshold":300,"opacity":1,"pointRange":0,"softThreshold":true,"states":{"normal":{"animation":true},"hover":{"animation":{"duration":150},"lineWidthPlus":1,"marker":{},"halo":{"size":10,"opacity":0.25},"brightness":0.1},"select":{"animation":{"duration":0},"color":"#cccccc","borderColor":"#000000"},"inactive":{"animation":{"duration":150},"opacity":0.2}},"stickyTracking":true,"turboThreshold":0,"findNearestPointBy":"x","borderRadius":3,"centerInCategory":false,"groupPadding":0.2,"pointPadding":0.1,"minPointLength":0,"startFromThreshold":true,"tooltip":{"distance":6},"threshold":0,"borderColor":"#ffffff","pointStart":0,"name":"Cached Interpreter Before (2407-97)","dataGrouping":{"groupPixelWidth":2,"dateTimeLabelFormats":{"millisecond":["%A, %e %b, %H:%M:%S.%L","%A, %e %b, %H:%M:%S.%L","-%H:%M:%S.%L"],"second":["%A, %e %b, %H:%M:%S","%A, %e %b, %H:%M:%S","-%H:%M:%S"],"minute":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"hour":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"day":["%A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"week":["Week from %A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"month":["%B %Y","%B","-%B %Y"],"year":["%Y","%Y","-%Y"]}},"legendSymbol":"lineMarker"},{"lineWidth":2,"allowPointSelect":false,"crisp":true,"showCheckbox":false,"animation":false,"enableMouseTracking":true,"events":{},"point":{"events":{}},"dataLabels":{"animation":{},"align":"center","borderWidth":0,"defer":true,"padding":5,"style":{"fontSize":"1em","fontWeight":"bold","color":"contrast","textOutline":"1px contrast"},"verticalAlign":"bottom","x":0,"y":0,"enabled":true},"cropThreshold":300,"opacity":1,"pointRange":0,"softThreshold":true,"states":{"normal":{"animation":true}
,"hover":{"animation":{"duration":150},"lineWidthPlus":1,"marker":{},"halo":{"size":10,"opacity":0.25},"brightness":0.1},"select":{"animation":{"duration":0},"color":"#cccccc","borderColor":"#000000"},"inactive":{"animation":{"duration":150},"opacity":0.2}},"stickyTracking":true,"turboThreshold":0,"findNearestPointBy":"x","borderRadius":3,"centerInCategory":false,"groupPadding":0.2,"pointPadding":0.1,"minPointLength":0,"startFromThreshold":true,"tooltip":{"distance":6},"threshold":0,"borderColor":"#ffffff","pointStart":0,"name":"Cached Interpreter After","dataGrouping":{"groupPixelWidth":2,"dateTimeLabelFormats":{"millisecond":["%A, %e %b, %H:%M:%S.%L","%A, %e %b, %H:%M:%S.%L","-%H:%M:%S.%L"],"second":["%A, %e %b, %H:%M:%S","%A, %e %b, %H:%M:%S","-%H:%M:%S"],"minute":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"hour":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"day":["%A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"week":["Week from %A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"month":["%B %Y","%B","-%B %Y"],"year":["%Y","%Y","-%Y"]}},"legendSymbol":"lineMarker"},{"lineWidth":2,"allowPointSelect":false,"crisp":true,"showCheckbox":false,"animation":false,"enableMouseTracking":true,"events":{},"point":{"events":{}},"dataLabels":{"animation":{},"align":"center","borderWidth":0,"defer":true,"padding":5,"style":{"fontSize":"1em","fontWeight":"bold","color":"contrast","textOutline":"1px contrast"},"verticalAlign":"bottom","x":0,"y":0,"enabled":true},"cropThreshold":300,"opacity":1,"pointRange":0,"softThreshold":true,"states":{"normal":{"animation":true},"hover":{"animation":{"duration":150},"lineWidthPlus":1,"marker":{},"halo":{"size":10,"opacity":0.25},"brightness":0.1},"select":{"animation":{"duration":0},"color":"#cccccc","borderColor":"#000000"},"inactive":{"animation":{"duration":150},"opacity":0.2}},"stickyTracking":true,"turboThreshold":0,"findNearestPointBy":"x","borderRadius":3,"centerInCategory":false,"groupPadding":0.2,"pointPadding":0.1,"minPointLength":
0,"startFromThreshold":true,"tooltip":{"distance":6},"threshold":0,"borderColor":"#ffffff","pointStart":0,"name":"x86-64 JIT","dataGrouping":{"groupPixelWidth":2,"dateTimeLabelFormats":{"millisecond":["%A, %e %b, %H:%M:%S.%L","%A, %e %b, %H:%M:%S.%L","-%H:%M:%S.%L"],"second":["%A, %e %b, %H:%M:%S","%A, %e %b, %H:%M:%S","-%H:%M:%S"],"minute":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"hour":["%A, %e %b, %H:%M","%A, %e %b, %H:%M","-%H:%M"],"day":["%A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"week":["Week from %A, %e %b %Y","%A, %e %b","-%A, %e %b %Y"],"month":["%B %Y","%B","-%B %Y"],"year":["%Y","%Y","-%Y"]}},"legendSymbol":"lineMarker"}],"data":{"csv":"\"Game\";\"Interpreter\";\"Cached Interpreter Before (2407-97)\";\"Cached Interpreter After\";\"x86-64 JIT\"\n\"Fire Emblem: Path of Radiance<br/>Final Battle\";6.5;17;19;200\n\"Cave Story<br/>First Cave\";5.2;120;133;398\n\"Sonic Colors<br/>Start of the First Stage\";5;11;14;124\n\"Super Mario Galaxy<br/>Comet Observatory\";4.6;17;20;131","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":"V-Blanks per Second (VPS)"},"tickInterval":30,"max":180,
plotLines: [{
color: '#000000',
width: 4,
dashStyle: "LongDash",
label: {text: "Fullspeed", align: "right", style: {'text-shadow': 'rgb(255, 255, 255) 3px 0px 0px, rgb(255, 255, 255) 2.83487px 0.981584px 0px, rgb(255, 255, 255) 2.35766px 1.85511px 0px, rgb(255, 255, 255) 1.62091px 2.52441px 0px, rgb(255, 255, 255) 0.705713px 2.91581px 0px, rgb(255, 255, 255) -0.287171px 2.98622px 0px, rgb(255, 255, 255) -1.24844px 2.72789px 0px, rgb(255, 255, 255) -2.07227px 2.16926px 0px, rgb(255, 255, 255) -2.66798px 1.37182px 0px, rgb(255, 255, 255) -2.96998px 0.42336px 0px, rgb(255, 255, 255) -2.94502px -0.571704px 0px, rgb(255, 255, 255) -2.59586px -1.50383px 0px, rgb(255, 255, 255) -1.96093px -2.27041px 0px, rgb(255, 255, 255) -1.11013px -2.78704px 0px, rgb(255, 255, 255) -0.137119px -2.99686px 0px, rgb(255, 255, 255) 0.850987px -2.87677px 0px, rgb(255, 255, 255) 1.74541px -2.43999px 0px, rgb(255, 255, 255) 2.44769px -1.73459px 0px, rgb(255, 255, 255) 2.88051px -0.838247px 0px'}},
value: 60,
zIndex: 5,
}],
},"xAxis":{"title":{},"labels":{}},"pane":{"background":[]},"responsive":{"rules":[]},"tooltip":{"shared":true,"shadow":true,"borderRadius":10,"crosshairs":"true","split":false},"colors":["#9e9e9e","#ffe400","#ff3100","#006eff"]})
</script></p>
<p>With a 10 to 25% uplift, the Cached Interpreter is better than ever! It's also now 3 to 4 times faster than the interpreter, and in games with lots of idle loops to skip, such as <a href="https://wiki.dolphin-emu.org/index.php?title=Cave_Story">Cave Story</a>, Cached Interpreter leaves our interpreter in the dust. However, our JITs are still MUCH faster in every scenario, so its role in Dolphin is unchanged. The Cached Interpreter still cannot serve as a JIT alternative. And according to <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong>, further optimizations had a negligible impact on its performance. Dolphin's Cached Interpreter will likely not see another significant performance bump again.</p>
<p>Nevertheless, for the niches where the Cached Interpreter thrives, it is now faster than it has ever been. </p>
<h4 id="2407-165-macos-embed-the-updater-into-dolphinqts-app-bundle-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/2407-165/">2407-165 - macOS: Embed the Updater into DolphinQt's app bundle</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#2407-165-macos-embed-the-updater-into-dolphinqts-app-bundle-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>One of the best things about macOS is <em>application bundles</em>.</p>
<p>On Windows, programs are largely intended to bring their own dependencies. However, each program will need many different files in many different <em>and bizarre</em> places, so much so that it is standard to ship a <em>dedicated program</em> whose only purpose is to place or remove all of the disparate files an application needs to function. If something goes wrong with this process, <strong>good luck</strong>.</p>
<p>Linux, on the other hand, works more like code - dependencies are separate from the program and should be linked, not duplicated. However, dependencies will need to be installed along with the application, so Linux has package managers to install applications and any dependencies that are needed. While this is certainly better than the backwards-compatibility mess that is Windows, installing a single application in Linux still results in installing lots of things in lots of places.</p>
<p>macOS is different. It has something called <em>application bundles</em>. All apps on macOS (with the exception of command-line tools and scripts) are distributed in the bundle format. Application bundles are really just regular folders that follow a very specific structure with their contents. They allow all of an application's files and dependencies to be grouped together in a single folder, nice and neat. To the user, however, the bundle is shown as a single icon and they never see or know about all of the files inside. This allows for one of the best things about bundles - the process of installing or uninstalling an app is just... drag and drop. That's it. And to run the application, just double-click the bundle as if it were the application itself.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-demo.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-demo_thumb.avif">
</a>
<figcaption>This is the best!</figcaption>
</figure>
</div>
<p>However, for the past several years Dolphin on macOS has shipped not one, but two bundles - Dolphin, and Dolphin Updater. The updater didn't do anything if you double-clicked it, and would just give an error; it was intended to be used only by Dolphin itself. Unfortunately, this has occasionally caused confusion with users. After all, the majority of macOS apps are distributed as a single bundle. Why does Dolphin have two?</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-before.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-before_thumb.avif">
</a>
<figcaption>It's just not the same.</figcaption>
</figure>
</div>
<p>Fortunately, this has now been fixed. When creating the main Dolphin bundle during a build, we now insert the updater bundle inside of it! Whenever we need to perform a Dolphin update, we just load the updater bundle from within the main Dolphin bundle, create a copy of it in a separate temporary location, and run that. With this change, the user only ever sees one bundle when installing Dolphin for the first time. Glorious single drag and drop installation has been achieved!</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-after.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/macosinstallation-after_thumb.avif">
</a>
<figcaption>Hurray!</figcaption>
</figure>
</div>
<p><a href="https://dolphin-emu.org/download/dev/master/2407-173/">2407-173</a> removes all remnants of the separate updater bundle if any are present. If you have previously installed both Dolphin and the updater to your Applications folder, by the time you are reading this the separate Dolphin Updater will likely already be gone. If not, update and it will be removed.</p>
<p><em>Note: A bug was fixed in <a href="https://dolphin-emu.org/download/dev/master/2407-111">2407-111</a> which caused the updater to crash on startup on some Macs. If you are using an older build of Dolphin, you may need to update your copy of Dolphin manually first.</em></p>
<h4 id="zelda-hle-pikmin-fixes-2407-177-and-2407-225-by-flacs"><strong>Zelda HLE Pikmin Fixes</strong> - <strong><a href="https://dolphin-emu.org/download/dev/master/2407-177/">2407-177</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/2407-225/">2407-225</a></strong> by <strong><a href="https://github.com/Tilka">flacs</a></strong><a class="headerlink" href="#zelda-hle-pikmin-fixes-2407-177-and-2407-225-by-flacs" title="Permanent link">¶</a></h4>
<p>Audio emulation has gone through an interesting transformation throughout the many eras of Dolphin. In the release era, HLE (High Level Emulation) audio is pretty much universally used for almost everything. Over the course of time, almost every gap in accuracy between HLE and the more in-depth LLE (Low-Level Emulation) has been closed up. Infamous HLE audio bugs like the screeching in <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_II:_Rogue_Leader">Star Wars: Rogue Squadron</a> games? Solved. The Grand Star hang in <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a>? Long gone. </p>
<p>It has been a massive struggle to get HLE audio to this point. Back in the old days, you had a choice to make - potentially broken audio (or even no audio in some games!) with HLE, or deal with the massive performance demand that came with getting proper audio using LLE. This all started to change back in the 3.5 era, when massive rewrites hit Dolphin's audio code.</p>
<p>Why does this all matter? Well, users didn't like LLE audio, and these massive rewrites to HLE audio had tons of benefits. The problem with HLE audio is that Dolphin has to correctly handle the functions of every revision of every microcode in order for things to work. <a href="https://wiki.dolphin-emu.org/index.php?title=Pikmin">Pikmin</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Pikmin_2">Pikmin 2</a> use what we call the "Zelda Microcode". This microcode is used in games like <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">the</a> <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Four_Swords_Adventures">Zelda</a> <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess">games</a> (except <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">Skyward Sword</a>), <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">the</a> <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super</a> <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">Mario</a> games and <a href="https://wiki.dolphin-emu.org/index.php?title=Luigi%27s_Mansion">Luigi's Mansion</a>.</p>
<p>The problem with this is that <em>pretty much every game</em> uses a different version of the microcode. This meant that in order to emulate <em>each game</em>, you had to figure out what functions they supported, and how to emulate them correctly. For example, all of the microcode revisions will have functions to control volume, but earlier microcodes might have bugs that need to be emulated, later microcodes might have additional features, like controlling volume individually for different things. Apply this to <em>everything</em>, and it becomes apparent how much of a pain in the rear this can be.</p>
<p>In order to get these massive rewrites merged, support for each individual microcode wasn't necessarily perfect. Upon testing, the games sounded mostly correct, and the various problems of old-HLE audio were fixed. However, there were minor issues spread across the various games. Originally, New-Zelda-HLE had issues with the volume of echoes in <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart: Double Dash</a>. This was a known issue when it was merged, but was deemed acceptable due to all the other improvements.</p>
<p>The only difference between that and <a href="https://wiki.dolphin-emu.org/index.php?title=Pikmin">Pikmin</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Pikmin_2">Pikmin 2</a> is that their small issues seemed like they were never going to be addressed. In fact, most users didn't even realize there was a problem. They were by and large playable, and unless you played the game recently on console, you wouldn't know that some menu sounds were the wrong pitch, or there were missing sounds for puffs of smoke in the opening cutscene. Thankfully, when New-Zelda-HLE was merged, the issues we did discover were archived, and <strong><a href="https://github.com/Tilka">flacs</a></strong> saw them and investigated them while looking for more audio issues to fix.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<audio controls src="https://dolphin-emu.org/m/user/blog/progress-report/2409/pikmin2savesound-before.mp4">Your browser does not support the <code>audio</code> element.</audio>
<figcaption>The incorrect pitch on the save sound has bothered musically-inclined users <em>for years!</em></figcaption>
</figure>
<figure class="col-sm-6">
<audio controls src="https://dolphin-emu.org/m/user/blog/progress-report/2409/pikmin2savesound-after.mp4">Your browser does not support the <code>audio</code> element.</audio>
<figcaption>Oh sweet relief.</figcaption>
</figure>
</div></div></p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<audio controls src="https://dolphin-emu.org/m/user/blog/progress-report/2409/pikmin2missingfilters-before.mp4">Your browser does not support the <code>audio</code> element.</audio>
<figcaption>The explosions here are too quiet, getting lost in the engine rumble.</figcaption>
</figure>
<figure class="col-sm-6">
<audio controls src="https://dolphin-emu.org/m/user/blog/progress-report/2409/pikmin2missingfilters-after.mp4">Your browser does not support the <code>audio</code> element.</audio>
<figcaption>Emulated properly, they pop and snap as explosions should.</figcaption>
</figure>
</div></div></p>
<p>These may seem minor, but back in the day there were hundreds of issues like these due to HLE audio's imperfect emulation of the microcode. It seems almost surreal that, in most cases, HLE audio and LLE audio are now indistinguishable.</p>
<h4 id="2407-228-videocommon-force-display-list-alignment-by-flacs"><strong><a href="https://dolphin-emu.org/download/dev/master/2407-228/">2407-228 - VideoCommon: Force Display List Alignment</a></strong> by <strong><a href="https://github.com/Tilka">flacs</a></strong><a class="headerlink" href="#2407-228-videocommon-force-display-list-alignment-by-flacs" title="Permanent link">¶</a></h4>
<p>Once upon a time, Dolphin bugs were obvious: a simple <em>screenshot</em> was all it took to convey just how broken Dolphin was in a particular title. <a href="https://www.youtube.com/watch?v=2jta4PkYBRk">Grey Zelda</a>, <a href="https://dolphin-emu.org/blog/2014/09/30/dolphin-progress-report-september-2014/#40-3194-fioras-fantastic-faster-mmu-by-fiora">Spider-man as a flying box</a>, <a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/DearGod.webp">uwu Kirby</a>, <a href="https://dolphin-emu.org/m/user/blog/progress-report/september-2014/batman-the-flying-crotch.png">Batman as a flying crotch</a>, on and on. However, once Dolphin's fundamental inaccuracies were resolved in the 3.5 and 4.0 eras, that largely became a thing of the past. Today, we have to use fifologs and automation to catch changes, and carefully pixel-peep against console to verify that something is in fact actually incorrect.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Wallace_%26_Gromit_in_Project_Zoo">Wallace and Gromit in Project Zoo</a> bucks this trend. The game's shadows looked fairly good on console, but in Dolphin? <strong>They could ƒ^&%ing explode.</strong></p>
<div class="media-block narrower">
<figure>
<video controls muted loop playsinline style="max-width: 100%;">
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/projectzooexplosions-av1.webm" alt="projectzooexplosions (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/projectzooexplosions-vp9.webm" alt="projectzooexplosions (VP9)" type="video/webm" codecs="vp9"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/projectzooexplosions-h264.mp4" alt="projectzooexplosions (h.264)" type="video/mp4"/>
</video>
</a>
<figcaption>Well, this is a fine how do you do, isn't it, Gromit?</br><sub>PHOTOSENSITIVITY WARNING. Click to play.</sub>
</figcaption>
</figure>
</div>
<p>We had no idea why the shadows in this fairly obscure game would sometimes fail so catastrophically, but something was clearly very wrong, so in 2013 we added a patch to <em>remove these shadows from the game.</em> It was an extreme solution, but the game had an extreme problem, so we did what we could to at least make the game playable. It was certainly better than the video above. But as time passed, the developers who investigated the problem moved on, and these troublesome shadows slowly faded from memory...</p>
<div class="media-block wider">
<figure>
<video autoplay muted loop playsinline style="max-width: 100%;">
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/anyminutenow-av1.webm" alt="anyminutenow (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/anyminutenow-vp9.webm" alt="anyminutenow (VP9)" type="video/webm" codecs="vp9"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2409/anyminutenow-h264.mp4" alt="anyminutenow (h.264)" type="video/mp4"/>
</video>
</a>
<figcaption></figcaption>
</figure>
</div>
<p><strong>Ten years later</strong>, <strong><a href="https://github.com/Tilka">flacs</a></strong> happened to notice that Project Zoo's shadows were still broken, and looked into the issue. They soon spotted something suspicious: the game's <a href="https://www.songho.ca/opengl/gl_displaylist.html">display list</a> (a group of GPU commands stored for later execution) wasn't aligned. Rather than prevaricate about the bush, <strong><a href="https://github.com/Tilka">flacs</a></strong> went straight to hardware testing and quickly adapted the <a href="https://github.com/devkitPro/gamecube-examples/tree/master/graphics/gx/triangle">triangle test homebrew</a> to use display lists.</p>
<p>Turns out that hunch was spot on target! <a href="https://wiki.dolphin-emu.org/index.php?title=Wallace_%26_Gromit_in_Project_Zoo">Wallace and Gromit in Project Zoo</a> submits display lists unaligned, and Dolphin was erroneously processing them exactly as they were submitted. The hardware aligns the memory address by dropping its lower bits. So for example, the game would point toward 0x80fc9b04, and Dolphin would start executing from there (getting bad opcodes) when hardware would <em>drop</em> the lowest 5 bits as it was 32-byte aligned and start at 0x80fc9b00. By not forcing alignment, Dolphin thought the game wanted to render <em>random garbage</em> and told the GPU driver to render it, which the GPU driver would try its best to do. Sometimes this only resulted in minor visual bugs, other times it would utterly explode as shown above.</p>
<p>With a very small change to Dolphin, we can now render these shadows just fine, and yet another hardware quirk is being emulated correctly.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2409/gromitshadows-working.webp">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2409/gromitshadows-working_thumb.avif">
</a>
<figcaption>While it didn't come in the 4.0 or 5.0 eras, Wallace and Gromit in Project Zoo is finally free from emulation issues. We hope.</figcaption>
</figure>
</div>
<h4 id="2407-236-android-fix-and-enable-input-device-sensor-input-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/2407-236/">2407-236 - Android: Fix and enable input device sensor input</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#2407-236-android-fix-and-enable-input-device-sensor-input-by-josjuice" title="Permanent link">¶</a></h4>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:8%; min-width:120px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png"></div>
<p>Last year, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> <a href="https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/#50-18920-rewrite-android-input-handling-by-josjuice">rewrote our Android controller input handling from scratch</a>. This rewrite replaced the old Java input handler with a brand new one written in C++ that more closely matched how Dolphin's PC input handlers work. Not only did this clean up some crusty old code with known problems, but it also unlocked dozens of "new" features for our Android users that were previously only in our desktop builds!</p>
<p>However, one very significant feature that was a part for that overhaul last year was disabled when the overhaul eventually landed - sensor input (accelerometers and gyroscopes) from external controllers, a feature available in Android 12 and up. During the final testing of the input rewrite, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> received reports that using controller sensors could make Dolphin crash when navigating between screens. Because their phone was stuck on Android 11, they couldn't test the feature themselves, and decided that rather than hold off the rewrite to address the issue, it was best to just disable external sensors for the time being and continue the rollout without it.</p>
<p>With over a year passed since then, <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> showed up with not only willingness to investigate the crash, but also the needed hardware. The first step: Finding out why the crash is happening. The reports from a year prior included a stack trace showing where in the code the crash occurred, and <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> had used this information to theorize that when Dolphin turned off unused sensors to save battery, Android would start notifying Dolphin about a sensor that Dolphin never had asked to be notified about. <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> was able to replicate the crash and get a match stack trace, and then managed to take a step beyond the old investigation by figuring out the root cause of the crash. The sensor that Dolphin didn't recognize wasn't actually a new sensor - it was a new object representing the same sensor as before. The cause of the bug was that Dolphin checked if two sensor objects were literally the same object (<em>referential equality</em>) rather than checking if the objects had the same content (<em>structural equality</em>).</p>
<p>With that, it was time for the second step: Properly fixing the issue. <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> began by making a quick solution to check that their approach was correct, but alas, Dolphin was still crashing! It turned out there was a <em>second crash</em> that nobody had discovered until now because the other crash always happened first! Somewhere within the code of Android itself, a <code>ConcurrentModificationException</code> was being thrown when Dolphin turned sensors off. <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> couldn't quite make sense of why this was happening, but with all the information he had gathered, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> once again stepped into the picture. They discovered that the cause of the crash was a simple coding mistake in the operating system itself - <a href="https://cs.android.com/android/_/android/platform/frameworks/base/+/389eed52e469cadfc704708e10ddeec77ea807ae:core/java/android/hardware/input/InputDeviceSensorManager.java;l=285">removing objects from a list while looping through the list</a> - and implemented a workaround for this crash and a proper solution for the earlier crash. Finally, <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> tested the change to make sure motion controls were now working properly.</p>
<p>With the issues now solved, sensors from external controllers are available for mapping in Dolphin on Android! The sensors in controllers such as the DualShock 4 can now be used to better emulate motion in Dolphin. Keep in mind that the feature only works for controllers your version of Android has sensor support for. If you're using Android 11 or older, sensors aren't supported for any controllers at all.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2024-05-01&to=2024-09-04&type=c">all of the contributors</a> that incremented Dolphin 349 commits in the final days of the 5.0 era, and 279 commits after Release 2407! </p>
<h3 id="the-first-month-of-dolphin-retroachievements"><strong>The First Month of Dolphin RetroAchievements</strong><a class="headerlink" href="#the-first-month-of-dolphin-retroachievements" title="Permanent link">¶</a></h3>
<p>The RetroAchievements team has shared with us a bunch of statistics for the first month of RetroAchievement support in Dolphin! And there's a lot of interesting bits in here. Enjoy!</p>
<p><center></p>
<h4 id="general-statistics"><strong>General Statistics</strong><a class="headerlink" href="#general-statistics" title="Permanent link">¶</a></h4>
<p><strong>Total Unlocks: 860,290</strong></p>
<p><strong>Total Hardcore Unlocks: 815,944</strong></p>
<p><strong>Total Points Earned: 5,864,862</strong></p>
<p><strong>Total Hardcore Points Earned: 5,558,151</strong></p>
<p><strong>Total Sessions: 284,432</strong></p>
<h4 id="top-ten-games-with-the-most-players"><strong>Top Ten Games with the Most Players</strong><a class="headerlink" href="#top-ten-games-with-the-most-players" title="Permanent link">¶</a></h4>
<table>
<thead>
<tr>
<th>Game</th>
<th>Players</th>
</tr>
</thead>
<tbody>
<tr>
<td>Super Mario Sunshine</td>
<td>2532</td>
</tr>
<tr>
<td>Super Smash Bros. Melee</td>
<td>2230</td>
</tr>
<tr>
<td>Mario Kart: Double Dash!!</td>
<td>1908</td>
</tr>
<tr>
<td>Luigi's Mansion</td>
<td>1148</td>
</tr>
<tr>
<td>Legend of Zelda, The: The Wind Waker</td>
<td>1084</td>
</tr>
<tr>
<td>WarioWare, Inc.: Mega Party Games!</td>
<td>946</td>
</tr>
<tr>
<td>Kirby Air Ride</td>
<td>893</td>
</tr>
<tr>
<td>Legend of Zelda, The: Twilight Princess</td>
<td>888</td>
</tr>
<tr>
<td>Animal Crossing</td>
<td>847</td>
</tr>
<tr>
<td>Pikmin</td>
<td>758</td>
</tr>
</tbody>
</table>
<h4 id="top-ten-most-mastered-games"><strong>Top Ten Most Mastered Games</strong><a class="headerlink" href="#top-ten-most-mastered-games" title="Permanent link">¶</a></h4>
<table>
<thead>
<tr>
<th>Game</th>
<th>Masteries</th>
</tr>
</thead>
<tbody>
<tr>
<td>Super Mario Sunshine</td>
<td>284</td>
</tr>
<tr>
<td>Piglet's Big Game</td>
<td>195</td>
</tr>
<tr>
<td>Magical Mirror Starring Mickey Mouse</td>
<td>172</td>
</tr>
<tr>
<td>Pokemon Channel</td>
<td>163</td>
</tr>
<tr>
<td>~Hack~ Samus Goes to the Fridge to Get a Glass of Milk 3D</td>
<td>152</td>
</tr>
<tr>
<td>Winnie the Pooh's Rumbly Tumbly Adventure</td>
<td>144</td>
</tr>
<tr>
<td>~Hack~ Luigi's Mansion Beta Restoration</td>
<td>140</td>
</tr>
<tr>
<td>Legend of Zelda, The: The Wind Waker</td>
<td>120</td>
</tr>
<tr>
<td>Wario World</td>
<td>112</td>
</tr>
<tr>
<td>WarioWare, Inc.: Mega Party Games!</td>
<td>101</td>
</tr>
</tbody>
</table>
<h4 id="top-ten-most-beaten-games"><strong>Top Ten Most Beaten Games</strong><a class="headerlink" href="#top-ten-most-beaten-games" title="Permanent link">¶</a></h4>
<table>
<thead>
<tr>
<th>Game</th>
<th>Times Beaten</th>
</tr>
</thead>
<tbody>
<tr>
<td>Super Mario Sunshine</td>
<td>626</td>
</tr>
<tr>
<td>WarioWare, Inc.: Mega Party Games!</td>
<td>551</td>
</tr>
<tr>
<td>Luigi's Mansion</td>
<td>505</td>
</tr>
<tr>
<td>Super Smash Bros. Melee</td>
<td>339</td>
</tr>
<tr>
<td>Dance Dance Revolution: Mario Mix</td>
<td>305</td>
</tr>
<tr>
<td>Pokemon Channel</td>
<td>297</td>
</tr>
<tr>
<td>Mario Kart: Double Dash!!</td>
<td>297</td>
</tr>
<tr>
<td>Pikmin</td>
<td>273</td>
</tr>
<tr>
<td>Legend of Zelda, The: The Wind Waker</td>
<td>243</td>
</tr>
<tr>
<td>Naruto: Clash of Ninja</td>
<td>232</td>
</tr>
</tbody>
</table>
<p></center></p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
<!-- tooltip code below -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()})
</script>
<style>
.asdf {
position: relative;
border-bottom: 1px dotted;
}
.gh-tooltip-trigger {
position: relative;
border-bottom: 1px dotted;
}
.tooltip {
font-size: unset !important;
}
.tooltip-inner {
padding: 10px 10px !important;
}
.asdf .asdftext {
visibility: hidden;
width: 240px;
background-color: #484848;
color: #fff;
border-radius: 6px;
padding: 20px 20px;
/* Position the tooltip */
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -120px;
/* Fade */
opacity: 0;
transition: opacity 0.2s;
}
.asdf .asdftext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #484848 transparent transparent transparent;
}
.asdf:hover .asdftext {
visibility: visible;
opacity: 1;
}
</style>
Unlocked: RetroAchievements Come to Dolphin
2024-07-15T20:54:59+00:002024-07-16T08:31:35.914965+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2024/07/15/unlocked-retroachievements-come-dolphin/
<header>
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/retroachievementsheader.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/retroachievements/retroachievementsheader-169.jpg" />
</header>
<p>Dolphin's users are always looking for new ways to play their favorite games. And when a project called "RetroAchievements" started gaining popularity for adding achievements into retro games, users started wondering if Dolphin would ever add support for the project. Unfortunately for them, Dolphin isn't a <em>retro</em> game emulator. We're a <em>modern</em> emulator that emulates two <em>recent</em> Nintendo consoles! RetroAchievements wouldn't make sense-</p>
<div class="media-block wide">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/wereold.png"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Ah shi-</p>
<h3 id="retroachievements-dolphin-launch-announcement"><strong>RetroAchievements Dolphin Launch Announcement!</strong><a class="headerlink" href="#retroachievements-dolphin-launch-announcement" title="Permanent link">¶</a></h3>
<p>That's right, it's finally here. RetroAchievements integration has come to Dolphin. Now you can play some of your favorite GameCube games with full achievement sets that are automatically recorded to your RetroAchievements account. Much like modern "achievements" or "trophies", RetroAchievements sets essentially amount to a list of tasks and goals that may go above and beyond simply beating the game.</p>
<p>For their GameCube launch day, they've gone all out, with over <em>100</em> different titles on launch. This ranges from some of the most popular GameCube games, to obscure gems, <em>terrible</em> games, and even a few game mods!</p>
<ul>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">The Legend of Zelda: The Wind Waker</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Final_Fantasy_Crystal_Chronicles">Final Fantasy Crystal Chronicles</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Harvest_Moon:_A_Wonderful_Life">Harvest Moon: A Wonderful Life</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Super_Smash_Bros._Melee">Super Smash Bros. Melee</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Baten_Kaitos_Origins">Baten Kaitos Origins</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Star_Fox:_Assault">Star Fox Assault</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Metal_Gear_Solid:_The_Twin_Snakes">Metal Gear Solid: The Twin Snakes</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Golf:_Toadstool_Tour">Mario Golf: Toadstool Tour</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Luigi%27s_Mansion">Luigi's Mansion</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_(GC)">Metroid Prime</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_II:_Rogue_Leader">Star Wars: Rogue Squadron II: Rogue Leader</a></strong></li>
</ul>
<p>For a full list of games, check out the <a href="https://retroachievements.org/system/16/games">RetroAchievements GameCube Library</a> with more on their way soon! Want to get hunting right away? RetroAchievements integration is available in Dolphin 2407-68 and newer, which can be found on our <a href="https://dolphin-emu.org/download/">downloads page</a>. This will give us a chance to work out some of the kinks before it reaches most of our users in the next release update.</p>
<h4 id="activating-retroachievements"><strong>Activating RetroAchievements</strong><a class="headerlink" href="#activating-retroachievements" title="Permanent link">¶</a></h4>
<p>By default, RetroAchievements are disabled in Dolphin. To activate integration, you have to log into your <a href="https://retroachievements.org/">RetroAchievements.org</a> account in Dolphin's new "Achievements" window that's located under the "Tools" dropdown. If you don't have one, you can create a free account on their website.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/login.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/login_thumb.jpg"></a>
<figcaption>Logging in, tracking, and settings are all contained within one window!</figcaption>
</figure>
</div>
<p>Once you're logged in and RetroAchievements Integration is enabled, the next time you load a game with RetroAchievements support, you'll get access to achievements and much more. And that's basically everything you need to know. But, if you're interested in what RetroAchievements can do and how it works, continue reading as we go into more detail.</p>
<h3 id="achievement-lifestyle"><strong>Achievement Lifestyle</strong><a class="headerlink" href="#achievement-lifestyle" title="Permanent link">¶</a></h3>
<p>No matter how you play, RetroAchievements can fit into your style. You can passively gather achievements just by playing through the game, with every set <em>guaranteed</em> to have progression achievements that follow along with the main story or goals of the game. If you do beat the game, the game will be marked as beaten on your RetroAchievements account.</p>
<p>On the other hand, you could also take a more active style of Achievement hunting. At any time, you can visit the gamepage on <a href="https://retroachievements.org">retroachievements.org</a> or through the Achievements menu in Dolphin on the Progress Tab. There you can see what achievements you have, which ones you're missing, and how to obtain any of the achievements. This can be an excellent way to find new challenges in a game you've played through many times before.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/animalcrossing.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/animalcrossing.png"></a>
<figcaption>Some achievement sets might be daunting.</figcaption>
</figure>
</div>
<p>Note that in order to get all of the achievements in some games, you might need to start over with a <em>fresh</em> savefile. Some games, like <a href="https://wiki.dolphin-emu.org/index.php?title=Luigi%27s_Mansion">Luigi's Mansion</a> have multiple save slots so this isn't really a problem. But games like <a href="https://wiki.dolphin-emu.org/index.php?title=1080_avalanche">1080 Avalanche</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Smash_Bros._Melee">Super Smash Bros. Melee</a> require starting from a fresh save for many achievements.</p>
<p>Don't worry, though! You can always create a new savefolder for Dolphin, backup saves, or use a new memory card file if you want to start fresh without losing savedata.</p>
<h4 id="finding-the-right-challenge"><strong>Finding the Right Challenge</strong><a class="headerlink" href="#finding-the-right-challenge" title="Permanent link">¶</a></h4>
<p>Each RetroAchievement has a score assigned to it. When you collect that achievement, the score of that achievement gets added to your account. Achievements score anywhere from 1 point to 100 points. Single point achievements tend to be easy, sometimes are things that you can't skip, or they might be some kind of funny easter egg. On the other hand, 100 point achievements are some of the most daunting tasks imaginable within that game and can take serious dedication and practice to accomplish. Make sure to pay attention to how many points an Achievement is when picking one to hunt down. You might bite off more than you can chew!</p>
<p>The game you play also shapes the kinds of achievements you get. Games like <a href="https://wiki.dolphin-emu.org/index.php?title=Harvest_Moon:_A_Wonderful_Life">Harvest Moon: A Wonderful Life</a> will challenge your time management and min/maxxing skills. Meanwhile, <a href="https://wiki.dolphin-emu.org/index.php?title=F-Zero_GX">F-Zero GX</a> will be mostly about going fast.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/fzerogxmaster.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/fzerogxmaster.png"></a>
<figcaption>F-Zero GX is home to a lot of high octane achievements, and getting them will be no easy feat.</figcaption>
</figure>
</div>
<p>Some achievements will actively let you know when they're available. These kinds of achievements are called "Challenge Achievements" and are often achievements that can be failed without actually losing in the game. When you've fulfilled the necessary conditions to trigger a challenge, a small challenge icon will show up in the bottom right. For more information, check the Progress tab of the Achievements window to get a full rundown on the challenge.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/activechallenge.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/activechallenge_thumb.jpg" /></a>
<figcaption>Active challenges jump to the top of the achievements window and show a small icon in the lower right of the game window to denote it is active.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/activechallenges2.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/activechallenges2_thumb.jpg" /></a>
<figcaption>Sometimes there might be multiple challenges going at once.</figcaption>
</figure>
</div>
</div></p>
<h4 id="old-school-mentality">Old School Mentality<a class="headerlink" href="#old-school-mentality" title="Permanent link">¶</a></h4>
<p>Dolphin provides a ton of convenience features that can help with getting some tricky achievements. Using savestates and slowdown can turn the greatest of challenges into a cakewalk. But what if you really wanted a grand challenge, and wanted show your friends that you beat it legitimately without any extra assistance? That's where Hardcore mode comes in.</p>
<p>In the RetroAchievements menu, you can enable Hardcore mode and it will lock out those features while you're hunting achievements. This gives a more console-authentic experience that can put you to the ultimate test.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/rasoftcore.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/rasoftcore.png" /></a>
<figcaption>You can achieve any achievement in softcore mode.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/rahardcore.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/rahardcore.png" /></a>
<figcaption>But, hardcore mode gives fancy gold borders.</figcaption>
</figure>
</div>
</div></p>
<p>Hardcore mode also enables another RetroAchievements feature: Leaderboards. Leaderboards will automatically record your best times and high scores across various games. What each game measures is up to the developer of the achievement set, but the game will let you know when a leaderboard attempt is active. If you think you're better than all of your friends at <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Golf:_Toadstool_Tour">Mario Golf: Toadstool Tour</a>, prove it! Are you a time trial demon in <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart: Double Dash!!</a>? Show it.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/speedrunleaderboard.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/speedrunleaderboard_thumb.jpg"></a>
<figcaption>RetroAchievements will automatically record your times in compatible games!</figcaption>
</figure>
</div>
<p>There are a variety of leaderboards across the plethora of launch titles. No matter what kind of player you are, there's likely a leaderboard or two that'll fit your style. You can take a look at the game pages at <a href="https://retroachievements.org">retroachievements.org</a> to see the various leaderboards.</p>
<h3 id="a-cooperative-experience">A Cooperative Experience<a class="headerlink" href="#a-cooperative-experience" title="Permanent link">¶</a></h3>
<p>With Discord presence support, RetroAchievements can also give live updates of your current position in a game directly to discord. Use this to race friends, or just to show off where you're at in your game. These live updates are context dependant. For instance, in <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess_(GC)">The Legend of Zelda: Twilight Princess</a> RetroAchievements tracks things like chests opened, heart pieces, bugs collected, etc, while in <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a> it keeps track of things like shine count and blue coins.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/rastatsdolphin.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/rastatsdolphin_thumb.jpg" /></a>
<figcaption>See your current progress directly in Dolphin through the RetroAchievements window.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/rastatsdiscord.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/rastatsdiscord_thumb.jpg" /></a>
<figcaption>Or, show off your progress on discord with Rich Presence support.</figcaption>
</figure>
</div>
</div></p>
<p>If you're a more private gamer or hiding from work, as per usual, the Discord Rich Presence features can be disabled.</p>
<h4 id="multi-sets"><strong>Multi-Sets</strong><a class="headerlink" href="#multi-sets" title="Permanent link">¶</a></h4>
<p>Some achievement sets are designed to be played together! Whether the achievement set itself marks certain achievement lines as multiplayer compatible, or sometimes you'll have an entire set designed around multiplayer. In those cases, you can have multiple people on the same computer work toward the goal, or you can use Dolphin's netplay!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/finalfantasycrystalchronicles.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/finalfantasycrystalchronicles_thumb.jpg"></a>
<figcaption>Netplay with GBAs and RetroAchievements? Yep! Final Fantasy Crystal Chronicles has a separate "Multi" set full of multiplayer achievements.</figcaption>
</figure>
</div>
<p>Multiplayer achievement sets test your ability to communicate and cooperate with friends. If you're a solo gamer worried about multiplayer achievements preventing you from getting a game's "Mastery", don't! Any achievements that <strong>require</strong> multiplayer are moved to a subset that isn't required for game mastery.</p>
<h3 id="achievement-unlocked-marrying-two-massive-projects"><strong>Achievement Unlocked - Marrying Two Massive Projects</strong><a class="headerlink" href="#achievement-unlocked-marrying-two-massive-projects" title="Permanent link">¶</a></h3>
<p>Integrating RetroAchievements with Dolphin was not the smoothest of projects. Given the ancient codebases of these two projects (dating back to 2003 for Dolphin, 2013 for RetroAchievements,) there were a lot of growing pains to get everything to play together nicely. And even through it's functional at this point, there's still a lot of cleanup and maintenance that will have to be done post launch.</p>
<p>One of the things that helped was the <a href="https://pcsx2.net/">PCSX2</a> implementation of RetroAchievements, which acted as a base for the developers who worked on the Dolphin version of the implementation. As well, their own achievement creation library had to be ported over to work with Dolphin's memory handling.</p>
<p>From there, it's been a massive 18 month journey implementing things to get it ready. Without pushing from those passionate about RetroAchievements support (and them also putting the work in,) this could not have happened. There were a lot of roadblocks and close calls with the implementation, and a lot of concessions in order to make things work. This generated a lot of pull requests that needed review, and there were a lot of difficult decisions to make over what to allow and what needed to be done. Code review stages actually took a significant amount of time, due to some of the difficult problems that had to be tackled with memory access and management.</p>
<p>During this process, a secondary build of Dolphin was being developed that worked with their integrated achievement creation system. That way, while RetroAchievements was implemented into Dolphin builds, teams of achievement creators could get to work on developing the achievement sets you see today. Developing these achievement sets was no easy task - depending on the game, an achievement set could take dozens, if not hundreds of hours of work. GameCube games can dynamically allocate memory, use pointers, swap memory between RAM and ARAM, and in some cases like <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars:_The_Clone_Wars">Star Wars: The Clone Wars</a>, change the Block Address Tables whenever it wants. It all makes for a difficult job that takes a lot of testing.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/retroachievements/devenv.png">
<img src="https://dolphin-emu.org/m/user/blog/retroachievements/devenv_thumb.jpg"></a>
<figcaption>Your favorite game missing an achievement set? Complete the Jr. dev program for RetroAchievements and become an achievement developer!</figcaption>
</figure>
</div>
<p>Without these builds, developing achievements would have been nearly impossible, and even with these special additions to Dolphin, there were still a lot of headaches. One headache that they learned to avoid <em>very quickly</em> was of Dualcore. While it may lure you in with its promises of performance, the workload for creating achievements made it <em>even more unstable than normal</em>. Thankfully, this only affected the development of achievements; users will be able to utilize Dualcore mode and its speedups without <em>additional</em> worry.</p>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:8%; min-width:120px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png"></div>
<p>As such, achievements don't cause much of a performance overhead. While there is always a cost to checking memory, we haven't observed any noticeable performance impacts.</p>
<p>The biggest limitation with RetroAchievements in Dolphin actually comes from how we display them. In order to display achievements, the notification system had to be adapted to ImGUI, which is not the ideal solution for their GUI, but it's the solution that we had. Worse yet, because Dolphin doesn't support asynchronous presentation, the framerate that in-game overlays/notifications show up at depends on the actual game's current framerate. This is normally fine in typical gameplay, but if an achievement shows up during as loading screen that has few or no rendered frames, you won't be able to see it in the game window. It's just a case of Dolphin not being designed for this use-case.</p>
<p>Issues like these can be addressed in the future, and we don't think of them as game breaking. As is another omission from this initial launch. Specifically, we didn't target Dolphin on Android. While Dolphin on Android is the same core emulator as its desktop counterpart, there is significant work that would be needed to adapt the RetroAchievements dialogues and settings to Android. Additionally, we ran into some networking issues on Android that are going to require specific attention, and with the desktop release already taking so much effort, we decided it'd be best to hold off. If you're an Android user looking forward to RetroAchievements, don't worry - it will happen. We just can't promise when yet.</p>
<h4 id="wait-what-about-wii"><strong>Wait! What about Wii?</strong><a class="headerlink" href="#wait-what-about-wii" title="Permanent link">¶</a></h4>
<p>Are the teams planning to do Wii RetroAchievements? Yes, both sides are open to it, and somewhere down the line work will begin. But right now, our focus is on getting GameCube RetroAchievements working, and continuing to address various issues and limitations post launch. Eventually, efforts will shift toward Wii RetroAchievements, but it might be a while.</p>
<h3 id="congratulations-youve-mastered-this-article"><strong>Congratulations - You've Mastered This Article</strong><a class="headerlink" href="#congratulations-youve-mastered-this-article" title="Permanent link">¶</a></h3>
<p>And that's that! We've gone over all of the major notes for using RetroAchievements in Dolphin. For more information on RetroAchievements, across all consoles, check out <a href="https://retroachievements.org/">their site</a> and <a href="https://docs.retroachievements.org/general/">documentation</a> for information on supported emulators and various issues.</p>
<p>Starting today, there will be a GameCube launch event, and some of us within the Dolphin team will be attending. This could be your chance to compete against <em>us</em> on the leaderboards, while obtaining a RetroAchievements badge for completing and mastering games.</p>
<p>Special thanks has to go to all of the developers (from both projects!) that put up with the many headaches that came up during the lengthy development process. As well, we'd like to thank the additional volunteers in the RetroAchievements community that worked on the achievement sets for this launch. Without them, there wouldn't be any achievements to, well, achieve! But now that the launch is finished, there's only one thing left to say.</p>
<p>Happy hunting, everyone!</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Releases Announcement
2024-07-02T07:47:50+00:002024-07-02T07:50:01.219150+00:00MayImilaehttps://dolphin-emu.org/blog/authors/MayImilae/https://dolphin-emu.org/blog/2024/07/02/dolphin-releases-announcement/
<header>
<video autoplay muted loop playsinline style="max-width: 100%;">
<source src="https://dolphin-emu.org/m/user/blog/releasesannouncement/realeasesheader-compressed.webm" alt="realeasesheader-compressed.webm (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/releasesannouncement/realeasesheader-compressed-vp9.webm" alt="realeasesheader-compressed-vp9.webm (VP9)" type="video/webm" codecs="vp9"/>
<source src="https://dolphin-emu.org/m/user/blog/releasesannouncement/realeasesheader-compressed.mp4" alt="realeasesheader-compressed.mp4 (h.264)" type="video/mp4"/>
</video>
</header>
<p>On the 24th of June, 2016, <a href="https://dolphin-emu.org/blog/2016/06/24/dolphin-50-release/">Dolphin 5.0 was released</a>. The product of a long and hard transition period, the fundamental inaccuracies that plagued Dolphin for over a decade had successfully been undone, and Dolphin was now free of its burdens to swim forward into a new era of accuracy and performance.</p>
<p>Eight years have passed since that great release, and we have seen the dividends of that effort time and time again. Dolphin has seen constant updates, with new features and enhancements coming side by side with bug fixes and stability improvements. Users are now able to upgrade without fear, knowing that even in the unlikely event of a bug it will be fixed <em>within hours</em>. And of the thousands of titles that Dolphin can run, the number that do not function can now be counted on one hand!</p>
<p>All of this was achieved <em>without</em> a new release. In fact, Dolphin has been in the 5.0 era longer than any other, and with almost <em>twenty-two thousand</em> commits over the past eight years, the 5.0 era now makes up <em>over half</em> of Dolphin's entire commit history! But users haven't forgotten our past releases. They have been waiting for years, patiently anticipating when our next release may arrive.</p>
<p>That wait ends today.</p>
<p>However, the purpose of our old stable builds is now no longer relevant to Dolphin Emulator. We no longer need a benchmark to compare against or an anchor to ground us. We have grown beyond them. So in leaving the 5.0 era behind, we are also leaving behind that release scheme and all it offered. In exchange, we're not <em>just</em> giving you a release today, but also a commitment to <em>continuous releases from now on</em>. The long drought of Dolphin releases is no more and will never happen again!</p>
<p>Welcome to a new era of Dolphin Emulator - the Release Era!</p>
<h3 id="announcement">Announcement<a class="headerlink" href="#announcement" title="Permanent link">¶</a></h3>
<p>We are pleased to announce that Dolphin has adopted a <strong>rolling release cycle!</strong> Building upon our highly successful "beta builds", we will have a release every few months, with a Progress Report launched alongside as a changelog. These are proper release builds however, with the full infrastructure and support that comes with them. They are tagged as releases in Git, allowing our distribution partners to properly support us and our users. Our new releases can receive hotfixes, so if any issues arises we can release small updates instead of a full on new release. And, of course, every release will advance Dolphin's version number.</p>
<p>However, our new releases are fundamentally different from our prior releases, so we didn't want to just add a number to our last release. As such, we are abandoning the X.0 release numbering and moving to a new date-based versioning scheme!</p>
<p><br/></p>
<p>Accompanying this article is our first rolling release - <span style="white-space: nowrap;"><strong>Dolphin 2407</strong></span>! This release is available for download <em>immediately</em>, for Windows x86-64, Windows ARM64, macOS, and Android <a href="https://dolphin-emu.org/download/">from our official website: <strong>dolphin-emu.org</strong>.</a></p>
<p><br/></p>
<p>Here are the details of the new rolling release scheme:</p>
<ul>
<li>The first two digits are the year, and the second two are the month. 2407 codifies a release from July 2024.</li>
<li>All subsequent dev builds after a release will be numbers added on to it. For example, 144 commits after 2409 would result in dev build 2409-144.</li>
<li>Our next release will be 240X. Yes, it will be in just a few months from now!</li>
<li>Hotfix releases will have the addition of a suffix. For example, a single hotfix to Dolphin 2409 would be "Dolphin 2409a".</li>
<li>Beta builds are being replaced by releases. All users in the beta update track will be moved to the new release track.</li>
</ul>
<h3 id="a-new-look">A New Look!<a class="headerlink" href="#a-new-look" title="Permanent link">¶</a></h3>
<p>To herald and symbolize this new era, we also have a new logo! MayImilae, the designer of our previous logo and long term Dolphin blog writer and contributor, has refreshed our logo for the modern day!</p>
<p><br/>
<br/>
<div class="media-block narrower">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/releasesannouncement/dolphinlogorefresh.svg">
<figcaption></figcaption>
</figure>
</div></p>
<p><br/>
<br/>
<div class="media-block narrower">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/releasesannouncement/dolphinlogo2013.svg" style="max-width: 50%;">
<figcaption>For comparison, here's our previous logo.</figcaption>
</figure>
</div>
<br/>
<br/></p>
<p>Here is the explanation of the design, in her own words.</p>
<p><br/>
<blockquote style="font-size: 1em;"> Dolphin's 2013 logo was designed at the start of a transition. Dolphin was leaving its buggy past behind and committing to doing it right, even if it meant ripping out tons of working code. So gone was the silly <a href="https://dolphin-emu.org/m/user/blog/releasesannouncement/olddolphinlogo.png">peace sign mario</a>, and in its place I made a sharp, edgy, serious, on-trend logo to symbolize Dolphin's new future as a <em>serious</em> emulator. And yea, that's carried us through all this way! However, Dolphin is more mature now. It's stable, confident and comfortable in its place. So for the refresh, I wanted to return to the original design and make it timeless, but also more fun, more colorful, and make it a little gentler and thicker.</p>
<p>And finally address all the things that were bugging me for ten years. <footer>MayImilae</footer></blockquote>
<br/></p>
<p>This new logo has already been rolled out in our system and brands Dolphin 2407! However we couldn't get <em>every</em> little logo replaced before the release, so the few that remain will be cleaned up soon.</p>
<div class="media-block wider">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/releasesannouncement/refreshlogovariations.png">
<figcaption>The new logo was designed with variation in mind! Expect to see it in many styles and colors.</figcaption>
</figure>
</div>
<h3 id="but-why-not-60">But why not 6.0?<a class="headerlink" href="#but-why-not-60" title="Permanent link">¶</a></h3>
<p>As we leave the 5.0 era behind, we feel the need to address what might have been - 6.0. While we lightly touched on the reasons above, we know that won't be enough for those who waited <em>so long</em> for something that we kind of didn't deliver. However, to explain this properly we're going to need to go in depth, and tell the story of Dolphin's releases.</p>
<hr />
<p>When Dolphin was a closed source project, beginning in 2003, it benefited from being made by <em>excellent</em> programmers. Code from that era is of the highest quality and has stood the test of time. For example, most of our interpreter <em>has not even been touched in over 15 years!</em> It has been added to, but very little of the interpreter code from that period has been altered. But there was only so much that a handful of quality coders could do in their spare time. It took <strong>years</strong> for Dolphin to approach even a proof of concept, let alone become an actual working emulator with decent features and game compatibility. So in 2008, the founders of Dolphin decided to enter the wild world of open source.</p>
<p>With the floodgates open, contributions <em>poured in.</em> In just a couple of years, Dolphin became a full blown emulator, with tons of new features and the ability to play most games! But the move to open source was not without its drawbacks. While Dolphin was getting the help of hundreds of new developers, the code quality of the project <em>plummeted</em>. The tools available at the time simply didn't allow for quality development.</p>
<p>Back when Dolphin went open source, modern development platforms like <span class="gh-tooltip-trigger" data-toggle="tooltip" data-placement="top" title="Technically GitHub left beta a few months before Dolphin went open source. However, GitHub of 2008 was more of a glorified email client than a modern development platform. It wouldn't be GitHub as we know it today until April of 2011. A few months after that Dolphin moved to Git and a year after that we moved to GitHub.">GitHub didn't exist!*</span> There were no pull requests. There was no way to easily review code and an accompanying forum for discussing the changes before they were checked in or merged. Instead, all development was handled through <em>IRC</em> and <em><a href=https://en.wikipedia.org/wiki/Google_code#Google_Code>Google Code</a></em>, which was more of an issue tracker with a bolted on hosting service than a development platform in the modern sense.</p>
<p>In this era, to submit a change to Dolphin developers would <em>show their change to a developer with commit access <strong>in IRC</strong></em> and ask them to merge their patch. This was a form of review, but it was slow, cumbersome, and <em>overwhelming</em> for maintainers. So once a developer was known to the project, a maintainer would give that developer commit access and <strong>they could just commit anything without review from that point forward.</strong> </p>
<p>Today, this would be considered <em>irresponsible and reckless</em>. But at the time, we had little choice. With terrible tools, difficult to impossible review processes, and a desperate need for contributions, Dolphin flew open the doors and allowed <em>thousands</em> of changes without review.</p>
<p>That decision proved to be highly effective in the short term, and Dolphin exploded in functionality and capability. But code of all quality was being let into the project, both good and bad, and the health of Dolphin's codebase slowly declined. After a few years, Dolphin began to buckle. By 2010, Dolphin was buggy and unstable, and development builds would often break for days at a time! With no access to modern tools, Dolphin needed something to ground itself in the raging sea that was open source in the late aughts.</p>
<p>Dolphin needed an anchor.</p>
<p>And so, Dolphin adopted the Stable Release model. In that release formula, a new Stable Release must have <em>all regressions</em> since the last release resolved, no matter how minor. This would allow releases to serve as a benchmark, a minimum standard that Dolphin would never fall below and would always improve upon with each new release. This meant that no matter how chaotic the development process may be, users knew that if they went from release to release, Dolphin would <em>always</em> be better in every way.</p>
<p>However, Dolphin is a volunteer project, and everyone is committing their free time. To get volunteers to drop their fun projects and work on tedious regression fixes, Dolphin used <strong>feature freezes</strong>.</p>
<p>During a feature freeze, all merges are <strong>halted</strong> except bugfixes. Once all of the regressions from the previous release are resolved, Dolphin would launch a Stable Release, and then feature merges would reopen. By holding developers' fun projects <em>hostage,</em> feature freezes coerced developers to contribute to the bug hunt. After all, the more developers pitched in and fixed bugs, the sooner their cool project could get merged into Dolphin! And it worked. Bugs were fixed and Stable Releases were launched. However, feature freezes were miserable and <strong>costly</strong>. During a freeze, Dolphin's development would stall for months at a time, morale would plummet, new developers were repulsed, and sometimes long-term developers would get tired of it all <em>and just leave.</em></p>
<p>Of course we hoped to find a better way, and with each Stable Release we tried some variation or alternative to feature freezes. None of them succeeded. After 5.0's feature freeze alternative failed so badly that <a href="https://dolphin-emu.org/blog/2015/11/01/dolphin-progress-report-october-2015/">we had to restart the release process over <em>from scratch</em></a>, we had had enough, and made a collective decision to put releases away for a while. No one wanted to deal with a feature freeze again.</p>
<p>Fortunately, we have not needed to. The transition to stability that 5.0 crowned, combined with the advent of modern development tools, has completely changed our development process. Now, every change is reviewed and checked <em>before</em> it is merged. Rather than hurry through messy development and then clean up after, cleanliness and stability <em>is our every day!</em> We no longer need to periodically stop everything and clean up our mess! <strong>We no longer need Stable Releases!</strong></p>
<p>Theoretically, we could have just... not prepared a release ever again. We could have stayed in the 5.0 era forever! However, there are a lot of benefits to releases - for infrastructure, support, and distribution. We wanted to take advantage of those. But we were not going to do a Stable Release again. So after much deliberation and a lengthy development process, we have adopted a rolling release model.</p>
<p>And to codify just how vastly different our new releases are from our previous ones, we also adopted a new versioning scheme. Gone are the X.0 numbers, and with it, 6.0.</p>
<h3 id="credits">Credits<a class="headerlink" href="#credits" title="Permanent link">¶</a></h3>
<p>Approximately <em>six hundred people</em> contributed to Dolphin in some manner during the 5.0 era. There are far too many people to list all of them individually in this article, so we're going to call out the groups that have made Dolphin what it is today!</p>
<p>Dolphin would never have gotten to where we are today without the hundreds of developers who have volunteered to make Dolphin better. The 5.0 era saw many long awaited features like <a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">Ubershaders</a>, the <a href="https://dolphin-emu.org/blog/2019/04/01/the-new-era-of-video-backends/">Unification of VideoCommon</a>, <a href="https://dolphin-emu.org/blog/2017/11/19/hybridxfb/">Hybrid XFB</a>, <a href="https://dolphin-emu.org/blog/2019/04/26/mastering-motion/">MotionPlus Emulation</a>, the <a href="https://dolphin-emu.org/blog/2018/05/02/legend-dolphin-lens-between-worlds/">Qt user interface</a>, <a href="https://dolphin-emu.org/blog/2016/10/24/bluetooth-passthrough/">Bluetooth Passthrough</a>, many new graphics backends, and much much MUCH more! This was only possible because of the tremendous effort of the brilliant engineers who volunteer their time to Dolphin!</p>
<p>The great vanguards of support, <a href="https://discord.dolphin-emu.org/">our Discord</a> moderators and support staff have been assisting users for years, even before our Discord was official! The sheer quantity of users that our Discord is able to help boggles the mind.</p>
<p>The core pillar of support remains our <a href="https://forums.dolphin-emu.org/">forum</a>. Filled with over a decade of history and our support veterans, our forum is where our support staff go for support. </p>
<p><a href="https://wiki.dolphin-emu.org/">Our Wiki</a> team maintains and curates our greatest collective of knowledge for how games perform. <em>Thousands</em> of games are recorded, with thousands of bugs (mostly fixed), workarounds, and game quirks, and tens of thousands of user testing reports! </p>
<p>Dolphin is available in <strong>29</strong> different languages! This is entirely thanks to the members of <a href="https://forums.dolphin-emu.org/Thread-dolphin-translation-moving-to-transifex">our translation team</a>, who volunteer their free time to regularly keep our translations up to date. </p>
<p>And of course, this article wouldn't be possible without our blog team! We're not going to praise ourselves beyond that, it's weird.</p>
<hr />
<p>We will however take a moment to specifically call out those who made this release happen!</p>
<ul>
<li><strong>delroth</strong> championed and planned out our new release scheme, and then reworked our infrastructure to get Dolphin ready for it. He retired before it was all complete, but this release was largely his project, and it would have never happened without him! </li>
<li><strong>OatmealDome</strong> picked up where delroth left off, implementing delroth's release proposal and carrying it to the finish line!</li>
<li>Of course Android would require special attention. <strong>JosJuice</strong> sorted out all of the kinks and got our Android builder ready for <em>Android's first ever Dolphin release!</em> </li>
<li><strong>mbc07</strong> readied our wiki for the biggest release change in its history. </li>
<li><strong>MayImilae</strong> commented on the new release plan, with interest. Also she designed the new logo, helped coordinate the launch, and wrote this article.</li>
</ul>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
<!-- tooltip code below -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()})
</script>
<style>
.asdf {
position: relative;
border-bottom: 1px dotted;
}
.gh-tooltip-trigger {
position: relative;
border-bottom: 1px dotted;
}
.tooltip {
font-size: unset !important;
}
.tooltip-inner {
padding: 10px 10px !important;
}
.asdf .asdftext {
visibility: hidden;
width: 240px;
background-color: #484848;
color: #fff;
border-radius: 6px;
padding: 20px 20px;
/* Position the tooltip */
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -120px;
/* Fade */
opacity: 0;
transition: opacity 0.2s;
}
.asdf .asdftext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #484848 transparent transparent transparent;
}
.asdf:hover .asdftext {
visibility: visible;
opacity: 1;
}
</style>
Dolphin Progress Report Tenth Anniversary Special: February, March, and April 2024
2024-04-30T07:21:16+00:002024-04-30T21:29:36.823680+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2024/04/30/dolphin-progress-report-february-march-and-april-2024/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/ProgressReport10yheader.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/ProgressReport10yheader-mini.jpg" />
</header>
<p><a href="https://forums.dolphin-emu.org/Thread-dolphin-has-a-new-website">In late 2012</a>, Dolphin moved to a brand new website - <a href="https://dolphin-emu.org/">dolphin-emu.org</a>. With complete control of our own home and infrastructure for the first time, we noticed the accessibility to users that it gave us. Not only did we get a new home, but we also got a <em>platform</em>, one that allowed us to communicate directly to our users! We used it to great effect, explaining big changes to the emulator such as <a href="https://dolphin-emu.org/blog/2014/03/15/pixel-processing-problems/">tev_fixes_new</a>, getting ahead of controversy when we <a href="https://dolphin-emu.org/blog/2013/10/12/d3d9-why-its-not-part-dolphins-future/">removed the popular D3D9 graphics backend</a>, <a href="https://dolphin-emu.org/blog/2013/09/26/dolphin-emulator-and-opengl-drivers-hall-fameshame/">calling out broken drivers</a>, and more! The Dolphin Blog was born!</p>
<p>However, we quickly realized that while single dedicated articles were great for big changes, Dolphin was improving <em>all the time</em> and tons of important and/or interesting changes were being overlooked simply because they weren't "big enough" to warrant a feature article. We needed something that would let us cover the continuing development of the emulator. Something like, a periodical article filled with a collection of <em>notable changes</em>, so we could <em>report</em> on the <em>progress</em> of Dolphin within a set window of time. And after much experimentation, we built a format to fulfill this role, and released the first of its kind to the world on the 30th of April, 2014.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/blog/2014/04/30/dolphin-progress-report-april-2014/">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/april-2014/Progressreportheader-april2014.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Ten years ago today, the <a href="https://dolphin-emu.org/blog/2014/04/30/dolphin-progress-report-april-2014/">first Dolphin Progress Report was launched</a>! Since then, our blog has exploded in popularity, and tens of thousands of people read every Report! And in that time, we've made <strong>79</strong> Dolphin Progress Reports, with <strong>797</strong> Notable Changes, <strong>54</strong> special sections, and <strong>301,807</strong> words! Thanks for reading!</p>
<p>As the writers of the Dolphin blog, we are proud of what we have accomplished here. We've highlighted tons of cool changes, educated our users (and ourselves!) on how Dolphin works, we've helped reel in fresh talent for the emulator, we've helped people get into universities and launch their careers, and even helped a few people meet their life partners! Progress Reports have been so impactful, that they have reached far beyond Dolphin. The once novel concept of emulator Progress Reports has become <em>a standard means of user communication throughout emulation!</em></p>
<p>But of course, ten years is a long time, and we've changed along the way and will continue to change over time. The Reports may grow or shrink, become more or less frequent, structure and style may change, and writers may come and go. And truth be told, <em>this is hard</em>, and we nearly reached the breaking point a few times along the way. But no matter what happens, as the writers of the Dolphin Blog, it is our goal and our hope that for as long there are Notable Changes being made to Dolphin, there will be Progress Reports to feature them!</p>
<p>Speaking of which, anniversary or not, this is a Progress Report. We have Notable Changes to cover! So without further ado, please enjoy the Tenth Anniversary Dolphin Progress Report, and the last Dolphin Progress Report of the 5.0 era.</p>
<p><a id="cuthere"></a></p>
<h3 id="surprise"><strong>Surprise!</strong><a class="headerlink" href="#surprise" title="Permanent link">¶</a></h3>
<p>OK, a little further ado. We have prepared a little something to celebrate this Anniversary. Enjoy!
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/2jta4PkYBRk" allowfullscreen></iframe></div><figcaption></figcaption>
</figure>
</div></p>
<p>Now back to our regularly scheduled Dolphin Progress Report.</p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-21264-core-fix-ipl-device-m_cursor-overflow-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21264/">5.0-21264 - Core: Fix IPL device m_cursor overflow</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-21264-core-fix-ipl-device-m_cursor-overflow-by-josjuice" title="Permanent link">¶</a></h4>
<p>In March 2024, <strong><a href="https://github.com/Geotale">Geotale</a></strong> found a crash in Dolphin and drilled it down to its root cause. GameCube software runs on the metal - it has absolute control of the hardware without any operating system whatsoever. In order to save console-wide settings, such as mono versus stereo audio, the GameCube stores 64 bytes of data in a battery-backed SRAM chip. Whenever a game boots, it will read the battery-backed SRAM and collect these settings without asking the user to set stereo sound over and over again. Normally, games don't try to read or write beyond the 64 byte mark, but if they for some reason were to do that, <strong><a href="https://github.com/Geotale">Geotale</a></strong> found that Dolphin would access memory beyond the end of the memory buffer it allocates for SRAM data.</p>
<p><strong><a href="https://github.com/ElectrifiedStrawberry">ElectrifiedStrawberry</a></strong> then wrote up a bug report about the issue to relay it to the Dolphin developers. Upon seeing the report, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> quickly realized that the bug might be exploitable by specifically crafted software to take control of Dolphin, and fixed the problem by adding a bounds check. As far as we know, nobody has tried to exploit this bug yet, but to be on the safe side, we decided to release an out-of-schedule Beta release just a few days later to get the fix out to users.</p>
<p>How come one missing bounds check can open up for exploits of this magnitude? If you've read about differences between different programming languages, one term you might have come across is <em>memory safety</em>. <a href="https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/">Even the White House</a> talked about it recently! In a memory safe language, trying to access memory beyond the end of a buffer or trying to access memory using a pointer that doesn't even point to valid memory to begin with is either impossible or handled in an orderly way. For instance, Java raises an <code>ArrayIndexOutOfBoundsException</code> or <code>NullPointerException</code> respectively for these situations, and the programmer can either write code to handle these exceptions in whatever way they prefer, or ignore the exceptions and have the program crash. But Dolphin is written in C++, which isn't memory safe. While nowadays there are languages that target both memory safety and good performance, like <strong><a href="https://www.rust-lang.org/">Rust</a></strong>, back when Dolphin was started in 2003, all the available memory safe languages came with notable performance penalties. And when emulating a <em>cutting-edge</em> console like the GameCube, you need all the performance you can get!</p>
<p>In C and C++, going beyond the end of a buffer or using an invalid pointer is formally <em>undefined behavior</em>, meaning literally anything could happen. In practice, usually one of two things happens. If you try to access memory that the operating system considers to be invalid, the program normally crashes. While that may be unpleasant for the user, it's safe in the sense that there's no way for an attacker to exploit the behavior. On the other hand, if you try to access memory that the operating system thinks your program should be allowed to access... then the program accesses that memory. This is exactly what happens in the bug <strong><a href="https://github.com/Geotale">Geotale</a></strong> found. If you go beyond the buffer allocated for SRAM data, you'll start accessing <strong>other parts of Dolphin's memory</strong>, which are valid memory regions but were never intended to be accessed by the emulated software! As mentioned before, we're not aware of anyone having created an exploit for this, but because Dolphin stores lots of important data after the SRAM buffer and because the emulated software can freely mix reads and writes and can skip over addresses it isn't interested in, it's likely that it would be possible to create an exploit that escapes out of the emulated console.</p>
<p>While in theory a program written in C or C++ can be memory safe if carefully written to avoid bugs, writing a large program without bugs occasionally slipping in is really, really hard, bordering on impossible. So unfortunately, there's a risk of bugs like this being found lurking when someone unearths a part of Dolphin's code that hasn't been touched in a long time. But when bugs like this are found, we take them seriously and move to fix them.</p>
<h4 id="50-21145-improve-window-presentation-at-native-resolution-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21145/">5.0-21145 - Improve window presentation at native resolution</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-21145-improve-window-presentation-at-native-resolution-by-filoppi" title="Permanent link">¶</a></h4>
<p>Last year, <strong>Cristian64</strong> noticed that there were black lines always present to the right and bottom of the image whenever Dolphin was in Windowed mode. They looked into it, and found some errors in how Dolphin's aspect ratio correction interacts with our presentation. They posted their findings in our discord, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> whipped up a fix, and that was merged in <a href="https://dolp.in/5.0-20048">5.0-20048</a>. With that, the cursed black errant pixels were removed from the edges of the screen!</p>
<p>Fast forward to today, and <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> noticed that some titles at 1x Native were softer than they should be.</p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/1xnative-crisp.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/1xnative-crisp_thumb.png" /></a>
<figcaption><a href="https://wiki.dolphin-emu.org/index.php/The_Legend_of_Zelda:_Four_Swords_Adventures">Four Swords Adventures</a> was nice and crisp at 1x Native.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/1xnative-offbyone.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/1xnative-offbyone_thumb.png" /></a>
<figcaption>But at some point, something was making it softer than it should be on the vertical axis.</figcaption>
</figure>
</div></div>
<p>Bisecting the issue, he traced it back to <a href="https://dolp.in/5.0-20048">5.0-20048</a>, his own change! It turns out that the previous presentation fixes brought our old friend <em>floating point rounding errors</em> into the party! There are many opportunities for small floating point rounding inaccuracies throughout Dolphin's presentation and aspect ratio correction code, and sometimes (depending on the game and its native resolution) these could add up to incorrectly make Dolphin think that scaling the image <em>by one pixel</em> was necessary. This was the cause of our blurring! Apparently the errant pixel borders Dolphin had previously were accidentally shielding Dolphin against this kind of error. </p>
<p>Since realistically* there should never* be a case where scaling by a single pixel is correct*, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> fixed this with a simple exception - if Dolphin decides to scale by a single pixel, pass through the unscaled image instead. Problem solved! Now <a href="https://wiki.dolphin-emu.org/index.php/The_Legend_of_Zelda:_Four_Swords_Adventures">Four Swords Adventures</a> and any other affected games are properly crisp at 1x Native once again.</p>
<p align=right><sub>* Next time on the Dolphin Progress Report...</sub></p>
<h4 id="50-21162-branchwatchdialog-a-total-replacement-for-codediffdialog-by-mitaclaw"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21162/">5.0-21162 - BranchWatchDialog: A Total Replacement for CodeDiffDialog</a></strong> by <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong><a class="headerlink" href="#50-21162-branchwatchdialog-a-total-replacement-for-codediffdialog-by-mitaclaw" title="Permanent link">¶</a></h4>
<p>While Dolphin's primary purposes of preservation and enhancement are focused on play, as an emulator we can grant DEEP access to GameCube and Wii hardware and software. Dolphin can be a powerful utility for GameCube and Wii modding and reverse engineering! This change adds a new debugging feature called the <em>Branch Watch</em>, a powerful new tool that enables better code searching than ever before!</p>
<p>Since this is a feature by developers for developers, we're not going to hold back. <strong><em>Let's get technical!</em></strong></p>
<hr />
<p>Back in April of 2022, the <a href="https://github.com/dolphin-emu/dolphin/pull/8732">Code Diff Tool was added to the Code View widget</a>. Created by <strong><a href="https://github.com/TryTwo">TryTwo</a></strong> and <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong>, the Code Diff Tool aimed to replicate a feature of the popular program Cheat Engine called "Ultimap."</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/ultimap.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/ultimap.png"></a>
<figcaption>What if you could do cheat searches, but on program flow? Ultimap is the way for Windows applications.</figcaption>
</figure>
</div>
<p>The way the former Code Diff Tool worked was by recycling a JIT profiling feature that had been inaccessible since <a href="https://dolphin-emu.org/blog/2018/07/06/dolphin-progress-report-june-2018/#50-8279-remove-dolphinwx-by-spycrab0">the removal of DolphinWX in June of 2018</a>. By differencing the number of times a block of recompiled code has run since the last time you checked, it was possible to track down sections of the original code that execute only when an action is performed in the emulated software.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/codedifftool-before.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/codedifftool-before_thumb2.png"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Unfortunately, the recycled JIT profiling feature was in no way built for what the Code Diff Tool was trying to do, leading to some limitations. The Code Diff Tool was not compatible with the Interpreter due to the Interpreter not being a JIT (obviously), nor was it compatible with the pseudo-JIT we call the Cached Interpreter due to that JIT lacking the profiling feature. It was also susceptible to JIT cache clears happening out of its control, interfering with progress in any ongoing diff. For semi-arbitrary design reasons, the Code Diff Tool required debugging symbols to operate. A diff would only include recompiled blocks of code associated with the starting address of a debugging symbol, which was problematic when the start of a function may never be recompiled as its own block due to branch following optimizations in the JIT(s). Additionally, the same segment of the original code could be recompiled multiple times, potentially resulting in misleading run counts. Finally, any changes to debugging symbols over the course of a diff would cause some diff results to be unrecognized when checking what has been run since the last check.</p>
<p>Naturally, these limitations were frustrating to work with, but it was <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong> who finally grew frustrated enough to try to do something about it. He first set off to improve the Code Diff tool, but eventually he came to the conclusion that JIT profiling data wouldn't cut it any more; Dolphin needed a new component built for the purpose. Thus, the Branch Watch was born.</p>
<p>The job of the Branch Watch is to receive information from the emulated CPU about every executed branch's origin, destination, and PowerPC instruction. It also receives implicit information about the current address translation mode as well as if a conditional branch is taking its true path or false path. After an optimized associative lookup, an entry added to or found in one of the BranchWatch's "Collection" containers will have its hit count incremented by one. From the user-facing Branch Watch Tool, it is then possible to direct the Branch Watch to perform some differencing (not unlike the former Code Diff Tool would) to collate references to the "Collection" containers' entries that meet a given criteria into a separate list - the BranchWatch's "Selection" container. This "Selection" container is what can be seen in the user-facing Branch Watch Tool. The whole process makes viewing the information sufficiently thread-safe, allowing for real-time updates (every 100 ms) to the Branch Watch Tool's interface.</p>
<p>Implementing all of this was a breeze for the interpreter, and support naturally came to the Cached Interpreter as it's barely a JIT. Support for the proper JITs was not so simple. A branch might not be recompiled at all due to the aforementioned branch following optimization. The JITs also have idle loop detection, which can cause specific branches to be recompiled differently. The x86_64 JIT also supports merging PowerPC comparison instructions and PowerPC conditional branch instructions into a single x86_64 instruction that does both. The most involved JIT-ism to support was an optimization for a looping pattern commonly seen when invalidating memory with the <code>dcbx</code> family of instructions. After relentlessly hunting down every corner case, and with <strong><a href="https://github.com/JosJuice">JosJuice</a></strong>'s invaluable guidance on writing safe recompiler code, the JITs were finally able to match the Interpreter perfectly.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/Branchwatch-after.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/Branchwatch-after.png"></a>
<figcaption>So many buttons and boxes... where to begin?</figcaption>
</figure>
</div>
<p>The new Branch Watch Tool comes with a robust set of options and features to empower code searching. It is possible to filter candidate branches by address and debugging symbol (both at the origin and destination), by true path or false path (for conditional branches), and even by 12 different instruction kinds. When replacing a tool with existing users, it's imperative to leave no feature behind. The authors of the former Code Diff Tool were given council to make sure features from the former Code Diff Tool were not forgotten, such as saving and loading in-progress searches (including an auto-save feature) and "inspecting" results by modifying instructions to stub functionality (previously done inspections are marked with a bold red font). All-in-all, the new Branch Watch Tool should be able to satisfy everyone by providing a superset of features previously available.</p>
<p>If you would like to take the new Branch Watch Tool for a spin, look for the "Branch Watch" button in the Code View widget and check out the Branch Watch Tool's help message tutorial found under Tool > Help. As an aside for non-debugging users, we assure you that this new feature should have zero performance implications for recompiled code when not in use.</p>
<h4 id="50-21164-corrected-custom-aspect-ratio-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21164/">5.0-21164 - Corrected Custom Aspect Ratio</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-21164-corrected-custom-aspect-ratio-by-filoppi" title="Permanent link">¶</a></h4>
<p>The previous Progress Report saw the introduction of the <a href="https://dolphin-emu.org/blog/2024/02/10/dolphin-progress-report-november-and-december-2023-january-2024/#50-20785-support-custom-aspect-ratios-by-filoppi">Custom Aspect Ratio setting</a>, allowing users to set any arbitrary aspect ratio they want! However, we ended that section by warning that the new Custom aspect ratio option bypassed our aspect ratio corrections, and the image would be slightly distorted basically all the time.</p>
<p>Fortunately, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> wasn't through with this feature, and the custom aspect ratio setting now has Dolphin's aspect ratio corrections! If you are using an ultra-wide screen code, you can just set a Custom Aspect Ratio to match your screen and/or code and it will just work, without need to worry about or compensate for subtle aspect ratio issues!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/aspectratiocustom.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/aspectratiocustom_thumb.png"></a>
<figcaption></figcaption>
</figure>
</div>
<p>However, if you liked the old behavior, you can use the new "Custom (Stretch)" option, which still does not have any aspect ratio correction.</p>
<h4 id="50-21194-implement-ir-passthrough-for-emulated-wii-remotes-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21194/">5.0-21194 - Implement IR passthrough for Emulated Wii Remotes</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-21194-implement-ir-passthrough-for-emulated-wii-remotes-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>Ever since <a href="https://dolphin-emu.org/blog/2020/04/05/dolphin-progress-report-february-2020/#50-11684-add-support-for-wii-remotes-over-inputcommon-by-billiard">Dolphin added its own Wii Remote driver that allowed for using the Wii Remote as a configurable controller in Dolphin</a>, one of the biggest questions has been "When is Infrared Support coming?" Dolphin's Wii Remote driver could do just about anything with the Wii Remote, include using it to simulate almost all Wii Remote functions and <em>even</em> passthrough the battery level to the emulated game. But, when it came to infrared, there was no way to properly handle it on a standard Wii Remote, and you'd be forced to use the "Real Wii Remote" setting or Bluetooth Passthrough if you wanted to use a sensor bar for infrared data.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2020-february/hybridwiimote-setting.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2020-february/hybridwiimote-setting.png"></a>
<figcaption>"Connect Wii Remotes for Emulated Controllers" uses Dolphin's very own Wii Remote driver to give the machine a mappable controller.</figcaption>
</figure>
</div>
<p>"Point Passthrough" is a new feature for Dolphin's Wii Remote driver that allows you to use a real sensor bar with the emulated Wii Remote option.</p>
<p>Some of you may be scratching your head after reading that, as there <em>is</em> a way to get the Wii Remote pointer working with Dolphin's Wii Remote driver. However, that method of getting the pointer working doesn't use infrared at all, it simply simulates the Wii Remote's pointer direction using the MotionPlus gyro (and is compatible with non-Wii Remotes that have a gyro) and uses that to <em>reasonably</em> simulate the controller's position in 3D space, from which Dolphin can calculate where the Wii Remote is pointing. This is what lets players easily play games like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> on modern controllers with gyro capabilities.</p>
<p>There are some limitations to this, and people with Wii Remote hardware have long been asking for <em>real</em> infrared support with our Wii Remote driver. Unlike real infrared, which has a physical reference in space, gyro infrared suffers from drifting and you have to manually recenter it (usually with a button combo on the controller) once in a while. In most games this isn't too bad, but if you're doing a lot of rapid movements, gyro aiming can fall apart fast! There are also some cases where the gyro simulation didn't produce accurate enough results. Here are some of the best examples where infrared support makes a big difference.</p>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; width:140px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2015-december/-trwiimote.jpg">
</div>
<h5 id="features"><strong>Features</strong><a class="headerlink" href="#features" title="Permanent link">¶</a></h5>
<ul>
<li>
<p><strong>Netplay</strong> - In netplay, only emulated controllers can be used due to the strict requirement of absolute determinism. This means you cannot fall back to using the "Real Wii Remote" <em>or</em> the Bluetooth Passthrough settings. However, since <a href="https://dolphin-emu.org/blog/2020/04/05/dolphin-progress-report-february-2020/#50-11684-add-support-for-wii-remotes-over-inputcommon-by-billiard">5.0-11684</a> physical Wii Remotes were still usable on netplay through connecting Wii Remotes for emulated controllers. A lack of infrared support meant that using a real Wii Remote on netplay had the hard requirement of having MotionPlus if you were using the pointer. This also meant any game that requires precise pointer controls would not work. We'll have some examples later.</p>
</li>
<li>
<p><strong>Savestates</strong> - Saving the state of the emulator is always a perilous task. Each of Dolphin's methods of handling Wii Remotes affects savestates differently.</p>
<ul>
<li>
<p>Bluetooth Passthrough makes things <em>very</em> difficult, because we use a <em>real hardware Bluetooth Adapter directly</em> - and we cannot save the state of that physical device. There <em>is</em> limited savestate support, but it requires the user to get the adapter to match the state it was in when the savestate was made. You could accomplish this by connecting the same Wii Remotes in the same order with the same attachments and hope that Wii Remotes are using the same reporting mode as when the savestate was made. Otherwise? It'll deadlock.</p>
</li>
<li>
<p>Real Wii Remotes <em>aren't as bad</em>, but users aren't exactly thrilled by our softlock workarounds. As mentioned above, Wii Remotes have various reporting modes, and because we're dealing with a physical device outside of the emulator, we can't simply restore it to the state it was in when the savestate was made. In order to prevent potential softlocks with Wii Remotes, Dolphin will <em>disconnect and reconnect</em> Wii Remotes on loadstate. This resets the state of the Wii Remote to ensure they match, but results in a small delay on loadstate and the game potentially complaining that the controller was disconnected. It may sound annoying, but it is also greatly increases the stability of savestates for Wii games.</p>
</li>
<li>
<p>Emulated Wii Remotes have none of these problems, as the thing the game is directly communicating with is within Dolphin's ecosystem. This means that Dolphin can just restore the state of the emulated Wii Remote, without the need for any workarounds or mitigations for softlocks. This is because the "physical" controller just communicating through our driver to our emulated controller. With the new Point (Passthrough) feature, you can get the full benefits of a real sensor bar and savestates all at once. Perfect for speedrun practice or getting past a difficult pointer puzzle.</p>
</li>
</ul>
</li>
</ul>
<h5 id="game-specific"><strong>Game Specific</strong><a class="headerlink" href="#game-specific" title="Permanent link">¶</a></h5>
<ul>
<li>
<p><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Super_Paper_Mario">Super Paper Mario</a></strong> - This game in particular asks a lot of the Pointer, having you swap between pointing at the screen and pointing off screen. Gyro Point struggles with pointing far off screen, so oftentimes users would have to map the hotkey "hide pointer" in order to get the game to behave in a reasonable manner. With a real sensor bar, it just works.</p>
</li>
<li>
<p><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">The Legend of Zelda: Skyward Sword</a></strong> - This is a rather funny case that really messes with our Gyro Pointer. Skyward Sword <em>already uses the gyro for its pointer</em>, using infrared only for a reference point and for active recalibration to combat drift during play. This means when Dolphin is using the gyro to generate the pointer position, <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">Skyward Sword</a> is using our emulated point in space to correct for gyro drift, yet our emulated point in space is from the same gyro that it is trying to recalibrate. <em>Calibrating a gyro to itself</em> results in a lot of wonky pointer behavior, but users have made it work with complex control schemes and copious recentering. Using a real sensor bar with emulated Wii Remotes gets the game behaving just as it does on the Real Wii Remote options.</p>
</li>
<li>
<p><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Category:Trauma_Center_(Series)">Trauma Center</a></strong>, <strong><a href="https://wiki.dolphin-emu.org/index.php?title=Another_Code:_R_-_A_Journey_into_Lost_Memories">Another Code R</a></strong>, <strong><a href="https://wiki.dolphin-emu.org/index.php?title=WarioWare:_Smooth_Moves">WarioWare: Smooth Moves</a></strong> and other precision pointer games - Unlike the other situations, there wasn't an easy workaround for these games when using Gyro Point. These games have various levels where you're required to push the Wii Remote toward the screen or pull it away from the screen. While games can use the accelerometer for this, they <em>also</em> use the sensor bar's two clusters of lights as a reference point. When you push the Wii Remote closer, the two clusters separate more, and that's how the game can tell the Wii Remote is closer to the screen. Gyro Point has <em>no way of handling this currently</em>, and the only way to make this work without a real sensor bar is to map a bunch of emulated movements to the controller. While this is possible, you get a very different experience and using a real sensor bar keeps it simple and authentic.</p>
</li>
</ul>
<h5 id="limitations"><strong>Limitations</strong><a class="headerlink" href="#limitations" title="Permanent link">¶</a></h5>
<p>With this major update to the emulated Wii Remotes, the bridge between Real Wii Remotes and Emulated Wii Remotes shrinks further. Considering that we still have <em>three</em> different ways of connecting Wii Remotes, one may question when it'd be time to simplify things. Unfortunately, Emulated Wii Remotes still have a few shortcomings that make Real Wii Remotes a necessary option.</p>
<p>While things like battery life work, unfortunately physical Wii Remote Speakers aren't supported on the Emulated Wii Remote. Many users (and developers) may argue speaker data doesn't work properly even on <em>Real Wii Remote</em>, but one feature that is definitely missing on Emulated Wii Remotes is the Wii Remote Eeprom. This Eeprom could store a small amount of data, usually for Miis. Real Wii Remote <em>does</em> support this, but this might be very complicated to support within our driver.</p>
<p>If you want to try out infrared support, it's automatically mapped correctly when loading Dolphin's default Wii Remote profile. To try it out, go to the Motion Input tab and disable the standard "Point" setting that uses the Gyro, and enable Point (Passthrough). That will allow you to use your real sensor bar.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/irpassthroughsetting.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/irpassthroughsetting_thumb.png"></a>
<figcaption>The settings may look complicated, but Dolphin will set everything up itself to work with your Wii Remote.</figcaption>
</figure>
</div>
<h4 id="hdr-enhancements-50-19931-add-autohdr-post-process-shader-by-filoppi-and-50-21232-add-hdr-to-metal-perceptual-hdr-by-samb"><strong>HDR Enhancements</strong>: <a href="https://dolp.in/5.0-19931">5.0-19931 - Add AutoHDR post process shader</a> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> and <a href="https://dolphin-emu.org/download/dev/master/5.0-21232/">5.0-21232 - Add HDR to Metal + Perceptual HDR</a> by <strong><a href="https://github.com/Sam-Belliveau">samb</a></strong><a class="headerlink" href="#hdr-enhancements-50-19931-add-autohdr-post-process-shader-by-filoppi-and-50-21232-add-hdr-to-metal-perceptual-hdr-by-samb" title="Permanent link">¶</a></h4>
<p><br/>
<center><p style="max-width:80%;"><em>HDR is currently very challenging to demonstrate in browsers. Frustrated, the blog authors resorted to <span style="white-space: nowrap;">old memes</span>. We apologize in advance.</em></p></center>
<br/><br/></p>
<p>Several months ago, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong>'s <strong><a href="https://dolphin-emu.org/blog/2023/08/13/dolphin-progress-report-may-june-and-july-2023/#50-19716-support-accurate-ntscpal-color-spaces-by-filoppi">5.0-19716 - Support Accurate NTSC/PAL Color Spaces</a></strong> was merged, which gave Dolphin the ability to properly emulate the gamma and color space of the GameCube and Wii. The difference isn't significant, and since it results in slightly reduced brightness and saturation it could be considered undesirable, hence it being off by default. But more accuracy is more accuracy, and even subtle improvements are important for a mature emulator such as Dolphin!</p>
<p>However, to facilitate accurate gamma and color spaces, Dolphin needed more control over the host display. Ironically, this required Dolphin to support <strong>HDR</strong>. High Dynamic Range is typically used to display a <em>larger</em> color space, yet this feature was using it to <em>limit</em> the color space to accurate levels. Regardless of the reasoning, this change added the <em>HDR Post-Processing</em> feature to Dolphin.</p>
<p>What happened next was easy to see coming.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/onedoesnot.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/onedoesnot_thumb.avif" alt="onedoesnot_thumb.avif"></a>
<figcaption></figcaption>
</figure>
</div>
<p>In <strong><a href="https://dolp.in/5.0-19931">5.0-19928</a></strong>, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> added an HDR enhancement shader to Dolphin! A "slimmed down port" of <strong><a href="https://github.com/Filoppi">Filoppi</a></strong>'s prior <a href="https://github.com/Filoppi/PumboAutoHDR">Reshade shader</a>, our AutoHDR shader is designed to be <em>additive</em> - it expands highlights into HDR luminance while leaving the rest of the image unmodified. This gives games a bit more pop while still mostly maintaining their original SDR look.</p>
<p>AutoHDR has several options to allow users to dial in the experience. </p>
<ul>
<li>Shoulder Pow - Modulates the Auto HDR highlights curve. Low values bleed a bit into midtones to give a gentle, soft edge around the HDRified highlights, while high values only brighten the hightlights for pin sharp edges.</li>
<li>Shoulder Start Alpha - Determines how bright the source SDR color needs to be before it can be used to generate fake HDR highlights</li>
<li>HDR Display Max Nits - Sets the maximum brightness of the HDR highlights</li>
</ul>
<p>If you want to closely follow the original look of the game but add a little HDR pop, AutoHDR is for you! Do note however that GameCube and Wii games have <em>very primitive</em> lighting models, more primitive than what AutoHDR was originally designed for. More often than not, our AutoHDR shader will benefit from tweaking for each individual game's lighting quirks. </p>
<p>For a bit more pop, <strong><a href="https://github.com/Sam-Belliveau">samb</a></strong>'s <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21232/">5.0-21232</a></strong> brings PerceptualHDR, a much more HDRy enhancement option! PerceptualHDR uses a logarithmic approach to its <a href="https://en.wikipedia.org/wiki/Tone_mapping">inverse tonemapping</a> curve. This results in brightness and saturation scaling that looks more "natural" to the eye, though less accurate. It also has the side effect of making it very tolerant of the poor lighting models of GameCube and Wii titles, and reducing the need for customization! It also has higher saturation and brightness overall, with a more "HDR look". However, PerceptualHDR significantly changes the look of the game, and is definitely not for those pursuing accuracy.</p>
<p>The two shaders have very different looks and goals, neither one is "better" than the other. AutoHDR is very conservative, trying to enhance but respect the original look. Plus it is very customizable, allowing it to adapt to any game's lighting. Meanwhile, PerceptualHDR throws out the original look for all the HDR pop it can offer! While it is generally more tolerant, it is also not customizable (outside of amplification), so if a game doesn't work well with it you're basically out of luck, but AutoHDR can be adjusted to match. Whichever shader you use is up to you and what you'd like out of an HDR enhancement!</p>
<p>To demonstrate these differences, we're going to need to go into the <em>High Dynamic Range!</em></p>
<h5 id="hdr-block"><strong>HDR Block</strong><a class="headerlink" href="#hdr-block" title="Permanent link">¶</a></h5>
<p>Click the image below to enter the HDR Block, an addendum article where we use cutting edge browser features to show you actual HDR comparisons rendered in your very own browser!</p>
<p>You'll need an HDR display to see the differences, so if you are using an SDR display, feel free to skip. </p>
<p><br/><br/></p>
<div class="container" style="padding:2em; max-width: 100%; margin: auto; margin-bottom: 1em; border: 1rem dotted #808080;">
<center><strong>CLICK THE IMAGE BELOW TO ENTER THE WORLD OF</strong></center>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/blog/2024/04/30/dolphin-progress-report-addendum-hdr-block/">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrmindblown.webm" alt="hdrmindblown.webm (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrmindblown.mp4" alt="hdrmindblown.mp4 (h.264)" type="video/mp4"/>
</video></div></a>
<figcaption></figcaption>
</figure>
</div>
</div>
<p><span id="endhdrblock"></span></p>
<p><br/></p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/myeyes.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/myeyes.jpg"></a>
<figcaption>Welcome back to the land of SDR! Take a moment to readjust your eyes if you need to. Maybe use some eyedrops.</figcaption>
</figure>
</div>
<p>Now that we have established the differences and options, it's time for us to <em>temper your expectations.</em></p>
<p>The GameCube and Wii are entirely SDR consoles with very basic lighting models that were designed for small and dim displays. They are absolutely not designed for HDR. By dragging them kicking and screaming into high dynamic range, we are putting these games that have no idea what HDR is in charge of an absurdly powerful display technology.</p>
<p><em>Our HDR enhancements are not magic. Expect quirks and problems</em>.</p>
<p>For example, there is no concept of "paper-white" in these games. While our HDR enhancement shaders differ in their approach and the inverse tone mapping of middle values, the extremes are the same - complete black in SDR space will be complete black in HDR space, and complete white in SDR space will be the maximum HDR output of the shader or your display. If you crank your display brightness to the max, turn on an enhancement shader and crank it to the max, and launch a game that has an entirely white screen, you could be bombarded with thousands of nits of brightness. And guess what console starts <em>every single game</em> with a <strong>solid white screen</strong> - the Nintendo Wii!</p>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/flashbang.webm">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/flashbang.webm" alt="flashbang.webm (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/flashbang.mp4" alt="flashbang.mp4 (h.264) type="video/mp4"/>
</video></div></a>
<figcaption>When MayImilae first tested PerceptualHDR, she maxed out her display brightness and the amplification setting, then launched a Wii title. <br/> This was her experience.</figcaption>
</figure>
</div>
<p>You can easily flashbang yourself with these features, so use this power responsibly.</p>
<p><strong>Furthermore</strong>, if you are using an HDR display without calibrating it, any time you view SDR content <em>you are already experiencing inverse tone mapping</em>. Most current generation displays, televisions and phones especially, don't care about accurate SDR recreation and by default boost saturation and brightness way beyond SDR spec. They are <em>already</em> turning SDR content into HDR content <em>by default!</em></p>
<p>As such, you may turn on AutoHDR or PerceptualHDR and see a dimmer and duller appearance than you had without any HDR enhancements. If this occurs, our HDR enhancements' inverse tone mapping is more conservative than what you are used to!</p>
<p>The world of HDR is a varied and wild place. With "HDR" spanning everything from 300 nits peak brightness to 10,000, and from 8-bit dithered 50% DCI-P3 to 12-bit 100% Rec2020 reference monsters, HDR can be very different things depending on your display. Our HDR enhancements add to your existing tools for customizing inverse tone mapping on your HDR display, and you will need to use <em>all of the tools available to you</em> for best results. HDR is like that.</p>
<p>That being said, if you are ok with experimenting, HDR has a lot to offer as an enhancement. When everything lines up, these HDR enhancements can improve the game's visuals on a scale similar to raising internal resolution! Games like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Sonic_Colors">Sonic Colors</a> look <em>great</em> with these enhancements! HDR is messy and complicated and a pain, but when everything lines up and it works correctly, there is nothing quite like it.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/rainboom.webm">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/rainboom.webm" alt="rainboom.webm (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/rainboom.mp4" alt="rainboom.mp4 (h.264) type="video/mp4"/>
</video></div></a>
<figcaption></figcaption>
</figure>
</div>
<p>While our Post-Processing shaders will appear on all platforms, our HDR Post-Processing feature is currently only available in our desktop Qt interface, and requires HDR to work. Functionally, that means that currently our HDR enhancements can only be used on Windows, macOS, and <em>a tiny subset of Linux</em> (that includes the Steam Deck OLED).</p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrhowtouse-1.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrhowtouse-1_thumb.png" /></a>
<figcaption>To use these shaders, have an HDR screen and enable HDR. Then turn on HDR Post-Processing...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrhowtouse-2.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/hdrhowtouse-2_thumb.png" /></a>
<figcaption>And select an HDR Post-Processing Shader!</figcaption>
</figure>
</div></div>
<p>HDR Post-Processing is currently not available on Android.</p>
<h4 id="50-21253-implement-modem-adapter-by-fuzziqersoftware"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21253/">5.0-21253 - Implement Modem Adapter</a></strong> by <strong><a href="https://github.com/fuzziqersoftware">fuzziqersoftware</a></strong><a class="headerlink" href="#50-21253-implement-modem-adapter-by-fuzziqersoftware" title="Permanent link">¶</a></h4>
<p>The GameCube was released in the early days of the ubiquitous internet. In 2001, dial-up was still a normal way to go online, but broadband was increasingly spreading its tendrils throughout the globe, and our chronically-online doom-scrolling future was already well on its way to consuming us all. To facilitate experimenting with this terrifying new frontier, the GameCube had an accessory port on the bottom that could fit the GameCube BroadBand Adapter (BBA), a 10/100mbps ethernet adapter that allowed the GameCube entry to the <em>information superhighway!</em></p>
<div class="media-block narrower">
<figure>
<a href="https://csassets.nintendo.com/noaext/image/private/t_KA_PDF/broadband_english?_a=DATC1RAAZAA0">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/bbainsert.png"></a>
<figcaption>The <a href="https://csassets.nintendo.com/noaext/image/private/t_KA_PDF/broadband_english?_a=DATC1RAAZAA0">BroadBand Adapter Instruction Booklet</a> walked users through the arduous installation process.</figcaption>
</figure>
</div>
<p>Since it was an addon accessory for an experimental feature, <a href="https://wiki.dolphin-emu.org/index.php?title=Broadband_Adapter">it saw limited support in the GameCube lineup</a>. Some games used the BBA for its LAN mode, allowing players to connect multiple GameCubes together locally for crazy high player numbers while avoiding that whole scary internet thing. But a select few games dove right into the Online mode, <em>requiring</em> an internet adapter and an internet connection! The iconic <em>Phantasy Star Online</em> MMO franchise survived the fall of the Dreamcast this way.</p>
<p>However, while the BBA is reasonably well known amoungst GameCube enthusiasts, there was <em>another</em> accessory that could go into that port - The GameCube Modem Adapter. This was a 56kbps <em>dial-up modem</em> alternative to the BBA. While it lacked the LAN mode, the Modem Adapter granted more or less the same online features as the BroadBand Adapter, just... worse. All online-mode games that supported the BroadBand Adapter also supported the Modem Adapter, so users were expected to just pick the internet adapter that matched their connection and access the same online content. Though, with <em>some mild variation</em> in user experience.</p>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:16%; min-width:100px; float:right; text-align:center;">
<a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II_Trial_Edition">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/PSOTrialBox.jpg">
</a>
</div>
<p><em>Except,</em> for one game. There is one game that <strong>requires the GameCube Modem Adapter</strong>, and does not work with the BroadBand Adapter! This game is <a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II_Trial_Edition">Phantasy Star Online Episode I & II Trial Edition</a>. The final version of PSO I & II supports the BBA, but its Trial <em>does not</em>. Dolphin only supported the BroadBand Adapter, so <em>for the entirety of Dolphin's existence</em>, PSO I & II Trial Edition required game modification to be playable in Dolphin!</p>
<p>This change resolves that. <a href="https://github.com/fuzziqersoftware">fuzziqersoftware</a>, a developer behind PSO reverse engineering tools and PSO custom servers, has implemented tapserver-based Modem Adapter emulation in Dolphin! By combining modem adapter emulation with a compatible custom server, <a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II_Trial_Edition">Phantasy Star Online Episode I & II Trial Edition</a> is playable in Dolphin for the very first time without action replay codes or game patches!</p>
<p>Not only is this a win for preservation of this interesting era of GameCube hardware and PSO development, it's also a mark off the very short list of GameCube games that cannot be played in Dolphin without modification.</p>
<h4 id="50-21345-jitcache-software-profiling-restoration-by-mitaclaw"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-21345/">5.0-21345 - JitCache: Software Profiling Restoration</a></strong> by <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong><a class="headerlink" href="#50-21345-jitcache-software-profiling-restoration-by-mitaclaw" title="Permanent link">¶</a></h4>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/missing.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/missing.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>As was mentioned <a href="#50-21162-branchwatchdialog-a-total-replacement-for-codediffdialog-by-mitaclaw">earlier in this Progress Report</a>, software JIT profiling is one of a small group of debug features left inaccessible by the <a href="https://blog.dolphin-emu.org/blog/2018/05/02/legend-dolphin-lens-between-worlds/">transition from DolphinWX to DolphinQt</a>. The underlying feature had a partial return as the component powering the Code Diff Tool, before that tool was replaced with the <em>Branch Watch Tool</em> shown previously. Following this, <strong><a href="https://github.com/mitaclaw">mitaclaw</a></strong> decided he must restore software JIT profiling to its former glory - it's the least he could do after leaving it abandoned once again. It's unlikely this feature will have many users, even among Dolphin's developers, but it's good to see an old feature get rekindled rather than extinguished.</p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/jitprofilingnew.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/jitprofilingnew_thumb.png" /></a>
<figcaption>Here it is resurrected in DolphinQt.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/jitprofiling-android.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/jitprofiling-android_thumb.png" /></a>
<figcaption>And for the first time, Android!</figcaption>
</figure>
</div></div>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2024-02-01&to=2024-04-30&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-21090/">5.0-21090</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-21460/">5.0-21460</a>! </p>
<h3 id="social-media-update"><strong>Social Media Update</strong><a class="headerlink" href="#social-media-update" title="Permanent link">¶</a></h3>
<p>We are now maintaining three social media presences: <a href="https://social.dolphin-emu.org/@dolphin">Mastodon</a>, <a href="https://bsky.app/profile/dolphin-emu.org">Bluesky</a>, and <a href="https://twitter.com/Dolphin_Emu">Twitter</a>! </p>
<p>The content on these accounts will largely mirror each other. Our <a href="https://social.dolphin-emu.org/@dolphin">Mastodon</a> is our flagship social media presence, it is strongly under our control (literally living on our servers) and truest to our open source philosophy. <a href="https://twitter.com/Dolphin_Emu">Twitter</a> is our oldest account, with over a decade of history! <em>Hopefully that will continue.</em> And finally, our <a href="https://bsky.app/profile/dolphin-emu.org">Bluesky</a> is brand new! Feel free to follow us on whichever you'd like!</p>
<h3 id="why-dolphin-isnt-coming-to-the-ios-app-store"><strong>Why Dolphin Isn’t Coming to the iOS App Store</strong><a class="headerlink" href="#why-dolphin-isnt-coming-to-the-ios-app-store" title="Permanent link">¶</a></h3>
<p>In early April, Apple shocked the emulation community by updating their App Store Guidelines to permit retro game console emulators on the App Store. While there was some initial debate over whether the new guidelines only permitted "officially-developed" emulators, community-made emulators soon began appearing on the App Store. The floodgates were open.</p>
<p>Ever since this happened, one question we've been frequently asked is "<em>when will Dolphin come to the App Store?</em>"</p>
<p><strong>Unfortunately, due to other restrictions set by Apple, we are not able to release Dolphin on the App Store. This also applies to app marketplaces in Europe, like AltStore PAL.</strong></p>
<p>The GameCube and Wii both use a PowerPC-based CPU, while most modern devices use x86-64 (Intel & AMD) and AArch64 (ARM) based processors. To be able to run GameCube and Wii machine code, Dolphin uses a Just-in-Time (JIT) recompiler to translate it into code that our modern CPUs can understand. This works well on all of our supported platforms.</p>
<p>There's just one problem: <strong>Apple does not allow third-party apps to use JIT recompilers on iOS and iPadOS.</strong></p>
<p>Dolphin does have both the Interpreter and Cached Interpreter, which are JIT-less methods for emulating the CPU. However, <em>they are many times slower than Dolphin's JITs, making them unusable for actually playing games</em>.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls muted playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/JITvsInterpreter.webm" alt="JITvsInterpreter.webm (AV1)" type="video/webm" codecs="av01.0.00M.08, opus"/>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2024-april/JITvsInterpreter.mp4" alt="JITvsInterpreter.mp4 (h.264) type="video/mp4"/>
</video></div></a>
<figcaption>Click to see our Cached Interpreter race our JIT on an iPhone 15 Pro Max!</br><sub>For longer versions of these videos with sound: <a href="https://youtu.be/aM_jIDCSMcc">Interpreter</a>, <a href="https://youtu.be/QTg-q1s_awY">JIT</a></sub></figcaption>
</figure>
</div>
<p>There is one very narrow exception to the "no JIT" rule on iOS - alternative web browsers in Europe. This is because many web browsing engines utilize JITs to speed up JavaScript execution. As allowing alternative browsers is required in Europe under the Digital Markets Act (DMA), Apple gave these apps a special exemption in iOS 17.4. However, Dolphin is not a web browser, and Apple has <a href="https://developer.apple.com/support/alternative-browser-engines/#web-entitlement">very specific requirements that they use to check whether an app is really a web browser or not</a>. JITs in web browsers are also subject to additional security requirements, such as <a href="https://developer.apple.com/documentation/browserenginekit/designing-your-browser-architecture">separating the JIT into its own isolated and locked down process</a>. This is extremely problematic for Dolphin, which expects everything to be included in one process. While retooling Dolphin to work within these constraints is <em>theoretically possible</em>, it would require a large architectural redesign and a significant amount of effort just for one platform. Apple may also just choose to ban our app in the end anyways for pretending to be a web browser.</p>
<p>After reading about web browsers being able to use JIT recompilers, you may be wondering "<em>why not just make a version of Dolphin that runs in a web browser?</em>" Well, easier said than done! To make a usable web version of Dolphin, someone would need to write a brand new JIT targeting <a href="https://webassembly.org/">WebAssembly</a> <em>and</em> add <a href="https://www.khronos.org/webgl/">WebGL</a> support to our OpenGL video backend. While we don't want to say that a web version of Dolphin is completely impossible, working on one just isn't in any of our plans at the moment.</p>
<p>Another suggestion we've received is that we should use ahead-of-time compilation (AOT) on these platforms. This would involve re-compiling all of a game's code to AArch64 in advance, which lets us avoid having to generate the code on the actual device with a JIT. Unfortunately, having to rely solely on AOT compilation would likely cause several compatibility problems. These issues largely stem from the fact that games are <em>freely able to self-modify their code</em>. Some EA games, for example, store their code compressed on disc, and then decompress it at runtime. Other games are even able to <em>generate entirely new code with a JIT of their own</em>! The official Nintendo 64 emulator used in Virtual Console releases is one notable example of this, as it includes a JIT for emulation of the Nintendo 64's MIPS-based CPU. Since we aren't able to know with certainty what code will be executed before the game runs, it isn't feasible to use an AOT recompiler as the sole method for emulating the CPU.</p>
<p>As such, barring Apple having another sudden change of heart or some other miracle, an iOS App Store release is off the table for Dolphin.</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: November and December 2023, January 2024
2024-02-10T04:11:38+00:002024-02-11T07:03:49.869973+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2024/02/10/dolphin-progress-report-november-and-december-2023-january-2024/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/progressreportheader-january2024.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/progressreportheader-january2024mini.jpg" />
</header>
<p>With the conclusion of the holiday season, it's time for us at the blog to get back to work. And this time around, we have a smattering of changes covering just about everything you could imagine. For those looking to enjoy some of the latest homebrew with DSP-HLE, Dolphin now has support for the latest homebrew microcodes! For retail games, we also have a minor update to the Zelda-HLE microcode to fix a missing effect that's long overdue.</p>
<p>In some more important news, for those of you having disk space issues when running Dolphin on Windows since the last beta, a fix is now available. And for those looking for the clearest picture possible, Dolphin's mipmap heuristic has been backed down to allow for higher resolution mipmaps across more textures. And of course, if you're wanting that <em>perfect</em> image, Custom Aspect Ratios will allow for easier use of ultra-widescreen hacks and more!</p>
<p>Add to all of that a huge bugfix for <em>older</em> revision Steam Decks, another chapter in the Bounding Box saga, seeing a classic in an all new way, and <em>yet another chapter</em> in broken GPU drivers, and you've got yourself a Dolphin Progress Report.</p>
<p>Enjoy.</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-20353-dsphle-support-2023-libaesnd-ucode-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20353/">5.0-20353 - DSPHLE: Support 2023 libaesnd uCode</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-20353-dsphle-support-2023-libaesnd-ucode-by-pokechu22" title="Permanent link">¶</a></h4>
<p><em>libasnd</em> and <em>libaesnd</em> are open source DSP microcodes for the GameCube and Wii, and are the standard DSP microcodes used by homebrew. When <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> <a href="https://dolphin-emu.org/blog/2022/07/07/dolphin-progress-report-may-and-june-2022/#50-16730-add-hle-version-of-libasnd-by-pokechu22">reimplemented the libasnd</a> <a href="https://dolphin-emu.org/blog/2022/09/13/dolphin-progress-report-july-and-august-2022/#50-16991-dsp-hle-implement-support-for-libaesnd-microcode-by-pokechu22">and libaesnd microcodes</a> in DSP-HLE back in 2022, we knew that if they were to ever be updated, the new versions would not automatically work in DSP-HLE. This is due to how DSP-HLE itself works - rather than emulating the DSP hardware and running the microcodes directly, DSP-HLE runs reimplementations of the microcodes themselves, made in C++. Thanks to a <a href="https://dolphin-emu.org/blog/2014/11/12/the-rise-of-hle-audio/">tremendous amount</a> <a href="https://dolphin-emu.org/blog/2015/08/19/new-era-hle-audio/">of work</a>, this is just as accurate as the hardware-emulating DSP-LLE, yet <em>many times faster</em>. However, since DSP-HLE doesn't actually run the microcodes, Dolphin checks the hash of the microcode in the game to know what to use. If the hash of the game's microcode doesn't match any of the reimplemented microcodes, DSP-HLE will fallback to the reimplemented AX microcode, and in the case of homebrew <em>probably not emit any sound at all.</em></p>
<p>This occurred in 2023, when libaesnd saw an update to address a few minor issues. These small fixes meant a new microcode version with a brand new hash which Dolphin did not recognize, resulting in audio not working under DSP-HLE in titles that used the new version of libaesnd. Specifically, it was the latest versions of the <a href="https://github.com/Mefiresu/RSDKv5-Decompilation">Sonic Mania Wii decompilation port</a> that brought this update to our attention. As a fairly new project in active development, they are consistently updating their microcodes, and they are the first software we are aware of to use the new updates.</p>
<p>Thankfully, the updates to libaesnd were relatively minor and <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> mostly just had to document what was changed and add the 2023 hash to the libaesnd code paths in DSP-HLE. With that, users can enjoy Mania's Chemical Plant Zone theme in DSP-HLE once again!</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/sLlOtAYekuQ" allowfullscreen></iframe></div>
<figcaption>Sonic Mania running in Dolphin, with sound in DSP-HLE!</figcaption>
</figure>
</div>
<h4 id="50-20880-zelda-hle-fix-reverb-volume-factor-by-flacs"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20880/">5.0-20880 - Zelda-HLE: Fix Reverb Volume Factor</a></strong> by <strong><a href="https://github.com/Tilka">flacs</a></strong><a class="headerlink" href="#50-20880-zelda-hle-fix-reverb-volume-factor-by-flacs" title="Permanent link">¶</a></h4>
<p>Sticking to the theme of DSP-HLE, we have a microfix from longtime contributor <strong><a href="https://github.com/Tilka">flacs</a></strong>. This in particular targets the missing reverb effects noticed in <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart Double Dash!!</a>. These effects were noted to be broken <a href="https://bugs.dolphin-emu.org/issues/8034">way back in 2015</a> but was marked as low priority amidst a massive Zelda-HLE rewrite. When the rewrite was complete, this bug remained as a minor issue.</p>
<p><strong><a href="https://github.com/Tilka">flacs</a></strong> returned and has been hammering down bugs in all quadrants. This one turned out to be rather simple. The reverb volume was erroneously being multiplied by current volume twice, resulting in the effect becoming incredibly quiet. While the bug reporters originally thought the reverb was missing, they actually just weren't listening hard enough for it!</p>
<p>Once this oversight was fixed, the effect started working as intended.</p>
<h4 id="50-20517-implement-send-mail-by-sketch"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20517/">5.0-20517 - Implement Send Mail</a></strong> by <strong><a href="https://github.com/noahpistilli">Sketch</a></strong><a class="headerlink" href="#50-20517-implement-send-mail-by-sketch" title="Permanent link">¶</a></h4>
<p>Have you ever had an important work email that you needed to send <em>right now</em> but all you had at your disposal was an emulated Wii? This is a position I think we can say every single one of us have been at some point, but unfortunately in the past there was nothing you could do about it.</p>
<p>Thankfully, <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> took note of the plight of our users and has been slowly working through the Wii Mail system, and while it's not entirely complete, those registered with the WiiLink service can send messages to other Wiis and even emails directly from Dolphin!</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/IMPORTANTWORKEMAIL.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/IMPORTANTWORKEMAIL_thumb.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>To get to this point, it's been a rather long ride, and <em><a href="https://dolphin-emu.org/blog/2022/12/21/dolphin-progress-report-september-october-november-2022/#50-17613-implement-missing-features-for-wiiconnect24-support-by-noahpistilli">a ton of</a> <a href="https://dolphin-emu.org/blog/2023/08/13/dolphin-progress-report-may-june-and-july-2023/#50-19274-add-wiiconnect24-support-via-wiilink-by-sketch">the legwork</a></em> was already done for WiiConnect24 emulation. Soon, we're hoping to have full parity between using WiiLink on a console and Dolphin, though there are still some missing features on the Dolphin side of things.</p>
<h4 id="50-20589-rewrite-lazymemoryregion-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20589/">5.0-20589 - Rewrite LazyMemoryRegion</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-20589-rewrite-lazymemoryregion-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:20%; min-width:200px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/WindowsLogo1991.svg">
</div>
<p>Last Progress Report, we described a performance optimization that had the annoying side effect of <a href="https://dolphin-emu.org/blog/2023/11/25/dolphin-progress-report-august-september-and-october-2023/#50-19415-and-50-20126-improve-jit-block-lookup-performance-by-krnlyng">taking up 32 GiB of disk space on Windows</a>. Now <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> has rewritten the code used on Windows to avoid side effects of this kind.</p>
<p>To summarize the problem from last time: Dolphin needed a 32 GiB memory allocation to efficiently keep track of where recompiled code was located. Most of it didn't need to be backed by real memory, but whenever Dolphin wanted to access a particular location, real memory had to be allocated on the fly so the access wouldn't fail. In the solution described in the previous Progress Report, we handled this by asking the operating system to allocate pages for us as needed. This worked well on almost every OS, but on Windows we ran into the problem that the system would force the page file to grow to match our huge 32 GiB allocation, in case we try to access all 32 GiB.</p>
<p>With the new solution, we're handling things more manually on Windows. <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong>'s initial idea was to mimic what the operating system was doing by setting up a signal handler that runs when Dolphin tries to access an address that isn't backed by real memory – something Dolphin is already doing for the tried and tested <a href="https://dolphin-emu.org/blog/2016/09/06/booting-the-final-gc-game/">fastmem</a> optimization – and then allocating some real memory when the signal handler runs. But because Dolphin only writes to the 32 GiB region from two pieces of code, both of which run relatively infrequently, Progress Report reader <strong><a href="https://github.com/PJB3005">PJB3005</a></strong> was able to come up with a simpler solution that <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> then implemented. Instead of using a signal handler, Dolphin now manually checks if it needs to allocate any real memory before it writes to the 32 GiB region. Parts of the 32 GiB region that aren't yet backed by real memory are pointed to a read-only page filled with zeroes, so that nothing will go wrong if Dolphin tries to read from a location that hasn't been written to.</p>
<p>Now Dolphin users on Windows are able to benefit from the JIT Block Lookup performance optimization without worrying about Windows making their page file balloon. Issues like not being able to download large files while Dolphin is running will no longer occur.</p>
<p>On operating systems other than Windows, Dolphin is still using the old approach where the OS allocates real memory on the fly, since we've only seen problems with that approach on Windows.</p>
<h4 id="50-20745-disable-arbitrary-mipmap-detection-by-default-by-iwubcode"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20745/">5.0-20745 - Disable Arbitrary Mipmap Detection by Default</a></strong> by <strong><a href="https://github.com/iwubcode">iwubcode</a></strong><a class="headerlink" href="#50-20745-disable-arbitrary-mipmap-detection-by-default-by-iwubcode" title="Permanent link">¶</a></h4>
<p>As part of the essential hack that is raising Internal Resolution, Dolphin adjusts the <a href="https://en.wikipedia.org/wiki/Mipmap">mipmap</a> level of textures. Mipmapping is the process of swapping to lower resolution versions of textures if they would appear too small in the final image. This is an old graphics staple - using maximum resolution textures everywhere leads to severe aliasing and moire on distant textures and textures at oblique angles. However, this is resolution dependent, and mipmap targets set for 480p will be intensely blurry at 4K. So Dolphin adjusts the mipmap levels to match the increased Internal Resolution, significantly improving overall texture quality of the final image.</p>
<p>However, some GameCube and Wii titles use mipmap shenanigans for effects, and by changing the mipmap levels, we were breaking these tricks. To have our high resolution cake and eat it too, <a href="https://dolphin-emu.org/blog/2017/11/03/dolphin-progress-report-october-2017/#50-5745-add-heuristic-for-detecting-custom-mipmaps-by-tomcc">in 2017 we added <em>Arbitrary Mipmap Detection</em></a>, a heuristic that attempts to detect mipmap mischief and drop to a more accurate mipmap implementation for only the textures involved in these effects. The result is that the specific textures used for these effects will be blurrier, but as it is correcting broken effects and should only affect the specific textures involved, it's a win win. Theoretically. </p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-october/galaxy2-oldnative.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-october/galaxy2-oldnative_thumb.jpg" /></a>
<figcaption>Galaxy 2 reads the mipmap level to control this fog effect in the sky. </figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-october/galaxy2-oldhighres.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-october/galaxy2-oldhighres_thumb.jpg" /></a>
<figcaption>Without Arbitrary Mipmap Detection, the fog is gone and the clouds repeat infinitely.</figcaption>
</figure>
</div></div>
<p>Unfortunately, this heuristic has proven to be problematic. It often has false positives, incorrectly detecting mipmaps as being used for effects and needlessly using blurrier versions.</p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2018-june/arcadiamipmaps-broken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2018-june/arcadiamipmaps-broken_thumb.jpg" /></a>
<figcaption>With Arbitrary Mipmaps, the back of the ship in <a href="https://wiki.dolphin-emu.org/index.php?title=Skies_of_Arcadia_Legends">Skies of Arcadia</a> is much blurrier than it should be.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2018-june/arcadiamipmaps-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2018-june/arcadiamipmaps-working_thumb.jpg" /></a>
<figcaption>Without Arbitrary Mipmap Detection, the ship is considerably crisper.</figcaption>
</figure>
</div></div>
<p>To account for this, in 2018 we added the <em>Arbitrary Mipmap Detection</em> toggle. On by default, this option gave anyone who was having trouble with the heuristic the ability to simply turn it off, and avoid any problems it may cause. It was a simple solution, and it has remained ever since.</p>
<p>Fast forward to late 2023, and <strong><a href="https://github.com/iwubcode">iwubcode</a></strong> asked a question that shook us all: "how many games use arbitrary mipmaps for effects?" In the resulting back and forth, we realized the number of games that utilize mipmap hijinks is... not a lot. To our knowledge, only Nintendo used this technique. Of course these were games by <em>Nintendo</em>, titles that are flagships of the GameCube and Wii lineup, like <a href="https://wiki.dolphin-emu.org/index.php/Super_Mario_Galaxy">Super Mario Galaxy</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">The Legend of Zelda: The Wind Waker</a>. However, by being such core titles, we realized that the importance of detecting these effects was overestimated. As far as we are aware, a couple dozen games use the trick, and <em>thousands</em> of games do not. Considering just how common and pernicious false positives are with the heuristic, having the heuristic on by default for every game was probably causing more harm than good.</p>
<p>So we have decided to change that. Arbitrary Mipmap Detection is now off by default. From now on it will only be enabled by default in known cases, via our GameINI system. If you happen to spot any issues that are resolved by turning on Arbitrary Mipmap Detection, please let us know and we'll add it to the list of known mipmap tomfoolery.</p>
<h4 id="50-20785-support-custom-aspect-ratios-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20785/">5.0-20785 - Support Custom Aspect Ratios</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-20785-support-custom-aspect-ratios-by-filoppi" title="Permanent link">¶</a></h4>
<p>Dolphin's Widescreen Hack is both amazing and terrible in equal measure. By expanding the <a href="https://en.wikipedia.org/wiki/Viewing_frustum">View Frustum</a>, it allows Dolphin to able to render any game at <strong>any</strong> aspect ratio, and thus fill <em>any screen</em> without stretching the image! However, the Widescreen Hack is only performed on the Dolphin side, and doesn't affect the game's logic at all. Frustum Culling, screenspace 2D graphics, and more are entirely unmodified. The result is large blank areas in the expanded space, stretched 2D elements, and aberrant pop-in are simply the reality of the Widescreen Hack.</p>
<p>Fortunately, we have an alternative - game-specific aspect ratio cheat codes. By editing the game itself through our cheat system, all of these quirks can be addressed and a much better result can be achieved.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/mp2-widescreenhack.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/mp2-widescreenhack_thumb.jpg" /></a>
<figcaption>Wasn't this room supposed to have walls?</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/mp2-actionreplaycodes.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/mp2-actionreplaycodes_thumb.jpg" /></a>
<figcaption>Through the power of action replay codes, geometry is no longer being culled and we don't have to worry about pop in!</figcaption>
</figure>
</div>
</div></p>
<p>However, aspect ratio codes require the user to configure their aspect ratio. For example, to run Ralf's 16:9 Aspect Ratio code for <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">Wind Waker</a>, a user must set Dolphin's aspect ratio to Force 16:9. Simple enough.</p>
<p>But what happens if your display is an UltraWide? 21:9 codes are fairly common, but there is no "Force 21:9" option. To work around this, 21:9 display users can set the aspect ratio to "Stretch to Window" and enter fullscreen. This does the job, but this has some issues. Ultrawide aspect ratios are less a standard and more of a <em>suggestion</em>, so even within the 21:9 category, the actual ratios vary. In the real world, our little workaround usually results in minor distortion.</p>
<p>But worse still is <strong><em>Super UltraWide</em></strong>. 32:9 aspect ratio codes are few and far between, making the workaround above unviable. The best option available for 32:9 users was to combine a 21:9 code, windowed mode, and Stretch to Window Size, then very carefully size the window so that there was no stretching. Not great.</p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/329-windowed.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/329-windowed_thumb.jpg"></a>
<figcaption>This <em>works</em>, but you have to hide the Windows Taskbar, Windows will not let you move the titlebar of the window off screen if you don't have a secondary monitor, it's a lot of faff to set up, and it requires you to void your wallpaper for the best result. It's not a great experience.</figcaption>
</figure>
</div>
<p><strong><a href="https://github.com/Filoppi">Filoppi</a></strong> decided that this will not do, and added a new <em>Custom Aspect Ratio</em> option to Dolphin. Using this feature, you can effectively force Dolphin's aspect ratio to whatever you want. Now, Super UltraWide screen users can enjoy 21:9 in fullscreen without any fuss or distortion! </p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/329-fullscreen.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/329-fullscreen_thumb.jpg"></a>
<figcaption>Set up a 21:9 code, configure a Custom Aspect Ratio of 21:9, and just enter fullscreen like normal! It's that easy!</figcaption>
</figure>
</div>
<p>Plus, this change allows any aspect ratio on any display, so if you have a 16:9 display and want to play 21:9 on your OLED TV or something, you can do that! In fact, if a theorectical retro port to the GameCube or Wii has an incorrect aspect ratio, this could even be used to correct it! We haven't actually found any of those yet, but it's an intriguing possibility.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/customaspectratioconfig.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/customaspectratioconfig_thumb.png"></a>
<figcaption>To use this feature, just set the Aspect Ratio to "Custom", and configure the ratio to whatever you like!</figcaption>
</figure>
</div>
<p>However, as we do whenever we give dangerous new powers to users, we must exit with a word of caution. <strong>The GameCube and Wii were never exactly 4:3, 5:4, or 16:9</strong>. Yes, <strong><em>on hardware.</em></strong> It was the days of analog displays and their crimes were all going to be <a href="https://en.wikipedia.org/wiki/Overscan">overscanned</a> away anyway, so game developers had no reason to care about being exact. Back when Dolphin assumed standard aspect ratios, every. single. game. was off to some degree. Remember the Melee shields?</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/blog/2015/08/01/dolphin-progress-report-july-2015/#40-7138-pixel-aspect-ratio-adjustment-vi-scaling-fix-by-mirrorbender">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2015-july/meleeshield-broken_circle.jpg"></a>
<figcaption>This is the hell we used to live in.</figcaption>
</figure>
</div>
<p>This was a <em>tremendous headache</em> for us, and to resolve it required <strong>months</strong> of effort from very skilled engineers, testers, esports communities, and more. It was an enormous undertaking.</p>
<p>The result of all that work is that Dolphin reads the exact Aspect Ratio the game is instructing the console to scan out and displays precisely that. And to make sure users see it without distortion, all of our aspect ratio modes used these corrections, with only <em>Stretch to Window</em> bypassing it. Well, now there is a second way to bypass it. A Custom Aspect Ratio will give you exactly what you enter, no matter what. So if you are playing in ordinary 4:3 or 16:9, and you configure the custom aspect ratio to 4:3 or 16:9, you are bypassing Dolphin's aspect ratio adjustment and <em>you will be distorting the image in all cases</em>.</p>
<p>Please use this power responsibly.</p>
<p><em>PLEASE.</em></p>
<h4 id="50-20849-videocommon-apply-force-24-bit-color-to-efb-copies-by-flacs"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20849/">5.0-20849 - VideoCommon: Apply "Force 24-bit Color" to EFB Copies</a></strong> by <strong><a href="https://github.com/Tilka">flacs</a></strong><a class="headerlink" href="#50-20849-videocommon-apply-force-24-bit-color-to-efb-copies-by-flacs" title="Permanent link">¶</a></h4>
<p>"Force 24-bit Color" is an enhancement that reduces banding by forcing the emulated hardware to the highest bitdepth possible. However, there were some cases where turning on the enhancement <em>did not improve banding at all!</em> This change fixes that, but to explain why, <strong>we're going to have to get <em>technical</em>.</strong></p>
<p>To understand this problem, we need to go over how post-processing works on the GameCube and Wii. This first paragraph may be a little familiar, but bear with us. While rendering, the ArtX GPU in the GameCube and Wii rasterizes to the "Embedded Frame Buffer" (EFB), a 2MiB chunk of extremely fast working memory that resides in the GPU itself. While some basic post-processing can be applied while the frame is in the EFB, any effect that involves reading then distorting the frame cannot be done while it is in the EFB. So for most post-processing effects, games will execute an EFB Copy to transfer the frame to main memory, then read the frame as a texture from which to render again on top of. However, the consoles primarily render in 6-bits per channel RGBA6, but cannot read a texture in that format. To deal with this discrepancy, it is common for games to convert the frame to 8-bits per channel RGBA8 during the EFB Copy to maintain full visual quality.</p>
<p>However, a fullscreen image at RGBA8 is HUGE for this hardware. Assuming a 640x480 render target, that would be 9830400 bits, or 1.17MiB! And for post-processing effects, multiple renders need to be made! The GameCube's Main Memory is only 24MiB, and <em>the game</em> needs to live in that space too. So many games opt to EFB Copy some images into main memory in the RGB565 format. A 640x480 RGB565 image is only 4915200 bits in size, or 0.59MiB. That's half the size!</p>
<p>But of course, this came at a cost. Most games render in RGBA6. 6-bits per channel is 64 values per color, for 262144 total possible colors (ignoring the alpha channel). RGB565 has two channels at 5-bits (32 values per color), combining to a total of 65536 total possible colors. RGB565 has significantly fewer colors making banding much worse, and it is missing the alpha channel entirely, limiting its uses. However, when the benefit was <em>halving an image's RAM usage on a chronically memory-starved machine</em>, this was a option that many developers utilized.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/blog/2021/02/11/dolphin-progress-report-december-2020-and-january-2021/#50-13242-final-fantasy-crystal-chronicles-mogmail-crash-fix-by-smurf3tte">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2020-december/crystalchron-bosscrash_thumb.jpg"></a>
<figcaption>A certain brave developer tried to maximize visual quality by switching between RGBA8 and RGB565 EFB Copies depending on how much memory was available. This was the equivalent of <em>playing hot potato with a hand grenade</em>. Click the explosion above to read that story!</figcaption>
</figure>
</div>
<p>And now we return to Dolphin. In Dolphin, we support the original RGBA6 that games usually render with, and all other formats for rendering and EFB Copies. However, the hardware we are running on is almost guaranteed to be 8-bits per channel RGBA8 <em>or better</em>, so we have an enhancement called <em>Force 24-bit Color</em>. This mode forces the emulated console into a hybrid RGBA8-ish mode where the color channels are 8-bits per channel, and the alpha channel remains at 6-bits. This is mildly inaccurate, but it is not that far removed from what the console can do, and it <em>substantially</em> reduces banding. It's a relatively safe enhancement that can significantly improve image quality.</p>
<p>However, for <a href="https://wiki.dolphin-emu.org/index.php?title=Luigi%27s_Mansion">Luigi's Mansion</a>, <em>Force 24-bit Color</em> <strong>did not affect banding at all</strong>.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigismansionbefore-default.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigismansionbefore-default_thumb.png" /></a>
<figcaption>This was the game with Default settings.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigismansionbefore-force24bit.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigismansionbefore-force24bit_thumb.png" /></a>
<figcaption>And here it was with Force 24-bit Color. Yes they are not the same image, we are sure.</figcaption>
</figure>
</div>
</div></p>
<p><strong><a href="https://github.com/Tilka">flacs</a></strong> noticed this discrepancy and looked into it. <em>Force 24-bit Color</em> forces the initial render to use the RGBA8 mode. However, <em>Force 24-bit Color</em> did nothing to EFB Copies, which every frame will undergo at least once! If the game used the typical option of EFB Copying into RGBA8, then Dolphin would take an RGBA8 image and EFB Copy it into an RGBA8 image, and the enhancement would still be in effect. But if the game chose to go with RGB565 (or RGB5A3... we're not going to talk about that one), Dolphin would follow the game's instructions and <em>decimate</em> the RGBA8 rendered image into RGB565, completely destroying the enhancement in the process!</p>
<p>Due to the color compromises, most games use RGB565 sparingly, saving it for secondary post processing of effects that only partially cover the screen. Most of the time, the RGB565 pieces of an image would be difficult to spot. Not so with Luigi's Mansion, as it <strong>EFB Copies the entire framebuffer in RGB565</strong>! This decimates the entire screen, rendering <em>Force 24-bit Color</em> effectively useless!</p>
<p>So <strong><a href="https://github.com/Tilka">flacs</a></strong> has corrected this oversight. Now, whenever <em>Force 24-bit Color</em> is enabled, EFB Copies will also use RGBA8 within Dolphin. Thanks to this change, we can see Luigi's Mansion as we never have before!</p>
<div class="media-block wider">
<div class="swap" ontouchstart>
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigibanding-before.png" alt="First Image">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/luigibanding-after.png" class="img-top" alt="Active Image">
</div>
<p style="margin-top: .5em; max-width: 100%; text-align:center;">Click/Tap and hold to see the banding improvement Force 24-bit Color can now achieve! </p>
</div>
<p>Force 24-bit Color will be improved in any title that uses lower quality EFB Copy formats such as RGB565. Players using the feature should look for reduced banding in their favourite titles! However, most games only use these lower quality EFB Copy modes for part of the screen, so most titles that are improved will see a less dramatic change than Luigi's Mansion.</p>
<h4 id="50-20923-steam-deck-pad-out-feature-report-to-64-bytes-by-endrift-and-arcanenibble"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20923/">5.0-20923 - Steam Deck: Pad out feature report to 64 bytes</a></strong> by <strong><a href="https://github.com/endrift">endrift</a></strong> and <strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong><a class="headerlink" href="#50-20923-steam-deck-pad-out-feature-report-to-64-bytes-by-endrift-and-arcanenibble" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:180px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/steam-release/steamdeckonwhite.jpg">
</div>
<p>In the previous Progress Report, we covered <a href="https://dolphin-emu.org/blog/2023/11/25/dolphin-progress-report-august-september-and-october-2023/#50-20148-periodically-re-enable-steam-deck-gyro-by-arcanenibble">5.0-20148 - Periodically Re-enable Steam Deck Gyro</a>. Current versions of SteamOS will try to shut down gyros that it thinks are not being used. This gave us a lot of issues, so this change addressed this by making Dolphin re-enable the gyro on Steam Decks roughly once per second.</p>
<p>However, due to SteamOS quirks, it's not easy for users to run Development builds on Steam Decks. Most Steam Deck users get Dolphin builds through <a href="https://docs.flatpak.org/en/latest/introduction.html">Flatpaks</a> of our Beta builds. So while the change was tested by the developers before being merged, it was only after the Report and the Beta release that the Flatpaks were updated and this change was finally able to reach wide adoption in users' hands.</p>
<p>And almost immediately, we started to get <a href="https://dolp.in/i13412">reports of doubled inputs</a> in the latest version of Dolphin. Uh oh.</p>
<p>The author of the change, <strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong>, immediately retested and couldn't reproduce it. And yet reports kept pouring in. So more of our developers tried it, and they couldn't reproduce it either. A few of our users and testers tried it, and weren't able to reproduce it either. Yet more and more reports kept pouring in. What was happening!?</p>
<p>This back and forth continued for weeks, until finally, we stumbled upon the answer. <em>Older Steam Decks were affected, and newly built Steam Decks were not</em>. It turns out that the <a href="https://www.youtube.com/watch?v=fhUqh-RkqEU&t=325s">Steam Deck LCD had a major revision in the fall of 2023</a>! The revision completely changed the Deck's internals, with significantly different PCBs and component parts! And sure enough, the Deck's Steam Controller controller chip was refreshed too. Steam Decks made before fall of 2023 use an Atmel controller, while Steam Deck LCDs made after fall of 2023, and all Steam Deck OLEDs, use a Renesas controller. Once we realized this potential source, we asked users to run a command that reported the controller in their Deck. In all of our samples, Steam Decks with Atmel controllers always had the issue, and Decks with the Renesas controller never had it.</p>
<p>Now that we knew how to reproduce the issue, we asked developers who work on the Deck for help. <strong><a href="https://github.com/endrift">endrift</a></strong>, <a href="https://mgba.io/">mGBA</a> author and Dolphin contributor, has been working on the Deck a lot lately. She came in and worked with the author of the change for a thorough debugging. It turns out, <strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong> made an tiny oversight and didn't fill in one value.</p>
<p><br/></p>
<p>Broken Code:</p>
<p><code>const unsigned char pkt[] = {0x00, 0x87, 0x03, 0x30, 0x18, 0x00};</code></p>
<p><br/>
Working Code:</p>
<p><code>const unsigned char pkt[65] = {0x00, 0x87, 0x03, 0x30, 0x18, 0x00};</code></p>
<p><br/></p>
<p><strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong> forgot to pad the packet size of the feature report packet. That's it. Here's endrift explaining what happened:</p>
<p><br/><blockquote style="font-size:1.1em">
When Steam tells the Steam Deck (or previously the Steam Controller) to change a setting, it uses something called a HID feature report. Feature reports can be up to 64 bytes long in USB 2.0, and the size of a device's report is described in the suitably named report descriptor, which is specified by the HID standard.</p>
<p>Feature reports can be split out into up to 256 different IDs, each of which can have a separate size as described in the descriptor. However, for a dynamic system like the Steam Deck, sometimes devices just define a longer-than-used 64 byte report size and just pad the end out with zeroes, then define the ID outside of the descriptor.</p>
<p>Steam always sends a fully padded 64 byte report, in accordance with the report descriptor. However, by sending a feature report with less than 64 bytes, the implementation on the USB device end gets confused. Quite possibly later feature reports get misinterpreted as a result, and one of these misinterpreted reports from Steam causes this issue.</p>
<p>However, Renesas chips don't appear to get confused and just internally assume the report should be padded to 64 bytes even when fewer are sent.
<footer><a href="https://github.com/endrift">endrift</a></footer></blockquote><br/></p>
<p>This resulted in Atmel controllers entering a glitched state where they operated in both "Lizard Mode" (the default fallback controls for when Steam is not running) and normal mode at the same time, doubling every input. Renesas controllers, on the other hand, were entirely unaffected.</p>
<p>So <strong><a href="https://github.com/endrift">endrift</a></strong> tested a fix and made a quick PR, and now the double input issue is resolved! While the solution may have ended up being very simple, this bug was a very difficult one to identify. It took the <em>entire Dolphin Steam Deck community</em> chasing this bug for us to figure it out and get it sorted. Thank you to everyone who reported and helped us chase this sneaky bug!</p>
<h4 id="50-20941-sdl-add-gamecontroller-api-cleanup-by-supersamus"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20941/">5.0-20941 - SDL: Add GameController API, cleanup</a></strong> by <strong><a href="https://github.com/SuperSamus">SuperSamus</a></strong><a class="headerlink" href="#50-20941-sdl-add-gamecontroller-api-cleanup-by-supersamus" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:20%; min-width:200px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2015-july/Sdl-logo.png">
</div>
<p><strong><a href="https://github.com/SuperSamus">SuperSamus</a></strong> has given our SDL input backend some love. First, they added support for the <a href="https://blog.rubenwardy.com/2023/01/24/using_sdl_gamecontroller/">GameController API</a>, an abstraction that allows consistent mapping across different controllers. Users will be able to switch controllers, i.e. a DualSense to a Switch Pro Controller, seamlessly without remapping! <strong><a href="https://github.com/SuperSamus">SuperSamus</a></strong> also cleaned up our SDL input backend, cleaning up a bunch of workarounds for old SDL versions that are no longer applicable to our current SDL2 input backend. SDL is now better than ever before, on all operating systems!</p>
<p>In fact, as of this change SDL has once again been enabled by default in our Linux builds! SDL has come <a href="https://dolphin-emu.org/blog/2015/08/01/dolphin-progress-report-july-2015/#40-6951-linux-add-an-evdev-based-controller-backend-to-replace-sdl-by-phire">a long long way</a>.</p>
<h4 id="50-20961-only-initialize-bounding-box-if-supported-by-gpudriver-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20961/">5.0-20961 - Only initialize Bounding Box if supported by GPU/driver</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-20961-only-initialize-bounding-box-if-supported-by-gpudriver-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>"Renderer" was an abstraction in Dolphin's code that functioned as an interface for video plugins. However, when the video plugins were merged with Dolphin's code and became video <em>backends</em>, Renderer became a dumping ground, filling up with tons of miscellaneous code and features. So, last year, <a href="https://github.com/phire">Phire</a> set off with the mission to kill Renderer <em>entirely</em>, refactoring enormous amounts of Dolphin's graphics code.</p>
<div class="media-block wider">
<figure>
<a href="https://github.com/dolphin-emu/dolphin/pull/11522">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/Refactoring.png"></a>
<figcaption>Kill Renderer moved <strong>a lot</strong> of code around.</figcaption>
</figure>
</div>
<p><a href="https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/#50-18576-kill-renderer-by-phire">We covered Kill Renderer here on the blog</a>, both because it was a huge achievement, but also because any change that touched that much of Dolphin's codebase was likely to have <em>unforeseen consequences</em>. And that is what we come to today.</p>
<p>After Kill Renderer, we received reports from users on <em>very</em> old GPUs that Dolphin no longer worked for them. Now, any game they attempted to run would fail to start, with the error "Failed to create BoundingBox Buffer." </p>
<div class="media-block narrower">
<figure>
<a href="https://github.com/dolphin-emu/dolphin/pull/11522">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/BoundingBoxError.png"></a>
<figcaption>This occurred after running <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Smash_Bros._Brawl">Super Smash Bros. Brawl</a>. That game doesn't even use Bounding Box!</figcaption>
</figure>
</div>
<p>After Kill Renderer, Bounding Box was always initialized whether the hardware supported it or not. This doesn't affect most of our userbase, as >99% of our users' hardware supports the feature, but for any hardware that <em>doesn't</em> support Bounding Box, this regression completely broke Dolphin!</p>
<p><strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> looked into this and made a quick fix. As of this change, Dolphin will perform the same as it did before Kill Renderer on those GPUs - Dolphin runs again and games work, but if a user attempts to run a Bounding Box title, they are in for a buggy good time.</p>
<div class="media-block full-width">
<div class="row">
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox1.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox1_thumb.jpg" /></a>
<figcaption>Mario refuses to be associated with the Intel HD Graphics 3000.</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox2.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox2_thumb.jpg" /></a>
<figcaption>Now that's an air ship.</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox3.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/hd3000-boundingbox3_thumb.jpg" /></a>
<figcaption>Unlike the GameCube, Intel HD Graphics 3000 cannot handle this many sprites at once.</figcaption>
</figure>
</div>
</div>
<h3 id="notice-for-nvidia-users"><strong>Notice for Nvidia Users</strong><a class="headerlink" href="#notice-for-nvidia-users" title="Permanent link">¶</a></h3>
<p>We've received reports of texture corruption in D3D11 on Nvidia GPUs with their latest drivers. This is still developing, as we have yet to properly isolate and analyze this, but we believe it to be some sort of driver issue. For now, we recommend Nvidia users avoid our D3D11 backend.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/d3d11nividiatexturecorruption.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2024-january/d3d11nividiatexturecorruption_thumb.png"></a>
<figcaption></figcaption>
</figure>
</div>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2023-11-01&to=2024-01-31&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-20349/">5.0-20349</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-21088/">5.0-21088</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
<p><style>
.swap {
position: relative;
display: inline-block;
}
.swap .img-top {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99;
}
.swap:active .img-top {
display: inline;
}
</style></p>
Dolphin Progress Report: August, September, and October 2023
2023-11-25T15:44:10+00:002023-11-25T16:27:29.051470+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2023/11/25/dolphin-progress-report-august-september-and-october-2023/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/progressreportheader-august2023.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/progressreportheader-august2023mini.jpg" />
</header>
<p>This past October, Dolphin turned 20 years old since its initial release to the public as an experimental GameCube emulator. It's been a long ride, with twists and turns. I don't know if anyone back in 2003 expected Dolphin not only to still be under active development <strong>20 years later</strong>, but to also support the GameCube's successor in the Wii.</p>
<p>You might be wondering, <em>where is all the pageantry?</em> The honest truth is that things aren't ready yet. We have a few massive changes on the horizon that we wanted to be ready for the 20th anniversary, but that date was not an excuse to release something in a broken and incomplete state. For now, development will continue as normal, but we promise that there is some excitement to be had on the horizon.</p>
<p>In the meantime, we have some great changes for you this in Dolphin Progress Report!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-19886-add-custom-dark-style-for-windows-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19886/">5.0-19886 - Add Custom Dark Style for Windows</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-19886-add-custom-dark-style-for-windows-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>The waiting game is over. After much discussion and work, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> bit the bullet and added a dark mode to Dolphin. Some of you may be wondering right now, <em>Wait, didn't Dolphin already have dark mode?</em> Yes. Also no.</p>
<p>Essentially, on macOS, Android, and Linux, Dolphin has supported dark mode for <em>years</em>. On those platforms, if your system is configured to dark mode, Dolphin will switch to darker colors to match without requiring any input from the user. It is completely seamless on macOS and Android, and has been since <strong><a href="https://dolphin-emu.org/blog/2020/04/05/dolphin-progress-report-february-2020/">early 2020</a></strong>, nearly four years ago. Dolphin on Linux has supported dark mode for even longer, however it may or may not work out of the gate depending on the packaged Qt defaults and other Linux quibbles. If you're a Linux user, you know the dance.</p>
<p><div class="media-block wide">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/darklite-macos.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/darklite-macos_thumb.png" /></a>
<figcaption>Dark mode has been effortless in macOS for years now.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/darklite-android.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/darklite-android_thumb.png" /></a>
<figcaption>Android too!</figcaption>
</figure>
</div>
</div></p>
<p>However, the above fails to mention a very significant operating system that we support - Windows. As that is nearly half of our userbase, a lot of our users were missing out on nihilistic bliss. There were many reasons why we didn't support dark mode on Windows until now, but the core of the matter is our desktop GUI toolkit - Qt.</p>
<p>While Qt 5 supported automatic dark mode switching on macOS and Linux, it did not respond to the Windows dark mode setting at all. But there was a lot of demand for the feature, so Qt promised that a solution was in progress. For us as an application that uses Qt, we could have bodged together some sort of dark mode switching ourselves, but it would have inevitably been jank and weird. So upon hearing that Qt was working on it, we decided to wait for their solution. That eventually came with Qt 6.5, which indeed delivered automatic dark mode switching on Windows as promised... in their new "Fusion" style. The Windows-matching <em>QWindowsVistaStyle</em> Dolphin has used for years was abandoned and will not be getting dark mode at all. <a href="https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5">Qt gave many reasons for their decision</a> (spoiler: Windows be Windowsing), but fundamentally, they did what they thought was best given the circumstances.</p>
<p>With Qt's unexpected move to a new style, we had to make some decisions. Do we adopt the new Fusion style, affecting all of our Windows users both light and dark, or do we use the switching they built into Qt 6.5 and create something ourselves? So people experimented, with nearly a half dozen pull requests of all kinds! We tried Fusion, but the look of the style proved to be unpopular. So we started experimenting with custom styles of our own, with multiple people going different directions and <a href="https://en.wikipedia.org/wiki/Bikeshedding">bikeshedding</a> for months.</p>
<p>The end result is a hand-crafted dark mode alternate QWindowsVistaStyle created by our very own <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong>. It is what we had hoped Qt's default support for dark mode on Windows would have been - Dolphin on Windows, but dark.</p>
<p><div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/windows-lightmode.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/windows-lightmode_thumb.png" /></a>
<figcaption>The same Windows Dolphin style you know...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/windows-darkmode.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/windows-darkmode_thumb.png" /></a>
<figcaption>Can now go dark!</figcaption>
</figure>
</div>
</div></p>
<p>Now every platform we support now has dark mode and automatic switching! Of course it will switch automatically, but on Windows you can manually select between our dark and light styles and even custom user styles with the new Style dropdown in Config → Interface. This replaces the old Custom User Style control, combining our official styles and custom user style controls in one place. </p>
<h4 id="50-19939-implement-output-resampling-upscalingdownscaling-by-filoppi-and-samb"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19939/">5.0-19939 - Implement Output Resampling (Upscaling/Downscaling)</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> and <strong><a href="https://github.com/Sam-Belliveau">samb</a></strong><a class="headerlink" href="#50-19939-implement-output-resampling-upscalingdownscaling-by-filoppi-and-samb" title="Permanent link">¶</a></h4>
<p>For years now, whenever a user has asked us for settings that would give them the best image quality possible from Dolphin, there's been a familiar back and forth. In response to the question, we'd tell them to set Dolphin's Internal Resolution to match their screen (following our recommendations in the GUI), set Anisotropic Filtering to x16, and use 4x or 8x SSAA (Super Sample Anti-Aliasing). </p>
<p>On a sufficiently-capable gaming PC, that combination will give <em>pristine</em> visual quality. However, users would counter our recommendation by saying that since SSAA runs at a higher resolution than the screen and uses downsampling for its resolve, why can't they just do the same by raising Dolphin's Internal Resolution higher than their screen? And we'd reply by reminding them that Dolphin didn't have its own output resampling, and the basic downsampling from the GPU meant that their idea would create <strong>more aliasing</strong> rather than less.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-12xnative-4xssaa.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-12xnative-4xssaa_thumbbig.png"></a>
<figcaption>Believe it or not, this is using 4xSSAA. The Internal Resolution in this shot is much higher than the screen, and the GPU's basic bilinear downscaling is so sharp it creates new aliasing.</figcaption>
</figure>
</div>
<p>This song and dance has happened dozens of times, enough that <a href="https://dolphin-emu.org/blog/2020/05/05/dolphin-progress-report-april-2020/#50-11858-dolphinqt-dont-overwrite-8x-ir-scale-in-ini-add-maximum-internal-res-option-by-stenzek">we would remind users about this whenever new Internal Resolution options were added</a>. However, as of this change, things are different. Dolphin now has its own Output Resampler! With Area, Bicubic, Sharp Bilinear and more, users can now take upscaling and downscaling into their own hands. In fact, as far as we know no other game, emulator, or even <em>GPU driver</em> implements such an advanced and comprehensive resampler!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/Output-Resampling.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/Output-Resampling_thumb.png"></a>
<figcaption>B-Spline, Catmull-Rom, and Mitchell-Netravali, oh my!</figcaption>
</figure>
</div>
<p>Has this changed our recommendation for the best possible visual settings? Not really. While you can use output resampling to create a "DIY SSAA" that can meet SSAA's visuals, hardware SSAA <em>is faster at equivalent fidelity</em> (on an Nvidia GPU). SSAA is an easy recommendation.</p>
<p>However, performance was never the point. Output Resampling is an extremely powerful new tool that was built to give users control of Dolphin's final look. From an especially soft and temporally stable image, to razor sharp pixels, to the highest fidelity imaginable, our new output resampling features can do it all! There's a lot to cover here, so let's get started.</p>
<h4 id="what-is-output-resampling">What is Output Resampling?<a class="headerlink" href="#what-is-output-resampling" title="Permanent link">¶</a></h4>
<p>Before we continue, let's briefly go over the basics for any readers who are unfamiliar with these topics. Whenever rendering at a resolution that doesn't match the render window, the pixels of the game's output must be <em>resampled</em> (effectively remapped) into a new image that matches the new pixel grid. For example, a 1x Native (640x528) frame in a 1920x1080 canvas must be scaled up to fill the canvas. As it is not a 1:1 ratio and not even an integer multiplier, we can't just directly translate pixels from our output onto pixels of the screen, it must be resampled during upscaling. With the familiar Bilinear upscaling, it will fill the canvas by <a href="https://en.wikipedia.org/wiki/Interpolation">interpolating</a> the source pixels into the new pixel grid, for a consistent, though soft, resulting image.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xwindow.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xwindow-zoom_thumb.png" /></a>
<figcaption>If we run a game in 4:3 at 1x native in a window with Auto-Adjust Window Size, we get razor sharp pixels thanks to direct pixel mapping. At least, as close to direct mapping as is possible for the GC/Wii.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xwindow.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xwindow_thumb.jpg" /></a>
<figcaption>But this configuration is quite small on a 1080p screen.</figcaption>
</figure>
</div>
</div>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xfullscreen.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xfullscreen_thumb.jpg" /></a>
<figcaption>If we enter fullscreen, the game is much larger. However...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xfullscreen.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1xfullscreen-zoom_thumb.png" /></a>
<figcaption>Our pixels are now soft. This is because the ~480p pixel grid has been interpolated into the 1080p pixel grid of our display.</figcaption>
</figure>
</div>
</div>
<p>The GameCube and Wii were built with analog displays in mind, where exactness simply didn't exist. Every game is <em>close</em> to a standard aspect ratio but subtly nonstandard, and frustratingly <em>uniquely</em> subtly nonstandard. Plus, widescreen is achieved by just.. making the pixels wider, not adding more of them, so that means non-square pixels are a factor too! To accurately recreate these games on modern displays, we have no choice but to account and adjust for these behaviors, which we do by resampling the image. As such, any time you play a game in Dolphin, the image you are seeing will have been resampled at least a little in <strong>all cases</strong>.</p>
<p>Resampling is <em>unavoidable</em> in Dolphin.</p>
<p>Without an internal output resampler, Dolphin has been entirely reliant on host GPU's provided resampling for this important task. It's... not amazing. The GPU Bilinear Resampler was designed to be fast and simple, and not necessarily to have the best visual resolve.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-1xnative_thumb.png" /></a>
<figcaption>The GPU provided bilinear resampling a 1x native image into 1080p gives a soft result, but not an especially clean or great one. It does the job.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-6xnative_thumb.png" /></a>
<figcaption>Downscaling a 6x native image to 1080p is similarly "meh". Despite using four times the pixels of <a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-3xnative_thumb.png">3x native (which is close to our 1080p canvas)</a>, it's not much better. But it did downsample it for us.</figcaption>
</figure>
</div>
</div>
<p>Despite all this, resampling hasn't been a huge issue for us. After all, Dolphin's GPU load is pretty low* and we are always* CPU limited, so with GPU power to spare*, users should just run at the Internal Resolution that we recommend for their screen and call it a day. With modern devices, even a phone can do that*. And they probably even have enough spare GPU power to add antialiasing for an even better result! Despite all those asterisks, that is still <em>usually</em> the case, if all you care about are high resolutions and crisp antialiased lines. However, not everyone wants that. And even in 2023, there are still cases where not everyone can achieve that. This is where Output Resampling comes to its own.</p>
<h4 id="what-are-the-resample-options">What are the resample options?<a class="headerlink" href="#what-are-the-resample-options" title="Permanent link">¶</a></h4>
<p>Our Output Resampler is extremely comprehensive with many different possible settings and use cases. Here are some of the options and some ways that you can use them.</p>
<p><br/>
<span style="font-size: 1.5em;"><strong>Area</strong></span> is a resampler that samples every pixel on the screen for the maximum possible sample count. It is built for downsampling, with a soft resolve to combat aliasing, shimmer, and moire issues inherent to downscaling. It can be used for upsampling though, to curious results.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-1xnative_thumb.png" /></a>
<figcaption>By sampling all the pixels, the Area downsampler is extremely sharp when upsampling.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-6xnative_thumb.png" /></a>
<figcaption>When downsampling, Area's soft resolve helps smooth edges of textures and polygons alike.</figcaption>
</figure>
</div>
</div>
<p>Upsampling isn't really what Area is intended for, but is does give an interesting result - an extremely sharp look, akin to Sharp Bilinear. However, we recommend Sharp Bilinear over using Area this way, as Sharp Bilinear is explicitly designed for upscaling pixel art titles and has lower GPU usage than Area. Experiment with it yourself and compare!</p>
<p>Downsampling is where Area shines. The frick ton of samples and softened resolve allows Area to avoid the downsample aliasing that Bilinear and other resamplers experience. In fact, by combining the area resampler with MSAA and an Internal Resolution much higher than your screen, you can create a DIY SSAA.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-6xnative-4xmsaa.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-area-1080p-6xnative-4xmsaa_thumb.png"></a>
<figcaption>Add in some MSAA and the Area downsampler can match <a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-1080p-3xnative-4xssaa.png">SSAA's exceptional picture quality.</a></figcaption>
</figure>
</div>
<p>However, SSAA is a graphics driver feature that is optimized <em>with</em> your GPU to make it surprisingly efficient, for a brute force technique anyway. A DIY SSAA cannot be faster than a hardware optimized solution! But by being within the users' control, Area provides a lot of interesting downsampling options that we have not had before. Furthermore, SSAA is not so optimal everywhere and may not even be available for everyone. More on that later.</p>
<p><br/>
<span style="font-size: 1.5em;"><strong>Bicubic</strong></span> uses <a href="https://en.wikipedia.org/wiki/Spline_interpolation#Algorithm_to_find_the_interpolating_cubic_spline">cubic spline interpolation</a> for its resolve. It comes in three flavors: B-Spline (soft), Catmull-Rom (sharp), and Mitchell-Netravali (medium).</p>
<p><strong>B-Spline</strong> is an exceptionally soft upsampler. With extreme temporal stability and minimal noise, B-Spline can give an extremely clean and stable result.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-1xnative_thumb.png" /></a>
<figcaption>If you ever wanted Dolphin to use a modern display's pixels for a soft image rather than just more and sharper pixels, the softness of B-Spline is for you!</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-6xnative_thumb.png" /></a>
<figcaption>B-Spline's downsampling is kind of inbetween Area and Bilinear.</figcaption>
</figure>
</div>
</div>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-1xnative-8xssaa.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-bspline-1080p-1xnative-8xssaa_thumb.png"></a>
<figcaption>Add SSAA to 1x Native B-Spline for a silky smooth resolve! All of the detail is still there, but the source pixels have melted into light and shapes. Be sure to click/tap this image, it's something else.</figcaption>
</figure>
</div>
<p>On the opposite end of the spectrum is <strong>Catmull-Rom</strong>, an extremely sharp upsampler.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-catmullrom-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-catmullrom-1080p-1xnative_thumb.png" /></a>
<figcaption>Now THIS is a different look for Dolphin! Click/Tap the image for detail!</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-catmullrom-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-catmullrom-1080p-6xnative_thumb.png" /></a>
<figcaption>Downsampling, Catmull-Rom's sharpening is still present and gives some highlights around pixels, but it is significantly weakened.</figcaption>
</figure>
</div>
</div>
<p><strong>Mitchell-Netravali</strong> is inbetween these two extremes.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-mitchellnet-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-mitchellnet-1080p-1xnative_thumb.png" /></a>
<figcaption>For upsampling, Mitchell-Netravali kind of looks like B-Spline and Catmull-Rom combined. It is both softer and sharper than Bilinear.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-mitchellnet-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-mitchellnet-1080p-6xnative_thumb.png" /></a>
<figcaption>When downsampling, Mitchell-Netravali more or less just looks like Bilinear, but with a tiny bit of sharpening added on. It's fine.</figcaption>
</figure>
</div>
</div>
<p><br/>
<span style="font-size: 1.5em;"><strong>Sharp Bilinear</strong></span> was previously added to Dolphin as a post processing filter, and now has joined the suite of output resamplers. As we have <a href="https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/#new-post-processing-shaders">already covered Sharp Bilinear quite recently</a>, we won't be going into detail here. But in summary, Sharp Bilinear is a best-of-both-worlds combination of Bilinear and Nearest Neighbor, allowing nearest neighbor pixel clarity without its shimmering artifacts. It is primarily designed for upsampling low resolution sprites, but it can be used to upsample 3D graphics if you want unnaturally sharp jaggies. It is not intended for downsampling.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-sharpbilinear-1080p-1xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-sharpbilinear-1080p-1xnative_thumb.png" /></a>
<figcaption>Sharp Bilinear is extremely sharp and ready to upscale pixel art!</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-sharpbilinear-1080p-6xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingdemo-sharpbilinear-1080p-6xnative_thumb.png" /></a>
<figcaption>It's not made for downsampling, but downsampling Sharp Bilinear... looks like Bilinear. Also it is <em>extremely</em> close to the Mitchell-Netravali image above!</figcaption>
</figure>
</div>
</div>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/#new-post-processing-shaders">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/sharpbilinear2.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>
Click the image above to be taken to our previous coverage on Sharp Bilinear. It has animations and everything!
</figcaption>
</figure>
</div>
<h4 id="when-is-output-resampling-better-than-existing-solutions">When is Output Resampling Better than Existing Solutions?<a class="headerlink" href="#when-is-output-resampling-better-than-existing-solutions" title="Permanent link">¶</a></h4>
<p>Output Resampling is primarily focused on providing visual options for players, and it typically isn't outright superior to existing solutions. However, it is very powerful, and during testing, we found several scenarios where Output Resampling is able to create a better result than what was possible before.</p>
<h5 id="efb-copy-brute-forcing">EFB Copy Brute Forcing<a class="headerlink" href="#efb-copy-brute-forcing" title="Permanent link">¶</a></h5>
<p>Some games use a large EFB effect that is particularly expensive, and have to render it at a fraction of the game's output resolution. A classic example is the mirrored surface of Fountain of Dreams in <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Smash_Bros._Melee">Super Smash Bros. Melee</a>.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplefod-1080p-3xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplefod-1080p-3xnative_thumb.jpg"></a>
<figcaption>The mirrored surface is rendered at <strong>1/8th</strong> the resolution of the rest of the image!</figcaption>
</figure>
</div>
<p>We don't have to worry about the hardware limitations that lead to these decisions, but the consequences of their choices affect us even today: as these effects are rendered proportional to the game's rendering resolution, they <em>scale</em> proportionally too. No matter what Internal Resolution multiplier we use, the mirrored pool in Fountain of Dreams will always be 1/8th of that. As such, the only way to increase the resolution of these effects relative to the screen (without modding the game) is to increase the Internal Resolution way beyond the screen resolution. But as we have already talked about thoroughly in this section, this will introduce aliasing with the GPU bilinear resampler. Users simply had to deal with this - it was either aliasing or a low resolution reflection.</p>
<p>Until now! Using our Output Resampler (specifically Area), we can raise the Internal Resolution as much as we want without adding aliasing!</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplefod-1080p-21xnative-4xmsaa.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplefod-1080p-21xnative-4xmsaa_thumb.jpg"></a>
<figcaption>Fountain of Dreams can now be seen in perfect clarity!</figcaption>
<p style="transform: scale(1, -1);"><sub>Smash 64 is that you?</sub></p>
</figure>
</div>
<h5 id="upsampling-to-a-close-resolution">Upsampling to a Close Resolution<a class="headerlink" href="#upsampling-to-a-close-resolution" title="Permanent link">¶</a></h5>
<p>As mentioned previously, resampling is basically unavoidable in Dolphin due to quirks of the GameCube and Wii. However, if you use the Internal Resolution recommendations we have our in GUI (such as 3x Native for a 1080p screen), the GPU Bilinear Resampler will be good enough that switching to our Area resampler will give only marginal improvements even for pixel peepers. But not everyone has a system powerful enough to run at our recommendations for their screens, and they may have to settle with the highest Internal Resolution their hardware can manage. Depending on their circumstance, our Output Resampler could help them achieve a better image than was possible before.</p>
<p>A good example of this is resampling a 2x Native (1280x1056) 16:9 title into a 1920x1080 canvas. 2x Native nearly matches a 1080p screen vertically (1056 → 1080), but it has significantly fewer pixels horizontally (1280 → 1920).</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingclose-1080p-2xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingclose-1080p-2xnative_thumb.png" /></a>
<figcaption>The GPU Bilinear Resampling clearly exposes the resolution difference, with much softer pixels horizontally.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingclose-area-1080p-2xnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/resamplingclose-area-1080p-2xnative_thumb.png" /></a>
<figcaption>Our Area resampler gives a sharper and more consistent result under the same circumstances. This is most clear on Pit's rings in the left half of this image.</figcaption>
</figure>
</div>
</div>
<p>This benefit of our Output Resampler is highly situational, but it can improve Dolphin's image quality on lower end systems. Experiment and see what works best for you!</p>
<h5 id="downsampling-on-platforms-where-ssaa-is-unviable">Downsampling on Platforms where SSAA is Unviable<a class="headerlink" href="#downsampling-on-platforms-where-ssaa-is-unviable" title="Permanent link">¶</a></h5>
<p>SSAA has pristine visual quality and surprisingly good performance for a brute force solution. However, that doesn't matter if your system doesn't support SSAA! In desktop land we have been spoiled by SSAA being near universal, but Dolphin's mobile users are now <em>over half</em> of our userbase, and SSAA is uncommon on mobile SoCs. Furthermore, SSAA may be present but not optimal. Adreno in particular <em>hates</em> SSAA! A DIY SSAA made with Output Resampling may be just what a user needs on those platforms.</p>
<p>Unfortunately, our Output Resampler is not yet available on Dolphin Android. We tried our best to hunt down some non-Android devices that lack SSAA or have poor SSAA performance, but the best we had on hand was a <a href="https://dolphin-emu.org/blog/2020/02/07/dolphin-progress-report-dec-2019-and-jan-2020/#50-11409-platform-support-for-windows-on-arm64-and-50-11455-dolphinqt-support-compiling-on-arm64-by-stenzek">2019 Surface Pro X</a>. While its Adreno GPU absolutely hated SSAA as predicted, it was too weak to serve as a good demonstration. </p>
<p>Once this feature arrives on Android, we have loads of powerful Android tablets to try this on. Stay tuned!</p>
<h4 id="50-20193-expose-resolutions-multipliers-up-to-12x-8k-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20193/">5.0-20193 - Expose Resolutions Multipliers Up to 12x (~8k)</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-20193-expose-resolutions-multipliers-up-to-12x-8k-by-filoppi" title="Permanent link">¶</a></h4>
<p>Now that we have proper downsampling, we've decided to increase the maximum Internal Resolution exposed by default in our desktop Qt GUI from 8x Native to 12x Native (8K). This will allow users of 4k displays to increase the Internal Resolution beyond their screen for downsampling purposes <a href="https://dolphin-emu.org/blog/2020/05/05/dolphin-progress-report-april-2020/#50-11858-dolphinqt-dont-overwrite-8x-ir-scale-in-ini-add-maximum-internal-res-option-by-stenzek">without editing INIs</a>. For the twelve of you with an 8k panel, now you don't need to set MaxResolution at all! Unless you want to, 8k users tend to have silly hardware so do whatever you want.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/internalresolutionoptions.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/internalresolutionoptions_thumb.png"></a>
<figcaption>That's a lot of pixels.</figcaption>
</figure>
</div>
<p>However, just because Dolphin shows 12x Native in the GUI does not mean that your computer can achieve it. 12x Native is <span style="white-space: nowrap;">48,660,480 pixels</span>, or <strong>48.7 megapixels</strong>. Currently <strong>most computers will run out of VRAM before reaching 12x Native!</strong> Statistically speaking your computer will not run this resolution at fullspeed. Use this power responsibly!</p>
<p>This change only applies to our desktop Qt GUI, and does not affect Dolphin on Android. We do not need to explain this.</p>
<h4 id="50-20199-use-lz4-for-savestate-compressiondecompression-by-malleo"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20199/">5.0-20199 - Use LZ4 for SaveState Compression/Decompression</a></strong> by <strong><a href="https://github.com/malleoz">Malleo</a></strong><a class="headerlink" href="#50-20199-use-lz4-for-savestate-compressiondecompression-by-malleo" title="Permanent link">¶</a></h4>
<p>If you're in the TAS community or relying on constant savestate usage for your project, this is a huge optimization that might make your life a lot easier. <strong><a href="https://github.com/malleoz">Malleo</a></strong> noticed that Dolphin was using <a href="https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Oberhumer">LZO</a> for savestates, which has a good compression ratio, but is quite a bit slower than <a href="https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)">LZ4</a> when it comes to decompression. By moving Dolphin's savestate compression to LZ4, savestate loading is now ~72% faster.</p>
<p>For the casual users, savestate loads are now snappier. For speedrunners this will make practicing a single trick over and over again take a little less time. But for people using hundreds, thousands, or tens of thousands of savestate loads for TAS creation or AI projects, the savings really start to add up.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/Doec5gxhT_U" allowfullscreen></iframe></div><figcaption></figcaption>This is the kind of work that will be much faster now!
</figure>
</div>
<h4 id="50-19415-and-50-20126-improve-jit-block-lookup-performance-by-krnlyng"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19415/">5.0-19415</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20126/">5.0-20126</a></strong> - <strong>Improve JIT Block Lookup Performance</strong> by <strong><a href="https://github.com/krnlyng">krnlyng</a></strong><a class="headerlink" href="#50-19415-and-50-20126-improve-jit-block-lookup-performance-by-krnlyng" title="Permanent link">¶</a></h4>
<p>To run game code that's been designed for the GameCube and Wii's PowerPC CPU, Dolphin's JIT translates PowerPC machine code into machine code that your computer can run natively. Once a chunk of code has been translated, the resulting code block is stored in Dolphin's JIT Cache so that the code doesn't have to be translated all over again if it needs to run again later.</p>
<p>Usually when we optimize the JIT, the improvement is in how the code gets translated. But this time, <strong><a href="https://github.com/krnlyng">krnlyng</a></strong> has improved how quickly Dolphin can start executing the next block after a block is done running. Or to be more specific, how quickly Dolphin can do it in the case where it doesn't know in advance which block comes next.</p>
<p>To find out what block to run, Dolphin has a large table that maps emulated code addresses to the corresponding block of translated code. Before <strong><a href="https://github.com/krnlyng">krnlyng</a></strong>'s changes, this table was 256 KiB, and doing lookups in the table worked as follows:</p>
<ol>
<li>Dolphin grabs the lowest 16 bits of the current emulated code address. This results in a number from 0 to 65,535.</li>
<li>The number calculated in the previous step is used as an index in the table. Dolphin reads the table at that index and gets a pointer to JIT block metadata.</li>
<li>Dolphin checks that the pointer isn't 0, and then reads the JIT block metadata. If the pointer is 0, the code hasn't been translated yet, so Dolphin has to go and translate it before it can continue.</li>
<li>Dolphin checks that the emulated code address stored in the JIT block metadata matches the current emulated code address. Sometimes, the address might not match because two different emulated addresses have been mapped to the same index in the table. In that case, Dolphin has to use a much slower piece of code to find the right block.</li>
<li>Dolphin checks that the IR and DR bits of the MSR register match. We'll skip the details, but this is very similar to the previous step.</li>
<li>Dolphin gets the pointer to the translated code from the JIT block metadata, and jumps to it.</li>
</ol>
<p>After the changes, Dolphin has a new table that's <strong>32 GiB</strong> in size, and doing lookups in it works as follows:</p>
<ol>
<li>Dolphin takes the entirety of the current emulated code address and prepends the MSR bits that were mentioned earlier. This results in a number from 0 to 17,179,869,183.</li>
<li>Dolphin reads the table at the index calculated in the previous step and gets a pointer directly to the translated code.</li>
<li>Dolphin checks that the pointer isn't 0. Like before, a 0 means that Dolphin has to stop what it's doing and go translate the code.</li>
<li>Dolphin jumps to the pointer.</li>
</ol>
<p>This not only gets rid of the problem of different emulated addresses sharing the same index in the table, but also lets us skip reading the JIT block metadata entirely! But you may have an important question: How the heck is Dolphin going to fit a 32 GiB table into RAM when many computers and all phones have less total RAM than that?</p>
<p>In reality, Dolphin isn't asking the operating system for 32 GiB of real memory. Instead, it sets up 32 GiB of <em>address space</em> and asks the operating system to only allocate memory as needed. The first time Dolphin tries to access any given section of the 32 GiB table that isn't backed by real memory, the operating system allocates a small chunk of memory on the fly and fills it with zeroes. In the end, this new table can use a few more megabytes of memory than the old table, but nowhere even near 32 GiB.</p>
<p>In an ideal world, that would be all we have to say about the new solution. But for Windows users, there's a special quirk. On most operating systems, we can use a special flag to signal that we don't really care if the system has 32 GiB of real memory. Unfortunately, Windows has no convenient way to do this. Dolphin still works fine on Windows computers that have less than 32 GiB of RAM, but if Windows is set to automatically manage the size of the page file, which is the case by default, starting any game in Dolphin will cause the page file to balloon in size. Dolphin isn't actually writing to all this newly allocated space in the page file, so there are no concerns about performance or disk lifetime. Also, Windows won't try to grow the page file beyond the amount of available disk space, and the page file shrinks back to its previous size when you close Dolphin, so for the most part there are no real consequences... unless you like to download large files while running Dolphin.</p>
<p>We will look into improving the situation on Windows, but for the time being, please don't be alarmed if you see a sudden decrease in available disk space when running Dolphin.</p>
<h4 id="50-20201-increase-farcodenearcode-cache-sizes-by-dreamsyntax"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20201/">5.0-20201 - Increase FarCode/NearCode Cache Sizes</a></strong> by <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong><a class="headerlink" href="#50-20201-increase-farcodenearcode-cache-sizes-by-dreamsyntax" title="Permanent link">¶</a></h4>
<p>When playing certain games for an extended time, Dolphin's JIT Cache has an annoying tendency to run out of space. The most prominent example is of games like <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_2:_Echoes_(GC)">Metroid Prime 2: Echoes</a> where the game can dynamically load code into different places in memory. An even more difficult case is N64 Virtual Console games, like <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Ocarina_of_Time">The Legend of Zelda: Ocarina of Time</a> which use a recompiler to generate code on the fly. Once either the FarCode or NearCode cache is full, they must both be flushed, wiping both old and <em>current</em> data in the cache. This forces the JIT to rebuild all the code the game currently is running on the fly, leading to a noticeable stutter that cannot be avoided.</p>
<p>A huge step that <em>mostly</em> remedied this situation was merged <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#50-12575-jit-codegen-space-reuse-by-admiralcurtiss">back in 2021</a> which allowed Dolphin to evict code from the JIT Cache that the game itself invalidated. However, It wasn't a perfect solution. Dolphin was reliant on the game invalidating code, but sometimes games <em>just don't</em>, especially if they happen to be a trashfire like <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>. Also it couldn't actually defragment evicted code, meaning that the longer the game was running, the more fragmented the caches would become. If there was no longer enough space to fit a chunk of code, a full flush would be required. Back in 2021, we mentioned that the ability to just use a bigger JIT Cache <em>was</em> still on the table, but we were worried about its ramifications and hoped it would not be necessary.</p>
<p>Fast forward to today, and <strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> made a proposal to expand the JIT Cache. As part of it, they showcased a game that blew away all of our tricks: <a href="https://wiki.dolphin-emu.org/index.php?title=Shadow_the_Hedgehog">Shadow the Hedgehog</a>. It generates just enough code that it created a consistent, rhythmic, annoying stutter due to the JIT Caches filling up and flushing every 15 - 30 minutes.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/kwqlrC9COpk" allowfullscreen></iframe></div><figcaption></figcaption>The pauses. Are very. Consistent.
</figure>
</div>
<p><strong><a href="https://github.com/dreamsyntax">dreamsyntax</a></strong> showed that enlarging the JIT Cache <em>completely eliminated</em> the JIT Cache flushes in <a href="https://wiki.dolphin-emu.org/index.php?title=Shadow_the_Hedgehog">Shadow the Hedgehog</a>, and showed many other games that benefitted from it as well. They made a compelling case, so with a little hesitation, we pulled the trigger. As of this change, the JIT Cache has been enlarged!</p>
<p>However, all of the things we were worried about with a larger JIT Cache, such as longer more severe stutters, just didn't happen. The JIT Cache flush stutters that we have observed take the same amount of time, yet they happen MUCH less frequently <em>if ever</em>. In fact, the potential to have a cache flush stutter is now pushed so far into a play session that it is outside the usual play session for most users! Players <em>may never see a JIT Cache flush stutter again</em> as of this change! It makes us feel a little silly that we were so hesitant to enlarge the cache.</p>
<p>So far it appears that this is the JIT Cache flush stutter solution we have all been waiting for. Hopefully that holds true, as any further improvements to the JIT Cache from here will be <em>much</em> harder.</p>
<p><em>Note: This change only applies to our x86-64 JIT, and does not affect our AArch64 JIT for ARM systems. Due to architectural differences, raising the AArch64 JIT Cache size beyond 128 MiB would require special solutions.</em></p>
<h4 id="50-20148-periodically-re-enable-steam-deck-gyro-by-arcanenibble"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20148/">5.0-20148 - Periodically Re-enable Steam Deck Gyro</a></strong> by <strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong><a class="headerlink" href="#50-20148-periodically-re-enable-steam-deck-gyro-by-arcanenibble" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:180px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/steam-release/steamdeckonwhite.jpg">
</div>
<p>In the latest version of SteamOS, the gyro is disabled whenever SteamOS thinks the gyro is not being used. This includes situations like opening the Steam Deck's menus, which users might do quite frequently!
For Dolphin, this would make the gyro suddenly stop working for unknown reasons, with no clear way to reenable it. We're not sure why this behavior changed, but we have no choice but to find some way to deal with it.</p>
<p><strong><a href="https://github.com/ArcaneNibble">ArcaneNibble</a></strong> came up with a clever workaround. Rather than try to detect when the gyro is enabled/disabled, Dolphin will try to re-enable the gyro <em>roughly</em> every second or so. If it's already enabled? No harm, no foul. If it's disabled, it'll usually get re-enabled quickly, hopefully before the player even noticed it was disabled.</p>
<p>This will make playing some of your favorite Wii games on the latest version of SteamOS a lot more enjoyable, without you having to worry about the motion controls suddenly breaking for previously unknown reasons.</p>
<h4 id="50-20097-and-50-20109-allow-widescreen-heuristic-to-be-modified-per-game-by-oatmealdome-and-billiard"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20097/">5.0-20097</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20109/">5.0-20109</a></strong> - <strong>Allow Widescreen Heuristic to be Modified Per-Game</strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> and <strong><a href="https://github.com/jordan-woyak">Billiard</a></strong><a class="headerlink" href="#50-20097-and-50-20109-allow-widescreen-heuristic-to-be-modified-per-game-by-oatmealdome-and-billiard" title="Permanent link">¶</a></h4>
<p>As an emulator for consoles in the 4:3 to 16:9 transition, players can expect to encounter many different aspect ratios as they play their library in Dolphin. So users don't have to change our aspect ratio setting with each game, we have a widescreen heuristic which detects how wide of an image the game is rendering and sets Dolphin accordingly.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2015-july/BogusNegativeAnemone.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2015-july/BogusNegativeAnemone.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>The widescreen heuristic works magically! ....usually.</figcaption>
</figure>
</div>
<p>Unfortunately, being a heuristic, Dolphin is effectively making an informed guess as to what aspect ratio the game wants. And sometimes, a game is able to fool our heuristic and create wildly inconsistent results!</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/pokemonwidescreen.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/pokemonwidescreen_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Oh no.</figcaption>
</figure>
</div>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_2:_Echoes_(GC)">Metroid Prime 2</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Pok%C3%A9mon_Colosseum">Pokémon Colosseum</a> and a few other games render certain effects with a viewport size that <em>tricks</em> our heuristic!</p>
<p>Unfortunately, we couldn't fix this by just changing what threshold the heuristic uses, as this would create false <em>negatives</em> - situations where the heuristic should have changed the aspect ratio but didn't. Regressions would be inevitable. Fortunately, there is a very simple solution available to us - our GameINIs. As of this change, the parameters used by our widescreen heuristic can be be overridden by our GameINIs. If we know a game is problematic for our heuristic, we can tweak how the heuristic behaves for that game without affecting any other games!</p>
<p>With that said, none of our GameINIs have had any parameters added yet. For the time being, you'll still run into problems in games like Pokémon Colosseum, but now that we have a workable system we can move forward with figuring out what parameters are needed for each problematic game.</p>
<h4 id="50-20041-add-support-for-touchscreen-latching-toggle-buttons-by-thunderousecho"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20041/">5.0-20041 - Add Support for Touchscreen Latching (Toggle) Buttons</a></strong> by <strong><a href="https://github.com/ThunderousEcho">ThunderousEcho</a></strong><a class="headerlink" href="#50-20041-add-support-for-touchscreen-latching-toggle-buttons-by-thunderousecho" title="Permanent link">¶</a></h4>
<p>Sometimes playing certain games in Dolphin on a touchscreen feels like an impossible challenge that would require another couple of hands and maybe a few extra fingers. For our touchscreen gamers, <strong><a href="https://github.com/ThunderousEcho">ThunderousEcho</a></strong> comes in with the ability to change various buttons on the touchscreen to be toggled instead of having to hold them down. This is known as a latching button, and is effectively the same as a toggle button in Dolphin's input system for physical controllers.</p>
<p>Simply tap the button once to have it "held" and then tap it a second time to release it. This is a simple addition, but it opens up the touchscreen controls a lot to be able to play more games on a touchscreen device. If you don't have a controller for your phone/tablet, or just prefer the single device form factor, latching might be the feature you need to play your favorite game.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/latchingbuttons.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-august/latchingbuttons_thumb.jpg"></a>
<figcaption>You can find the feature in the side menu, under Overlay Controls > Latching Controls.</figcaption>
</figure>
</div>
<h4 id="50-20001-another-panicalert-deadlock-fix-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-20001/">5.0-20001 - Another PanicAlert Deadlock Fix</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-20001-another-panicalert-deadlock-fix-by-josjuice" title="Permanent link">¶</a></h4>
<p>If you're a veteran of the Dolphin Progress Reports, you're well aware of the eternal battle with PanicAlerts and the seemingly random deadlocks they can cause in combination with certain settings. Thankfully, <em>another</em> one bites the dust as <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> fixes a hang that could happen when pressing the "Ignore for this session" button in a PanicAlert.</p>
<p>Is this the end of the PanicAlert deadlocks? Has our lovable villain finally been felled in such an anti-climatic manner? Find out next time on Progress Report Z.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2023-08-01&to=2023-011-15&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-19872/">5.0-19872</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-20347/">5.0-20347</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: May, June, and July 2023
2023-08-13T05:59:25+00:002023-08-13T06:30:44.408525+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2023/08/13/dolphin-progress-report-may-june-and-july-2023/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/progressreportheader-july2023.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/progressreportheader-july2023-mini.jpg" />
</header>
<p>It has been a bit of a tumultuous summer for the project, but now things are returning to normalcy. For those who somehow missed it, the Dolphin on Steam project <a href="https://dolphin-emu.org/blog/2023/07/20/what-happened-to-dolphin-on-steam/">has ceased</a> after contact between Valve and Nintendo. Though we disagree with their stance and decision, we respect Valve's right to impose whatever restrictions they want within their private storefront. Please read the full article for details.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/blog/2023/07/20/what-happened-to-dolphin-on-steam/">
<img src="https://dolphin-emu.org/m/user/blog/steam-release/steamwhat.jpg"></a>
<figcaption>
</figcaption>
</figure>
</div>
<p>Fortunately, all that means is that nothing is going to change. We're going to continue working hard to improve Dolphin and make it the best emulator it can be. </p>
<p>Speaking of which, we hope you enjoy this Dolphin Progress Report!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-19611-implement-custom-driver-support-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19611/">5.0-19611 - Implement Custom Driver Support</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-19611-implement-custom-driver-support-by-k0bin" title="Permanent link">¶</a></h4>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:8%; min-width:120px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png"></div>
<p>GPU drivers for Android devices have come a long way from the <a href="https://dolphin-emu.org/blog/2013/09/26/dolphin-emulator-and-opengl-drivers-hall-fameshame/">nightmare they once were</a>, but they still lag behind their desktop counterparts in many ways. Missing features, performance problems, and plain old bugs are still plentiful on Android drivers. Furthermore, while drivers are improving over time, these improvements <a href="https://www.esper.io/blog/android-dessert-bites-14-gpu-driver-updates-3819534">rarely make their way to existing devices</a>, which is considerably worse than desktop. However, for Dolphin, Android GPU drivers are now at least good enough to <em>work</em> most of the time. There may be bugs or issues, but usually you'll get an image and the emulated title will function.</p>
<p>Emulators for newer consoles weren't so lucky, however, and Android drivers have been an intense pain point for them. This spurred <strong><a href="https://github.com/bylaws">ByLaws</a></strong> to take action and develop the library <a href="https://github.com/bylaws/libadrenotools">libadrenotools</a>, which lets apps temporarily switch out the system driver for a user-provided driver. libadrenotools has tremendously improved the experience of emulating newer consoles on Android devices, as not only does it allow loading of newer versions of official drivers, but it also allows the loading of <em>unofficial</em> open source drivers that are substantially better than their official counterparts. Specifically of note is Freedreno Vulkan, also known as Turnip. It's a custom driver primarily for Adreno 600 GPUs (though support for Adreno 700 GPUs is in development as well) that is by far the most complete Vulkan driver available for Adreno.</p>
<p><strong><a href="https://github.com/K0bin">K0bin</a></strong> saw all of the improvements that libadrenotools and Turnip granted other emulators and realized that Dolphin could take advantage of them too. With this change, libadrenotools is now integrated into Dolphin, allowing Android users to choose which Vulkan GPU drivers they prefer. While Android driver issues were not as critical for us, the Freedreno driver is a breath of fresh air. Tons of Vulkan issues that have plagued our Adreno users are <em>gone</em> when using it.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/tp-adreno.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/tp-adreno_thumb.jpg" /></a>
<figcaption>For unknown reasons, paletted EFB copies are among the broken features on Adreno.</sub></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/tp-turnip.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/tp-turnip_thumb.jpg" /></a>
<figcaption>Turnip just works.</figcaption>
</figure>
</div>
</div>
<p>If your GPU is among those supported, Turnip offers an opportunity to get a driver that's much closer to desktop quality. However, we've only been talking about compatibility and bugs so far. How does Turnip compare to the official drivers in performance? Well, performance can be better, but it isn't always going to be. Sometimes the more complete implementation of features allows Dolphin to go faster than other drivers, sometimes the fact it's able to emulate things in a more complete manner means that the game might run a little slower. And, of course, the driver might not implement all features optimally, causing some variations that are out of the control of Dolphin.</p>
<p>Using an older phone, we can compare the Turnip driver to the latest supported Adreno driver and compare performance. We also compared to the Adreno OpenGL driver - as Turnip is for Vulkan only. All tests were done at 1x internal resolution in order to test the raw efficiency of the driver to keep maximum performance.</p>
<p><br/>
<script>
addChart(
{"chart":{"type":"column","polar":false},"title":{"text":"Custom Drivers Performance"},"subtitle":{"text":"Pixel 3a with Adreno 615"},"tooltip":{"headerFormat":"<span style=\"font-size:10px\">{point.key}</span><table>","pointFormat":"<tr><td style=\"color:{series.color};padding:0\">{series.name}: </td><td style=\"padding:0\"><b>{point.y:.1f} FPS</b></td></tr>","footerFormat":"</table>","shared":true,"useHTML":true},"plotOptions":{"column":{"pointPadding":0.2,"borderWidth":0},"series":{"animation":false,"dataLabels":{"enabled":true}}},"series":[{"name":"Custom Drivers Performance)","turboThreshold":0,"_colorIndex":0,"marker":{"enabled":false},"colorByPoint":false},{"name":"Native","turboThreshold":0,"_colorIndex":1},{"name":"Three","turboThreshold":0,"_colorIndex":2}],"data":{"csv":"\"Category\";\"Adreno\";\"Turnip\";\"OpenGLES\"\n\"Super Mario Galaxy\";35;32;24\n\"Pokemon Colosseum Singles Battle\";24;26;25\n\"Wind Waker Outset Island\";27;28;33","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"labels":{"format":"{value}FPS"}},"colors":["#ff3100","#006eff","#00c800","#00c800","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{"floating":false,"verticalAlign":"top"},"credits":{"enabled":false},"lang":{},"exporting":{},"xAxis":{"title":{},"labels":{}}})
</script>
<br/></p>
<p>The results vary quite a bit, with a different driver being faster for each game! However, for the most part performance is pretty similar between the different backends with the main benefit being that Turnip mostly just works. While there are the occasional bugs, much like with the <em>official</em> Adreno drivers, overall Turnip provides a more consistent experience. And with it under active development, the problems we have seen are likely to get fixed.</p>
<h5 id="a-note-to-non-adreno-users">A Note to Non-Adreno Users<a class="headerlink" href="#a-note-to-non-adreno-users" title="Permanent link">¶</a></h5>
<p>There is nothing fundamentally Adreno-specific about loading custom drivers. Unfortunately for users with other GPUs, there aren't any viable custom drivers at this time. If custom drivers do show up for these devices, we'll be able to update Dolphin to load them.</p>
<h4 id="50-19274-add-wiiconnect24-support-via-wiilink-by-sketch"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19724/">5.0-19274 - Add WiiConnect24 Support via WiiLink</a></strong> by <strong><a href="https://github.com/noahpistilli">Sketch</a></strong><a class="headerlink" href="#50-19274-add-wiiconnect24-support-via-wiilink-by-sketch" title="Permanent link">¶</a></h4>
<p>When WiiConnect24 shut down so suddenly just over ten years ago in June of 2013, there was a thought among Dolphin developers that WiiConnect24 would never be emulated - at least in Dolphin. For nearly 10 years, <a href="https://dolphin-emu.org/blog/2022/12/21/dolphin-progress-report-september-october-november-2022/#50-17613-implement-missing-features-for-wiiconnect24-support-by-noahpistilli">that remained true</a>. However, a lot of the core features of WiiConnect24 were still missing in Dolphin, and setting it up required use of third party tools to patch channels.</p>
<p>In the latest builds of Dolphin, users can now enable WiiConnect24 directly in Dolphin's GUI, allowing you to use the Forecast Channel, Nintendo Channel, and soon the News Channel and Everybody Votes Channel directly in the system menu without the need for patching channel files. This is all thanks to <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> (aka noahpistilli) who is both implementing critical features in Dolphin's Network/KD and reimplementing the servers which the channels themselves communicate with as the lead developer of <a href="https://www.wiilink24.com/">WiiLink</a>.</p>
<p>This marriage between the two sides of development has led to a WiiConnect24 revolution within Dolphin, and more features will be coming online in the future.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/dolphinweather-demo.mp4" type="video/mp4"/>
</video></div>
<figcaption>Here is a short demonstration video of the <a href="https://wiki.dolphin-emu.org/index.php?title=Forecast_Channel">Forecast Channel</a> made in Dolphin with WiiLink, showing the many cities that the channel supports! With the Wii console set to the United States, a total of 904 cities are available to view! </figcaption>
</figure>
</div>
<p>With Dolphin adding support for WiiLink, does this mean RiiConnect24 will not work in Dolphin? Of course not! The same methods used to patch channels with RiiConnect24 will continue to work in the latest versions of Dolphin.</p>
<p>Choosing between WiiLink and RiiConnect24 for a default service was not an easy task. RiiConnect24 has been an invaluable part of the WiiConnect24 preservation scene and will continue to work in Dolphin. However, with <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> working on both the server side (WiiLink) and the client side (Dolphin), compatibility and stability is currently higher with WiiLink. As well, there are some features of RiiConnect24 that use cIOS features that do not currently work in Dolphin that are handled without cIOSes in WiiLink.</p>
<p>Something to keep in mind is that Dolphin's priority is to emulate <strong>WiiConnect24</strong> to the best of its ability. Currently, <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> is reimplementing WiiConnect24 features in a manner that would work alike to the original WiiConnect24 servers. We are aware that some bugs/inaccuracies in Dolphin's implementation of Network/KD that, when fixed, will require changes from RiiConnect24 in order to maintain compatibility.</p>
<p>We also request that users who have used the RiiConnect24 VFF downloader delete any VFF files created by it, as well as disable the downloader. The VFFs created by it are made to never expire, meaning new files will never be downloaded by Dolphin. To locate these, click <code>File -> Open User Folder</code> and then navigate to <code>Wii/title/00010002/484146xx/data</code> for the Forecast Channel and <code>Wii/title/00010002/484147xx/data</code> for the News Channel, where <code>xx</code> is <code>45</code> for NTSC-U consoles, <code>50</code> for PAL and <code>4a</code> for Japanese. If you're having problems with WiiLink/RiiConnect24 on the latest builds and have used the VFF downloader in the past, that may be the source of your troubles.</p>
<p>Note for those who want to use an unmodified Nintendo Channel: <strong>Cheats must be enabled in order for the channel to work.</strong></p>
<h4 id="50-19448-android-disney-infinity-base-support-by-dereeperjosh"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19448/">5.0-19448 - Android - Disney Infinity Base Support</a></strong> by <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong><a class="headerlink" href="#50-19448-android-disney-infinity-base-support-by-dereeperjosh" title="Permanent link">¶</a></h4>
<p>If everyone is being honest, there probably isn't much point to this feature, at least right now. The only game that supports the Disney Infinity Base on the Wii is <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a>, possibly the crown jewel of the Disney Trio of Destruction. There is no existing <em>desktop</em> computer that can run the game full speed given how Dolphin currently emulates the game. For phones, the situation is even worse.</p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/infinitybaseandroid.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/infinitybaseandroid_thumb.jpg"></a>
<figcaption>Note the FPS in this screenshot. Disney Infinity will not even get close to fullspeed on any device currently available, so don't get your hopes up.
</figcaption>
</figure>
</div>
<p>But, maybe some day, some AArch64 JIT improvement and/or some future phone will somehow emulate Disney Infinity at a playable framerate. Whenever that happens, future Android users will be able to emulate the Infinity Base and get in game without the need for physical hardware.</p>
<h4 id="50-19554-android-fix-trigger-detection-issue-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19554/">5.0-19554 - Android - Fix Trigger Detection Issue</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-19554-android-fix-trigger-detection-issue-by-josjuice" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:180px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/BSPD3_thumb.jpg">
</div>
<p>After the release of the <a href="https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/#50-18920-rewrite-android-input-handling-by-josjuice">input handling rewrite</a> a few months ago, there have been a few growing pains. A rather annoying one for many users was an issue causing trigger inputs from certain controllers to simply be ignored in the menu. More frustratingly, you could actually <em>manually</em> add them if you knew your way around the advanced mapping options!</p>
<p>This turned out to be relatively easy to fix in the end, though. The input handling rewrite brought a lot of code from the PC version of Dolphin to the Android version, including a piece of code that is designed to skip over button inputs in case a gamepad provided both a button input and an axis input for a trigger at the same time. But the affected controllers on Android were doing something that the PC version of Dolphin had never ran into: each trigger provided <em>two</em> axis inputs. Because the code wasn't expecting this, both of the inputs were getting skipped by accident. With the cause of the problem known, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> was able to change the code to let both inputs through.</p>
<p>Users that suffered from this regression should be able to configure their controllers directly in the GUI again in the latest Play Store release.</p>
<h4 id="50-19863-add-filesize-checks-to-check-nand-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19863/">5.0-19863 - Add Filesize Checks to Check NAND</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-19863-add-filesize-checks-to-check-nand-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>With the Wii NAND coming more to the forefront with some of Dolphin's latest features, <em>Check NAND</em> has been seeing a lot more usage. The long-story-short of it is that the Wii File System is <em>extremely</em> tempermental and prone to breaking, so back in the day <strong><a href="https://github.com/leoetlino">leoetlino</a></strong> created a feature that allowed Dolphin to check the Wii NAND for certain common problems and automatically fix them.</p>
<p>Check NAND was mostly a tool used to fix the NAND to get the Wii Shop and <a href="https://wiki.dolphin-emu.org/index.php?title=Dragon_Quest_X:_Mezameshi_Itsutsu_no_Shuzoku_Online">Dragon Quest X</a> working - as even the slightest problem with the NAND would prevent them from booting. However, it wasn't designed to fix everything, and it'll often say no problems found when in fact there are critical problems with the NAND.</p>
<p>Enter <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong>. Having debugged an issue where a user's NAND was "overfilled" due to spurious files being placed in the NAND directory, they decided that it was time to expand the scope of Check NAND a bit more. In the latest versions of Dolphin, Check NAND will now make sure that the NAND size is within the bounds of the Wii NAND.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/nandcheck.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/nandcheck.png"></a>
<figcaption>
</figcaption>
</figure>
</div>
<p>On a modern computer with terabytes of storage, you might think that the Wii NAND being limited to just 512MB is a bit archaic and that Dolphin should just allow any NAND size. And we technically do - you can keep adding things to the NAND even if it is over that maximum size. Unfortunately, the Wii System Menu and many games have checks to make sure that the NAND isn't getting close to full. Even if we tell the Wii it has way more NAND space, it is <em>hardcoded</em> to use exactly 512MB, with certain portions of it being reserved.</p>
<p>In the past, Dolphin has tried to lie to the emulated Wii about the size of installed files, saying that they were one block no matter how big they were, but this just caused other problems and we ran into other limitations even in situations where that hack did seem to help. So for now, we're handling things as accurately as possible in order to make sure users don't jeopardize their Wii Save Data.</p>
<p>It's possible there is some magic combination of hacks that could <em>maybe</em> trick the emulated Wii into supporting more/bigger files, but so far we haven't found it. And considering how many people run into the Wii's paltry NAND size limits, a hack like this wouldn't see much resistance into being merged as an option.</p>
<h4 id="50-19716-support-accurate-ntscpal-color-spaces-by-filoppi"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19716/">5.0-19716 - Support Accurate NTSC/PAL Color Spaces</a></strong> by <strong><a href="https://github.com/Filoppi">Filoppi</a></strong><a class="headerlink" href="#50-19716-support-accurate-ntscpal-color-spaces-by-filoppi" title="Permanent link">¶</a></h4>
<p>The GameCube and Wii were designed with analog CRT televisions in mind. In this era, "close enough" was the rule of the day. For example, each region had their own slightly different color spaces and gamma targets. Games almost never accounted for these differences, so how each game would appear varied slightly from region to region! To emulate this, Filoppi (helped by <a href="https://github.com/EndlesslyFlowering">Lilium</a>) has implemented a suit of color space and gamma correction settings.</p>
<p>Dolphin's color correction provides several color space options. Using these profiles, you can now set Dolphin to match the colour space of any given region and either make it match how you remember it in your region, or just see how your game would look in an entirely different region!</p>
<div class="media-block full-width">
<div class="swap" ontouchstart>
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/normalcolorspace_thumb.jpg" alt="First Image">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/ntscmcolorspace_thumb.jpg" class="img-top" alt="Active Image">
</div>
<p style="margin-top: .5em; max-width: 100%; text-align:center;"><em>This is the unmodified color space. Click/Tap and hold to see the NTSC-M color space.</em><br/>The difference is VERY subtle.</p>
</div>
<p>Something a little more impactful from these changes is <em>gamma correction</em>. Most GameCube games (and some Wii games) targeted a gamma value of roughly 2.35. Modern televisions and monitors normally use a value of 2.2, which can result in these games looking a tiny bit brighter than they would have (by default) on hardware of the day.</p>
<div class="media-block narrow">
<div class="swap" ontouchstart>
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/notgammacorrected.png" alt="First Image">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-july/gammacorrected.png" class="img-top" alt="Active Image">
</div>
<p style="margin-top: .5em; max-width: 100%; text-align:center;"><em>This is the normal image. Click/Tap and hold to see the gamma corrected version.</em><br/>The gamma corrected version has subtly crushed blacks for a slightly spookier vibe.</p>
</div>
<p>While it's possible for users to adjust their monitor's settings, and <em>some</em> games come with built-in gamma correction, <strong><a href="https://github.com/Filoppi">Filoppi</a></strong> added gamma correction to the color space features within Dolphin's settings in order to streamline the experience.</p>
<p>Note that these settings and features have not been ported to the Android version of Dolphin yet, however that is <a href="https://github.com/dolphin-emu/dolphin/pull/12095">in progress</a>.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2023-05-01&to=2023-07-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-19370/">5.0-19370</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-19870/">5.0-19870</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
<p><style>
.swap {
position: relative;
display: inline-block;
}
.swap .img-top {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99;
}
.swap:active .img-top {
display: inline;
}
</style></p>
What Happened to Dolphin on Steam?
2023-07-20T08:11:32+00:002023-07-20T08:18:11.976637+00:00https://dolphin-emu.org/blog/2023/07/20/what-happened-to-dolphin-on-steam/
<header>
<img src="https://dolphin-emu.org/m/user/blog/steam-release/steamwhat.jpg" />
<img class="mini" src="https://dolphin-emu.org/m/user/blog/steam-release/steamwhatmini.jpg" />
</header>
<p>Well that blew up, huh? If you follow emulation or just gaming on the whole, you've probably heard about the controversy around the Dolphin Steam release and the Wii Common Key. There's been a lot of conclusions made, and while we've wanted to defend ourselves, we thought it would be prudent to contact lawyers first to make sure that our understanding of the situation was legally sound. That took some time, which was frustrating to ourselves and to our users, but now we are educated and ready to give an informed response.</p>
<p><a id="cuthere"></a>
We'd like to thank Kellen Voyer of <a href="https://voyerlaw.com">Voyer Law</a> for providing us with legal council for this matter. And to be clear, all of the analysis below is specifically regarding US law. Without further delay, let's begin.</p>
<h3 id="what-actually-happened">What actually happened?<a class="headerlink" href="#what-actually-happened" title="Permanent link">¶</a></h3>
<p>First things first - Nintendo <strong>did not</strong> send Valve or Dolphin a Digital Millenium Copyright Act (DMCA) section 512(c) notice (commonly known as a DMCA Takedown Notice) against our Steam page. Nintendo has not taken any legal action against Dolphin Emulator or Valve.</p>
<p>What actually happened was that Valve's legal department contacted Nintendo to inquire about the announced release of Dolphin Emulator on Steam. In reply to this, a lawyer representing Nintendo of America requested Valve prevent Dolphin from releasing on the Steam store, citing the DMCA as justification. Valve then forwarded us the statement from Nintendo's lawyers, and told us that we had to come to an agreement <em>with Nintendo</em> in order to release on Steam. Considering the strong legal wording at the start of the document and the citation of DMCA law, we took the letter very seriously. We wanted to take some time and formulate a response, however after being flooded with questions, we wrote a <a href="https://dolphin-emu.org/blog/2023/05/27/dolphin-steam-indefinitely-postponed/">fairly frantic statement</a> on the situation as we understood it at the time, which turned out to only fuel the fires of speculation. </p>
<p>So, after a long stay of silence, we have a difficult announcement to make. We are abandoning our efforts to release Dolphin on Steam. Valve ultimately runs the store and can set any condition they wish for software to appear on it. But given Nintendo's long-held stance on emulation, we find Valve's requirement for us to get <em>approval</em> from Nintendo for a Steam release to be impossible. Unfortunately, that's that. But there are some more serious matters to discuss, some that are much bigger than Dolphin's Steam Release.</p>
<h3 id="what-about-the-key">What about the key?<a class="headerlink" href="#what-about-the-key" title="Permanent link">¶</a></h3>
<p>Over the past few weeks, a lot has been said about Dolphin including the Wii Common Key. As you may know, Wii games are encrypted, and the Wii uses the "common key" that is burned into the console to decrypt Wii discs. Wii software does not have any access to the key whatsoever, however, some smart engineers and a pair of tweezers was all it took to extract the key. If you haven't heard this story before, we highly recommend <a href="https://media.ccc.de/v/25c3-2799-en-console_hacking_2008_wii_fail">checking out the 25c3 presentation on the actual Tweezer Exploit that gave Team Twiizers its original name</a>. It's an incredibly entertaining video that's worth your time. If you aren't familiar with Team Twiizers, perhaps you know them under their modern name: <a href="https://fail0verflow.com">fail0verflow</a>.</p>
<p>The extraction of the Wii Common Key did not elicit any kind of legal response from anyone. It was <a href="https://hackmii.com/2008/04/keys-keys-keys/">freely shared</a> <em>everywhere</em>, and eventually made its way into Dolphin's codebase <a href="https://github.com/dolphin-emu/dolphin/commit/6ff164585ce5b63ef91a4c6635e35a7fe938ea1f">more than 15 years ago</a> (committed by a Team Twiizers member no less). </p>
<p>These keys have been publicly available for years and no one has really cared. US law regarding this has not changed, yet a lot of armchair lawyers have come out talking about how foolish we were to ship the Wii Common Key. Fueling this is Nintendo's letter to Valve, which cites the anti-circumvention provisions of the DMCA (<a href="https://www.law.cornell.edu/uscode/text/17/1201">17 U.S.C. § 1201</a>), particularly because Dolphin has to decrypt Wii games. </p>
<p><br/><blockquote style="font-size:1.1em">Wii and Nintendo GameCube game files, or ROMs, are encrypted using proprietary cryptographic keys. The Dolphin emulator operates by incorporating these cryptographic keys without Nintendo’s authorization and decrypting the ROMs at or immediately before runtime. Thus, use of the Dolphin emulator unlawfully “circumvent[s] a technological measure that effectively controls access to a work protected under” the Copyright Act. 17 U.S.C. § 1201(a)(1). Distribution of the emulator, whether by the Dolphin developers or other third-party platforms, constitutes unlawful “traffic[king] in a[] technology . . . that . . . is primarily designed or produced for the purpose of circumventing a technological measure . . . .” 17 U.S.C. § 1201(a)(2)(A).<sup>3</sup><footer><a href="https://dolphin-emu.org/m/user/blog/steam-release/lettertovalve.png">Nintendo's Letter to Valve</a></footer></blockquote><br/></p>
<p>This sounds extremely bad at a glance (and we certainly had a moment of panic after first reading it), but now that we have done our homework and talked to a lawyer, we are no longer concerned.</p>
<p>We have a very strong argument that Dolphin is <strong>not</strong> primarily designed or produced for the purpose of circumventing protection. Dolphin is designed to recreate the GameCube and Wii hardware as software, and to provide the means for a user to interact with this emulated environment. Only an <em>incredibly tiny</em> portion of our code is actually related to circumvention. Additionally, GameCube games aren't actually encrypted at all, and Dolphin can also play homebrew and is used in the development of game mods. There are even homebrew and mods that specifically target Dolphin as its own platform, given that it has the ability to emulate more memory and processing power than is possible on the original consoles. That's why there are "Dolphin modes" in many modern homebrew games!</p>
<p>Considering that only a small fraction of what we do involves circumvention, we think that the claim that we are "primarily for circumvention" is a <strong>reach</strong>. We do not believe this angle would be successful in a US courtroom, if it were ever to come to that. The reason the lawyers representing Nintendo would make such a leap is because they wished to create a narrative where the DMCA's exemptions do not apply to us, as these exemptions are powerful and widely in our favor. Of particular note for Dolphin is the reverse engineering exemption in <a href="https://www.law.cornell.edu/uscode/text/17/1201#e">17 U.S.C. § 1201(f)</a> which states that:</p>
<p><br/><blockquote style="font-size:1.1em">
...a person may develop and employ technological means to circumvent a technological measure, or to circumvent protection afforded by a technological measure, in order to enable the identification and analysis under paragraph (1), or for the purpose of enabling interoperability of an independently created computer program with other programs, if such means are necessary to achieve such interoperability, to the extent that doing so does not constitute infringement under this title.
<footer>17 U.S.C. § 1201(f)(2)</footer></blockquote><br/></p>
<p>Dolphin is an independently created computer program that is circumventing Wii disc encryption for interoperability with Wii software. According to this exemption, this does not constitute infringement under 17 U.S.C. § 1201. This exemption even allows distribution of information collected through circumvention, like encryption keys, if it is for software interoperability.</p>
<p><br/><blockquote style="font-size:1.1em">The information acquired through the acts permitted under paragraph (1), and the means permitted under paragraph (2), may be made available to others if the person referred to in paragraph (1) or (2), as the case may be, provides such information or means solely for the purpose of enabling interoperability of an independently created computer program with other programs, and to the extent that doing so does not constitute infringement under this title or violate applicable law other than this section.
<footer>17 U.S.C. § 1201(f)(3)</footer></blockquote><br/></p>
<p>17 U.S.C. § 1201(f) is a significant legal protection for emulation in the US, and it is why Nintendo has yet to legally challenge any emulator with the DMCA anti-circumvention clauses despite the law going into effect <em>25 years ago</em>. Unless a court rules that our understanding of the law is incorrect, we have every reason to believe that our decryption of Wii game discs is covered by this exemption.</p>
<p>After this situation blew up, we received <em>many</em> requests, and even some demands, to remove all Wii keys from our codebase. We're disappointed that so many people on YouTube and social media <em>didn't even consider</em> that maybe the team had done their research and risk analysis before including the keys, and just assumed that now that it was "pointed out to us" we would remove them. However, <strong>we do not think that including the Wii Common Key actually matters</strong> - the law could easily be interpreted to say that circumventing a Wii disc's encryption <em>by any means</em> is a violation. As such, it is our interpetation that <strong>removing the Wii keys would not change whether the exemption in 17 U.S.C. § 1201(f) applies to us or not.</strong></p>
<p>In fact, we think that offloading decryption tasks onto a potential 3rd party application would make the situation worse for everyone. As such, we believe leaving the keys as they are is the best course of action.</p>
<p>And to all the armchair lawyers out there, the letter to Valve did not make any claims that we were violating a US copyright by including the Wii Common Key, as a <em>short string of entirely random letters and numbers generated by a machine</em> <a href="https://www.copyright.gov/comp3/chap300/ch300-copyrightable-authorship.pdf">is not copyrightable</a> under current US copyright law. If that ever changes, the world will be far too busy to think about emulation.</p>
<h3 id="what-happens-now">What happens now?<a class="headerlink" href="#what-happens-now" title="Permanent link">¶</a></h3>
<p><strong>We do not believe that Dolphin is in any legal danger</strong>. We can look to the end of the message Valve forwarded to us to show this. After all of the scary language, Nintendo made no demands and made only a single request to Valve.</p>
<p><br/><blockquote style="font-size:1.1em">We specifically request that Dolphin’s “coming soon” notice be removed and that you ensure the emulator does not release on the Steam store moving forward.</sup><footer><a href="https://dolphin-emu.org/m/user/blog/steam-release/lettertovalve.png">Nintendo's Letter to Valve</a></footer></blockquote><br/></p>
<p>In the end, Valve is the one running the Steam store front, and they have the right to allow or disallow anything they want on said store front for any reason. As for Nintendo, this incident just continues their existing stance towards emulation. We don't think that this incident should change anyone's view of either company.</p>
<p>As a silver lining, some of the features being developed for the Steam release will still work in Dolphin's normal builds, and are still being developed. One of the features we are most excited for is a full "Big Picture" GUI that can be used directly with a controller. That is still going to happen <em>regardless</em> of a Steam release, alongside several smaller features that were meant to be quality of life improvements for Steam builds.</p>
<p>The last thing we'd like to do before signing off is thank the developers who put a lot of effort into the Steam release. <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> in particular was the architect of Dolphin's Steam Integration, working with Dolphin's infrastructure and Steam to take it from theory all the way to a fully-functional version of Dolphin. We'd also like to thank <strong><a href="https://github.com/delroth">delroth</a></strong> for the immense amount of CI work the past few months, which gave OatmealDome a solid foundation to build from. Finally, <strong><a href="https://github.com/MayImilae">MayImilae</a></strong> put in a large amount of media work toward the Steam release despite also working on a major upcoming feature.</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin on Steam Indefinitely Postponed
2023-05-26T23:19:02+00:002023-05-27T06:35:04.116613+00:00https://dolphin-emu.org/blog/2023/05/27/dolphin-steam-indefinitely-postponed/
<p>It is with much disappointment that we have to announce that the Dolphin on Steam release has been indefinitely postponed. We were notified by Valve that Nintendo has issued a cease and desist citing the DMCA against Dolphin's Steam page, and have removed Dolphin from Steam until the matter is settled. We are currently investigating our options and will have a more in-depth response in the near future.</p>
<p>We appreciate your patience in the meantime.</p>
Dolphin Progress Report: February, March, and April 2023
2023-05-21T07:27:22+00:002023-05-22T05:22:49.538494+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2023/05/21/dolphin-progress-report-february-march-april-2023/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/progressreportheader-feb2023.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/progressreportheader-feb2023-mini.jpg" />
</header>
<p>It's been a hectic past few months for the project. In addition to the <a href="https://dolphin-emu.org/blog/2023/03/28/coming-soon-dolphin-steam/">upcoming release on Steam</a>, a lot of focus has gone into other major features. While not everything has landed yet, two very important changes to Android <em>did</em> arrive, one of which has been in the works for a couple years!</p>
<p>We're talking about a large scale rewrite to Dolphin's Android Input Handling that will eventually allow it to match the feature set users on Desktop Dolphin builds enjoy. Android users also get another major quality of life upgrade - Dolphin is now a Document Provider on Android. This means you can use Dolphin to directly copy files into and out of its <em>per-app directory</em> on the latest versions of Android.</p>
<p>In this report, we'll be going through both of these and several other important changes. Enjoy!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-18920-rewrite-android-input-handling-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18920/">5.0-18920 - Rewrite Android Input Handling</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-18920-rewrite-android-input-handling-by-josjuice" title="Permanent link">¶</a></h4>
<p>Over <em>ten</em> years ago, back in the ancient time known as "<em>late 2012</em>", <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> started development on a new Dolphin JIT that could run on ARM processors. Back then it was an incredibly bold move - there were no ARM devices that even had a <em>prayer</em> of running Dolphin close to full speed. It was a forward thinking project that took on many incredibly difficult hurdles. </p>
<p>While today the ARM JIT is mostly used on Android phones, the early ARM JIT development was done on development boards and Chromebooks running Linux. Phones simply didn't have the features/speed to even <em>hope</em> to run Dolphin at that point. However, once phones began to appear with the bare minimum featureset required to run Dolphin, <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> began work on porting Dolphin to Android using the new ARM JIT. And thus, a new challenge appeared for <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> - <em>Android itself</em>.</p>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:8%; min-width:120px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png"></div>
<p>One of the biggest annoyances with Dolphin on Android comes from Android's interfaces being written in Java versus Dolphin's being written in C++. In order to bridge these two languages together, we have to use JNI (Java Native Interface). In order to go the path of least resistance and get things working, <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> decided to just make a quick reimplementation in Java. It was less code overall at the time and meant things could be working more easily. Less time spent working on input meant more time working on the fun parts.</p>
<p>However, the quick implementation that <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> threw together just... remained, with feature after feature bolted onto it over a decade. This is how Dolphin's Android's Input fell into such a problematic state. Plus, it was separate from Dolphin's C++ input implementations, so any improvements had to be manually ported over. Most of the time the latest input features simply wouldn't come to Dolphin Android.</p>
<p>To rectify this situation, Android's entire Input system had to be ripped out and started anew.</p>
<h5 id="android-controller-support-reborn">Android Controller Support Reborn<a class="headerlink" href="#android-controller-support-reborn" title="Permanent link">¶</a></h5>
<p>For the past couple of years, users have been desperately asking for improvements to Dolphin's Touch Controls and Android Controller Support. We've continually turned them away, promising that work was being done on it. While it was possible to hack improvements into the Java implementation, it would have been a temporary band-aid fix. These fixes would then have to be thrown out if a proper fix was ever to come into fruition, which we knew was coming.</p>
<p>Behind the scenes, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> has been slowly removing <em>all</em> of the Java reimplementations of C++ parts of Dolphin on Android and moving them over to JNI. While there were multiple parts of Dolphin reimplemented in Java, input handling was one of the biggest and most convoluted. It proved to be a much more difficult task than the other sections.</p>
<p>Part of the problem is that input handling in Dolphin is complicated. We have to give users options to deal with motion controls, infrared, controller orientation, swapping attachments, swapping controllers, and more. Depending on what kind of controller you have, you might need entirely different features to play through a game. Worse yet, you might need <em>entirely different settings</em> to play two different games.</p>
<p>The project to port the handling over to JNI so we can use the C++ implementation directly has been a multiyear endeavor. And while the initial work has been merged, not everything is fully complete yet. <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> had to move out some parts of it in order to keep the pull request reviewable and to avoid regressions that haven't been hammered out quite yet. Still, the JNI port of Dolphin's input handling <strong>already has a ton of long requested features</strong>!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/androidinput.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/androidinput_thumb.png"></a>
<figcaption> The Advanced Input Page finally reaches Android greatly opening the door for more advanced input schemes.
</figcaption>
</figure>
</div>
<ul>
<li>You can change controller settings while emulation is running.</li>
<li>You can save and load input profiles. (The old feature of per-game mappings is replaced by per-game input profiles.)</li>
<li><a href="https://wiki.dolphin-emu.org/index.php?title=Input_Syntax">Advanced input expressions.</a></li>
<li>You can map your device's accelerometer and gyroscope to whatever you want, not just Wii Remote motions.</li>
<li>Support for many new device sensors. (How about the ambient light level, or the hinge angle of a foldable phone?)</li>
<li>If a device or gamepad has multiple motors, you can now choose between them for rumble. (Requires Android 12 or later.)</li>
<li>You can set many boolean and numeric controller settings that weren't available on Android before, like Relative Input.</li>
<li>The Sideways Wii Remote setting, the numeric settings for Wii Remote pointing, and the setting for disabling accelerometer/gyroscope pointing have been moved from the in-emulation settings to the regular settings.</li>
<li>The touchscreen controller type setting has been overhauled. Users can now choose between all controllers 1-4, but selecting a Wii Remote extension is now done in the regular settings.</li>
<li>Separate gamepads are never treated as a single gamepad anymore.</li>
<li>Dolphin no longer mixes up buttons and axes that have the same ID.</li>
<li>Possibly fixes for various issues with detecting axes.</li>
</ul>
<p>Because Android now uses the same input core as desktop builds, this will allow newer input features to hit Android builds at a more consistent rate. This does come with one caveat - all configurations for the <em>old</em> Android Input will no longer work on new builds, meaning users will have to reconfigure controllers under the new system.</p>
<h4 id="50-18922-android-implement-document-provider-support-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18922/">5.0-18922 - Android: Implement Document Provider Support</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-18922-android-implement-document-provider-support-by-k0bin" title="Permanent link">¶</a></h4>
<p>With Scoped Storage and the per-app directories in modern versions of Android, modifying Dolphin's user contents has gotten a lot harder. The days of just having a typical "User Directory" in an easy-to-access place on Android are gone. We're stuck using gated per-app directories that <em>only Dolphin can access</em>. The problem with that, is that if you want to modify those files to add a Texture Pack or Riivolution mod, you more or less have to use a computer or something that bypasses Android's restrictions altogether!</p>
<p>In an effort to mitigate these problems, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> added the ability for users to import/export the entire user directory via zip files. Unfortunately, it seems many Android distributions use non-standard zip formats that our basic implementation couldn't handle for unknown reasons. A better long-term solution was needed.</p>
<p>Thankfully, other emulators have run into the same issues as us and have come up with some rather robust solutions. <strong><a href="https://github.com/K0bin">K0bin</a></strong> implemented Document Provider Support to allow file managers with that feature to access Dolphin's per-app directories!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/android-documentprovider.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/android-documentprovider_thumb.png"></a>
<figcaption> Document Provider Support allows easier access to per-app directories.
</figcaption>
</figure>
</div>
<p><a href="https://dolphin-emu.org/download/dev/master/5.0-19234/">5.0-19234</a> added some further improvements, as well as a distinction between "debug" and "release" builds in order to reduce confusion when handling user directories.</p>
<h4 id="50-18957-fix-wii-remote-disconnect-deadlock-by-dentomologist"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18957/">5.0-18957 - Fix Wii Remote Disconnect Deadlock</a></strong> by <strong><a href="https://github.com/Dentomologist">Dentomologist</a></strong><a class="headerlink" href="#50-18957-fix-wii-remote-disconnect-deadlock-by-dentomologist" title="Permanent link">¶</a></h4>
<p>A common complaint with using <em>Real</em> Wii Remotes for <em>Emulated</em> controllers is that if the Wii Remote were to suddenly disconnect from Dolphin, sometimes the entire emulator would go down with it! Because the problem wasn't especially consistent, tracking it down was annoying until <strong><a href="https://github.com/Dentomologist">Dentomologist</a></strong> came up with a fairly consistent method of triggering the crash.</p>
<p>Once reproducing the crash was sorted out, they found a potential deadlock with device population while debugging it. By putting safeguards to prevent this deadlock, <strong><a href="https://github.com/Dentomologist">Dentomologist</a></strong> fixed the crash and now disconnecting Wii Remotes should be <em>quite</em> a bit safer.</p>
<h4 id="50-18576-kill-renderer-by-phire"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18576/">5.0-18576 - Kill Renderer</a></strong> by <strong><a href="https://github.com/phire">phire</a></strong><a class="headerlink" href="#50-18576-kill-renderer-by-phire" title="Permanent link">¶</a></h4>
<p>Not all big changes are supposed to have an immediate impact. Kill Renderer is something, that if implemented correctly, should cause nothing to change for the time being. It's just a step toward some more important changes down the line, and the reason that it is necessary requires us to dive into Dolphin's history and learn a bit about this mysterious "renderer".</p>
<p>Renderer exists because Dolphin was originally a plugin based emulator, much akin to the Nintendo 64 emulators being developed during that era, and Renderer was the abstraction interface for those plugins. Though Dolphin moved away from plugins fairly quickly, Renderer managed to stick around, consuming work that really should have been elsewhere in the emulator.</p>
<p>This design philosophy did have some limitations, but for the most part it stayed out of the way. At least, until <strong><a href="https://github.com/phire">phire</a></strong> began working on a feature called <em>asynchrounous presentation.</em> Right now, all logic in Dolphin's output (including various GUI element like ImGui) are based on the framerate of the game. This is what causes Dolphin's overlays to look "choppy" in low FPS games (like in <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>) and causes them to completely freeze during periods when a game stops outputting frames (such as during static loading screen or fadeout). Asynchorous presentation would allow us to decouple our output from the game's framerate, correcting all of those issues and paving the way for future goals.</p>
<p>One of those goals is to improve our framepacing. Outside of the very specific circumstance where your display happens to closely match the game's framerate, our framepacing is horrendous. While Freesync/Gsync monitors can mostly mitigate this, most monitors aren't happy with the locked 29.97, 50, or 25 framerate of many supported games. We can't really do much about this when presentation is locked to the game's framerate, so asychronous presentation will be the foundation of our efforts to improve our framepacing. </p>
<p>Kill Renderer <em>is not</em> asynchronous presentation, but it is a major step in that direction. We're highlighting it here because it is a major change to Dolphin's core, and while it <em>shouldn't</em> have any userfacing changes, we've already found and fixed a couple of <a href="https://dolphin-emu.org/download/dev/master/5.0-18818/">major</a> (and <a href="https://dolphin-emu.org/download/dev/master/5.0-18815/">minor</a>) bugs caused by the change.</p>
<h4 id="50-18953-portal-of-power-support-trapteam-audio-by-dereeperjosh"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18953/">5.0-18953 - Portal of Power - Support TrapTeam Audio</a></strong> by <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong><a class="headerlink" href="#50-18953-portal-of-power-support-trapteam-audio-by-dereeperjosh" title="Permanent link">¶</a></h4>
<p>This is a quick update to our <a href="https://dolphin-emu.org/blog/2023/02/12/dolphin-progress-report-december-2022-january-2023/">Portal of Power</a> emulation. <a href="https://wiki.dolphin-emu.org/index.php?title=Skylanders:_Trap_Team">Skylanders: Trap Team</a> introduced a speaker on the portal that could play various audio clips throughout the game.</p>
<p>Understanding the audio packets was a bit complicated, so the emulated portal skipped over this feature initially, but given a little more time, <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> was able to figure out how it worked and borrowed some code from Dolphin's support for Wii Remote Speaker output in order to make it play over the user's speakers.</p>
<div class="media-block wide">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/nBq9c3g6RGg" allowfullscreen></iframe></div>
<figcaption>Trap Team Audio Demonstration Directly from the Developer.</figcaption>
</figure>
</div>
<h4 id="50-19334-implement-infinity-base-by-dereeperjosh"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19334/">5.0-19334 - Implement Infinity Base</a></strong> by <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong><a class="headerlink" href="#50-19334-implement-infinity-base-by-dereeperjosh" title="Permanent link">¶</a></h4>
<p>Speaking of figurine portals, the <em>Portal of Power</em> wasn't the only USB portal on the Wii. And with <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> already kneedeep in USB portal work, they set their sights on another "portal" accessory for Wii. This time, it'd be the <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> Base. <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> was Disney's answer to the Toy Portal fad that hit during the 7th generation of consoles. By leveraging Disney's vast array of characters, settings, and overall brand, they set out to leverage that into a collectable figurine game. </p>
<p>Unlike Skylanders, which had an overall story and most figurines just inserted a new character or item, Disney Infinity uses "Playsets" that have campaigns around their various properties. You can then play through that campaign with character figures from that playset. Disney Infinity for Wii supports the original six playsets.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/infinitycars.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/infinitycars_thumb.jpg"></a>
<figcaption>Each playset presents unique gameplay and characters.
</figcaption>
</figure>
</div>
<p>Probably the more interesting part of Disney Infinity is the Toybox. Here you can mix and match things you've unlocked from the campaigns to create your own levels.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> might be a <em>unique</em> game, but it's been one that's hard to justify emulating with Dolphin. Not only is this a more limited version of the game compared to other releases, this is the <em>crown jewel</em> of the Disney Trio of Destruction. It currently brings the most powerful machines to their knees, even more so than Cars 2. Worse yet, it's seen even less attention from developers because of the need to have external hardware and figurines to even boot into gameplay!</p>
<p>None of those things stopped <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> from diving in to reverse engineer the base. Fresh from their work in Skylanders, they put what they learned from the last one in action. In truth, the Infinity Base works roughly the same as the Skylander's Portal. A lot of what we explained <a href="https://dolphin-emu.org/blog/2023/02/12/dolphin-progress-report-december-2022-january-2023/">last progress report</a> stands. The figurines only contain a little bit of data on them, and all of the main content is already on the disc. Now, the Infinity figures (and discs) do contain <em>a little</em> bit more data than Skylanders figures, but the end result is the same. These are just little wireless NFC chips in these figures/discs, and the portal reads them to see what figure is on and the game loads the appropriate content off of the disc, maybe with high scores or mini-game progress with the particular figure's game saved back onto it in some cases.</p>
<p><strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> just had to reverse engineer the communication between the base and the Wii and leverage the same GUI used for the Portal of Power. It ended up being a fairly painless process overall, and now you can emulate the Infinity Base in Dolphin! ...That doesn't make Disney Infinity particularly <em>playable</em> due to performance issues, but is one more step in the right direction.</p>
<p><strong>Note</strong>: The GUI isn't quite finished on Dolphin Android yet, so the feature isn't available yet there. Not that it'd be <em>too</em> useful considering that <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> suffers from severe performance issues even on high-end desktops.</p>
<h3 id="new-post-processing-shaders"><strong>New Post Processing Shaders</strong><a class="headerlink" href="#new-post-processing-shaders" title="Permanent link">¶</a></h3>
<p>While Dolphin may not be known for having the most robust Post Processing shader support, over the last couple of months a few interesting shaders were added that some users might find rather nice to use in specific cases.</p>
<p><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18503/">5.0-18503</a></strong> from
<strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> ports over <a href="https://github.com/libretro/slang-shaders/blob/master/interpolation/shaders/sharp-bilinear.slang">sharp bilinear</a> to Dolphin.</p>
<p>Older consoles didn't output square pixels. The CRT displays they were designed for can produce an image with arbitrary horizontal scaling on the signal, so <em>every console would have different pixel aspect ratios</em>, even varying per title! Our modern displays don't work this way - they instead use a fixed pixel grid that can't cleanly reproduce these non-square pixels. The most common solutions to handling this in emulation has been the use of Nearest Neighbor and Bilinear Filtering. Both have their compromises.</p>
<div class="media-block full-width">
<div class="row">
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearest1by1.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearest1by1.png" /></a>
<figcaption>Say we have a 4x4 grid of pixels. Scaling it up with nearest neighbor scaling is fine if the aspect ratios match.
</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearest5by4.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearest5by4.png" /></a>
<figcaption>But if those pixels are intended to be in a 5:4 aspect ratio? When we scale these up with nearest neighbor, the pixel colums are now uneven. In motion the pixels would appear to "change size" as they move across the screen, which is very distracting.
</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-bilinear5by4.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-bilinear5by4.png" /></a>
<figcaption>Bilinear scaling will have even pixel columns and thus will appear consistent in motion. But it's also very soft.
</figcaption>
</figure>
</div>
</div>
<p>Here it is in practice in a pixel art title you may be familiar with.</p>
<div class="media-block full-width">
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/nearest.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/nearest2.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Scaling with nearest neighbor will give you a sharp image, but it introduces artifacts. For example, the "shimmering" shown here in the floor tiles. This is a result of unevenly sized pixel columns as they scroll across the screen.
</figcaption>
</figure>
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/bilinear.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/bilinear2.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Bilinear scaling will give solid, reliable results no matter what is going on with the pixel ratios or scaling values. But it will be soft, which is not always an appealing look for pixel art.
</figcaption>
</figure>
</div>
<p>But one day, someone had an idea: why not both? Sharp Bilinear is a combination of both Nearest Neighbor and Bilinear filtering that attempts a best-of-both-worlds result by using the strengths of both filtering techniques.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearestwideaspect.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-nearestwideaspect.png" /></a>
<figcaption>First the image is scaled up with Nearest Neighbor to an exact integer multiple of the input that is at least the desired target resolution. In this case, it is wider than our target due to the aspect ratio mixmatch.
</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-sharpbilinear.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/checkerboard-sharpbilinear.png" /></a>
<figcaption>Then, that output is <em>bilinearly scaled</em> to the target resolution. This can produce a sharp result without uneven pixels.
</figcaption>
</figure>
</div>
</div>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/sharpbilinear.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/sharpbilinear2.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>
Here's our pixel art title again to show it in action. Sharp Bilinear is sharp, but without shimmering and other artifacts!
</figcaption>
</figure>
</div>
<p>Sharp Bilinear is made for 2D graphics and specifically pixel art. But nothing says you can't apply it to 3D graphics as well!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/vanilla1x.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/vanilla1x_thumb.png" /></a>
<figcaption>Dolphin scales bilinearly, so running fullscreen at 1x Native on a 8k panel gives a soft image.<br/><sub>Even this is <em>sharper</em> than console output. Console has additional blur passes that we skip, and that's before analog fuzz and potential interlacing.</sub></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/sharpbilinear1x.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/sharpbilinear1x_thumb.png" /></a>
<figcaption>With Sharp Bilinear, you can have the unnaturally sharp jaggies you crave! This isn't accurate (in fact it's about as accurate as high Internal Resolutions are) but if you like this look, enjoy.</figcaption>
</figure>
</div>
</div>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/highinternalresolution.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/highinternalresolution_thumb.jpg"></a>
<figcaption>Of course, at higher-than-native Internal Resolutions, Sharp Bilinear doesn't really do anything for 3D Graphics.
</figcaption>
</figure>
</div>
<p>Another Post Processing Shader that's been a part of Dolphin's history <em>just won't die.</em> That's right, we have the glorious return of the legendary ASCII Art Shader from <a href="https://dolphin-emu.org/blog/2020/12/10/dolphin-progress-report-october-2020/#50-12881-remove-asciiart-shader-by-spacexcheesewheel">the ashes of removal</a>. And who would go through the effort to fix it up for modern Dolphin? Well, none other than it's original creator and long-time Dolphin contributor <strong><a href="https://github.com/degasus">degasus</a></strong>! While they're not as active around the project, they couldn't stand to let such an injustice stand and returned to active development to right this incredible wrong. <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-19109/">5.0-19109</a></strong> marks the return of the ASCII Art Shader!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/ascii8k.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/ascii8k_thumb1.jpg" /></a>
<figcaption>At a distance everything seems normal. But if we take a closer look...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/ascii8k.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/ascii8k_thumb2.png" /></a>
<figcaption>It was ASCII Art all along! At 8k, the ASCII blocks can build a 2x Native image, then add additional detail with the ASCII characters!</figcaption>
</figure>
</div>
</div>
<p>This isn't just a straight port of the original - <strong><a href="https://github.com/degasus">degasus</a></strong> has optimized the shader to run on modern graphics cards that support subgrouping. If you have a supported GPU, the shader is now actually somewhat performant! 8k and 60fps is now possible! <span style="white-space: nowrap; font-size:0.5em;">(on an RTX 4090)</span> </p>
<p>With this change, it is likely that <strong><a href="https://github.com/degasus">degasus</a></strong> will return to slumber, at least until the next time we try to remove the ASCII Art Shader.</p>
<h3 id="a-sixth-bounding-box-game"><strong>A Sixth Bounding Box Game!</strong><a class="headerlink" href="#a-sixth-bounding-box-game" title="Permanent link">¶</a></h3>
<p>This is a momentous occasion for us all. After the discovery of <a href="https://wiki.dolphin-emu.org/index.php?title=Ultimate_Spider-Man">Ultimate Spider-Man</a>'s <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14257-bounding-box-account-for-pixel-quads-by-techjar">usage of</a> <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14326-bounding-box-add-fallback-for-when-bounding-box-is-unsupported-or-disabled-by-techjar">bounding box</a>, we thought that it was going to be the feature's last dance. Yet, somehow someway, despite the GameCube and Wii no longer seeing retail games, bounding box has found a way.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Solitaire_%26_Mahjong">Solitaire and Mahjong</a> joins the ranks of known bounding box titles after remaining anonymous for many years. It was just obscure enough that it escaped our issue tracker... at least for a time. But eventually, no matter how weird, how unassuming, or how obscure the game is, someone tests it. And if there is an issue, we can only hope that <a href="https://bugs.dolphin-emu.org/issues/13248">they report it to us</a>.</p>
<p>The user in question didn't know that it was a bounding box issue, but by bringing up this game's broken nature to developers, we were finally able to take a look and see why it wasn't working. At first, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> thought that the issue may be XFB related, and <strong><a href="https://github.com/JMC47">JMC47</a></strong> wondered if NAND issues were causing the save files to be hard to click.</p>
<p>But nope, it turned out that the menus were powered by bounding box. A helpful log message kindly pointed this out at boot, but went unnoticed through early testing.</p>
<p><code>E[Video]: BBox shall be used but it is disabled. Please use a gameini to enable it for this game.</code></p>
<p>This game being broken for all of these years was simply due to the default setting of bounding box being set to disabled.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/solitaire-broken.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/solitaire-broken.png" /></a>
<figcaption>This game had a very gray look on old builds.</sub></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/solitaire-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2023-february/solitaire-working.png" /></a>
<figcaption>But with bounding box enabled, things are finally rendering correctly.</figcaption>
</figure>
</div>
</div>
<p>Users also reported a "performance" regression with this game, but thankfully that turned out to be a false positive. Essentially, we changed the default values given to a game when Bounding Box was disabled, which caused the game's behavior to change. While <a href="https://dolphin-emu.org/download/dev/master/5.0-14326/">5.0-14326</a> did cause a severe performance regression in this game, turning on bounding box to cause the <em>correct</em> values to be sent fixes it completely. This bisect <em>should have</em> pointed us to this game having a Bounding Box issue, but no one realized it at the time. After all, there were only <em>five</em> Bounding Box titles, and this wasn't one of them! Oops.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Solitaire_%26_Mahjong">Solitaire and Mahjong</a> now joins <a href="https://wiki.dolphin-emu.org/index.php?title=Paper_Mario:_The_Thousand-Year_Door">Paper Mario: The Thousand Year Door</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Paper_Mario">Super Paper Mario</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Disney%27s_Magical_Mirror_starring_Mickey_Mouse">Magical Mirror Starring Mickey Mouse</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Disney%27s_Hide_%26_Sneak">Disney's Hide and Sneak</a>, and the aforementioned <a href="https://wiki.dolphin-emu.org/index.php?title=Ultimate_Spider-Man">Ultimate Spider-Man</a> as our bounding box titles.</p>
<p>To prevent <em>yet another</em> game from sneaking through, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> added "bounding box reads" to Dolphin's Usage Statistics. If any users run into this in the future while having Usage Statistics enabled, we'll know about it.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2023-02-01&to=2023-05-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-18501/">5.0-18501</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-19368/">5.0-19368</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Coming Soon: Dolphin on Steam!
2023-03-28T05:12:11+00:002023-03-28T05:14:16.420391+00:00MayImilaehttps://dolphin-emu.org/blog/authors/MayImilae/https://dolphin-emu.org/blog/2023/03/28/coming-soon-dolphin-steam/
<header>
<img src="https://dolphin-emu.org/m/user/blog/steam-announcement/steamannouncementheader.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/steam-announcement/steamannouncementheader-mini.jpg" />
</header>
<p>We are pleased to announce our great experiment - Dolphin is coming to Steam! Our <a href="https://store.steampowered.com/app/1941680">store page</a> is now live, and you can visit it with the handy widget below. However, due to how Steam works, you won't be able to download the emulator through Steam just yet. Feel free to wishlist us to be notified when Dolphin is available to download on Steam!</p>
<p><br/>
<center><iframe src="https://store.steampowered.com/widget/1941680/" frameborder="0" width="80%" height="190"></iframe></center>
<br/></p>
<p>When we launch on Steam, we'll have a feature article detailing the process and features of the Steam release. We're pleased to finally tell the world of our experiment. This has been the product of many months of work, and we look forward to getting it into users' hands soon!</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/steam-announcement/steamgamepage.png">
<img src="https://dolphin-emu.org/m/user/blog/steam-announcement/steamgamepage_thumb.jpg"></a>
<figcaption>
</figcaption>
</figure>
</div>
Dolphin Progress Report: December 2022 and January 2023
2023-02-12T07:28:09+00:002023-02-12T09:26:55.027140+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2023/02/12/dolphin-progress-report-december-2022-january-2023/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/progressreportheader-jan2023.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/progressreportheader-jan2023mini.jpg" />
</header>
<p>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 <a href="https://wiki.dolphin-emu.org/index.php?title=Main_Page">Dolphin Wiki</a> and <a href="https://fifo.ci/">FifoCI</a>.</p>
<p>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 <em>VBI Skip</em>. 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 <em>Cull Vertices on the CPU</em> can also <em>greatly</em> improve the framerate in many games.</p>
<p>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!</p>
<p>We have a lot to get through... but first.</p>
<hr />
<p>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!</p>
<p>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.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/nvcppowersetting.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/nvcppowersetting_thumb.png"></a>
<figcaption><em>A global Maximum Performance Profile does not work</em>, you can only work around the issue by creating a profile specifically for Dolphin Emulator and setting it to Maximum Performance.
</figcaption>
</figure>
</div>
<p>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.</p>
<p><br/>
<center><iframe src="https://social.dolphin-emu.org/@dolphin/109777973534057737/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://social.dolphin-emu.org/embed.js" async="async"></script></center>
<br/></p>
<p>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.</p>
<p>Now with <em>all of that out of the way</em>, let's finally get on with December and January's Notable Changes.</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-18271-video-hack-vbi-skip-by-sam-belliveau"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18271/">5.0-18271 - Video Hack - VBI Skip</a></strong> by <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong><a class="headerlink" href="#50-18271-video-hack-vbi-skip-by-sam-belliveau" title="Permanent link">¶</a></h4>
<p>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.</p>
<p>The key thing to note is that <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> 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 <a href="https://www.youtube.com/watch?v=l4UgZBs7ZGo&t=727s">Vertical Blanking <em>Interval</em></a> on a CRT television (<em>also</em> 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.</p>
<p>During this experimentation, <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong>'s experimented what would happen if Dolphin simply ignored or <em>skipped</em> a Vertical Blanking Interrupt when Dolphin was lagging. While their goal was to improve framepacing, the result they got when testing <a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Sports_Resort">Wii Sports Resort</a> was something no one expected.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/viskipdemo4_cropped.mp4" type="video/mp4"/>
</video></div>
<figcaption>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.</figcaption>
</figure>
</div>
<p><strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> 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 <em>VI Skip</em>. ...but that was too close to Video Interface which we regularly abbreviate to VI, so we renamed it to <em>VBI Skip</em> for clarity.</p>
<p>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 <em>only 11 lines of code</em>! Additionally, it would only activate itself <em>if Dolphin was lagging</em>. 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. </p>
<hr />
<p>Developers were initially skeptical about the compatibility of a hack like this. Thankfully, <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> quickly unleashed it for everyone to test. And while VBI Skip doesn't <em>directly</em> improve framerate, it can drastically improve the playability of a game that isn't running at full speed.</p>
<p>To see the pure potential of VBI Skip, we can show a compatible game with an underpowered device. For example, <a href="https://wiki.dolphin-emu.org/index.php?title=Crash_Bandicoot:_The_Wrath_of_Cortex">Crash Bandicoot: Wrath of Cortex</a> is far too demanding for a Pixel 3a featuring an Adreno 615. The opening cutscene makes this readily apparent.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/cbvioff_cropped.mp4" type="video/mp4"/>
</video></div>
<figcaption>The framerate tanks and audio lags as the poor Pixel 3a can't keep up.</figcaption>
</figure>
</div>
<p>However, <a href="https://wiki.dolphin-emu.org/index.php?title=Crash_Bandicoot:_The_Wrath_of_Cortex">Crash Bandicoot</a> is compatible with VBI Skip and can give the weak device a fighting chance to run the game.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/cbvion_cropped.mp4" type="video/mp4"/>
</video></div>
<figcaption>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.</figcaption>
</figure>
</div>
<p>VBI Skip is a powerful tool for weaker devices, especially in games that struggle. <a href="https://wiki.dolphin-emu.org/index.php?title=Paper_Mario:_The_Thousand-Year_Door">Paper Mario: The Thousand Year Door</a>'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.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/pmttydvion_cropped.mp4" type="video/mp4"/>
</video></div>
<figcaption>During Bounding Box effects like the boat flip, this poor phone ends up skipping a lot of VBIs!</figcaption>
</figure>
</div>
<p>But here comes the rather interesting part of this. We once had a <em>frameskip</em> implementation, but it only worked under very specific conditions, didn't actually improve performance much at all, and was <em>completely broken</em> for years before it was ultimately <a href="https://github.com/dolphin-emu/dolphin/pull/4322">removed</a>. 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?</p>
<p><br/>
<center><span style="font-size: 1.25em;"><strong>No one knows.</strong></span></center>
<br/></p>
<p>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 <a href="https://pcsx2.net/">PCSX2</a> quickly hack in the feature and test the PS2 version of <a href="https://wiki.pcsx2.net/Crash_Bandicoot:_The_Wrath_of_Cortex">Crash Bandicoot: Wrath of Cortex</a>, 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.</p>
<p><em>But it does.</em></p>
<p>However, though this hack is an amazing thing that shouldn't exist but does... it isn't without flaws. It works for <em>a lot of games</em> but not <em>all games.</em> 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.</p>
<p>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 <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">The Legend of Zelda: The Wind Waker</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess">Twilight Princess</a> 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. <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">Wind Waker</a> in particular is extremely touchy. The game's developers went so far as to lock the <em>PAL</em> version of the game to 30 FPS in PAL50, just so they wouldn't have to touch those timings!</p>
<p>Other games, like many in the <a href="https://wiki.dolphin-emu.org/index.php?title=Need_for_Speed:_Carbon_(Wii)">Need for Speed series</a>, have a strange "dynamic" framerate that doesn't play nicely with the hack - causing even worse lag.</p>
<p>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 <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_III:_Rebel_Strike">Star Wars: Rogue Squadron III</a> that tend to reject a lot of Dolphin's other performance hacks.</p>
<p>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.</p>
<hr />
<p><em>Note: VBI Skip was originally named <strong>VI Skip</strong>. 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 <a href="https://dolphin-emu.org/download/dev/master/5.0-18628/">5.0-18628</a> 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.</em></p>
<h4 id="50-18086-new-frametimevblank-analyzer-graph-by-sam-belliveau"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18086/">5.0-18086 - New FrameTime/VBlank Analyzer + Graph</a></strong> by <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong><a class="headerlink" href="#50-18086-new-frametimevblank-analyzer-graph-by-sam-belliveau" title="Permanent link">¶</a></h4>
<p>Did you notice the branch name that <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong>'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 <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> was working on when they discovered VBI Skip. In fact, VBI Skip was actually merged <em>afterwards</em>, and the initial changes made for measuring framepacing were actually integral towards implementing the hack.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/fzerogxframepacing.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/fzerogxframepacing_thumb.png"></a>
<figcaption>The new graphs are powerful and give developers a bigger picture on performance and framepacing.
</figcaption>
</figure>
</div>
<p>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.</p>
<h4 id="50-18299-implement-emulated-skylanders-portal-of-power-by-dereeperjosh-and-mandar1jn-with-code-relicenced-to-gplv2-for-dolphin-from-ripleytom"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18299/">5.0-18299 - Implement Emulated Skylanders Portal of Power</a></strong> by <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> and <strong><a href="https://github.com/mandar1jn">mandar1jn</a></strong> with code relicenced to GPLV2+ for Dolphin from <strong><a href="https://github.com/RipleyTom">RipleyTom</a></strong><a class="headerlink" href="#50-18299-implement-emulated-skylanders-portal-of-power-by-dereeperjosh-and-mandar1jn-with-code-relicenced-to-gplv2-for-dolphin-from-ripleytom" title="Permanent link">¶</a></h4>
<p>Together, these games make up four adventure platformers with hundreds of unique characters and a <a href="https://wiki.dolphin-emu.org/index.php?title=Skylanders:_SuperChargers_Racing">racing game</a>. 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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/portalofpower.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/portalofpower_thumb.jpg"></a>
<figcaption>Does your Portal of Power look this cool?
</figcaption>
</figure>
</div>
<p>There were ~450 different figurines and 172 base characters and 39 magic items. The <a href="https://wiki.dolphin-emu.org/index.php?title=Skylanders:_Trap_Team">Trap Team</a> portal also features a speaker that boss characters could taunt you through. Some figurines could even unlock new areas in games.</p>
<hr />
<p>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 <em>will not allow you to play without a figurine</em> - they are a fundamental part of <s>their business model</s> the game. They even went as far as to gate significant features behind specific figurines!</p>
<p>In Dolphin, setting up a Skylanders game was a unique experience. Dolphin has <a href="https://dolphin-emu.org/blog/2016/01/26/wii-usb-hid-support/">long supported the <em>physical</em> Skylanders Portal of Power</a>. 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.</p>
<p><strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> 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 <a href="https://github.com/RPCS3/rpcs3/pull/5688">RPCS3 Emulated Portal of Power implementation</a> as the basis for a Dolphin implementation, <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> took matters into their own hands to try to bring an Emulated Portal of Power over to Dolphin. A lot of the code from <strong><a href="https://github.com/RipleyTom">RipleyTom</a></strong>'s RPCS3 implementation was used at the core of the change but <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> still had a lot of work to do to make it work within Dolphin. <strong><a href="https://github.com/mandar1jn">mandar1jn</a></strong> provided <a href="https://marijnkneppers.dev/posts">expertise</a> along with tools that allowed for testing data from the generated figurines and comparing them to figurine data from a real portal.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skylandersandgui.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skylandersandgui_thumb.jpg"></a>
<figcaption>Using the new emulated Portal you can create blank Skylanders, or load real figurine data complete with save progress.
</figcaption>
</figure>
</div>
<p>For Dolphin on Android users, <strong><a href="https://github.com/deReeperJosh">deReeperJosh</a></strong> decided to put in some extra work after the initial merge and as of <a href="https://dolphin-emu.org/download/dev/643726110b723b287590058f9fa802502c5db0d6/">5.0-18497</a>, 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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skylandersandroid.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skylandersandroid_thumb.jpg"></a>
<figcaption>
</figcaption>
</figure>
</div>
<p>All of this together results in the arrival of a long requested feature. Again, we have to thank <strong><a href="https://github.com/RipleyTom">RipleyTom</a></strong> for the original implementation for <a href="https://rpcs3.net/">RPCS3</a> and allowing the code to be licensed under GPLv2+ for Dolphin.</p>
<p><strong>Note:</strong> <em>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.</em></p>
<h4 id="50-18355-allow-dolphin-to-manually-cull-vertices-on-the-cpu-by-tellowkrinkle"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18355/">5.0-18355 - Allow Dolphin to Manually Cull Vertices on the CPU</a></strong> by <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong><a class="headerlink" href="#50-18355-allow-dolphin-to-manually-cull-vertices-on-the-cpu-by-tellowkrinkle" title="Permanent link">¶</a></h4>
<p>Normally, this would be a headlining feature of most Progress Reports. But you know, <em>VBI Skip</em>. Still, we couldn't let the juggernaut in the room completely drown out this excellent performance improvement.</p>
<p>For many years, <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Metroid_Prime_(Series)">the Metroid Prime games</a> 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, <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess">The Legend of Zelda: Twilight Princess</a> does a similar thing when drawing its own minimap, just on a much more damaging level to the point where developers <a href="https://github.com/dolphin-emu/dolphin/commit/040a6e1eb33ceccccf3e4c7d790e46657288c9fe">initially patched it out directly in Dolphin's source code!</a> </p>
<p><strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> 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, <em>Cull Vertices on the CPU</em> was born.</p>
<p><br/>
<script>
addChart({"title":{"text":"CPU Vertex Culling"},"subtitle":{"text":"AMD 5950x with a RTX 3060"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"series":[{"name":"CPU Cull Off","turboThreshold":0,"marker":{}},{"name":"CPU Cull On","turboThreshold":0}],"data":{"csv":"\"Game\";\"CPU Cull Off\";\"CPU Cull On\"\n\"Twilight Princess GC - Hyrule Field without hack (30FPS Title)\";31;43\n\"Densha de Go! Shinkansen EX - City Area\";71;83\n\"Rogue Squadron 3 - Battlefield Hoth\";58;60\n\"Mario Galaxy - Hub\";143;140\n\"Metroid Prime 2 - Full Agon Wastes Map\";102;122","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"tickInterval":30,"max":150,"labels":{"format":"{value}FPS"}},"pane":{"background":[]},"responsive":{"rules":[]},"xAxis":{"title":{},"labels":{}},"colors":["#ff3100","#006eff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{}})
</script>
<br/></p>
<p>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 <em>Hyrule Field Speed Hack</em>, 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.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/twilightmap-hack.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/twilightmap-hack_thumb.jpg" /></a>
<figcaption>The "Hyrule Field Speed Hack" patch greatly reduces the number of draw calls but affects the look of the minimap.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/twilightmap-cull.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/twilightmap-cull_thumb.jpg" /></a>
<figcaption>With CPU Cull on and the patch disabled, the minimap will look correct while still delivering a sizeable performance increase.</figcaption>
</figure>
</div>
</div>
<p>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.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess">Twilight Princess</a> 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. <a href="https://wiki.dolphin-emu.org/index.php?title=Densha_de_Go!_Shinkansen_EX">Densha de Go!</a> 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.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/denshadego.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/denshadego_thumb.jpg"></a>
<figcaption>As a train driver, I'm always on time but I never stop.
</figcaption>
</figure>
</div>
<p>There is the case where a game is so optimized that Dolphin trying to cull vertices on the CPU actually ends up <em>lowering</em> performance because it isn't saving enough draw calls to make back the CPU overhead. As such, it is no accident that <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> 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.</p>
<p>Because we can't guarantee this option will be faster in most games, we've decided to default CPU culling to <strong>off</strong>. 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.</p>
<p>For games that see a huge benefit, we've currently enabled it by default via GameINI.</p>
<h4 id="50-18192-emulate-ppc-datacache-by-mkwcat"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18192/">5.0-18192 - Emulate PPC Datacache</a></strong> by <strong><a href="https://github.com/mkwcat">mkwcat</a></strong><a class="headerlink" href="#50-18192-emulate-ppc-datacache-by-mkwcat" title="Permanent link">¶</a></h4>
<p>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.</p>
<p>But none of that mattered to <strong><a href="https://github.com/mkwcat">mkwcat</a></strong>. 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 <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a> 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.</p>
<p>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 <em>absolutely did not want Dolphin running their mod</em>. They went as far as to add features to their hack to detect and prevent Dolphin from running it.</p>
<p>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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/petition.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/petition_thumb.jpg"></a>
<figcaption>With both CTGP-R and Dolphin's developers turning them away, Dolphin's users took matters into their own hands.
</figcaption>
</figure>
</div>
<p>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.</p>
<p>Back when Wiimmfi was new and the Nintendo Wi-Fi Connect services had just shut down, Dolphin was a <em>very</em> popular tool to go onto <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a> 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.</p>
<p>The early days of Wi-Fi replacement servers were rife with users using item hacks, timer hacks, and more.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/mkcheats.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/mkcheats.png"></a>
<figcaption>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.
</figcaption>
</figure>
</div>
<p>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.</p>
<p>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 <strong><a href="https://github.com/mkwcat">mkwcat</a></strong> 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.</p>
<p><br/><blockquote style="font-size:1.1em">
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. </p>
<p>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.
<footer>mkwcat</footer></blockquote><br/></p>
<p>A few weeks later, a user from the <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a> 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, <strong><a href="https://github.com/mkwcat">mkwcat</a></strong>. 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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/ctgprdownload.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/ctgprdownload_thumb.jpg"></a>
<figcaption>The first step to running CTGP-R in Dolphin is going through a painfully long installation process.
</figcaption>
</figure>
</div>
<p>Before you go installing CTGP-R in Dolphin, please remember that dcache emulation is <em>incredibly expensive</em>. 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.</p>
<p>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 <em>openly announces itself to mods</em> with a special device Wii mods can access.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/ctgpringame.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/ctgpringame_thumb.jpg"></a>
<figcaption>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.
</figcaption>
</figure>
</div>
<p>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 <a href="https://wiki.dolphin-emu.org/index.php?title=Ten_Pin_Alley_2">Ten Pin Alley 2</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Resident_Evil_2">Resident Evil 2</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Resident_Evil_3:_Nemesis">Resident Evil 3</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Dead_to_Rights">Dead to Rights</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=Casper%27s_Scare_School:_Spooky_Sports_Day">Casper's Scare School: Spooky Sports Day</a>. </p>
<p>This also allows <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Cars_2">Cars 2</a> to boot <em>without</em> any special hacks. However, performance is reduced <em>even more than normal</em>. As such, for any dcache sensitive game with an existing patch, we highly recommend that players use our included hacks when possible.</p>
<h4 id="50-18242-change-default-user-directory-location-to-appdata-on-windows-and-50-18238-menubar-add-action-which-opens-the-user-folder-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18242/">5.0-18242 - Change default user directory location to AppData on Windows</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18238/">5.0-18238 - Menubar: Add action which opens the user folder</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-18242-change-default-user-directory-location-to-appdata-on-windows-and-50-18238-menubar-add-action-which-opens-the-user-folder-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>Dolphin's Global User directory has stayed in the same place on Windows since it was first introduced <a href="https://dolphin-emu.org/blog/2013/09/22/dolphin-40-release-announcement/">with the launch of Dolphin 4.0</a>. Placed within <em>My Documents</em>, we wanted to keep the User directory in an easily findable place because it stores <em>more</em> 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 <em>Portable Mode</em> or <a href="https://dolphin-emu.org/docs/guides/controlling-global-user-directory/">move the directory themselves</a>, most users simply use the default setup.</p>
<p>When this choice was made, <em>My Documents</em> 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.</p>
<p>One of the biggest problems is Microsoft's very own <em>OneDrive</em>. While OneDrive may be good at backing up files, it is an absolute <em>nightmare</em> 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, <em>even if Dolphin is still using it.</em> In extreme cases, OneDrive can actually cause Wii games to stop booting on a Windows PC, and cause savedata loss in GameCube games.</p>
<p>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 <em>My Documents</em> makes machine learning based anti-virus/anti-malware programs go on alert and block writes. This can cause Wii games to not boot <em>and</em> 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.</p>
<p>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 <em>only</em> 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.</p>
<p>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.</p>
<p>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.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/openuserfolder.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/openuserfolder_thumb.png"></a>
<figcaption>Handy! But be careful in there - that's where your saves and settings are stored.
</figcaption>
</figure>
</div>
<h4 id="50-18025-add-option-for-force-nearest-or-linear-texture-filtering-by-leo60228-and-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18025/">5.0-18025 - Add Option for Force Nearest Or Linear Texture Filtering</a></strong> by <strong><a href="https://github.com/leo60228">leo60228</a></strong> and <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-18025-add-option-for-force-nearest-or-linear-texture-filtering-by-leo60228-and-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>This is another long awaited option that has been debated for quite a while. Originally submitted by <strong><a href="https://github.com/leo60228">leo60228</a></strong> nearly three years ago, the ability to <em>force</em> various texture filtering modes has been up for debate ever since.</p>
<p>The biggest question was about the <em>value</em> 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 <em>differently</em> could not only cause bugs, but could make games look blurry or pixelated.</p>
<p>However, as time went on and we saw more user feedback, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> 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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/texturefilteringgui.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/texturefilteringgui.png"></a>
<figcaption>The old Anisotropic Filtering menu has been repurposed for all texture filtering features!
</figcaption>
</figure>
</div>
<p>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 <em>broken</em> on console due to texture sampling issues, and forcing nearest neighbor can actually work-around those defects!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sexypokerlinear.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sexypokerlinear_thumb.jpg" /></a>
<figcaption>Sexy Poker has texture defects even on console, but they're incredibly visible in Dolphin at higher resolutions.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sexypokernearest.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sexypokernearest_thumb.jpg" /></a>
<figcaption>Forcing Nearest Neighbor can erase the defects allowing you to immerse yourself into this legendary card game.</a></figcaption>
</figure>
</div>
</div>
<p>If you're looking for a more notable example than the venerable <a href="https://wiki.dolphin-emu.org/index.php?title=Sexy_Poker">Sexy Poker</a>, the GameCube version of <a href="https://wiki.dolphin-emu.org/index.php?title=Sonic_Gems_Collection">Sonic CD in Sonic Gems Collection</a> 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.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sonic-linear.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sonic-linear_thumb.png" /></a>
<figcaption>
<a href="https://youtu.be/qK8oohv6sgU?t=1261">Even Digital Foundry complained about how blurry Sonic CD looks on GameCube.</a>
</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sonic-nearest.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/sonic-nearest_thumb.png" /></a>
<figcaption>At least now you can choose to change one of the port's differences.</a></figcaption>
</figure>
</div>
</div>
<p>One of the reasons we chose to finally present forcing <strong>nearest</strong> texture filtering is because we already had a feature for forcing <strong>linear</strong> texture filtering. This "Force Texture Filtering" option was added long long ago to work around a quirk of two premiere Nintendo titles - <a href="https://wiki.dolphin-emu.org/index.php?title=New_Super_Mario_Bros._Wii">New Super Mario Bros. Wii</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">The Legend of Zelda: Skyward Sword</a>.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skywardsword-banding.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skywardsword-banding_thumb.jpg" /></a>
<figcaption>Skyward Sword's shading gets chunky at higher than native internal resolutions.
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skywardsword-nobanding.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/skywardsword-nobanding_thumb.jpg" /></a>
<figcaption>Forcing linear texture filtering resolves this issue.</figcaption>
</figure>
</div>
</div>
<p>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.</p>
<h4 id="50-18017-jitarm64-implement-accuratenans-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18017/">5.0-18017 - JitARM64 - Implement AccurateNaNs</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-18017-jitarm64-implement-accuratenans-by-josjuice" title="Permanent link">¶</a></h4>
<p>This is a change with a rather funny story behind it, and actually goes back several years. Jump back to <a href="https://dolphin-emu.org/blog/2015/07/01/dolphin-progress-report-june-2015/#40-6704-optionally-emulate-accurate-nans-by-flacs">June of 2015</a> and <em>AccurateNaNs</em> 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 <a href="https://wiki.dolphin-emu.org/index.php?title=Dragon_Ball:_Revenge_of_King_Piccolo">Dragon Ball: Revenge of King Piccolo</a></p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/CostlyWaterloggedBubblefish.mp4" type="video/mp4"/>
</video></div>
<figcaption>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...</figcaption>
</figure>
</div>
<p>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.</p>
<p>But wait, the title of this section is Implement AccurateNaNs on AArch64. What changed?</p>
<p>Well, AArch64 and PPC NaN handling aren't <em>exactly</em> the same, it was just getting good enough results at the time. But Dolphin recently changed <a href="https://dolphin-emu.org/blog/2021/09/07/dolphin-progress-report-august-2021/#50-14795-jit-fix-fma-negation-ordering-by-josjuice">how we handle FMA (Fused-Multiply Add) instructions</a> in order to fix online desyncs between real console and Dolphin in <a href="https://wiki.dolphin-emu.org/index.php?title=Inazuma_Eleven_GO:_Strikers_2013">Inazuma Eleven GO: Strikers 2013</a>.</p>
<div class="media-block wide">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2021-august/inazuma-desync_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Unlike the Dragonball issue, this one effected both our x86-64 JIT and our AArch64 JITback in the day!<br/><sub>Click/Tap to play. Click <a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-august/inazuma-desync.mp4">HERE</a> for a higher quality version.</sub></figcaption>
</figure>
</div>
<p>This fix was applied to both JITs, and no one was the wiser that we had inadvertently broken <a href="https://wiki.dolphin-emu.org/index.php?title=Dragon_Ball:_Revenge_of_King_Piccolo">Dragon Ball: Revenge of King Piccolo</a>. Some FMA instructions invert the sign of output, but only if the output is <em>not</em> NaN. The Inazuma FMA fix changed how we handle FMA instructions <em>just enough</em>, that on AArch64 the sign of NaNs for <code>nmadd</code> / <code>nmsub</code> 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 <em>exact</em> 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, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> was pulled into action to implement Accurate NaNs on ARM.</p>
<p>Because emulating NaNs in this manner is a slight performance reduction, it is only enabled in one title currently: <a href="https://wiki.dolphin-emu.org/index.php?title=Dragon_Ball:_Revenge_of_King_Piccolo">Dragon Ball: Revenge of King Piccolo</a>.</p>
<h4 id="50-18257-remove-boot-from-dvd-backup-by-mayimilae"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18257/">5.0-18257 - Remove Boot from DVD Backup</a></strong> by <strong><a href="https://github.com/MayImilae">MayImilae</a></strong><a class="headerlink" href="#50-18257-remove-boot-from-dvd-backup-by-mayimilae" title="Permanent link">¶</a></h4>
<p>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 </p>
<p>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 <em>back</em> onto blank DVD media.</p>
<p>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 <em>just</em> for GameCube and Wii emulation, as few as <strong>14</strong> 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.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/legit.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/legit_thumb.jpg"></a>
<figcaption>Don't mixup backup discs and real discs! Thankfully, our discs are certified.</figcaption>
</figure>
</div>
<p>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 <em>is</em> 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 <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime">Metroid Prime</a>, <em>constantly</em> load from the disc during gameplay, introducing persistent stutter that can make playing the game a nightmare.</p>
<p>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 <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_2:_Echoes">Metroid Prime 2</a>. We were unable to find a disc drive that could keep up, and in games like <a href="https://wiki.dolphin-emu.org/index.php?title=Ikaruga">Ikaruga</a> this can lead to hangs.</p>
<p>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.</p>
<p>In the end, a mixture of poor performance and the fact it was confusing users into thinking Dolphin could boot <em>non</em>backup 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 href="https://github.com/dolphin-emu/dolphin/pull/11462#issuecomment-1397990953">a list of improvements needed for the feature to return</a> was written and that's where we stand for now.</p>
<h4 id="50-18171-indexgenerator-fix-off-by-one-in-getremainingindices-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-18171/">5.0-18171 - IndexGenerator: Fix off-by-one in GetRemainingIndices </a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-18171-indexgenerator-fix-off-by-one-in-getremainingindices-by-pokechu22" title="Permanent link">¶</a></h4>
<p>This is a longstanding bug in Dolphin that has gone hidden in almost every game. A <a href="https://dolphin-emu.org/download/dev/8d5299c20b69f524b20a8d9451aaf754b36690cc/">Vertex Loader Cleanup</a> by <strong><a href="https://github.com/degasus">degasus</a></strong> unknowingly introduced an off-by-one error into the vertex loader. Oddly enough, this causes error spam in <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a> during the <a href="https://www.mariowiki.com/Red_Coin_Field">Red Coin Field secret area</a>.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/redcoinfield.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/redcoinfield_thumb.jpg"></a>
<figcaption>Dolphin veterans are <a href="https://bugs.dolphin-emu.org/issues/6135">all too familiar</a> with this secret stage.</figcaption>
</figure>
</div>
<p>Because nothing was <em>visibly</em> broken, this issue went mostly unnoticed. At least, not until a strange European only racing game arrived on our issue tracker. <a href="https://wiki.dolphin-emu.org/index.php?title=Pocoyo_Racing">Pocoyo Racing</a> is a licensed racing game based off of the kid's show Pocoyo. If you play <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a> 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.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/pocoyo-bugged.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/pocoyo-bugged_thumb.jpg"></a>
<figcaption>The vertex issues provided intangible obstacles that made driving the track slightly more difficult.</figcaption>
</figure>
</div>
<p>Unlike <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a>, the fixes to the Vertex Loader Cleanup back then <em>did not</em> fix this issue, meaning it's remained dormant for <strong>a decade</strong>. 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 <a href="https://wiki.dolphin-emu.org/index.php?title=Pocoyo_Racing">Pocoyo Racing</a>, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> quickly narrowed down the problem and solved the issue.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/pocoyofixed.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/pocoyofixed_thumb.jpg"></a>
<figcaption>The game finally looks right in the latest Dolphin builds.</figcaption>
</figure>
</div>
<p>This also fixes the error log spam in <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a> when it renders the grass special stage.</p>
<h4 id="50-17833-fix-normaltangentbinormal-with-index3-set-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17833/">5.0-17833 - Fix normal/tangent/binormal with Index3 Set</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-17833-fix-normaltangentbinormal-with-index3-set-by-pokechu22" title="Permanent link">¶</a></h4>
<p>This is a change that we missed from the last Progress Report, but thought it might be interesting to those that love seeing <em>edge of emulation</em> 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 <strong><a href="https://forum.beyond3d.com/threads/normal-mapping-wii-demo.46425/">normal mapping on the Wii</a></strong>.</p>
<p>Though the glorious bastards at Factor5 <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/#50-16301-videocommon-handle-emboss-texgen-with-only-a-single-normal-by-pokechu22">implemented bump mapping</a> 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 <em>normalindex3</em> enabled in the vertex format. It wasn't actually doing anything <em>with this</em>, so simply disabling normalindex3 would fix the bugs.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/quake-broken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/quake-broken_thumb.jpg" /></a>
<figcaption> Even though it looks alright at a glance, some of this demo's coolest effects were completely missing.
</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/quake-fixed.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-december/quake-fixed_thumb.jpg" /></a>
<figcaption>You can see reflections of light on the walls and other normal mapped effects.</a></figcaption>
</figure>
</div>
</div>
<p>However, that wasn't a good enough solution for <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> 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.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2022-12-01&to=2023-02-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-17997/">5.0-17997</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-18498/">5.0-18498</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Announcing the Official Dolphin Discord
2023-01-07T03:27:15+00:002023-01-07T03:36:59.201159+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2023/01/07/announcing-official-dolphin-discord/
<header>
<img src="https://dolphin-emu.org/m/user/blog/discord/discordheader-headersized.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/discord/discordheader-mini.jpg" />
</header>
<p>Over the past four years, the Community Dolphin Discord Server, which was unaffiliated with the project itself, has become a fantastic community that has been providing support and a hub for Dolphin users. While it started out small, the server now boasts over <em>10,000 users</em> and several of Dolphin's developers interact and help users directly on the server. The immediate nature of Discord is beneficial in that it allows for quick bug reports and support for various issues. Many users in the Discord community are experts in specific facets, like tricky controller mappings, motion controls, netplay, and more.</p>
<p>It has become an important pillar of the Dolphin community and Dolphin development, as a new generation of developers have originated from the Discord server. Recognizing its importance, many of the veteran developers have started monitoring the server as well, providing support and getting feedback for new fixes and experimental changes. It also allows developers and support staff to walk unsure users through making better bug reports on the issue tracker.</p>
<p>So we as a project have discussed among ourselves and with the Community Dolphin Discord members, and have come to a conclusion. The unofficial Dolphin Discord is already a core pillar of our community. It's about time we embraced it. We are pleased to announce that the Dolphin Discord is now the <strong><a href="https://discord.dolphin-emu.org">Official Dolphin Discord Server</a></strong>!</p>
<div style="text-align: center; margin-top: 2em"><a href="https://discord.dolphin-emu.org/"><img src="https://discord.com/api/guilds/521709831132807179/widget.png?style=banner2" alt="Join the Dolphin Discord"></a></div>
<p><a id="cuthere"></a></p>
<h3 id="whats-changing"><strong>What's Changing</strong><a class="headerlink" href="#whats-changing" title="Permanent link">¶</a></h3>
<p>Since the Dolphin Discord server is already a major part of our community, less is changing than you might think. Obviously those maintaining the Discord community are doing a good job and have built it into an important part of Dolphin's community.</p>
<p>However, as things become bigger, sometimes unwritten rules need to be written down. As such, we've established a <a href="https://github.com/dolphin-emu/dolphin/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> for the expected behavior of both developers and the community alike. Because the Dolphin IRC channels were mostly isolated and had limited interaction, there wasn't really a need for this. Any problems were promptly kicked out and few users made their ways into the annals of the IRC network. With the Dolphin Discord Server, this changes. It is easily accessible for users and we don't want situations where users or developers are uncomfortable with the conduct of others.</p>
<p>The community members who built the thriving community of the Discord server will continue in their roles as administrators of the community. However, they will be getting a little help, as some of the Dolphin developers have joined the Discord staff. </p>
<h3 id="what-isnt-changing"><strong>What Isn't Changing</strong><a class="headerlink" href="#what-isnt-changing" title="Permanent link">¶</a></h3>
<p>Dolphin's main home for development is the #dolphin-dev IRC channel. IRC is a decentralized communication service that will continue to exist for the foreseeable future. While we have had to change servers now and again, we always had the option of hosting our own server until the end of active development if worst came to worst.</p>
<p>Discord, on the other hand, is a proprietary service that could disappear at any point. They could change their Terms of Service to say that emulation isn't allowed and boot us all off tomorrow if they wanted. They could even be suddenly bought and burned to the ground out of nowhere. As such, none of our core services will ever <em>rely</em> on Discord. If for any reason the Discord server disappeared, development would continue as per usual.</p>
<p>The Dolphin Wiki, Issue Tracker, and Website will all be unaffected by this, save for the fact that the website now has a direct link to the Discord server. As for our forums, there are no plans to change them. While they may not have the quick response times of Discord, they're a support and communication platform that we have complete control over, and they are better for longer form reports and responses.</p>
<p>As for users on the Discord, you probably won't notice anything different. Maybe a few new faces as more developers migrate over and some new channels to display some infrastructure changes.</p>
<h3 id="next-steps"><strong>Next Steps</strong><a class="headerlink" href="#next-steps" title="Permanent link">¶</a></h3>
<p>The new state of Dolphin's chat channels still leaves things more fragmented than they should be. We know that some of our newer developers are more comfortable with newer communication platforms and prefer using Discord over IRC. And Discord might also make some of our users and developers uncomfortable: it is after all a for-profit proprietary service, with an unclear business model, and primarily managed by a U.S. corporation.</p>
<p>We're in the process of evaluating <a href="https://matrix.org/">Matrix</a> for Dolphin's community. Matrix is an open-source decentralized chat platform, akin to Discord or Slack in its supported features, but similar to IRC in its openness. It would provide to our users and developers an open alternative to Discord but without the quirks and outdated customs of IRC. Matrix can be used to bridge other chat platforms as well, allowing us to fix the fragmentation problem of our development chat.</p>
<p>We don't know yet when we will be able to get this implemented. But if Discord is not to your liking, know that something is on the horizon to give you more options!</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/discord/notthatmatrix.png">
<img src="https://dolphin-emu.org/m/user/blog/discord/notthatmatrix.png"></a>
<figcaption>No, not <a href="https://wiki.dolphin-emu.org/index.php?title=Enter_the_Matrix">that Matrix</a>!</figcaption>
</figure>
</div>
<p>In the end, this decision wouldn't have been possible without the community admins of the Discord server past and present. They have done an incredible job building and running this community. This includes all of their current administrators and moderators such as SirMangler and Tech Dunk, along with those that have retired like AlexApps. We know there have been a lot of support staff on the server that have helped ease our workload over the years by helping walk users through problems and setup.</p>
<p>We hope that our endorsement and adoption of the Dolphin Discord server will help it grow further, and for those that stayed away because it wasn't official, you need not stay away any longer. </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: September, October, and November 2022
2022-12-21T09:43:56+00:002022-12-23T07:43:12.014117+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/12/21/dolphin-progress-report-september-october-november-2022/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/progressreportheader-octo2022.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/progressreportheader-octo2022mini.jpg" />
</header>
<p>As we hit the holiday season, our Progress Report <em>might</em> be considered a bit late. A two month report became a three month report as we realized just how much work we had to catch up on. While the usual <em>summer</em> burst of activity didn't come, it seems instead everyone poured their time in throughout the autumn months! There's so many features, performance improvements, quality of life updates, and more that had to be considered.</p>
<p>We're going to have to skip out on some of the smaller updates this time around because there are so many big hitters. For instance, if you hate shader stuttering, Dolphin's <a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">Ubershaders</a> have gotten a new tool that helps smooth out issues on Vulkan, D3D12, and Metal thanks to Dynamic Vertex Loaders that help reduce/remove pipeline compiles during gameplay.</p>
<p>If you're on a weaker device that stays away from Ubershaders... maybe after these optimizations you might finally be able to make the leap. Raw performance in Dolphin is up across the board thanks to many optimizations to the GPU emulation thread (which is emulated on CPU). Because this optimization affects the very core of Dolphin, pretty much every game should be faster, with a few select games seeing improvements of <em>roughly 50%</em>!</p>
<p>If you're looking to play with friends, we have some good news on that front as well. Dolphin's "experimental" Wii Remote Netplay support has finally received some much needed attention that may help it break free of that experimental moniker in the coming months. </p>
<p>And, for our Android users, a lot of the performance improvements also affect tablets and phones, but we also have a special treat <em>only</em> for you. The Android GUI has also seen a huge overhaul that should make it easier to use and easier on the eyes. And for those having problems with particular games using features Dolphin <em>can't</em> reasonably emulate, we have a few presents from an old friend to patch them up.</p>
<p>We could go on and on, but you know what time it is. Please enjoy these Notable Changes!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-17613-implement-missing-features-for-wiiconnect24-support-by-noahpistilli"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17613/">5.0-17613 - Implement Missing Features for WiiConnect24 Support</a></strong> by <strong><a href="https://github.com/noahpistilli">noahpistilli</a></strong><a class="headerlink" href="#50-17613-implement-missing-features-for-wiiconnect24-support-by-noahpistilli" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:180px; float:right; text-align:center;">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiconnect24logo.png">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiconnect24logobig.png">
</a></div>
<p>And after all of the changes and features we mentioned in the intro, we neglected to mention our headline change for this report. It's almost fitting - WiiConnect24 came and went without leaving much of a mark in the gaming world. It was touted as a new way to be connected to the internet 24/7, with access to up to date information from the comfort of your couch. You could see the weather, the latest news, receive messages (with pictures!) and more through the WiiConnect24 service. Even if your console wasn't on, the disc tray would glow blue if you have a new message, a Wii Update, or something else awaiting you for the next time you booted things up.</p>
<p>By 2013, the unending march of technology had already consumed much of the usefulness of the service, and everyone expected it to slowly fade away. But to our surprise, on 13 April 2013 Nintendo announced the closure of WiiConnect24 in <em>late June</em>, only 44 days away. At the time <a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Network_Guide">Nintendo Wii Wi-Fi Connectivity Support</a> was in its infancy. Our mastery of NAND and IOS features was simply not good enough to support WiiConnect24, and many of its channels didn't even run in Dolphin at the time. When WiiConnect24 disappeared, we were years away from being able to support it. As much as it pained us, we were unable assist in the efforts to preserve WiiConnect24.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/nintendochannel.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/nintendochannel_thumb.jpg"></a>
<figcaption>The sudden passing of WiiConnect24 put its many supported channels, promotional demos, cheesy videos and advertisements at risk of disappearing forever.</figcaption>
</figure>
</div>
<p>However, there was another option for testing and preserving WiiConnect24 - the actual Wii. From the <a href="https://rc24.xyz/about.html">early days after WiiConnect24</a>'s closure, preservationists and reverse engineers have been chipping away at reviving many of the channels and features seemingly lost. For international/default channels, <a href="https://rc24.xyz/">RiiConnect24</a> offers good support across a lot of channels. For players looking for some Japanese exclusive channels, <a href="https://www.wiilink24.com/">WiiLink</a> has been slowly building support for these obscure channels that offer up some neat experiences that never saw the light outside of Japan.</p>
<p>Some efforts have been made by the <a href="https://rc24.xyz/">RiiConnect24</a> developers to bring their service to Dolphin, but these have been a bit hacky. They have workarounds to get <em>certain</em> channels working within Dolphin, though it required a lot of setup in order to prepare VFFs (Virtual FAT Filesystems) that the channels used to store WiiConnect24 data. It was not user friendly, as it was difficult to set up, had limited functionality, and could easily break at any time.</p>
<p><strong><a href="https://github.com/noahpistilli">Sketch</a></strong>, <a href="https://www.wiilink24.com/">WiiLink</a> project lead and <a href="https://rc24.xyz/">RiiConnect24</a> contributor, realized that direct support in Dolphin would be a boon to both projects. It would open up their replacement services to more users and also make it easier to debug issues. But of course, it was easier imagined than executed. Sketch identified three major challenges that blocked WiiConnect24 emulation: support for VFF files, implementing some of the missing IOS functions, and figuring out the many fields of nwc24dl.bin and what they do.</p>
<p>Figuring out nwc24dl.bin was a reverse engineering job. We mentioned that WiiConnect24 titles could download updates <em>while</em> the Wii was in standby mode. How often it checked among other important things is stored in nwc24dl.bin. Emulating the standby feature is <em>thankfully</em> unnecessary, as WiiConnect24 channels also check for updates while the actual Wii is running and when you load them. Because Dolphin doesn't support the Wii's background scheduler, the only check it could possibly support is on channel boot.</p>
<p>Once the many fields of nwc24dl.bin were reverse engineered and understood so it could be HLE'd, the next thing that needed to be handled was actually downloading the data needed for these channels. To do this, an IOS function called <code>DownloadNowEX</code> needed to be supported. This is a download handler that can download anywhere from 1 to 32 files. If it is downloading more than one file in a single task, these files are called "subtasks" and there is a flag set in memory saying this download is a subtask and how many files it needs to download. Many of the channels take advantage of the subtask functionality, and the News Channel will download 24 subtask files when it updates!</p>
<p>These files that are downloaded now need to be packed into VFF files for use by the channels. Thankfully, Dolphin already has to handle the FAT filesystem thanks to SD cards and whatnot, so <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> could get a jump start on support by copying code from there. But this wasn't an easy task, and actually supporting the VFF files required a little bit of finessing. The headers on the files were mostly undocumented and needed some digging into. However, once that was taken care of, <strong><a href="https://github.com/noahpistilli">Sketch</a></strong> streamlined the solution with <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong>'s help.</p>
<p>With these changes, WiiConnect24 channels like the <a href="https://wiki.dolphin-emu.org/index.php?title=News_Channel">News Channel</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Forecast_Channel#Emulation_Information">Forecast Channel</a>, and others can resume service in Dolphin! </p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/everybodyvotes.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/everybodyvotes_thumb.png"></a>
<figcaption>WiiConnect24 is working in Dolphin at long last!</figcaption>
</figure>
</div>
<p>Is the situation perfect? Absolutely not. Like we said, Dolphin doesn't support background updates, so on their very first boot most of these channels will error out. After that they should work normally as long as the NAND stays intact. The other thing to note is that Dolphin currently doesn't have a way to redirect WiiConnect24 requests. That means users will need to patch the channels to seek out the third party servers.</p>
<p>If you're into weird era specific features, connecting to these services is absolutely worth the time. Just to give you a taste of what you can find, here is a clip from <a href="https://en.wikipedia.org/wiki/Nintendo_Channel#Nintendo_Channel">Nintendo Week</a> 7 Dec 2009, captured from Dolphin using RiiConnect24.</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/NintendoWeekClip.mp4" type="video/mp4"/>
</video></div>
<figcaption></figcaption>
</figure>
</div>
<p>If you want to see more great videos like this, patch your Nintendo Channel today and check out the Nintendo Channel on <a href="https://rc24.xyz/">RiiConnect24</a> with either your Wii or the latest builds of Dolphin!</p>
<hr />
<p><strong>Note:</strong> <a href="https://rc24.xyz/">RiiConnect24</a> and <a href="https://www.wiilink24.com/">WiiLink</a> are third party services much like <a href="https://wiimmfi.de/">Wiimmfi</a>. You should make sure that you trust any third party service before connecting to it via <em>any</em> emulator. However, both <a href="https://github.com/RiiConnect24">RiiConnect</a> and <a href="https://github.com/WiiLink24">WiiLink</a> are open source, and were tested by developers during the development/testing of WiiConnect24 changes.</p>
<hr />
<h4 id="50-17527-netplay-redesign-wii-remote-data-exchange-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17527/">5.0-17527 - Netplay: Redesign Wii Remote Data Exchange</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-17527-netplay-redesign-wii-remote-data-exchange-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>As we said in the intro, Wii Remote Netplay has been a frustrating, yet tantalizing, feature since its inception. The Wii has a <em>ton</em> of multiplayer games that either didn't support Wi-Fi, or had substandard Wi-Fi support leading to couch multiplayer being the superior choice. Dolphin has netplay that lets you take couch multiplayer online. Everyone wins, right? There's one problem: Wii Remotes.</p>
<p>Using Wii Remote Netplay is a test of frustration for all but the most hardened of users. A ton of pitfalls awaited anyone who dared try to use it.</p>
<ul>
<li>Wii Remote Netplay did not support automatic port assignment, which was completely the opposite of GameCube Controller Netplay. This meant each player had to configure the actual Wii Remote slot's profile to match what slot they were assigned to on netplay. <a href="https://wiki.dolphin-emu.org/index.php?title=Netplay_Guide">To see how automatic port assignment works in Netplay now, please check out the netplay guide.</a></li>
<li>Wii Remote Netplay would crash on close due a previously undetermined bug with <em>Safe Shutdown</em> on netplay. Some Wii games flush saves during "Safe Shutdown" so we couldn't just outright disable this feature on netplay.</li>
<li>Wii Netplay has to export saves at the end of a Netplay Session if a user wants to permanently save them. But, because Wii Remotes would usually cause Wii Netplay to crash during safe shutdown, this meant that saves would get lost in limbo. While it was technically possible to restore them, it required expert knowledge and manual reconstruction of the NAND.</li>
<li>If a Wii Remote disconnected during a netplay session, for any reason, Dolphin would crash. This is despite there being code designed to handle this exact situation. Unfortunately, this meant that games like Donkey Kong Country Returns and Dokapon Kingdom couldn't be played on netplay, as these games will disconnect various Wii Remotes during the menus.</li>
<li>The <em>Real Wii Remote</em> setting will never work on Netplay. This is less of a problem nowadays thanks to the innovation of <a href="https://dolphin-emu.org/blog/2020/04/05/dolphin-progress-report-february-2020/#50-11684-add-support-for-wii-remotes-over-inputcommon-by-billiard">connecting physical Wii Remotes as emulated controllers</a> and the "Wii Remote" controller profile. Some problems solve themselves.</li>
</ul>
<p>These limitations and a confusing UI for setting up Wii Remotes on netplay meant that only extremely well researched users could actually use it. In order to fix all of these problems, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> decided to rethink how Dolphin would communicate Wii Remotes over netplay.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/DKCR-Netplay.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/DKCR-Netplay_thumb.jpg"></a>
<figcaption>Donkey Kong Country Returns struggled with netplay because it disconnected Wii Remotes.</figcaption>
</figure>
</div>
<p>If it wasn't obvious by the list of problems, Dolphin's netplay was not designed for the complexity of the Wii Remote. Still, it was implemented because we figured <em>someone</em> would want to use it, even if it was a pain in the ass to setup and use. Unfortunately, it was hard to recommend to anyone but the most desperate of players because of all the hoops you had to jump to get there.</p>
<p>The <a href="https://dolphin-emu.org/download/dev/master/4.0-17/">initial implementation</a> from <a href="https://github.com/RachelBryk">RachelBryk</a> was an experimental solution to enable functionality. It was meant more for experimentation and testing than general users, but once they saw it <em>could</em> work, users obviously wanted to use it. It was hard to provide help for the feature because it was so temperamental that most developers couldn't tell what was wrong. It got to the point where Wii Remote Netplay was one of the few features <a href="https://github.com/dolphin-emu/dolphin/pull/3691">outright removed</a> for the Dolphin 5.0 release in order to prevent users from thinking it was a fully working stable feature.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-40-8032.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-40-8032_thumb.png" /></a>
<figcaption>Experimental Wii Remote Netplay was available throughout most of the 4.0 era.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-40-9050.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-40-9050_thumb.png" /></a>
<figcaption>However it was removed before 5.0, and <a href="https://dolphin-emu.org/blog/2016/08/02/dolphin-progress-report-june-july-2016/#50-133-50-136-50-222-50-290-restore-and-repair-wiimote-netplay-by-mimimi-and-jmc47">restored after the release.</a></figcaption>
</figure>
</div>
</div>
<p>Dolphin's Netplay has evolved over the years. The advent of the desync checker revolutionized netplay, and allowed users to immediately know if something was wrong on boot. Other features, like the <a href="https://dolphin-emu.org/blog/2015/07/01/dolphin-progress-report-june-2015/#netplay-infrastructure-updates-40-6512-wii-blank-nand-on-netplay-by-comex-40-6638-netplay-desync-detection-by-rachelb-40-6839-synchronize-gamecube-sram-settings-file-on-netplay-by-admiralcurtiss">"Blank NAND"</a> further stabilized Wii Netplay in general. Wii Netplay was on the rise, but one problem remained constant: The Wii Remote.</p>
<p>The problem with fixing this is that the Wii Remotes are so complicated to handle. They communicate over Bluetooth at a high polling rate of 200hz, have their own logic for attachments, come equipped with accelerometers and (optionally) a gyroscope, carry a speaker which can play 8-bit PCM audio, and even come with an infrared camera with a resolution of 128x96. While Dolphin doesn't enable it on netplay, Wii Remotes even have a small bit of EEPROM for storing Miis on them! Wii Remotes are weird. But worse of all, the Wii Remote's reporting mode can change at any time, and the sessions have to be <strong>perfectly</strong> synced in order to prevent a deadlock from the wrong inputs being received on one or more Wii instances.</p>
<hr />
<p>Sometimes in order to make things work, you need to start fresh. In order to start the healing, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> did the most logical thing and immediately threw out most of the existing Wii Remote handling code used for Netplay. At this point, we knew the problems with Wii Remote Netplay and could now try again to write a solution that avoided these issues.</p>
<p>The big one is that when a Wii Remote talks to the Wii, it does this with <em>input reports</em> - small chunks of data sent over the Bluetooth connection that contain a partial Wii Remote state. These reports are what was sent over the network during Wii Remote Netplay. The problem comes that the game can configure at any time what kind of report it wants the Wii Remote to send. This means if there's any kind of problem on netplay on any of the clients and the reports don't match what the game is expecting, Dolphin would lock-up. In the best case, netplay would close but usually the entire emulator would crash.</p>
<p>Because of how sensitive this is, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> decided to take a different route. Instead of sending <em>just</em> what the game is requesting, all players will send <em>all</em> of the Wii Remote state across netplay and let each Dolphin instance translate those into an input report. This makes Wii Remote netplay more resilient to crashes over minor configuration problems and also opens up a ton of new features. Since we're no longer relying on each Dolphin instance to sort out the Wii Remote state, players on netplay can now do things like <em>change attachments</em> during netplay and it can handle events where the game might forcibly disconnect a Wii Remote.</p>
<p><strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> also standardized Wii Remotes to use the same conventions as GameCube netplay. This means Dolphin's automatic port assignment now works the same across all controller types. Best of all, Dolphin <em>no longer crashes when you attempt to end a Wii Remote Netplay session</em>.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-current.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/wiiremotenetplay-current.png"></a>
<figcaption>Wii Remotes have seen some renovations and should be just as easy to setup as GameCube Controllers for netplay.</figcaption>
</figure>
</div>
<p>That's not to say everything is perfect. <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> mostly focused on getting things working with this rewrite, but there are still some missing features. "Golf Mode" and "Host Input Authority" should be able to work under the new implementation, but weren't done alongside the first wave of changes. As well, SD cards <em>are not</em> synced on netplay, so it's usually best to unplug them <em>or</em> make sure they are manually synced between players if SD cards are absolutely necessary.</p>
<p>With these changes, we're hoping that Wii Remote Netplay will <em>finally</em> be a feature that our general users can setup and enjoy.</p>
<h4 id="50-17681-vulkan-use-vma-for-memory-allocations-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17681/">5.0-17681 - Vulkan: Use VMA for memory allocations</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-17681-vulkan-use-vma-for-memory-allocations-by-k0bin" title="Permanent link">¶</a></h4>
<p>We're going to be talking <em>a lot</em> about Vulkan coming up as there were some renovations done throughout the backend. A consequence of these renovations is that Dolphin now uses <a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator">Vulkan Memory Allocator</a> (used by many open source projects to efficiently allocate memory, including other emulators) to handle memory management with Vulkan.</p>
<p>This is a definite improvement, but it didn't exactly fix anything. The problem was that other changes to the Vulkan backend left us with some instability problems and we thought that <a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator">Vulkan Memory Allocator</a> would fix the issue and most likely improve performance. It didn't fix the issue and didn't have an <em>immediate</em> impact on performance, but it still optimizes how we're handling memory in Vulkan. VMA is a definite improvement and we're happy to join the ranks of projects using the library.</p>
<h4 id="50-17499-vulkan-raise-number-of-command-buffers-and-50-17620-vulkan-allocate-descriptor-pools-as-needed-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17499/">5.0-17499 - Vulkan: Raise number of command buffers</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17620/">5.0-17620 - Vulkan: Allocate descriptor pools as needed</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-17499-vulkan-raise-number-of-command-buffers-and-50-17620-vulkan-allocate-descriptor-pools-as-needed-by-k0bin" title="Permanent link">¶</a></h4>
<p>Now we're going to get into why VMA was thought to be needed. Namely, Dolphin's usage of Vulkan was pretty primitive in some ways. The emulator was only using <em>two</em> command buffers and a single descriptor pool of 100,000 descriptor sets every frame. These choices weren't exactly efficient, but they weren't exactly causing problems either. Except on Android.</p>
<p>Our eternal battle with GPU drivers on Android has an ebb and flow. While we love to blame the drivers for their problems, there's always the otherside of things where Dolphin does something stupid. This time, we were the ones being grossly inefficient.</p>
<p><strong><a href="https://github.com/K0bin">K0bin</a></strong> found out that Adreno GPUs were forced to stall when running Dolphin because they were waiting on an available command buffer, particularly in games that need readbacks (EFB/XFB2RAM titles.) By increasing the number of command buffers to eight, <strong><a href="https://github.com/K0bin">K0bin</a></strong> reduced GPU stalling and made it so the mobile GPUs could work more efficiently. This doesn't mean your maximum performance at 1x Internal Resolution will go up, but this might mean you'll be able to play at a higher internal resolution before you become GPU limited!</p>
<p>This is a <em>major</em> optimization and we wanted to show some fancy graphs showing how much better things were running. Unfortunately, Android said no. Even though we reduced GPU usage by <em>up to 30%</em>, due to performance governors on the phone clocking things down, we were unable to see a difference in framerate on our devices. While <em>sometimes</em> the CPU would clock up, the numbers varied so greatly even within the same build, that we no longer feel confident in giving performance numbers on Android.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidcharts.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidcharts_thumb.jpg"></a>
<figcaption>"You need this? No, I don't think you need this."</figcaption>
</figure>
</div>
<p>The good news? This brings Vulkan's performance roughly in line with OpenGL on Android under Adreno devices. While we can't guarantee the drivers play nice in every game because performance testing has been a nightmare, we were able to confirm this fixes NES VC games being abnormally slow on Vulkan + Adreno.</p>
<hr />
<p>Unfortunately, this optimization had some unintended effects that reverberated through the Vulkan backend, especially for our macOS users through MoltenVK. Players were reporting new and exciting crashes throughout tons of games, forcing <strong><a href="https://github.com/K0bin">K0bin</a></strong> into figuring out what was going wrong. </p>
<p>Thankfully, the issue became apparent relatively fast. The new code wasn't <em>wrong</em> but other parts of the backend relied on how things worked before. Previously, if Dolphin ran out of descriptors, it would submit a command buffer expecting that to get it a fresh descriptor pool. With the new changes, submitting a command buffer would no longer get a fresh pool, and Dolphin would find itself still out of descriptors, at which point it would skip the draw.</p>
<p>In order to prevent the crashes, graphical issues, and <em>further</em> reduce memory overhead, <strong><a href="https://github.com/K0bin">K0bin</a></strong> changed Dolphin to now allocate descriptor pools as needed. This <em>technically</em> could positively affect performance, but we weren't able to measure any difference in practice.</p>
<h4 id="50-17357-optimize-getvertexsize-and-50-17370-cache-vertex-sizes-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17357/">5.0-17357 - Optimize GetVertexSize</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17370/">5.0-17370 - Cache Vertex Sizes</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-17357-optimize-getvertexsize-and-50-17370-cache-vertex-sizes-by-k0bin" title="Permanent link">¶</a></h4>
<p>New hardware always brings new opportunities. But that new hardware <em>doesn't</em> need to be something that pushes the boundaries of performance. In fact, one of the most exciting new devices this year is made up of decent, but unremarkable hardware in an interesting form factor. Of course, we're talking about the Steam Deck. This is an exciting target for Dolphin because it's got a respectable CPU and <em>real</em> GPU drivers paired with a mobile gaming form factor. In theory, it should be great for Dolphin.</p>
<p>However, early days of testing has been a somewhat rocky experience. Using Dolphin's desktop GUI on the Steam Deck isn't fun and takes a lot longer than you would like. Setting up controls is frustrating and actually getting Dolphin to compile on the Steam Deck is a nightmare unless you're fairly well versed in "Linux-fu". Thankfully, there is an easily accessible flatpak version (not maintained by Dolphin Emulator Staff) that keeps up with our beta builds, but it has a few problems not present when you compile yourself.</p>
<p>Thankfully, the situation improves a lot <em>once</em> you get past the setup stage. Light-to-midweight games run very well, and if you need a bit more juice you can always lock the GPU at a higher clockrate in exchange for lower battery life. But the hardware was <em>just</em> missing full speed on some mainstream titles. One game in particular was <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a>, which hovered around 80 to 90% speed in several strenuous areas.</p>
<p>A slight optimization wouldn't be enough to make one of the Wii's premiere 3D platformers fullspeed on the Steam Deck, but it was close enough to at least give it a shot. Having observed the performance problems first hand, <strong><a href="https://github.com/K0bin">K0bin</a></strong> downclocked their desktop and decided to profile things there. While a 20% jump in performance was <em>a lot</em> to ask for, they figured they could look for some low-hanging fruit and at least bring it closer.</p>
<p>Things took a twist when they discovered that the function GetVertexSize was using <strong>a lot</strong> of CPU time on the GPU emulation thread. This function should only need to come up once per vertex format and isn't anything that you'd expect to see in a flame graph. Surely there was a reason, right? Well, they started optimizing it and immediately got positive results. In fact, just optimizing this alone was able to push performance up on a downclocked R9 5900 roughly 30%! That's a huge jump, and one that had to be seen to be believed. </p>
<p>Testing it on the Steam Deck didn't provide as huge of a jump everywhere, but it was just enough to push it to nearly full speed in most demanding areas. But then the question became how we missed such an obvious problem.</p>
<p><code>git blame</code> revealed that this is a performance regression from just under 2 years ago during the fifoplayer quality of life updates. We didn't notice the performance regression because other optimizations were masking it, but an erroneous duplicate GetVertexSize was added which was causing it to be called for <strong>every single primitive.</strong> Suddenly something that should only take a little CPU time was taking a lot.</p>
<p>Finding this issue inspired <strong><a href="https://github.com/K0bin">K0bin</a></strong> to continue to optimize that part of the code. They discovered that we could also use the cached VertexSize instead of having use GetVertexSize again in some cases. This gave another jolt to performance.</p>
<p><br/>
<script>
addChart({"title":{"text":"Optimized GetVertexSize with Regression Fix"},"subtitle":{"text":"Super Mario Galaxy Hub | Simulated Steam Deck (AMD R9 5900 @ 2.2ghz)"},"exporting":{},"chart":{"type":"column","inverted":true,"polar":false,"height":550},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"FPS","turboThreshold":0,"marker":{}}],"data":{"csv":"\"null\";\"FPS\"\n\"Before\";85\n\"Regression Fix\";112\n\"+ Optimization\";140","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"labels":{"format":"{value}FPS","enabled":true},"tickLength":10,"tickInterval":30,"minorTickInterval":10},"pane":{"background":[]},"responsive":{"rules":[]},"xAxis":{"labels":{"enabled":true}},"legend":{"enabled":false},"colors":["#006eff","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]})
</script>
<br/></p>
<p>The fix plus the optimization put together more than did the trick. We tested the Steam Deck after <em>painfully</em> compiling a build with the optimizations and played through a good bit of <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> (and a little of <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">Super Mario Galaxy 2</a>) at full speed and 2x Internal Resolution without any noticeable slowdown. In fact, you can even throw on Hybrid Ubershaders and get a pretty smooth experience on par with a mid-range desktop!</p>
<hr />
<p>So, at this point you're probably wondering if this optimization carries over into other games. After all, pretty much every game is going to be using primitives, right? </p>
<p>The answer is yes, but the numbers aren't <em>usually</em> this ridiculous. On high-end gaming PCs using Dolphin's default settings, the Super Mario Galaxy games saw an improvement of around 30% when running at 4x Internal Resolution. High polygon games that lack other bottlenecks will improve similarly, but games that have different performance profiles may not see as big of a benefit. If a game is <em>really</em> difficult to run with tons of different bottlenecks, they will see very little gain. <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_III:_Rebel_Strike">Rogue Squadron 3</a> gains less than ~1.5% performance in most areas.</p>
<p>Most <em>normal</em> games will see an increase in performance ranging from around 5% to 10%, with some anomalies like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> seeing larger gains.</p>
<h4 id="50-17542-update-efb-peek-cache-on-draw-done-and-tokens-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17542/">5.0-17542 - Update EFB Peek Cache on Draw Done and Tokens</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-17542-update-efb-peek-cache-on-draw-done-and-tokens-by-k0bin" title="Permanent link">¶</a></h4>
<p>The other major bottleneck in the <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> games comes from their use of <strong>EFB Peeks</strong>. In essence, an EFB Peek is when the GameCube/Wii CPU reads pixels of the Embedded FrameBuffer (EFB). By <em>peeking</em> into it the game can learn information about one or more pixels, such as their depth, color, etc. </p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy 1</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">2</a> use EFB Peeks for two things, and only one of them is necessary for gameplay. The first thing is a depth check for pixels on screen. This is how the game is able to tell where your cursor is in relation to 3D space. It's used to tell where to shoot starbits and can be used to see if you're trying to grab objects like Pull Stars.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxy-pullstars.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxy-pullstars_thumb.jpg"></a>
<figcaption>Pull Stars are essential to proceed throughout the game, much to the chagrin of many Android users.</figcaption>
</figure>
</div>
<p>The other use <em>doesn't</em> affect gameplay but can hurt performance just as much. This check is only active while a "sun" is on screen. Even when the sun is within the field of view of the camera, that doesn't mean it's actually visible. There might be a wall, planet, ground, or something else occluding (blocking) the view. That's where EFB Peeks come in - the game uses EFB peeks whenever a sun is in front of the camera to make sure it is actually visible! This is why many users complain of slowdown on weak devices <em>only</em> when a sun is on screen!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxyflare-on.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxyflare-on_thumb.jpg" /></a>
<figcaption>Galaxy uses EFB Peeks to look at the screen coordinates where the sun should be.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxyflare-off.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/galaxyflare-off_thumb.jpg" /></a>
<figcaption>If the EFB Peek cannot "see" the sun, the game will not render the sunflare. In this demonstration we disabled EFB Peeks to force it to fail.</figcaption>
</figure>
</div>
</div>
<p>This technique is an easy and effectively free way to sample the screen for occlusion on the GameCube and Wii. Tons of games use this technique (or a variation on it) for rendering lens flares only when the source light is visible. For example, <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">The Legend of Zelda: The Wind Waker</a> does the same check but with inverted conditions - it isn't checking if the sun is visible but if it is blocked. However, not every developer got the memo on this simple lesson. See <a href="https://wiki.dolphin-emu.org/index.php?title=Rune_Factory:_Tides_of_Destiny">Rune Factory: Tides of Destiny</a>.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/runefactoryflare.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/runefactoryflare_thumb.jpg"></a>
<figcaption>If only they had used EFB Peeks.</figcaption>
</figure>
</div>
<p>While this technique is more-or-less free on the GameCube, it is an absolute pain to emulate. We've covered something similar in the previous Progress Report so this explanation will be a little familiar.</p>
<p>The GameCube and Wii use a unified memory model, where the CPU and GPU can read or edit eachother's memory at any point with no performance cost. However, Dolphin runs on split memory model systems where the CPU and GPU cannot access eachother's memory easily. To emulate the unified memory model, Dolphin duplicates the GC/Wii Main Memory on both the host's system memory and the host's GPU vram, and we sync any changes across both memory pools. Any time a sync is issued, we have to stop all work until the sync is complete, so the host hardware will just sit and wait while the data is moving through the system. At the speed computers operate, moving data from system RAM to GPU VRAM takes <strong>ages</strong>, so all that waiting causes a sizable performance hit.</p>
<p>Specifically with EFB Peeks, we have to stall the GPU and synchronize the memory pools so the CPU can read the rendered frame.</p>
<p>Fortunately, desktop GPU drivers have many optimizations to minimize the impact of stalls, and modern desktops are so powerful they can usually just eat the performance hit while keeping emulation far above full speed. The only time that EFB Peeks become a problem for Dolphin is in <em>very</em> extreme cases where they are combined with other shenanigans (EFB Pokes, Store EFB Copies to Texture and RAM, etc.) <em>or</em> weaker hardware with iffy drivers and stingy governors.</p>
<p><br/>
Enter Android.</p>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:8%; min-width:120px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png"></div>
<p><br/></p>
<p>Whether you're on Adreno, Mali, or PowerVR, a game using EFB Peeks, Pokes, or one that requires the use of Store EFB/XFB Copies to RAM usually spells doom for performance. In the mobile landscape, everything is optimized to save power. But mobile SoCs do not understand Dolphin's weird workload. If a game triggers a memory pool sync, we have to stall the GPU while data is moving around. Mobile power governors see us stalling and think we are done with work, and immediately drop the clocks back to idle. But a few microseconds later we're back to needing maximum power. Unfortunately, the SoC will take its time and <em>reluctantly</em> raise clocks back up. <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">Super Mario Galaxy 2</a> will be doing many of these checks <em>every frame</em>. Unless your phone is absurdly powerful or your performance governor is extra forgiving, it's very hard to maintain to maintain full speed with all of this going on. Many of our mobile players have been working around this by only enabling EFB Peeks in stages that <em>absolutely need them</em>.</p>
<p>There is no way to make stalls cheap, and power governors are mostly out of our control, so the challenge becomes bundling and reducing the number of required readbacks as much as possible. This optimization by <strong><a href="https://github.com/K0bin">K0bin</a></strong> helps us get a little more mileage out of our last GPU sync/stall. <em>Instead</em> of just invalidating the EFB Peek cache, on tokens and drawdone, we can queue an update to all previously used EFB tiles. If the game only does work on the CPU between the DrawDone or Token and the actual EFB read, the read is able to hit the prepopulated cache and no longer needs to stall the GPU for another readback. This reduces the number of readbacks in many situations.</p>
<p>With this change, EFB Peeks are significantly less costly. In our testing, a Snapdragon 865 was able to run many stages of <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> at 60 FPS <em>without</em> disabling "Skip EFB Access to CPU", including ones with Pull Stars that would need the performance the most.</p>
<p>Is this a catch all to improve performance across all games? Unfortunately, not really. EFB Peeks are pretty much the <em>best</em> case scenario of readbacks, and this change further cements this. Other games like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a> uses Peeks, Pokes, PerfQueries, Store EFB Copies to RAM, and more. Even though this game only runs at 30 FPS (unless you choose to use a 60 FPS mod), the fact it uses so many difficult to emulate features turns it into a performance nightmare on Android.</p>
<p>This optimization has been merged into the setting <em>Defer EFB Cache Invalidation</em>, which is enabled automatically for the Super Mario Galaxy games. Because these cached results <em>could</em> break things in other games, we haven't enabled this optimization everywhere. You can test this change out in other games by enabling it under Graphics Settings > Advanced > Defer EFB Cache Invalidation.</p>
<h4 id="50-17762-d3d12-fix-numerous-hangs-by-k0bin"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17762/">5.0-17762 - D3D12: Fix Numerous hangs</a></strong> by <strong><a href="https://github.com/K0bin">K0bin</a></strong><a class="headerlink" href="#50-17762-d3d12-fix-numerous-hangs-by-k0bin" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:180px; float:right; text-align:center;">
<a href="https://dolphin-emu.org/m/user/blog/videocommon/d3d12logo.jpg">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/videocommon/d3d12logo_thumb.jpg">
</a></div>
<p>D3D12 is usually considered Dolphin's most performant backend for integrated and low-end graphics cards on Windows. Unfortunately it's also gotten another reputation among people with stronger computers: the most unstable backend. In fact, there have been dozens of reports of crashing in games specifically when using D3D12, forcing users to switch to other backends.</p>
<p>Things went from bad to worse when unrelated optimizations in <a href="https://dolphin-emu.org/download/dev/master/5.0-17542/">5.0-17542</a> caused <em>more</em> games to start crashing in D3D12. So <strong><a href="https://github.com/K0bin">K0bin</a></strong> was enlisted to figure out why this optimization that improved <em>all</em> backends would only cause problems in D3D12.</p>
<p>After fixing up D3D12's validation layers, which hadn't been touched in a while, <strong><a href="https://github.com/K0bin">K0bin</a></strong> quickly found out there was a slight issue with <code>BindFramebuffer</code> in the D3D12 backend. It seemed <em>very</em> possible for it to rely on a pipeline configuration that hasn't been set. While we had seen a lot of reports of crashes in D3D12, we were never able to figure out an exact cause because of how particular it was to trigger it. You needed specific games, running under specific settings, using a specific GPU and sometimes even a specific driver version. </p>
<p>Ironically, by accidentally making the problem occur more often, <strong><a href="https://github.com/K0bin">K0bin</a></strong> made it much easier to track down and fix. All that was needed was a small change to prevent Dolphin from relying on unset pipeline configurations. This fixed both the <em>new</em> crashes on D3D12, and the previously unsolved crashes that had been plaguing it for years.</p>
<p>We're happy to report that D3D12's stability should finally be on par with the other backends now.</p>
<h4 id="50-17403-add-dynamic-vertex-loaders-for-ubershaders-by-tellowkrinkle"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17403/">5.0-17403 - Add Dynamic Vertex Loaders for Ubershaders</a></strong> by <strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong><a class="headerlink" href="#50-17403-add-dynamic-vertex-loaders-for-ubershaders-by-tellowkrinkle" title="Permanent link">¶</a></h4>
<p>The last couple of changes have been about achieving maximum performance, but now we go into a <em>different</em> kind of performance. As mentioned in the last Progress Report, <strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong> has been working toward smoothing things out with Ubershaders. Due to various issues across various drivers, Ubershaders haven't been able to <em>completely</em> remove stuttering, especially in the modern Graphics APIs.</p>
<p>The <a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">original Ubershaders</a> were created back when D3D12 and Vulkan were the "next-gen" video backends and most of our users were on D3D11 and OpenGL. We were aware that the new APIs used "pipelines" but it wasn't 100% clear the effect they would have on Dolphin yet. For <a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">Ubershaders</a>, it's been a problem, to say the least. <a href="https://dolphin-emu.org/blog/2022/09/13/dolphin-progress-report-july-and-august-2022/#50-16930-reduce-pipeline-compilation-stutter-through-forcing-fbfetch-in-ubershaders-by-tellowkrinkle">We talked about these a bit in the last Progress Report</a> where <strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong> already had one change dedicated toward reducing pipeline counts.</p>
<p>For a quick rundown, the graphics pipeline is a fundamental building block for rendering on newer graphics APIs. It contain all of the data for a draw, taking vertices and textures all the way to the pixels in the render targets. However, since the pipeline contains all the settings for the draw, the display driver can optimize it before feeding it to the GPU. Some drivers then optimize those pipelines by combining the hardware vertex loader settings into the actual shader, which essentially makes our Ubershaders not so Uber anymore. So when the vertex loader on the GameCube changes settings, a whole new shader would need to be compiled with new vertex loader settings, usually resulting in a lengthy stutter.</p>
<p>We did run into this issue with Vulkan when Ubershaders were first implemented, but we were hopeful that API extensions or driver updates would eventually lessen or erase the issue. That hasn't happened.</p>
<p><strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong>'s solution isn't to make pipeline generation faster, but to simplify our pipelines so there are fewer branches and thus fewer pipelines in total. <strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong> was able to reduce our pipeline count so much that now <em>nearly every pipeline</em> is able to be precompiled at boot! And while these changes aren't able to remove the possibility of shader stuttering on <em>every</em> backend on <em>every</em> graphics card, it brings us much closer to that reality. </p>
<div class="media-block full-width">
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/ubershaders-before.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/ubershaders-before_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Ubershaders weren't fixing the problem on Metal before these changes.</figcaption>
</figure>
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/ubershaders-after.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/ubershaders-after_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>In newer builds, Ubershaders work as advertised by simplifying things for pipelines.</figcaption>
</figure>
</div>
<p>The Vertex Loader Ubershader, along with some changes leading up to it make a huge difference in shader compilation stuttering on all hardware.</p>
<ul>
<li><strong>Metal</strong>: macOS users can rejoice, as there are now no known drivers that will suffer from shader generation issues when using Ubershaders.</li>
<li><strong>D3D12</strong>: On NVIDIA and AMD graphics cards, using D3D12 should now provide the same stutter free experience as D3D11 has when using Ubershaders. Intel's drivers were not tested, but are likely greatly improved or completely stutter free.</li>
<li><strong>Vulkan</strong>: This is the most complicated case. On macOS via MoltenVK, shader compilation stuttering is completely eliminated <em>except</em> on Apple Silicon, where there may still be rare pipeline compiles. On Windows and Linux, the situation is improved but NVIDIA still tends to have a few noticeable compiles here and there. Wider support of the <code>VK_EXT_rasterization_order_attachment_access</code> extension would help eliminate pipeline compiles across pretty much every driver. That includes mobile drivers too, such as Adreno and Mali!</li>
<li><strong>D3D11</strong>: D3D11 does not have pipelines and doesn't benefit from this change. It also didn't suffer from the problems, so there's that.</li>
<li><strong>OpenGL</strong>: While it does have <em>proto-pipelines</em> with display lists and command lists, this change only targeted the newer APIs. OpenGL worked fairly well on most drivers anyway, so there wasn't <em>too much</em> to gain.</li>
</ul>
<p>Odds are, you probably won't see shader stuttering anymore <em>even</em> if you're on one of the configurations listed as not completely fixed. And if you <em>do</em> see shader stuttering, it'll be greatly reduced compared to before.</p>
<h4 id="50-17691-add-emulation-of-pointsizelinewidth-in-vertex-shaders-by-tellowkrinkle"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17691/">5.0-17691 - Add Emulation of Pointsize/Linewidth in Vertex Shaders</a></strong> by <strong><a href="https://github.com/tellowkrinkle">tellowkrinkle</a></strong><a class="headerlink" href="#50-17691-add-emulation-of-pointsizelinewidth-in-vertex-shaders-by-tellowkrinkle" title="Permanent link">¶</a></h4>
<p>This is a big one for macOS users, but it will have implications for everyone else sooner or later. The GameCube/Wii GPU has features called "Pointsize" and "Linewidth" which allows a developer to draw a point or line and give it an arbitrary size without having to use actual vertices or polygons. OpenGL developers may find that this feature <a href="https://registry.khronos.org/OpenGL-Refpages/gl4/html/glPointSize.xhtml">sounds</a> <a href="https://registry.khronos.org/OpenGL-Refpages/gl4/html/glLineWidth.xhtml">familiar</a>, but that is to be expected as the GameCube and Wii's pointsize and linewidth were based on OpenGL's! However, the GameCube added enough special sauce that they <a href="https://dolphin-emu.org/blog/2015/01/01/dolphin-progress-report-december-2014/#40-4699-line-widthpoint-size-unification-by-armada651">cannot be accurately emulated with OpenGL's native pointsize and linewidth</a>. Since newer APIs have nothing like this and neither does D3D11, all of the APIs our backends use do not support this feature natively.</p>
<p>Many games use these features, and without emulation of pointsize and linewidth, any lines will be <em>1</em> pixel wide and any points don't appear at all!</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/networktrans-broken.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/networktrans-broken_thumb.jpg"></a>
<figcaption>Without proper Pointsize and Linewidth emulation, most of <a href="https://wiki.dolphin-emu.org/index.php?title=Mega_Man_Network_Transmission">Mega Man Network Transmission</a>'s effects are barely visible.</figcaption>
</figure>
</div>
<p>So, considering our host GPUs can't <em>natively</em> render this, we had to find a way to emulate it. Our solution has been the use of Geometry Shaders. Geometry Shaders are an optional shader stage that can take a primitive in as an input and can output zero or more primitives. For Dolphin's purposes, we could use the "Point" or "Line" request as the input and then, based on the other properties the game specifies for that point/line, draw triangles that will create an identical shape.</p>
<p>When Dolphin adopted Geometry Shaders, they were a new and promising feature in graphics tech. Unfortunately, they were quickly superseded by newer features because <em>Geometry Shaders are slow</em>, so games avoided them. This put Geometry Shaders in a precarious position that <em>finally</em> reached a breaking point with the Metal Graphics API by Apple - Metal does not support geometry shaders whatsoever. Even though Geometry Shaders work in macOS under OpenGL, but, it's not in Metal. For us, this meant we needed to find a new solution if we were going to emulate Pointsize and Linewidth on modern macOS machines.</p>
<p>Originally, <strong><a href="https://github.com/skylersaleh">skylersaleh</a></strong> (who did Dolphin's port to macOS M1 and now works on <a href="https://github.com/skylersaleh/SkyEmu">skyemu</a>) started an experiment with using tried and true Vertex Shaders. While this could make <em>wide-lines</em> and <em>thick-points</em>, the original experiment failed because it wasn't able to get them to render correctly. <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> picked it up but quickly found that this wasn't a simple fix.</p>
<p>Dolphin as it was couldn't give the Vertex Shaders all of the information it needed to determine the way to orient line caps. A way to work around this was to have <em>Dynamic Vertex Loaders</em>, which would be able to determine the information we need directly in the Vertex Shader. Funnily enough, while <strong><a href="#50-17403-add-dynamic-vertex-loaders-for-ubershaders-by-tellowkrinkle">5.0-17403</a></strong> was designed to make Ubershaders more effective, those same Dynamic Vertex Loaders could be used to finally finish Pointsize/Linewidth with a Vertex Shader!</p>
<p>Support for Geometry Shaders, especially with Metal outright abandoning them, might be on the way out. So having this option is <em>good</em> now, but might be outright necessary later. Currently, we still use Geometry Shaders when they're available, but on GPUs without Geometry Shader support, Dolphin will now use the Vertex Shader implementation instead. Users can also try it out - it can be enabled in Graphics Settings -> Advanced with "Prefer VS for Point/Line Expansion".</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/networktrans-working.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/networktrans-working_thumb.jpg"></a>
<figcaption>With working effects, Network Transmission comes to life!</figcaption>
</figure>
</div>
<p>Because the Vertex Shader implementation is slightly faster, we will probably move over to it as the default implementation. This actually comes into play throughout the <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime:_Trilogy">Metroid Prime Series</a>, where the linewidth effects can effect overall performance. If your machine has a driver with incredibly slow Geometry Shader support, this may help things! However, on most modern GPUs, this is far down on the list of bottlenecks.</p>
<hr />
<p><em>Note: Our D3D11 Backend does not have Vertex Shader Linewidth/Pointsize for now. It's not <em>impossible</em> to accomplish, but due to the inline constant system from D3D12 not existing, it would take a different implementation.</em></p>
<hr />
<h4 id="50-17836-debugging-add-support-for-conditional-breakpoints-by-smurf3tte-and-trytwo"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17836/">5.0-17836 - Debugging: Add Support for Conditional Breakpoints</a></strong> by <strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong> and <strong><a href="https://github.com/TryTwo">TryTwo</a></strong><a class="headerlink" href="#50-17836-debugging-add-support-for-conditional-breakpoints-by-smurf3tte-and-trytwo" title="Permanent link">¶</a></h4>
<p>For people debugging, modding, TASing, or just in general messing around with a game's behavior, this is a major enhancement that will make your life easier. Dolphin has long had support for breakpoints, but the problem was that if it was a frequently used instruction, you'd have no way of telling it only to notify you if the condition you were looking for actually happened. Instead, debuggers would often rely on third party tools in order to debug more difficult issues.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/conditionalbreakpoints.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/conditionalbreakpoints_thumb.png"></a>
<figcaption>Conditional Breakpoints make debugging hot functions much easier.</figcaption>
</figure>
</div>
<p>This change adds support for basic logical conditions, but <strong><a href="https://github.com/TryTwo">TryTwo</a></strong> has already started work on callstack based conditions and support for conditional Memory Breakpoints as well.</p>
<h4 id="50-17902-add-gba-tas-window-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17691/">5.0-17902 - Add GBA TAS Window</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-17902-add-gba-tas-window-by-josjuice" title="Permanent link">¶</a></h4>
<p>When Dolphin added support for the <a href="https://dolphin-emu.org/blog/2021/07/21/integrated-gba/">Integrated GBA</a> there was some excitement about TASing titles that require GBAs. After all, Integrated GBAs worked with Dolphin's movie code as shown by Netplay Support!</p>
<p>Technically, Integrated GBAs could be controlled using TAS input when things were merged, but there was no built-in support. Instead, <strong><a href="https://github.com/Bonta">Bonta</a></strong> hooked up the existing GameCube Controller TAS input to the GameCube TAS Input window. However, as with any major, complex change, this detail was actually overlooked. When the TAS Input Handling was rewritten, this feature was accidentally removed and suddenly there was no way to control Integrated GBAs through TAS Input.</p>
<p>As the guilty party that accidentally removed support, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> quickly jumped on the issue to rectify things as soon as they realized what had happened. But rather than just returning the old normal, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> greatly improved the situation by making a special TAS Input window for Integrated GBAs with all of the controls now clearly labeled.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/gbatas.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/gbatas_thumb.png"></a>
<figcaption>Will we see a Four Swords Adventures 4 player TAS someday? We sure hope so!</figcaption>
</figure>
</div>
<h4 id="50-17907-improve-fpsvps-counting-and-revamp-appearance-by-sam-belliveau"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17907/">5.0-17907 - Improve FPS/VPS Counting and Revamp Appearance</a></strong> by <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong><a class="headerlink" href="#50-17907-improve-fpsvps-counting-and-revamp-appearance-by-sam-belliveau" title="Permanent link">¶</a></h4>
<p>Dolphin's FPS counter has always just been <em>there</em>. We don't even know for sure how long we've had it - we found it in <a href="https://github.com/dolphin-emu/dolphin/commit/38ff37539d54ac53ff79aeb2f4cdc2be10ddd36a">r488 (1.0-488)</a> from 9 Sept 2008, but it could be even older! It has changed a lot in that time of course. Originally it was an overlay built directly into each graphics <em>plugin</em>, before being moved to the Rasterfont system split between videocommon and the video backend, and finally moving to the shared Dear ImGui form we have today. However, despite being moved and rebuilt several times, how our FPS display calculates frames per second has never changed. Until today.</p>
<p>Progress Report newcomer <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> was distracted by how Dolphin's FPS display constantly flickered above and below 60FPS. It annoyed them so much that he decided he was going to do something about it... and fell down a rabbit hole. First of all, he added VPS (v-blanks per second) and emulation speed measures to the performance overlay, so that users in fullscreen and on Android can <em>finally</em> get this essential information.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-newdisplay.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-newdisplay_thumb.png"></a>
<figcaption>The above is correct. In NTSC territories the GameCube and Wii operate at 59.94fps not 60, requiring us to do some shenanigans for correct emulation on modern displays. What you see in Dolphin's titlebar is rounded to whole frames.</figcaption>
</figure>
</div>
<p>And he added color to the performance overlay, providing a very glanceable indicator of Dolphin's performance! The colors are cyan (full speed), green, yellow, orange, then finally red.</p>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-colours.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-colours.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Red is bad. You probably didn't need us to tell you that.</figcaption>
</figure>
</div>
<p>But most importantly, he changed how Dolphin's FPS display is averaged. Before we explain how he did it, here's a before and after of the FPS display with a title running at a perfect 60fps (59.94 technically).</p>
<div class="media-block full-width">
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-noneuler.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-noneuler.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>With the old formula, the FPS counter was a little unstable, with a variance of about half a frame. Unfortunately, it varied above and below 60fps, causing the most significant digits to constantly change. It was difficult to keep track of performance with this display. </figcaption>
</figure>
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-euler.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-euler.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>With the new formula, the FPS display no longer flickers the most significant digits and its variance is actually close to Dolphin's rendering! <br/><sub>Note: It isn't staying exactly 59.94 due to the shenanigans we have to do running 59.94 content on a 60hz display.</sub></figcaption>
</figure>
</div>
<p>Previously, the FPS display used an extremely simple formula: <code>number of frames in the sample / microseconds of the sample / 1,000,000</code>. That's it. This is an incredibly basic way to calculate frames per second, and it has worked for Dolphin for a very long time. It does the job. However, the downside of this method is that it is "sample and hold". Between samples Dolphin just shows the previous sample, completely unchanged, which feels unresponsive and could make stutters and other problems either invisible or overly emphasized. To minimize this Dolphin could use a very short sample cycle, but that has the consequence that each sample has little data to work with. If your sample size is only a few frames long, then even a spike lasting a <em>single frame</em> could significantly alter the results of the average, making the FPS display highly unstable. A longer sample time would resolve that, but then we're back to having it feel unresponsive and hiding stutters and other problems. So Dolphin developers of the past chose a sample duration of 0.25 seconds - this leaned a bit toward frenetic and unstable but kept the FPS display reasonably responsive. With a super simple formula like this, compromises are unavoidable.</p>
<p>The solution to this is to use an exponential moving average on top of a standard moving average - we'll call this a "Euler Average" for short. Basically, it averages the framerate over the last second (by default) using a <a href="https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/sma">standard moving average</a>, then applies an <a href="https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/ema">exponential moving average</a> on top to reduce jitter. The result of this math is that Dolphin can sample every frame so it is always up to date, it can smooth out sudden spikes and drops for a stable, legible indicator, and it can update the FPS indicator <em>every frame</em> so it is visually pleasing as well!</p>
<p>To show how this works in action, here is a graph showing the two methods against eachother. The data we're feeding into it is from a Dolphin test with an unlocked framerate, with frame to frame swings as high as <strong>100FPS</strong>. It's a worst case scenario for an FPS display. How do the old and new FPS formulas handle this awful data?</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/eulerfpsdisplay.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/eulerfpsdisplay_thumb.png"></a>
<figcaption>Click for detail.</figcaption>
</figure>
</div>
<p>The purpose of an FPS display is to give a glanceable reference of a game's performance. But the FPS display with the original formula can't handle data that is this variable. It just goes all over the place; even if you stared at it you would have no idea how fast the game is performing! But the Euler average is able to display a proper average of the framerate even from this garbage data. Of course, no one should encounter frametime variance on this level in actual gameplay unless something has gone <a href="https://dolphin-emu.org/blog/2018/12/04/dolphin-progress-report-november-2018/#dev-diary-putting-a-mac-through-its-paces-by-mayimilae">very very wrong</a>, but even in this worst case scenario our frame rate display is now able to do its job thanks to the new formula!</p>
<p>A consequence of using the Euler Average is that there is a now ramp up. If a game goes from 0FPS to 60FPS in one frame, it will take the whole sample window (1 second by default) to resolve to 60. Averaging the current data with prior data prevents sudden spikes and drops from making the FPS display devolve into noise, so it has to catch up to extreme change. To account for this, this change also adds a control to allow the user to change the sample window duration. A longer window will give a smoother and more consistent indicator, and a shorter window will be more frenetic but will be closer to real time and show smaller drops.</p>
<p>This and other new controls necessitated a move for our performance display options. You'll now find them in Graphics > Advanced under "Performance Statistics". This is not necessarily their permanent home but it's a safe place for <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> to continue working on this feature.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-settings.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/fps-settings_thumb.png"></a>
<figcaption></figcaption>
</figure>
</div>
<p>With this, our performance statistics display is better than ever! But <strong><a href="https://github.com/Sam-Belliveau">Sam-Belliveau</a></strong> is not done. Expect this feature to get even better in the coming months!</p>
<h3 id="more-patches-for-dcache-reliant-games"><strong>More Patches for dcache Reliant Games</strong><a class="headerlink" href="#more-patches-for-dcache-reliant-games" title="Permanent link">¶</a></h3>
<p>Dolphin doesn't <em>currently</em> target emulating the CPU Data Cache (dcache) and once it does, odds are that enabling it will make emulation too slow. For now, we're relying on patching these games that accidentally rely on the GameCube/Wii's CPU dcache behaviors.</p>
<p>The past three months, we've seen two new patches from <strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong>, who has done the hard work of reverse engineering these games, figuring out <em>why</em> they need dcache emulation, and patching their code to no longer need it! So if you're playing <a href="https://wiki.dolphin-emu.org/index.php?title=Dead_to_Rights">Dead to Rights</a> (audio issues) or <a href="https://wiki.dolphin-emu.org/index.php?title=Ten_Pin_Alley_2">Ten Pin Alley 2</a> (crashing before gameplay) in the latest development builds, you have <strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong> to thank!</p>
<p>Note that the patch for <a href="https://wiki.dolphin-emu.org/index.php?title=Ten_Pin_Alley_2">Ten Pin Alley 2</a> is only for the NTSC version of the game.</p>
<h3 id="the-android-gui-refresh"><strong>The Android GUI Refresh</strong><a class="headerlink" href="#the-android-gui-refresh" title="Permanent link">¶</a></h3>
<p>There are far too many changes that have gone into this over the past quarter of the year. <strong><a href="https://github.com/t895">t895</a></strong> has been extremely busy going through the Android GUI and modernizing it. From redesigning buttons, to making things fit your phone's theme/shape/size, and even some optimizations that will allow the menus to run more smoothly with fewer hitches.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-adjustcontrols-before.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-adjustcontrols-before_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-adjustcontrols-after.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-adjustcontrols-after_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<center><p>Everything is at least a little nicer than before!</p></center>
</div>
</div>
<p>One of the biggest keys is that Dolphin now supports Google's "Material You" design system. By default, Dolphin uses its own color scheming under "Material 3", but if you want it to match your system-wide theming better, you can swap over to "Material You" and several other color based options in the theme menu.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-themeswitcher.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-themeswitcher_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption></figcaption>
</figure>
</div>
<p>In addition to the theming changes, <strong><a href="https://github.com/t895">t895</a></strong> has greatly optimized the cover loading/caching mechanism to prevent the lockups on first load when swapping between GC/Wii/WiiWare tabs. This should make app usage much smoother overall. There are tons of minor fixes, especially for those with oddly shaped phones that should prevent things from going off screen or awkwardly resizing.</p>
<p>A bunch of the menus have also been redesigned to make things fit better and look nicer.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-cheats-before.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-cheats-before_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-cheats-after.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-cheats-after_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<center><p>Some changes are subtle.</p></center>
</div>
</div>
<p><br/></p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-gamecard-before.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-gamecard-before_thumb.jpg" /></a>
<figcaption></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-gamecard-after.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-gamecard-after_thumb.jpg" /></a>
<figcaption></figcaption>
</figure>
<center><p>Others are radically better.</p></center>
</div>
</div>
<p><br/></p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-riivolution-before.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-riivolution-before_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-riivolution-after.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-october/androidgui-riivolution-after_thumb.png" /></a>
<figcaption></figcaption>
</figure>
<center><p>But basically every window has been given some needed attention.</p></center>
</div>
</div>
<p><br/></p>
<p>While none of this <em>directly</em> affects emulation, it does make setting up the emulator easier and allows for greater customization. Those of you that want your phone and its apps to be personalized for you should have a lot of fun with these changes. For everyone else, these changes will make setting up and adjusting things from within the emulator much smoother.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2022-09-01&to=2022-12-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-17271/">5.0-17271</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-17995/">5.0-17995</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: July and August 2022
2022-09-13T07:46:32+00:002022-09-13T23:20:38.228907+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/09/13/dolphin-progress-report-july-and-august-2022/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/progressreportheader-july2022-2.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/progressreportheader-july2022mini-2.jpg" />
</header>
<p>The Summer tends to consistently be one of the busiest times for Dolphin's development. While sometimes the question is <em>what do we put into the Progress Report</em>, during the summer months it's usually <em>how much can we fit into the Progress Report?</em> This summer's congestion was <em>then</em> compounded by us blog staff having a few things we've been planning coming into fruition. Still, the show must go on, and we're here... albeit a bit delayed.</p>
<p>As such, we've got a huge smattering of changes to go over and many smaller ones that we couldn't quite fit in. macOS users in general will be able to rejoice with the addition of a brand new Metal backend brought to us by veteran developer <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong>. They also brought their graphics expertise to improve things for everyone, greatly reducing the remaining causes of shader based delays/stuttering when using Ubershaders. If you're looking for an easier way to setup a wide variety of controllers, a new SDL2 controller backend has been added for all OSes, and even brings <em>native</em> motion control support without the use of a DSU server to non-Linux operating systems. We also have a wide variety of emulation fixes, more graphics mods added, and the long awaited SD card "folder" feature!</p>
<p>All of that and it's our job to write about it. We've got our work cut out for us.</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-16965-macos-add-metal-backend-by-tellowkrinkle-and-50-17206-moltenvk-update-to-v1111-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16965/">5.0-16965 - macOS: Add Metal Backend</a></strong> by <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17206/">5.0-17206 - MoltenVK: Update to v1.1.11</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-16965-macos-add-metal-backend-by-tellowkrinkle-and-50-17206-moltenvk-update-to-v1111-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>Early on in Metal's life, <strong><a href="https://github.com/Stenzek">Stenzek</a></strong> experimented with adding a Metal Graphics Backend to Dolphin. Unfortunately, due to Dolphin's <a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">quirks</a> and unfamiliarity with the Metal API, the effort stalled out. However, in the midst of that struggle an alternative arrived - <a href="https://github.com/KhronosGroup/MoltenVK">MoltenVK</a>. As a translation layer between Vulkan and Metal, MoltenVK allowed us to support Metal through our Vulkan graphics backend, with little effort on our end. This proved to be a very successful compromise, and it may very well have saved our macOS support.</p>
<p>But, in theory, a <em>native</em> Metal backend would be faster than MoltenVK. Enter <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> the architect of <a href="https://pcsx2.net/">PCSX2</a>'s macOS port and Metal Graphics Backend. Having conquered Metal on PCSX2, they turned their attention to Dolphin and decided to try their hand at a native Metal backend. The results were <em>immediately</em> apparent.</p>
<p><br/>
<script>
addChart({"title":{"text":"Native Metal vs MoltenVK (With Performance Regression)"},"subtitle":{"text":"5.0-17134 | 3x Native, Dual Core | M1 Max (32 GPU Core)"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"MoltenVK","turboThreshold":0},{"name":"Metal","turboThreshold":0}],"data":{"csv":"\"null\";\"MoltenVK\";\"Metal\"\n\"Melee: FoD All Lv9 Ice Climbers<em>\";128;157\n\"Brawl: New Pork All Lv9 Ice Climbers</em>\";129;137\n\"Metroid Prime 3: Elysia Vista (Single Core, 1x Native)\";37;64\n\"Skyward Sword: Skyloft Vista\";80;116\n\"Rogue Leader: Hoth Start\";52;70","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":"V-Blanks per Second (VPS)"},"tickInterval":30,"max":180,
plotLines: [{
color: '#00c800',
width: 4,
dashStyle: "LongDash",
label: {text: "Fullspeed", align: "right", style: {'text-shadow': 'rgb(255, 255, 255) 3px 0px 0px, rgb(255, 255, 255) 2.83487px 0.981584px 0px, rgb(255, 255, 255) 2.35766px 1.85511px 0px, rgb(255, 255, 255) 1.62091px 2.52441px 0px, rgb(255, 255, 255) 0.705713px 2.91581px 0px, rgb(255, 255, 255) -0.287171px 2.98622px 0px, rgb(255, 255, 255) -1.24844px 2.72789px 0px, rgb(255, 255, 255) -2.07227px 2.16926px 0px, rgb(255, 255, 255) -2.66798px 1.37182px 0px, rgb(255, 255, 255) -2.96998px 0.42336px 0px, rgb(255, 255, 255) -2.94502px -0.571704px 0px, rgb(255, 255, 255) -2.59586px -1.50383px 0px, rgb(255, 255, 255) -1.96093px -2.27041px 0px, rgb(255, 255, 255) -1.11013px -2.78704px 0px, rgb(255, 255, 255) -0.137119px -2.99686px 0px, rgb(255, 255, 255) 0.850987px -2.87677px 0px, rgb(255, 255, 255) 1.74541px -2.43999px 0px, rgb(255, 255, 255) 2.44769px -1.73459px 0px, rgb(255, 255, 255) 2.88051px -0.838247px 0px'}},
value: 60,
zIndex: 5,
}],
}, "pane":{"background":[]},"responsive":{"rules":[]},"colors":["#ff3100","#006eff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]})
</script></p>
<p><marquee behavior="alternate">The above graph is not current, please keep reading.</marquee></p>
<p><br/></p>
<p>Our macOS users were extremely excited by these improvements! In GPU heavy titles, such as the GPU focused Skyloft and Elyia tests, the difference was enormous! However, something felt off. Our native Metal backend was performing <em>too much better.</em> Based on our prior experience and general industry knowledge, MoltenVK is an excellent translation layer - a native Metal implementation should only be a little faster. But the new Metal backend was functioning correctly and we weren't going to argue with improved performance, so we cautiously continued forward. When we ran our new Metal graphics backend and MoltenVK through the tests above <em>for this very Progress Report</em>, it finally hit us. The MoltenVK results we were getting, as recorded in the graph above, were far lower than the previous times <a href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/#macsimum">we've shown</a> <a href="https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/#50-15538-mmu-support-for-aarch64-jit-by-josjuice">these tests</a>. It varied substantially depending on the test (hence the difficulty isolating this), but in some scenarios MoltenVK was performing up to <strong>45% worse</strong> than before! Something had gone wrong.</p>
<p><br/>
<script>
addChart({"title":{"text":"MoltenVK Performance Regression"},"subtitle":{"text":"Metroid Prime 3 Elysia Vista, M1 Max (32 GPU Core), Single core, 1x Native"},"exporting":{},"chart":{"type":"column","inverted":true,"polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"FPS","turboThreshold":0}],"data":{"csv":"\"Backend\";\"FPS\"\n\"MoltenVK Before (5.0-15472)\";60\n\"MoltenVK During (5.0-17134)\";37\n\"Metal (5.0-17134)\";64","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"labels":{"format":"{value} FPS"}},"xAxis":{"labels":{"format":"{value}"}},"colors":["#006eff","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{"enabled":false},"pane":{"background":[]},"responsive":{"rules":[]}})
</script>
<p><center>Comparing our native Metal results to our old MoltenVK results, Metal is still better, but by only a little bit.</center></p>
<br/></p>
<p>Now with some solid reproducible cases, we went to work bisecting to isolate this nasty performance regression. We traced it to <a href="https://dolphin-emu.org/download/dev/master/5.0-15474/">5.0-15474</a> - a MoltenVK version update. This was a regression in MoltenVK itself.</p>
<p>Normally the story would end here. We are a tiny volunteer team, we cannot be expected to debug another project! However <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> went above and beyond and, using their Metal knowledge, worked with our testers to isolate the regression in MoltenVK. The end of their bisecting was <a href="https://github.com/KhronosGroup/MoltenVK/commit/4371ef4d2b706d761acac49c1b7f9d413d0d15db">KhronosGroup/MoltenVK@4371ef4</a>, a change that contained a number of optimizations for Vulkan Descriptor Pools.</p>
<p>In Vulkan, descriptor sets are used to tell the graphics driver what resources (textures, buffers, etc) to make available for shaders to use. However, a program cannot create descriptor sets. Instead, the program needs to create a descriptor pool with a specified maximum number of sets, and then the pool itself allocates the descriptor sets.</p>
<p>Most programs implement this with a "growth strategy" where they ask for a small pool of a few thousand sets, then enlarge the pool as required. Dolphin however takes the simple route, and just asks for a pool of <em>100,000 descriptor sets.</em> Though inefficient, by asking for a pool far larger than anything it can ever possibly fill, Dolphin never has to worry about managing the pool.</p>
<div class="media-block wider">
<figure>
<a href="https://github.com/dolphin-emu/dolphin/blob/ffdc8538a162b1ca56e3943c5a78c02358053b2a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp#L96">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/abetterway.png"></a>
<figcaption>Our Vulkan descriptor allocation code has been untouched since <a href="https://github.com/dolphin-emu/dolphin/blob/ffdc8538a162b1ca56e3943c5a78c02358053b2a/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp#L96">Stenzek's very first implementation six years ago</a>. If anyone has the know-how and wants to make this better, by all means, have at it.</figcaption>
</figure>
</div>
<p>Once Dolphin allocates the tiny fraction of the pool's descriptor sets that it needs, it uses <code>vkResetDescriptorPool</code> (<a href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetDescriptorPool.html">link</a>) to give the used sets back to the pool for the next draw. Importantly, Vulkan resets <em>only the used sets,</em> leaving the rest of the 100,000 sets untouched - Dolphin's approach only makes sense because of this detail.</p>
<p>And that is exactly where MoltenVK's regression occurred. In the optimizations for Vulkan Descriptor Pools, MoltenVK accidentally made <code>vkResetDescriptorPool</code> reset ALL descriptor sets in a pool, regardless of what was actually used. Most programs wouldn't have any problem with this as they use as small of pools as possible, but Dolphin's 100k pool smashed into this issue. <code>vkResetDescriptorSets</code> was now taking up a significant amount of CPU time, causing many types of GPU heavy titles to become CPU limited within MoltenVK!</p>
<p>Once we had all of this figured out, <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> forwarded our results to MoltenVK. There, the author of the original optimization that caused this regression, <strong><a href="https://github.com/billhollings">billhollings</a></strong>, swooped in. They improved the implementation so it only reset descriptor sets that were actually used, and made a PR within a couple days of our report. Once that was merged into MoltenVK, we quickly tested it to confirm it fixed our issue and <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> made a pull request to update Dolphin to the latest version of MoltenVK. The regression was resolved!</p>
<p>We'll save the full graph for later and focus exclusively on the regression fix for the moment. How much faster is latest master (as of this writing) compared to the version we showed earlier?</p>
<p><br/>
<script>
addChart({"title":{"text":"Percent Improvement 5.0-17134 to 5.0-17268"},"subtitle":{"text":"M1 Max (32 GPU Cores), using previous test data"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"MoltenVK","turboThreshold":0},{"name":"Metal","turboThreshold":0}],"data":{"csv":"\"null\";\"MoltenVK\";\"Metal\"\n\"Melee: FoD All Lv9 Ice Climbers\";15.6;5\n\"Brawl: New Pork All Lv9 Ice Climbers\";6;-2\n\"Metroid Prime 3: Elysia Vista (Single Core, 1x Native)\";62;1.6\n\"Skyward Sword: Skyloft Vista\";17.5;0\n\"Rogue Leader: Hoth Start\";13.5;10","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"labels":{"format":"{value}%"},"tickInterval":10},"xAxis":{},"pane":{"background":[]},"responsive":{"rules":[]},"colors":["#ff3100","#006eff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{}})
</script>
<br/></p>
<p>While we are focusing on MoltenVK right now, Metal <em>also</em> got a little faster on Apple silicon thanks to an unrelated AArch64 JIT optimization that was merged between our sample versions. Our data is a little messy because developers just keep making Dolphin better, how dare they. </p>
<p>In MoltenVK, the performance regression fix (plus that JITARM optimization) lead to noticeable performance gains across the board. But for the the GPU heavy titles that were strongly affected by the regression, such as <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_3:_Corruption_(Wii)">Metroid Prime 3</a>, the performance improvement is <strong>enormous!</strong> It took Prime 3 from completely unplayable to playable with occasional slowdown. All of the performance that MoltenVK had in older builds was back!</p>
<p>This regression fix also improves MoltenVK's performance in Bounding Box, especially on Intel graphics. However this section is already <strong>ginormous</strong> so rather than posting yet another graph, just <a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/mvkboundingbox.png">click here if you want to see the chart.</a></p>
<p>Now with that nasty regression sorted, we can finally return to Metal. How does our shiny new Metal backend compare to MoltenVK now that it's a fair fight?</p>
<p><br/>
<script>
addChart({"title":{"text":"Native Metal vs MoltenVK"},"subtitle":{"text":"5.0-17268 | 3x Native, Dual Core | M1 Max (32 GPU Core)"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"MoltenVK","turboThreshold":0},{"name":"Metal","turboThreshold":0}],"data":{"csv":"\"null\";\"MoltenVK\";\"Metal\"\n\"Melee: FoD All Lv9 Ice Climbers<em>\";148;165\n\"Brawl: New Pork All Lv9 Ice Climbers</em>\";137;134\n\"Metroid Prime 3: Elysia Vista (Single Core, 1x Native)\";60;65\n\"Skyward Sword: Skyloft Vista\";94;116\n\"Rogue Leader: Hoth Start\";59;77","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":"V-Blanks per Second (VPS)"},"tickInterval":30,"max":180,
plotLines: [{
color: '#00c800',
width: 4,
dashStyle: "LongDash",
label: {text: "Fullspeed", align: "right", style: {'text-shadow': 'rgb(255, 255, 255) 3px 0px 0px, rgb(255, 255, 255) 2.83487px 0.981584px 0px, rgb(255, 255, 255) 2.35766px 1.85511px 0px, rgb(255, 255, 255) 1.62091px 2.52441px 0px, rgb(255, 255, 255) 0.705713px 2.91581px 0px, rgb(255, 255, 255) -0.287171px 2.98622px 0px, rgb(255, 255, 255) -1.24844px 2.72789px 0px, rgb(255, 255, 255) -2.07227px 2.16926px 0px, rgb(255, 255, 255) -2.66798px 1.37182px 0px, rgb(255, 255, 255) -2.96998px 0.42336px 0px, rgb(255, 255, 255) -2.94502px -0.571704px 0px, rgb(255, 255, 255) -2.59586px -1.50383px 0px, rgb(255, 255, 255) -1.96093px -2.27041px 0px, rgb(255, 255, 255) -1.11013px -2.78704px 0px, rgb(255, 255, 255) -0.137119px -2.99686px 0px, rgb(255, 255, 255) 0.850987px -2.87677px 0px, rgb(255, 255, 255) 1.74541px -2.43999px 0px, rgb(255, 255, 255) 2.44769px -1.73459px 0px, rgb(255, 255, 255) 2.88051px -0.838247px 0px'}},
value: 60,
zIndex: 5,
}],
}, "pane":{"background":[]},"responsive":{"rules":[]},"colors":["#ff3100","#006eff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]})
</script>
<br/></p>
<p>The theory holds true - our own native Metal graphics backend is faster than translating our Vulkan backend to Metal via MoltenVK. Most notable here is <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">Skyward Sword</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_II:_Rogue_Leader">Rogue Leader</a>, where Metal has a considerable performance benefit of +23% and +30%. Metal even takes Hoth to a reliably full speed experience for the first time ever on an Apple laptop! That being said, now that it is no longer held back by a performance regression, MoltenVK puts up a hell of a fight.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/macm1/imsorry.jpg">
<img src="https://dolphin-emu.org/m/user/blog/macm1/imsorry_thumb.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<!-- the above is a spacer -->
<p>After reading all of this you might be thinking, "now that someone has made a native Metal backend, you're going to remove MoltenVK right?" <em>Absolutely not</em>, MoltenVK is here to stay. The MoltenVK performance regression was a huge reminder for us on why we have many graphics backends in the first place.</p>
<p>During the regression, many users came to us and complained that it was slower than before. Some even correctly bisected the regression in Dolphin! However, due to the complexity of the issue, no one was able to clearly give us a reproducible case. Without anything to compare it against, we simply looked at MoltenVK's performance in whatever we wanted to try, found it fine, and moved on. However, once we had the Metal backend and compared it to MoltenVK, we immediately noticed the performance disparity was beyond our expectations and began searching for the problem. The <em>Metal backend</em> is why we noticed the performance regression in MoltenVK! Relying on only one graphics backend for macOS (OpenGL doesn't count anymore) let this regression slip under our noses.</p>
<p>Having other graphics backends to compare against is essential for the maintenance of our graphics backends, and this is especially important on macOS where we have so few. The new Metal graphics backend is our own code, so any issues or regressions with it are on <em>us</em> to solve. We will be relying on MoltenVK to be the benchmark that we compare our native Metal backend against going forward. And it should perform that role excellently, as it is bringing our well tested Vulkan backend to macOS through a very well supported translation layer from a team that has earned our trust.</p>
<p>So while our new native Metal backend is faster, MoltenVK is here to stay. Together, they will help us deliver the most consistently reliable and performant experience that we can give to our macOS users.</p>
<hr />
<p><em>Note: Due to changed (much improved) methodology, the Fountain of Dreams and New Pork tests are not directly comparable to prior results. All other tests maintain the same methodology.</em></p>
<hr />
<h4 id="50-16930-reduce-pipeline-compilation-stutter-through-forcing-fbfetch-in-ubershaders-by-tellowkrinkle"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16930/">5.0-16930 - Reduce Pipeline Compilation Stutter through Forcing FBFetch in Ubershaders</a></strong> by <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong><a class="headerlink" href="#50-16930-reduce-pipeline-compilation-stutter-through-forcing-fbfetch-in-ubershaders-by-tellowkrinkle" title="Permanent link">¶</a></h4>
<p><a href="https://dolphin-emu.org/blog/2017/07/30/ubershaders/">Ubershaders</a> was a revolutionary moment in GameCube/Wii emulation. It presented a hope, a solution against the problem that TEV changes were <em>instant</em> while generating/compiling new shaders on modern GPUs was not. Under certain circumstances, Ubershaders can <em>completely</em> remove all Shader Compilation Stuttering... but for some users, their limitations meant that they couldn't get a smooth experience.</p>
<p>On top of being demanding, newer graphics APIs have thrown a curveball at Ubershaders. Namely, they have pipelines to optimize rendering, and these pipelines will analyze what is being rendered and only use what is necessary to simplify shaders and increase performance. Because different GPUs and drivers have hardware and software support for different things, the pipeline compilation stuttering can vary depending on the driver. D3D11, through a mixture of not having pipelines + good driver support, was the only backend that <em>completely</em> had Shader Stuttering removed on certain graphics cards... until now.</p>
<p><strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> showed up with the Metal backend and a deep dive in to how Dolphin was generating shaders. They identified some of the weaknesses in what Dolphin was doing and identified them during the development of the the Metal Backend and started coming up with solutions.</p>
<p>One such problem is that Dolphin actually had <em>too many</em> configurations to precompile every pipeline configuration. But, there was a way to mend that. By sacrificing performance and simplifying the Ubershaders to only use a single method for blending, we could actually precompile <em>every</em> pipeline configuration with some other changes down the road. To achieve this, <em>FrameBuffer Fetch</em> is now used for almost all blend unit configurations in the Ubershaders for GPUs that support this feature. Considering that Apple GPUs and some mobile GPUs support FBFetch, many of our users should be able to see a major difference.</p>
<p>This reduces the extra shader compilation stuttering that was happening on Apple and some mobile chipsets and further sets us up to reduce stuttering across all GPUs. <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> has more changes on the way that should completely eliminate* Shader Compilation Stuttering on many GPUs that currently have issues in Vulkan and D3D12 when using Exclusive or Hybrid Ubershaders. Stay tuned.</p>
<h4 id="50-16861-controllerinterface-add-support-for-native-motionrumble-with-sdl2-and-re-enable-sdl-on-windows-builds-by-shuffle2"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16861/">5.0-16861 - ControllerInterface - Add Support for Native Motion/Rumble with SDL2 and Re-Enable SDL on Windows Builds</a></strong> by <strong><a href="https://github.com/shuffle2">shuffle2</a></strong><a class="headerlink" href="#50-16861-controllerinterface-add-support-for-native-motionrumble-with-sdl2-and-re-enable-sdl-on-windows-builds-by-shuffle2" title="Permanent link">¶</a></h4>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:20%; min-width:200px; float:right; text-align:center;">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2015-july/Sdl-logo.png">
</div>
<p>Back in July 2015, Dolphin waved goodbye to its SDL input backend. Back then, there wasn't much point for Dolphin to even be using it. It didn't really serve our needs on <a href="https://dolphin-emu.org/blog/2015/08/01/dolphin-progress-report-july-2015/#40-6951-linux-add-an-evdev-based-controller-backend-to-replace-sdl-by-phire">Windows or macOS</a>, and on Linux it was essentially just an evdev wrapper that we could (and <a href="https://dolphin-emu.org/blog/2015/08/01/dolphin-progress-report-july-2015/?nocr=true#40-6951-linux-add-an-evdev-based-controller-backend-to-replace-sdl-by-phire">eventually did</a>) implement ourselves.</p>
<p><br/><blockquote style="font-size:1.1em">Unfortunately for Dolphin, the vastness of SDL has caused a number of problems over the years, and has slowly been removed bit by bit. For example, in <a href="https://dolphin-emu.org/download/dev/dd413269e30c35a2744c9321323b7fb9d48ce942/">4.0-1628</a> the SDL backend was removed from Dolphin on Windows due to numerous crash reports related to webcams. SDL was reading the <a href="https://forums.dolphin-emu.org/Thread-my-entire-computer-crashes-every-time-i-use-dolphin">webcam as a controller</a> with thousands of buttons, crashing the emulator. <footer><a href="https://dolphin-emu.org/blog/2015/08/01/dolphin-progress-report-july-2015/#40-6951-linux-add-an-evdev-based-controller-backend-to-replace-sdl-by-phire">Dolphin Progress Report: July 2015</a></footer></blockquote><br/></p>
<p>However, over the last seven years, a lot of resources have been pumped into SDL and it's greatly improved from when we waved goodbye. In 2018 it added a feature that was <em>very</em> interesting for us - Motion Inputs. Dolphin didn't yet have the emulated MotionPlus infrastructure, but we've kept our eye on SDL knowing that it might provide an easy way to get Gyro and Accelerometer while also being a stable cross-platform API that we could rely on much like Cubeb has become for audio.</p>
<p>In 2022, we've finally taken the plunge and re-added support for SDL, relying on the new and improved versions of the controller API.</p>
<p>On Linux and macOS, the situation is similar. This is especially important for macOS, where Motion Controls are a lot more annoying to setup. In fact, Wii Remotes <em>can't</em> easily be connected to any macOS version from Monterey onward due to an unknown bug with Apple's Bluetooth stack that seems to be rather low priority to fix. Some users have found success using external Bluetooth adapters or using a DolphinBar.</p>
<h4 id="50-16891-sd-card-folder-syncing-support-by-admiralcurtiss-and-stblr"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16891/">5.0-16891 - SD Card Folder Syncing Support</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> and <strong><a href="https://github.com/stblr">stblr</a></strong><a class="headerlink" href="#50-16891-sd-card-folder-syncing-support-by-admiralcurtiss-and-stblr" title="Permanent link">¶</a></h4>
<p>This is one of the longest awaited features that has been requested many times over the years. You can now set a <em>SD Card Sync Folder</em> that allows you to place files in that folder and let Dolphin automatically create an appropriately sized SD Card. This setup was inspired by how <a href="https://melonds.kuribo64.net/">melonDS</a> handles SD cards and was originally submitted by <strong><a href="https://github.com/stblr">stblr</a></strong> in <a href="https://github.com/dolphin-emu/dolphin/pull/10525">March</a>.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/sdcardfolder.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/sdcardfolder_thumb.png"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Previously, handling SD cards in Dolphin was rather annoying, especially on Windows and Android. On Linux/macOS, it was a <em>bit</em> easier. There, you could mount the sd.raw file that Dolphin uses to simulate the SD card and edit files on it just like you would a real SD card. On Windows, this could only be accomplished by installing a third party program and is generally a bit buggy when trying to unmount virtual drives. On Android, you couldn't edit the sd.raw at all without access to another Operating System!</p>
<p>The new system isn't perfect, but it does simplify things quite a bit. Dolphin still uses the sd.raw file <em>during</em> emulation, but now you can choose a folder that Dolphin can use to <em>build</em> the sd.raw file. No more mounting, no more third party programs, just simply configure your sd card folder how you want it and let Dolphin do the work. Dolphin can also export the current sd.raw into this folder, if you've already been using other methods.</p>
<p>As a potentially added bonus, there is an option to automatically sync this folder at emulation start and end. This will keep your folder up to date if you're using it a lot, but we don't recommend using it on larger SD cards, as this process can take a long time on slower disks and cause a large delay in starting Wii emulation.</p>
<p>Due to the SD card code being rewritten, a few of the defaults have changed as well. Logically, it made no sense that the old SD card <em>default</em> path was inside of the Wii NAND and this gave us a good excuse to finally fix it. While this update won't <em>override</em> existing paths, all new users will have SD card paths moved into the "Load" folder along with other things like texture packs. In new builds, the default sd.raw name has also been changed to WiiSD.raw.</p>
<p>For those of you on Android, there is some good news and bad news. The good news is that this feature has been ported over by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> in <a href="https://dolphin-emu.org/download/dev/master/5.0-16970/">5.0-16970</a>. It works the same as in desktop builds with one exception, which is the bad news. Due to <a href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/#50-15438-android-comply-with-scoped-storage-requirements-by-josjuice">Scoped Storage</a>, we cannot let you customize the SD folder location and accessing Dolphin's app data locations may be annoying. On most Android devices, the easiest way to do this would be by connecting it to a desktop and manually accessing the displayed directories for your device.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/androidsdfolder.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/androidsdfolder_thumb.png"></a>
<figcaption>While not ideal, SD Card editing for Android users is now simpler than it was before.</figcaption>
</figure>
</div>
<h4 id="50-16901-flush-command-buffers-after-multiple-efb-copies-by-tellowkrinkle"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16901/">5.0-16901 - Flush command buffers after multiple EFB copies</a></strong> by <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong><a class="headerlink" href="#50-16901-flush-command-buffers-after-multiple-efb-copies-by-tellowkrinkle" title="Permanent link">¶</a></h4>
<p>While working on graphics, <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> spotted a flaw with how <a href="https://dolphin-emu.org/blog/2018/12/04/dolphin-progress-report-november-2018/">Deferred EFB Copies</a> were working in Dolphin. </p>
<p>As a reminder on what this is, the GameCube and Wii use a unified memory model, where the CPU and GPU can edit eachother's memory at any point with no performance cost. However, Dolphin runs on split memory model systems where the CPU and GPU cannot access eachother's memory easily. To emulate the unified memory model, Dolphin duplicates the GC/Wii Main Memory on both the host's system memory and the host's GPU vram, and we sync any changes across both memory pools. This syncing is very costly, and it is why games that require Store EFB Copies to Texture and RAM are so demanding. Deferred EFB Copies is as an optimization to this process. Rather than syncing every single time the game changes something in memory, Deferred EFB Copies delays EFB Copies to the host system memory so it can batch many EFB Copies to RAM together for a sizable performance boost.</p>
<p>Unfortunately, an oversight in the implementation limited the performance boost this option could give.</p>
<p>When using Deferred EFB Copies, there was a system set up to not flush command buffers if multiple EFB copies were issued in succession, but it only ever checked whether it needed to flush when an EFB copy was issued. <strong><a href="https://github.com/TellowKrinkle">TellowKrinkle</a></strong> noticed that if a game is using a lot of EFB Copies in quick succession, Dolphin doesn't check to see if they need to be flushed <em>during</em> this burst of EFB copies. <em>Not flushing</em> for each EFB copy and then flushing at the end would normally be faster, but Dolphin was waiting far too long after the burst of EFB copies to actually start checking if things needed to be flushed, causing a sizeable drop in performance when the flush and GPU <-> CPU synchronization finally happened.</p>
<p>This is a rather <em>particular</em> scenario that shouldn't be that common, but one of the games that <em>do</em> hit this issue is rather demanding, making this a big optimization: <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_3:_Corruption_(Wii)">Metroid Prime 3</a>.</p>
<p><br/>
<script>
addChart({"title":{"text":"Deferred EFB Copies - EFB Flush"},"subtitle":{"text":"Metroid Prime 3 Elysia Vista | Single Core, 4x Native | Intel i9-9980HK, AMD Radeon Pro 5600M"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"series":[{"name":"Before","turboThreshold":0},{"name":"After","turboThreshold":0}],"data":{"csv":"\"null\";\"Before\";\"After\"\n\"macOS MoltenVK\";44;48\n\"macOS Metal\";53;59\n\"macOS OpenGL\";45;49\n\"Windows D3D11\";56;60\n\"Windows D3D12\";55;63\n\"Windows Vulkan\";55;60\n\"Windows OpenGL\";47;49","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"tickInterval":15,"labels":{}},"pane":{"background":[]},"responsive":{"rules":[]},"colors":["#ff3100","#006eff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"xAxis":{"title":{},"labels":{}}})
</script>
<br/></p>
<h4 id="50-16926-accurately-handle-the-copy-filter-and-gamma-for-efb-and-xfb-copies-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16926/">5.0-16926 - Accurately Handle the Copy Filter and Gamma for EFB and XFB copies</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-16926-accurately-handle-the-copy-filter-and-gamma-for-efb-and-xfb-copies-by-pokechu22" title="Permanent link">¶</a></h4>
<p>In a finale to the crazy <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> <a href="https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/#50-15484-also-use-copy-filter-for-efb-copies-by-pokechu22">pink tinting issues</a>, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> has made the necessary changes to fix the remaining imperfections with color handling. While it's not as dramatic as the original issue, some of the colors of various objects were still wrong in Dolphin due to differences in rounding and some weird overflow behaviors that were left unemulated.</p>
<p>With this added, <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> now renders perfectly in Dolphin this plus Manual Texture Sampling. Quite a difference from just a year ago.</p>
<h4 id="50-16838-add-hle-broadband-device-by-schthack-and-many-additional-fixes-by-sepalani"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16838/">5.0-16838 - Add HLE Broadband Device</a></strong> by <strong><a href="https://github.com/schthack">schthack</a></strong> and <em>many</em> additional fixes by <strong><a href="https://github.com/sepalani">sepalani</a></strong><a class="headerlink" href="#50-16838-add-hle-broadband-device-by-schthack-and-many-additional-fixes-by-sepalani" title="Permanent link">¶</a></h4>
<p>The GameCube Broadband Adapter (BBA) is another of those "What Ifs" of potential that hit the GameCube. Much like <a href="https://dolphin-emu.org/blog/2021/07/21/integrated-gba/">GBA connectivity</a> there was a lot of potential for great things with the GameCube BBA, but very few games truly took advantage of it. In fact, there are only <strong>six</strong> total games that can use the Broadband Adapter <em>for gameplay</em>.</p>
<ul>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II">Phantasy Star Online I and II (and I and II+)</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_III:_C.A.R.D._Revolution">Phantasy Star Online III: Card Revolution</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart: Double Dash!!</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=1080%C2%B0_Avalanche">1080° Snowboarding Avalanche</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Homeland">Homeland</a></strong> (JP Exclusive)</li>
</ul>
<p>Not all of these were created equal, however. Only the two <a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II">Phantasy Star Online games</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Homeland">Homeland</a> supported true online play. All the others only supported local play via LAN (local area network). Much like <a href="https://dolphin-emu.org/blog/2021/07/21/integrated-gba/">GBA connectivity</a>, the feature saw limited use simply because of the expenses and setup required. For an eight kart game of <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart: Double Dash!!</a> with everyone getting their own T.V. you'd need:</p>
<ul>
<li>Eight GameCubes</li>
<li>Eight T.V.s</li>
<li>Eight Controllers (16 if you want two players per kart!)</li>
<li>Eight Copies of Mario Kart: Double Dash!!</li>
<li>Eight BBAs</li>
<li>Networking cables and ethernet switches capable of handling this mess</li>
</ul>
<p>Unlike Mario Kart DS, where people could just pull out their own DS out of their pocket and be in the game in minutes, setting up for GameCube LAN games was a huge endeavor. For games like <a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a> it was hard to justify the cost and setup when the split-screen option afforded identical features with the only downside being less screen real-estate and your opponents being able to see your screen.</p>
<p>Emulation didn't really make things easier or better. If you were willing to go through the daunting setup of creating a TAP adapter on your computer, it was possible to link emulators together. But due to Windows doing <em>Windows things</em>, this was mostly limited to running all of the instances on the same computer. This mostly defeats the point of BBA entirely! On Linux it was a lot easier, but it was still a lot more trouble than it was worth to get working.</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/BBA1.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/BBA1_thumb.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>This is where <strong><a href="https://github.com/schthack">schthack</a></strong> comes in. For those that have been in the GameCube community for a long time, that name may seem familiar because of <a href="https://schtserv.com/">schtserv</a>, <strong><a href="https://github.com/schthack">schthack</a></strong>'s <a href="https://wiki.dolphin-emu.org/index.php?title=Phantasy_Star_Online_Episode_I_%26_II">Phantasy Star Online I and II</a> replacement server that's been keeping the game's online service alive for many, many years.</p>
<p>While Dolphin technically could connect to <a href="https://schtserv.com/">schtserv</a>, it was a less than ideal setup due to how difficult it was to setup on Windows and how fragile it was. While the <a href="https://dolphin-emu.org/blog/2020/07/05/dolphin-progress-report-may-and-june-2020/#50-12233-broadband-adapter-support-for-xlink-kai-by-crunchbite">XLink Kai BBA</a> option avoided the need for a TAP adapter entirely, it required its own service through <a href="https://www.teamxlink.co.uk/">XLink Kai</a> and is primarily used for tunneling LAN games through the internet, like Project Warp Pipe once did during the early days of the GameCube.</p>
<p>Dolphin's BBA emulation was mostly low level (LLE) and functioned very similar to how it worked on console. However, because of how exactly it behaved, it did not work on Windows without a TAP adapter, and didn't work on Android at all. On Unix based operating systems, you'd still have to go through setup with OpenVPN and virtual interfaces, making it quite a process regardless of your choice. In order to make things easier, Dolphin would have to translate what the BBA was doing to something that would immediately work on the host device's network. What we needed was an high level (HLE) solution, and <strong><a href="https://github.com/schthack">schthack</a></strong> wanted to make it happen.</p>
<p>Getting it working was one thing, but actually cleaning up Dolphin's ancient BBA code was another. In fact, Dolphin's LLE BBA implementation originated from documentation from <a href="http://whinecube.emulation64.com/">Whinecube</a>, a rival GameCube emulator that ceased development back in 2006. The documentation (and implementation based off of it) were rock solid enough that it's remained almost untouched since it was implemented. Unfortunately for <strong><a href="https://github.com/schthack">schthack</a></strong>, that also meant that some of the code needed to be modernized for modern Dolphin. Thankfully, <strong><a href="https://github.com/sepalani">sepalani</a></strong>, another network engineer, was available to help harden the networking code. The initial results were astounding.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/bbasetup.jpeg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/bbasetup_thumb.jpg"></a>
<figcaption>A GameCube, a Wii via Nintendont, and Dolphin all connected through BBA!</figcaption>
</figure>
</div>
<p>That isn't to say things were perfect - getting all of the Dolphin instances to detect each other can be a bit annoying, especially on Windows. Cause Windows things. Thankfully, <strong><a href="https://github.com/sepalani">sepalani</a></strong> has continued to improve the HLE Broadband Adapter with a myriad of fixes. While sometimes there are occasionally still detection issues, especially when dealing with real hardware, usually any combination of Dolphin, GameCubes, and Wiis (running BBA emulation through Nintendont) can be connected together with enough dedication.</p>
<p>As a note, there are some limitations with one of the games that has nothing to do with the networking code. <a href="https://wiki.dolphin-emu.org/index.php?title=1080%C2%B0_Avalanche">1080° Avalanche</a> is not compatible when playing against physical hardware. There is some kind of miscalculation in the physics that causes Dolphin instances to desync, ruining the session. While this bug has not been fixed as of this beta, there was originally a <em>second</em> bug involving AArch64 devices, causing them to desync with x86-64 devices! <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> quickly quelled that bug, meaning that theoretically even Android users could join in on the BBA fun... if they had BBA...</p>
<h4 id="50-16950-and-50-16967-android-add-xlinkkai-broadband-adapter-and-hle-broadband-adapter-options-to-gui-by-codedwrench-and-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16950/">5.0-16950</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16967/">5.0-16967</a></strong> - <strong>Android: Add XLinkKai Broadband Adapter and HLE Broadband Adapter Options to GUI</strong> by <strong><a href="https://github.com/codedwrench">codedwrench</a></strong> and <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-16950-and-50-16967-android-add-xlinkkai-broadband-adapter-and-hle-broadband-adapter-options-to-gui-by-codedwrench-and-josjuice" title="Permanent link">¶</a></h4>
<p>If you didn't catch it, Dolphin on Android now has access to Gamecube Broadband Adapters! Thanks to work by <strong><a href="https://github.com/codedwrench">codedwrench</a></strong> to add the XLink Kai BBA option to port everything over to the Android GUI, users now can easily access the settings. <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> took that framework and ported that over to support the HLE Broadband device.</p>
<p>This means that GameCube LAN play is now in the palm of your hands. A group of friends (with exceedingly powerful phones/tablets) can now just make sure they're on the same network, select a BBA option, and instantly be able to play any of the LAN supported games against eachother. </p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/void.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/void.png"></a>
<figcaption>This is where the photo of our friends meeting together for an Android BBA session would be, if, well, you know.</figcaption>
</figure>
</div>
<p>Sure, it's limited to just <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC,">Mario Kart: Double Dash!!</a> <a href="https://wiki.dolphin-emu.org/index.php?title=1080%C2%B0_Avalanche">1080 Snowboarding: Avalanche</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a>, but that's fun in and of itself. If you can't gather everyone together but live nearby, setting up XLink Kai might be able to get you playing anyway. Note that these games have a fairly low latency tolerance, so we do recommend being on the same network if possible.</p>
<p>If you're looking to get your fix on for Phantasy Star Online I and II, the Android HLE BBA works the same way as the desktop HLE BBA.</p>
<h4 id="50-16991-dsp-hle-implement-support-for-libaesnd-microcode-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16991/">5.0-16991 - DSP-HLE - Implement Support for Libaesnd Microcode</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-16991-dsp-hle-implement-support-for-libaesnd-microcode-by-pokechu22" title="Permanent link">¶</a></h4>
<p>If you use a lot of homebrew in Dolphin, you're probably someone who commonly swaps over to LLE audio. This is because a lot of Homebrew use special homebrew DSP microcodes called libasnd and libaesnd. Dolphin's DSP-HLE had no way to handle these microcodes!</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/libasndpopup.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/libasndpopup.png"></a>
<figcaption>This popup means you aren't getting audio unless you swap to DSP-LLE.</figcaption>
</figure>
</div>
<p>Feeling a bit of deja vu? Same here. This is the <a href="https://dolphin-emu.org/blog/2022/07/07/dolphin-progress-report-may-and-june-2022/#50-16730-add-hle-version-of-libasnd-by-pokechu22">same change as last Report</a> except this time it's tackling <strong>libaesnd</strong> instead of <strong>libasnd</strong> along with a few more edge cases that cropped up over the years.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/eduke32.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-august/eduke32_thumb.jpg"></a>
<figcaption>This is the Duke Nukem game you've been waiting forever on, right?</figcaption>
</figure>
</div>
<p>With this, most major homebrew should be supported in DSP-HLE. There may be exceptions, and some homebrew may opt to create their own microcodes. In those edge-cases, DSP-LLE will always be there to cover the holes.</p>
<h4 id="50-17132-implement-support-for-nfs-files-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-17132/">5.0-17132 - Implement Support for NFS files</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-17132-implement-support-for-nfs-files-by-josjuice" title="Permanent link">¶</a></h4>
<p>For preservationists and those users who have bought Wii titles from the Wii U eshop, this is a rather important update. <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> has added direct support for the NFS file format that Wii games are distributed in on the Wii U eshop. Given that the Wii U eshop is going to end the ability to purchase new titles, your days are numbered on how long you can purchase these digital copies. For a full list of games available via the Wii U eshop, please check out <a href="https://en.m.wikipedia.org/wiki/List_of_Wii_games_on_Wii_U_eShop">this link</a>.</p>
<p>While this list is fairly limited, given the price spikes of physical copies, this may be the cheapest way to get some of your favorite Wii games until the shop goes down.</p>
<p>As for the NFS format? There really isn't much interesting about it. It's a lossy format that removes garbage data. Adding support for it was not very difficult, and was mainly done for users wanting to test/use Wii U eshop dumps more easily.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2022-07-01&to=2022-08-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-16795/">5.0-16795</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-17269/">5.0-17269</a>! </p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: May and June 2022
2022-07-07T11:41:26+00:002022-07-07T12:29:08.884149+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/07/07/dolphin-progress-report-may-and-june-2022/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/progressreportheader-may2022.jpg"/>
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/progressreportheader-may2022mini.jpg" />
</header>
<p>It's been a very hectic two months. Dolphin's development builds <a href="https://dolphin-emu.org/blog/2022/06/09/leaving-a-legend/">officially dropped support for Windows 7, Windows 8, and Windows 8.1</a> in <a href="https://dolphin-emu.org/download/dev/master/5.0-16393/">5.0-16393</a> when the Windows buildbots were updated to use Qt6. If you read the last <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/">Progress Report</a>, you'd know that Windows 7 was already on shaky terms due to rampant breakages, but it was Qt6 that finally ended the legacy operating systems. We wrote an entire article about this, so be sure to read that <a href="https://dolphin-emu.org/blog/2022/06/09/leaving-a-legend/">here</a> if you haven't already.</p>
<p>But with loss, some new has also come. We now have a new builder for Windows on ARM! Dolphin has supported Windows on ARM <a href="https://dolphin-emu.org/blog/2020/02/07/dolphin-progress-report-dec-2019-and-jan-2020/#50-11409-platform-support-for-windows-on-arm64-and-50-11455-dolphinqt-support-compiling-on-arm64-by-stenzek">for a couple of years now</a>, but we haven't provided builds due to a lack of prospective users and a lack of space on the buildbot server. But times have changed - the buildbot has seen some upgrades with a new, bigger harddisk and <strong><a href="https://github.com/shuffle2">shuffle2</a></strong> has renovated parts of the infrastructure to make supporting Windows ARM64 builds easier. With those two hurdles out of the way, we've now configured our buildbot to provide Windows ARM64 builds on our <a href="https://dolphin-emu.org/download/">Downloads</a> page. We're not exactly sure how much use these builds will get, but we're hopeful for the future of the platform. </p>
<p>But by this point, you're probably as sick of hearing about the gives and takes of supporting various operating systems as we are of writing about them, so let's get to some emulation goodness. We've got some highly technical changes, including a new "Graphics Mod" system that allows modders and users to create graphical mods. If you're into the <em>edge</em> of emulation, we've also seen support for the annoying Datel Loader used for Action Replay discs and a few very odd unlicensed devices without needing an original GameCube BIOS or swapping to DSP-LLE. This is somewhat significant for reasons we'll get into later, because using <em>real</em> Action Replay discs does make a difference!</p>
<p>For those who love creative homebrew, we've also added support for the homebrew libasnd microcode to HLE audio, meaning that you no longer need to switch to LLE audio for many homebrew titles. We go into the details of all of this and more on this Dolphin Progress Report!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-16763-add-graphics-mod-infrastructure-by-iwubcode"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16763/">5.0-16763 - Add 'Graphics Mod' Infrastructure</a></strong> by <strong><a href="https://github.com/iwubcode">iwubcode</a></strong><a class="headerlink" href="#50-16763-add-graphics-mod-infrastructure-by-iwubcode" title="Permanent link">¶</a></h4>
<p>Dolphin's current suite to modify the graphics of games is quite limited. All that we have are post processing shaders with no access to depth or any other fancy features. While things like Texture Packs give some freedom, a lot of players have turned to forks and third party programs in order to make larger graphical overhauls. This situation is due to the fact that post-processing has a fundamental limitation - it's done <em>after</em> the frame is rendered. This approach seriously hinders the goal of modifying the game's visuals. For example, if the game crushes its depth during the rendering process, all post-processing sees is a 2D frame. How are we supposed to apply post-processing effects with depth to this? That exact scenario is sadly extremely common on the GameCube and Wii, and why Dolphin's post-processing excludes depth - it was so unreliable that we decided it be better to not have it.</p>
<p>While most users are probably waiting for our Post Processing system to be rewritten, <strong><a href="https://github.com/iwubcode">iwubcode</a></strong> has sneakily been working on a different approach, one that addresses that fundamental limitation in post-processing. The first piece of the puzzle has arrived in the form of a feature called <em>Graphics Mods</em>!</p>
<p>Graphics Mods gives users a way to hook into the game's rendering pipeline and directly modify game assets during the rendering process. It exists as something inbetween post-processing and game modding - it is specific like game modding, but like post-processing it doesn't require the daunting task of learning PowerPC assembly to order to create a game patch. Right now, the feature is in its infancy, but it's already shown a ton of promise in allowing quality of life mods to many games. </p>
<p>These are composed of two parts: an "action" and a "target" group. The action contains what the mod will do with the target, such as a "skip" to prevent the target from rendering, and can be generic. The target is specific, <em>extremely</em> specific, as it defines the precise texture, texture format or EFB Copy format we wish to modify. The target group can have a single target or many targets depending on what the modder wants to do.</p>
<p>This may all sound complicated, but in actual application it is extremely simple. To give an example of what Graphics Mods can do, lets look at <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">Super Mario Galaxy 2</a> on Dolphin without enabling any Graphics Mods.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smgnativeenlarged.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smgnative_thumb.jpg" /></a>
<figcaption>Super Mario Galaxy's bloom effects look fine at native resolution.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xdefaultbloom.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xdefaultbloom_thumb.jpg" /></a>
<figcaption>At higher resolutions, the bloom becomes <span style="white-space: nowrap;">✧・゚: * <em>sparkly</em> * :・゚✧</span></figcaption>
</figure>
</div>
</div>
<p>But with the power of "Native Bloom" and "No Bloom" Graphics Mods, we can transform how the game looks by directly changing how the game renders!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xnativebloom.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xnativebloom_thumb.jpg" /></a>
<figcaption>By scaling the bloom back down, the 'Native Bloom' Graphics Mod restores the game to a more authentic look at higher resolutions.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xnobloom.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/smg4xnobloom_thumb.jpg" /></a>
<figcaption>If you prefer to use third party bloom or just don't want bloom at all, the 'No Bloom' Graphics Mod completely removes the game's built-in bloom effect.</figcaption>
</figure>
</div>
</div>
<p>The Graphics Mods feature installs hooks into Dolphin's graphics pipeline. This can have a slight cost to performance, so Graphics Mods must be enabled to be used.</p>
<p>For the feature's debut, the following titles have Graphics Mods:</p>
<ul>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Arc_Rise_Fantasia">Arc Rise Fantasia</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Battalion_Wars_2">Battalion Wars 2</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Donkey_Kong_Country_Returns">Donkey Kong Country Returns</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Fragile_Dreams:_Farewell_Ruins_of_the_Moon">Fragile Dreams - Farewell Ruins of the Moon</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=House_of_the_Dead:_Overkill">The House of the Dead: Overkill</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Last_Story">The Last Story</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Link%27s_Crossbow_Training">Link's Crossbow Training</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Little_King%27s_Story">Little King's Story</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Monster_Hunter_Tri">Monster Hunter Tri</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Nights:_Journey_of_Dreams">Nights: Journey Into Dreams</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=%C5%8Ckami">Okami</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy_2">Super Mario Galaxy 2</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Strikers_Charged">Mario Strikers: Charged</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Conduit">The Conduit</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Twilight_Princess_(Wii)">The Legend of Zelda: Twilight Princess</a></strong> - Wii version only currently</li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">The Legend of Zelda: Skyward Sword</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Play">Wii Play</a></strong></li>
<li><strong><a href="https://wiki.dolphin-emu.org/index.php?title=Xenoblade_Chronicles">Xenoblade Chronicles</a></strong></li>
</ul>
<p>These mods mostly consist of Bloom definitions, with a few games having definitions for removing GUI elements. However, Graphics Mods aren't limited to just generic operations like that, they have a set of actions that can be defined to create a multitude of effects, and users are encouraged to create their own Graphics Mods through the actions available.</p>
<ul>
<li><strong>Skip</strong>: Allows the modder to skip rendering this target group.</li>
<li><strong>Scale</strong>: Allows the user to scale/stretch a target group.</li>
<li><strong>Move</strong>: Allows a user to move a particular target group.</li>
</ul>
<p>However, we cannot stress enough that the system is still very early in this initial release and there is a chance that some textures and effects may be reused for multiple things. An example of this is Depth of Field and Bloom sometimes using the same efb copy format, meaning that changing one without changing the other may prove difficult in certain games.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/gmodgui.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/gmodgui.png"></a>
<figcaption>Graphics Mods for supported titles will be in the Game Properties page under the "Graphics Mod" tab.</figcaption>
</figure>
</div>
<p>If you're interested in creating your own Graphics Mods, we'll be maintaining <a href="https://wiki.dolphin-emu.org/index.php?title=Graphics_Mods">a Graphics Mod guide on the Dolphin Wiki</a> that should stay up to date as the feature evolves.</p>
<p><strong>Future Plans</strong></p>
<p><strong><a href="https://github.com/iwubcode">iwubcode</a></strong> has many grand plans to renovate Dolphin's ability to enhance graphics. From post-processing to Graphics Mods, they've got <em>a lot</em> up the pipeline. But if anything was going to get merged, that meant breaking down their projects into smaller pieces. This is just a <em>taste</em> of what Graphics Mods can do, and we can promise that there is more coming in the future. This is a massive undertaking being powered by a single person, so for now things are very barebones on purpose. It was a necessary evil to scale things back so that the system itself could be reviewed and merged.</p>
<p>One issue is Android. While there is nothing stopping Graphics Mods from working on Android, at this point it has not been implemented into the Android GUI. The Android GUI is a bit of a pain to develop for, and not every developer has an interest in dealing with the JNI parts of Dolphin. In fact, no one <em>wants</em> to do it, it's just that some end up <em>having</em> to do it.</p>
<p>As this feature sees more use, we hope to include more Graphics Mods across many titles in Dolphin. If any other creators want to submit their Graphics Mods to be available in the emulator, they can be submitted as Pull Requests.</p>
<h4 id="50-16448-fix-some-dual-core-full-screen-panic-alert-deadlocks-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16448/">5.0-16448 - Fix Some Dual Core + Full Screen + Panic Alert Deadlocks</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-16448-fix-some-dual-core-full-screen-panic-alert-deadlocks-by-josjuice" title="Permanent link">¶</a></h4>
<p>Modern consoles have many cores and do tons of thread management. That's something we're thankful we don't have to worry about emulating, as the GameCube and Wii are from a bygone era of single core processors and games that run directly on bare metal.</p>
<p>But if the GameCube and Wii are <em>Single Core</em> devices, what does Dolphin's Dual Core mode actually do? Most users seem to think that it splits CPU emulation onto multiple threads, and ask why we can't just split it even further to use even more cores. But that's not what it does.</p>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:35%; min-width:72px; float:right; text-align:center;">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/gamecubecpu.jpg"><img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/gamecubecpu.jpg"></a>
</div>
<p>Dual Core is actually moving <em>GPU</em> related CPU tasks onto a separate core. The CPU has to do a lot of work figuring out what to render, handling the Vertex Loader, mipmaps, and other things. This "GPU thread" basically does all the legwork to figure out the GPU commands for what your GPU will then have to render. Because the GPU thread and the CPU thread are almost <em>all</em> of the major work that Dolphin does on a typical configuration, splitting them up can theoretically give <em>up to 100%</em> faster performance depending on the game. </p>
<p>This was <em>essential</em> in Dolphin's early days. Back then, both Dolphin's CPU JIT and the CPUs we'd be running it on were <em>significantly</em> slower than today. Twelve years ago, hundreds of games were too demanding to run fullspeed <em>on the fastest computers in the world</em>. It was a community effort in those days to buy the latest processors and overclock the hell out of them to see what games were now fullspeed on the bleeding edge. In the face of this incredible struggle, developers were willing to cut a few corners in order to make things faster. Dual Core's design is a result of that.</p>
<p>Dual Core relies on the fact that the CPU and GPU threads can do some of their work in parallel without having to interact. If everything goes well, they both run at full speed and don't drift too far apart. Then, when an action that requires the CPU/GPU to communicate is <strong>detected</strong>, they can sync up without any major issues. The more that things can run in parallel, the more efficient that Dual Core is, so it syncs <em>as little as possible</em> in order to get the massive performance gains that it gives.</p>
<p>However, in recent years Dual Core has drawn more and more ire for causing random bugs and crashes across a lot of popular games. But it wasn't <em>always</em> this problematic. Something changed along the way that has exasperated the core problem of Dual Core...</p>
<p>What exactly happened?</p>
<p>After Dolphin 4.0, something <em>flipped</em> that no one in the early days of Dolphin's development could have predicted. With the advent of <a href="https://dolphin-emu.org/blog/2014/03/15/pixel-processing-problems/">TEV Fixes New</a> and a huge slate of massive JIT optimizations, we actually made it so that the <em>GPU thread</em> was now the bottleneck most of the time!</p>
<p>This turned Dual Core into a much more unstable beast, as a sudden spike that causes the GPU thread to fall too far behind can cause bad data to be executed (unknown opcodes), visual errors, shaky geometry, spiky polygons, and more!</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/battalionwars2.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/battalionwars2_thumb.jpg"></a>
<figcaption>A handful of games were the opposite and actually struggled with the GPU thread overrunning the CPU thread, and those have benefitted.</figcaption>
</figure>
</div>
<p>Since Dual Core has become more unstable, there have been a lot of efforts to fix it, but we've ran into a rather difficult conundrum. If we fix the core problem - the fact we allow the GPU and CPU threads to run apart - we lose the performance gains of Dual Core. Fake-completion, a method used for netplay to make Dual Core more deterministic, only works in around half of the library and is roughly 20% slower. It's great for netplay in the games it supports, but not really viable as a general option. SyncGPU, a setting that forces the CPU and GPU thread to synchronize every so many cycles, often ends up slower than Single Core due to thread synchronization overhead and still has some of the same issues as Dual Core.</p>
<p>We've come to the conclusion that fixing Dual Core within the existing design just isn't on the table. If you can't run the game on Single Core, and the game relies on tighter CPU/GPU synchronization, you just have to deal with the occasional unknown opcodes, weird graphical oddities, and the occasional crash.</p>
<p>This pull request <em>doesn't</em> fix any of that, but it does fix something that was making it even worse. A bug in Dolphin's GUI system on desktops was causing popups from the GPU thread to lockup Dolphin <em>if</em> the game was in exclusive fullscreen. Because Dual Core's behaviors can cause various assertions from the GPU thread, this meant that previously non-fatal popups would essentially deadlock the emulator. The only advice we could give users was to disable panic handlers while in full-screen because Dual Core is occasionally going to mess up.</p>
<p>Thankfully, the panic handler issue has finally been stopped. <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> introduced a small tweak to the way popups from the GPU thread are handled in order to make sure they do not deadlock when in Full Screen. It's a rather messy solution, but Dual Core itself is messy problem. </p>
<p>This should fix the annoying "Unknown" blank popups that have been stopping people's games when running in Full Screen. If these popups were trying to tell you that a fatal error has happened, then the game might still crash. But if it's just a harmless Unknown Opcode, you might be able to continue.</p>
<h4 id="50-16443-implement-pi-fifo-reset-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16443/">5.0-16443 - Implement PI FIFO Reset</a></strong> by <strong><a href="https://github.com/pokechu22">pokechu22</a></strong><a class="headerlink" href="#50-16443-implement-pi-fifo-reset-by-pokechu22" title="Permanent link">¶</a></h4>
<p>Speaking of annoying unknown opcode popups, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> investigated a case where Dolphin could erroneously execute bad data after a game called the command for a FIFO RESET.</p>
<p>In normal gameplay, you aren't going to see this command very often. In fact, the most common place we've seen this issue reported is from <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Ocarina_of_Time">The Legend of Zelda: Ocarina of Time (VC)</a>. This is because randomizer players would abuse soft resets to test particular item checks and use save/quit into reset to quickly travel to specific areas. Randomly during these resets, the data past the FIFO RESET would contain invalid data, which triggered the unknown opcodes.</p>
<p><strong><a href="https://github.com/pokechu22">pokechu22</a></strong> investigated a similar case found in a demo disc that used FIFO RESET between games and menus and found that any data leftover <em>past</em> a FIFO RESET was thrown out. As such, we now throw out any commands immediately following a FIFO RESET before things are reinitialized.</p>
<h4 id="50-16722-and-50-16737-fix-hle-audio-and-hle-boot-of-datel-titles-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16722/">5.0-16722</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16737/">5.0-16737</a></strong> - <strong>Fix HLE audio and HLE boot of Datel Titles</strong> by <strong><a href="https://github.com/pokechu22">pokechu22</a></strong><a class="headerlink" href="#50-16722-and-50-16737-fix-hle-audio-and-hle-boot-of-datel-titles-by-pokechu22" title="Permanent link">¶</a></h4>
<p>Let's be honest here. In the past, booting Datel titles in Dolphin was a pain in the ass. It required both DSP-LLE <em>and</em> an original GameCube BIOS. Otherwise, they would simply hang and/or lock up Dolphin. And when that happens, your settings would likely get reset when Dolphin crashed and then you'd have to figure out what you forgot to change and the cycle continues.</p>
<p>You may wonder: "<em>Why would I want to boot a Datel title in an emulator? All Datel did was make a bunch of unlicensed products, right?</em>" While their stuff may not have been of the highest budget and quality, they did make some rather interesting and useful products. The Advance Game Port allowed you to play Game Boy Advance games on the GameCube through a <strong>GBA Emulator</strong> which loaded real cartridges through a Memory Card expansion device. But, Datel is more commonly known on the GameCube for their slew of Action Replay releases, Freeloader discs, and their weird Max Drive gigantic memory cards.</p>
<p>This brings us to a rather <em>weird</em> point. The Gecko Code loader is free open source software, which allows Dolphin to directly use the same Gecko Code Loader that is used on console. Thanks to that, our Gecko code support is nearly 1:1 with console. However, Datel's Action Replay loader is closed source and protected by copyright, and we cannot include it. So Dolphin uses a reversed engineered cheat code loader for Action Replay codes. While Datel's codes <em>should</em> be able to produce near identical results in Dolphin, it's very obvious that our Action Replay cheat loader is fairly inaccurate in some respects. For example, the "Hold R to Mega Jump" Action Replay code in <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_The_Wind_Waker">The Legend of Zelda: The Wind Waker</a> only works when using a real Action Replay disc to initialize the code.</p>
<div class="media-block narrow">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/arcodelle.mp4" type="video/mp4"/>
</video></div>
<figcaption>We were going to do a comparison, but the code just does nothing with Dolphin's Action Replay loader. So just imagine Link not jumping here. </sub></figcaption>
</figure>
</div>
<p>In an effort to make these unlicensed titles more accessible, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> dug through them to figure out why they didn't work with Dolphin's emulated BS2 (AKA - Skip Main Menu) or with HLE audio. The answers for each were rather interesting.</p>
<p>For the HLE audio issue, the problem was caused by a typo in <em>Datel's</em> code that ended up not mattering on console or DSP-LLE, but completely broke our HLE implementation. Namely, they were supposed to write 0x800 to the DSP control register, which would have started the initialization process. Instead they wrote 0x80, which does absolutely nothing. How exactly did this work on DSP-LLE and real hardware? Well, it didn't, but other data arrived at <em>just</em> the right time just as Datel's initialization code exited. We're not 100% sure why this works, and for once we don't have an overly complicated summary from <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> to rely on yet. All we know is that by improving the timings on DSP-HLE, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> was able to get it working in the same manner that it was on DSP-LLE and console.</p>
<p>Emulated BS2 is our internal name for what users see as "GameCube - Skip Main Menu" in the GUI. If you don't hear that jingle and see that cube before booting a GameCube game, then you're using Dolphin's Emulated BS2. Its job is to make sure that all of the registers and memory are setup correctly as if the Main Menu had run, so that games work the same regardless of if you have the Main Menu dumped from a console or not. Emulated BS2 works so well for most games, that users almost never have to rely on a real Main Menu for compatibility reasons in retail titles.</p>
<p>The reason why Emulated BS2 didn't work with Datel's Loader stemmed from the fact that Datel did <em>way</em> less initialization than actual games. Datel's titles <strong>heavily</strong> relied on the Main Menu to setup almost everything. <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> had to go through various registers <em>and</em> even dive into parts of the graphics code and give them proper default values in order to have the games boot correctly without needing a GameCube Main Menu.</p>
<p>The result of all of this work is that Datel's titles will now boot properly without needing special settings in the latest development builds. However, there are still a lot of problems when using these titles, especially in Action Replay devices that check memory cards. Some Action Replay titles will hang if you have a memory card plugged in on boot. Most Datel titles will throw unknown opcodes as well, and in one rare case in the third Advance Game Port release, enabling MMU will cause the game to crash. </p>
<p>We highly recommend <em>not</em> using GCI Folders with any Datel products that can write to the memory card, especially Advance Game Port's third release, which will actively break things with how it writes Savestates to the memory card. As with any kind of sketchy game (like <a href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/?nocr=true#50-15330-raise-program-exceptions-on-floating-point-exceptions-by-josjuicewe">True Crime: New York City</a>) or homebrew that can do unexpected things, please use these titles with caution.</p>
<h4 id="50-16730-add-hle-version-of-libasnd-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16730/">5.0-16730 - Add HLE version of libasnd</a></strong> by <strong><a href="https://github.com/pokechu22">pokechu22</a></strong><a class="headerlink" href="#50-16730-add-hle-version-of-libasnd-by-pokechu22" title="Permanent link">¶</a></h4>
<p>If you use a lot of homebrew in Dolphin, you're probably someone who commonly swaps over to LLE audio. This is because a lot of Homebrew use special <em>homebrew</em> DSP microcodes called libasnd and libaesnd. Dolphin's DSP-HLE had no way to handle these microcodes!</p>
<div class="media-block narrow">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/libasndpopup.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/libasndpopup.png"></a>
<figcaption>This popup means you aren't getting audio unless you swap to DSP-LLE.</figcaption>
</figure>
</div>
<p>This is because DSP-HLE doesn't actually emulate the DSP hardware, instead it identifies what DSP microcode is running (based on a hash) and directly emulates that microcode without bothering to actually emulate the hardware itself. This is <em>many</em> times faster, to the point where DSP emulation is <em>never</em> a performance bottleneck when using DSP-HLE. Yet in modern builds of Dolphin, DSP-HLE and DSP-LLE have <em>near</em> parity in supported microcodes. Users no longer have to choose between the accurate but demanding DSP-LLE or <a href="https://dolphin-emu.org/blog/2015/08/19/new-era-hle-audio/">old HLE audio</a> that was rife with bugs and only supported a handful of titles well.</p>
<p>Because the GameCube and Wii's retail library is now set, we can be certain that Dolphin's DSP-HLE completely handles those cases with relative accuracy. However, Homebrew (and one demo we found earlier this year!) are the last bastions of unsupported microcodes under DSP-HLE.</p>
<p>And that's the main reason why Dolphin's DSP-HLE hasn't worked for a lot of homebrew. A lot of homebrew uses the libasnd and libaesnd microcodes, which were under active development during most of Dolphin's development life. Writing support for something that could change at any moment seemed silly, but at this point development on the homebrew microcodes seem to have mostly stabilized. The last changes occurred in 2020, and they were minor changes at that.</p>
<p>As part of making homebrew in Dolphin more accessible, it seemed natural to finally add support for the libasnd and libaesnd microcodes that they use. And because they're a part of libogc and open source, adding support for them was far easier than it was figuring out all the crazy behaviors present in various AX and Zelda microcodes! In fact, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> implemented the libasnd microcode used in most homebrew <em>on the side</em> while working on other audio things.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/newoescape.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/newoescape_thumb.jpg"></a>
<figcaption>Play tons of homebrew without needing LLE audio! This is <a href="https://wiibrew.org/wiki/Newo_Escape">Newo Escape</a>, a flight homebrew game that previously played no audio on DSP-HLE.</figcaption>
</figure>
</div>
<p>Some homebrew that use the slightly more complicated liba<strong>e</strong>snd still require LLE audio as of this Progress Report, but work on changing that is already underway.</p>
<h3 id="dev-diary-solving-the-mystery-of-monster-house"><strong>Dev Diary - Solving the Mystery of Monster House</strong><a class="headerlink" href="#dev-diary-solving-the-mystery-of-monster-house" title="Permanent link">¶</a></h3>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> is a game that has been problematic in Dolphin for a very long time. It's right in that zone where it's not <em>popular</em> enough to see a lot of attention, but not <em>awful</em> enough to draw a lot of morbid curiosity. It's a servicable game that falls apart in the final act.</p>
<p>There have been reports that <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> is a cursed game, and is simply unbeatable in Dolphin. Invalid read errors would chase away prospective users looking to sneak into the depths of this seemingly haunted labyrinth. Every time we've taken a glance at this title, it has looked like nothing else but a normal game with no noticeable issues. But again and again on the issue tracker and wiki, another soul would be lost to these mysterious crashes.</p>
<p>After many years of avoiding the eyesore, it was time to send someone in for real. Someone to get to the bottom of <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> and find out the truth.</p>
<p>Our unwilling volunteer this time around was <strong><a href="https://github.com/JMC47">JMC47</a></strong>. He was a skeptic that there would be anything special with this particular game and rolled his eyes at the request. We sent him in anyway and armed him with a squirt gun, some savestates, and a cheatcode to refill health. He should have been completely safe with those tools. Should have. Unfortunately, we lost contact soon after he entered the house. All that we could find were these log files of his exploits.</p>
<hr />
<p><strong>Testers Log - Day 1</strong></p>
<p>I've seen <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> reported a couple of times over the years and bought the game probably over half a decade ago. I've tried it a few times but upon seeing nothing interesting, I'd always put it on the back burner. This game isn't aggressively bad or maliciously coded, it just seems like a pretty mediocre movie tie-in. Compared to something with crazy issues like <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>, it just seemed like it wasn't worth my time. Yet, supposedly this game still isn't playable. We'll see about that.</p>
<p>The game starts out rather suddenly, with the main cast getting thrown into the <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> with little to no setup. This is apparently a movie tie-in game, so apparently telling the story properly is just optional. At the center of the game are three kids. I will dub them Annoying Child, Sarcastic Girl, and Scared Kid. The gimmick of the game is that these three kids are exploring the <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> armed with different weapons and they are trying to destroy it in order to... I don't know honestly. They just seem to want to destroy it. But is it evil? Having played through the first chapter of the game, I'm not entirely sure.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh1.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh1_thumb.jpg"></a>
<figcaption>These kids will be my company during my foray into the Monster House.</figcaption>
</figure>
</div>
<hr />
<p><strong>Testers Log - Day 2</strong></p>
<p>This game is starting to get on my nerves. Maybe it's because the developers were inexperienced, but I'm constantly ending up going the wrong way in a mostly linear game. The reason for this is rather silly.</p>
<p>When you unlock a door in other games, say a 3D Legend of Zelda game, the developers tend to show you the door you unlocked. The developers of this game have seen this and <em>know</em> that, but it seems like they didn't understand <em>why</em> it works. They show me that I unlocked a door in a close up, but then zip back to my character facing whatever direction I was facing when the cutscene started. Compare this to [Wind Waker], which will keep your camera angled toward the door that you unlocked when you regain control. This is a reoccuring problem in Monster House, especially in hallways where you might unlock a vent that is all the way back near where you came.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh2.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh2_thumb.jpg"></a>
<figcaption>I unlocked a door, but it sure isn't this one.</figcaption>
</figure>
</div>
<p>Does this make it a terrible game? No. The game seems solid enough overall, and I haven't seen any signs of really bad programming that would cause a crash. Maybe all of the users before me were just using bad dumps or cheats that don't work.</p>
<hr />
<p><strong>Testers Log - Day 3</strong></p>
<p>I felt a chill run down my spine. I was crawling through a vent when I heard the horrible ding of invalid reads. I thought the <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> had swallowed me alive. </p>
<p>I held frantically mashed enter to try and break free, fearing my journey was over. In the end, I survived. The last invalid read error was squashed and the game loaded the next area. I let out a sigh of relief, as I had made a fatal error in my complacency.</p>
<p>Logging wasn't enabled this entire time - meaning that if this had been a game crash, I would have lost everything. Thankfully, because the game didn't crash, I was able to save and enable logging and other debugging features. The <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> should have stopped me while it had the chance. Now it's war.</p>
<hr />
<p><strong>Testers Log - Day 4</strong></p>
<p>The game put up a rather spirited fight, but i have emerged victorious. </p>
<p>It tried the same trick on me again with the invalid reads <em>and</em> this time crashed afterwards thinking it would fell me. Fortunately, the damage done was minimal as I had been saving regularly since the initial scare. During this attack, however, the game revealed its weakpoint! In the logs I caught "Stale icache" messages right alongside the invalid reads. <strong>This game is just icache sensitive!</strong></p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh3.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh3_thumb.jpg"></a>
<figcaption>This fireplace would have felled a normal tester, but not me.</figcaption>
</figure>
</div>
<p>If I had been playing this game years ago, perhaps I wouldn't have known what to do. Thankfully, by this point we have <a href="https://github.com/dolphin-emu/dolphin/pull/10739">weapons</a> to fight off such a problem thanks to <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> and the infamous <a href="https://wiki.dolphin-emu.org/index.php?title=Scooby-Doo!_Mystery_Mayhem">Scooby Doo!</a> incident. </p>
<p>Oddly enough, those also dealt with mysteries, haunted houses, and monsters... Oh well. It looks like my job is done here. All I need to do is beat the game and write up a report.</p>
<hr />
<p><strong>Testers Log - Day 5</strong></p>
<p>Despite disabling the icache, I'm still getting invalid read errors every now and then. The game hasn't crashed on me, but this shouldn't be happening. Either the game needs <em>accurate</em> icache emulation or the game has programming bugs that cause invalid reads on console that get skipped by their error handler. In order to verify this myself, I decided to enable MMU emulation.</p>
<p>If the game crashes now, I'll be able to follow a stack trace and figure out exactly <em>where</em> in the game code the problem is happening. From there, if the game is relying on icache behaviors to the point of needing <em>accurate</em> emulation of it, we can just patch the game instead.</p>
<p>After dealing with all of that annoying emulator stuff, the game rewarded me with a rather competently made boss fight. Things are starting to look up after all!</p>
<hr />
<p><strong>Testers Log - Day 6</strong></p>
<p>Apparently the developers couldn't design harder enemies and have just decided to make the game harder by throwing a 30+ enemies into every room. What the hell is their problem? There are so many enemies in these rooms that you can't actually move your character half of the time until you clear them out.</p>
<p>And please, can we stop with all the quicktime events?! These QTEs were annoying in the first half of the game, but there they only cost a tiny amount of health as long as you mashed the failure minigame. Now they cause instant death and reset you to the beginning of the section!</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh4.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh4_thumb.jpg"></a>
<figcaption>Better hope you weren't doing something or hitting other buttons when this sudden QTE showed up.</figcaption>
</figure>
</div>
<p>This last section I'm in has been a real doozy. Multiple rooms packed with tons of enemies and areas that lock you in until you clear all the enemies, followed by a boss fight, followed by not one <em>but two</em> instant death QTEs?! Come on. That's more than enough, especially considering that the boss had an instant KO move too, even if it was easy enough to dodge.</p>
<p>At least I'm almost done with this maze. Whenever the story switches characters, the game gives me a checkpoint. I just need to find my way out, and every direction just looks the same. Oh, and there are a bunch of extra dead-ends with nothing but collectable bonuses. And if you dare grab the collectable you spawn more enemies. Thanks! That's just wonderful. </p>
<p>AND ANOTHER INSTANT DEATH QUICKTIME EVENT SPACED JUST FAR ENOUGH OUT THAT I LET MY GUARD DOWN SENDS ME BACK TO BEFORE THE BOSS?! You know what, I'm just going to spam savestates. </p>
<hr />
<p><strong>Testers Log - Day 7</strong></p>
<p>Now the #@&$ing cutscenes have #@&$ing quicktime events in them that if you fail you die, or worse, have to fight the boss again. You can't even rest during the cutscenes. At least I'm almost- What.</p>
<p>This game checks to make sure the memory card you're using matches the memory card the save was created on, and I apparently loaded a savestate from before my last in-game save, so now it thinks the memory card doesn't match. At least it doesn't refuse to save - oh great, the game #@&$ing crashed after saving because it's poorly coded. Now I need to make sure this isn't a Dolphin bug.</p>
<p>And, why exactly are the cutscenes where you <em>get caught</em> to switch characters exactly the same as the QTEs that you <em>can't fail</em> or else you game over? Where is the consistency. And, you know what would be a great idea? Putting a room with a thousand #@&$ing enemies and then have a QTE trigger in the same area is just stupid. And guess what, if you manage to get hit as a QTE loads, the #@&$ button prompt won't show up so you're just dead. GREAT. And the button prompts are randomized, so you can't even use the dodge button or something consistent like that.</p>
<p>It's a horrible conundrum. Killing all the enemies takes forever, so I just want to rush through the rooms. But if I don't kill the enemies, I risk glitching out their precious QTE that instantly kills me if I mess up. This section of the game is literal garbage, and honestly sours everything else.</p>
<p>I was willing to forgive the fact that the annoying #@&$ing kid needed a #@&$ing ladder hook in order to grab a ladder that was clearly at arm's height. I was willing to forgive the fact the game's enemy design had as much variety as a modern sitcom. Hell, I was willing forgive the fact that this "movie tie-in" hadn't actually told me anything about the characters or story!</p>
<p>How come the #@&$ing house can seemingly capture these kids at will and kill them but doesn't. The <em>same exact cutscene</em> where the vent comes down and grabs you during a QTE to kill you is used <em>multiple times</em> to force character swaps, but the kid ends up fine in another section anyway! Why? How come they're fine when that happens but not during the QTE?!</p>
<p>This is literally the the final stretch of the game. I just need to push through and finish it so I can mark the game as playable on the Wiki and forget this ever happened.</p>
<hr />
<p><strong>Testers Log - Day 8</strong></p>
<p>@#&$ing this stupid #@&$ing house in this stupid #@&$ing game. You know, the game has truly made me appreciate that last section of enemy mobs and QTEs. You want to know why? Because at least there was <em>gameplay</em>. This is the second to last chapter of the game, and do you want to know what it is composed of? #@&$ing QTEs! THAT'S IT! THERE'S NO MORE GAMEPLAY!</p>
<p>Okay, so get this. The house is chasing me, and I have a three button quicktime event where every so often I have to hit a button to avoid rubble with one of the three characters. Mess up too many times, and you restart the section. The timings aren't all that tight, but considering how long the section actually lasts, it's rather annoying.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh5.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh5_thumb.jpg"></a>
<figcaption>This goes on forever and ever and ever...</figcaption>
</figure>
</div>
<p>This is just wonderful.</p>
<hr />
<p><strong>Testers Log - Day 9</strong></p>
<p><em>This log has been removed due to excessive profanity.</em></p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh6.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh6_thumb.jpg"></a>
<figcaption>Thankfully the game has mercy if you fail the cutcene QTEs and only make your repeat <i>part</i> of the last section instead of the whole thing. Thanks.</figcaption>
</figure>
</div>
<hr />
<p><strong>Testers Log - Day 10</strong></p>
<p>The #@&$ing chase cutscene is still #@&$ing going. I can't believe it. And on this section you can't make any mistakes because the house has caught up.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh7.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh7_thumb.jpg"></a>
<figcaption>Please just let it end.</figcaption>
</figure>
</div>
<hr />
<p><strong>Testers Log - Day 11</strong></p>
<p>After several minutes of playing the worst version of <em>Simon says</em> I've ever seen, the final boss fight has finally commenced. And considering the quality of the last chapter, it is fitting the final boss is <em>barely</em> gameplay. Rather than using the third person shooter gameplay that the game has established up until this point, we get an incredibly janky vehicle boss fight where we take a crane, approach the house, mash attack, back away... rinse and repeat.</p>
<p>There's no actual variety to the fight. The house has one attack that can be mirrored left or right - an extremely slow swipe followed by a reverse swipe. You just backup to avoid it, and then after the attack get close and mash the attack button to deal a tiny pixel of damage to its health bar. But, don't you dare make a mistake, as if the house so much as <em>grazes</em> your crane, it takes off a huge chunk of your health bar. Just don't be greedy and the fight isn't that bad. You can't really get into a rhythm though because there's yet another randomly occurring #@&$ing QTE during the boss. It's just a simple joystick spin, but unless you use the palm of your hand to spin it extremely fast, you're guaranteed to lose some of your precious life every time. If the QTE comes up too many times, you can lose half of your health. It's worth swapping your hand grip to make sure that doesn't happen, because this fight takes way too long to lose to chip damage.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh8.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh8_thumb.jpg"></a>
<figcaption>You even get random QTEs during this limited mobility boss fight which is barely more gameplay than a quick time event.</figcaption>
</figure>
</div>
<p>The boss's health bar is almost depleted... please... just end... YES! IT'S OVER!</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh10.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh10_thumb.jpg"></a>
<figcaption>The house is no more! I am victorious.</figcaption>
</figure>
</div>
<p>After all of that, it's hard to judge <a href="https://wiki.dolphin-emu.org/index.php?title=Monster_House">Monster House</a> because of how <em>hard</em> it relies on quick time events toward the end of the game. The core gameplay isn't <em>bad</em>, and while the developer was inexperienced, they did a decent enough job at varying up the characters, enemies, and their first boss fight was well designed.</p>
<p>It's just that the latter half of the game became such a QTE fest that it was hard to play. And the parts after you get out of the house are almost entirely QTEs! But now we're in the ending cutscene and it's all over-</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh9.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-june/mh9_thumb.jpg"></a>
<figcaption>This #@!&ing prompt happens well over 30 seconds after the boss fight is over and serves no purpose but to cause you pain.</figcaption>
</figure>
</div>
<p>What you want me to <strong>hit buttons</strong> during the end cutscene! NO! #@&$ NO NO #@&$! WHO THE #@&$ PUTS A QUICKTIME EVENT AFTER YOU DEPLETE THE FINAL BOSSES HEALTH BAR WHAT THE #@&$ IS YOUR PROBLEM WHY-</p>
<hr />
<p>Unfortunately, the log cuts off there. The random Savestate/Memory Card Crash never happened a second time, so we were unable to confirm if that was a bug in Dolphin or the game, but we can confirm that the game is now playable from start to finish... if you dare.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2022-05-01&to=2022-07-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-16383/">5.0-16383</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-16793/">5.0-16793</a>!</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Leaving a Legend: Saying Goodbye to Windows 7
2022-06-09T03:27:47+00:002023-01-01T10:18:04.715418+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/06/09/leaving-a-legend/
<header>
<img src="https://dolphin-emu.org/m/user/blog/Windows7/win7header2.jpg" />
<img class="mini" src="https://dolphin-emu.org/m/user/blog/Windows7/win7header2mini.jpg" />
</header>
<p><br/><blockquote>With none of our active developers using Windows 7 as their primary OS, the userbase dwindling, and Windows 7 starting to meaningfully fall behind newer versions of Windows, it's going to become more and more likely that features are accidentally broken in Windows 7. Eventually, the differences between Windows 7 and newer versions of Windows may increase to the point where we drop support for the aged OS. We don't plan on purposefully breaking support, but, its days are numbered.<footer><a href="https://dolphin-emu.org/blog/2019/08/04/dolphin-progress-report-june-and-july-2019/#50-10758-approximate-logic-op-with-blending-if-unsupported-by-stenzek">Dolphin Progress Report: June and July 2019</a></footer></blockquote><br/></p>
<p>Windows 7 had a hell of a run. After the wide rejection of Windows Vista, Windows 7 set the bar for all Windows versions to come. It continued the technical advancements from Vista while righting most of its wrongs, all wrapped up in a friendly, reliable package. This combination was a tremendous success, and users loved Windows 7 so much that it had a support lifespan of over 10 years!</p>
<p>Dolphin has been proud to support Windows 7 for its entire life, and then some. We've supported Windows 7 for <strong>13 years</strong>, making it our longest supported single operating system version ever. However, all good things must come to an end. While Windows 7 was able to survive the release of Windows 8 and 8.1, Windows 10 finally provided another popular option, and users have moved on. With Microsoft ending support for Windows 7 a few years ago and more and more software abandoning it, supporting Windows 7 has become a liability for us.</p>
<p>After several months of breaking/restoring Windows 7 support, we've decided to drop support for Windows 7... <em>and</em> Windows 8 and 8.1. We did not take this decision lightly, but after evaluating the situation, we knew what had to be done in order to make sure we can keep working on Dolphin without having to make compromises.</p>
<p><a id="cuthere"></a>
<br/></p>
<h3 id="trials-of-supporting-windows-7-in-2022"><strong>Trials of Supporting Windows 7 in 2022</strong><a class="headerlink" href="#trials-of-supporting-windows-7-in-2022" title="Permanent link">¶</a></h3>
<div style="margin-left:2em; margin-bottom:1em; min-width:64px; max-width:10%; float:right; text-align:center;"><img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7logo.svg"></div>
<p>One of the main reasons that supporting Windows 7 has become such a burden is that Microsoft <em>very strongly</em> wanted people to use Windows 10. Once Windows 10 released most new features simply never came to Windows 7. Over the past couple of years, we ran into differences with <a href="https://dolphin-emu.org/blog/2019/08/04/dolphin-progress-report-june-and-july-2019/#50-10758-approximate-logic-op-with-blending-if-unsupported-by-stenzek">Direct3D11 support which affected LogicOps Emulation</a>, <a href="https://nl.dolphin-emu.org/blog/2017/03/01/dolphin-progress-report-february-2017/?nocr=true#other-important-changes-within-this-commit">BSOD issues when using USB Passthrough</a>, among others.</p>
<p>Running into a minor issue here and there wasn't going to cause us to drop support, however. But within the last couple of months, time has caught up to Windows 7. In our previous Dolphin Progress Report, we detailed the back and forth of trying to keep Windows 7 running. <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/#50-16009-memarena-use-memory-placeholders-for-fastmem-on-windows-to-ensure-nothing-allocates-within-the-fastmem-space-by-admiralcurtiss">We broke it</a> and then <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/#50-16035-memarena-restore-windows-7-support-by-admiralcurtiss">fixed it</a> and then <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/#50-16035-memarena-restore-windows-7-support-by-admiralcurtiss">broke it again</a>, and had to <a href="https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/#50-16236-corewginput-dynamically-load-winrt-function-addresses-by-admiralcurtiss">fix that too</a>.</p>
<p>This was made all the more difficult by the fact that Dolphin's developers have long moved on. Not only are we no longer using Windows 7 regularly, we don't even have any Windows 7 systems readily available for us to test with! This meant that Windows 7 was totally untested by the Dolphin team, so Windows 7 support could break at any time and we'd only know when a user reported issues to us.</p>
<p>This put developers in a rough spot. If we did merge something and it broke Windows 7, that meant we had to add more branches to the code and complicate features, or potentially use a different method altogether to implement said feature. And if an issue was reported months later, which was common due to dwindling user numbers on Windows 7, that meant that it usually fell on another developer to pick up the pieces and fix things. It was <em>okay</em> when it came to one or two minor issues every year, but when it was happening multiple times a month, something had to change.</p>
<p><br/></p>
<h3 id="few-windows-7-users-to-support"><strong>Few Windows 7 Users to Support</strong><a class="headerlink" href="#few-windows-7-users-to-support" title="Permanent link">¶</a></h3>
<p>When it comes time to make difficult maintenance decisions, one of the things we have to do is a cost versus benefit analysis. In this case, Windows 7 was costing an increasing amount of developer time to maintain. But, if a lot of Dolphin's users were still on Windows 7, then perhaps this would be worth the trouble, at least for now.</p>
<p>So how many Windows 7 users did we actually have? We turned to our <a href="https://dolphin-emu.org/blog/2016/06/19/optional-usage-statistics-reporting/">optional usage statistics</a> to find out. </p>
<p>Mouse over or tap on a graph for details.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<script>
addChart({"title":{"text":"Dolphin Windows User Distribution"},"subtitle":{"text":"6 May 2022 through 11 May 2022"},"exporting":{},"chart":{"type":"pie","polar":false,"shadow":false,"showAxes":false,"borderWidth":0,"plotBorderWidth":0,"width":null},"plotOptions":{"pie":{"allowPointSelect":false,"dataLabels":{"distance":-30,"style":{"fontWeight":"bold","color":"white","textShadow":"0px 1px 2px black"}},"innerSize":"50%","startAngle":-90,"endAngle":90,"center":["50%","75%"]},"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"Percentage","turboThreshold":0,"type":"pie","label":{"connectorAllowed":true,"enabled":true,"onArea":false},"marker":{}}],"data":{"csv":"\"Windows Version\";\"Percentage\"\n\"Win10\";75.361\n\"Win11\";21.3486\n\"Win7\";1.78347\n\"Win8.1\";0.91494\n\"Win8\";0.2972","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"legend":{"enabled":true,"layout":"horizontal","floating":false,"align":"center","verticalAlign":"bottom"},"tooltip":{"enabled":true,"shared":false,"borderWidth":2},"labels":{"items":[{}]},"pane":{"background":[]},"responsive":{"rules":[]},"colors":["#006eff","#ff3100","#808080","#404040","#262626","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"yAxis":{"title":{},"labels":{}},"xAxis":{"title":{},"labels":{}}})
</script>
</figure>
<figure class="col-sm-6">
<script>
addChart({"title":{"text":"Dolphin Userbase affected by removing Pre-Windows 10"},"subtitle":{"text":"6 May 2022 through 11 May 2022"},"exporting":{},"chart":{"type":"pie","polar":false,"shadow":false,"showAxes":false,"borderWidth":0,"plotBorderWidth":0,"width":null},"plotOptions":{"pie":{"allowPointSelect":false,"dataLabels":{"distance":-30,"style":{"fontWeight":"bold","color":"white","textShadow":"0px 1px 2px black"}},"innerSize":"50%","startAngle":-90,"endAngle":90,"center":["50%","75%"]},"series":{"dataLabels":{"enabled":true},"animation":false}},"series":[{"name":"Percentage","turboThreshold":0,"type":"pie","label":{"connectorAllowed":true,"enabled":true,"onArea":false},"marker":{}}],"data":{"csv":"\"User Status\";\"Percentage\"\n\"Unaffected\";98.4\n\"Affected\";1.6","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"legend":{"enabled":true,"layout":"horizontal","floating":false,"align":"center","verticalAlign":"bottom"},"tooltip":{"enabled":true,"shared":false,"borderWidth":2},"labels":{"items":[{}]},"pane":{"background":[]},"responsive":{"rules":[]},"colors":["#006eff","#ff3100","#808080","#404040","#262626","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"yAxis":{"title":{},"labels":{}},"xAxis":{"title":{},"labels":{}}})
</script>
</figure>
</div>
</div>
<h3 id="why-and-when-we-drop-support"><strong>Why and When We Drop Support</strong><a class="headerlink" href="#why-and-when-we-drop-support" title="Permanent link">¶</a></h3>
<p>A shockingly small number of Dolphin's users were on Windows 7, and none of our developers used Windows 7, yet we were still fixing Windows 7 support well into 2022. How did it last so long? The answer is that Dolphin is an open source project! If someone breaks support for an older operating system when merging a new feature, <em>anyone</em> can come behind them and do the work on their own to refactor the code to support the new feature while still maintaining support for the old OS. As long as the new code meets current standards and doesn't over complicate things too much, support is resumed.</p>
<p>However, there is a limit to the sustainability of this process. As a project, we rely heavily on a number of outside libraries and APIs. For example, we use the <a href="https://visualstudio.microsoft.com/vs/features/cplusplus/">Microsoft Visual Studio</a> to compile our Windows builds, <a href="https://www.qt.io">Qt</a> for our desktop graphical user interface, <a href="https://github.com/mozilla/cubeb">Cubeb audio library</a> for sound, multiple graphics and input APIs, on and on. These are our dependencies, and if <em>they</em> drop support for an older operating system, the labor involved to refactor code on our own becomes astronomical. At that point, we're not refactoring a single change, we're refactoring <em>someone else's entire project.</em> This is so challenging that even large corporations avoid doing this. For our little volunteer team, it's just too much. So while we do what we can to support older operating systems, when our dependancies move on, it is time for us to move on too.</p>
<p>We were honestly expecting our Windows 7 support to be killed by Visual Studio moving on first, much like it did for Windows XP. But no, something else came up.</p>
<p><a href="https://www.qt.io/blog/qt6-development-hosts-and-targets">Qt6 released <em>without</em> support for Windows 7, and surprisingly also without 8 and 8.1 support.</a> As mentioned earlier, Dolphin uses the Qt GUI framework for our primary desktop GUI. While we have some support through dear imgui and our NO-GUI mode, Dolphin heavily relies on Qt, and Qt6 provided some fixes and functionality that would iron out a few GUI problems that users had reported <em>and</em> allow for new features. As soon as Qt6 was announced to not have support for versions of Windows before Windows 10, their days were numbered. We did however delay our move to Qt6 for quite a while (Qt6 first released in December of 2020), but we wanted the fixes that Qt6 brought and wanted to use its new features. So when one of our developers made a pull request to update Dolphin to Qt6, we weighed out all of the reasons above, and came to a decision.</p>
<div class="media-block full-width">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/Windows7/doom.jpg">
<figcaption></figcaption>
</figure>
</div>
<p><br/></p>
<h3 id="the-end"><strong>The End</strong><a class="headerlink" href="#the-end" title="Permanent link">¶</a></h3>
<p>With the merging of Qt6 support on the Windows buildbot in <a href="https://dolphin-emu.org/download/dev/master/5.0-16393/">5.0-16393</a>, Dolphin has dropped Windows 7, Windows 8, and Windows 8.1. Our minimum spec for Windows is now Windows 10. The currently released beta build is the <strong>last</strong> beta that will have support for Windows 7 and Windows 8.x. Users on these operating systems should turn off Auto-Update, as newer builds will no longer work on their operating system.</p>
<p>And so we say goodbye to a titan in the history of Operating Systems. As Qt6 is rolled out, our requirements will be bumped up accordingly for all of the different operating systems, except Android which uses a different GUI system altogether.</p>
Dolphin Progress Report: February, March, and April 2022
2022-05-17T06:39:12+00:002022-05-19T09:58:47.968642+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/05/17/dolphin-progress-report-february-march-and-april-2022/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/progressreportheader-march2022.jpg" />
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/progressreportheader-march2022mini.jpg" />
</header>
<p>After a long wait, the Progress Report is back! This time it wasn't so much from a lack of content, but from a lack of <em>content creators</em>. The past three months had illnesses hit one of our writers and the other had a very challenging move. Even with these major hurdles jumped, we're not even close to 100% yet. It's been a battle to get caught up with all of the big changes to Dolphin the past couple of months and because of that this report is a <em>tad</em> late.</p>
<p>Needless to say, there's only one way to start catching up, and that's to get to digging through the past three months of Notable Changes. Enjoy!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-16380-change-default-nus-shop-url-to-dolphins-fake-nus-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16380/">5.0-16380 - Change default NUS Shop URL to Dolphin's fake NUS</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-16380-change-default-nus-shop-url-to-dolphins-fake-nus-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>On the <a href="https://twitter.com/oatmealdome/status/1504206758213947394">16th of March</a> the Wii Nintendo Update Servers (NUS) abruptly went offline. Without them, Wiis can no longer download previously purchased titles, or download critical files needed for setting up your Wii system. Nintendo refuses to say this is anything more than a temporary maintenance blip, but after two months we're starting to believe that this is a permanent change. To our knowledge, the life-support from the Wii Shop has been pulled and the Nintendo Wii is now an offline console.</p>
<p>While it may not seem like much, NUS was an important tool to casual users, the modding scene, and even Dolphin users. Easy access to official System Files (IOSes) and default channels allowed users to easily setup a clean Wii System that is fully up-to-date without needing a game with a late release date. If you made a mistake on a modded Wii, you could easily access NUS to get clean copies of IOS files to unbrick your system. On Dolphin, it made it so users could get a fully up-to-date Wii System Menu setup, complete with channels, with just a few clicks. For preservation of the Wii experience, NUS made things simple.</p>
<p>More importantly, Wii games <em>require</em> various IOS files in order to run. We've had our run-ins with differences between older IOS behaviors and newer IOS behaviors while wrangling with USB Microphone support. There are lots of games that either won't run, or won't run correctly if they're missing IOSes. The good news is that almost every Wii disc title <em>comes</em> with the necessary IOS files to run that game along with a full Wii System Menu and all the default channels. Whenever you insert a disc into a real Wii, it'll prompt you to update if there is a missing System File. Most Dolphin users won't notice much of a change, as Dolphin has a hack for when a game is launched <em>from the gamelist</em> to ignore missing IOS files. For anything more complicated, IOS files are also required in Dolphin.</p>
<p>This may seem like a minor issue, but since the servers have gone down, there's been a huge uptick in issue reports from Dolphin users, along with an increase in bugs relating to incorrectly configured Wii Systems. A lot of users would simply pull something like that the Mii Channel and the Wii System Menu off of a Wii or a Disc, and think that installing that was enough. But, without the IOSes required to run the Mii Channel, you'll either be greeted with a blackscreen, the system menu rebooting, or a notice that the title could not be launched. Issues like these have been running rampant, and we no longer had an immediate solution that would clean up their issues.</p>
<p>Here's the kicker; Nintendo is still hosting all of these core system files for the Wii, they're still available to download... from the Wii U Content Delivery Network (CDN)! It still has all of the Wii's System Files for some reason. As far as we know, the Wii U's Virtual Wii used the Wii NUS. This isn't exactly unusual for Nintendo, as the 3DS CDN <em>also</em> has the Wii System Files!</p>
<p>Because of this duplication, this gives us an option to extend the life of the "Perform Online System Update" functionality in Dolphin. We now have a <strong>Dolphin</strong> Update Server. <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> created a static page and <strong><a href="https://github.com/delroth">delroth</a></strong> configured the server to act as an intermediary Update Server so that Dolphin can use the Wii U CDN for System Updates. Because the same files are on the Wii U CDN, all of this shuffling should amount to no noticeable change from the previous behavior for our users. <em>Perform Online System Update</em> works just how it did before.</p>
<p>Inevitably, the Wii U and 3DS CDNs will eventually go down, but this should buy us time to develop a more permanent solution for when that happens.</p>
<h4 id="50-16005-remove-mmu-default-in-disney-trio-of-destructiontm-by-jmc47"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16005/">5.0-16005 - Remove MMU Default in <em>Disney Trio of Destruction™</em></a></strong> by <strong><a href="https://github.com/JMC47">JMC47</a></strong><a class="headerlink" href="#50-16005-remove-mmu-default-in-disney-trio-of-destructiontm-by-jmc47" title="Permanent link">¶</a></h4>
<p>During the <a href="https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/">previous Progress Report</a> the blog writers, JMC47 and MayImilae, were discussing <a href="https://dolphin-emu.org/blog/2016/09/06/booting-the-final-gc-game/#memory-management-unit-emulation">MMU (Memory Management Unit)</a> titles. And this exchange took place.</p>
<p><br/>
<blockquote>
MayImilae: do any wii games use mmu?
<br/>JMC47: yes
<br/>MayImilae: which ones?
<br/>JMC47: <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Cars_2">Cars 2</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Toy_Story_3">Toy Story 3</a>
<br/>MayImilae: oh right, the anti emulation nonsense
<br/>JMC47: no!
<br/>JMC47: actually one of the devs reached out to us
<br/>JMC47: and <a href=https://forums.dolphin-emu.org/Thread-disney-trio-of-destruction%E2%84%A2>explained that the MMU stuff was <em>not</em> anti-emulation</a>
<br/>JMC47: the dcache stuff was
<br/>JMC47: but not the MMU usage
</blockquote>
<br/></p>
<p><a href="https://github.com/Sonicadvance1">Sonicadvance1</a>, MayImilae's partner, happened to see this conversation by peeking at her laptop. He simply pointed at the screen and said, "That's not MMU." and walked away. These three Disney titles we lovingly call the <a href="https://dolphin-emu.org/blog/2017/02/01/dolphin-progress-report-january-2017/#50-2204-hack-to-protect-lower-mem1-from-malicious-game-code-by-booto">Disney Trio of Destruction™</a> had MMU enabled on by default, as without full MMU emulation they emitted a backpatch error then crashed. However, <a href="https://github.com/Sonicadvance1">Sonicadvance1</a> is a former Dolphin developer who <em>made Dolphin's ARM JIT</em> - he knows what he is talking about. It was worth checking. So May immediately passed this on this comment, and JMC gave the three titles a quick test. They ran perfectly fine without full MMU emulation. Huh. Well there's only one thing to do when games are mysteriously fixed like this - bisect!</p>
<p>Through bisecting, we learned that <a href="https://dolphin-emu.org/download/dev/master/5.0-15699/">5.0-15699</a> is what now allows the Disney Trio of Destruction™ to work without full MMU emulation. This change was briefly mentioned in the <a href="https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/#50-15680-textureconvertershadergen-set-alpha-to-1-on-intensity-formats-if-efb-lacks-alpha-by-pokechu22">previous Progress Report</a> but was not explained, so we'll go over it now.</p>
<p>One of the biggest speedups in Dolphin is "fastmem". Emulating memory mapping is a very involved task, as the GameCube and Wii have very different memory mapping than the the hardware Dolphin runs on, and checking the mapping of every memory access beforehand is quite expensive. So Dolphin handles this by... just mapping the memory on the host system directly, differences be damned. Whenever the mappings are shared, as it can be for simple mappings, the host CPU will handle it and we get a massive speedup (fastmem). However, whenever it doesn't match, the host CPU faults. Then Dolphin's fastmem exception handler will backpatch that access to use "slowmem" where Dolphin will manually translate the memory address. Due to the brute force nature of fastmem, it fails a lot, a lot lot, but it's <em>always</em> worth it to try for fastmem on pretty much any memory access - a fastmem loadstore takes as little as 2 instructions, where as the same access in slowmem can take up to <strong>1000 instructions!</strong> However, fastmem can only work because we catch exceptions and backpatch them through slowmem.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-january/trioofdestruction.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-january/trioofdestruction.jpg"></a>
<figcaption>We just had to use this image again.</figcaption>
</figure>
</div>
<p>Even with exceptions, there is an exception. <code>Quantized Paired Single Loadstore</code> instructions, due to various quirks involving said quantization, cannot be backpatched. If one of these were to trigger an exception through fastmem, <em>everything would explode.</em> When fastmem was implemented in our x86-64 JIT long ago, the Dolphin's developers of the time were aware of this. They provided a solution, a "safe" path which uses a "test and branch" approach. Any instruction set to use this safe path will be tested before reaching fastmem, and if the test determines that it would fail in fastmem, it will be routed directly to slowmem without triggering an exception.</p>
<p>However, our predecessors only added test and branch to <code>Quantized Paired Single <strong>Stores</strong></code>. For some reason, they left <code>Quantized Paired Single <strong>Loads</strong></code> out of the safe route. We honestly don't know why. It is our assumption that they never encountered <code>Quantized Paired Loads</code> triggering exceptions after testing hundreds of games, so even though it was dangerous, they decided that the very minor performance hit of the test and branch method was not necessary.</p>
<p>Unfortunately, it appears that they never considered that <em>Dolphin</em> could force <code>Quantized Paired Loads</code> down the path of destruction.</p>
<p>While <a href="https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/#50-15680-textureconvertershadergen-set-alpha-to-1-on-intensity-formats-if-efb-lacks-alpha-by-pokechu22">fixing the graphical issue in Rygar</a>, we noticed that it now required full MMU emulation when it didn't need it before. <a href="https://github.com/JosJuice">Josjuice</a> looked into it, and traced this regression to <a href="https://dolphin-emu.org/download/dev/master/5.0-14829/">5.0-14829</a>. That change <a href="https://dolphin-emu.org/blog/2021/09/07/dolphin-progress-report-august-2021/#50-14829-powerpc-implement-broken-masking-behavior-on-uncached-writes-by-josjuice-with-help-from-eigenform-delroth-phire-marcan-segher-extrems-and-rylie">made Dolphin able to emulate the GameCube and Wii's broken masking for uncached unaligned writes</a>, which was required for a powerful <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Majora%27s_Mask">Majora's Mask</a> speedrunning trick. But to accomplish that, we had to make uncached memory accesses always trigger a fastmem exception and go through slowmem. </p>
<p>Rygar just so happens to do a <code>Quantized Paired Load</code> from an uncached memory region. This forced a fastmem exception on a <code>Quantized Paired Load</code> and...</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/cars2explosion.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/cars2explosion_thumb.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Full MMU emulation happened to work around this. Under full MMU emulation, <em>all quantized memory access instructions</em> use test and branch. Thanks to that, the test caught the <code>Quantized Paired Load</code> and routed it directly to slowmem, bypassing the exception and crash.</p>
<p>Fortunately the solution was very simple. In <a href="https://dolphin-emu.org/download/dev/master/5.0-15699/">5.0-15699</a>, <a href="https://github.com/JosJuice">Josjuice</a> made <code>Quantized Paired Singles Loads</code> safe with test and branch. Now, even without full MMU emulation, we always test <code>Quantized Paired Loads</code> and prevent them from triggering the exception that leads to catastrophy.</p>
<p>And now we return to the Disney Trio of Destruction™. In their case, well we don't know exactly, but we believe they are using a <code>Quantized Paired Single Load</code> to load from MMIO (Memory-Mapped Input and Output). MMIO cannot go through fastmem, so that case will always trigger a fastmem exception. And since it was a <code>Quantized Paired Single Load</code>... boom. But thanks to <a href="https://dolphin-emu.org/download/dev/master/5.0-15699/">5.0-15699</a>, this no longer occurred, and we no longer needed to use full MMU emulation to work around it. Once we discovered this, we were able to safely remove the MMU default from the Disney Trio of Destruction™.</p>
<p>Now that <a href="https://wiki.dolphin-emu.org/index.php?title=Toy_Story_3">Toy Story 3</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Cars_2">Cars 2</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=Disney_Infinity">Disney Infinity</a> can run without the extremely performance-intensive full MMU option, what kind of performance improvement will this give us?</p>
<p><br/>
<script>
addChart({"title":{"text":"Cars 2 Performance"},"subtitle":{"text":"Main Menu | 5.0-16350 | AMD Ryzen 5950X | GeForce GTX 1070"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"data":{"csv":"\"null\";\"FPS\"\n\"With Full MMU\";22\n\"Without Full MMU\";22","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"series":[{"name":"Frames Per Second","turboThreshold":0,"marker":{}}],"yAxis":{"max":30,"min":0,"tickLength":10,"tickInterval":5,"title":{"text":""},"labels":{"format":"{value} FPS"}},"legend":{"floating":false,"enabled":false},"pane":{"background":[]},"responsive":{"rules":[]},"xAxis":{"title":{"text":""},"labels":{}},"colors":["#006eff","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"tooltip":{"shared":false},"lang":{},"credits":{"enabled":false}})
</script>
<br/></p>
<p>Absolutely none - these games are bottlenecked by something else. Oh well!</p>
<h4 id="50-16009-memarena-use-memory-placeholders-for-fastmem-on-windows-to-ensure-nothing-allocates-within-the-fastmem-space-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16009/">5.0-16009 - MemArena: Use memory placeholders for fastmem on Windows to ensure nothing allocates within the fastmem space</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-16009-memarena-use-memory-placeholders-for-fastmem-on-windows-to-ensure-nothing-allocates-within-the-fastmem-space-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>This change added a placeholder for our fastmem address region on Windows, making sure that nothing else can allocate memory within our fastmem address region once we've claimed it. This resolves an issue where very large texture packs could crash Dolphin.</p>
<p>It also broke our Windows 7 support.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7error.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7error.png"></a>
<figcaption></figcaption>
</figure>
</div>
<h4 id="50-16035-memarena-restore-windows-7-support-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16035/">5.0-16035 - MemArena: Restore Windows 7 support</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-16035-memarena-restore-windows-7-support-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<div style="margin-left:2em; margin-bottom:1em; min-width:64px; max-width:10%; float:right; text-align:center;"><img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7logo.svg"></div>
<p>The above change works by using the Windows function <code>UnmapViewOfFileEx</code>. In the words of Microsoft, this function "Unmaps a mapped view of a file from the calling process's address space." This allows Dolphin to preserve fastmem against very large texture packs in a fairly elegant way. However, <code>UnmapViewOfFileEx</code> has a minimum supported version of <em>Windows 8</em>. On Windows 7, Dolphin calls for the nonexisting function and Windows, recognizing that it isn't there, panics and crashes Dolphin.</p>
<p><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a> fixed this with <a href="https://dolphin-emu.org/download/dev/master/5.0-16035/">5.0-16035</a>. With this, Dolphin itself now checks whether <code>UnmapViewOfFileEx</code> is present on the Windows system, and will not use it if it fails to detect it. Of course this means that Windows 7 users may still encounter crashes when using very large texture packs, but that's better than Dolphin not working at all. </p>
<h4 id="50-16214-inputcommon-add-windowsgaminginput-to-controllerinterface-by-billiard"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16214/">5.0-16214 - InputCommon: Add Windows.Gaming.Input to ControllerInterface</a></strong> by <strong><a href="https://github.com/jordan-woyak">Billiard</a></strong><a class="headerlink" href="#50-16214-inputcommon-add-windowsgaminginput-to-controllerinterface-by-billiard" title="Permanent link">¶</a></h4>
<p>Long ago, there was DirectInput (DInput). This was Microsoft's original input API for game controllers on Windows, going all the way back to <em>Windows 95</em>. It was/is fairly messy by today's standards, requiring manual mapping of each button individually, but it was/is extremely flexible, able to handle any and all types of game control devices. However, once Microsoft created the Xbox 360, they wanted a way to easily connect a 360 controller to a PC without mapping or other hassle. So Microsoft created a new input API, XInput. While it is much less configurable than DInput, its simplicity allowed game developers to ship mappings for it within the game itself, so user mapping was no longer required.</p>
<p>Microsoft knew that they would want to add features to their controllers with new consoles, so they added a way to expand Xinput’s functionality with <a href="https://docs.microsoft.com/en-us/windows/win32/api/xinput/nf-xinput-xinputgetcapabilities?redirectedfrom=MSDN"><code>XInputGetCapabilities</code></a> (<a href="https://docs.microsoft.com/en-us/windows/win32/api/xinput/nf-xinput-xinputgetcapabilities?redirectedfrom=MSDN">link</a>). This Windows function allowed a controller to report if it had differing functionality than a 360 controller, potentially allowing for future expandability or even “weird” functionality like touchpads or gyros featured on other controllers. However, it turned out that the majority of programs took a bit of a shortcut and ignored non-essential parts of the XInput spec. If a controller used <code>XInputGetCapabilities</code>, it was very unlikely to encounter software that even noticed. This laziness dripped down toward manufacturers, and many controllers began to improperly implement the XInput API because the games they used to test weren’t enforcing it correctly. If one of these flawed controllers was used in a software that actually supported the full, proper XInput spec, the software could crash. <a href="https://dolphin-emu.org/blog/2017/09/02/dolphin-progress-report-july-and-august/#50-5205-ignore-capabilities-reported-by-an-xinput-device-by-toadking">Ask us how we know.</a></p>
<p>When Microsoft created new Xbox controllers, they wanted to support the controller’s new functionality on Windows. Now with a reason to resolve the <code>XInputGetCapabilities</code> nightmare, Microsoft’s devised a solution - make a new input API. Naturally.</p>
<p>The creatively named “Windows.Gaming.Input” (WGI) is the newest input API for Windows. This ambitious new API seeks to combine the best of both DInput and XInput into a single API, with a new input-centric approach that theoretically will give it the flexibility for many different types of input devices while maintaining easy setup and use. However, those new features haven't been implemented yet, and as it stands today it is basically just XInput plus One/Series controller features. And it's still missing esssential features that aren't on their Xbox controllers, like accelerometers and gyros, so currently WGI is just yet another Microsoft input API for Microsoft input devices.</p>
<p>Regardless, Dolphin's need to emulate Wii Remotes and several <em>odd</em> controllers for the GameCube and Wii makes having robust input API support a higher priority for us than most other programs, so supporting Windows.Gaming.Input was a natural choice. Many benefits are immediate, as it supports up to eight simultaneous controllers (up from four with XInput), support for the Xbox One/Series rumble triggers, and has better battery reporting. Basically everything we were hoping <code>XInputGetCapabilities</code> would be. However, if the input-centric WGI future comes to pass, users may be able to use it for all kinds of different input devices. We shall see.</p>
<p>It also broke our Windows 7 support.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7error2.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7error2.png"></a>
<figcaption></figcaption>
</figure>
</div>
<h4 id="50-16236-corewginput-dynamically-load-winrt-function-addresses-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16236/">5.0-16236 - Core/WGInput: Dynamically load winrt function addresses</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-16236-corewginput-dynamically-load-winrt-function-addresses-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<div style="margin-left:2em; margin-bottom:1em; min-width:64px; max-width:10%; float:right; text-align:center;"><img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/windows7logo.svg"></div>
<p><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a> came to rescue Windows 7 once again. Much like the previous Windows 7 fix, this change made Dolphin use <a href="https://docs.microsoft.com/en-us/windows/win32/api/apiquery2/nf-apiquery2-isapisetimplemented"><code>IsApiSetImplemented</code></a> (<a href="https://docs.microsoft.com/en-us/windows/win32/api/apiquery2/nf-apiquery2-isapisetimplemented">link</a>) to check for Windows.Gaming.Input support before trying to use it. With that, Dolphin's Windows 7 support was saved.</p>
<p>...briefly. But that's a story for the next Dolphin Progress Report.</p>
<h4 id="50-16174-fix-opengl-label-identifiers-for-angle-by-iwubcode"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16174/">5.0-16174 - Fix OpenGL Label Identifiers for ANGLE</a></strong> by <strong><a href="https://github.com/iwubcode">iwubcode</a></strong><a class="headerlink" href="#50-16174-fix-opengl-label-identifiers-for-angle-by-iwubcode" title="Permanent link">¶</a></h4>
<div style="margin-left:2em; margin-bottom:1em; min-width:64px; max-width:25%; float:right; text-align:center;"><img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/exynos2200logo.jpg"></div>
<p>This may not sound very interesting, but this was a quick fix necessary to fix Dolphin running under an OpenGLES wrapper called ANGLE. Why exactly?</p>
<p>The story actually started a few months ago, when it was announced that the Exynos 2200 chipset to be used in some models of the Samsung Galaxy S22 would contain AMD's RDNA2 graphics hardware and drivers. This left us very interested. RDNA2 is great hardware, and while AMD's drivers may not be <em>best in class</em>, they are leagues above the horrors we've seen on Android. We were very hopeful!</p>
<p>Now the hardware is out and users have been able to test it. Vulkan performance on the Exynos 2200 is a step above what we've seen on any other phone. It's able to reach full speed in demanding games like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Galaxy">Super Mario Galaxy</a> at up to 2x Internal Resolution <em>without</em> having to disable critical features like EFB Access to CPU. This is notable because GPU readbacks have long been a major bottleneck on mobile devices.</p>
<p>But when we saw OpenGLES on the device, we were taken aback. It's disappointing to say the least. More disappointing than normal AMD OpenGL drivers on Windows. Even more disappointing than <strong>Mali</strong> drivers. That's because there are <strong>no OpenGLES drivers provided for this device</strong>. Instead, it uses a wrapper called <a href="https://github.com/google/angle">ANGLE</a> to <em>translate</em> OpenGLES to Vulkan.</p>
<div class="media-block narrow">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/facepalm.mp4" type="video/mp4"/>
</video></div>
<figcaption>This is how graphics software engineers responded to this news. </sub></figcaption>
</figure>
</div>
<p>ANGLE was designed to translate <strong>WebGL</strong> to other graphics APIs. It was not designed for games, and it is not battle-hardened the way a graphics driver would be. Naturally, there were some <em>growing pains.</em></p>
<p>For us, when the phones first launched Dolphin's OpenGLES backend wasn't even able to run on them due to a minor mistake in Dolphin's OpenGL Label Identifiers. This was a known <em>whoops</em> that <strong><a href="https://github.com/iwubcode">iwubcode</a></strong> found during work on another feature a while ago, but it was so inconsequential that it wasn't a priority to split-off and upstream right away. When given an incorrect Label Identifier, the driver should just return an error saying it is incorrect then continue on. It's harmless. But ANGLE has no validation for this function, so rather than say that the Label is wrong and continue, it hits an <a href="https://en.wikipedia.org/wiki/Unreachable_code">unreachable</a> and <em>explodes</em>. While it may have been a Dolphin mistake that caused this, crashing for such a minor mistake in a harmless debugging feature is <em>absolutely</em> an ANGLE issue.</p>
<p>Once we identified that this was the source of the problem, <strong><a href="https://github.com/iwubcode">iwubcode</a></strong> picked out the Label Identifier fix and we merged it. We never should have needed to fix it, but here we are. With that, the OpenGLES backend now works on the Exynos 2200.</p>
<p>However, because OpenGLES is being translated to Vulkan by ANGLE for this device, performance seems <em>significantly</em> worse than native Vulkan in every recorded instance. If you have an Exynos 2200 device, please do not use the OpenGLES backend on it.</p>
<p><br/>
<script>
addChart({"title":{"text":"Galaxy S22 Exynos 2200 Performance"},"subtitle":{"text":"Super Mario Galaxy Hub Area"},"exporting":{},"chart":{"type":"column"},"series[0]":{"type":"line"},"series":[{"name":"2x Native","turboThreshold":0,"marker":{},"color":"#006eff"},{"name":"3x Native","turboThreshold":0,"marker":{},"color":"#ff3100"},{"name":"Framelimit","turboThreshold":0,"marker":{"enabled":false},"type":"line","dashStyle":"LongDash","dataLabels":{"enabled":false},"ignoreHiddenPoint":true,"intervals":3,"lineWidth":4,"neckWidth":"30%","neckHeight":"25%","showInLegend":true,"allowOverlapX":false,"alternateStartingDirection":false,"allAreas":true,"color":"#00c800"}],"plotOptions":{"series":{"dataLabels":{"enabled":true},"animation":false}},"data":{"csv":"\"null\";\"2x Native\";\"3x Native\";\"Framelimit\"\n\"Vulkan\";60;36;60\n\"OpenGLES (ANGLE)\";41;23;60","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"tickInterval":15,"title":{"text":""},"labels":{"format":"{value} FPS"}},"pane":{"background":[]},"responsive":{"rules":[]},"xAxis":{"title":{},"labels":{}}})
</script>
<br/></p>
<h4 id="50-16301-videocommon-handle-emboss-texgen-with-only-a-single-normal-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16301/">5.0-16301 - VideoCommon: Handle emboss texgen with only a single normal</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-16301-videocommon-handle-emboss-texgen-with-only-a-single-normal-by-pokechu22" title="Permanent link">¶</a></h4>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Category:Rogue_Squadron_(Series)">The Rogue Squadron series</a> is a marvel of game engine programming. There seems to be no end to Factor 5's tricks, as we've talked about <a href="https://dolphin-emu.org/blog/2015/02/01/dolphin-progress-report-january-2015/#40-5279-add-zfreeze-emulation-to-hardware-backends-by-neobrain-phire-and-nanobyte011">over</a> and <a href="https://dolphin-emu.org/blog/2014/10/31/dolphin-progress-report-october-2014/#40-3473-fix-mmu-loadsstores-that-cross-page-boundaries-by-fiora">over</a> and <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14019-fifo-runsync-with-the-gpu-on-command-processor-register-access-by-stenzek">over</a> again. But surely, after all these fixes over the years, we should have everything pretty down pat by now. There's no way there would be a major effect that has <em>never</em> worked in Dolphin before, right? RIIIIGHT?</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sanddolphin-broken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sanddolphin-broken_thumb.jpg" /></a>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowdolphin-broken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowdolphin-broken_thumb.jpg" /></a>
</figure>
</div><center><p>These sand and snow effects looked alright in Dolphin.</p></center>
</div>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sandconsolenohud.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sandconsolenohud_thumb.jpg" /></a>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowconsolenohud.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowconsolenohud_thumb.jpg" /></a>
</figure>
</div>
<center><p>Until you launched the games on console again and saw what they are <em>supposed</em> to look like.</p></center>
</div>
<p>This is an emboss effect Rogue Squadron 2 and 3 are applying to the sand and snow to give them more dimensionality and texture. Specifically, this is a GameCube implementation of DirectX6-era bump mapping. It's an impressive effect for the time, as the lighting on the ridges will shift and match the sun's angle even as the suns dynamically move through the sky. Bump mapping like this wouldn't become common until <em>the next console generation</em>, and here it is <em>in a GameCube launch title</em> from 2001! </p>
<p>However, there was a reason this effect didn't take off until years later. The DirectX9 and newer forms of bump mapping are painless - developers can use them with very little setup and they are very, very cheap to run. Devs don't even need to think about it. But with this older type of bump mapping, developers had to <em>build the effect themselves</em>. And it was not cheap. For something that just adds a bit of visual flare, most GameCube and Wii developers decided it was not worth it and passed it by.</p>
<p>But not Factor 5. This is Factor 5 we're talking about, of course they used it.</p>
<p>To explain how this all works, here is a bump mapping effect that already worked in Dolphin before this change. This X-Wing will be our example.</p>
<div class="media-block full-width">
<div class="swap" ontouchstart>
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/embossdemo-working.jpg" alt="First Image">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/embossdemo-disabled.jpg" class="img-top" alt="Active Image">
</div>
<p style="margin-top: .5em; max-width: 100%; text-align:center;">Click/Tap and hold to disable the X-Wing's bump mapping.</p>
</div>
<p>To build the effect, Factor 5 first needs to have a color map which contains the color of the object itself, then a height map, aka "bump map", which represents the height of the surface as a greyscale image. Cleverly, Factor 5 wasn't going to need the Alpha channel of the X-wing texture, so they used the Alpha as the height map.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingcolormap.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingcolormap_thumb.jpg" /></a>
<figcaption>This is the color map for an X-Wing in Rogue Squadron II.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingheightmap.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingheightmap.png" /></a>
<figcaption>And here's the height map, converted to traditional greyscale. Factor 5 is using bump mapping to add depth to the panels on the X-Wing.</figcaption>
</figure>
</div>
</div>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingtexture.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2X-wingtexture_thumb.jpg"></a>
<figcaption>But this is the actual texture. The "cut out" areas are the Alpha channel which the game is using as its height map.</figcaption>
</figure>
</div>
<p>The process begins with the game writing the light direction into the Tangent and Bi-normal vectors (registers) with each vertex. As opposed to the Normal vector which tracks movement out from a surface, the Tangent and Bi-normal vectors track movement parallel to the surface. If Normal is Z, Tangent and Bi-normal are X and Y, effectively. </p>
<p>From there, the game reads the texture twice, the first time with the base texture coordinates then again with an offset using the light direction values written into the Tangent and Bi-normal vectors earlier. Then it combines this with the height map to apply the bump mapping to the texture, brightening or darkening the texture based on the height differences. This process burns two TEV stages (out of sixteen), so this is not a cheap effect, but that is how you do bump mapping on the GameCube!</p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/embossrecreation.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/embossrecreation.png"></a>
<figcaption>Due to how the effect is built we were not able to dump the final embossed texture. This is a photoshop creation that shows more or less how it would look when applied to the color map.</figcaption>
</figure>
</div>
<p>While this effect is fairly primitive by modern standards, literally just painting the texture, the magic of this effect is that it is tied to the light direction. Thanks to this, the effect does a fantastic job of giving convincing depth to the surface, even in motion!</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2video-bumponly.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2video-bumponly_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Here is the bump mapping in motion, with most other effects and textures removed for clarity. Pay attention to the lines here. After the light moves over it, it flips! It uses the light direction!<br/><sub>Click the video for the high resolution version.</sub></figcaption>
</figure>
</div>
<p>When added to all of the <em>rest</em> of the ahead-of-their-time effects like self-shadowing and reflections, these games look like nothing else.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2video-alleffects.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2video-alleffects_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>This thumbnail does not do this video justice. Please click it for full res.</figcaption>
</figure>
</div>
<p>Now, all that we've covered so far already worked in Dolphin. So why didn't the sand and snow effect appear correctly? Well, the sand and snow are using effectively the same effect, but on these two surfaces <em>the game doesn't supply the Tangent and Bi-normal vectors for the effect.</em> Without them, Dolphin can't know what the offset is, and the effect cannot be rendered. Yet we know this works on console. It was as though Factor 5 used <em>literal</em> magic!</p>
<p>This has annoyed Dolphin developers for years. Factor 5 was clearly getting the offset from <em>something</em>, but try as we might, we couldn't find it. <a href="https://github.com/Sonicadvance1">Sonicadvance1</a> years ago made a guess that it was using default values, and it even passed a hardware test, but further analysis proved this to be incorrect. <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> more recently tried to hardcode some values that looked correct for RS2, but they ended up being very wrong for RS3. No matter what we threw at it, we just couldn't figure it out.</p>
<p>In the end, we didn't - we were told how it was done by Factor 5 themselves when we discovered a <a href="https://www.gamedeveloper.com/programming/shader-integration-merging-shading-technologies-on-the-nintendo-gamecube">2002 article written by a Factor 5 employee</a>.</p>
<p><br/>
<blockquote>A trick that is worth mentioning is how to avoid sending the same bi-normals and tangents for emboss mapping repeatedly to the transform unit (XF) of the graphics processor. It turns out that if these vectors are not present in the vertex format, XF will provide the previously transformed bi-normal and tangent, which reside in internal registers. Thus, if a dummy triangle is drawn with the bi-normal and tangent immediately before the landscape is drawn, then there is no need to send the same vectors over again for the rest of the height-map triangles. This means that only one vertex format is needed for the entire landscape, and it saves memory, transfer bandwidth and most importantly transform performance.</blockquote>
<br/></p>
<p>Basically, the sand and snow are the <strong>exact</strong> same effect as the bump mapping effects that were already working elsewhere in the <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Rogue_Squadron_(Series)">Rogue Squadron games</a>. However, the sand and snow have a performance optimization where the Tangent/Bi-normal vectors are written at the start of the terrain's construction, and all the subsequent steps (including the bump mapping) reuse the stale data in the vectors.</p>
<p>After discovering this, we weren't really all that surprised. We had considered this as one of the many possibilities. However, it was very difficult for us to test due to how Dolphin JITs the vertex loader - it was not designed to preserve the vectors and it would not be easy to make it do so. Due to the difficulty, we never tried it. But once we knew for sure that this is what they did, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> did some hardware testing and confirmed it, then stepped in to make the vertex loader able to preserve stale data in the vectors.</p>
<p>And with that, the sand and snow bump mapping effect works in Dolphin! </p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sanddolphin-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS2sanddolphin-working_thumb.jpg" /></a>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowdolphin-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RS3snowdolphin-working_thumb.jpg" /></a>
</figure>
</div><center><p>At long last, Dolphin now properly supports this effect!</p></center>
</div>
<p>Now before we move on, we wanted to share one final thing. While working on this, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> wanted to confirm that the bump mapping on the sand and snow reacted to the light direction, so they set up a time lapse on console by spinning around in circles and taking captures at regular intervals while the suns set. It ended up not being very useful as the stage runs out of time before the light moves enough to confirm it for sure, but <em>it looked awesome</em>. So <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> rerecorded a nicer version in Dolphin for us to share in this Report.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RogueSquadron2-Sunset.mp4">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/RogueSquadron2-Sunsetteaser.jpg"></a>
<figcaption>There will be no hyper compressed thumbnail video for this one. Click the image above to see the timelapse! Humming a certain Star Wars theme is optional.</figcaption>
</figure>
</div>
<h4 id="50-16337-macos-work-around-earlyz-bug-on-apple-silicon-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16337/">5.0-16337 - macOS: Work Around EarlyZ Bug on Apple Silicon</a></strong> by <strong><a href="https://github.com/Oatmealdome">OatmealDome</a></strong><a class="headerlink" href="#50-16337-macos-work-around-earlyz-bug-on-apple-silicon-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>Apple silicon has proven to have an impressive capability at running Dolphin and has charmed the Dolphin developers. But there have been a few bumps here and there. One problem was that a lot of games were having a lot of darkness and strange flickering during some special effects. This ranges from platformers like <a href="https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine">Super Mario Sunshine</a> to top-down shooters like <a href="https://wiki.dolphin-emu.org/index.php?title=Ikaruga">Ikaruga</a>.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/ikarugamacos-broken.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/ikarugamacos-broken_thumb.jpg"></a>
<figcaption>Ikaruga was barely recognizable on Apple silicon.</figcaption>
</figure>
</div>
<p>The issue was tracked down by <strong><a href="https://github.com/Oatmealdome">OatmealDome</a></strong> and they found that there was a nasty bug in the Apple driver when using <code>discard</code> while Early Z testing was enabled. Their solution was to simply <em>emulate</em> <code>discard</code> using a framebuffer fetch. This let Dolphin do things correctly while avoiding the broken codepath on the driver. This <em>could</em> result in a slight performance decrease on Apple Silicon, but so far we haven't recorded any noticeable differences.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/ikarugamacos-working.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/ikarugamacos-working_thumb.jpg"></a>
<figcaption>Now that's more like it.</figcaption>
</figure>
</div>
<h4 id="50-16348-rework-scissor-handling-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16348/">5.0-16348 - Rework scissor handling</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-16348-rework-scissor-handling-by-pokechu22" title="Permanent link">¶</a></h4>
<p>This is the second scissor change made to Dolphin in recent years, after the <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14041-scissor-offset-fix-for-super-mario-galaxy-roar-effects-by-ezio1900">Mario Galaxy roar</a> was discovered to use a negative scissor offset. Dolphin developers assumed that meant that the scissor offset could be negative and that was the end of the story. After all, if something else was wrong, wouldn't there be more examples of games having issues?</p>
<p>Well, there was one, we just didn't know it yet. This is the curious case of <a href="https://wiki.dolphin-emu.org/index.php?title=Major_Minor%27s_Majestic_March">Major Minor's Majestic March</a>, a game that barely rendered anything in Dolphin and for the past half decade, no one had much of an idea of why.</p>
<div class="media-block full-width">
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-broken.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-broken_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>What's all this? It's just white.</figcaption>
</figure>
<figure class="col-sm-6">
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-working.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-working_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Wait <em>this is gameplay.</em></figcaption>
</figure>
</div>
<p>As we've already spoiled thanks to <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> being the change author, we now know <em>way</em> too much about how <a href="https://wiki.dolphin-emu.org/index.php?title=Major_Minor%27s_Majestic_March">Major Minor's Majestic March</a> works and the behaviors it relies on. Let's get technical. And please take notes, as there will be a test at the end.</p>
<hr />
<p>The viewport, the scissor, and the scissor offset are all used to change where things end up on screen. Modern graphics APIs have both a viewport and a scissor, but don't have a direct equivalent to the scissor offset. Let's break down how each of these things work together.</p>
<p><strong>The Viewport</strong> is used to scale vertices into screen coordinates. It uses floating-point numbers, so it doesn't necessarily need to be aligned to a pixel grid, though in practice it is most of the time. This is mostly used to set the size of the rendering canvas.</p>
<p><strong>The Scissor</strong> is used to indicate which pixels get rasterized - pixels that are within the scissor region are drawn to and pixels that are not in that region are ignored. It usually is set to cover the whole screen with values that match the viewport, but can be set to a smaller value to create picture-in-picture style effects. There are 12 bits of space per coordinate, capable of representing a value from 0 to 4095, but testing found that the 12th bit is ignored, allowing only values from 0 to 2047. In Dolphin, it remains aligned to 1x IR pixel boundaries at higher internal resolutions in order to prevent issues.</p>
<p><strong>Scissor Offset</strong> is used to shift pixels <em>after</em> they've been rasterized but before they're written into the Embedded Frame Buffer (EFB). It operates on Pixel Quads, much like our good friend <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14257-bounding-box-account-for-pixel-quads-by-techjar">bounding box</a>, and it has 10 bits of space each for the x and y offsets, which could hypothetically represent a value from 0 to 1023 pixels directly, but instead is multiplied by 2 (to operate on pixel quads). Only 9 bits would be needed to represent a value from 0 to 1022, so the previous change assumed the 10th bit indicated negative numbers. This value is multiplied by 2, so to represent a value from 0-1022 only 9 bits are used, leaving the 10th bit unused. The EFB is 640 by 528 at most, and the largest size a texture can be is 1024 by 1024, so wrapping at 1024 isn't <em>that</em> strange.</p>
<p>All of this so far makes sense, but what follows doesn't. It turns out that much more space is provided than that, which can result in a triangle <em>drawing over itself</em> in a large enough viewport. We don't know of any games that do this, but it's apparently possible with fringe configurations. If you care about all of the hardware testing and strange behaviors, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> documented the <a href="https://gist.github.com/Pokechu22/5f83afb548bef8d75d3575d1c02bd518">details of their hardware tests in <em>copious</em> detail.</a></p>
<p>In the case of <a href="https://wiki.dolphin-emu.org/index.php?title=Major_Minor%27s_Majestic_March">Major Minor's Majestic March</a> they add a 1024 scissor offset to most of their graphics, which resulted in it <em>rendering off screen</em> in Dolphin. If you were paying attention in the lecture above, you'd already know that an offset of 1024 doesn't actually do anything in practice because it <em>wraps</em>! By reworking Scissor Handling to be more correct, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> fixed this issue to make the game finally playable in Dolphin.</p>
<div class="media-block full-width">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-working.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/scissorhandling-working_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Marching is a lot easier when you can see.</figcaption>
</figure>
</div>
<p>The fix for Dolphin's Hardware Backends is a bit simplified and doesn't handle certain cases, like a game using an offset to have the same thing render multiple times. This does mean there are some minor cases of graphics disappearing early during certain transitions in <a href="https://wiki.dolphin-emu.org/index.php?title=Major_Minor%27s_Majestic_March">Major Minor's Majestic March</a> and can be observed on the left side of the screen in the demonstration above. Note that this is seen because <a href="https://wiki.dolphin-emu.org/index.php?title=Major_Minor%27s_Majestic_March">Major Minor's Majestic March</a>, on top of the aforementioned initial offset, also uses scissor offset to scroll the screen for transitions! If you want to see these scrolls and the duplicated graphics shown correctly, you'll need to use Dolphin's software renderer.</p>
<p>As an added bonus, these changes also fix a minor issue in <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Golf:_Toadstool_Tour">Mario Golf: Toadstool Tour</a> in which a picture-in-picture effect used for the <em>Hazard</em> placard would render slightly bigger than it should. This was rarely noticed because the issue was seemingly random, and the viewport itself wasn't affected. </p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong-broken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong-broken_thumb.jpg" /></a>
<figcaption>Sometimes the hazard screen would show up with a bit of garbage on the the right side.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong-working_thumb.jpg" /></a>
<figcaption>This is how it would normally display</figcaption>
</figure>
</div>
</div>
<p>With some hackery, here's what Dolphin thought the game was trying to do.</p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/mariogolfloooong_thumb.jpg"></a>
<figcaption>Now that's widescreen.</figcaption>
</figure>
</div>
<h4 id="50-16260-round-viewport-coordinates-when-using-vertex-rounding-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-16260/">5.0-16260 - Round Viewport Coordinates when using Vertex Rounding</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-16260-round-viewport-coordinates-when-using-vertex-rounding-by-pokechu22" title="Permanent link">¶</a></h4>
<p>This is tangentially related to all of the viewport and scissor shenanigans we detailed above, but instead this is a <em>hack</em> to help games render correctly at higher resolutions. In this case, we're targeting <a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Sports_Resort">Wii Sports Resort</a>. At higher resolutions, an annoying blue line would appear in the Archery Minigame.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/archeryline-broken.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/archeryline-broken_thumb.jpg"></a>
<figcaption>The cyan line here gets increasingly worse at high resolutions.</figcaption>
</figure>
</div>
<p>The issue is that the game is trying to reset depth on part of the screen by drawing a rectangle over it, and then clearing the color of the region using an EFB copy. Unfortunately, the coordinates stop matching up at higher resolutions because the game has the x coordinate of the viewport centered at 478.266. These decimals don't result in any problems with the low resolution of the console, but at higher resolutions this strange inaccuracy becomes increasingly noticeable.</p>
<p><strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> stumbled upon this and decided that it <em>should</em> be possible to fix similar to other high IR bugs by rounding viewport coordinates at higher resolutions. They tried it out and...</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/archeryline-working.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/archeryline-working_thumb.jpg"></a>
<figcaption>No more line!</figcaption>
</figure>
</div>
<p>It turns out that rounding the coordinates off so that they match up again <em>does</em> work, and the solution was presented. Because this is such an edge-case of an edge-case, it was decided not to make Viewport Rounding a new option, but instead it was rolled into the already existing <em>Vertex Rounding</em> which is used for similar looking issues.</p>
<p>If there are any games that need Vertex Rounding that break because of this change, the two options will be split apart, but from our testing this appears to be fairly unlikely.</p>
<h3 id="porpoise-on-deck"><strong>Porpoise on Deck</strong><a class="headerlink" href="#porpoise-on-deck" title="Permanent link">¶</a></h3>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/steamdecknotheader.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-april/steamdecknotheader.jpg"></a>
<figcaption></figcaption>
</figure>
</div>
<p>Between Progress Reports we saw the arrival of the long awaited Steam Deck, a portable x86-based gaming PC/console hybrid from Valve. <a href="https://twitter.com/Dolphin_Emu/status/1494682332212596741">And you know we have one!</a> So how does the Steam Deck handle some very challenging Dolphin workloads?</p>
<p><br/>
<script>
addChart({"title":{"text":"Steam Deck Performance Test"},"subtitle":{"text":"Vulkan, 2x Native, Dual Core | Averages of Specific Scenes"},"exporting":{},"chart":{"type":"column","polar":false,"height":null,"width":null},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"series":[{"name":"VPS","turboThreshold":0}],"data":{"csv":"\"null\";\"VPS\"\n\"Melee Fountain of Dreams All Ice Climbers\";98\n\"Brawl New Pork City All Ice Climbers\";88\n\"Metroid Prime 3 Elysia\";58\n\"Skyward Sword Skyloft (30fps title)\";29\n\"Rogue Squadron II Hoth\";58","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":"Frames Per Second (FPS)"},"tickInterval":30,"minorTickInterval":10,"startOnTick":false,"endOnTick":false,"labels":{}},"legend":{"enabled":false},"xAxis":{"title":{"text":""},"id":"VPS","labels":{}},"pane":{"background":[]},"responsive":{"rules":[]},"labels":{"items":[{}]},"colors":["#006eff","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]})
</script>
<br/></p>
<p>These are absolutely torturous scenes that we are putting the Steam Deck through, and it's handling them very well. These results easily beat high end Coffee Lake ultrabooks from just a few years ago! We are confident that the majority of titles can run at fullspeed on the Steam Deck.</p>
<p>However, we have noticed that there is a lot of confusion about optimizing Dolphin on the Steam Deck. Here are a few things to keep in mind.</p>
<p>Building Dolphin with our <a href="https://dolphin-emu.org/docs/guides/building-dolphin-linux/">Building Dolphin for Linux</a> guide does not work on the Deck due to its immutable root directory. Fortunately, in desktop mode the deck has an app store called "Discover" which distributes flatpaks from flathub, and it has Dolphin's latest "Beta" build ready for installation. This is our recommended way to install Dolphin onto the Steam Deck. We're working on a better solution, but for now this is the best method available. If you need any help with this process feel free to ask on our <a href="https://forums.dolphin-emu.org/">forums</a>.</p>
<p>To preserve its battery as much as possible, the Steam Deck lowers the clockspeed of the CPU or GPU any chance it can. However, we're a bit unusual, and the Deck may guess incorrectly and take megahertz away from the CPU that we so desperately need. This is particularly present in readback heavy titles that use EFB Access or Store EFB to Texture and Ram. So when optimizing Dolphin on the Deck, be sure to use MangoHud to keep an eye on the CPU clockspeed. If you are below fullspeed and see MangoHud showing a CPU clock in the 2000-2500mhz range, you should make some adjustments - in our testing adjusting Dolphin's Internal Resolution and the Steam Deck's GPU Clocks help most. What you want to see is CPU clocks in the 3000-3400mhz range; then you know all of the Deck's CPU power is available to you. </p>
<p>The Steam Deck doesn't <em>just</em> support Vulkan, it supports OpenGL too. And sometimes, OpenGL can actually be faster than Vulkan! In the <a href="https://wiki.dolphin-emu.org/index.php?title=The_Legend_of_Zelda:_Skyward_Sword">Skyward Sword</a> test above, Vulkan tried desperately but couldn't quite reach fullspeed, while OpenGL ran right past it to around 38fps. So when running games on the Deck, be sure to give OpenGL a try.</p>
<p>And that's all for now. We have a lot more tips on the Steam Deck. In fact we even had a setup guide partially completed! However SteamOS is changing so fast that half of it was invalid within a month, so we decided to just cover the important tips. If you need help configuring Dolphin on your Steam Deck, please ask us on our <a href="https://forums.dolphin-emu.org/">forums</a>.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2022-02-01&to=2022-05-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-15995/">5.0-15995</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-16380/">5.0-16380</a>!</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
<p><style>
.swap {
position: relative;
display: inline-block;
}
.swap .img-top {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99;
}
.swap:active .img-top {
display: inline;
}
</style></p>
Dolphin Progress Report: November and December 2021, January 2022
2022-02-08T12:04:47+00:002022-05-01T04:08:58.103129+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2022/02/08/dolphin-progress-report-nov-and-dec-2021-jan-2022/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/progressreportheader-nov2021.jpg" />
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/progressreportheader-nov2021mini.jpg" />
</header>
<p>This year, we've hit an important milestone that's been in the works for nearly a decade. In late 2012, <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> began work on Dolphin's ARM JIT. Back then, there weren't any devices that had even a sliver of hope of running Dolphin close to full speed, but that wasn't really the goal. All he wanted to do was see if it could be done; it sounded like a fun, challenging project. However, as time passed the idea turned into more than just a passing curiosity. Users were more than happy to donate to cover the hardware cost of staying on the bleeding edge of a <em>rapidly</em> evolving ecosystem, allowing ARM development to flourish. By 2015, <strong><a href="https://github.com/Sonicadvance1">Sonicadvance1</a></strong> astounded developers and the community alike with footage of <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart:_Double_Dash%E2%80%BC">Mario Kart: Double Dash!!</a>'s time trial mode running close to full speed.</p>
<div class="media-block wide">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/-68fDxQAFfk" allowfullscreen></iframe></div>
<figcaption>We've come a long way.</figcaption>
</figure>
</div>
<p>On that note, we're happy to announce that Dolphin's AArch64 JIT has finally reached feature parity with Dolphin's x86-64 JIT. This means that every PowerPC instruction that the x86-64 JIT supports along with every major JIT feature are now supported in the AArch64 JIT! And this is a great time for ARM in general, with each generation of processor pushing the boundaries and companies like Apple adopting the architecture for larger and higher power devices like their M1 Mac line. For those on mobile phones and tablets, Adreno powered devices provide <em>decent</em> enough graphics drivers to get a reasonable experience at this point. And with a critical bottleneck getting fixed just days ago, performance on Adreno GPUs has skyrocketed. You won't have to scroll far for that news, we promise.</p>
<p>But that's only the tip of the iceberg; we've had three months worth of changes pile up and some other important infrastructure news. We've improved the user experience on macOS significantly and restored support for older devices. In fact, enough has happened that we'll be detailing the status of Dolphin's macOS support near the end of the report. </p>
<p>And... we haven't even talked about any emulation fixes yet. The past three months have had tons of changes that would have normally been the highlight of a Progress Report. The three month gap between reports <em>was not</em> because of a lack of changes. Want to take Riivolution games on netplay? You can. Hate the EA VP6 bugs? Make them a thing of the past with a new option. Wish your favorite LogicOp game worked on GLES or MoltenVK? Odds are, it does now! The list goes on, but outlining everything would take way too long, so let's just dive in. Please enjoy the November, December, and January Progress Report!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-15952-disable-primitive-restart-on-adreno-by-the-dolphin-android-users"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15952/">5.0-15952 - Disable Primitive Restart on Adreno</a></strong> by The Dolphin Android Users<a class="headerlink" href="#50-15952-disable-primitive-restart-on-adreno-by-the-dolphin-android-users" title="Permanent link">¶</a></h4>
<p>As stated in the title of this change, credit for this discovery can't go to any single developer or tester. This change happened because of the greater Android community that spends <em>way</em> too much time trying to get the very most out of their mobile devices. Over the past four years, Dolphin has gotten a lot of optimizations, fixes, and tons of quality of life features. Yet, despite everything a lot of users would swear by old forks and some have taken up the mantle of trying to retrofit them with modern features. Why go through all of that effort? Performance! </p>
<p>Unfortunately, these forks are often just personal endeavors with messy histories, sometimes incoherent changelogs, and some of them don't provide the source code at all (<a href="https://github.com/dolphin-emu/dolphin/blob/master/LICENSES/GPL-2.0-or-later.txt">which is illegal, don't do that</a>). Some users swear by these forks, and we could never know why because there isn't a good way to see how they are different. Yet one thing was for sure: numbers didn't lie, and users said that these old forks allowed their GPUs to run at much higher resolutions than the latest builds, even if it meant losing out on game compatibility and some CPU optimizations. No matter what we did, we couldn't bridge the gap, at least on the Snapdragon line of devices.</p>
<p>And now we know why.</p>
<p>Near the end of January, <a href="https://github.com/Gamer64ytb">Gamer64ytb</a> reported that the difference had finally been found. One of the changes in the old fork was removing an optimization called "Primitive Restart." In fact, the original creator of that fork, <strong><a href="https://github.com/weihuoya">weihouya</a></strong>, tried to upstream this change to master, but their inexperience with contributing to Open Source projects, and a language barrier, left us with a <a href="https://github.com/dolphin-emu/dolphin/pull/7397">rather messy change</a> that had no reported benefits, it was simply because they didn't like the additional complexity Primitive Restart created. Testing of the time didn't reveal any conclusive benefits, yet it caused issues with Vulkan on Android, so Dolphin's developers declined to merge the change. However <strong><a href="https://github.com/weihuoya">weihouya</a></strong> pushed it into their fork anyway and fixed Vulkan separately. And that is what set this all into motion.</p>
<p><br/></p>
<blockquote>
<p>Primitive restart functionality allows you to tell OpenGL that a particular index value means, not to source a vertex at that index, but to begin a new Primitive of the same type with the next vertex</p>
</blockquote>
<p><br/></p>
<p>On the surface, Primitive Restart should be a safe performance benefit. It allows Dolphin to reduce draw calls by merging primitives together. In fact, some GameCube/Wii games natively use Primitive Restart! Unfortunately, Primitive Restart being faster requires the GPU driver to handle things efficiently, and in the case of Adreno that simply was not happening. In fact, it had such a huge overhead, that it became the single biggest bottleneck while using the driver. And profiling the Adreno driver isn't all that simple, so we didn't have a very good way to even see that this was a problem. It was only after <a href="https://github.com/Gamer64ytb">Gamer64ytb</a> reached out to us about this discovery that we were able to go through and analyze things for ourselves.</p>
<p><br/>
<script>
addChart({"title":{"text":"Adreno Primitive Restart Comparison"},"subtitle":{"text":"Need for Speed Carbon (GC) Starting Line, Snapdragon 855 (Asus Zenfone 6)"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"series":[{"name":"Primitive Restart","turboThreshold":0},{"name":"No Primitive Restart","turboThreshold":0}],"data":{"csv":"\"null\";\"Primitive Restart\";\"No Primitive Restart\"\n\"OpenGL 1x Native\";52.5;57\n\"OpenGL 2x Native\";40;47\n\"OpenGL 3x Native\";19;41.5\n\"OpenGL 4x Native\";11.5;27\n\"Vulkan 1x Native\";52;51.5\n\"Vulkan 2x Native\";38.5;51.5\n\"Vulkan 3x Native\";21.5;40.5\n\"Vulkan 4x Native\";12;26.5","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"legend":{"layout":"horizontal","shadow":false,"squareSymbol":true,"itemDistance":50,"floating":false},"pane":{"background":[]},"responsive":{"rules":[]},"colors":["#ff2b00","#1a62ff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"tooltip":{"valueSuffix":"FPS"},"yAxis":{"title":{"text":""},"labels":{"format":"{value}FPS"},"tickInterval":15},"xAxis":{"title":{},"labels":{}}})
</script>
<br/></p>
<p>The chart paints a very clear picture. This is one of the biggest across-the-board performance boosts we've seen in a very long time. This affects all supported Adreno devices, and should speed up Dolphin in any GPU limited situation. On mobile, this is <em>most</em> games, especially beyond 1x internal resolution. According to users and our personal tests, sometimes you'll see games that were lagging at 2x Internal Resolution now able to run at 4x Internal Resolution full speed! If you have an Adreno device and haven't tried Dolphin in a while, now's your chance. You might be pretty happy with the increased performance, along with all of the other changes that have brought compatibility roughly in line with that of desktop versions of Dolphin.</p>
<p>Unfortunately, disabling Primitive Restart is not a magic bullet for literally everything. Low-end Adreno devices with extremely weak CPUs aren't going to see a huge benefit. If you're not able to run a game at native resolution, odds are this won't help you. As well, Mali and Mediatek gain no benefit from disabling Primitive Restart. And on the Desktop side of things, as expected using Primitive Restart is slightly faster on NVIDIA devices and was already disabled on some AMD drivers and backends. This change and the performance implications only affect Adreno/Snapdragon devices. It's just that Adreno/Snapdragon devices also make up some of the best mobile devices that you can run Dolphin on currently.</p>
<h4 id="50-15538-mmu-support-for-aarch64-jit-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15538/">5.0-15538 - MMU Support for AArch64 JIT</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15538-mmu-support-for-aarch64-jit-by-josjuice" title="Permanent link">¶</a></h4>
<p>Dolphin's AArch64 JIT has been highly capable the last few years, but as we've repeatedly noted, there were a few features missing here and there that caused it to be slower in certain titles. The biggest of those was the lack of MMU support.</p>
<div style="margin-left:2em; margin-bottom:1em; min-width:120px; max-width:35%; float:right; text-align:center;"><a href="https://dolphin-emu.org/m/user/blog/finalgcgame/gekko.jpg"><img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/finalgcgame/gekko_thumb.jpg"></a><p>The MMU is a part of the GameCube's CPU. <sub><a href="https://commons.wikimedia.org/wiki/File:Ic-photo-IBM--PPCDBK-EFB486X3--(Gamecube-CPU).jpg">Credit: Wikimedia user ZyMOS / CC by-SA 4.0</a></sub></div>
<p>On the GameCube and Wii, rather than directly accessing available RAM, games interface with virtual memory which is then translated to physical memory by the Memory Management Unit (MMU). The MMU is programmable and gives games a wide array of options for manipulating virtual memory. Fortunately, to our benefit, most games didn't bother to take advantage of that feature and just used the default memory mappings of the MMU. As such, for the vast majority of games Dolphin can just directly translate the virtual memory to host memory, which is simple and speedy. However, a few impressive games did decide to go beyond the default mappings and write their own custom exception handlers to allow themselves to move things around in memory wherever they wanted. <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars:_The_Clone_Wars">Star Wars: The Clone Wars</a> even <a href="https://dolphin-emu.org/blog/2016/09/06/booting-the-final-gc-game/">changed the Block Address Translations mid-game</a>! Any game that takes advantage of the MMU requires Dolphin to slow down and pay attention so it can emulate all of these behaviors, creating a significant bottleneck on CPU emulation. While it will never be cheap, Dolphin's x86-64 JIT does everything it can to make this as fast as possible.</p>
<p>The AArch64 JIT completely lacked MMU support, forcing all of these instructions to be run through the interpreter instead. This meant that one of our most intensive emulation tasks was being run through our compatibility-focused interpreter, on power limited hardware! For games like <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_II:_Rogue_Leader">Rogue Squadron 2</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_III:_Rebel_Strike">Rogue Squadron 3</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=Spider-Man_2">Spider-Man 2</a> to ever approach fullspeed on AArch64 devices, MMU supported needed to be implemented in the AArch64 JIT. This change essentially proves that, with huge performance gains across all MMU titles. Now that dream of running some of these games full speed on your favorite ARM devices isn't so far-fetched.</p>
<p><br/>
<script>
addChart({"title":{"text":"AArch64 MMU Performance Comparison"},"subtitle":{"text":" M1 Max (32 GPU Core) MacBook Pro 14in, Vulkan"},"exporting":{},"chart":{"type":"column","polar":false},"plotOptions":{"series":{"dataLabels":{"enabled":true}}},"series":[{"name":"Before (5.0-15445)","turboThreshold":0},{"name":"After (5.0-15940)","turboThreshold":0}],"data":{"csv":"\"null\";\"Before (5.0-15445)\";\"After (5.0-15940)\"\n\"Rogue Leader Intro\";22;66\n\"Rogue Leader Hoth\";27;64\n\"Rebel Strike Intro\";29;42\n\"Ultimate Spiderman Rhino Stomps (30fps Title)\";17;42","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":""},"labels":{"format":"{value}FPS"},"max":75,"tickInterval":15},"colors":["#ff2b00","#1a62ff","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"xAxis":{},"pane":{"background":[]},"responsive":{"rules":[]},"tooltip":{"borderWidth":2,"borderRadius":4,"followPointer":true,"shared":false,"split":false,"valueSuffix":"FPS"},"credits":{"text":"dolphin-emu.org","href":"dolphin-emu.org"},"legend":{}})
</script>
<br/></p>
<p>Note that this is an M1 Max, the most powerful AArch64 device on the market, and even it can't run <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_III:_Rebel_Strike">Rogue Squadron 3</a> at full speed. This is because MMU titles are still much more demanding in general, and that particular game does everything that's hard to emulate. Still, all MMU games perform better and <em>normal</em> MMU titles may even be able to run full speed on high-end AArch64 devices.</p>
<h4 id="50-15524-aarch64-support-for-codegen-space-reuse-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15524/">5.0-15524 - AArch64 Support for Codegen Space Reuse</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15524-aarch64-support-for-codegen-space-reuse-by-josjuice" title="Permanent link">¶</a></h4>
<p>If your raw performance is fine, the next thing most users want is for things to run as smoothly as possible. And that's where <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#50-12575-jit-codegen-space-reuse-by-admiralcurtiss">Codegen Space Reuse</a> comes in. By marking spaces of invalidated code as reuseable, Dolphin can minimize costly JIT cache flushes and keep your game running smoothly, even when it's generating dynamic code. This feature has been present in Dolphin's x86-64 JIT for <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#50-12575-jit-codegen-space-reuse-by-admiralcurtiss">over a year</a>, but now <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> has ported the feature over to the AArch64 JIT.</p>
<p>Overall, this is a <em>targeted</em> optimization that only targets certain games. Probably the most popular game that used to suffer from this issue was <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_(GC)">Metroid Prime</a> and the other games on that engine. Nintendo 64 Virtual Console games have their very own JIT, so they generate <em>tons of code</em> and would hitch constantly before as the cache would get flushed once or twice every five minutes, but now will only require cache flushes every thirty minutes or so on average. And of course, we can't forget the memory management nightmare that is <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> which used to do... this...</p>
<div class="media-block wide">
<figure>
<div class="embed-responsive embed-responsive-4by3">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2020-january/truecrimestutters.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2020-august/truecrimestutters_thumb2.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>People did not follow our advice when we said not to play the GameCube version of this game. We're looking at you, Vinny.</figcaption>
</figure>
</div>
<p>These issues are entirely resolved in most cases, and greatly reduced in the most extreme cases with Codegen Space Reuse. In most of the library, you should never see a JIT Cache Flush under normal play. </p>
<p>As a small aside, shortly after this feature was merged, users reported severe performance issues in a few select games, including <a href="https://wiki.dolphin-emu.org/index.php?title=Harry_Potter_and_the_Prisoner_of_Azkaban">Harry Potter and the Prisoner of Azkaban</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=F1_2002">F1 2002</a>. This was due to some minor JIT implementation differences between the x86-64 JIT and the AArch64 JIT, and were quickly rectified <a href="https://dolphin-emu.org/download/dev/80ccb209310b832b57f4fc18cf561ece5c37af4f/">by modifying the AArch64 JIT cache</a> to take into account some differences in how certain instructions are handled.</p>
<h4 id="50-15484-also-use-copy-filter-for-efb-copies-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15484/">5.0-15484 - Also Use Copy Filter for EFB Copies</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-15484-also-use-copy-filter-for-efb-copies-by-pokechu22" title="Permanent link">¶</a></h4>
<p>The EA Sports Active games were EA's response to the <a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Fit">Wii Fit</a>ness game craze. Despite having other franchises on the Wii such as <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Madden_(Series)">Madden NFL</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Category:FIFA_(Series)">FIFA</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Need_for_Speed_(Series)">Need For Speed</a> and many, many others... according to <a href="https://en.wikipedia.org/wiki/EA_Sports_Active">Wikipedia</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> is EA's top selling Wii game. Seriously. It was so popular that they made <em>four</em> EA Sports Active titles, including one that leveraged their NFL license.</p>
<p>Despite seeming like nothing more than simple exercise games, users trying to run the original <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> in Dolphin would find that things weren't exactly looking like they remembered.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eapink.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eapink_thumb.jpg"></a>
<figcaption>Believe it or not, this is a bug. We know it's hard to tell, but trust us.</figcaption>
</figure>
</div>
<p><a href="https://bugs.dolphin-emu.org/issues/6714">This bug was reported in 2013</a>, but was accidentally swept under the rug because <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active:_More_Workouts">EA Sports Active: More Workouts</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active_2">EA Sports Active 2</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active:_NFL_Training_Camp">EA Sports Active: NFL Training Camp</a> didn't suffer from this issue and their naming scheme was less than clear. Because of that, it was mistakenly marked as a duplicate of the more typical <a href="#50-15515-support-for-manually-handling-texture-wrapping-and-sampling-by-pokechu22">"VP6" video bug</a> when there was actually a unique issue present only in the original game! </p>
<p>To what has seemingly become <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong>'s specialty, they decided to investigate this bug in almost too much detail. If you care about exactly what was going on, what the developers were likely thinking, and exactly how the game renders, check out <a href="https://gist.github.com/Pokechu22/49455f9094ed0ff017da64e3f7aa0404">Pokechu22's writeup</a>. For now, we'll just go into the basics.</p>
<p>This game uses the GameCube and Wii hardware feature "Copy Filter". While copying a rendered frame from the Embedded Frame Buffer (EFB) to main memory, the hardware can <em>for free</em> do some very basic effects to each line of the image. This can be used to blur the image slightly, such as the "Deflicker" filters in the <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Super_Smash_Bros._(Series)">Super Smash Bros. series</a>, or to brighten/darken the image, as used in fade-out transitions in <a href="https://wiki.dolphin-emu.org/index.php?title=Star_Wars_Rogue_Squadron_II:_Rogue_Leader">Rogue Squadron 2</a> or gamma adjustments in <a href="https://wiki.dolphin-emu.org/index.php?title=Metroid_Prime_(GC)">Metroid Prime</a>. This is a non-programmable hardware feature, so after <a href="https://ast.dolphin-emu.org/blog/2018/06/03/dolphin-progress-report-april-and-may-2018/#50-7151-implement-copy-filter-deflickerbrightness-by-stenzek">we implemented it a few years ago</a>, we were confident that we had seen the last of Copy Filter related issues. However, we made a bit of an assumption that would come to bite us later.</p>
<p>With <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a>, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> discovered yet another clever use of the Copy Filter - Color Filtering! Thanks to their research, we can actually get a look at what the game looks like before and <em>after</em> the Copy Filter... filtering.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactiveunfiltered.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactiveunfiltered_thumb.jpg" /></a>
<figcaption>The base colors look a little washed out.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivefiltered.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivefiltered_thumb.jpg" /></a>
<figcaption>After filtering, the game does look a little bit nicer.</figcaption>
</figure>
</div></div>
<p>So how was <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> actually accomplishing this and what exactly were they doing? The game was making two different EFB copies for each frame. The first copy is configured to take the red and green channels of the image, and then the second copy takes the blue channel and uses the Copy Filter to take 1/16th the value of the current line. By separating the values out like this, the game is able to do some custom color/alpha blending to create more contrasty scenes with crisper colors.</p>
<p>When implementing the Copy Filter, we noticed that every known use of the Copy Filter was being done exclusively to <a href="https://dolphin-emu.org/blog/2017/11/19/hybridxfb/#rendering-frames-on-the-gamecube-and-wii">XFB Copies, a special type of EFB Copy where the frame is moved to a specific region of Main Memory designated for scanout</a>. So we assumed that copy filter effects could only be used for XFB Copies, and <em>excluded standard EFB Copies from the Copy Filter entirely</em>. <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> proved us wrong. By merely allowing EFB Copies to go through the Copy Filter, a trivial change, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> corrected the issue and now <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a>'s custom color shenanigans all work as intended.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivebrokencompare-fixed.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivebrokencompare-fixed_thumb.jpg" /></a>
<figcaption>The game with the bug has a certain eye-searing charm.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivefixedcompare-fixed.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivefixedcompare-fixed_thumb.jpg" /></a>
<figcaption>And fixed. ...Well that's a lot more boring.</figcaption>
</figure>
</div></div>
<p>Surprisingly enough, after submitting the fix we found out that <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> isn't the only game that uses Color Filtering like this! <a href="https://wiki.dolphin-emu.org/index.php?title=The_Last_Airbender">The Last Airbender</a>, based on the hit movie that Avatar fans love to bring up, used similar color filtering system, just with a much less interesting color palette.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/tlaunfiltered.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/tlaunfiltered_thumb.jpg" /></a>
<figcaption>If you look closely, you can see those same splotchy artifacts in the gray that you could see in EA Active.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/tlafiltered.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/tlafiltered_thumb.jpg" /></a>
<figcaption>With it fixed, the gray background is... well still grey but you can see things now. It's very serious.</figcaption>
</figure>
</div></div>
<p>As with any major change to emulation, adding this did cause a few minor issues here and there. Thankfully, the regressions were found and sorted out <a href="https://dolphin-emu.org/download/dev/dbaebdc585d562c25d4cf9360c8da6e078dcc1a6/">5.0-15518</a>. And then a few more were discovered and addressed in <a href="https://dolphin-emu.org/download/dev/f0136e0eb6468908c7883cdbc978225a2c8e9626/">5.0-15950</a>. And one of our debug features was also broken and finally addressed in <a href="https://dolphin-emu.org/download/dev/8e4155adfe22b60588ee31982cb481c7f981dbb9/">5.0-15961</a>.</p>
<p>Unfortunately there appears to still be a few quibbles to sort out. While working on this Progress Report, we noticed something was a little off about one of the characters and confirmed it does not occur on console.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivenotquite-console.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivenotquite-console_thumb.png" /></a>
<figcaption>On console after filtering, this character is still wearing a pretty normal light blue top.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivenotquite-dolphin.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eaactivenotquite-dolphin_thumb.png" /></a>
<figcaption>But Dolphin renders it as white with pink and blue shadows. Thankfully, a fix is already in the works.</figcaption>
</figure>
</div></div>
<p>If you want to see more details on this issue, please read <a href="https://gist.github.com/Pokechu22/49455f9094ed0ff017da64e3f7aa0404">Pokechu22's writeup on this bug</a>. It goes into a depth that we could never manage in a Progress Report!</p>
<h4 id="50-15515-support-for-manually-handling-texture-wrapping-and-sampling-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15515/">5.0-15515 - Support for Manually Handling Texture Wrapping and Sampling</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-15515-support-for-manually-handling-texture-wrapping-and-sampling-by-pokechu22" title="Permanent link">¶</a></h4>
<p>Fixing the discoloration of <a href="https://wiki.dolphin-emu.org/index.php?title=EA_Sports_Active">EA Sports Active</a> was a win, but unfortunately there was still another problem that affected it and over <em>one hundred</em> other games. The breadth of games was huge, from EA's own sports titles, to the <a href="https://wiki.dolphin-emu.org/index.php?title=Category:James_Bond_(Series)">James Bond series</a>, various <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Harry_Potter_(Series)">Harry Potter games</a>, several <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Need_for_Speed_(Series)">Need for Speed games</a>, the eternal <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Just_Dance_(Series)">Just Dance series</a>, and even strange outliers like <a href="https://wiki.dolphin-emu.org/index.php?title=Target:_Terror">Target: Terror</a>. Odds are if you had a sizeable library of games, you probably had at least one that was affected by this bug... if you had certain hardware.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/nvidiatexsample.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/nvidiatexsample_thumb.jpg" /></a>
<figcaption>If you were on a GPU that suffered from the bug, James Bond cutscenes would be a little hard to watch.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/manualtexsample.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/manualtexsample_thumb.jpg" /></a>
<figcaption>Other GPUs had no issues whatsoever.</figcaption>
</figure>
</div></div>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/targetterror.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/targetterror_thumb.jpg" /></a>
<figcaption>Target: Terror's backdrops and sprites are all FMVs.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/targetterror.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/targetterror-zoom_thumb.jpg" /></a>
<figcaption>You can see the familiar buggy lines if you look closely, since this was taken from a NVIDIA machine.</figcaption>
</figure>
</div></div>
<p>There are probably some readers scratching their head right now. It's very possible you've played many of the games we've mentioned and never noticed any kind of defect like this. That's because <em>this primarily affected NVIDIA GPUs</em>. There are exceptions, but if you haven't been using a NVIDIA GPU, odds are you haven't seen these issues. AMD graphics card users were almost entirely unaffected, and so were <em>most</em> phone and tablet users since Adreno and Mali are did not exhibit this bug. </p>
<p>That's because this is entirely due to <em>texture sampling quirks</em>. Texture sampling is the act of reading texture data (its color data, texture coordinates, etc) as well as texture filtering. As this is a feature that is going to be used, in scientific terminology, a <em>bajillion times per frame</em>, it needs to be <em>extremely</em> fast, so even the latest GPUs use <em>fixed function hardware</em> to accelerate this task. However, not all GPUs sample textures in the same way, but usually the differences from this are so small that they are limited to subpixel quirks.</p>
<p>The afflicted videos are comprised of many tiny and large textures that are combined together to build each frame of the video; a video that doesn't match the resolution the game is using. This already creates MANY opportunities for interpolation differences to crop up, but these video codecs takes things even further. The videos actually have color data from one texture produce an offset to the texture coordinates that are used when reading a second texture. This leads to <em>cascading rounding errors</em>, where even the tiniest differences can explode into view. We understand why they are doing this, but it makes these videos extremely fragile and they require extreme precision to reproduce accurately. In fact, if you look at the <a href="http://www.radgametools.com/bnkhist.htm#Changes%20from%201.8w%20to%201.8x%20(08-11-2007)">Bink Video changelog</a> from this era, you can see them struggling with this <em>on real consoles</em>.</p>
<p>Why are some graphics cards unaffected? While we're not 100% sure, we can at least give some conjecture to why AMD based cards aren't affected. The GameCube and Wii have ArtX graphics processors inside of them, a company that was absorbed by and became ATi and then was later purchased by AMD. It appears as though texture sampling behaviors <em>haven't</em> changed since the days of the GameCube, so these issues don't appear on their modern hardware. This also extends to our Adreno users, as their hardware traces their roots right back to ArtX as well.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eavp6android.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/eavp6android_thumb.jpg"></a>
<figcaption>Score one for Adreno!</figcaption>
</figure>
</div>
<p>Unfortunately for Nvidia users, they had no such luck. They would see the visual issues in VP5, VP6, and Bink videos that used these techniques. Worse yet, the issue actually can extend to cases <em>outside of FMVs</em>, such as the text boxes in <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Party_7">Mario Party 7</a> or the video gameplay elements in <a href="https://wiki.dolphin-emu.org/index.php?title=Target:_Terror">Target: Terror</a> which uses multiple Bink Videos for animated sprites to emulate the look of a classic arcade shooter!</p>
<p>For all this time, Nvidia users have simply had to deal with these issues. Since this is tied to low level GPU hardware differences, how are we supposed fix this for them? Well, we just had to stop relying on the offending bit of the GPU's hardware and do texture sampling ourselves!</p>
<p><em>Note: The Open Source "RADV" drivers for AMD graphics cards do show the sampling bugs. While Texture Sampling is handled by low-level GPU hardware, it's entirely possible for the GPU driver to affect how that low-level hardware functions. Oddly enough, the RADV driver's defects in these situations look slightly different than the defects on every other graphics card, with the vertical lines looking more like they are made up of dots.</em></p>
<h4 id="sorting-through-sampling">Sorting Through Sampling<a class="headerlink" href="#sorting-through-sampling" title="Permanent link">¶</a></h4>
<p>For the most part, Dolphin didn't do anything all that strange when sampling a texture. Outside of the shader, Dolphin would tell its graphics backend what to do while sampling the texture, such as linear sampling, mip mapping, wrap horizontally, wrap vertically, etc, all based on the situation. Regardless of orders sent, the shader then calls upon the fixed-function GPU hardware to sample that texture with the selected settings. Given that this wouldn't work for every GPU in every situation, a new solution had to be devised. What <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> decided to do was to create a way to <em>manually</em> sample the texture instead of relying on the graphics card's texture sampling unit. While it was a fair bit more work and we were concerned about performance, Dolphin itself could read and filter the texture manually in order to ensure results were consistent and correct to precisely what we needed. From there, the shader can look at the texture configuration and find out about other nearby coordinates, mipmap levels, and more with greater accuracy.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp7textbox.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp7textbox_thumb.jpg" /></a>
<figcaption>Inexact texture sampling could cause ugly lines, even at 1x internal resolution sometimes.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp7textboxmanual.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp7textboxmanual_thumb.jpg" /></a>
<figcaption>Manual texture sampling eliminates the issue entirely.</figcaption>
</figure>
</div></div>
<p>The experiment was a huge success right away, but there was a ton of work that had to be done to support literally everything that Dolphin could do. It took literal months to work through everything, but the greater level of control meant that Dolphin could also start emulating some of the stranger behaviors of texture handling of the GameCube and Wii. Most of those cases do not usually occur in retail games, but sometimes happen in mods and homebrew tested in Dolphin. One example of this was when a developer of the <em>Star Fox Adventures: Amethyst Edition</em> reported that textures that worked fine in Dolphin were broken on console. However, with Manual Texture sampling, we have the ability to make these textures behave accurately without forcing people to use the software renderer. If you use Manual Texture Sampling at 1x Native Internal Resolution with Load Custom Textures disabled, you can now catch problems with irregular textures that would have rendered fine otherwise.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/starfoxtexstandard.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/starfoxtexstandard_thumb.jpg" /></a>
<figcaption>Dolphin's standard handling of textures happily accepted these malformed textures and rendered it normally. This is incorrect emulation.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/starfoxtexmanual.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/starfoxtexmanual_thumb.jpg" /></a>
<figcaption>However, the secret title only for console and now Manual Texture Sampling was StarFox StarFox in the issue report.</figcaption>
</figure>
</div></div>
<p>For those that want the most accurate picture possible, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> has also added support for diagonal level of detail, which allows for more accurate selection of the correct texture mipmap if the game chooses to use it. This results in very minor differences that are only evident if you're directly comparing side by side with an identical screenshot from console. All of these cool features and fixes comes with no known regressions at this time, making it a rather safe option to try if you're interested in seeing if an annoying graphical issue is related to texture sampling! Just note that the enhancement "Anisotropic Filtering" is currently not implemented in Manual Texture Sampling, so that feature does nothing when Manual Texture Sampling is enabled.</p>
<h4 id="performance-perils">Performance Perils<a class="headerlink" href="#performance-perils" title="Permanent link">¶</a></h4>
<p>We've talked about having higher accuracy, better picture quality, and less reliance on GPU quirks without any visual regressions. But we haven't talked too much about <em>performance</em>. Since we are bypassing dedicated hardware meant to make texture sampling as fast as possible, a performance hit was inevitable. However, the story is actually rather complicated - how Manual Texture Sampling behaves depends on your GPU's architecture and raw computing power, as well as the resolution you wish to play at. At lower resolutions, i.e. 1-2x Native Internal Resolution, there isn't much of a bottleneck at all. In fact, some games actually run faster on certain hardware. However this will change at a certain resolution, usually around 3-4x Native depending on your GPU, and it becomes a noticeable performance bottleneck. </p>
<p><br/>
<script>
addChart({"title":{"text":"Manual Texture Sampling Performance Comparison"},"subtitle":{"text":"Super Mario Galaxy Complete Hub idle loop, All settings default except specified"},"exporting":{},"yAxis":{"max":150,"tickInterval":30,"title":{"text":""},"labels":{"format":"{value}FPS"}},"series":[{"name":"9900k+3090 Vulkan Standard","marker":{}},{"name":"9900k+3090 Vulkan Manual Texture Sampling"},{"name":"9900k+3090 D3D12 Standard"},{"name":"9900k+3090 D3D12 Manual Texture Sampling"},{"name":"6700k+1070 Vulkan Standard"},{"name":"6700k+1070 Vulkan Manual Texture Sampling"},{"name":"M1 Max Macbook Pro 14in Standard"},{"name":"M1 Max Macbook Pro 14in Manual Texture Sampling"}],"data":{"csv":"\"X Native\";\"9900k+3090 Vulkan Standard\";\"9900k+3090 Vulkan Manual Texture Sampling\";\"9900k+3090 D3D12 Standard\";\"9900k+3090 D3D12 Manual Texture Sampling\";\"6700k+1070 Vulkan Standard\";\"6700k+1070 Vulkan Manual Texture Sampling\";\"M1 Max Macbook Pro 14in Standard\";\"M1 Max Macbook Pro 14in Manual Texture Sampling\"\n1;150;150;147;143;111;115;99;96\n2;149;148;145;142;111;102;93;92\n3;147;144;144;140;111;89;86;69\n4;146;139;143;137;107;68;76;62\n5;143;134;141;134;101;56;73;60\n6;140;128;138;130;90;46;66;52\n7;137;120;136;123;77;37;61;42\n8;133;113;135;112;69;29;60;36\n9;129;104;131;101;63;26;60;30\n10;123;96;128;87;57;21;54;25\n11;119;83;124;79;49;18;47;21\n12;112;76;120;71;43;15;42;18\n13;105;69;112;64;37;13;37;16\n14;100;63;104;59;33;12;34;14\n15;94;58;94;53;29;10;30;12\n16;83;52;87;48;26;9;27;11\n17;77;47;81;43;23;8;25;10\n18;71;43;75;39;21;7;23;9\n19;66;39;69;35;19;6;20;8\n20;61;36;64;32;;;18;7\n21;57;33;59;30;;;17;6\n22;53;30;55;27;;;15;6\n23;49;28;51;25;;;14;5\n24;46;26;47;23;;;13;5\n25;43;24;44;22;;;12;4\n26;40;23;;;;;;\n27;37;21;;;;;;\n28;35;20;;;;;;\n29;29;18;;;;;;\n30;28;17;;;;;;\n31;24;15;;;;;;\n32;23;14;;;;;;","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"pane":{"background":[]},"responsive":{"rules":[]},"tooltip":{"followPointer":true,"borderRadius":5,"borderWidth":2,"shared":false,"valueSuffix":"FPS"},"chart":{"height":600},"colors":["#40c4ff","#2979ff","#ff9100","#ff3d00","#00e676","#388e3c","#e040fb","#8e24aa","#f45b5b","#91e8e1"],"plotOptions":{"series":{"dataLabels":{"enabled":false}}},"legend":{"enabled":true},"xAxis":{"labels":{"format":"{value}X Native"},"minorTickInterval":1,"minorTicks":true,"max":25,"tickInterval":5,"tickLength":10}})
</script>
<br/>
<center><p>Tip: You can hide or reveal items by clicking/tapping them in the legend.</p></center>
</br></p>
<p>If you have an absolute powerhouse GPU, odds are the performance impact won't affect you until you're at a resolution beyond reasonable. Those of us on more modest hardware are hit a bit harder. And those on older GPU architectures that are more sensitive to this, such as Pascal, are hit even harder. Considering that this only impacts certain hardware and can have a sizeable performance impact depending on your resolution and GPU architecture, we've mostly left this option disabled for now. In a few low impact games that heavily rely on FMVs (e.g. <a href="https://wiki.dolphin-emu.org/index.php?title=Just_Dance">Just Dance</a>) we have decided to enable it by default, as they aren't GPU limited in general and see almost no benefit from higher resolution. If <em>every</em> graphics card were affected, the decision of when to enable this would be a lot easier, but that's just not the case. </p>
<p>Eventually, we may need to come up with a <em>conditional</em> default, depending on the user's hardware, much like a driver details bug, but this time handled per-game. For now, if you have an afflicted card, "Manual Texture Sampling" resides in the "Advanced" area of the Graphics Settings Menu. If you enable Manual Texture Sampling, Dolphin will then Manually Sample Textures along with enabling all of those other accuracy bonuses. Our current plans are to find games that have heavy glitches with "Fast Texture Sampling" to the point that they are unplayable, and slowly enable Manual Texture Sampling on a case by case basis. Unfortunately, this does mean that some users with Graphics Cards/Drivers that did not have the error may have the setting enabled despite not <em>really</em> needing it. We'll continue to try to make smart decisions when to enable this feature, especially as we get more data on what games it effects and how it performs on all the vast variety of machines that our users play Dolphin on.</p>
<h4 id="50-15520-and-50-15604-riivolution-fixes-additions-and-netplay-support-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15520/">5.0-15520</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15604/">5.0-15604</a></strong> - <strong>Riivolution Fixes, Additions, and Netplay Support</strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-15520-and-50-15604-riivolution-fixes-additions-and-netplay-support-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>When Dolphin <a href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/#50-15407-hle-riivolution-patch-support-by-admiralcurtiss">added High Level Emulation (HLE) for launching and configuring Riivolution mods</a>, users quickly embraced the feature and we saw a huge influx of both appreciation and support requests. The initial implementation was fairly good, but there was no way we could test every mod and find every edge-case. Over the past three months, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> has been busy fixing Riivolution mods that didn't run on Dolphin and adding a few much requested features. Most of these bugs were very silly, and had to with things like "case sensitivity" of filenames and paths, duplicate files in the mod, and were mostly centralized to haphazardly constructed mods.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisportsstorm.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisportsstorm_thumb.jpg"></a>
<figcaption>Wii Sports Resort: Storm Island relies on very peculiar Riivolution behaviors.</figcaption>
</figure>
</div>
<p>On the side of <em>new</em> features, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> has brought some big hitters to the table. First of all, you can now create <strong>Game list Entries</strong> for Riivolution mods, letting you boot preconfigured mods directly from your game list!</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/NewerSuperMarioBrosWii.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/NewerSuperMarioBrosWii.png"></a>
<figcaption>Creating game list entries for mods can be done from the Riivolution Menu and then those can be launched directly from the game list!</figcaption>
</figure>
</div>
<p>This may not seem like a huge deal at first, but this was one of the major requirements for booting Riivolution mods on <strong>Netplay!</strong> Once a Riivolution configuration is in your game list, you can use it for netplay. As long as all players in the netplay session have the Riivolution mod configured correctly, it'll work like any other game on netplay.</p>
<p><em>Note: Wii Remote Netplay is still experimental, and <em>only</em> works with Emulated Wii Remotes. Even then, some actions, such as Wii Remotes disconnecting, may not behave properly on netplay and improperly configured netplay sessions may hang on boot. Riivolution Mods for GameCube games and Wii games that support GameCube controllers are much easier to setup and synchronize properly.</em></p>
<p><em>Note 2: If you are planning on using Wii Netplay, please use revision <a href="https://dolphin-emu.org/download/dev/master/5.0-15559/">5.0-15559</a> or newer for reasons that we'll get to... right now!</em></p>
<h4 id="50-15549-and-50-15559-netplay-shutdown-and-wii-save-fixes-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15549/">5.0-15549</a></strong> and <strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15559/">5.0-15559</a></strong> - <strong>Netplay Shutdown and Wii Save Fixes</strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-15549-and-50-15559-netplay-shutdown-and-wii-save-fixes-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>After all of these years, Wii Netplay is still in a rather experimental state. There are a lot of challenges surrounding it, such as the Wii's internal memory, system files, and of course, those pesky Wii Remotes. Dolphin's netplay infrastructure was designed before the idea of taking Wii games onto netplay was even considered a possibility, so a lot of Dolphin's Wii netplay are tacked on top of an aging foundation. Syncing memory cards is one thing, but how do you synchronize a NAND that can be 500 MB and can contain copyrighted data? Well, that's actually the crux of a lot of bugs on Wii Netplay - synchronizing the NAND.</p>
<p>In order to avoid both legal and bandwidth issues, Dolphin sets up a "Blank" NAND for netplay, and then imports the necessary savefiles for the games the users want to play on netplay. This keeps the footprint small and avoids all the legal issues. When Netplay is over, these files are then exported back to the original NAND <em>if</em> the user has turned on "write saves"... which is actually where a nasty problem cropped up, one that could actually affect your actual NAND's save.</p>
<p>Due to an unfortunate race condition, mixed with Wii Remotes' propensity to want to crash Netplay in general, it was possible for the original save to be lost during the export process due to a race condition. While cleaning up part of the codebase for Riivolution games to function on netplay, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> noticed a bunch of these problems and found himself unable to figure out how the code was actually supposed to work. This may sound outrageous, but it's a fairly common occurence when you dive into the older parts of a project that has had this long of a lifespan. The only option at that point was to rewrite and fix up the code to at least make it work again. As it was, it seemed like Dolphin's Netplay was making assumptions that were no longer true due to changes in other parts of the codebase.</p>
<p>The save loss bug is fixed to the best of our knowledge in the latest builds, meaning it should be safe to take your saves on netplay again. Your original save from your real NAND should never get lost again. However, if Dolphin crashes during netplay, the updates to save files done during netplay will not exported to the main NAND. Do not panic if this happens! Your save data from the netplay session can still be retrieved in a Wii.backup folder contained in Dolphin's user files and manually converted. Do note that starting Dolphin and booting up another game will clear these files.</p>
<h4 id="50-15579-delay-single-core-gpu-interrupts-by-phire"><strong><a href="https://github.com/dolphin-emu/dolphin/pull/10244">5.0-15579 - Delay Single Core GPU Interrupts</a></strong> by <strong><a href="https://github.com/phire">phire</a></strong><a class="headerlink" href="#50-15579-delay-single-core-gpu-interrupts-by-phire" title="Permanent link">¶</a></h4>
<p>Most of the time, Single Core is Dolphin's accuracy option that helps with most random crashes and hangs. But in a few rare games, <em>Dual Core</em> is actually the more stable option. One of those games is <a href="https://wiki.dolphin-emu.org/index.php?title=Bomberman_Jetters">Bomberman Jetters</a>, and the reason why is pretty interesting.</p>
<p>One thing to note is that the GameCube and Wii are single core consoles, so there's only a limited amount of things we can try to parallelize from the main workload. However, early Dolphin developers realized that the GPU-related CPU work, such as sending graphics data and the like, was <em>reasonably</em> safe to split into a second host CPU core. After all, the CPU side of things doesn't interact with the GPU-related CPU work all that often. This meant they could run in parallel on separate host CPU cores for a time and only sync up at important moments (such as specific interrupts) in order to greatly improve performance. While today we know of Dual Core as the source of many random crashes, when it was initially implemented Dual Core mode wasn't as problematic as it is nowadays; usually the GPU thread was more than fast enough to keep up and users were always limited by the CPU thread. Ever since <a href="https://dolphin-emu.org/blog/2014/03/15/pixel-processing-problems/">TEV_Fixes_New</a> Dolphin's performance profile has flipped, with the CPU thread now actually being faster where as the GPU thread has a lot more to do thanks to improved emulation.</p>
<p>This creates a scenario where the CPU thread may run too far ahead of the GPU thread, and if the GPU thread is too far behind when an interrupt happens, you may run into synchronization issues. There's not much we can do about this problem - the reason why Dual Core is fast is because the threads run without much syncing. If we add more syncing to fix the crashes, performance would drop. Besides, at this point Single Core has been optimized pretty well and on a lot of computers works well enough without any of the risks. It's a properly deterministic option for when a game is problematic on Dual Core.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Bomberman_Jetters">Bomberman Jetters</a> is one of the games where Dual Core's lack of synchronization is actually a <em>good</em> thing. This game expects GPU FIFO processing to take time. In Dual Core, this happens out of pure happenstance because the CPU thread and the GPU thread only meet up once in a while. Single Core executes everything exactly in order on a single thread with no delays whatsoever. Worse yet, the execution time would be <em>backdated</em> to when the FIFO command was first sent, meaning that <em>zero</em> time had passed since the game issued the command!</p>
<p>Rather than trying to emulate the whole pipeline correctly, <strong><a href="https://github.com/phire">phire</a></strong> came up with a little bit of a hotfix that makes FIFO execution a bit closer to correct on Single Core. With this change, FIFO execution is fed through an interrupt scheduler that can delay and make sure interrupts happen at the right time. Here, we just force a minimum wait time so that those interrupts that were happening instantly <em>now</em> happen a tiny bit into the future from when they were issued. It doesn't exactly address the core issue, but it's good enough to get the game booting. Unfortunately, this game is still prone to random hangs even with the initial hang fixed. But the good news is that there is a work-around now - lowering the emulated CPU clock by a small amount significantly (perhaps completely) reduces the likelihood of the game hanging.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/bombermanjetters.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/bombermanjetters_thumb.jpg"></a>
<figcaption>It's fitting that this game would be a ticking time bomb in Dolphin...</figcaption>
</figure>
</div>
<p>This <em>also</em> affects some <a href="https://wiki.dolphin-emu.org/index.php?title=Action_Replay_(GC)">Datel Products</a> and <a href="https://wiki.dolphin-emu.org/index.php?title=Resident_Evil_3:_Nemesis">Resident Evil 3</a> when running in Single Core, preventing game breaking hangs from happening. This is important because these <a href="https://wiki.dolphin-emu.org/index.php?title=Action_Replay_(GC)">Datel Products</a> were actually <em>broken</em> on Dual Core too, so having them working at all is rather nice. <a href="https://wiki.dolphin-emu.org/index.php?title=Resident_Evil_3:_Nemesis">Resident Evil 3</a> is kind of in-between. It <em>works</em> on Dual Core, but depending on your device, there's a very small chance of hanging if things go wrong in just the right way. In our limited testing, we were unable to cause any hangs at all in <a href="https://wiki.dolphin-emu.org/index.php?title=Resident_Evil_3:_Nemesis">Resident Evil 3</a>, but some transitions appear to take an abnormally long time, including the initial first door where the game was hanging previously. If this issue is similar to <a href="https://wiki.dolphin-emu.org/index.php?title=Bomberman_Jetters">Bomberman Jetters</a>, it's likely that slightly reducing the Emulated CPU Clock would smooth out any remaining issues if there are any.</p>
<h4 id="50-15586-dont-clear-rtc-flags-on-bs2-reset-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15586/">5.0-15586 - Don't Clear RTC Flags on BS2 Reset</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-15586-dont-clear-rtc-flags-on-bs2-reset-by-pokechu22" title="Permanent link">¶</a></h4>
<p>Some users and developers love using the <a href="https://wiki.dolphin-emu.org/index.php?title=Wii_Menu">Wii Menu (commonly referred to as the System Menu)</a>. It's a lot of fun to go through some of the channels and see various animated game banners that aren't shown from the typical Dolphin GUI. However, if you boot a game and then return to the Wii Menu, the game you were playing wouldn't be present in the Disc Channel. This is because Dolphin was clearing RTC (Real Time Clock) flags on reset, so the emulated console didn't know that it should update the Wii Menu's cache and refresh the inserted disc, leading to stale data being used. <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> made a quick correction to this behavior, so that the correct disc appears in the disc channel after reset.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/discchannel.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/discchannel_thumb.jpg"></a>
<figcaption>Now you don't have to force change disc after every reset to get the correct games to show up.</figcaption>
</figure>
</div>
<h4 id="50-15676-fix-logicops-in-opengles-android-and-moltenvk-macos-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15676/">5.0-15676 - Fix LogicOps in OpenGLES (Android) and MoltenVK (macOS)</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-15676-fix-logicops-in-opengles-android-and-moltenvk-macos-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>This is a workaround for missing LogicOps support in Metal (MoltenVK) and the many mobile drivers (Adreno, Mali, etc.) that do not support the OpenGLES and Vulkan extension. However, this time around, we're not trading one broken game for another; <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> has taken advantage of an improving situation on Android alongside a <em>small</em> hack to MoltenVK to get correct output in LogicOps titles on the afflicted devices.</p>
<p>While <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> is best known for working on Apple features, including a fork of Dolphin designed to run on iOS devices, they've also taken over the burden of helping maintain Dolphin's macOS builds. They've submitted fixes for MoltenVK, helped update the buildbot, and have generally improved the macOS user experience. In this case, they wanted to fix LogicOps features on MoltenVK, but then stumbled into the fact that OpenGLES environments (Android on Non-NVIDIA) suffer from the same problem. A while back, <strong><a href="https://github.com/Stenzek">Stenzek</a></strong> added <a href="https://dolphin-emu.org/blog/2019/08/04/dolphin-progress-report-june-and-july-2019/#50-10758-approximate-logic-op-with-blending-if-unsupported-by-stenzek">LogicOps approximation through blending</a> to fix <a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Kart_Wii">Mario Kart Wii</a> on Windows 7 D3D11 and OpenGLES devices.</p>
<p>Unfortunately, restoring some remedial emulation broke things in other situations, and left some games like <a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a> looking a little dark.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/kirby-broken.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/kirby-broken_thumb.jpg"></a>
<figcaption>The game is still quite playable, if you're used to blindfolded runs.</figcaption>
</figure>
</div>
<p>Why exactly is this happening in <a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a>? To answer that, we need to talk about LogicOps and how they work on the GameCube/Wii. LogicOps (Logical Operations) are a more complex version of Blending operations, allowing a game to perform a wide variety of binary commands in the blending stage. The GameCube and Wii support this natively (based on the OpenGL implementation). In the hardware, they are bitwise operations that use the output color from TEV and/or the current color of the framebuffer and use them in various ways. The result of the operation is then written to the framebuffer and used.</p>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Kirby_Air_Ride">Kirby Air Ride</a> uses the alpha value on the framebuffer to determine where to draw shadows on the screen. At the start of the frame, the game sets the alpha of the rectangle 255. However, it also uselessly uses the SET logic op, which sets the output color to the current TEV color. This is fine if the system supports one of Dolphin's proper LogicOp paths. However, this goes completely wrong under Dolphin's LogicOps approximation with blending path. In this case, Dolphin sets the source and destination factors for the color, but does not set factors for the alpha. This causes the alpha to be set to zero for the entire frame. Even when the game attempts to modify the value to mark where shadows should be drawn, it remains at zero.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/beforelogicopmidframe.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/beforelogicopmidframe_thumb.jpg" /></a>
<figcaption>If we simply disable LogicOps, everything is bathed in shadow.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/logicopmidframe.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/logicopmidframe_thumb.jpg" /></a>
<figcaption>If LogicOps are emulated properly, all of the non-shadowed portions are brightened.</figcaption>
</figure>
</div></div>
<p>If you feed in black rather than the alpha value, instead of lightening the scene, it instead gets shrowded in darkness. Emulating LogicOps with blending is already a last resort, so to improve the situation, <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> had to go another route. With macOS and MoltenVK, Metal does not support LogicOps, so <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> modified our MoltenVK implementation slightly to enable SPIRV-Cross to convert Vulkan's subpass inputs into a framebuffer fetch. This allows Apple Silicon GPUs to support LogicOps, but unfortunately all other macOS GPUs still will not work as they do not support this function. For OpenGLES, there is an <em>extension</em> to support LogicOps, but of course no mobile drivers bother to support it. Instead, we rely on <code>GL_EXT_shader_framebuffer_fetch</code> or <code>GL_ARM_shader_framebuffer_fetch</code>, which can give us the colors of the framebuffer and then we can handle the LogicOps logic in the shader itself. This is slightly slower than native support, but much better than using blending approximation.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/kirby-working.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/kirby-working_thumb.jpg"></a>
<figcaption>And then OatmealDome said, let there be light!</figcaption>
</figure>
</div>
<p><em>Note: The modifications to MoltenVK will not be upstreamed. This is because the behavior we're utilizing is specific to what Dolphin needs. It works for <em>our</em> purposes, but chances are that other programs probably wouldn't want this. Eventually MoltenVK should mature to the point that this hack won't be necessary, but for now this helps make the game's playable on Apple Silicon.</em></p>
<h4 id="50-15680-textureconvertershadergen-set-alpha-to-1-on-intensity-formats-if-efb-lacks-alpha-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15680/">5.0-15680 - TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-15680-textureconvertershadergen-set-alpha-to-1-on-intensity-formats-if-efb-lacks-alpha-by-pokechu22" title="Permanent link">¶</a></h4>
<p>Sometimes an obscure game can lead you to some rather interesting effects. <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a> was a cash-in port of an already <strong>six year old</strong> PS2 game, <a href="https://en.wikipedia.org/wiki/Rygar:_The_Legendary_Adventure">Rygar: The Legendary Adventure</a> which was a follow up to <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar">Rygar (Arcade)</a>, which is playable on the <a href="https://wiki.dolphin-emu.org/index.php?title=Arcade">Wii Virtual Console Arcade</a>. Based on the reviews people gave to <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a>, that might actually be the better Rygar game on Wii.</p>
<p>And that's just about all the information we could find on this game. However, any game, no matter how good or bad, can become notable to emulation developers. All it has to do is have <em>one</em> thing that confuses everyone. For <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a>, that ended up being what made it fun for us. An <a href="https://bugs.dolphin-emu.org/issues/12763">issue report</a> mentioned that some screens would be washed out in Dolphin, which eventually was tracked down to its bloom effect. Initial experimentation with the effect and how it worked led us to wonder if the effect <em>even worked on console</em>. But, that was easily tested and it turned out that it was yet another weird edge-case.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarbroken.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarbroken_thumb.jpg" /></a>
<figcaption>This dark and moody game is looking very washed out.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarfixed.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarfixed_thumb.jpg" /></a>
<figcaption>The game is supposed to have a much darker tone.</figcaption>
</figure>
</div></div>
<p><strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> took interest and you can probably guess what happened next if you've been reading these reports. A hunch was quickly surmised that this problem might be related to other visual glitches throughout the game. After testing things in the latest development versions, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> found that the bug was present in most scenes throughout the game with varying degrees of aggressiveness. </p>
<p>Rather than just trying to see what was wrong in Dolphin, they instead did a <a href="https://gist.github.com/Pokechu22/f9c6f22388f1c37570a546b80fdd7ddc">deep dive</a> into exactly how the game was rendering the effect. Once the effect was understood, the answer to what was going wrong would be simple. It turns out the game's bloom actually uses a clever trick to work around a hardware limitation - that the GameCube and Wii can only work with a single framebuffer. If a developer wishes to make other computations using the GPU, such as creating a texture for dynamic shadows, then they will need to draw on top of what's already been drawn on the screen. This is similar to the difficulties and problems <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Heavy_Iron_Studios_(Developer)">Heavy Iron Studios</a> ran into when rendering the shadows in <a href="https://wiki.dolphin-emu.org/index.php?title=SpongeBob_SquarePants:_Battle_for_Bikini_Bottom">Spongebob Squarepants: The Battle for Bikini Bottom</a>.</p>
<p>Long story short, because the game was having to render over what it had already rendered, it created an EFB Copy without an alpha channel. Because of that, the alpha channel would return 1, or totally opaque. While that's <em>normally correct</em>, Rygar was making an EFB copy from a texture using an intensity format. While normal textures as EFB copies would <em>usually</em> be 1, when using an intensity format, Dolphin was setting it to zero! This completely changes how things are rendered in <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a>, and is the key to their rather interesting dynamic bloom technique.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarplayable.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/rygarplayable_thumb.jpg"></a>
<figcaption>Rygar: The Battle of Argus still has some nice set pieces throughout it.</figcaption>
</figure>
</div>
<hr />
<p>As custom after running into a unique issue, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> started looking through fifologs and issue reports to see if there were any other bugs that were potentially related. Oddly enough, they stumbled into a <em>much more widely known game</em>: <a href="https://wiki.dolphin-emu.org/index.php?title=Pok%C3%A9mon_Battle_Revolution">Pokemon Battle Revolution</a>! For the past couple of years, it had been suffering with a regression that caused the screen to shift whenever a special effect that used the EFB was on screen.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonbrokencompare.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonbrokenalone_thumb.jpg"></a>
<figcaption>This regression frustrated users, as the black border (right and bottom) would appear during most special effects.</figcaption>
</figure>
</div>
<p>Unfortunately, we had no real leads as to what was wrong, but we didn't end up needing any. Fixing <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a> <em>also</em> fixed <a href="https://wiki.dolphin-emu.org/index.php?title=Pok%C3%A9mon_Battle_Revolution">Pokemon Battle Revolution</a>. However, because no one knew <em>why</em> <a href="https://wiki.dolphin-emu.org/index.php?title=Pok%C3%A9mon_Battle_Revolution">Pokemon</a> was fixed, the job wasn't completely done. It turns out, what was happening here was actually <a href="https://gist.github.com/Pokechu22/e9fa9037fe21312ff32475638b78ba27">two separate bugs</a>, and one of them actually happens on console! The screenshifting a huge amount was a Dolphin bug, but many of the special effects were also broken on console to a degree. That's because the game accidentally crops the bottommost and rightmost row of pixels, and then because of texture clamping, those rows get used for anything that would use content off of the screen.</p>
<p><strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> found <em>their</em> bug and created a game patch, which caused a bunch of special effects to render like they were intended for the first time.</p>
<div class="media-block" style="max-width:100%">
<div class="row more-padding">
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonbrokencompare.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonbrokencompare_thumb.jpg" /></a>
<figcaption>This is how the game was broken in Dolphin before.</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonfixedcompare.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonfixedcompare_thumb.jpg" /></a>
<figcaption>Here's what it looks like with the issue fixed, essentially matching the output on console.</figcaption>
</figure>
<figure class="col-sm-4">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonintendedcompare.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/pokemonintendedcompare_thumb.jpg" /></a>
<figcaption>And here is how the effect was originally intended to look, with the game bug patched.</figcaption>
</figure>
</div></div>
<p>And with that, our dive into these two games was complete. . . . Except it wasn't. Shortly after investigating <a href="https://wiki.dolphin-emu.org/index.php?title=Rygar:_The_Battle_of_Argus">Rygar: The Battle of Argus</a>, it was noted that the game no longer worked in the latest development builds, crashing with a backpatch error unless full MMU was enabled. This regression was fixed in <a href="https://dolphin-emu.org/download/dev/ddb3bad9c91300448ed28bc9f5538aaba4b2b019/">5.0-15699</a> to return the game to normal.</p>
<h4 id="50-15928-add-online-wii-system-update-functionality-to-dolphin-on-android-by-simonx22-and-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15928/">5.0-15928 - Add Online Wii System Update Functionality to Dolphin on Android</a></strong> by <strong><a href="https://github.com/Simonx22">Simonx22</a></strong> and <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-15928-add-online-wii-system-update-functionality-to-dolphin-on-android-by-simonx22-and-oatmealdome" title="Permanent link">¶</a></h4>
<p>Another major feature lands in the Android GUI. If you're looking to see some of the Wii's more advanced features or run homebrew, having a full assortment of System Files is necessary. On Android, getting those System Files could be a bit tricky, as actually updating the emulated Wii wasn't as simple as on Desktop versions of Dolphin. <strong><a href="https://github.com/Simonx22">Simonx22</a></strong> and <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> teamed up to rectify this issue, with <strong><a href="https://github.com/Simonx22">Simonx22</a></strong> handling the Android side of things and <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> helping with the C++ part of the implementation.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisystemupdate1.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisystemupdate1_thumb.png" /></a>
<figcaption>Performing an Online Wii System Update goes through the same steps as a real Wii would to update.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisystemupdate2.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wiisystemupdate2_thumb.png" /></a>
<figcaption>...Do remember that this does use the internet, though! Watch your mobile data usage!</figcaption>
</figure>
</div></div>
<p>Once you've run a Wii System Update, you'll be able to access the Wii Menu and be able to boot channels, games, and even things like the Open Homebrew Channel!</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/freshsystemmenu.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/freshsystemmenu_thumb.jpg"></a>
<figcaption>A "Fresh" Wii NAND running on Android.</figcaption>
</figure>
</div>
<p>For most users, this won't be too important, but it does allow for easy access to the Wii Menu and will allow booting discs and channels from it without the need for a PC for downloading or copying files.</p>
<h4 id="50-15931-disable-unknown-opcode-popup-for-0x1-to-0x7-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15931/">5.0-15931 - Disable Unknown Opcode Popup for 0x1 to 0x7</a></strong> by <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong><a class="headerlink" href="#50-15931-disable-unknown-opcode-popup-for-0x1-to-0x7-by-pokechu22" title="Permanent link">¶</a></h4>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=Mario_Party_5">Mario Party 5</a> players have been complaining to us for <em>many</em> years about a very peculiar bug. "Why does Dolphin crash when I use a Wiggler Orb"? </p>
<p>Technically, Dolphin wasn't crashing, but notifying the user of an unknown opcode. While this did interrupt play, all the user had to do was proceed through the message boxes and the game would keep going as if nothing happened. Over the years we found this to be a harmless occurrence and no cause for concern, but we didn't want to remove the message. After all, it was correct and pointed to a <em>likely</em> bug in Dolphin's GPU emulation.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp5fullnative.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/mp5fullnative.png"></a>
<figcaption>Console doesn't hang or crash here, so surely this is a Dolphin issue, right?</figcaption>
</figure>
</div>
<p>However we couldn't really investigate the scene further, as Dolphin's Fifoplayer was unable to record scenes with unknown opcodes. At least it wasn't... until very recently. We've said this name a lot, but once again <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong>, has found time between investigating all of these issues to renovate our Fifoplayer with fixes and new features. One such consequence of their fixes is that the Fifoplayer can now record scenes with unknown opcodes. What mysteries would be awaiting us with the Wiggler Capsule after it had evaded our gaze for all of these years? For this, we'll let <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong>'s own writeup explain.</p>
<p><br/>
<blockquote style="font-size:1em;"></p>
<p>Basically, the Wiggler capsule's animation draws a bunch of rings. Each ring has 128 vertices in it, with positions moving around a circle and texture coordinates going up by .03125 (1/32) for each horizontal step. The position, color, and texture coordinate data for each vertex is indexed into several arrays, with the first set of 4 vertices using indices 0, 1, 3, and 2. However, after all 128 vertices are written, the game writes data for 4 more vertices, again using indices 0, 1, 3, and 2. But since the game said it would only draw 128 vertices, not 132, those 4 vertices are instead interpreted as graphics commands. Opcode 0 is a NOP, and my brief hardware testing indicates that opcodes 1-7 are also treated as NOPs, so on real hardware these are ignored, but Dolphin didn't like that extra data. ...</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wigglerfifo.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wigglerfifo_thumb.png"></a>
<figcaption>By isolating an individual ring from the effect, we can see something isn't quite right.</figcaption>
</figure>
</div>
<p>If we modify the FIFO data to say that there are 132 vertices, then the first part of the ring is drawn twice, which indicates that vertices 129-132 normally go unused.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/extravertices.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/extravertices_thumb.png"></a>
<figcaption>If we force render the extra vertices, one section of the ring gets brighter. This means that these vertices really aren't rendered.</figcaption>
</figure>
</div>
<p></blockquote>
<br/></p>
<p>This confirmed a rather exciting event! For the first time in many, many years, this is a case of an "Unknown Opcode" popup actually caused by an Unknown Opcode in a retail, licensed game. Most of the time these popups are disregarded as Dual Core misbehaving or strange GPU timing issues. There's a reason the message written by developers well over a decade ago seemingly disregard that the popup could be caused by an actual unknown opcode.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/unknownop.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/unknownop_thumb.png"></a>
<figcaption>Unlikely, but here we are.</figcaption>
</figure>
</div>
<p>How exactly did this slip by the game's developers? Well, our best guess is this effect was programmed rather haphazardly and developers didn't realize how broken it was. The effect is broken in multiple ways, one of which is <em>visual</em> in the form of a texture defect. While normally this would be very, very difficult to see on console, <strong><a href="https://github.com/Pokechu22">Pokechu22</a></strong> devised a way to use the HW Fifoplayer (a Fifoplayer that runs on an actual console) along with some fancy stitching of XFB copies to create high resolution screenshots on console. This isn't <em>perfect</em> but it does give us a chance to get a very high quality look at how this effect renders on console and confirms that Dolphin is emulating it right.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wigglercapsuleconsole.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/wigglercapsuleconsole_thumb.jpg"></a>
<figcaption>With some advanced techniques and a lot of stitching, we can see that everything renders the same on console. It's a game bug!</figcaption>
</figure>
</div>
<p>With this game's issues fully understood and Opcodes 0x1 -> 0x7 confirmed to be Nops (No Operation), the Unknown Opcode popups have been disabled for these Opcodes. This means that in the latest development builds, you no longer have to worry about the Wiggler Capsule causing any interruptions to your gameplay experience. As this is a strange behavior, Dolphin will continue to log Unknown Opcodes 0x1 -> 0x7 behind the scenes as it can give us a clue toward other bad behaviors and potential visual issues.</p>
<h4 id="50-15936-android-alternative-infrared-pointer-control-by-lynxnb"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15936/">5.0-15936 - Android: Alternative Infrared Pointer Control</a></strong> by <strong><a href="https://github.com/lynxnb">lynxnb</a></strong><a class="headerlink" href="#50-15936-android-alternative-infrared-pointer-control-by-lynxnb" title="Permanent link">¶</a></h4>
<p><strong><a href="https://github.com/lynxnb">lynxnb</a></strong> returns with another Android centric change, this time an alternative control scheme for Touchscreen Pointer. Currently in Dolphin, you control the IR pointer by touching the screen, and then the cursor moves to the approximate point your finger tapped. This isn't very exact due to how different games are calibrated differently, and how large fingers are relative to the targets on screen. This change adds a second mode, where instead of the Infrared Pointer following your finger's position, it instead follows your finger's movements - like a touchpad. This is especially useful in shooters where you're going to do a lot of turning. </p>
<h4 id="50-15974-android-add-support-to-importexport-user-files-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15974/">5.0-15974 - Android - Add support to import/export User Files</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15974-android-add-support-to-importexport-user-files-by-josjuice" title="Permanent link">¶</a></h4>
<p>The <a href="https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/#50-15438-android-comply-with-scoped-storage-requirements-by-josjuice">Scoped Storage</a> situation on Android has turned out to be a confusing, frustrating place for both users and developers alike. Depending on your phone, manufacturer, and the version of Android that you're on, your experience with Scoped Storage and its problems are going to vary. Some manufacturers seem to lock down app specific directories <em>entirely</em>, even preventing users from copying files in from a desktop computer. This means that users can't copy in saves, setup Riivolution mods, or backup their data in a meaningful way whatsoever. Given that this was a rather dire situation, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> decided to rush in an option that will at least give users <em>something</em> they can use to import and export their user settings.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/importexportandroid.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/importexportandroid_thumb.png"></a>
<figcaption>Under "Config/User Data" you now have the option to import and export User Data.</figcaption>
</figure>
</div>
<p>Do note that we're not going to implement our own file manager <em>just</em> to handle user settings. Currently, Dolphin can import .zip files that contain the user directory. A "Dolphin.ini" must be present in the "Config" folder for it to be considered valid user data. Do note that importing User Data will overwrite and delete all existing User Data. When exporting your User Data, it will be exported into the same kind of zip file that Dolphin expects for importing, so you can use that as a guide to see how the zip file should be laid out. Currently, support is a bit spotty, so making as "basic" of a compressed zip file as possible is for the best. We'll continue to explore other avenues for managing User Data now that we know this is going to be a problem from here on out.</p>
<h4 id="50-15862-panic-alert-improvements-by-pokechu22"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15862/">5.0-15862 - Panic Alert Improvements</a></strong> by <strong><a href="https://github.com/pokechu22">pokechu22</a></strong><a class="headerlink" href="#50-15862-panic-alert-improvements-by-pokechu22" title="Permanent link">¶</a></h4>
<p>This is an overhaul that was quite overdue. Essentially, Dolphin's Panic Alert system had a few <em>minor</em> bugs. Namely, sometimes they wouldn't display all of the information we intended and translations weren't working, meaning even though some of the Panic Alerts <em>were</em> translated, the translations would never get shown regardless of the user's language. In between solving all of those crazy graphics bugs, <strong><a href="https://github.com/pokechu22">pokechu22</a></strong> found time to fix them up a bit.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/panicbefore.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/panicbefore_thumb.png" /></a>
<figcaption>This Panic Alert says the bare minimum, but it could be better.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/panicafter.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/panicafter_thumb.png" /></a>
<figcaption>And now in the latest builds, that better has finally come.</figcaption>
</figure>
</div></div>
<h3 id="port-settings-to-new-configuration-system-by-admiralcurtiss"><strong>Port Settings to new Configuration System</strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#port-settings-to-new-configuration-system-by-admiralcurtiss" title="Permanent link">¶</a></h3>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:25%; min-width:150px; float:right; text-align:center;">
<a style="text-decoration: none;" href="https://openclipart.org/detail/175418/cut-onion">
<img style="max-width: 100%; margin-bottom:.5em;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-june/Onion.svg">
</a></div>
<p>We haven't talked about the new configuration system in quite a while. To be honest, it's actually not that new anymore, now is it? This summer, it'll actually be five years old, the <em>Layered Configuration System</em> (Layered Config) is a more powerful configuration system that allows layers of overrides while also keeping multiple settings in mind. <a href="https://dolphin-emu.org/blog/2017/07/01/dolphin-progress-report-june-2017/#50-4171-videoconfig-port-to-layered-configuration-system-by-merrymage">To harken back to a simpler time</a>, Layered Config is an overlay configuration system with multiple layers - like an onion - and each layer lays over the one beneath it. Even though Dolphin only acts on the final result of all of the layers, each layer exists at all times in the config system, allowing Dolphin to know what settings layer is affecting what and why. This allowed users to make changes on the fly, without actually overriding the defaults as soon as they opened the menus. Unfortunately, once the important settings were ported over, progress of moving things over to Layered Config stalled and we have <em>two</em> active configuration systems for the past five years. The classic, fast, but limited <strong>SConfig</strong>, and the newer, more robust, but sometimes difficult to optimize <strong>Layered Config</strong>.</p>
<p>The fact that Dolphin has two very different Configuration Systems has led to a bit of technical debt, and has limited Dolphin's ability to move forward in some ways. Want a "Return to Default Settings" button? Well, that's not easy to do because there are two active configuration systems. Want to add a certain setting to your Game Config? SConfig settings aren't guaranteed to work in GameINIs! Want to change a setting while playing Dolphin on Android? Well, if that setting is handled by SConfig, odds are you'll have to stop emulation first. The list goes on, but simply moving everything over was a rather big task.</p>
<p>In recent months, <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> has taken the mantle to <em>finally</em> remove all of the remaining reliances on SConfig and simplify Dolphin's configuration system in general. The end goal of all of this will be new, easier ways to manage Dolphin's settings so that you don't need to be an expert to get the most out of your Dolphin experience. But right now, we're still porting over a few stragglers in preparation for bigger things. Stay tuned.</p>
<h3 id="redump-has-made-the-wii-database-public"><strong>Redump Has Made the Wii Database Public!</strong><a class="headerlink" href="#redump-has-made-the-wii-database-public" title="Permanent link">¶</a></h3>
<p>While this isn't directly a <em>Dolphin</em> change, it's a change that affects disc verification. Dolphin's disc verifier can now verify good dumps of Wii games by making use of the <a href="http://redump.org/">redump.org</a> Wii database. In builds with the disc verification feature, notice that Dolphin can now tell you when you're using a good dump of a Wii game. This actually extends backwards to builds <em>before</em> the database was public, as the functionality had been prepped for this eventual release.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/verifywii.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/verifywii_thumb.png"></a>
<figcaption>You can finally be sure if you're using a good dump for Wii games.</figcaption>
</figure>
</div>
<h3 id="macos-gets-some-love"><strong>macOS Gets Some Love</strong><a class="headerlink" href="#macos-gets-some-love" title="Permanent link">¶</a></h3>
<p>macOS has been in an odd position with Dolphin the past few years. We've had to deal with Apple deprecating their already neglected OpenGL support, ignoring Vulkan to set up their own graphics API, and Bluetooth changes to macOS 12 Monterey that took connecting Real Wii Remotes from <em>occasionally possible on a good day</em> to <strong>no chance in hell</strong>. Add in their strict security measures, and it's been very difficult to give users on macOS a good experience when using Dolphin. While there are still some problems, <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong>, along with a few others, have taken up the mantle of maintaining and renovating macOS support in Dolphin. These past three months saw two significant steps forward for the OS.</p>
<h4 id="maybe-someone-should-have-checked-that"><strong>Maybe someone should have checked that</strong><a class="headerlink" href="#maybe-someone-should-have-checked-that" title="Permanent link">¶</a></h4>
<p>Under macOS, our official minimum supported version is macOS 10.13 High Sierra. We do have a High Sierra system on hand for verification, however, after the recent move to the new Universal Builds, we never actually got around to trying those builds on the High Sierra machine. Intel machines were tested, of course, but never ones running older versions of macOS. Since Universal Binaries go all the way back to macOS 10.4.4 Tiger, we weren't worried about it.</p>
<p>Six months after the Universal Builds were introduced and two months after the Intel-only mac builder was turned off, we recieved an <a href="https://bugs.dolphin-emu.org/issues/12752">issue report</a> of macOS failing to launch on a macOS 10.14 Mojave system. Well, there was only one way for us to respond. After digging through a shelf and wiping off some dust, the High Sierra system was retrieved and finally got to see the new Universal Builds. They didn't work. With great irritation our eyes immediately glared toward Qt, after all it was what forced us to a minimum of High Sierra in the first place, but Qt wasn't to blame. <strong><a href="https://github.com/tellowkrinkle">TellowKrinkle</a></strong> found that the Universal builder was set up with a new SDL version that had a minimum support of <strong>macOS 11</strong>, a year-old version of macOS. That's not acceptable at all! Fortunately, once this issue was discovered it was pretty simple to resolve, and now the latest builds of Dolphin run on High Sierra once again. </p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/2012macbook2.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/2012macbook2_thumb.jpg"></a>
<figcaption>A 2012 MacBook Pro running 2022 Dolphin!<br/><sub>Almost ten years old now, this venerable laptop has spent its entire life serving Dolphin, from programming work initially to over five years writing Dolphin blogs, to now helping maintain the bounds of macOS support. It was even the sole macOS testing device for <strong>years.</strong> This MacBook has probably helped Dolphin more than any other single machine, and hopefully it will continue to do so for many more years to come.<sub></figcaption>
</figure>
</div>
<h4 id="notorious-notarizing"><strong>Notorious Notarizing</strong><a class="headerlink" href="#notorious-notarizing" title="Permanent link">¶</a></h4>
<p>Our macOS builds have been signed for years and years, so Gatekeeper's slowly tightening jaws didn't matter to us. That was until macOS 10.14.5 turned on the notarization requirement. Signing your application was no longer enough, now macOS developers were expected to also send a copy of their builds to Apple to have Apple themselves scan it for malware and verify the signing key. We were not very enthusiastic about these strict new requirements. It clashed with our buildbot systems of the time and it would have been non-trivial to implement, so the maintainer chose to not to. Unfortunately for our users, that meant that Gatekeeper now treated our builds as if they weren't even signed.</p>
<p>So for the past two years, users could not simply double click to open new Dolphin builds. Gatekeeper would complain saying that it could not be sure that it was safe and refuse to let Dolphin load. To bypass this, users had to ctrl-click Dolphin and click Open, then click Open in the resulting prompt. Then Dolphin would open... or the prompt would disappear and require the user to double click on Dolphin manually. If anyone knows why it did that sometimes please let us know, that quirk made explaining this process to new users an absolute nightmare.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/gatekeepersaysno.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2022-january/gatekeepersaysno.png"></a>
<figcaption>Every macOS Dolphin user has seen this screen <em>A LOT</em>.</figcaption>
</figure>
</div>
<p>Regardless of the problems of the past, <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> sorted out most of the pain with notarization and the new Universal buildbot was painlessly updated to include it. Now the latest builds will run on macOS <em>without</em> all of those annoying popups and workarounds. Just double click Dolphin and it works, how novel!</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2021-11-01&to=2022-02-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-15448/">5.0-15448</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-15993/">5.0-15993</a>!</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>
Dolphin Progress Report: September and October 2021
2021-11-13T07:36:31+00:002023-02-15T09:31:00.494961+00:00JMC47https://dolphin-emu.org/blog/authors/JMC47/https://dolphin-emu.org/blog/2021/11/13/dolphin-progress-report-september-and-october-2021/
<header>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/progressreportheader-oct2021.jpg" />
<img class="mini" src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/progressreportheader-oct2021mini.jpg" />
</header>
<p>It's the beginning of the month and time for another Dolphin Progress Report! ...That line doesn't exactly work when it's midway through the month, huh? This Progress Report ended up being a very technically challenging report to write with several huge rabbit holes that go through the history of Dolphin and the games themselves. The first rabbit hole showcases TMEM, the GameCube and Wii's texture cache. Dolphin's approach to emulating this bit of the hardware has been to effectively ignore it exists. Trying to even <em>begin</em> to rectify the problems with this approach and explain the reasoning behind why it <em>sort of</em> wasn't emulated go very, very deep. This Progress Report also contains collaboration with the <a href="https://pcsx2.net/">PCSX2</a> development team as they helped us understand some of the behaviors of Floating Point Math on the PlayStation 2. The fact that the PlayStation 2's floating point behaviors mattered to us for this Progress Report <em>should</em> tell you the kinds of things we were up against when writing up the changes.</p>
<p>If that wasn't enough, Dolphin also welcomed support for a wealth of mods through support for <strong>Riivolution</strong>. An easy to use GUI for launching Riivolution mods was added both to desktop Dolphin builds <em>and</em> Android. Speaking of Android, users may have noticed we pushed out an early beta last month. This beta was mostly to showcase and let users on the Play Store try out the newly finished Cheat GUI! We'll finally showcase that after a lengthy delay between when that extra beta was pushed and this Progress Report. While it's not related to Dolphin <em>directly</em>, Apple released the new M1 Max and we got our hands on one to see how it stacks up against the M1 with some rather interesting performance numbers at the end of the report.</p>
<p>With that out of the way, there's no point in delaying things any further. Please enjoy these rather lengthy Notable Changes!</p>
<p><a id="cuthere"></a></p>
<h3 id="notable-changes"><strong>Notable Changes</strong><a class="headerlink" href="#notable-changes" title="Permanent link">¶</a></h3>
<h4 id="50-15178-android-update-gui-for-cheat-management-and-creation-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15178">5.0-15178 - Android: Update GUI for Cheat Management and Creation</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15178-android-update-gui-for-cheat-management-and-creation-by-josjuice" title="Permanent link">¶</a></h4>
<p>Dolphin has the ability to hook in various types of cheat codes and patches, so even though the Android version lacked the GUI for it, it has always had the ability to use cheat codes. For the past couple of years, enterprising Android users have gone through the trouble of setting up cheat codes by hand through text editors or using the Desktop version to create the settings files they wanted. Some forks of Dolphin even hooked a <em>conventional text editor</em> into the program to try and make editing cheats easier! But all of these stopgaps weren't actual solutions, they were working around the problem. Someone had to get down and dirty and make serious additions to the Android GUI if we were to ever have a permanent solution.</p>
<p><strong><a href="https://github.com/JosJuice">JosJuice</a></strong> has been dealing with <a href="https://dolphin-emu.org/download/dev/master/5.0-14066/">Android</a> <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14203-android-fix-controller-inputs-not-saving-properly-by-josjuice">issues</a> <a href="https://dolphin-emu.org/blog/2021/04/05/dolphin-progress-report-february-and-march-2021/#50-13944-add-gpu-syncing-options-to-android-gui-by-josjuice">for</a> <a href="https://dolphin-emu.org/blog/2021/02/11/dolphin-progress-report-december-2020-and-january-2021/#50-13386-use-storage-access-framework-scoped-storage-for-the-gamelist-on-android-by-josjuice">quite</a> <a href="https://dolphin-emu.org/blog/2021/02/11/dolphin-progress-report-december-2020-and-january-2021/#50-13440-make-wii-save-import-behave-more-like-sd-import-by-admiralcurtiss-and-50-13562-android-add-wii-save-import-functionality-by-josjuice">some</a> <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#the-android-user-experience-overhaul">time</a>, and has become more familiar with the JNI (Java Native Interface) that powers the Android GUI. Much like how DolphinQt calls into Dolphin to handle things like enabling/disabling cheats and editing GUIs, <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> completely replicated Dolphin's Cheat interface without duplicating the core code within Android. This means all of the same features that you already enjoy on desktop related to enabling, disabling, and adding cheats are all there, and work exactly the same!</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidcheatsui.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidcheatsui_thumb.png"></a>
<figcaption>The cheats menu finally arrives in Android.</figcaption>
</figure>
</div>
<h4 id="50-15438-android-comply-with-scoped-storage-requirements-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15438">5.0-15438 - Android: Comply with Scoped Storage Requirements</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15438-android-comply-with-scoped-storage-requirements-by-josjuice" title="Permanent link">¶</a></h4>
<div title="The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License." style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:15%; min-width:72px; float:right; text-align:center;">
<img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2017-april/android-logo-peeking.png">
</div>
<p>The fated day has finally come. <a href="https://dolphin-emu.org/blog/2021/02/11/dolphin-progress-report-december-2020-and-january-2021/#50-13386-use-storage-access-framework-scoped-storage-for-the-gamelist-on-android-by-josjuice">Nearly a year ago</a> we expressed our frustrations with the upcoming Scoped Storage requirement in Android. Since then... not much has changed about our concerns, but <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> has done their best in order to make sure the experience of Dolphin on Android doesn't change much. The main difference is that Dolphin is now locked to using an app-specific directory for a majority of its user files on Android 11 and up.</p>
<p>Unlike some other emulators, Dolphin does not have the option to simply ask for permission to use other directories. For managing things like the Wii NAND and GameCube GCI folders, Dolphin is reliant on accessing tons of files in quick order. If access to those files is too slow, the user may see noticeable lag, or in dualcore games could even crash. When using directories <em>other than the app-specific one</em>, performance on accessing files is terrible, so much so that it would impact emulation in a negative manner. This doesn't apply to your games however, as when using most game formats in Dolphin, you're only accessing a single file. The main culprit in Scoped Storage performance issues is dealing with <em>many smaller files</em>.</p>
<p>Using the app-specific directory may not seem like a big deal, but there are some tricky things to keep in mind. First of all, you will have an <a href="https://www.reddit.com/r/Android/comments/j3zgmm/managing_files_in_the_androiddata_folder_on/">incredibly difficult</a> time trying to copy files into the app-specific directory with the default file manager on Android 11 and up. This is problematic as things like the Wii NAND and Texture Packs need to be in the app-specific directory. The good news is, if you have a PC, you can connect your phone and navigate to the new directory (Android/data/org.dolphinemu.dolphinemu/files/) the same as the old one on most devices. Some users have reported difficulties editing these folders on certain devices, but we've been unable to verify the reports to this point. While this may be a bit frustrating, our biggest fear with Scoped Storage was that, by default, uninstalling Dolphin would <em>delete user files including save data</em>. Thankfully, there is a work-around to that problem provided by Android called <em>fragile userdata</em>. Essentially, we mark the files in Dolphin's app-specific directory as fragile, so if you uninstall Dolphin to downgrade, bisect, or do something else where you would want to reinstall it later, Android will ask you if you want to keep the App's data files. <strong>This only works when uninstalling from Android itself; if you uninstall from the Play Store you will lose all of your data</strong>.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/scopestoragedelete.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/scopestoragedelete_thumb.png"></a>
<figcaption>If you want to protect your savefiles and other user data when uninstalling Dolphin, make sure to *not* delete your user data!</figcaption>
</figure>
</div>
<p>There is one other exception we should note. Scoped Storage does not apply to you if you upgrade from an older version of Dolphin <em>without ever uninstalling it</em>. So if you download <a href="https://dolphin-emu.org/download/dev/207c931a04c8e2629a735bc2b3f36b5c89365ca7/">5.0-15260</a>, for example, and then just continually upgrade without ever uninstalling, then Scoped Storage won't come into effect for you until Google closes this loophole. Though going through that trouble shouldn't really be necessary as all of the known issues have already been quelled. Unless you <em>specifically</em> need things like custom directories for tons of Wii NANDs that cannot be within the app-specific data directory for some reason, you shouldn't see much of a difference if any with the latest builds.</p>
<p>For more information on if Scoped Storage affects you, please check <a href="https://wiki.dolphin-emu.org/index.php?title=Controlling_the_Global_User_Directory#Android">Dolphin's Wiki</a>.</p>
<h4 id="50-15249-add-broken-dual-source-blending-bug-to-moltenvk-on-intel-gpus-by-oatmealdome"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15249/">5.0-15249 - Add broken dual source blending bug to MoltenVK on Intel GPUs</a></strong> by <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong><a class="headerlink" href="#50-15249-add-broken-dual-source-blending-bug-to-moltenvk-on-intel-gpus-by-oatmealdome" title="Permanent link">¶</a></h4>
<p>MoltenVK was introduced to Dolphin 3 years ago, and it has since become the defacto backend for macOS users wanting to play games in Dolphin. However, it hasn't exactly been smooth sailing. In many games, such as <a href="https://wiki.dolphin-emu.org/index.php/Super_Mario_Galaxy">Super Mario Galaxy</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Sonic_Colors">Sonic Colors</a>, and <a href="https://wiki.dolphin-emu.org/index.php?title=Category:Paper_Mario_(Series)">the Paper Mario games</a>, have considerable geometry flickering when MoltenVK is used on some Macs.</p>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/soniccolors-flicker.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/soniccolors-flicker_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>This got old pretty fast.</figcaption>
</figure>
</div>
<p>We assumed it was a MoltenVK bug and ignored it, thinking that it would be fixed eventually in a MoltenVK update. After the issue remained for three years, macOS and iOS veteran <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> decided to look into this longstanding issue and sus out the source. It turns out it MoltenVK wasn't the issue at all, but <em>Intel's macOS graphics drivers</em>. On newer Macs with Intel Graphics, if <code>ocol1</code> is present in the fragment shader and dual source blending is enabled, entire primitives will not be written to the depth buffer if any fragment is discarded. There's our flickering. Fortunately (or unfortunately), we have already experienced dual source blending issues on other drivers, so we already have a fallback path set up that only allows dual source blending when absolutely necessary. <strong><a href="https://github.com/OatmealDome">OatmealDome</a></strong> added Intel Graphics on macOS to the list and now the flickering is gone.</p>
<div class="media-block narrower">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/soniccolors-deflicker.mp4">
<video autoplay muted loop playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/soniccolors-deflicker_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Now Mac owners with newer Intel Graphics finally can play games without flickering!</figcaption>
</figure>
</div>
<h4 id="50-15294-extend-minimal-tmem-cache-implementation-by-phire"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15294">5.0-15294 - Extend Minimal TMEM Cache Implementation</a></strong> by <strong><a href="https://github.com/phire">phire</a></strong><a class="headerlink" href="#50-15294-extend-minimal-tmem-cache-implementation-by-phire" title="Permanent link">¶</a></h4>
<p>In the early years of Dolphin's life, developers were very limited in what they could do to emulate the GameCube and Wii. These consoles are quite different from PCs, and most of the tricks that today's computers can use to work around these differences simply didn't exist back then. So developers did whatever they had to, and usually that meant <em>hacks</em>, but sometimes that even meant <em>not</em> emulating something if that happened to work. Now that proper emulation is possible, for the past eight years Dolphin has been unraveling those knots, replacing hacks with better solutions as they come up. However, a lot of these old tricks still remain, especially in cases where they aren't a major source of issues and/or where the work required to replace them would be very high. And one of those such places is emulating the GameCube and Wii's texture cache - TMEM. </p>
<div style="margin-top: .5em; margin-left:2em; margin-bottom:1em; max-width:25%; min-width:72px; float:right; text-align:center;">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/flipperdieshot_zoom.png"><img style="max-width: 100%;" src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/flipperdieshot.jpeg">
</a>
<p><a href="https://www.ign.com/articles/2001/10/12/ati-discusses-flipper-part-2"><sub>SOURCE</sub></a></p>
</div>
<p>Texture Memory (TMEM) is a 1MiB piece of super fast SRAM that lives within the consoles' GPU. Not large enough to hold a frame but much faster than going to Main Memory (10.4 GiB/s for TMEM vs 2.6 GiB/s to Main Memory), TMEM by default operates as a hardware-managed texture cache that is completely transparent to the game. In this hardware mode, TMEM sits inbetween Main Memory and the GPU and caches every 32 byte texture chunk it can, so if the GPU asks for a texture that happens to be in TMEM, TMEM will provide it instead of Main Memory and the GPU gets it much faster. There are limitations to this of course. While TMEM is HUGE for a texture cache of the period (the PS2's texture cache is 8KiB, for reference), it can still only hold so much, so texture chunks are constantly flowing in and out of the cache every frame. Also, the game can edit textures in Main Memory at any time and TMEM will never know. As such, TMEM is expecting games to explicitly order a TMEM invalidation in this event.</p>
<p>Dolphin ignored all of that. In fact, it ignored that the consoles even have a texture cache. Instead, Dolphin <em>kind of</em> replaced the TMEM's hardware mode with <em><strong>Dolphin's Texture Cache</strong></em>.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/luigiscream.jpg">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/luigiscream_thumb.jpg"></a>
<figcaption>A Dolphin developer after hearing "Dolphin's Texture Cache".</figcaption>
</figure>
</div>
<p>Textures straight from the GameCube or Wii will not work on modern GPUs; Dolphin needs to convert them. This takes time and processing power, so Dolphin stores converted textures in a cache on the host GPU for a long time to make the most of this work. However, this cache would balloon to enormous scale if it isn't constantly pruned as even the tiniest variation is stored as a separate texture in the cache, so Dolphin has a <em><strong>horrifying cacophony</strong></em> of heuristics to guess what textures a game will or won't use every frame. It's terrifying, and no sane Dolphin developer <em>will even go near it.</em></p>
<p>In Dolphin, it is Dolphin's Texture Cache, not TMEM, that is sitting inbetween the GPU and Main Memory. As such, Dolphin's Texture Cache should be respecting TMEM's behaviors to be accurate. It wasn't. Instead, every draw call Dolphin simply hashed all textures in Main Memory, and if the hash didn't match, Dolphin would invalidate the cached copy. That's it. This is what Dolphin does for <em>every texture</em> already, so Dolphin is more or less ignoring that the consoles have their own texture cache at all. Yet for the majority of Dolphin's catalog, this is fine. As TMEM's hardware-mode texture cache is transparent to the game anyway, Dolphin could just take the texture caching job and implement it in a way that worked best for Dolphin, and everything just worked. <em>Mostly.</em></p>
<p>Four years ago <strong><a href="https://github.com/phire">phire</a></strong> discovered one of the limitations of this strategy. <a href="https://wiki.dolphin-emu.org/index.php?title=Spyro:_A_Hero%27s_Tail">Spyro: A Hero's Tail</a> has a highly complex SDR bloom effect which uses 16 EFB copies to build, where it reads the screen then blurs and brightens multiple copies of what it read before stacking them all on top of eachother for scanout to the screen. As it is manipulating textures in Main Memory, the game dutifully invalidates TMEM along the way - except for one step.</p>
<p>In one of the stages of the process, <em>A Hero's Tail</em> orders the GPU to scale a texture from Main Memory up to twice the size. While performing this operation the GPU reads the texture in Main Memory, and TMEM automatically caches it. Then the game EFB copies the 2x version over the original copy in Main Memory while explicitly NOT invalidating the cached version in TMEM. The game then reads from the 1x original in TMEM to generate another texture which it writes elsewhere in Main Memory, then invalidates TMEM. This is a bit of an abuse of the GameCube hardware to help build a complex effect. Dolphin, however, couldn't do this. Dolphin's "emulation" of hardware-mode TMEM and Dolphin's Texture Cache for converted textures in Main Memory <em>are one and the same</em>; it ignored that the consoles have a seperate cache that may have different contents than Main Memory. If something was changed in Main Memory, the version in Dolphin's Texture Cache was automatically changed too. So in Dolphin, when Spyro overwrote the texture in Main Memory with the 2x version, Dolphin did just that, but there was no other cache that still contained the 1x version. When the game tried to read the 1x size version from TMEM, Dolphin's Texture Cache gave it the 2x version instead, breaking the bloom effect. </p>
<div class="media-block wider">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-bug1.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-bug1_thumb.jpg" alt="spyro-bug1.png" /></a>
<figcaption>Store EFB Copies to Texture Only resulted in bloom haphazardly dragging across the screen.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-bug2.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-bug2_thumb.jpg" alt="spyro-bug2.png" /></a>
<figcaption>Store EFB Copies to Texture and RAM resulted in bloom nonsensically flickering anywhere it felt like it.</figcaption>
</figure>
</div></div>
<p><strong><a href="https://github.com/phire">phire</a></strong>, as later cleaned up by <strong><a href="https://github.com/mimimi085181">mimimi</a></strong>, dealt with this by adding a backdoor that allows Dolphin to bypass the hash check if a heuristic determines it is safe to do so. With this, some changes to cached textures are allowed to occur without invalidating the cached copy as long as the texture was the same size, the same address, and no explicitly requested TMEM invalidation took place. Since <a href="https://wiki.dolphin-emu.org/index.php?title=Spyro:_A_Hero%27s_Tail">Spyro: A Hero's Tail</a>'s bloom fell within that criteria, Dolphin now keeps both the 1x version of the texture and the 2x version of the texture in Dolphin's Texture Cache, allowing the bloom effect to be built correctly.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-working.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2017-august/spyro-working_thumb.jpg"></a>
<figcaption>Bloom now works in EFB Copies to Texture+RAM, and works with EFB Copies to Texture Only as long as you aren't underwater. That's a different bug.</figcaption>
</figure>
</div>
<p>This isn't proper hardware-mode TMEM emulation, not even by a longshot. Dolphin's wildly different texture caching approach is still there - the patch essentially added a dirty heuristic to “do the right thing” in an edge case. But this was still an important step toward accurate emulation, as it broke Dolphin’s longstanding assumption that textures were always fetched directly from Main Memory and introduced basic awareness of TMEM.</p>
<p>However, there is a reason why no one wants to touch Dolphin's Texture Cache. After this change, a slow trickle of regressions started to flow.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/uhoh.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/uhoh.png"></a>
<figcaption>Uh oh.</figcaption>
</figure>
</div>
<p>The common thread through most of these games is FMVs. Their videos would become stuck, only playing audio. While the games themselves didn't freeze, this regression made it frustrating to play certain games or impossible in the case of <a href="https://wiki.dolphin-emu.org/index.php?title=NHL_Slapshot">NHL Slapshot</a>.</p>
<div class="media-block narrower">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/zerogravityfmv-broken.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/zerogravityfmv-broken_thumb.png"></a>
<figcaption>Imagine a bunch of music and sound effects playing behind this for a few minutes.</figcaption>
</figure>
</div>
<p>So what are these FMV games doing differently from other games with FMVs? Normally, games will store many frames in a buffer in Main Memory, streaming a frame at a time as it goes through the buffer. Once it reaches the end of the buffer, it loops around to the beginning where new frames are waiting. That method of FMV streaming still worked fine after the heuristic was added. But the games above (minus <a href="https://wiki.dolphin-emu.org/index.php?title=NHL_Slapshot">NHL Slapshot</a>) share a common FMV library that, in a curious choice, has a buffer in Main Memory of <em>one frame</em>. To the GameCube and Wii's GPU it appears that the same texture is being reused over and over again, because technically <em>it is;</em> the texture is just being updated outside of the GPU's awareness. However, it is hardware-mode TMEM's job to cache textures that are used repeatedly, and it does indeed cache this texture. If TMEM delivered that cached frame, the FMV would become stuck just like Dolphin did after adding the heuristic. However, each frame is too large to fit into TMEM. Once TMEM is full, it just keeps caching, replacing the first parts of the texture with new parts. After the draw call is complete and the GPU asks for the frame again, TMEM notices that it doesn't contain the first parts of the texture, so TMEM lets the GPU get it from Main Memory instead. The FMV library doesn't even need to worry about explicitly invalidating TMEM, as the size limitation naturally invalidates it and prevents the cached frames from appearing on screen.</p>
<p>Dolphin's Texture Cache, however, didn't care at all about hardware-mode TMEM or the fact that it has limited space. It cached the entire texture, and when the GPU called for it again, Dolphin's Texture Cache provided it. And over and over it goes, displaying the first frame of the FMV over and over again until the FMV is done. Before the addition of the heuristic, Dolphin was <em>so simple</em> it managed to escape this trap. The hash check caught the changing contents of the texture in Main Memory and <em>coincidentally</em> followed the pattern the game expected by invalidating the cache texture after the frame was changed. But the heuristic determined (correctly) that the same texture was being reused and bypassed that hash check, allowing it to be cached and breaking the FMVs.</p>
<p>To fix this, Dolphin was going to need to start caring about what fits into TMEM. <strong><a href="https://github.com/phire">phire</a></strong> returned to do just that, with an expanded version of their original work that make's Dolphin's hardware-mode TMEM emulation able to keep track of the contents of TMEM and whether or not an incoming texture is too large for it. This allows Dolphin's TMEM hash bypassing heuristic to be much better at estimating whether or not an invalidation is necessary, and brings Dolphin a little bit closer to actual hardware-mode TMEM emulation. </p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/zerogravityfmv-working.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/zerogravityfmv-working.png"></a>
<figcaption>Now we can see the FMVs in their full motion-captured glory once again.</figcaption>
</figure>
</div>
<p>The odd one out for this whole case is <a href="https://wiki.dolphin-emu.org/index.php?title=NHL_Slapshot">NHL Slapshot</a>. It's bug is not related to FMVs at all, instead, it has columns of static graphics during gameplay. We're not completely sure what's going on with this one. We know it is also not respecting the TMEM invalidation rules, and that it is continuously reusing a texture like the FMVs did, presumably for some sort of post-processing effect. But it was fixed before we got the chance to look into it in detail.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/slapshot-broken.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/slapshot-broken_thumb.jpg"></a>
<figcaption>This is not playable.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/slapshot-working.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/slapshot-working_thumb.jpg"></a>
<figcaption>Now the players are much more visible.</figcaption>
</figure>
</div></div>
<p>Of course, this is still yet another patch for our not-emulation of TMEM. Rather than actually emulating TMEM so quirks in its behaviors just occur naturally, we're manually accounting for those quirks and stepping in to force it to work. This approach is fixing games, but it is a very unsatisfying solution that is definitely not ideal. It is <strong><a href="https://github.com/phire">phire's</a></strong> intention to eventually remake this whole system and genuinely emulate TMEM. It won't be easy, but it is possible with modern APIs. <strong><a href="https://github.com/phire">phire</a></strong> promises it will be done within this century, so we wait with bated breath.</p>
<h4 id="50-15330-raise-program-exceptions-on-floating-point-exceptions-by-josjuice"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15330">5.0-15330 - Raise Program Exceptions On Floating Point Exceptions</a></strong> by <strong><a href="https://github.com/JosJuice">JosJuice</a></strong><a class="headerlink" href="#50-15330-raise-program-exceptions-on-floating-point-exceptions-by-josjuice" title="Permanent link">¶</a></h4>
<p><a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> has shown up on the Dolphin Progress Report a <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#the-mmu-swapping-code-into-and-out-of-aram">couple</a> of <a href="https://dolphin-emu.org/blog/2020/02/07/dolphin-progress-report-dec-2019-and-jan-2020/#50-11318-add-memory-management-unit-settings-to-main-gui-and-disable-by-default-by-josjuice">times</a> now. It's been laughed at for being an incredibly buggy, broken game, that was a stress test for Dolphin's memory management due to how much it swapped data and code between MEM1 and ARAM. But there was another intriguing thing about the game: the game would instantly crash in Dolphin when standing on any kind of dynamic object and no one knew why. This was the primary reason why people within the project knew the game existed, and over the course of seven years, developers spent <em>hundreds</em> of hours debugging the issue. Just glancing at it, we thought it was a typical bad game, but the more we were able to play it the more we realized just how wrong we were.</p>
<p>From the outside, the issue plaguing Dolphin seemed to be simple enough. The game ran fine, but any time your character contacted a physics object, the game would freak out and send you out of bounds. Because of a separate JIT bug, Dolphin would then crash. This isn't especially surprising to see in an emulator, as improperly emulating a CPU instruction can result in the wrong values being passed and eventually result in strange clipping issues or other problems that compound into the catastrophic failure you see here. For the longest time, we thought there was a bug somewhere in Dolphin's CPU emulation but we didn't have many leads. Thankfully, the game <em>actually</em> has a (semi) functional debug menu that let us examine the actual positional coordinates of the player during the crash!</p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9">
<video controls muted playsinline>
<source src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrime-debug_thumb.mp4" type="video/mp4"/>
</video></div></a>
<figcaption>Pause, go to the map screen. Hit right, then Hold L and R as it transitions and then tap left to access the debug menu. <br/><sub>Click to play. Click <a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrime-debug.mp4">here</a> for fullsize.</sub></figcaption>
</figure>
</div>
<p>Unknown issues to developers are like a lamp is to mosquitos. The fact that no one knew what was going wrong just made it all the more enticing to fix! <strong><a href="https://github.com/booto">booto</a></strong> literally followed a bad NaN (Not a Number) value backwards through tons of functions before eventually finding an operation on an INF (Infinite) that came from a divide by zero, but even then it didn't seem like Dolphin was doing anything wrong. As far as everyone could tell, Dolphin was behaving correctly. By the time 2020 rolled around, <a href="https://dolphin-emu.org/blog/2020/10/05/dolphin-progress-report-july-and-august-2020/#50-12575-jit-codegen-space-reuse-by-admiralcurtiss">developers started to realize this was anything but an ordinary game</a>. Rather, it had a <em>special</em> quality about it. At first developers lashed out against it, calling it garbage game that was poorly coded. And why wouldn't they? The game <em>is</em> super buggy and barely functional on console. In fact, the game will <em>crash</em> if you try to debug it with a USB Gecko, meaning that we couldn't even test to see what was happening in memory on console. All seemed lost... when something amazing happened.</p>
<p><strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong>, after having felled several other difficult problem games, decided that <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> was worth a look. From there, they realized a rather sickening truth: The fact that the physics engine was dividing by zero wasn't a bug in Dolphin. It was all part of the game's plan. On Dolphin, these DIV0s would result in INFs, which then would become NaNs when used in other math operations that would result in the crashes. Until this point, we thought the way to fix the NaNs would be to stop the DIV0s, but <strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong> realized that the <em>game itself</em> was using a custom Floating Point Exception handler to catch DIV0 exceptions and stop the INFs/NaNs from happening. Throughout the entire GameCube/Wii library, no one had run into anything like this so there was some skepticism that this was really happening, but the evidence was pretty strong. </p>
<p>Rather than investing a ton of time modifying Dolphin to support a custom Floating Point Exception handler without even knowing if the hypothesis was correct, <strong><a href="https://github.com/smurf3tte">smurf3tte</a></strong> instead hacked up the JIT to replicate what the Floating Point Exception Handler in <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> would have done. Paydirt. This hacked up build unlocked Pandora's Box and could finally emulate <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>. It wasn't a "real" solution, but for the first time we could examine the game and how it worked. Now the mystery became <em>why</em>. Why in the world was the game doing this? To do that, we had to dive into the game's history and collaborate with emulator devs from across the land.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot1.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot1.png"></a>
<figcaption>The GameCube version of True Crime: New York City is something else sometimes...</figcaption>
</figure>
</div>
<hr />
<p>The latter half of the sixth gen of consoles was the era of the "Grand Theft Auto Clone". After the success of Grand Theft Auto III, everyone wanted to get a piece of the action. <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_Streets_of_LA">True Crime: Streets of LA</a> was a surprise hit and one of the more well-liked GTA clones of the era. It was successful enough to spawn a sequel, which leads us to <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>. With a bigger budget and a taste of success, they set out to make an absolutely massive game with a huge scope. It's easy to point and laugh at it now, but looking back it was clear that the developers were trying to make a special product, even if the final game didn't turn out well. Something as simple as driving down the streets is rather impressive as you can use a <em>real map of New York City</em> instead of the in-game map and actually get around!</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/126thBroadwayTrueCrime.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/126thBroadwayTrueCrime_thumb.jpg"></a>
<figcaption>You can navigate the game reasonably well using directions from GPS providers.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/126thBroadwayGoogleMaps.jpg"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/126thBroadwayGoogleMaps_thumb.jpg"></a>
<figcaption>This is the same spot in-game on <a href="https://www.google.com/maps/place/17+Convent+Avenue/@40.8161969,-73.9574991,3a,90y,298.08h,93.58t/data=!3m6!1e1!3m4!1sUjEzCt48-tOvSE2YE1ewjg!2e0!7i16384!8i8192!4m5!3m4!1s0x89c2f66c705c463f:0x168e14a883923883!8m2!3d40.8133141!4d-73.9529487">Google Maps</a>.</figcaption>
</figure>
</div></div>
<p>For a sixth generation open world game, the map is absolutely huge and densely packed with detail. The world isn't static either; as you clean up New York City, both the exteriors and interiors of buildings will change depending on what you do. If you're a bad cop ignoring crimes and just chasing your own goals, buildings get vandalized, windows are shattered, and stores across the city close down. On the other hand, being a good cop makes the place look nicer. Plants are watered, interiors clean up, and there are even nicer cars on the streets. This even spills into gameplay, as cleaner parts of the city have stores stay open later, which gives you more time to buy health items, weapons, and other upgrades during critical missions.</p>
<p>The story itself also had a lot of potential, with a lot of big name voice actors, <em>branching</em> missions where you can fail them and have to find a new lead, and tons of side activities that you'd expect in an open world game, including dynamically generated crimes. When we first started looking into <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>, we thought it was just a case of incompetent developers making a bad game, but everything we saw while playing it made us realize that this wasn't the case. The people behind this game obviously cared about the product and put a ton of thought into the mechanics to really make the world <em>breathe</em>. Unfortunately, development constraints like budget and time cut out massive parts of the game, limited testing, and rushed the game out the door in an obviously unfinished state. And <em>this</em> is just referring to the original PS2 version. The ports weren't quite as lucky.</p>
<p><br/>
<center><blockquote class="twitter-tweet" data-dnt="true"><p lang="en" dir="ltr">It... took me 15 years to realize True Crime: New York City has broken engine sounds on PC. Compare this to Xbox gameplay, where engine revs actually <em>do</em> change 😖<a href="https://www.youtube.com/watch?v=Gd5atcKpGBY&t=65s">https://www.youtube.com/watch?v=Gd5atcKpGBY&t=65s</a></p>— Silent (@__silent_) <a href="https://twitter.com/__silent_/status/1432083265112924162?ref_src=twsrc%5Etfw">August 29, 2021</a></blockquote></center>
<br/></p>
<p>The PC version is... special. Framerate is inconsistent, sounds are broken/missing, and playing the game on a modern computer is an exercise in futility. The Xbox version <em>looks</em> competent on the surface, but the developers accidentally pushed the <em>wrong build of the game into production</em> according to what we know. The build they pushed has extra AI pathing issues, physics issues, and a mid-boss where the throw mechanic is broken, instead requiring <em>frame perfect inputs</em> or else you'll be softlocked. But none of these other versions can prepare you for the atrocity that is the GameCube version of the game. After playing the game for a few weeks, we've found so many issues with it that <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">Dolphin's Wiki Entry</a> on the game contains a list of bugs for users <em>not to report</em> because they are confirmed to happen on console. While the other three versions of the game look <em>relatively</em> close at a glance, the GameCube version is missing tons of effects and textures and looks like a plastic toy in comparison.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrimecomparisongc.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrimecomparisongc_thumb.jpg" /></a>
<figcaption>Dolphin can only do so much for the GameCube version. It's lacks many of the game's special effects, has much worse shading, and the texture resolution is abysmal.</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrimecomparisonps2-adjusted.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/truecrimecomparisonps2_thumb.jpg" /></a>
<figcaption>On PCSX2, emulating this game currently requires the software renderer, which means it only renders at native resolution. However, the superior texture quality and shading are immediately evident.</figcaption>
</figure>
</div></div>
<p>While both the Xbox and GameCube version were ported by <a href="https://en.wikipedia.org/wiki/Exakt_Entertainment">Exakt Entertainment</a>, it appears that the GameCube version got far less effort overall. Lighting and shading has been simplified resulting in a flatter looking world, especially during daytime scenes. A lot of other effects are missing completely, such as water physics in flooded basements. Perhaps because the GameCube used mini-DVDs, even texture quality has seen a massive downgrade, with some textures removed and everything being blurrier overall. They even broke the Main Menu, which is just a black screen with text on the GameCube version while the other versions have the Main Menu running on top of the backdrop of the city.</p>
<p>If all of these downgrades meant the GameCube version <em>ran</em> better, maybe it would be forgivable, right? If so, they were <em>really</em> struggling as the game runs a silky smooth <em>12 to 20</em> FPS while driving around the city on console. If you have a powerful PC and turn up the emulated CPU clock rate to ~170%, you can get a stable 30 FPS when emulating it. This is the one saving grace of running the game in Dolphin, as it makes driving around the city much more pleasant than it could ever be on console. Even then, the port still sucks and we haven't even gotten to the actually problematic part of the port: the physics engine!</p>
<p>As we said above, the physics engine is flooded with NaNs when playing the game on Dolphin. The reason why is because the PlayStation 2 supports <a href="https://forums.pcsx2.net/Thread-blog-Whats-clamping-And-why-do-we-need-it">extended floats</a>. Rather than doing things how most other processors, such as PowerPC, x86-64, AArch64, etc. handle things, the PS2 decided that it would be faster to throw away all of that pesky error checking and special casing when handling floating point math. With the help of developers that work on the PlayStation 2 emulator, <a href="https://pcsx2.net/">PCSX2</a>, we started to learn about just how devious that console was when it came to Floating Point Math.</p>
<p><br/></p>
<pre><code>GameCube:
1/0 = INF
sqrt (-4) = NaN
INF - 1000 = INF
INF/INF OR INF - INF = NaN
PlayStation 2:
1/0 = Greatest Positive Float Number (0x7ffffffff)
sqrt (-4) = sqrt(abs(-4)) = 2
7fffffff - 1000 = 7fffefff
7fffffff/7fffefff = 1
</code></pre>
<p><br/></p>
<p>Essentially, the PlayStation 2 doesn't really have INF or NaN. One of the reasons that our friends working on <a href="https://pcsx2.net/">PCSX2</a> have so much trouble emulating Floating Point Math on modern computers is because it's just not possible to emulate it quickly and correctly at the same time. We asked for a quote regarding their thoughts on Floating Point Math on the PS2, unfortunately due to the <em>mostly</em> worksafe nature of the Dolphin Progress Report, we didn't see it fit to broadcast such harsh language and we do not approve of insulting one's mother, even if it is the mother of a mathematical concept.</p>
<p>The important part to note about this is that <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> divides by zero <strong>a lot</strong>. As in, every single time you step on a dynamic object, these divide by zeroes flood the physics engine to the point where we had to assume there was something wrong with Dolphin's emulation of a CPU instruction. We never actually considered that the game engine was doing all of this on purpose... yet, we now know that is indeed the case. It is likely <a href="https://en.wikipedia.org/wiki/Exakt_Entertainment">Exakt Entertainment</a> didn't have the time nor budget to rewrite and fix up the physics engine to get rid of the INFs. So their solution was to let the game divide by zero, raise an exception to be handled by their custom floating point exception handler, and change the INF to zero. This left us in the awkward position of needing to implement support for Floating Point Exception Handling, something that the developers who designed Dolphin's JIT never expected to need.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot5.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot5_thumb1.jpg"></a>
<figcaption>Where is the person I'm supposed to arrest?</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot5.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot5_thumb2.jpg"></a>
<figcaption>Oh.</figcaption>
</figure>
</div></div>
<p>With us finally able to understand what was going wrong, the hard part of solving the problem was over. Now all developers had to do was add support for custom floating point exception handlers. The easiest way to do this was to add support to Dolphin's CPU interpreter, and then modify the JIT instructions so that they fallback to the interpreter when FPE handlers are enabled. And that's exactly what we did. The only downside is that there is a performance penalty to using the interpreter for these instructions, but it ended up not being a big deal.</p>
<p>By default, Floating Point Exception Handling is <strong>disabled</strong>. It was important that we don't let this change impact performance across the library just to support <em>one</em> really weird game. Then there are two settings for <em>enabled</em> Floating Point Exception Handling, with one of which being used for <em>two</em> games in their INI settings. The first is to enable Floating Point Exception Handling for DIV0 (Divide By Zero) exceptions. This allows Dolphin to emulate <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> and another game ported by <a href="https://en.wikipedia.org/wiki/Exakt_Entertainment">Exakt Entertainment</a>, <a href="https://wiki.dolphin-emu.org/index.php?title=Call_of_Duty:_Finest_Hour">Call of Duty: Finest Hour</a>, both of which rely on catching DIV0 exceptions to prevent game issues. However, that isn't <em>correct</em> emulation, so there is a second option that allows you to enable <em>Full Floating Point Exception Support</em>. This option is <em>incredibly</em> slow but allows Dolphin to accurately emulate console behavior when dealing with Floating Point Exceptions, even when the game is using a custom handler. This more or less exists for people working on homebrew or if we run into any unknown problems in the future that <em>maybe</em> would need full accuracy in this department.</p>
<p>Note, the original hack by <strong><a href="https://github.com/Smurf3tte">Smurf3tte</a></strong> didn't have much of a performance penalty, but it also wasn't a real solution. Adding a bunch of code to the JIT to support <em>just</em> <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a>, not even <a href="https://wiki.dolphin-emu.org/index.php?title=Call_of_Duty:_Finest_Hour">Call of Duty: Finest Hour</a>, just isn't reasonable. Even with the interpreter solution we chose, both games run full speed on modern computers, and the DIV0 fallbacks don't cost very much performance.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrime-CutSecondIsland.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrime-CutSecondIsland_thumb.jpg"></a>
<figcaption>There's a cut second island in the game. It's still there and somewhat functional, but the bridges to it have no collision. Except for one. Clip through an invisible wall and take a <em>very long walk</em> and you can reach the cut island. Note that most areas of the island count as out of bounds and will kick you back to the mainland, so be careful where you walk!</figcaption>
</figure>
</div>
<h4 id="warning"><strong>Warning</strong><a class="headerlink" href="#warning" title="Permanent link">¶</a></h4>
<p>The following is a bit of an odd request, but we at the Dolphin team <em>highly recommend</em> that casual users do not play <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> in Dolphin or on GameCube/Wii at all. Period. The GameCube version has tons of serious problems, including reports that it could outright corrupt your memory card and cause you to lose <em>all of your savedata</em>. While we never saw anything that corrupted our memory card, we did have one instance where <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> just stopped saving until we restarted the game and all of our previous savefiles were missing. Thankfully, with the power of hexediting we were able to fix the savefiles, but any game that has a bug like that should be considered risky to play. We did play through the game on console as well, but unfortunately we were unable to trigger any of the memory card issues there, so we cannot confirm the type of memory card corruption that happened on console that players reported back when the game released.</p>
<p>Even ignoring that risk, this is the type of game where it's common for enemies that you need to kill to just spawn out of bounds where you can't reach them unless you know how to get out of bounds yourself. Sometimes, you can't even use glitches to fix your situation as loading zones might just stop working. And there are the typical problems of random crashes, physics issues with both driving and walking around the city, and you're better off just not unlocking the special driving techniques. Hell, even the <strong>controls</strong> are broken on the GameCube version as they mapped the horn to the same button as change song and there's no way to remap your buttons! The controls suck on GameCube overall because they ran out of buttons for other things so you have to do a lot of two button combos for actions that just use one button on the other systems. It's a game that fights you the whole way.</p>
<div class="media-block wide">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/lQryk9zXO-c" allowfullscreen></iframe></div>
<figcaption>(Mostly) muted glitch showcase showing off some of the oddities of this game.</figcaption>
</figure>
</div>
<p>Is it possible to beat <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> in Dolphin? Yes. One brave developer <strong>100%ed</strong> the game in Dolphin, unlocked both endings, and beat the bonus mission. At some point it was less about completionism and more about proving it was even possible given some of the issues in the game, including the fact that one segment of the city will usually crash on the GameCube version. If you have fond memories of this game, you're probably remembering the superior PS2 version, which is buggy in some pretty funny ways while still being playable. Again, if you want to play this game, the PS2 version of the game is cheaper to buy, <a href="https://wiki.pcsx2.net/True_Crime:_New_York_City">compatible with PCSX2</a> and is a much better game in almost every way. There's no reason to go out of your way to play the GameCube version...</p>
<p><strong>Unless.</strong></p>
<p>If you're looking to experience one of the most bizarre, buggy, and nonsensically broken GameCube releases, <a href="https://wiki.dolphin-emu.org/index.php?title=True_Crime:_New_York_City">True Crime: New York City</a> is the closest thing we have to a <a href="https://en.wikipedia.org/wiki/Sonic_the_Hedgehog_(2006_video_game)">Sonic 06</a> level of trainwreck. Throughout testing, every time we played it we discovered new oddities, crashes, and just plain weird behaviors. The sad thing is that the game isn't all that bad when it is working, it's obvious that the developers were trying to build something so much better than what they made. If you have a powerful enough PC to run the game at a healthy emulated CPU overclock, the game can be fun at times. Just remember, we warned you of the risks.</p>
<div class="media-block wide">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot3.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/TrueCrimeScreenshot3.png"></a>
<figcaption>Do not do this.</figcaption>
</figure>
</div>
<h4 id="50-15407-hle-riivolution-patch-support-by-admiralcurtiss"><strong><a href="https://dolphin-emu.org/download/dev/master/5.0-15407/">5.0-15407 - HLE Riivolution Patch Support</a></strong> by <strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong><a class="headerlink" href="#50-15407-hle-riivolution-patch-support-by-admiralcurtiss" title="Permanent link">¶</a></h4>
<p>The Riivolution patching infrastructure is one of the most popular ways to create large scale game mods for the Wii. By taking advantage of complex IOS patches provided by the Riivolution homebrew launcher, mod developers can redirect disc reads to the SD card, making it easy to develop and distribute mods. For users, it was also simple as there was no extra patching process, and the fact that you could play the mods using genuine game discs made it feel safer for purists. </p>
<p>This format is essentially the standard for a lot of different mods, and Dolphin users have been asking about support for years. Unfortunately, the situation was rather murky. There were methods to convert Riivolution mods to a pre-patched ISO, but this was rather tricky and most mods didn't provide instructions nor did they want users to use the mod that way. Supporting it accurately isn't really an option: supporting cIOS mods requires Low Level Emulation of the Starlet Coprocessor, and Dolphin isn't even close to that. This would also bring a rather hefty performance penalty to users trying to run these mods.</p>
<p><strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> noticed that there was another option. Riivolution's mod format isn't all that complicated, and could be recreated <em>without</em> the need for cIOSes rather easily. Instead of trying to emulate it, he decided to go the same direction as Dolphin's IOS emulation and directly reimplement the functionality in Dolphin. Thus, he began work on supporting Riivolution mods and making playing them in Dolphin as simple as it is on console.</p>
<h5 id="riivolution-support-in-dolphin"><strong>Riivolution Support in Dolphin</strong><a class="headerlink" href="#riivolution-support-in-dolphin" title="Permanent link">¶</a></h5>
<p>Dolphin's Riivolution support uses the same Riivolution mods you download for console and works similarly overall, just with a splash of HLE to implement some cIOS functionality. All users need to do is extract the Riivolution mod to the correct directory (On Windows by default - Documents\Dolphin Emulator\Load\Riivolution) just like you would on a Wii. Because this is handled through High Level Emulation, there's no need to mess with Dolphin's virtual SD card or anything like that, putting it in the folder is good enough. Then, simply right click the game in the gamelist and click <em>Start with Riivolution Patches</em>. Enable the one you want and launch and you're ready to go. Eventually, we plan to add support for being able to boot Riivolution mods directly from the gamelist and on netplay once a few more issues are ironed out.</p>
<div class="media-block full-width">
<div class="row more-padding">
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/riivolution-mh3city.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/riivolution-mh3city_thumb.jpg"></a>
<figcaption>Monster Hunter Tri has Riivolution mods to re-enable Online Play via various backup server options...</figcaption>
</figure>
<figure class="col-sm-6">
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/riivolution-mh3counter.png"><img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/riivolution-mh3counter_thumb.jpg"></a>
<figcaption>And you can add new quests to the game for added difficulty and rewards!</figcaption>
</figure>
</div></div>
<p><strong><a href="https://github.com/AdmiralCurtiss">AdmiralCurtiss</a></strong> also implemented a lot of niceties to make sure that playing Riivolution games is robust and simple. Pretty much any game mod should work, and savegame redirects <strong>are</strong> supported if you want to have different saves between Riivolution mods and the base game. Not <em>everything</em> works however. Advanced features such as RiiFS and the such are not currently implemented in Dolphin. As well, Dolphin's disc read timings are currently disabled when playing Riivolution mods. This is because Dolphin is not currently able to differentiate which files are located on the virtual SD card and which files are on the disc. A game might expect to be able to jump between a lot of different files on the SD card quickly, but if Dolphin were to apply disc seek timings to the reads, it would cause a huge slowdown and maybe even break the game.</p>
<p>To this point, it may seem like the choice of HLE only comes with downsides outside of performance and ease of implementation. However, there's one rather interesting benefit as well. On console, because Riivolution relies on IOS patching, it can only be used in Wii mode on Wii games. Dolphin's Riivolution support <strong>does not have this limitation</strong>. It is possible to create Riivolution mods for GameCube games in the same manner as Wii games and run them directly in Dolphin. You don't need to worry about complicated patching instructions that users will stumble over <em>or</em> potentially running amiss of copyright holders by trying to distribute pre-patched files. Combined with features like <em>CPU Clockrate Override</em> and <em><a href="https://dolphin-emu.org/blog/2020/05/05/dolphin-progress-report-april-2020/#50-11969-configurable-mem1mem2-sizes-by-minty-meeo">Extended MEM1</a></em>, there are a lot of possibilities for powerful GameCube mods using an infrastructure that modders are have been using for years. We've already seen some modders embrace this feature with Shadow the Hedgehog 2p working directly in GC Riivolution in Dolphin. </p>
<div class="media-block wider">
<figure>
<div class="embed-responsive embed-responsive-16by9"><iframe src="https://www.youtube.com/embed/MQ-Dzm_uE3E" allowfullscreen></iframe></div>
<figcaption>Shadow the Hedgehog has a very dedicated fan community and a myriad of game mods.</figcaption>
</figure>
</div>
<p>As one final note, Riivolution patches are not supported on WiiWare titles, as they do not use disc reads.</p>
<h5 id="riivolution-support-and-android"><strong>Riivolution Support and Android</strong><a class="headerlink" href="#riivolution-support-and-android" title="Permanent link">¶</a></h5>
<p>A lot of times, new features sometimes lag behind in the Android version because of GUI issues. Thankfully, Android users won't have to wait for Riivolution support. <strong><a href="https://github.com/JosJuice">JosJuice</a></strong> jumped on porting over the Riivolution launching/loading interface so that you can run your favorite Riivolution mods on your preferred mobile device.</p>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidmod-menu.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidmod-menu_thumb.png"></a>
<figcaption>A GUI for configuring and activating Riivolution Mods was also added to Android.</figcaption>
</figure>
</div>
<div class="media-block wider">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidmod-newermario.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/androidmod-newermario_thumb.jpg"></a>
<figcaption>Launching Newer Super Mario Bros. Wii has never been easier.</figcaption>
</figure>
</div>
<h3 id="macsimum"><strong>Macsimum</strong><a class="headerlink" href="#macsimum" title="Permanent link">¶</a></h3>
<p>A new machine has entered the Dolphin family - a 14in MacBook Pro with an M1 Max. Naturally, we promptly ran it through the same benchmarks we put the M1 MacBook Air through in our <a href="https://dolphin-emu.org/blog/2021/05/24/temptation-of-the-apple-dolphin-on-macos-m1/#putting-the-m1-hardware-to-the-test">prior</a> <a href="https://dolphin-emu.org/blog/2021/06/06/dolphin-progress-report-april-and-may-2021/#50-14295-apple-m1-support-for-macos-by-skyler">tests</a>. How did it fare?</p>
<p><br/>
<script>
addChart(
{"chart":{"type":"column","polar":false},"title":{"text":"M1 Family Combined CPU/GPU Performance Test"},"subtitle":{"text":"5.0-14295, Vulkan, AArch64 JIT, Dual Core, 3x Native, Pre-compile shaders on startup "},"tooltip":{"headerFormat":"<span style=\"font-size:10px\">{point.key}</span><table>","pointFormat":"<tr><td style=\"color:{series.color};padding:0\">{series.name}: </td><td style=\"padding:0\"><b>{point.y:.1f} vps</b></td></tr>","footerFormat":"</table>","shared":true,"useHTML":true},"plotOptions":{"column":{"pointPadding":0.2,"borderWidth":0},"series":{"animation":false,"dataLabels":{"enabled":true}}},"series":[{"name":"M1 MacBook Air (7 GPU Core)","turboThreshold":0,"_colorIndex":0,"marker":{"enabled":false},"colorByPoint":false},{"name":"Native","turboThreshold":0,"_colorIndex":1}],"data":{"csv":"\"Category\";\"M1 MacBook Air (7 GPU Core)\";\"M1 Max MacBook Pro 14in (32 GPU cores)\"\n\"Super Smash Bros. Melee - FoD\";120;142\n\"Super Smash Bros. Brawl - New Pork City\";111;139\n\"Metroid Prime 3 - Elysia (1x Native, Single Core)\";50;60\n\"Skyward Sword - Skyloft\";80;92\n\"Star Wars Rogue Squadron II - Hoth\";39;39","googleSpreadsheetKey":false,"googleSpreadsheetWorksheet":false},"yAxis":{"title":{"text":"Frames Per Second (VPS)"},"labels":{}},"colors":["#ff3100","#006eff","#808080","#00c800","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{"floating":false,"verticalAlign":"top"},"credits":{"enabled":false},"lang":{},"exporting":{},"xAxis":{"title":{},"labels":{}}})
</script>
<br/></p>
<p>Some of you may view the above and be surprised. Sure it's <em>better</em> but the M1 Max is not trouncing the original M1 - it's only a notch above. That's simply because of Dolphin's workload. The M1 Pro and M1 Max have more multithreaded CPU power thanks to many more performance cores, but those are the exact same performance cores that are in the M1, running at the exact same clockspeed. As an application that depends on single thread CPU performance, the CPU power available to Dolphin is basically the same for both SoCs and the performance is similar. The improvements we're seeing here are from removing every bottleneck that constrained the M1, thanks to the M1 Max's cache, memory bandwidth, and significant GPU improvements.</p>
<p>What isn't shown on that chart is the absolutely <strong>monsterous</strong> GPU the M1 Max delivers. Native res for the display (5x native for the 14in) is trivial, and many games can run fullspeed at 8k (12x native) in our tests. The original M1 choked on 4x native, hence picking 3x for the original testing.</p>
<div class="media-block wider">
<figure>
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/m1max-windwaker_thumb.jpg">
<figcaption>This is a 17x native (10880x8160) screenshot. It was recorded while running at fullspeed <em>on a laptop</em>.</br><sub>Click <a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/m1max-windwaker.png">HERE</a> for the full 10880x8160 image. It may crash your browser.</sub></figcaption>
</figure>
</div>
<p>Now that we have direct access to M1 hardware, we took the opportunity to revisit our framepacing tests that previously revealed <a href="https://dolphin-emu.org/blog/2018/12/04/dolphin-progress-report-november-2018/#dev-diary-putting-a-mac-through-its-paces-by-mayimilae">framepacing issues on Macs with Intel graphics</a>, and confirmed that it is not an issue on M1. Macs with Intel graphics STILL suffer from this problem. For you are not familiar with frame timing and frame pacing, we briefly explained it <a href="https://dolphin-emu.org/blog/2018/12/04/dolphin-progress-report-november-2018/#dev-diary-putting-a-mac-through-its-paces-by-mayimilae">previously</a>.</p>
<div class="media-block full-width">
<figure>
<a href="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/macosframetimesrevisit.png">
<img src="https://dolphin-emu.org/m/user/blog/progress-report/2021-september/macosframetimesrevisit.png"></a>
<figcaption>Both Macs are able to handle this test at faster than full speed, but on Intel there is constant stutter. The M1 Max performs excellently, with only one drop in ~12,000 frames. <br/><sub>Click/tap the image for detail.</sub></figcaption>
</figure>
</div>
<p>Expect to see more of this MacBook Pro in tests going forward.</p>
<h3 id="last-months-contributors"><strong>Last Month's Contributors...</strong><a class="headerlink" href="#last-months-contributors" title="Permanent link">¶</a></h3>
<p>Special thanks to <a href="https://github.com/dolphin-emu/dolphin/graphs/contributors?from=2021-09-01&to=2021-11-01&type=c">all of the contributors</a> that incremented Dolphin from <a href="https://dolphin-emu.org/download/dev/master/5.0-15107/">5.0-15107</a> through to <a href="https://dolphin-emu.org/download/dev/master/5.0-15445/">5.0-15445</a>!</p>
<style>
.entry-content h3 { margin-top: 1.5em; }
.entry-content h4 { margin-top: 2em; }
.entry-content h5 { margin-top: 2.5em; }
</style>