Dolphin Progress Report: March 2015


Console add-ons and linking emulation are almost always difficult tasks. Worse yet, availability, software support, cost, and even popularity can limit the ability to get these hardware add-ons documented and emulated. While their are numerous examples spanning tons of consoles and their respective emulators, this month, we're talking about GameCube to Game Boy Advance Connectivity.

Timings and synchronization are a given on real hardware; games know how it's going to work and many expect it to always work perfectly. When it doesn't? Certain games break. Now imagine a synchronization task more complex than dualcore and netplay. That would be GBA to GCN connectivity.

When skidau took up the task of renovating Dolphin's connectivity to Visual Boy Advance-M, he knew that it would require not only work on the Dolphin side of things, but also VBA-M. Getting two completely different emulators to sync up (up to 5 instances!) and play nice was the heart of the issue. Months of prototype builds (over 60 total!) between Dolphin and VBA-M were tested and the best possible combination was chosen for high compatibility and reasonable performance. The result is Dolphin (and VBA-M) finally getting a taste of what this feature was like on console.

That, and much more, is featured in this month's progress report!

Notable Changes

4.0-5736 - Error Check before writing Shader Cache by Armada

No one likes Dolphin eating up a ton of harddrive space for no reason. For people with large collections of games, hard drive space can be at a premium already, so when Dolphin's shader cache saved shaders with errors and in the process took up up to 20GB per game, that wasn't too nice. While it's not exactly favorable to have situations where shaders are failing, at least error-checking the shaders before saving them will prevent Dolphin from saving huge shader cache files! Most common games to run into this were F-Zero GX and Baten Kaitos Series.

4.0-5743 - Move GCPad Calibration to Runtime by skidau

One interesting tidbit about the GameCube is that it calibrates its controllers at startup. While some games go a step further, like F-Zero GX which includes a full stick calibration feature, this basic calibration makes it so GameCube controllers are centered properly. Even the perfect, brand new stick on GameCube controllers will actually be centered well above "origin."

This was discovered in Star Wars Rogue Squadron 2: Rogue Leader because it did not automatically center its stick. When this commit was added, the player would always be read as holding up slightly! What did this commit do wrong?

Nothing! It turns out that Rogue Squadron 2 relies on the bios to calibrate the controller; when loading the game from the bios everything would work properly! Instead of leaving this new quirk in, skidau decided to automatically calibrate the controller at startup; even if the game doesnt explicitly call for it.

This commit also fixes Native GC Controller Support on Netplay. Netplayers rejoice!

4.0-5788 - Enable Full Occlusion Queries on Nexus 9 by Sonicadvance1

Dolphin on Android runs into a ton of issues that the desktop variant doesn't have to worry about. By default on OpenGL ES, an occlusion query will return as a boolean value, 1 or 0; instead of the 32 bit range that OpenGL can return.

Without full OpenGL spec occlusion queries, Super Mario Sunshine can't tell how much goop has been cleared.

This commit uses NVIDIA extensions to let the Nexus 9 use full occlusion queries without the limitations of OpenGL ES. This fixes such things like the lenses flare in The Legend of Zelda: The Wind Waker and effects that work like it.

Note: Freedreno drivers also support full OpenGL Occlusion Queries.

4.0-5819 - D3D: Fix Clamping for Rectangles by magumagu

This is a simple crash fix for a D3D crash Mario Kart Wii when the lenses flare is active. This will make it safe to turn off Store EFB Copies to Texture Only in Mario Kart Wii when using D3D to enable all visual effects. This may not a proper fix; but rather is mostly a safeguard for crashes caused not clamping certain values to proper minimum and maximums.

4.0-5886 - Fix Netplay Threading Issues by mathieui

While the new netplay features last month brought in key components of the old UDP-Netplay branch, it also brought a lot of problems that comex managed to work around in that branch. Namely: Netplay Performance was cut in half due to threading issues. This is due to Dolphin's management of enet objects, which aren't thread safe.

mathieui donated his time to port over a similar solution to the one in the old UDP-Netplay branch that restored performance to normal levels.

One of the more interesting parts of emulation is when it opens up the ability for people to experience their favorite games in new ways. Most people didn't really get a chance to experience GBA <-> GameCube on console due to how expensive it was to setup in its prime. When very few games actually get interesting use out of a feature, spending $400+ is a tough sell.

With these changes, Dolphin and VBA-M can reasonably emulate many of the popular games that used this feature.

GBA Connectivity Showcase

Known Supported Titles

  1. Animal Crossing - Requires DSP-LLE for NES Classics on GBA
  2. Billy Hatcher and the Giant Egg
  3. Crash Bandicoot: The Wrath of Cortex
  4. Final Fantasy Crystal Chronicles - Requires DSP-LLE for Players 2 - 4 to connect.
  5. Fire Emblem: Path of Radiance
  6. Harvest Moon: A Wonderful Life and Another Wonderful Life
  7. The Legend of Zelda: Four Swords Adventures and exclusive NTSC-J mode "Navi Trackers"
  8. The Legend of Zelda: The Wind Waker
  9. Mario Golf: Toadstool Tour
  10. Mega Man X Command Mission - DSP-HLE will suffer from audio issues
  11. Metroid Prime
  12. Nintendo GameCube Demo Discs
  13. Nintendo Puzzle Collection
  14. Pac-Man VS.
  15. Sonic Adventure DX
  16. Sonic Adventure 2: Battle - Partial Support
  17. Star Wars Rogue Squadron III: Rebel Strike
  18. Wario World
  19. WarioWare, Inc.: Mega Party Game$!

Note: Games featured in showcase marked by bold.

This isn't a complete list of supported titles; it's only comprised of games that were tested by users and known to work. A few notable omissions are purposeful, though. The Pokémon Series of titles are not supported and should not be expected to work. They can work in the right conditions, but those conditions are unknown at the current time.

Prerequisites to setting up GBA <-> GameCube Emulation

  1. DSP-LLE Dumps from a GameCube or Wii may be required for some titles. While DSP-HLE will work, DSP-LLE will experience higher compatibility and more stability. This may not matter in most titles, but in Final Fantasy Crystal Chronicles and Animal Crossing, many features will not work without DSP-LLE.
  2. Game Boy Advance BIOS is required for most titles. Any game that connects to a GBA without a game running requires a GBA BIOS in place. The easiest way to dump a GBA BIOS is through a GBA Flashcart.

When those two things are in place, you must configure both VBA-M and Dolphin to connect to each other. In each VBA-M Instance, you must go to the file menu and select "Connect to..." and select GameCube (Dolphin.) In Dolphin, you select "GBA" under each GameCube Port you're using as a GBA under controller configuration. Startup Dolphin, and get to the point where the game wants a GBA connected, and then bootup the GBA BIOS (or game; if it wants to connect to a game.) Connectivity should ensue, and if all goes well, the emulators will sync up and communicate to one another.

4.0-5915 - Vertex Loader JIT SSE2 Fallback by Tilka

Tilka brought huge speedups to modern PCs running Dolphin with his SSSE3 Vertex Loader JIT (Just In Time Recompiler). Some of the most vertex demanding titles became up to twice as fast, with general performance boosts spanning almost all games. Unfortunately a lot of older AMD PCs, ones that would really need a performance boost, don't support SSSE3. This included fairly capable processors, including the Phenom and Phenom II lines.

Before the vertex loader JIT was added in 4.0-5143, there actually was a vertex loader JIT of a sort already in Dolphin. But it was a "call JIT": the most primitive type of JIT that hardly deserves the name. While it was much faster than doing everything in software, there was a lot more performance to get by implementing a better solution. As such the new vertex loader JIT is a proper JIT, generating efficient code on the fly for parsing vertices, but it had a hard requirement for SSSE3.

Those who didn't have SSSE3 support saw no improvement in performance, even though those were some of the processors that needed it the most! Tilka continued his vertex loading adventure this month by adding SSE2 fallbacks in his vertex loader JIT. This means that processors without SSSE3 will get a much needed boost. For example, in Xenoblade Chronicles, an Athlon II X2 250 saw a 90% performance boost!

With this optimization, users stuck with aging AMD processors may get a little more mileage in the latest development builds.

4.0-5954 - Fix DSP-LLE on Thread Never Starting by SizzlingCalamari

A while back, skidau removed the ability to turn on DSP-LLE on thread. At the time, the blog noted that DSP-LLE was NOT removed but merely would only activate when it was safe. While there were initial worries that things would break, it appeared that everything was fine.

Somewhere along the line, DSP-LLE on thread stopped activating period, effectively making it so DSP-LLE was never on a separate thread. While TASers may rejoice, this provided quite the performance conundrum for regular users. In games like Star Wars Rogue Squadron II: Rogue Leader this could mean a drop of 50% or more during DSP intensive events, like firefights when lots of sounds are playing.

Newcomer SizzlingCalamari noticed the problem and submitted a quick, efficient fix the returns performance back to normal in games that can use DSP-LLE on thread.

Last Month's Contributors...

Special thanks to all of the contributors that incremented Dolphin from 4.0-5716 through to 4.0-5954!

Du kan fortsette diskusjonen i forumtråden for denne artikkelen.

Neste oppføring

Forrige oppføring

Liknende oppføringer