Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
Cpasjuste
Posts: 214 Joined: Sun May 29, 2005 8:28 am
Post
by Cpasjuste » Tue Oct 16, 2007 7:40 am
Does someone know how to use this function correctly ? I can't find any help on it.
SilverSpring
Posts: 110 Joined: Tue Feb 27, 2007 9:43 pm
Contact:
Post
by SilverSpring » Tue Oct 16, 2007 8:35 am
What do you mean correctly? It just returns a float (which it just gets from the vsync freq):
Code: Select all
float sceDisplayGetFramePerSec()
{
return(sceLcdcGetVsyncFreq());
}
Art
Posts: 642 Joined: Wed Nov 09, 2005 8:01 am
Post
by Art » Tue Oct 16, 2007 1:19 pm
Wouldn't that always be 60 as long as the clock speed wasn't changed?
Cpasjuste
Posts: 214 Joined: Sun May 29, 2005 8:28 am
Post
by Cpasjuste » Tue Oct 16, 2007 7:03 pm
Yes it seems that it always return the same value even with changing the cpu speed, it's why i was asking :/
Art
Posts: 642 Joined: Wed Nov 09, 2005 8:01 am
Post
by Art » Tue Oct 16, 2007 8:55 pm
I wonder if you could calculate it then?
vsync freq = CPU clock divided by 3.7
SilverSpring
Posts: 110 Joined: Tue Feb 27, 2007 9:43 pm
Contact:
Post
by SilverSpring » Tue Oct 16, 2007 11:46 pm
How to calculate what, vsync freq?
(pixel_clk_freq * cycles_per_pixel)/(row_pixels * column_pixel) ==
(9MHz * 1)/(525 * 286) ==
59.9400599........ etc. etc. Hz
Cpasjuste
Posts: 214 Joined: Sun May 29, 2005 8:28 am
Post
by Cpasjuste » Tue Oct 16, 2007 11:51 pm
In fact this is not very usefull, the goal would be to calculate the frame per seconds we get under any aplications or under the vsh for exemple.
SilverSpring
Posts: 110 Joined: Tue Feb 27, 2007 9:43 pm
Contact:
Post
by SilverSpring » Wed Oct 17, 2007 12:13 am
Yea the name is misleading (sceDisplayGetFramePerSec). Its because of the devkit external displays (which would return different values - depending on the type of display used. The devkit supports many different displays).
Cpasjuste
Posts: 214 Joined: Sun May 29, 2005 8:28 am
Post
by Cpasjuste » Wed Oct 17, 2007 12:15 am
Ok, it's more clear now. I will look in another direction, maybe sceDisplayGetVcount would do the trick, but i dont think it will count external vblank ... i need to spent more time on this.
Thanks for your answers !