Next Generation Emulation banner

Zelda - Twilight Princess (advanced discussion about the Dolphin coding)

211K views 723 replies 113 participants last post by  Lolthissia  
#1 · (Edited)
Zelda - Twilight Princess (Official Thread)

Image

Emulation status

Video: Works okay
Sound: Partly works
Options: Dual core works

Input

The internal configuration for the main stick the game is this (given as values in the allowed range 0 to 128)
  • Running: Seems to be in three steps rather than continuous at 30, 50, 60 with 60 being running at full speed. They seem to have made a mistake with the diagonal radius in this game so that the diagonal is +5 or +10 of that value.
  • Aiming in first-person view: continuous in the range 20 - 65. Possibly +5 or +10 in the diagonal like with the running.
Full output is therefore configured to be at around 65% of the maximum physical output of 100 (of 128) that the original GC controller produce.

nJoy recommended settings: The recommended radius setting is therefore 50% or 60% to use the full physical range as the control, and a shape of the output (the diagonal setting) that is somewhere between a square and a circle.

Old Issues

  • 32 bit: Why does DirectX give major black areas? For example the beginning waterfall scene. - Unsolved
  • 32 bit and 64 bit: Why doesn't OpenGL + Dual Core work? It freezes after the logos. Are there known causes for this? - Solved :thumb:
  • 64 bit: Why doesn't DirectX work with Dual Core? It's black after logo. It doesn't show the first scene (the FPS meter stops updating) - Solved :thumb:
Old questions

3. A more general question. Why can't the emulator skip idle processor cycles when Dual Core is enabled (shown as idle skipped in the status bar)? I think this would improve the speed even during actual gameplay because even then there seems to be idle cycles for some reason, perhaps because some games are programmed with FPS limits so that the GameCube CPU load is not always 100% even during gameplay.

4. Another general question. What is required to enable frameskipping so that the game can run at normal speed even if the FPS is 10 or 15? Currently it seems like the game only runs at actual speed when the FPS is the same as the vertical refresh rate (50 or 60 Hz). I guess frameskipping is similar to skipping idle frames, but since actual calculations takes place during those cycles there is some kind of complication in enabeling this feature. Perhaps there are articles on this topic on the internet?

(I think idle processor cycles is different from frameskipping, idle and skipped Mhz is cycles where no computations are done, it's common in the menus because they require little of the hardware. Frameskipping is skipping real processor cycles to keep the game at actual speed even if the rendered frames per second is as low as 10 or 15).

- Answer to 4: Games can have an FPS that is 1 / integer of the refresh rate. (A few games like Banjo Kazooie and Zelda OoT for the N64 have ran at 1 / 3 i.e. 20 FPS for the NTSC version and 16.7 FPS for the PAL version but most other games run at 30 or 60 FPS. For the GameCube about 50/50 of games run at 30 or 60 FPS, for the Wii at least 75% of games seems to run at 60 FPS.) The animation and speed of the game is synced to this FPS and there is no way in the emulation to get past this. The game would have to be reprogrammed (to be synced to time rather than the refresh rate) for this to be possible.
 
#2 ·
The DX plugin seems to just not be developed enough for this specific game. Many games run well with either plugin and many games run bad with either plugin. It depends on the users video card and it is also just the plugin itself and the incompatible game we are trying to run.

When you say how can we fix it, if you mean if there are any options beyond fixing the code, I'd say there is nothing we can do.
 
#3 · (Edited)
#4 ·
That seems like a great idea. Instead of trying to have the emulator emulate the sound effects and music, all we need to know is exactly when the sound needs to play and have some other program play it. Someone should be able to find on the disc when each sound is cued to play and write a script for vgmstream to play it at the perfect time.
 
#5 ·
That seems like a great idea. Instead of trying to have the emulator emulate the sound effects and music, all we need to know is exactly when the sound needs to play and have some other program play it. Someone should be able to find on the disc when each sound is cued to play and write a script for vgmstream to play it at the perfect time.
afaik that wouldn't fix the sound problems we have atm
like the one in zelda WW with the platform
 
#6 ·
No, it wouldn't fix sound related bugs making the emulator hang, but it would enable sound on games that do work fine. The emulator would not even know another program was playing sounds for it as I said, it would not fix the emulator but this could be a way for us to play games now with sound until Dolphin's own sound gets better.
 
#7 ·
No, it wouldn't fix sound related bugs making the emulator hang, but it would enable sound on games that do work fine. The emulator would not even know another program was playing sounds for it as I said, it would not fix the emulator but this could be a way for us to play games now with sound until Dolphin's own sound gets better.
as long as you know this i'd say go for it :)
 
#13 ·
where can i use the afc files? i dont find it i open the zelda iso and ther is nothing ( there is one it called track and more isnt there)
 
#19 ·
I'm starting this thread with the goal of solving these problems that could greatly improve gameplay in Zelda - TP.

1. Why doesn't OpenGL + Dual Core work? It freezes after the logos. Are there known causes for this? What is known about it? How do we fix it?
Don't know. Feel free to debug.

2. Why does DirectX give major black areas? For example the beginning waterfall scene. Are there known causes for this?
It does? Looks fine to me.

3. A more general question. Why can't the emulator skip idle processor cycles when Dual Core is enabled (shown as idle skipped in the status bar)? I think this would improve the speed even during actual gameplay because even then there seems to be idle cycles for some reason, perhaps because some games are programmed with FPS limits so that the GameCube CPU load is not always 100% even during gameplay.
The GPU can trigger interrupts on the CPU. In dual core mode, they are completely asynchronous. If idle skipping was enabled, and the game was waiting for an interrupt from the gpu .. you see what would happen right. It'd go mad trying to run the cpu at infinity mhz for short periods, completely screwing up timing.

4. Another general question. What is required to enable frameskipping so that the game can run at normal speed even if the FPS is 10 or 15? Currently it seems like the game only runs at actual speed when the FPS is the same as the vertical refresh rate (50 or 60 Hz). I guess frameskipping is similar to skipping idle frames, but since actual calculations takes place during those cycles there is some kind of complication in enabeling this feature. Perhaps there are articles on this topic on the internet?
Can't be done. The only thing you can do is disable all vertex decoding for every other frame for example, but that would only save you so much. If a game depends on an interrupt command in the GPU stream ... well ... it's just not gonna work if you simply forget about running the GPU for a frame.
 
#21 ·
It only gives major black areas on the 32-bit version. Yesterday I installed XP 64 and there are no more black areas.

Maybe the dx plugin should be separated into two 32/64 bit versions.

Also, the OpenGL plugin should be fixed to work with OpenGL 1.5 extensions (not everyone has an OpenGL 2.0 card, you know).
 
#25 ·
Don't know. Feel free to debug.
Okay

It does? Looks fine to me.
This seems like something that could be fixed in a couple of hours of bugtesting. Unless the 32bit code is much different the 64bit code.

The GPU can trigger interrupts on the CPU. In dual core mode, they are completely asynchronous. If idle skipping was enabled, and the game was waiting for an interrupt from the gpu .. you see what would happen right. It'd go mad trying to run the cpu at infinity mhz for short periods, completely screwing up timing.
Okay. But Dual Core still adds performance, right? Because the most demanding areas use few idle Mhz, so Dual Core can double the performance in those areas? And idle Mhz are not as demanding as real Mhz, or are they?

Can't be done. The only thing you can do is disable all vertex decoding for every other frame for example, but that would only save you so much. If a game depends on an interrupt command in the GPU stream ... well ... it's just not gonna work if you simply forget about running the GPU for a frame.
Okay. I was thinking about the PCSX2 Frame Skip option. But now that I tested it again I couldn't see that it made any difference. I'm not sure if it means skipping Idle Mhz or skipping some calculations in real Mhz.

If you disabled all vertex decoding and perhaps some other things how much of a gain could you see at most? Is it right that the emulator has to render 50 or 60 FPS to keep up with the actual game speed? Because most games could be playable even if the FPS is only 15, but if that means that the whole game goes in a slow motion speed of 30% of the actual speed it becomes tiresome to play it.