PCSX2 / pcsx2

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

[BUG]: Yu-Gi-Oh! The Duelists of the Roses - "Sound Glitch" #11576

Open rjoken opened 1 month ago

rjoken commented 1 month ago

Describe the Bug

I come to you with an issue which has plagued our speedrunning community for over a decade!

Sometimes, when entering or exiting a fight (presumably during music transitions?), the game will exhibit strange behaviour regarding sound. Sometimes, the music won't load. Sometimes, the sound effects don't play properly. Sometimes, there is a buzzing noise which can be very loud or high-pitched. When the game is in this state, it has been reported that the game can softlock during one of the cutscenes at the end of the game. The game also tends to load faster in this state.

Reproduction Steps

I have uploaded at the following YouTube URL a reproduction of this bug: https://youtu.be/TAF79wFX5mE

In the video: because the bug cannot be activated on demand (or it's not known how exactly it's triggered), I played the game with input recording turned on (from power on) until it triggered. In this case, the glitch triggered when I entered a fight and exhibited the behaviour where some sound effects were not audible, and you can hear a buzzing in the background.

Then, I load a state from the game running normally without the glitch to show what the expected behaviour should be. I have also attached here the input recording file, a save state from the game while exhibiting the bugged state, a save state from the game acting normally, and my memory card file since the input recording loads my save, all in a ZIP archive. Get it at the following URL because it's too big for GitHub: https://hippochan.nl/stuff/soundglitch.zip

Expected Behavior

No response

PCSX2 Revision

v2.0.2

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

AMD Ryzen 5 1400

GPU

nVidia RTX 3060

GS Settings

image image

Emulation Settings

image

GS Window Screenshots

No response

Logs & Dumps

No response

rjoken commented 1 month ago

I was asked in Discord to provide a verbose emulog.txt, which I have attached here. emulog.txt

ghost commented 1 month ago

Are you referring to the same bug where the title screen's emeralds aren't rendered? If so, I believe it's a gamebug unrelated to emulation.

rjoken commented 1 month ago

Are you referring to the same bug where the title screen's emeralds aren't rendered? If so, I believe it's a gamebug unrelated to emulation.

Hi Buzzardsoul, This issue may be related to this, as the same issues of no music occur when that happens, however 2 things;

  1. That issue appears to have been fixed in 1.7, at least by my testing. I sat there and restarted the game 1000 times (I'm not joking) to check if that bug still occurred. The "sound glitch" (as we dubbed it) does still occur at "random"* when entering or exiting a duel, however.
  2. The bug where the emeralds don't render and the music doesn't play has not, as far as I know (and I am the most active figurehead/moderator in the speedrunning community for this game) ever occurred on console, so I don't particularly believe that it's possible that it's an in-game bug not caused by emulation.

Of course both of these points are technically anecdotal, but I don't know anyone who would be able to answer more authoritatively than me, I fear.

*The fact that the issue occurs consistently when I play back my inputs leads me to believe that it's less random than I had previously hypothesized, but we still have no idea what causes it.

ghost commented 1 month ago

Are you referring to the same bug where the title screen's emeralds aren't rendered? If so, I believe it's a gamebug unrelated to emulation.

Hi Buzzardsoul, This issue may be related to this, as the same issues of no music occur when that happens, however 2 things;

  1. That issue appears to have been fixed in 1.7, at least by my testing. I sat there and restarted the game 1000 times (I'm not joking) to check if that bug still occurred. The "sound glitch" (as we dubbed it) does still occur at "random"* when entering or exiting a duel, however.
  2. The bug where the emeralds don't render and the music doesn't play has not, as far as I know (and I am the most active figurehead/moderator in the speedrunning community for this game) ever occurred on console, so I don't particularly believe that it's possible that it's an in-game bug not caused by emulation.

Of course both of these points are technically anecdotal, but I don't know anyone who would be able to answer more authoritatively than me, I fear.

*The fact that the issue occurs consistently when I play back my inputs leads me to believe that it's less random than I had previously hypothesized, but we still have no idea what causes it.

I will add that this glitch has a tendency to be preceded by either the load of a savestate, or the usage of turbo mode while the game loads. If I had to speculate, I'd say it's PCSX2's timing exacerbating a game bug, because I believe I might have had this issue on OPL. Either way, I will look into it when I could.

ghost commented 1 month ago

Can you try this patch? SLUS-20515

patch=1,EE,00400214,word,00000002

rjoken commented 1 month ago

Seems to still trigger when replaying my input recording.

ghost commented 1 month ago

After comparing your savestates, it seems the difference on the two is that one of them has a missing chunk of gamedata, while the other one has a correctly loaded gamedata. I've tried to narrow it down to a single instruction as much as possible, and ended up here: image

That's as deep as I can go, so I'll leave it to someone else to figure out.