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]: Lord of the Rings the Return of the King Black screen. SLES-52019 PAL FR #7073

Closed titou64 closed 1 year ago

titou64 commented 2 years ago

Describe the Bug

Pcsx2-v1.7.2838 and all later versions break the game. Instead of showing the memory cards screen after the initial loading screen. I am welcomed with a black screen and can't progress further. However with pcsx2-v1.7.2837 the game works correctly.

Reproduction Steps

Launch the game with any pcsx2 version above pcsx2-v1.7.2837.

Expected Behavior

No response

PCSX2 Revision

pcsx2-v1.7.3307-windows-64bit-AVX2-Qt

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

i7 5960x

GPU

rtx 2080ti

GS Settings

All default settings.

Emulation Settings

All default settings.

GS Window Screenshots

No response

Logs & Dumps

No response

refractionpcsx2 commented 2 years ago

@Goatman13 the user mentioned #6270 on Discord :)

Goatman13 commented 2 years ago

Sorry for late answer. I tested this, and there is something else going on. While this was actually broken in https://github.com/PCSX2/pcsx2/pull/6270 ,fix from https://github.com/PCSX2/pcsx2/pull/6325 make it work again when applied directly to https://github.com/PCSX2/pcsx2/pull/6270 codebase. This means something between 6270 and 6325 make it broken too.

Currently on master game don't even reach code that search for mpeg start code. Just loops in mpeg2sliceIDEC while(1). Other info i gathered. Game tries to set IPUfrom QWC to 0x10000, that transfer is terminated by pcsx2 few moments later, then game try with QWC 0xFFC0, and that goes on, and finally with 0x40, which also seems to go ok, but in the end, there is 1 qwc left in INPUT fifo somehow. That why game does not proceed.

refractionpcsx2 commented 2 years ago

huh interesting! Well, I did do a bunch of IPU DMA changes... maybe the answer lies in there, I guess I have some debugging to do :D

Thanks for getting back to us :)

refractionpcsx2 commented 2 years ago

It is indeed a timing problem, it broke further with https://github.com/PCSX2/pcsx2/commit/3cb99bad79125b61b93cfa4762067839a74e1920

But I don't think that's necessarily wrong, it's just a bad sequence of timed events.. Gonna have to dig in to it :(

refractionpcsx2 commented 2 years ago

Started looking at it, haven't really finished but what I noticed so far.

it starts off the IPU and sets off the DMA's, both the working and non-working versions do the 0x10000 QWC thing, but the game expects that to fail, because if you kill the transfer or not, it starts the correct one.

When the game is doing an IDEC at the start after a couple of FDEC's, as soon as IPU0 runs out of QWC, IDEC still hasn't finished, but the game is using the IPU0 DMA finishing as a trigger for it ending, so it immediately tries to do an FDEC even though the IDEC is still going, so everything is all outta whack.

I don't see any resets or stopping/starting DMA's in the middle so I'm unsure why modifying timing helps the original :/

As I say, gonna investigate further, but had other stuff come up which I've been dealing with.

titou64 commented 1 year ago

HI, I tried the pcsx2-v1.7.3761-windows-64bit-AVX2-Qt.7z version today and the game seems to run correctly.

refractionpcsx2 commented 1 year ago

It's still broken here, and I wouldn't expect it to be fixed, nothing has been changed relating to IPU emulation.

refractionpcsx2 commented 1 year ago

You can, and we likely will.

Sonny35 commented 1 year ago

I have the same issue but the serial of my game is SLES-52020 and my PCSX2 version is Nightly SSE4 Qt 1.7.4240.

Maybe this will help: ZST file.zip

refractionpcsx2 commented 1 year ago

It's not a GS problem so a GS dump is no good. I have the game, I just haven't gotten around to fixing it yet.

But thanks for trying.