Project

General

Profile

Actions

Emulator Issues #6875

closed

Remove Zelda Twilight Princess Hack

Added by NeoBrainX over 10 years ago.

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

0%

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

Description

It's a stupid hack and there's no reason to keep it. We don't want to intentionally break games just to speed them up. Just because ZTP is a popular game doesn't mean it should get different treatment than other games in this regard.

Actions #1

Updated by JMC4789 over 10 years ago

I'm not saying that it should be kept, but perhaps it should be looked into (assuming it hasn't been,) why this is such a massive speedup for some users. I go from the low 20fps range to the mid 30s on Hyrule field with it on. It's a pretty blatant hack, and is only useful for one game, so it doesn't really fit what Dolphin has become either way.

I'm tepidly in favor of it being removed.

Actions #2

Updated by haddockd1 over 10 years ago

I havent experienced a speedup using the ZTP hack since per 3.0. Perhaps I am in the minority though but that hack does not speed up Hyrule Field for me endgame at all. I tested it using 3.0, 3.5 and 4.0 at various points and the FPS was essentially the same (+-1 or 2 FPS)

Actions #3

Updated by delroth over 10 years ago

Playing the devil's advocate here because I'm unsure about the idea: it's also fairly isolated and could probably be isolated even more if needed. The fact that it's visible in the UI is stupid and it should probably be enabled via gameini instead.

Note that other games have different treatment too: it's just implemented outside of the source code. Look at the automatic memory patches / "speedhacks" in default gameini files that are completely undocumented and not understood by anyone. ZTP is only the exception because this speedup hack is implemented directly in the source code vs. via a configuration line that is not documented.

I'm not arguing for or either, I just think it's potentially useful to people for marginal cost (have we ever had maintenance problems in our code due to this hack?). If someone wants to reimplement the whole BP reg thingy of course it wouldn't make much sense to reimplement the hack, but instead a design should be found that allows the manipulations done by ZTP to be fast.

Actions #4

Updated by Xtreme2damax over 10 years ago

If everyone had Sandy/Ivy Bridge, Haswell or newer hardware then I would agree as the hack wouldn't offer any benefit to systems capable of running Hyrule Field at full speed (Only SB/IB, Haswell systems) without the hack. On Core2Duo and first generation i3,i5,i7 and possibly AMD processors the hack offers a significant speedup in Hyrule Field.

I wasn't aware the hack broke any games and it it can be toggled on/off in the configuration. I haven't seen reports claiming the hack is breaking any games regardless if it is enabled/disabled to justify it's removal. If you have evidence of this hack breaking any games then I won't argue. If it is removed a lot of people are going to be upset and a lot more complaints will ensue due to the massive slowdown in that portion of the game and no way to resolve it.

Actions #5

Updated by JMC4789 over 10 years ago

fyi, I can't run hyrule field on full speed on a Core i5 3570K except with the hack on. With it off, I run it between 16 - 26 fps depending on how the game feels like running. With the hack it never dips below 30, and is usually around 34 - 35 fps.

Actions #6

Updated by JMC4789 over 10 years ago

For people on D3D, the Twilight Princess Hack is even more necessary (for playing). It runs barely 13 fps at any time in Hyrule Field. The VPS though is 60. With Twilight Princess Hack it's 30/60, going up to 35 when I turn off frame limiter.

Actions #7

Updated by Xtreme2damax over 10 years ago

A while back D3D9 was much faster at rendering Hyrule Field than D3D11. D3D11 rendered Hyrule Field at nearly half the speed of D3D9. I think the same was also true with OpenGL, not sure if anything changed since then. So in the case of D3D11 and possibly OpenGL this hack is even more important else the slowdown is unbearable.

Actions #8

Updated by haddockd1 over 10 years ago

On my 2500K @ 4.7 Hyrule Field runs at 19-22 FPS with or without the Hack on. I use the recommended settings and DX 11. LLE on thread makes a big difference but the ZTP hack makes no difference for me. Strange. Looks like I am the exception.

Actions #9

Updated by nop_jne over 10 years ago

Hack or not, if you can't explain the code in its entirety you can't just rip it out. ZPT seems to have a significant perf regression from d3.0 to d4.0, where LLE was bearable and ran about 85% of the speed in faron woods. Now with d4.0 it only runs at about 50% of the speed.

Actions #10

Updated by pierre over 10 years ago

The reason the ZTP hack does a speedup is drivers being stupid and using a large amount of time every time we change shaders. The hack allows most of the map to be drawn using a single shader instead of switching it about 12000 times. If you don't see a speedup in ZTP its probably because you didn't discover enough of the main map(fewer primitives drawn using fewer shader switches), your cpu has enough cycles to spare or you are using a better driver.

Actions #12

Updated by degasus over 10 years ago

btw, why did nobody say that this hack also affect the rendering? imo the mipmap looks a bit different.

Actions #14

Updated by NeoBrainX over 10 years ago

I somehow never really believed the hack doesn't affect rendering at all, thanks for verifying that.

btw: Can you upload a fifo log for that screenshot somewhere? I lost mine but would like to keep one for reference....

Actions #15

Updated by NeoBrainX over 10 years ago

  • Status changed from New to Fixed

This issue was closed by revision b49c09c36b67.

Actions #16

Updated by NeoBrainX over 10 years ago

This issue was closed by revision 287ebd964eeb.

Actions

Also available in: Atom PDF