Emulator Issues #11693
5.0.8009 causes stuttering with "Disney Epic Mickey 2" [regression]
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 https://github.com/dolphin-emu/dolphin/pull/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.
Is the issue present in the latest stable version?
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 https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)
First broken version is 5.0-8009 - PR # 7040 - https://github.com/dolphin-emu/dolphin/pull/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: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer
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...
#2 Updated by JMC4789 over 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 over 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 over 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)
#10 Updated by JMC4789 over 1 year ago
try this build - https://dl.dolphin-emu.org/prs/pr-8024-dolphin-latest-x64.7z
#11 Updated by markwest76 over 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...
#19 Updated by JMC4789 over 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 over 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 - https://github.com/JMC47/dolphin/commit/949b68307cd9fb8f480e6d130c613a45d9e64a4c
#21 Updated by markwest76 over 1 year ago
Ok here's what I found:
using Dolphin_Normal every time the game stutters comes out the message "Clearing code cache";
using Dolphin_Large_Cache the stuttering is gone and game plays like 5.0-8007;
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?
#23 Updated by JMC4789 over 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.