Emulator Issues #1625
closed
Frame Limit with Directx Plugin
Added by d34tH.tH3.k1D about 15 years ago.
Issue type:
Feature request
Relates to performance:
No
Relates to maintainability:
No
Description
When using the directx plugin, most of the time games run faster than
expected, and this doesn't happen with opengl (they often run slower than
expected which makes them not playable too). Also setting the Frame Limit
manually won't help at all.
I'm using the latest 64 bits builds on win7 x64, with a C2D E8400@3.00GHz, an
ATi HD4870 and 4GB RAM.
- Status changed from New to Accepted
- Issue type set to Feature request
I happened to have peeked the refresh rate code, it is somehow weird. e.g.
It looks like almost the same code but if you pay attention to that "videoupd".
if (targetfps > 5)
{
double wait_frametime = (1000.0 / targetfps);
if (Timer.GetTimeDifference() >= wait_frametime * frames)
no_framelimit = (u32)Timer.GetTimeDifference();
while (Timer.GetTimeDifference() < wait_frametime * frames)
{
if (no_framelimit == 0)
Common::SleepCurrentThread(1);
}
}
else if (targetfps < 5)
{
double wait_frametime = (1000.0 / VideoInterface::TargetRefreshRate);
if (Timer.GetTimeDifference() >= wait_frametime * frames)
no_framelimit = (u32)Timer.GetTimeDifference();
while (Timer.GetTimeDifference() < wait_frametime * videoupd)
{
// TODO : This is wrong, the sleep shouldn't be there but rather in cputhread
// as it's not based on the fps but on the refresh rate...
if (no_framelimit == 0)
Common::SleepCurrentThread(1);
}
}
Issue 1887 has been merged into this issue.
Temporary solution: Set Frame Skip to correct value (NTSC: 30/60, PAL: 25/50)
manually for each game.
Yeah, that's what I've been doing for a while now and it works well.
Issue 1895 has been merged into this issue.
In the Issue 1895 : I'm saying that "Enable Other Audio" in DSP config doesn't
work!!I'm not talking about the "Limit Frame Option" that have "Config". The issue
1625 is about "Limit Frame" Option with D3D...but isn't about "Enable Other Audio"
problem!
Because you are wrong :)
Audio throttle is always working (at least in lateset rev), which isn't working is
Frame Limit.
I'm saying that "Audio Throttle" doesn't work with some games that use Zelda Ucode
(example : Zelda Four Sword Adventures, when you select "Audio Throtle" the game
have more fps that the normal, that happen with "Ogl", not only with "D3D". Other
game : Super Mario Galaxy, Zelda Wind Waker, Zelda Tp, Link's Crossbow Training).
Ps : Sorry by my bad english :P
ayuanx, your r4724 commit broke audio throttling in non-AX games. Confirmed by sl1nk3.s
Coisbot : That's right, that was what I tried to say :P
Not sure if this should be a new issue, anyway I'm gonna report that frame limiter
(including the throttle by "enable other audio") is terribly flawed. (As of r4812).
When I run NSMBWii in Dx9, i get over 100FPS with no frame limit. But if I set on
frame limit, the game will always run in 5-10 less FPS than what I set it too. So if
I want it to run in 60 FPS, I need to set it to 65 or 70. Same with auto frame skip
or "enable other audio", they make the game run in 45-50 FPS, which is too little.
- Status changed from Accepted to Duplicate
Also available in: Atom
PDF