(07-23-2009, 04:33 PM)Iulius Wrote: [ -> ] (07-23-2009, 02:33 AM)CacoFFF Wrote: [ -> ]On a second thought, it wouldn't be possible the way it is now, let me explain.
The fps counter isn't accurate, SMG for example, remains the same yet the fps counter goes up, until we don't fix the fps counter, or add one counter for each core to see how both cores behave, there is no chance for auto-adjust.
I thought the fps counter was measuring Emulated CPU instead of GPU cycles, but after getting results from other users in games like SMG or Zelda, I really have little idea of what's going on with it.
i had my holidays last weeks so i dont know what happened in the meantime.
so framecounter still not fixed ... we can use cpu cycle counter instead.
that would be even better because it defines the real gamespeed instead of just the fps output.
very nice that you found out how to change watchdog during running game. that was my biggest doubt about making that auto-config working.
i still have to work for my study-project but i think i can spend a few hours for a first implementation this weekend.
but i cant say if it will work good on those build-in-frameskipping-games.
For future reference, In SystemTimers.cpp, along with the Watchdog hack, there are other timed functions like device updaters, dsp updaters, etc.
I added an include to ConfigManager for obvious reasons and used the function that executes every frame to update devices, in that same function i found the Action Replay patcher

.
I made it check for config change every 60 calls to that function (frames), it will read the config and if only a change is detected, it will reapply the WD timer value.
I have two ideas on how to go on that I would really like to discuss here:
1) We lay our hands on ISOProperties, where the specifig game options are stored, and add an optional WD recommended value, which will be invisible and only set in the ini files, it won't be written from the emulator as well, just to make it remain optional.
I add an extra option in the Main WD config, next to 60, named Reccomended (or something like that).
It will read from the game specific settings and apply that value, if there is no custom WD for that game, it will automatically choose 60.
2) We take a look at where the FPS counters are processed (both overlay and window title ARE DIFFERENT!), and see if we can add a Dual counter for both cores or something like that.
Then we work as Iulius said, making the emulator choose the WD by itself, it has its risks since some games can hang while doing the autoconfig (gotta find a way to make them recover from the hang).
Of course if we follow way one, we can still fix the fps counters.