hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.85k stars 2.13k forks source link

Slowdown when going over boost-pads in Wipeout Pulse [linux, xf86-video-ati driver, R9 290] #8643

Open AED-001 opened 8 years ago

AED-001 commented 8 years ago

Specs:

Hardware is fine. More than enough to run, shouldn't be getting any slowdown. Using 1.2.1-63-gb137bf1, listed as (Dev-Working) (zip, amd64) on http://build.ppsspp.org/?page/downloads#linux.

So, here's the issue. My computer will run any early PSP game flawlessly. Examples include Lumines, Wipeout Pure, etc. However, games introduced later on in the PSP's life-cycle that feature distortion effects on the HUD seem to cause micro-slowdowns when I'm running PPSSPP on Linux.

My example is Wipeout Pulse. I love this game to death, and I would kill to be able to play it at 60FPS in HD without a single hitch. The only problem is that whenever I go over a boost pad, it causes this motion-blur distortion on the HUD, which causes the game to slowdown for anywhere from a half-second to a second (anywhere from 5 frames loss to 20 frames loss depending on how "strong" the effect is) and then the game picks right back up.

The game does not play like this normally. I own it on the PSP, and I own it for my Vita also. Game runs as smooth as butter on both without this slowdown.

If I disable the HUD in the in-game settings, the game will run at 60FPS flawlessly without a hitch-- this is because the blur/distortion effect that is applied to the HUD never occurs, and because of this the game doesn't slow down.

Excuse my ignorance, but is there any way to disable the blur/distortion effect that the HUD undergoes in PPSSPP's settings? If there isn't, I'd really love to see an implementation where I can simply disable the HUD blur/distortion effects. I tried a lot of the existing options (like running w/o buffered effects, speed-hacks, etc), and none of them seemed to work.

For reference, this testing is done with all settings at default except for "Cache ISO to RAM" checked (to prevent slowdown when the game has to load in music) and "Rendering Resolution" set to "Auto 1:1".

hrydgard commented 8 years ago

Wow, that's weird. On my machine Pulse is liquid smooth, even over boost pads, HUD or not. It's nVidia though. I don't have an AMD to test on.

Sounds like some bizarre driver issue to me...

Do you get the same slowdown if you run with non-buffered rendering? Does the render resolution matter?

AED-001 commented 8 years ago

Did some quick testing.

Doesn't matter if I use buffered rendering w/ 1x PSP or non-buffered rendering. Get the same lag regardless.

However, I did discover that it only happens when there are other opponents present-- if I play Time Trial or Speed Lap, there's absolutely no lag at all.

Have you tried the Eliminator mode through Racebox? It's very chaotic and I'm curious to see how it runs on your machine-- it's the biggest culprit, as it causes the slowdown every time I touch a boost-pad there (many opponents and particle effects going on at once).

UPDATE: I just tested Eliminator mode both on my actual PSP (333MHz) and PSVita (444MHz), and on PPSSPP. It seems that in the actual game, the lag is present there too, except for one caveat-- instead of the game slowing down, the game just skips the lost frames.

I figured I could use auto-frameskip to replicate what the actual game does, but the issue is that the implementation of auto-frameskip doesn't seem to be dynamic-- resulting in my game to go all the way down to 30FPS as soon as it dips under 60FPS, the same effect as if I had just set frameskip to 1.

unknownbrackets commented 8 years ago

Auto frameskip should measure the time it takes to render a frame, and flip dynamically. You should set the frameskip value to the maximum frameskip you can withstand, and the auto checkbox to tell it to try to skip less if possible.

For me, it works fine - even with max frameskip set to 4. If you set it to 4, do you still get 30 fps, or do you get even less?

-[Unknown]

AED-001 commented 8 years ago

Still get 30FPS. Will dip a little less sometimes when set to 4-- like 25FPS. But the same thing happens, where if I speed up to 60 and even dip a little below it'll go down to 30FPS before coming back up.

I'm pretty sure I don't have any sort of VSYNC enabled (as i'm using the xf86-video-ati driver), but I can't seem to find VSYNC in my PPSSPP options.

EDIT: I have a hunch that it could be something in the game itself, that causes FPS to sync to 30 if it can't reach 60FPS. I don't know if this is true, but it would make a lot of sense why frameskipping isn't working how it should be. If it is true... it might be possible to alleviate my symptoms with a cheat, similar to how you can uncap the framerate from 30FPS to 60FPS with cheats in many PSP games.

unknownbrackets commented 4 years ago

It might be that we should make the drawing actions here consume more emulated cycles, to trigger the game itself to internally frameskip (like is supposed to happen on a real PSP.)

Does this still happen?

If yes, it'd be helpful to get a snapshot of a frame using the GE debugger that reproduces the problem. That way, we could focus on the actions in that frame (compared to other frames) to try to better tune the performance.

See here for instructions - it's not hard and works on Linux too: https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

You can zip that and then drag and drop it into a reply here.

-[Unknown]