Project

General

Profile

Actions

Emulator Issues #11693

closed

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

Added by markwest76 about 5 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
5.0-8009
Fixed in:
5.0-12575

Description

Game Name?

Disney Epic Mickey 2: the power of two

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

SERE4Q

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

3ec90beadf23c7dd44b8b1b2af25d1c2

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.

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 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...

Actions #1

Updated by JosJuice about 5 years ago

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

Updated by JMC4789 about 5 years 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.

Actions #3

Updated by JMC4789 about 5 years 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.

Actions #4

Updated by markwest76 about 5 years 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)

Actions #5

Updated by JMC4789 about 5 years ago

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

Actions #6

Updated by markwest76 about 5 years ago

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

Actions #7

Updated by JMC4789 about 5 years ago

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

Actions #8

Updated by JMC4789 about 5 years 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.

Actions #9

Updated by JMC4789 about 5 years ago

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

Actions #11

Updated by markwest76 about 5 years 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...

Actions #12

Updated by markwest76 about 5 years 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...

Actions #13

Updated by JMC4789 about 5 years 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.

Actions #14

Updated by markwest76 about 5 years 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)

Actions #15

Updated by markwest76 about 5 years ago

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

Actions #16

Updated by JMC4789 about 5 years ago

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

Actions #17

Updated by JMC4789 about 5 years 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.

Actions #18

Updated by markwest76 about 5 years 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

Actions #19

Updated by JMC4789 about 5 years 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.

Actions #20

Updated by JMC4789 about 5 years 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.

https://drive.google.com/open?id=16LKihuPcNM-AgetzLoO-Qe-1pN7IEOOj

Copy them into a normal Dolphin install.

In order to satisfy GPL here are the two changes - https://github.com/JMC47/dolphin/commit/949b68307cd9fb8f480e6d130c613a45d9e64a4c

Actions #21

Updated by markwest76 about 5 years 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?

Actions #22

Updated by JMC4789 about 5 years 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.

Actions #23

Updated by JMC4789 about 5 years 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.

Actions #24

Updated by markwest76 about 5 years 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...

Actions #25

Updated by markwest76 about 4 years 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...

Actions #26

Updated by JMC4789 over 3 years ago

  • Status changed from New to Fixed
  • Fixed in set to 5.0-12575
Actions

Also available in: Atom PDF