Emulator Issues #11693

5.0.8009 causes stuttering with "Disney Epic Mickey 2" [regression]

Added by markwest76 about 1 year ago. Updated 5 months ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Game Name?

Disney Epic Mickey 2: the power of two

Game ID? (right click the game in the game list, Properties, Info tab)


MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)


What's the problem? Describe what went wrong.

After PR # 7040 when playing "Disney Epic Mickey 2: the power of two" you get some stuttering that has nothing to do with uebershaders (gameplay slows down for some seconds and audio gets a lot of crackles, then fps get back to normal).
Stuttering seems random, except when you load the game and get to the first title screen, when you press A button the stuttering will Always come out...

What steps will reproduce the problem?

Launch tha game, bypass all the logos, arrive to the title screen, when you press A button to get to the "Load a saved game" you'll get the 1-2 second stuttering (fps tank and audio crackles)

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes (5.0-10034)

Is the issue present in the latest stable version?

No (5.0)

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool and anyone who is building Dolphin on their own can use git bisect.)

First broken version is 5.0-8009 - PR # 7040 -

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here:

Please tell me if you need me to get a fifolog...

What are your PC specifications? (CPU, GPU, Operating System, more)

Win10, i7 7700, gtx1060

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

I've tried a lot of graphical configurations, backend and so on but with no avail...


#1 Updated by JosJuice about 1 year ago

  • Regression start set to 5.0-8009
  • Regression changed from No to Yes
  • Milestone set to Current

#2 Updated by JMC4789 about 1 year ago

We enabled more accurate CPU emulation for a feature... the fact it's slightly slower in some spots when using that feature isn't particularly a regression. We could disable it for this game or something but honestly I'm skeptical. Considering the old method ended up with off-by-one shenanigans, I don't want to go back to it.

#3 Updated by JMC4789 about 1 year ago

Okay now that I'm up and less cranky, what kind of stutter is this? Is it like a "oh I'm running around fine- WHAT" where there's a hard stutter and then it returns to normal? Or is it a more general slowdown that lasts a couple of seconds? I wonder if the codecache is getting overflowed and it's just struggling or if it's really spamming this really obscure function.

#4 Updated by markwest76 about 1 year ago

If it were slightly slower it wouldn't be a problem, I mean I get 250% speed in this game and going to for example 200% wouldn't be a problem, but the problem here are the stuttering events (going from 250% to 50%) that plague the game ruining in this way the emulated gameplay.
Since I have a powerful PC and I don't think it is speed related, I suspect that this kind of bug would come out even with the strongest computer on earth...also are we sure this is the only game affected? I will investigate and report it (for now quite obviously Disney Epic Mickey 1 is affected as well)

#5 Updated by JMC4789 about 1 year ago

Someone would need to say why it's happening before anything can be done.

#6 Updated by markwest76 about 1 year ago

It's a hard stutter that last sometimes 1-2 seconds, sometimes 2-3...

#7 Updated by JMC4789 about 1 year ago

I see it when testing, I wonder if it's the codecache issue.

#8 Updated by JMC4789 about 1 year ago

It's probably clearing the code cache or something, or it's firing off a shitload of instructions. This is rather interesting to say the least.

#9 Updated by JMC4789 about 1 year ago

Just verified - it's clearing the code cache. Not my fault!

#11 Updated by markwest76 about 1 year ago

With that build the stuttering has moved from the title screen to the loading screen (now it doesn't stutter when you press A button to access loading screen, but it stutters when you click on a saved game to load)
As for in-game stuttering I need a bit more time to test if it's gone...

#12 Updated by markwest76 about 1 year ago

as expected during gameplay there's still some stuttering, maybe a bit less than before but due to the random appearance it's difficult to tell...

#13 Updated by JMC4789 about 1 year ago

This is normal and would happen in old builds. I could make you another hacky build that delays it more or less indefinitely, but, it would use a tremendous amount of ram.

#14 Updated by markwest76 about 1 year ago

it doesn't happen in old builds: 5.0-8007 and previous builds are absolutely stutter free with Disney Epic Mickey 2 (at least on my system)

#15 Updated by markwest76 about 1 year ago

Forgot to mention in my System specifications that I have an SSD Hard Drive, if that somewhat matters...

#16 Updated by JMC4789 about 1 year ago

I have epic mickey, and while it takes longer, it absolutely will stutter after a while.

#17 Updated by JMC4789 about 1 year ago

I guess the old codepath is still being hit a bit in Disney's Epic Mickey, ballooning the jit cache hit still. I could get you a build with gigantic caches to confirm this if you want.

#18 Updated by markwest76 about 1 year ago

ok, let's try to confirm that...

P.S. Epic Mickey stuttered a bit with my 2nd PC (intel Core duo quad) but with the new PC I never had similar problems until 5.0-8009

#19 Updated by JMC4789 about 1 year ago

I mean on that older PC it could just be general performance issues.

I'm going to make you a build I don't recommend you use outside of testing this as it will eat up a ton of RAM. Even if it works, it's obvious that we'll have to find a more permanent solution to reduce the JIT cache hit.

#20 Updated by JMC4789 about 1 year ago

I've made two builds here. One build is a normal Dolphin build based on current master with the message enabled that tells you when the icache is cleared. The other is the same thing, except with all the various code caches made much bigger. I do not recommend you use it on a computer with limited ram.

Copy them into a normal Dolphin install.

In order to satisfy GPL here are the two changes -

#21 Updated by markwest76 about 1 year ago

Ok here's what I found:

  1. using Dolphin_Normal every time the game stutters comes out the message "Clearing code cache";

  2. using Dolphin_Large_Cache the stuttering is gone and game plays like 5.0-8007;

  3. meanwhile I tested Disney Epic Mickey 2 with latest master 5.0-10039 on my old PC (win10, AMD RX570, Xenia X5460) much less powerful and believe it or not, in the menus there's no stuttering at all (?!?)...could it be then a Nvidia only issue?

#22 Updated by JMC4789 about 1 year ago

No, lol. It's a JitCache issue, just the timings of when the stutters hit will vary a bit depending on how the instructions are generated. Because an old PC uses some different codepaths, it may be avoiding some of the code bloat.

#23 Updated by JMC4789 about 1 year ago

So, I'm going to have to disagree with your bisect once again. I've reproduced the icache clears almost as often in 5.0-8007. It's just delayed by a single menu screen. There's literally a log message that plays when the icache is flushed, if you enable logging and look, you'll see it before you get in-game.

#24 Updated by markwest76 about 1 year ago

The fact is that in 5.0-8007 there's no stuttering, while 5.0-8009 stutters a lot, so I presume that for some reasons 5.0-8009 is clearing the cache in a much slower way than 5.0-8007...

#25 Updated by markwest76 5 months ago

Now that I have an rtx 2060 super with 8gb I'm not experiencing this problem anymore, but in fact maybe it was 5.0-11318 that fixed this? In that case you can close this issue...

Also available in: Atom PDF