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.11k stars 2.16k forks source link

Rewrite VN: compatibility issues and crashes #15904

Open forvate opened 2 years ago

forvate commented 2 years ago

Game or games this happens in

ULJM-06365 - Rewrite

What area of the game / PPSSPP

While in certain scenes and circumstances, the game will permanently softlock, all input is disabled except the fast forward and reverse text (L and R triggers). Followed example might be one of many, but it's the first one to encounter.

Screenshots: PPSSPPWindows64_1nfeaI5gbC

Savedata: (game progress only, there are 2 more saves for game data) ULJM06364DATA02.zip

What should happen

Game should not softlock.

Screenshot from PSP-3000: RemoteJoyLite_en_rgDsKJhjF9

Logs

ppsspplog1.zip

Platform

Windows

Mobile phone model or graphics card

NVIDIA GeForce GTX 1060 6GB

PPSSPP version affected

v1.13.1-533-g829baa7c3

Last working version

No response

Graphics backend (3D API)

Direct3D 11

Checklist

unknownbrackets commented 2 years ago

About 10 seconds into the log, there's a scePsmf error (but it just looks like the game calling it wrong.) It looks like savedata is loaded after that, so it's probably not related. Seems like savedata load is finished at 15:01:461.

In case this is some rendering readback issue, does it work any better if you use "software rendering" in settings? It may be a bit slow, but if this locks up the same way it means it's less likely to be related to graphics rendering.

-[Unknown]

forvate commented 2 years ago

In case this is some rendering readback issue, does it work any better if you use "software rendering" in settings? It may be a bit slow, but if this locks up the same way it means it's less likely to be related to graphics rendering.

It does still lock up with software rendering on. Here's logs of the same area of the game with software rendering on just in case: ppsspplog.zip

sum2012 commented 2 years ago

A small note:jpcsp emulator (version c6090df) don't have this bug

forvate commented 2 years ago

Here's another softlock I found, seems related because of its similar nature. When using the Go back to previous choice, the game allows you to go back to the previous point of the game to switch your decision, this is done with pushing the Analog to the left. On PPSSPP it results in a softlock. I used the same savedata for convince.

Logs: ppsspplog.zip

ezgif com-gif-maker(1) RemoteJoyLite_en_77o14PAjUk

sum2012 commented 2 years ago

Not sure is about sceUtilityScreenshot 1

forvate commented 2 years ago

I'm not sure what this function does in PPSSPP, but from it's name I'm just gonna mention that this port has a screenshot tool built in for taking screenshots of the scene/CGs.

sum2012 commented 2 years ago

It is "start" button of real psp...... edit:no new finding in the log

LunaMoo commented 2 years ago

Please try https://github.com/hrydgard/ppsspp/pull/16006, I didn't tested much other than the spot from the savedata posted where it fixed the problem.

Edit: To quickly test it, you don't need a new build, just add following lines:

# Rewrite
ULJM06364 = true
ULJM06365 = true

under [DrawSyncEatCycles] inside compat.ini

sum2012 commented 2 years ago

I confirm first case fixed. Second case I do not confirm (No save file)

LunaMoo commented 2 years ago

Reopening since it still locks when going back to previous choice, at least it's more playable with DrawSyncEatCycles hack, but it likely suffers from more of the "PPSSPP runs too fast" than just draw sync as with timing issues it might even be helping by luck.

As a potentially interesting note - overclocking PSP cpu clock will break the fixed softlock even with a hack, kind of another confirmation it's a timing issue, then again seeing that it's a japanese title should usually be enough to say it suffers from timing problems>.<.

forvate commented 2 years ago

Please try #16006, I didn't tested much other than the spot from the savedata posted where it fixed the problem.

Edit: To quickly test it, you don't need a new build, just add following lines:

# Rewrite
ULJM06364 = true
ULJM06365 = true

under [DrawSyncEatCycles] inside compat.ini

This does look like it fixed all of the softlocks during regular gameplay! The go-back feature still does cause a softlock, I'll start replaying the game fully just to ensure it's all working just in case.