PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.83k stars 1.63k forks source link

[BUG]: Disney's UP TLB Miss #4760

Open seta-san opened 3 years ago

seta-san commented 3 years ago

Describe the Bug

TLB Miss on Disney's Up when entering a dark cave.

Reproduction Steps

3rd level.

Expected Behavior

emulator doesn't crash

PCSX2 Revision

dev-1754

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

i5-9600

GPU

gtx 960

GS Settings

softwar renderer

Emulation Settings

No response

GS Window Screenshots

tlb miss

Logs & Dumps

C:\Users\source\repos\PCSX2\pcsx2\pcsx2\FiFo.cpp(48) : assertion failed: Function: ReadFIFO_VIF1 Thread: EE Core Condition: vif1Regs.stat.FQC != 0 Message: FQC = 0 on VIF FIFO READ!

Stacktrace: [00] _hwRead128<5> \source\repos\PCSX2\pcsx2\pcsx2\HwRead.cpp:392 [01] _hwRead32<5,0> \source\repos\PCSX2\pcsx2\pcsx2\HwRead.cpp:76 [02] _hwWrite16<5> \source\repos\PCSX2\pcsx2\pcsx2\HwWrite.cpp:363 [03] m_IndirectDispatchers
[04] AppCoreThread::DoCpuExecute \source\repos\PCSX2\pcsx2\pcsx2\gui\AppCoreThread.cpp:677 [05] SysCoreThread::ExecuteTaskInThread \source\repos\PCSX2\pcsx2\pcsx2\System\SysCoreThread.cpp:300 [06] Threading::pxThread::_try_virtual_invoke \source\repos\PCSX2\pcsx2\common\ThreadTools.cpp:616 [07] Threading::pxThread::_internal_execute \source\repos\PCSX2\pcsx2\common\ThreadTools.cpp:671 [08] Threading::pxThread::internal_callback_helper \source\repos\PCSX2\pcsx2\common\ThreadTools.cpp:722 [09] Threading::pxThread::_internal_callback \source\repos\PCSX2\pcsx2\common\ThreadTools.cpp:711 [10] ptw32_threadStart \source\repos\PCSX2\pcsx2\3rdparty\pthreads4w\ptw32_threadStart.c:184 [11] o_iswdigit
[12] BaseThreadInitThunk
[13] RtlGetAppContainerNamedObjectPath
[14] RtlGetAppContainerNamedObjectPath

refractionpcsx2 commented 3 years ago

Can you try the EE Timing Hack please?

prafullpcsx2 commented 3 years ago

I have the game. A savestate right before the crash will help figure this out.

seta-san commented 3 years ago

SLUS-21864 (F78D6593).00.zip the way i've been triggering it is that i just into the cave with the old man. i get attacked by some bats. i just back out onto the little island. switch to the boy and use the mirror light and start shining it into the cave and it eventually crashes.

still crashes with ee timing hack.

seta-san commented 3 years ago

to be fair it seems like it does it anytime the boy the uses the mirror long enough.

ghost commented 3 years ago

The problem with TLB misses is they can be caused by virtually anything.

I sugest you to first try clamping/rounding, then disable instant VU1 or play with the cyclerate to see if that makes a difference.

Lastly, try the EE interpreter with the EE cache even if, well, I doubt it's this.

Edit, also try fast cdvd, very important that one.

seta-san commented 3 years ago

yes. bring the mirror out and shine it for a long while. i've disabled the frame limiting.

prafullpcsx2 commented 3 years ago

Ok, I can reproduce the tlb miss now.

prafullpcsx2 commented 3 years ago

@seta-san f78d6593.zip

Can you test this patch, see if it fixes the crash and doesn't cause any side effects?

If that doesn't work try this-

uptake2.zip

ghost commented 3 years ago

What are you trying to patch in the game code prafull?

Edit, the game was made by Asobo, so far they tend to use the exact same engine in their games which doesn't have any problems and require positive VU rounding.

I would like to have a blockdump of the game please.

seta-san commented 3 years ago

first one locks up and does this and does this in an infinite loop but doesn't actually tlb miss "[IOP] looping mode padman: DMA Busy ID = 3c850008 ret = 0 SB_STAT = f0000102

second one locks up and tlb misses infinitely but never hits the assert crash "

ghost commented 3 years ago

seta-san, please do a blockdump of your game as well as a savestate before the problem happens.

refractionpcsx2 commented 3 years ago

Okay so I had a quick look at this.

I can stop it crashing by removing the forced "nearest" rounding on the FPU for DIV, then set my EE round mode to "Negative" then the crashes stop, but you do get a single frame which looks like a zebra skin (possibly some sort of depth download). So it's not perfect, but it seems to stop the crashing.

ghost commented 3 years ago

That makes sense regarding the engine, it's also worth mentioning any asobo game will require positive VU rounding to work properly.

refractionpcsx2 commented 3 years ago

Well, positive rounding does nothing, in this case. It still crashes.

seta-san commented 3 years ago

i set vu rounding to positive and ee round mode to negative and it still tlb misses

seta-san commented 3 years ago

and i've played up to this point in the game without issue without setting vu to positive

ghost commented 3 years ago

Usually asobo games will produce some very slight sps which can be insanelly hard to see with normal VU rounding.

As for the crashing, I don't have a dev build around but are you sure cop2 timings are right refraction? Because it's possible negative rounding could hackfix the glitch like it does on ffx

refractionpcsx2 commented 3 years ago

Nothing comes up in the log to say there's a problem with COP2 timings.

ghost commented 3 years ago

Ok then. Interesting still the game have issues like this, I hope it doesn't require softfloat.

LoStraniero91 commented 2 years ago

Just asking, have you unlocked the lantern before entering the cave? I'm unable to reproduce the bug in the PAL version, probably because I have the lantern...

EDIT: even without the lantern and shining the mirror left and right for a long time doesn't seem to trigger the bug for me.

refractionpcsx2 commented 1 year ago

Is this reproducable at all anymore? I tried at the beginning of the game where I got it to happen last time, and it's still not doing it.

if somebody can reproduce it, then I will need a savestate some time before it happens. Otherwise I'll go ahead and close this.

seta-san commented 1 year ago

I’ll check it when my son allows

seta-san commented 1 year ago

yes. it still crashes

refractionpcsx2 commented 1 year ago

okay can you provide a savestate just before please?

seta-san commented 1 year ago

s.zip Untitled

seta-san commented 1 year ago

it can help to unlock frames to speed it up

seta-san commented 1 year ago

strike that. i tried it again and got an assert error

refractionpcsx2 commented 1 year ago

What was the original savestate name? You renamed it.

seta-san commented 1 year ago

i just saved it to file

refractionpcsx2 commented 1 year ago

okay can you tell me the serial for your version of UP then, so I can try to reconstruct it

seta-san commented 1 year ago

slus-21864

refractionpcsx2 commented 1 year ago

Thanks

refractionpcsx2 commented 1 year ago

That savestate is not crashing for me :/ I'm moving my mirror around all over the place.

Am I missing something? :/

seta-san commented 1 year ago

no sometimes it triggers right away. sometimes it seems like it won't trigger at all

refractionpcsx2 commented 1 year ago

ah I got it yeah

refractionpcsx2 commented 1 year ago

Can you try it on my True Crime PR at all? I'm trying it myself but I can't get it to trigger on there, but not sure if I'm just being fortunate.

seta-san commented 1 year ago

funny you said that. i already did. it still crashes.

refractionpcsx2 commented 1 year ago

bummer, alright thanks.

ghost commented 5 months ago

I reproduced it on latest. Still an issue.