Dolphin, the GameCube and Wii emulator - Forums

Full Version: Major speed-up in some games (Watchdog config patch V3)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
there isnt that much to fix:

just global
static int s_fps = 0;


than:
//////////////////////////////////////////////////////////////////////////////////////////
// We can now draw whatever we want on top of the picture. Then we copy the final picture to the output.
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
void Renderer::SwapBuffers()
{
// ---------------------------------------------------------------------
// Count FPS.
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
static int fpscount = 0;
static unsigned long lasttime;
++fpscount;
if (timeGetTime() - lasttime > 1000)
{
lasttime = timeGetTime();
s_fps = fpscount - 1;
fpscount = 0;
}
// ---------------------------------------------------------------------

and a draw function Smile

if (g_Config.bShowFPS)
p+=sprintf(p, "FPS: %d\n", s_fps);

there is no way this can be wrong...


€dit:

Maybe the fps should better be counted in Renderer::Swap ?

I'll try it Big Grin
That is the GPU cycles from Render.CPP isn't it? That one is one of the counters and should be left as it is.

The problem are the CPU cycles Dolphin is not measuring, the reason of implementing a dual fps counter for both emulated cores.

In order to give life to AUTO mode, we need a cpu fps counter.
Got another idea, we can make a very simple fps counter...
Remembar that function that updates devices and patches AR codes?
We measure the times a second this function is called, we compare it with the fps, if they are different, we got it.
The thing is... how do we send that info from systemtimers to render, or window?
(07-24-2009, 06:29 AM)CacoFFF Wrote: [ -> ]That is the GPU cycles from Render.CPP isn't it? That one is one of the counters and should be left as it is.

The problem are the CPU cycles Dolphin is not measuring, the reason of implementing a dual fps counter for both emulated cores.

In order to give life to AUTO mode, we need a cpu fps counter.
Got another idea, we can make a very simple fps counter...
Remembar that function that updates devices and patches AR codes?
We measure the times a second this function is called, we compare it with the fps, if they are different, we got it.
The thing is... how do we send that info from systemtimers to render, or window?

we dont need to send. just setting the watchdog to the value where the cpu cycles are best will do.
just check the cpu thread Big Grin

First because the "rest" of dolphin keeps gpu - cpu synced.
Second: the gpu usually is fast enough for rendering this little Smile


For GPU - FPS We may use : void Callback_VideoCopiedToXFB() in Core.cpp which is used for the fpslimiter too
Quote:Why not having the Watchdog-Auto running the whole time and keep adjusting. Different areas in games may need different settings.

i also like the change the whole time.

problem is : the faster you adjust, the more likely errors will happen.

you get the info about gamespeed every frame but to be thrustworthy it cant be used that frequently, to much jitter.
i allready noticed that with the framelimiter.


So that means only like maybe 1 learning step every second... that wont work to change for specific game situations fast enough.

but not only that, we need to check in 2 directions to see which is better.


maybe there could be a look-up structure that assigns specific wd values to different FPS/cpu cycle situations for fast adaption, but thats much too far to talk at the moment.


i will do a first test tomorrow when im back home with a simple 1 step each second attempt to see if it comes to any convergence at all.

if yes, we can still improve it.
Yes, but I need to watch the real impact of the watchdog on both cores at the same time.

I still find difficult to understand why on Brawl WD 15 does the fps actually go up, when the gpu cycles are supposed to be the same.
Alternately, why does the same fps counter goes up on SMG when the cpu cycles are supposed to be untouched?

What is this fps counter measuring?

Is it possible that single player games like Zelda or SMG actually wait for a real frame to finish and that this isn't controlled by the emulator, maybe because Cpu is slower that Gpu here?

...
Now why does this happen in non-ax games? Does DSP synch have something to do?
If there is an AX game that doesn't get a benefit from the watchdog hack tell me, so i can discard this opinion.

Meanwhile, i'll go see if i can implement the PRESET option to save some time.
(07-24-2009, 06:59 AM)CacoFFF Wrote: [ -> ]Now why does this happen in non-ax games? Does DSP synch have something to do?
If there is an AX game that doesn't get a benefit from the watchdog hack tell me, so i can discard this opinion.

I have no idea what you guys are talking about but this may help.
remember that the Capcom vs Wtf game the fps increases by 40+. from really slow gameplay to fast gameplay ,
To me it does not look like theres frameskiping and I can tell when there is.the game and Fps just speed up.
If i lower the resolution the game runs faster "duh" but faster to a much Greater scale than other games
so test ur finding based on that game not brawl

16x anisotropic , 1280x 1040 res 8x anisotropic . Q6600 nvidia 8800gt
The hell with it, I'm not adding preset mode.

And Nolan is definitely not finished with his changes, i'll stay and watch for a couple of days how things go on.
Hmmm this watchdog "thing" sounds very interesting.
I'll try it out later and post some results.
(07-24-2009, 06:59 AM)CacoFFF Wrote: [ -> ]Yes, but I need to watch the real impact of the watchdog on both cores at the same time.

only if you want to control gamespeed AND fps with the watchdog.

that could be a bit difficult for those auto-frameskip games as there more frames means slower game. (thats why high watchdog slows them down)


Quote:Is it possible that single player games like Zelda or SMG actually wait for a real frame to finish and that this isn't controlled by the emulator, maybe because Cpu is slower that Gpu here?

dont know for SMG but both Gamecube Zelda do that.

thatsh the reason why you get better results in those games with high watchdog : dolphin will check more often if frame has finished.

you can notice that perfectly at mario sunshine and old rev(e.g. 33xx) : the lower the watchdog, the more idle cycles you get and the lower fps and slower gameplay you get.
I get the highest framerates in TP with watchdog at 15. But that doesn't seem to translate into a real-world performance boost.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22