Dolphin Progress Report: August 2015


If you count the number of notable changes throughout August, you may think it was a down month. Aside from a flurry of Dolphin ARM updates, there really wasn't much to choose from. A lot of the major projects remaining on the emulator are multi-month affairs, so contributors seemingly disappear from the progress reports for months only to return with a bang. Then there's Sonicadvance1, who keeps trucking on with Dolphin ARM on an almost daily basis. Despite the miniscule number of big additions, the big ones this month more than made up for the lack of volume. It's actually kind of nice for the blog staff to not have to fight over which changes get in once in a while, too!

With that, let's dig into this month's notable changes!


Notable Changes

4.0-7286 - Reimplement Zelda HLE by delroth

Nineteen games dodged the HLE audio rewrites for over two years. The Zelda µcode was primarily used by first party developed Nintendo games and nothing else, so, when reimplementing HLE audio became a priority, the rest of the games (the AX µcode games,) were prioritized higher. AX-HLE was more broken, affected more titles, and had a lot more room for improvement. That left nineteen games (and the GameCube BIOS) with fairly shoddy HLE audio emulation. Unfortunately, this list of games contained some undeniable blockbusters.



The Zelda µcode games, in release order


This merger more or less reimplements Zelda HLE from the ground up. There are so many changes and bugs fixed that a full article was dedicated to this earlier in the month. For more information on the change and examples of bugs and fixes, feel free check out our feature article - The New Era of HLE Audio.



JITARM64 Changes between 4.0-7295 and 4.0-7498 by Sonicadvance1 and degasus

Someone didn't get the memo that this month was to be about audio changes! Sonicadvance1 and degasus teamed up to revolutionize and optimize the AArch64 JIT to help take advantage of the quickly advancing mobile hardware. Using the trusty Tegra X1 powered NVIDIA Shield Android TV, Dolphin's JITARM64 core has seen a 4x improvement in POVRay scores! On the Dolphin CPU Benchmark, the processor in the Tegra X1 now can outperform the actual Wii! This does not mean all games will be full speed; as with any form of emulation, some games are harder on the recompiler than others and require more power than the benchmark, so it should only be used as a guideline.



What difference does this make in terms of games? Well, a lot of games we showed on the blog just a few months ago are now running much, much better. Games like The Legend of Zelda: The Wind Waker, powered by the New-Zelda-HLE audio rewrite, runs at or very near full speed through most of the game now on the NVIDIA Shield Android TV. On top of the speed improvements, tons of bugs and other errors causing defects and crashes have been fixed as well, leading to a big increase in compatibility on ARM devices. As per usual, the Android experience is often hampered by spotty mobile graphics drivers, so, those not on recent NVIDIA devices will likely still run into serious graphical errors and driver slowdowns.


4.0-7359 - Remove timing information from DSP-HLE ucode emulation by degasus

delroth's rewrite of AX-HLE (and DSP-HLE on the whole, now) brought us near parity between the taxing DSP-LLE backend and DSP-HLE. There still are various bugs here and there, but this month one of the biggest problems were finally resolved. The problem was that AX-GC HLE assumed that calls would be done every 5ms. While this worked fine for most games, there are actually some AX-GC GameCube games that use 48KHz mode, and they do their calls every 3ms, like Wii games. Because AX-GC was hard coded to 5ms, this caused those games to severely malfunction. When AX-GC was rewritten, the timing information was necessary due to hackiness in other parts of HLE audio. Since then, other developers have removed those hacks so the hardcoded timings can be removed. With them gone, a lot of weird bugs simply disappeared from the emulator.

  • Slow audio in 48KHz games: A few GameCube games output audio at 48KHz instead of the standard 32KHz that most games on the system use.
  • Missing FMV audio in Wii games: Spotted in Donkey Kong Country Returns, Little King's Story, and The Last Story among others. An accuracy change that fixed audio in Pokémon Snap randomly broke audio in FMVs for these games, but only on DSP-HLE. That original change that fixed Pokémon Snap did not touch HLE or LLE; therefore the bug had to be elsewhere and the devs refused to revert it.
  • Missing/Slow instruments in MSX Virtual Console Titles: This is actually related to the 48KHz bug, but it sounds much different in practice due to some instruments not being audible. AX-Wii was already hardcoded to 3ms, so it's unknown what was actually wrong with the MSX Virtual Console games.

Removing timing information from DSP-HLE fixes all of these issues and makes behavior closer to DSP-LLE, which should be the end goal.

Note: Non-standard timings are still not supported in the audio dump feature


4.0-7396 - Fix the shader overrunning the max shader size by Sonicadvance1

In another case of Factor 5 pushing Dolphin to the limit, Star Wars Rogue Squadron III: Rebel Strike once again proves the extremes that Factor 5 games can reach. Long ago, the maximum size for an individual Dolphin shader was arbitrarily set to 16KiB. Shader space has to be pre-allocated, and the smaller they are the happier OCD coders are; but only as long as the shader limit is above anything a game can throw at it. Surely, they thought, no game would ever create a single shader above 16KiB! It’s preposterous, most shaders are only a kilobyte or two in size!

But all it took was a magic combination of Factors to push over that limit. PowerVR has an issue in its shader compilers, so 4.0-7078 worked around it by making Dolphin more explicit in the shader code it generates. Dolphin still renders the same on other platforms, but the change made shaders a tiny bit bigger. Juuust enough, that Rebel Strike's monstrous shaders, combined with per-pixel lighting, were able to push beyond the 16KiB per-shader limit. Any time it went over the limit the shader would fail to compile, resulting in missing graphics and animations on many of the levels, most notably chunks of the water would not render or animate at all. Fortunately the fix was trivial; Sonicadvance1 simply doubled the maximum possible size of Dolphin's shaders.


rebelstrikeshadererror.png

Dolphin's 16KiB shader limit never Factored in Factor 5


4.0-7461 - Support OpenGL ES 3.2 by Sonicadvance1

For as long as Dolphin has been on Android, it has been hampered by driver limitations. Dolphin uses a lot of very specific and very recent extensions to reach combination of speed and accuracy it has achieved, requiring OpenGL 4.4 or DirectX 11 for best results. OpenGL ES, the primary graphics API for Android devices, has lacked many key extensions in OpenGL that Dolphin uses, limiting Dolphin's performance potential on already limited hardware.


The newly released OpenGL ES 3.2 provides Dolphin Android with some more of those important features for non-Tegra devices. (Tegra devices support desktop OpenGL)

  • Copy_Image: This is used in Dolphin's OpenGL backend for partial EFB Copies. Without this, EFB Copies to Texture Only cannot have rotating coins in New Super Mario Bros. Wii.
  • Geometry Shader Instancing: Reduces overhead with stereoscopic rendering.
  • Texture_Buffer: Gives Dolphin the ability to decode paletted textures on the GPU, allowing many games to no longer need EFB to Ram.
  • Super Sample Anti Aliasing (SSAA): Best, but most taxing, form of anti-aliasing. It's not exactly useful on 400dpi phones, but considering people on desktops are using 8x internal resolution, someone will use it.
  • Base_Vertex: Big performance boost for video driver limited devices. Namely, anything not Tegra K1/X1


To make things even nicer, Qualcomm is also finally implementing the optional extension, Buffer_Storage, in its OpenGL ES 3.2 driver, which many desktop users will remember as a 30% performance boost! Things are looking a lot brighter (and faster) for Android in the months to come. The catch? Only NVIDIA has currently released an OpenGL ES 3.2 driver so far; and they already support desktop OpenGL so we don't see any improvements! Android users will unfortunately be playing a waiting game as the various vendors roll out their OpenGL ES 3.2 support.


4.0-7465 - Implemented .elf and .dol support in gamelist by Helios747

The Wii supports a ton of homebrew, and much of that homebrew actually runs on Dolphin. However that functionality was fairly difficult to discover, requiring manually loading the files through File > Open. Even if you knew of the functionality, it was a nuisance to use, requiring loading the file manually every single time any time you used it! And worse yet, since it didn't appear in the gamelist, it was impossible to use .elf and .dol files in netplay without creating custom ISOs, much to the chagrin of Project M players. Now that's all changed. Third party emulators, homebrew games, game mods, and various utilities in the .dol and .elf file format can now be loaded in Dolphin's game list!

In the future, the plan is to implement the HomeBrew Channel XML standard in Dolphin, so that homebrew banners and metadata can appear in the gamelist too!



Issue Tracker Mayhem

Google Code went to read-only mode on August 25th as it readies for eventual shutdown. While Dolphin's actual repository moved to GitHub shortly after Dolphin 4.0, the Github issue tracker was deemed so bad that the team decided to keep the Google Code page as the official issue tracker. With the Google Code shutdown, Dolphin's issue tracker is now gone! The team knew this was coming, but the same reason that the issue tracker remained on google code all this time remained: There weren't any really attractive solutions.

  • YouTrack: The team setup a YouTrack account for Open Source projects, but, several team members objected to using a non-open source solution. The attempt to move to Youtrack was ultimately abandoned when migration failed.
  • JIRA: Too bloated for what a project like Dolphin needs.
  • Redmine: While it's highly customizable and can run on our own servers, Redmine has had many security issues in the past, so there were some worries from our infrastructure maintainers about the amount of work required to keep it up to date.
  • GitHub Issues: The people who run Dolphin's issue tracker are mostly non-coders. In order to have admin access on the issue tracker, the users running it would also have push access to the repository - not a good idea. GitHub is expanding their permissions, and granted us early access to them, but the changes were simply not enough. And there were no moderation controls at all.

There were those and many more options tested, but in the end there was no perfect solution. Despite initially rejecting the idea, Dolphin will be using Redmine for its issue tracker. The team will have to keep Redmine patched and updated for safety, but Redmine has all of the features we need and then some, and it is open source and will be running on our site, giving devs complete control to fix issues and customize it to fit the project. Rest assured that all of your issue reports and comments will be transferred over to the new issue tracker, and work will continue there as though it never stopped. And in time, the plan is to enhance Redmine further to improve the issue reporting workflow so it's better than ever! However the new issue tracker is still not quite ready yet, but it will be ready for full time use soon. Keep an eye on our blog, Twitter and the forums to know when the new tracker is ready!


Last Month's Contributors...

Special thanks to all of the contributors that incremented Dolphin from 4.0-7143 through to 4.0-7504!


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

Next entry

Previous entry

Similar entries