-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] - Display of internal(in-game) FPS #444
Comments
I'll second the request. |
As I understand it, VFPS is what we have now, and what we are requesting here is RFPS. For instance in nullDC, 60VFPS is full speed for NTSC, but RFPS can vary internally(like e.g. its 30 in Grandia II). And yeah, measuring vsync events would be one way to do it, assuming all games on PS2 use vsync. |
I was going to have a bash at this last night. Until I realised that I can't even compile the latest gsdx, because of the opencl implementation ;p anyone recommend an opencl sdk?. I briefly tried the intel one, but it didn't work. |
@Asmodean I have the AMD one and GSdx compiles fine for me. |
I'll third this request. It would be a great feature so I can finally know what games don't really run at 60FPS internally, like the KH series, plus it'll help us identify variable framerate games, which would be ideal candidates for @Sarania's EE overclock hack. Also this way I'll be able to see the effects that speedhacks like EE Cyclerate and VU Cycle Stealing have on games like Shadow of the Colossus more clearly. @ramapcsx2 Dolphin calls it VPS. According to one of their developers (@RachelBryk), VPS stands for 'vertical interrupts per second'. So as long as the emulator is running at 100% speed, the VPS reading should be 60Hz. From what I understand then, the FPS reading PCSX2 uses would be considered VPS. https://forums.dolphin-emu.org/Thread-what-does-vps-stand-for |
So then you are saying my description is right... VPS is what we have currently, right? |
Yeah that's what I'm saying. |
Yes, that's right. Both measurements are useful to have. |
I think we currently using the internal vsync counter (ps2 hw) to measure fps. What others time do you want? |
@gregory38 That can't be - else that means every single PS2 game runs at 60(or 50) FPS which we know is not true(e.g. many games run at 30). Else I'm misunderstanding you. Either way what we want to display is the actual in game FPS itself. Like how some games run at 60, some at 30, some are variable and have drops, etc. E.g. this screenshot from dolphin(that karasuhebi sent me) http://i.imgur.com/c3O65KN.jpg Note VPS at 60(which is the measurement we have now) and FPS at 30 (which is the in game real FPS, which is what we want). |
I use VPS and RPS (=renders per second) on nulldc/reicast, but that also On Mon, Feb 2, 2015 at 8:51 PM, Blyss Sarania notifications@github.com
~skmp |
Hum, isn't it the gs configuration mode: progressive or interlace. If you want to read the related code check the file pcsx2/counters.cpp |
Potentially somethings that could be investigated |
I've noticed something interesting: Did older versions of GSdx do things differently? |
Nice find @Sarania! |
Isn't that game "Goemon"? If so, how did it manage to run before @gregory38 's recent fix? :p |
@ramapcsx2 It is "Goemon" and it didn't run before that, but it still needs an old GSdx version to work right. |
yeah, it crashes within a moment of play in the newer gsdx version's but, it runs well in gsdx-rev1286 according to parotaku. |
So what's the status of this? @Asmodean-, are you still thinking of giving this a bash? |
Here's another reason for an in-game FPS counter, trying to find 60FPS hacks! The member calls it VPS, but ignore that. She means FPS. VPS is what we have. XD |
bump |
Yeah, I am very interested in this and I hope it gets implemented at some point, I would like to make some PS2 games run at 60 FPS so I need to know the real framerate at what they are running 👍 |
@KabutoKun Nice username. Mazinger for life! |
I'm sure @skmp or maybe someone from Dolphin (@RachelBryk?) could give us some ideas. I believe @Asmodean- said he was going to try and give this a shot. |
So now that @gregory38 is all GSdx all the time and @refractionpcsx2 is back, I thought maybe we could figure out a way to get this done? :D |
The only way i can think of doing this is looking for a "finish" command on the GIF/GS side, but i suspect that is per routine rather than frame. I guess we can test it, but i don't guarantee that it'll work. Doing it on VSync's wont work because in the case of speedhacks where it gives false FPS, the emulator sends the same frame twice, so we would count the same frame. |
Any progress on this? I've found yet another user who's been confused by PCSX2 calling its counter "FPS": https://www.reddit.com/r/PCSX2/comments/3iusnp/is_there_any_way_to_limit_the_frame_rate_on_121/ |
Yeah you didn't quite explain it right. All games run at 50fps or 60fps (its actually like 59.97 FPS, but who's counting right?) however a lot of games are interlaced, which means every "frame" for the emulator, it's actually only drawing half a frame, so 2 frames would be a full frame on the PS2, so you end up with 30 full frames per second on NTSC, 25 frames per second on PAL. We only count each vsync sent by the main emulator. I guess a cheap way of doing it would be to detect if interlacing is being used then half the frame rate displayed, but there is a percentage there to which is correct whichever way you look at it. |
Interlacing might be the issue on some cases, but at least some deinterlace methods (In PCSX2 - the bob variants) double the rate such 30 frames/s end up in actual 60 screen updates per second. The Weave and Blend methods, however, do end up with 30 screen updates/s. However, I think that interlacing is not the only issue. For cases such as SoTC which can show 60 FPS but actually update the screen as low as 15-20 times a second (because that's how the real PS2 does it) is even more misleading, and this is where "internal/in-game fps" would be more useful. IMO we should change the "FPS" title to "Speed", and the change value to the current fps value divided by the display mode's inherent rate. So e.g. If currently we display "FPS: 59.94" for an NTSC title, then it should be "Speed: 100%" instead, and if the current fps is 25 on a PAL title, then it should show "Speed: 50%". So this would at least clear the confusion about the FPS value. However, the in-game fps value (like 20 for SoTC when it's running at 100% speed) would still be useful, and IMO that's what this bug is really about. |
Yes. But let's forget about half image. It is a minor details implementations. |
So i think the texture upload threshold idea by gregory is indeed as close as possible to the idea that was always requested. About fmv's one can talk later i guess. |
Internal FPS for an FMV is less pertinent. I think we can fake it TBH. For NTSC, the FMV is gonna be 29.97 and for pal it will be... what is it? 24.97 or something? Anyway the FMV will conform to the old SD standards, I'm 100% sure. So literally just fake it. Variable FPS in digital video is a very recent thing - it won't be present on something as far back as the PS2. And I can't believe that any game dev would have encoded it at anything less than the standard. There is no reason to. If there is an off case where it's wrong... I don't think it's that big a deal TBH. I'd rather fake it than show 0 and I don't think the extra work is worth it here. As for why we need internal - well here is some reasons: The EE overclock was designed to increase internal FPS. However judging that with your eyes is often hard. How do we know it's not just a placebo unless we can see? Also other speedhacks often cause "false" VFPS and users don't understand why their game is "60 fps" but "half speed." That was somewhat mitigated by changing the label to speed, but yeah it still happens. Another one is it could help in creating 60 fps patches for more games, which is always a welcome thing I think. And lastly... it's just a good thing to know in my opinion. |
Actually I just check my PM and I have a build from ssakash to test... so on to that. |
If some measurement has to be hardcoded because "we already know the value".. then it doesn't even make sense to take in the first place. |
It's no different than how the framelimit is hardcoded for NTSC/PAL etc. It has to come from somewhere. Games don't say "Hey, I run at 60FPS" rather they say "Hey, I'm NTSC" |
Mhh.. I dunno. Tbh I remember some wizardry mumbling by @ramapcsx2 about some crystals somewhere somehow :s |
Lol. As for the build @ssakash provided me I will probably test it tomorrow. I've got some household stuff I am trying to do. But once I test it, I will report back. He seems to think it won't show the difference as caused by overclock or speedhack but we will see. |
I tested ssakash's build just now. He is using some method based on draw call counting. While it does indeed seem to show the internal FPS, it's not affected by EE clock changes or VU stealing or anything. Ssakash said that was the expected behavior though because it was independent of what was happening in the core. Anyway he said he is working on a much nicer way so I am waiting and looking forward to testing that. Good progress though! |
Nice progress @ssakash, I'm glad you got it to show you in-game FPS! How is your "much nicer way" coming along? Is it able to show the difference in FPS when the core is messed with? |
@ssakash @Sarania Right now this is how I calculate the internal FPS of SOME PS2 games in PCSX2:
BTW, this can also be used as a workaround for a "frame advance" feature until this is implemented (someone created an issue around here asking for it).
As a workaround to also consider slowdowns or lower than full speed in PCSX2, some games have an internal time counter too, which may be stored in seconds or some fraction (like a running time in menus for RPGs, lap time in racing games, etc): if the game is running at full speed, the internal new-previous time difference should be 1 second too (the same as the external app time). When it's not the same time then you divide the the new-previous frame difference by new-previous time difference, for example: I read the time address and I got a value of 45.0 (in seconds, stored as a float) and a frame value of 439, then after 1 second in the external app I read again and I get a time of 45.7 (lower than 1.0 external second of difference because the game at some point was running at lower than full speed in PCSX2) and a frame of 460: 45.7-45.0=0.7 and 460-439=21, so 21/0.7=30 internal FPS. Thanks to using this crazy method, I can say:
Also, if there is any way to get the internal time of the emulated PS2 (using a syscall or something), that would be great because then I can write a better/cleaner method in assembly at least in a per game basis (I made a generic custom internal FPS counter for PSP games I use for special hacks). Maybe some of this info is "useful" for a proper internal FPS counter in PCSX2 (at least the part to get the internal frame counter as a reference). Anyway let me know where can I get that WIP PCSX2 build (even if it is an older version, I won't share it with others if that's a concern). |
Nice sleuthing there! Unfortunately I don't have the build anymore. @ssakash had given me an older WIP version that only kinda worked but I don't have that one anymore. He had told me he had a better one in the works but I never personally had that one and I don't know how viable it turned out to be. However having memory addresses for some in game counters could be a boon. It's at least a way to directly compare any counter we make. So good job there for sure! |
If this is not an address in the bios address space (does that even exist?) it doesn't help at all. To maintain a list of all game counter addresses in the gamedbf will never be possible. @KabutoKun 60FPS in MGS? This sounds like the nightmare that will destroy the whole world regarding cpu consumption... probably your cpu will heat to some Schwarzschild temperature that will turn the earth into a black hole. What kind of pc do you have to consider and even enable playing something like that? |
Why doesn't it help? To test the current test in game FPS implementations weve had to glue our eyeballs to the screen and try to notice a difference. As I said at the very least it would give us something to compare a general solution too. |
I was actually not addressing you. Not sure why I put the @ in the center of the response. You can not use the feature as general direct access to the frame advance feature and frame counter. But for sure you can use it in a specific case as a reference as you said. Tbh I don't really get why there should be such a counter in release code if the game does not explicitely need it. |
Well, those people that like tweaking will certainly find it useful to find perfect EE / VU cycle settings for their games. It can also quickly show any affect of any of the advanced settings on the internal frame rate. On the method: |
@gregory38 had a nice idea with the draw call counting earlier. Ignoring issues with FMV where it wouldn't work right, this is entirely on the GS and should produce the metric people have most use for. After all, they would (should) be tuning settings for in-game 3D anyway. |
Didn't GSDX used to have a drawcall counter? |
There is a global variable used for debug. GSstate::s_n Otherwise more complex you can try to track if the frame buffer was written since previous vsync |
Some games such as God of war, use a rendering shortcut when you play with EE/VU cycles. For example they can use the background of the previous frame. Maybe draw call number could be interesting too |
Hey we could start a list "Games which might benefit from Vulkan" :P |
Bump. I see 60 FPS codes for games all the time but is there a way to see internal FPS counter? |
Bump. I just tried analyzing framerate from raw video footage with trdrop. Explained it in forum https://forums.pcsx2.net/Thread-Guide-Analyzing-internal-FPS |
Not reliably, no. Some games are easy to detect, others are near impossible. This is something we've tried to do internally but there's no real solution to do this which will work for all games, which is why it hasn't been added. |
This old issue (7 years old - 2015) is finally fixed in #5361 :) |
I think this would be very nice to have. Currently we only have the GSdx FPS indicator which of course is not true in game FPS. But there should be a relatively easy way to count the internal FPS too, I think. It would be useful in several ways I can think of. One is helping novice users to understand the effect of speedhacks better and how their game can feel slow even at 60 FPS. Another is testing the effects of the proposed EE overclock.
The text was updated successfully, but these errors were encountered: