PCSX2 / pcsx2

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

[BUG - SPU2]: Sonic Heroes, no sound in FMVs with Dolby Pro Logic II. #4812

Closed ghost closed 3 years ago

ghost commented 3 years ago

Describe the Bug

In the game "Sonic Heroes", there is not any sound in any given FMVs. This is technically a "regression" but in fact, this have never worked properly anyway (the FMV behaviour was random and the cutsceen itself ran slowly).

The "regression" comes from the ADMA SPU2 adjustements introduced earlier this year.

Reproduction Steps

Load any FMV in the theatre.

Expected Behavior

The FMV should have a sound output.

PCSX2 Revision

v1.7.0-dev-1789-gb8eb18836f

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

I9 9900k

GPU

RTX 3070

GS Settings

No response

Emulation Settings

No response

GS Window Screenshots

The bug in action:

PCSX2:

https://user-images.githubusercontent.com/90222976/134397531-dcea574e-f6c5-4319-981d-376f6116a023.mp4

Logs & Dumps

Blockdump + savestate: https://drive.google.com/file/d/1Vm8_Uqpfme_WD1dJkogevRePpg40OEZ2/view?usp=sharing

refractionpcsx2 commented 3 years ago

Need to check the data but ADMA looks to be doing what it should (and it is on the menu), but it does set PCM Bypass for ADMA 0.. You don't have Dolby mode selected in the game or anything do you?

ghost commented 3 years ago

I did have Dolby PL2 enabled, and it seems to cause issues yeah, selection stereo does fix the problem.

refractionpcsx2 commented 3 years ago

Okay well, Dolby is never going to get done, so, I'mma close this.

ghost commented 3 years ago

Actually I tested some dolby pro logic II titles and SPU2X does handle that, it has the abillity to decode it and mix it down to stereo. So I am not sure if that's the problem.

A clear exemple, primal and MGS3 FMVs

Edit, it's dolby digital 5.1 and dts which it doesn't handle.

ghost commented 3 years ago

https://github.com/PCSX2/pcsx2/blob/master/pcsx2/SPU2/DplIIdecoder.cpp

So yeah, this is not a dobly problem.

weirdbeardgame commented 3 years ago

So yeah. That's not actually implemented. Aside from that the ps2 has two Dolby codecs it supports. Pro logic 2 or fake surround which games like KH 2 support is just expanding stereo to 5.1 then there's the other codec which you'll notice won't make any sound that's actually 5.1 and is run through spdif. Pcsx2 has support for neither of them

ghost commented 3 years ago

I did know what the difference is between the 2, the problem here is that the game is using PLII for it's FMVs, and unlike what you said, PCSX2 does handle PLII, and you can verify that in a lot of games, heck, how would Jak X produce any sound without it?

refractionpcsx2 commented 3 years ago

I don't know why the sound works in some Dolby games, I guess it depends how they use it, but without a decoder, we can't use Dolby and I'm not really interested in problems surrounding it.

weirdbeardgame commented 3 years ago

In the case of PLII the game just falls back to stereo since PLII is just that. A fake surround

Screenshot_20210923-085536_Discord.jpg

Screenshot_20210923-085543_Discord.jpg

ghost commented 3 years ago

Ahh, that dolby part is for the 5.1 expansion then. Well, if that's the case then the games that makes use of it just probably fallback to default stereo then.

However what I don't get is that the games which let you select Dolby PLII manually (such as Black) still works fine... I mean, how can that be possible?

refractionpcsx2 commented 3 years ago

well, the ADMA's kinda set themselves up strangely, like Core 0 goes in to the Hi speed mode and Bypass mode that GTA VC uses to boot (presumably for fast data transfer) and Core 1's ADMA just runs. I had removed the double speed and the bypass so I could try to hear the output, both core's ADMA's were just dead air (as far as we could hear)

ghost commented 3 years ago

Actually I tested previous builds prior to ADMA and the behaviour does seem different, sometimes, the FMV slows down to a crawl and plays no sound, but, if I modify the delay cycle the game does play audio "even in Dolby PLII" which is crazy. Can we have some kind of fallback support which bypass the dolby signal somewhere?

PS: in stereo, all the ADMA stuff is completely skipped out, that can explain the bug.

Ziemas commented 3 years ago

Dolby Pro Logic II is backwards compatible with and playable as a normal stereo signal.

Dolby DTS is digital AC3 and only sent out through the S/PDIF on the PS2. (Bypass mode meaning you bypass the normal SPU to S/PDIF output and directly provide your own bitstream)

ghost commented 3 years ago

Ok, thanks for the explaination, so that explains why Dolby PLII work and is outputed as a stereo signal in PCSX2. But yeah, in the case of that game something else seems wrong, the game doesn't seem to rely on any ADMA stuff in it's stereo mode unlike PLII so the problem might comes from that, but it's you guys the experts here.

Squall-Leonhart commented 3 years ago

In the case of PLII the game just falls back to stereo since PLII is just that. A fake surround

PLII is not fake surround, this is blatant ignorance on the function of analog side channels.

refractionpcsx2 commented 3 years ago

In the case of PLII the game just falls back to stereo since PLII is just that. A fake surround

PLII is not fake surround, this is blatant ignorance on the function of analog side channels.

image

It's faked, check your facts before you start accusing people of ignorance.

Squall-Leonhart commented 3 years ago

Read the entire thing before snipping a bit of wikipedia.

it is a full 5.1 surround field using the wiring of a stereo source by taking advantage of unused spatial frequencies.

One of the prologic II capability's does involve Upmixing a pure stereo source (Matrix mixing), but mastered pro logic II has true directional audio(Discrete mixing)

https://www.minnetonkaaudio.com/info/PDFs/Mixing_Information_for_Dolby_Pro_Logic_II.pdf

refractionpcsx2 commented 3 years ago

No it isn't, it can use a stereo or 4 channel signal and convert it to 5.1

but whatever you want to swing your penis about to prove a point to make yourself feel good (i mean there was no other reason for you to go "ACKCHEWUALLY IT'S THIS" on this post) the SPU in the PS2 only works for Stereo signals, not quadraphonic or 5.1 channels, so whatever you think is irrelevant.