Project

General

Profile

Actions

Emulator Issues #10517

closed

Dolphin's improved codehandler can cause stuttering with some codes

Added by JershJopstin over 6 years ago. Updated over 5 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:
Fixed in:
5.0-8985

Description

Game Name?

Various; I've personally tested with Xenoblade Chronicles.

Game ID? (right click the game in the game list, properties, info tab)

Various (SX4E01 for Xenoblade)

MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)

f76e76b2656b92490df354e7a757257b

What's the problem? Describe what went wrong.

Certain gecko codes seem to cause intermittent stuttering (by which i mean dips into single-digit fps for .25-1 seconds) when used; in my case, I was using One More Try's 60fps hack, detailed at https://forums.dolphin-emu.org/Thread-wip-xenoblade-60fps-and-other-mods . To get the obvious out of the way, yes, my system should be more than capable of handling the game at 60fps. Running the game with cheats disabled at 200% speed doesn't produce any such stuttering, and, logically, if I can play at a locked 30fps without the hack, I shouldn't be getting dips into the single digits with it. Normally I'd expect this to be a problem with the hack and not with Dolphin, but further investigation found that it actually works fine in builds prior to 5.0-4575. This build made changes to the codehandler, and the pull request has a few comments about it causing stuttering in widescreen hacks in other games.
What steps will reproduce the problem?

Load up Xenoblade with the code enabled (I've posted the most refined version is in this post: https://forums.dolphin-emu.org/Thread-wip-xenoblade-60fps-and-other-mods?pid=451469#pid451469
And, well, the stuttering happens just about anywhere, from standing still, battling, navigating menus, staying still in menus, etc. It does seem to happen more often when doing certain actions, such as bringing up the menu or targeting an enemy, or during a battle. When bisecting to find the build, I left the game on the map screen and listened for stuttering in the audio to ensure the stuttering wasn't coming from anything else.

Alternatively, you could try the widescreen hacks for The Wind Waker or Twilight Princess that are listed on the wiki, which are reported to cause stuttering by comments in the pull request https://github.com/dolphin-emu/dolphin/pull/5670 . I can't confirm the issues in these games myself atm as I don't have dumps handy.

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

5.0-5376

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

5.0-4575

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

CPU: Intel i7 3930K
GPU: AMD R9 290X
RAM: 24GB, 1600MHz
OS: Windows 10 64-bit (build 15063)

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

I've provided a save file to save the trouble of getting through the intro, since sitting on a menu is the best way to make sure the stuttering isn't due to anything intensive happening in the game.


Files

monado01 (160 KB) monado01 Save data JershJopstin, 09/03/2017 07:07 AM

Related issues 2 (0 open2 closed)

Has duplicate Emulator - Emulator Issues #11271: Widescreen Gecko Codes cause regular and repetiable stutteringDuplicate

Actions
Has duplicate Emulator - Emulator Issues #10531: Random Stutter in Zelda Titles due to a change to the codehandler.binDuplicate

Actions
Actions #1

Updated by JMC4789 over 6 years ago

  • Status changed from New to Duplicate
Actions #2

Updated by JMC4789 over 6 years ago

  • Is duplicate of Emulator Issues #10456: Gecko Codes Causing Freezes or Malfunctioning Across Many Titles added
Actions #3

Updated by JershJopstin over 6 years ago

I read that issue, thought mine was different enough, and completely missed the sentence 'this is now a general thread for gecko codes behaving badly'. My bad.

Actions #4

Updated by JMC4789 over 6 years ago

It's not a problem! You can post a comment there with some of the information from here, like the games and how they're behaving poorly with various codes.

It's just that the issue is more complicated than the code-handler. Dolphin's entire way of handling Gecko Codes is bad.

Actions #5

Updated by JosJuice almost 6 years ago

Actions #6

Updated by JosJuice almost 6 years ago

  • Status changed from Duplicate to Accepted
  • Milestone set to Current
  • Regression changed from No to Yes

Unmarking as duplicate because I want to track this regression as Current without marking the master issue Current.

Actions #7

Updated by JosJuice almost 6 years ago

  • Is duplicate of deleted (Emulator Issues #10456: Gecko Codes Causing Freezes or Malfunctioning Across Many Titles)
Actions #8

Updated by JosJuice almost 6 years ago

  • Has duplicate Emulator Issues #10531: Random Stutter in Zelda Titles due to a change to the codehandler.bin added
Actions #9

Updated by danileon95 over 5 years ago

This is making the widescreen and 60 Hz PAL codes pretty useless. Every single game I've tried to use a widescreen or 60 Hz PAL Gecko code on gets this stutter, I can't think of any exception. :(

Actions #10

Updated by JMC4789 over 5 years ago

I'd rather have the codes run correctly than smoothly. Code behavior differences between Dolphin and Console is a big issue for the development of new codes - making them work the right is super important.

Actions #11

Updated by JershJopstin over 5 years ago

Agreed. In the meantime, if anyone wants the old code behavior in newer builds of Dolphin, you can copy codehandler.bin from the /Sys folder of an older build (before 4575) into a newer build; this works fine last I checked (though obviously, any codes that were fixed in 4575 will be broken by this).

Actions #12

Updated by taolas over 5 years ago

No expert here, but I looked at codehandler (source or debug inside dolphin) and there seems to be various bugs. It uses r0 for mfxer then uses it for various icbi r0, rX without zeroing r0 out first. Some icbi commands seem to have the wrong register too. Not sure if any of it contributes to the stutter though. I might try to look into it, but again, very new to stuff like icbi.

Actions #13

Updated by JosJuice over 5 years ago

  • Status changed from Accepted to Fixed
  • Fixed in set to 5.0-8985
Actions

Also available in: Atom PDF