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
11.32k stars 2.18k forks source link

Graphical glitches related to save states and minimizing #13529

Open Panderner opened 4 years ago

Panderner commented 4 years ago

Here's what's happens a glitches when the black screen effect bug but when i use the save state it changes the screen to Save State's thumbnail.

Here's a Example for enemy encounter effect in Persona 2: Innocent Sin:

Here's what's looks like without using save states or minimizing: ezgif com-gif-maker

and here's a another one using save states or minimizing: ezgif com-gif-maker (1)

Here's a shatter effect in Danganronpa comparison:

With using save states or minimizing: Screenshot_2020-10-10-23-18-09-47_2f85358b2198d26f8aca533d68bee793

Without using save states or minimizing: Screenshot_2020-10-10-23-52-26-39_2f85358b2198d26f8aca533d68bee793

and what save screen screen and pause screen looks like: Screenshot_2020-10-11-01-52-40-47_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-11-01-53-12-06_2f85358b2198d26f8aca533d68bee793

YS Seven: ezgif com-gif-maker (2)

Panderner commented 4 years ago

Games affected: Persona 1 and 2 enemy encounter effect Shatter effects, save screens, pause screen in Danganronpa. YS Seven Danball Senki and Danball Senki Boost (#13338) Gundam AGE Universe Accel/Comsic drive (only happens for block transfer effects turned off) Gundam Battle Series (#13749) Hot Shots Shorties (Everybody's Stress Buster) Portable Island screenshots (#14533)

Games affected for graphical artifacts: Sega Rally (#6979) Juiced 2 (#7295) Colin McRae Rally 2005 (#7810) flickering shadows

Panderner commented 4 years ago

Danball Senki and Danball Senki Boost affected this issue: Screenshot_2020-10-12-20-29-19-57_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-13-17-50-25-28_2f85358b2198d26f8aca533d68bee793

Panderner commented 4 years ago

I've mentioned #8708, #13079 and #13338 for using these screenshots that are affected this bug that changes pictures using save states and minimizing

hrydgard commented 4 years ago

Thanks for the good reports, this is very weird...

Panderner commented 4 years ago

Character Talking backgrounds in Gundam AGE Universe Accel and Cosmic Drive (only happens if you disable simulate block transfer effects) Screenshot_2020-10-14-15-56-50-88_2f85358b2198d26f8aca533d68bee793

hrydgard commented 4 years ago

Stuff that only happens if you disable block transfers is not really bugs.

We're nearing a state now I think where we can just remove that option, it's not that many games that benefit without breaking anymore..

Panderner commented 4 years ago

Stuff that only happens if you disable block transfers is not really bugs.

even I've enabled simulate block transfer effects for Persona 2, enemy encounter effect glitch still happens. including other games like Danganronpa.

hrydgard commented 4 years ago

Then that's a real bug.

Panderner commented 4 years ago

This bug does not occur on Software Renderer mode. Screenshot_2020-10-14-16-25-18-65_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-14-16-29-48-48_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-14-16-30-56-20_2f85358b2198d26f8aca533d68bee793

Panderner commented 4 years ago

These issues are caused by graphical glitches related to framebuffers.

Panderner commented 3 years ago

@hrydgard this also happens on all backends.

Panderner commented 3 years ago

@hrydgard it also happens in all backends can you remove the OpenGL label?

Panderner commented 3 years ago

Regarding this comment https://github.com/hrydgard/ppsspp/issues/13256#issuecomment-691658682 Hot Shots Shorties (Everybody's Stress Buster) it also affected this issue:

Before Minimizing: Screenshot_2020-12-13-22-44-58-421_org ppsspp ppsspp

After Minimizing: Screenshot_2020-12-13-22-40-30-466_org ppsspp ppsspp

hrydgard commented 3 years ago

Has this worked in old builds? Possibly back when we had Readback mode in addition to buffered and non-buffered?

At least the Persona 2 issue seems to be texturing from a section of RAM, so this seems to be about the CPU reading back the screen copying it from VRAM to RAM. If you switch tasks or save state, we readback and write the framebuffer to VRAM, which makes it look like it works (kind of - it's still an old frame).

So likely there's a function that needs patching (or we need to implement proper detection of CPU reading from VRAM, which is difficult).

Anyway, postponing to 1.12.

Panderner commented 3 years ago

Same happens for older versions of PPSSPP

Panderner commented 3 years ago

Here's what happens when i disable BlockTransferAllowCreateFB for Ys Seven

BlockTransferAllowCreateFB off: ezgif com-gif-maker (1)

BlockTransferAllowCreateFB on: ezgif com-gif-maker (2)

LunaMoo commented 3 years ago

So the compat hack should be disabled for this title, since it causes issues. It was already written, so just going to paste why rushing to add games to compat (speed)hacks was(is) a bad idea: https://github.com/hrydgard/ppsspp/issues/11669#issuecomment-470393342

hrydgard commented 3 years ago

Thanks for narrowing that down @LunaMoo . I think we'll just disable this speedhack for Ys like you did in your fork.

ghost commented 3 years ago

Here's what happens when i disable BlockTransferAllowCreateFB for Ys Seven

BlockTransferAllowCreateFB off: ezgif com-gif-maker (1)

BlockTransferAllowCreateFB on: ezgif com-gif-maker (2)

@hrydgard please re-enable again BlockTransferAllowCreateFB on this game YS7.

To avoid glitch Panderner reproduce add this game also to ClearToRAM 👍 tried and tested.

Panderner commented 3 years ago

Enabling again for Ys Seven is bad idea @Gamemulatorer because it will result black screen save icons and BlockTransferAllowCreateFB off gif is a correct one.

Here's a gif for both: BlockTransferAllowCreateFB and ClearToRAM enabled: ezgif com-gif-maker (1)

ghost commented 3 years ago

Enabling again for Ys Seven is bad idea @Gamemulatorer because it will result black screen save icons and BlockTransferAllowCreateFB off gif is a correct one.

My save state png still correct. Screenshot_2021-10-11-12-00-53

ghost commented 3 years ago

Here's a gif for both: BlockTransferAllowCreateFB and ClearToRAM enabled: ezgif com-gif-maker (1)

Can you explain what's wrong in this gif?

Panderner commented 3 years ago

Here's a gif for both: BlockTransferAllowCreateFB and ClearToRAM enabled: ezgif com-gif-maker (1)

Can you explain what's wrong in this gif?

This gif is incorrect.

And this one is correct: 104910080-c5629880-59c3-11eb-8baf-cb4dfd506542

ghost commented 3 years ago

Here's a gif for both: BlockTransferAllowCreateFB and ClearToRAM enabled: ezgif com-gif-maker (1)

Can you explain what's wrong in this gif?

This gif is incorrect.

And this one is correct: 104910080-c5629880-59c3-11eb-8baf-cb4dfd506542

Can you explain more on details I didn't get what's wrong and correct o_0

Please elaborate more.

Panderner commented 3 years ago

As I mentioned in #13975 enabling BlockTransferAllowCreateFB for this game might cause save icons that draw black screen.

ghost commented 3 years ago

As I mentioned in #13975 enabling BlockTransferAllowCreateFB for this game might cause save icons that draw black screen.

Well as you can see my savestate icon still correct maybe this is adreno gpu bug?

Panderner commented 3 years ago

Here's a gif using software rendering: ezgif com-gif-maker (3)

ghost commented 3 years ago

My save icon png still correct Screenshot_2021-10-11-12-23-29

ghost commented 3 years ago

Here's a gif using software rendering: ezgif com-gif-maker (3)

Please explain more on details I didn't get your problem with this :/

Panderner commented 3 years ago

My save icon png still correct Screenshot_2021-10-11-12-23-29

Look at in-game save screen: Screenshot (44)

ghost commented 3 years ago

My save icon png still correct Screenshot_2021-10-11-12-23-29

Look at in-game save screen: Screenshot (44)

I really cannot reproduce your issue using BlockTransferAllowCreateFB and ClearToRAM I already tested this with two of my phones both with Mali gpu.

ghost commented 3 years ago

Danball Senki and Danball Senki Boost affected this issue: Screenshot_2020-10-12-20-29-19-57_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-13-17-50-25-28_2f85358b2198d26f8aca533d68bee793

ClearToRAM fix this issue :)

unknownbrackets commented 3 years ago

The problem with clear to RAM is that it's making the fade better, but it's still a fade from black (the cleared RAM) instead of a cross fade. That's what the gif is showing.

Block transfers are typically used for creating new save icons when creating a new save. Save icons created while block transfer was disabled or forced to the GPU will still of course display, it only affects newly created save icons. That said, as long as you see a screenshot of your current scene when saving, that should be fine.

-[Unknown]

Panderner commented 3 years ago

Danball Senki and Danball Senki Boost affected this issue: Screenshot_2020-10-12-20-29-19-57_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-13-17-50-25-28_2f85358b2198d26f8aca533d68bee793

ClearToRAM fix this issue :)

No @Gamemulatorer this make characters disappear when I open up the menu screen as I mentioned in #13338 Screenshot_2021-10-14-09-27-36-846_org ppsspp ppsspp

ghost commented 3 years ago

Danball Senki and Danball Senki Boost affected this issue: Screenshot_2020-10-12-20-29-19-57_2f85358b2198d26f8aca533d68bee793 Screenshot_2020-10-13-17-50-25-28_2f85358b2198d26f8aca533d68bee793

ClearToRAM fix this issue :)

No @Gamemulatorer this make characters disappear when I open up the menu screen as I mentioned in #13338 Screenshot_2021-10-14-09-27-36-846_org ppsspp ppsspp

Adreno gpu bug I think 🤔

Panderner commented 3 years ago

This how it looks like on real hardware: 91383764-e3d6c480-e867-11ea-8bdf-8922968a0d2b

ArhumMK commented 2 years ago

Sorry if this has been answered before but this thread is too complicated for me to figure out the solution:

Has the Persona 2 enemy encounter effect visual bug been fixed? or the tweaks needed to fix it discovered? Plus where is this "ClearToRAM" flag accessed?

jimkage commented 2 years ago

So, has the bug being worked out yet.for Persona ???

ghost commented 2 years ago

Split/Second minimizing issue. https://github.com/hrydgard/ppsspp/issues/15785#issuecomment-1208745963

71knight commented 2 years ago

Split/Second minimizing issue. #15785 (comment)

Hexyz Force also has graphical glitches when minimizing the screen. The game over screen has half a wavy image on it. The whole screen is supposed to be wavy and it does become that when you minimize the screen and then make it full screen again. This is for the Android build of ppsspp.

ghost commented 1 year ago

If I load save state twice or more in Metal Gear Acid 2 can causes glitch in vulkan only opengl doesn't reproduce this. Screenshot_20221213_023202_2f85358b2198d26f8aca533d68bee793

bassforte123 commented 1 year ago

This issue is still around for Persona 2. Software Rendering appears to resolve it though you lose out on the better rendering options. The other choice is to disable ClearToRAM (currently known "Skip GPU Readbacks") which will give you a white screen when entering random battles which is less distracting than the load state screen though it's not the correct cross fade transition so it's only a half solution. Possibly will be resolved with #16900