PCSX2 / pcsx2

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

[BUG]: Never7 (SLPS-25256)(SLPM-65689) - Hangs during FMVs #4886

Open MKCAMK opened 3 years ago

MKCAMK commented 3 years ago

Describe the Bug

When playing any of the game's FMVs, at some point it will hang, frozen on a single frame, audio stuck in a loop.

Reproduction Steps

Boot the game. If asked, press Cross to continue without loading. The SDR Project intro video will hang.

Expected Behavior

All the FMVs should play out fully and correctly.

PCSX2 Revision

v1.7.0-dev-1909-g296911bef9

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

Intel Core i7-7700 @ 3.6Ghz

GPU

Nvidia Geforce GTX 1060 6GB

GS Settings

Graphics settings have no effect on this issue.

Emulation Settings

Lowering EE Cyclerate helps; the lower the cycle rate, the more FMVs will play until the end.

For example, on "-1" the intro videos of SLPS-25256 will work, but not the credits, they require at last "-2". The new intro added in SLPM-65689 only works on "-3".

From what I tested, when EE Cyclerate is set to "-3", all the FMVs work.

This, however, progressively introduces audio distortions. From light stuttering on "-1" to heavy stretching, looping and skipping on"-3".

So right now there is a choice between skipping FMVs completely with Skip MPEG, or watch them with horrible audio.

GS Window Screenshots

No response

Logs & Dumps

Blockdump Never7.SLPS-25256.Intro.video.hang.zip

ghost commented 3 years ago

This case seems remarkably similar to David Beckham soccer which needs the vif fifo to work. I sugest waiting until such a feature will be in the works.

MrCK1 commented 1 year ago

I retested on v1.7.4526 with the blockdump. In my testing, no changes to EE cyclerate or manual gamefixes had any sort of effect. Maybe the blockdump is missing too much data but otherwise i'd say this is unchanged.

Mrlinkwii commented 1 year ago

still an issue as of v1.7.5158 , as @MrCK1 mention EE cyclerate or nothing effects it , used the blockdump provided

MKCAMK commented 8 months ago

I retested on v1.7.5608 – the issue remains as it were.

Since @MrCK1 and @Mrlinkwii have reported being unable to reproduce the described behaviour with the blockdump I had provided, I have now replaced it with a new, slightly bigger blockdump.

I will add that in the new GUI the EE Cycle Rate is expressed in percentages, so instead of "-1", "-2", "-3", the options that affect the bug are called "75% (Underclock)", "60% (Underclock)", "50% (Underclock)" respectively.

ghost commented 3 months ago

Setting NTSC frame rate to 30 fixed it for me. Maybe PCSX2 should be limiting fps differently during fmv playback?

MKCAMK commented 3 months ago

Setting NTSC frame rate to 30 fixed it for me

~I cannot confirm that.~

~I just tested with v2.1.83, and the setting that changes the framerate does nothing for this issue.~

~I think what may have happened for @Farran666, is that they encountered a random occasion when the game passes the point where it would normally hang, which does happen rarely.~

~The only consistent method to work around the issue remains EE Cycle Rate manipulation, which works just like before (and like before, distorts audio).~

ghost commented 3 months ago

Setting NTSC frame rate to 30 fixed it for me

I cannot confirm that.

I just tested with v2.1.83, and the setting that changes the framerate does nothing for this issue.

I think what may have happened for @Farran666, is that they encountered a random occasion when the game passes the point where it would normally hang, which does happen rarely.

The only consistent method to work around the issue remains EE Cycle Rate manipulation, which works just like before (and like before, distorts audio).

Not really, it worked for me 100% of the time. I've even reset the game numerous times, and that was the result every time. Try changing this setting through the game's properties. I changed this and used it on SLPS-25256: image

MKCAMK commented 3 months ago

D'oh! @Farran666 is completely right – it does have an effect. I have previously tested the wrong setting. 😳

I will test this extensively, and report back my detailed findings soon.

ghost commented 3 months ago

@MKCAMK I've tried fidgeting with counters.cpp to try and figure out the solution but I suppose it wasn't my forte. Maybe you'll have a better chance at success?

ghost commented 3 months ago

Update: changing info->hBlank = (u32)(hBlank / 10000); into info->hBlank = (u32)(hBlank / 5000); Fixed the issue completely.

MKCAMK commented 3 months ago

Regarding this:

Setting NTSC frame rate to 30 fixed it for me. Maybe PCSX2 should be limiting fps differently during fmv playback?

It works similar to the EE Cycle Rate workaround. The lower you set the frame rate, the more it works. 30 Hz is actually not low enough to remove it completely – an ending FMV still hangs with that setting, but works if set to 25 Hz.

Unfortunately, while messing with that setting is more forgiving for the audio quality during the FMVs themselves, it actually impacts the sound effects and voice lines during the regular gameplay more severely than EE Cycle Rate.

MKCAMK commented 3 months ago

And now, regarding this:

Update: changing info->hBlank = (u32)(hBlank / 10000); into info->hBlank = (u32)(hBlank / 5000); Fixed the issue completely.

I fully confirm.

If built with

info->hBlank = (u32)(hBlank / 10000);

in "Counters.cpp" changed to

info->hBlank = (u32)(hBlank / 5000);

both SLPS-25256 and SLPM-65689 run flawlessly. I have tested all FMVs in the game – none had the hang occur. The games appear to be "perfect".

I am not smart enough to understand the implications, though. Does it mean that info->hBlank = (u32)(hBlank / 5000); is more accurate to the real PS2? Or is this just a coincidence that this helps with this issue specifically? How should @Farran666's discovery be put to use in fixing this game on official releases of PCSX2?

F0bes commented 3 months ago

It's simply a coincidence. Some games have very strict timing requirements. By pure luck increasing the hsync rate by double "fixes" this game. We don't include one off hacks to fix single games. It's better overall to prioritize proper timing than adding yet another option that bodges it up for some of the problematic cases.

MKCAMK commented 3 months ago

We don't include one off hacks to fix single games.

Is that not what "Game Fixes" tab under "Properties..." is for? Or maybe I can make it into a patch?

sigarettenstank commented 3 months ago

@MrCK1 The emulator absolutely does use one off hacks to fix single games, it just isn't visible in the newer UI and you can't opt out of the hacks anymore. If you look at the old version there was a big list of per game hacks that said "this hack to fix this game, this hack to fix this game" etc...

MKCAMK commented 3 months ago

Or maybe I can make it into a patch?

Ah, actually, it is not possible for this to be a patch, no? Since it would have to modify PCSX2's own code, and its layout in the memory is different build to build.

F0bes commented 3 months ago

@MrCK1 The emulator absolutely does use one off hacks to fix single games, it just isn't visible in the newer UI and you can't opt out of the hacks anymore. If you look at the old version there was a big list of per game hacks that said "this hack to fix this game, this hack to fix this game" etc...

Of course there are exceptions, I can think of tri-ace games that require specific floating point behaviour. Or the Goemon TLB hack. The difference is those were properly investigated and hacks were made targeting those specific issues. I don't know what to tell you if you don't see the difference between changing specific rounding of FP adds (tri-ace) and doubling the hblank interval. (hint: one is trying to be "accurate", the other is just changing stuff)

Or maybe I can make it into a patch?

Ah, actually, it is not possible for this to be a patch, no? Since it would have to modify PCSX2's own code, and its layout in the memory is different build to build.

You wont be able to patch doubling the hblank interval. Those counters are "external", which as you said is PCSX2-specific code. If you can adjust whatever interrupt handler the game has for hblanks you might be able to change enough to "fix" it. If you're going through all that work though, it might just be better to find where it hangs. It could be our IPU timing. The MPEG decoding cycles (BDEC in particular?) hasn't been hardware tested. Every time I try to write a test for it I burn out and swear off touching MPEG2 again :sweat_smile: