Closed unknownbrackets closed 10 years ago
Just wonder where to test this code ? sceDisplay ?
Yeah, this line:
const float hCountPerVblank = 285.72f; // insprired by jpcsp
It will probably only matter for games which call sceDisplayGetAccumulatedHcount().
-[Unknown]
I see. Tried few games like BOF3 ,Silient Hill and Black Rock Shooter , seems to be not helping.
Dragoneer's Aria is affected by this too.
It uses the same basic formula. Here's it expressed a different way: hcountPerFrame = (286.0 * 59.9400599) / 60.0;
That suggests it should be, more accurately, 285.714285523333, per vblank.
Or, I wonder if vblanks should occur 59.9400599 times per second? Doing that and 286 does make the game show 30 fps.
const double frameMs = 1000.0 / 59.9400599;
Guess I should try to test that...
-[Unknown]
My tests seem to indicate that 1000.0 / 59.9400599 is more correct. I timed 240 frames (239 after the starting frame) with both values and on the PSP.
PSP (expected): 3987346us 59.9401 value: 3987326us (20us different) master value: 3983342us (4004us different)
Hmm.
-[Unknown]
59.94 is the NTSC field rate, so it would certainly not be unusual.
I think there are other games with timing issues, but I don't know which of them / if any of them time the way Blade Dancer does.
On a real PSP, Blade Dancer gets the following timings:
Currently in PPSSPP, Blade Dancer gets 45 / 22 respectively.
The timing code does something like the following (maybe it skips saving hcount in some cases.
Anyway, I thought the 286.0f was interesting. I tried running this in psplink, logging v, and I got a loop with 59.940060 from the PSP. From PPSSPP, I got 59.730476 for every fourth value.
So, I tried 286.0f for hCountPerVblank. The result was 60 / 30. That'd be great, but I'm aiming for 45 / 30 (well, that said, the game's "target" FPS is 60.0f in the menu, so maybe that is correct..) I tried values in between 285.72f and 286.0f, and it just scaled both FPS values.
Anyway, the test seems more correct with 286.0f, but I'm not really sure. Maybe it's my fault and it's drift. Or maybe 286.0f is correct.... just not sure.
Does anyone know of other games with bad timing affected by this value?
-[Unknown]