I want to check how my code is performing on the real hardware, but I have no idea how to get the current framerate, or anything else that I could use to profile my code.
LibGS had GsGetVcount() but I have no idea how to implement this by myself.
How do I get framerate/timing without LibGS?
- ArthCarvalho
- Active PSXDEV User
- Posts: 45
- Joined: Jan 29, 2016
- I am a: Artist, Programmer
- PlayStation Model: SCPH-103
- MrQuetch
- Active PSXDEV User
- Posts: 42
- Joined: Apr 01, 2018
- I am a: Programmer and artist.
- Motto: You can accomplish anything.
- Location: United States
I was wondering how one could get a 'time' from whence the console started. This honestly would suffice for now. Well, looking at LIBREF46.PDF, the 'GsGetVcount' function returns a long. You could try using a 'printf' statement in your game-loop to see the current value of the vertical retrace. I tried this, and it worked perfectly:ArthCarvalho wrote: ↑November 19th, 2019, 5:34 pm I want to check how my code is performing on the real hardware, but I have no idea how to get the current framerate, or anything else that I could use to profile my code.
LibGS had GsGetVcount() but I have no idea how to implement this by myself.
printf("GsGetVcount: %d \n", GsGetVcount());
Unless, this isn't what you meant by 'having no idea how to implement this yourself'? I imagine you could have a variable (like 'currentFrame') and another one (like 'previousFrame') and subtract one from the other to see how many vertical retraces took place between the two. I'm certain you could get a good set of averages that way.
Who is online
Users browsing this forum: No registered users and 2 guests