hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.34k stars 2.18k forks source link

Castlevania X Chronicles - unavoidable audio-related softlock bug in Rondo of Blood #11091

Open eiendream-ar opened 6 years ago

eiendream-ar commented 6 years ago

Hi and hopefully I'm doing it right since it's my first time around here. I'm interested in this game because it has a rather interesting PC Engine emulator that overlays text directly onscreen, but the problem causes it only to run ever on real hardware in full.

Game in question: Castlevania X Chronicles [ULUS10277] - Specifically the Rondo of Blood direct emulation port that has a translation exclusive to it. It's normally an unlockable, but gamefaqs should have a 100% save file for the collection with that taken care of. This password for the original game X-X!V''Q unlocks a level select and most importantly the sound test, where this issue can be stress-tested much more efficiently.

A fix for this issue might be beneficial for other emulated PCE-CD compilations on PSP that also use the atrac3 codec for sound files in their BIN+CUE+WAV setup, some of it with unique content.

PPSSPP Version: Latest nightly.

What should happen? Normal sound playback and looping, no crashes.

What happens? Major sound bugs, some associated with crashes that prevent the game from being clearable. There are 3 areas where this problem manifests:

If you need a save state just before one of these cutscenes, please tell me which version of your liking to use and I'll happily oblige.

unknownbrackets commented 6 years ago

Anything in the logs when these things happen?

What graphics settings are you using? Does the video issue happen with software rendering (it will be slow)?

-[Unknown]

LunaMoo commented 6 years ago

Didn't tested everything from here, but I can't reproduce sound test problems in my game in any way.

This might be either platform specific(using win amd64 myself) or game version specific(mine's EU).

Could also be a bad copy(pretty sure there was at least one bad dump of this game used by pirates) or game breaking cheats(game swaps code when different game is selected so most cheats outside of few I made for eu version would be game breaking here;p).

eiendream-ar commented 6 years ago

It still happens with the software renderer, I checked. I tried with Vulkan and OpenGL. Each time from a fresh emulator reboot. It's not a problem with the dump either, considering the exact same version/file runs as intended on real hardware. No cheats are used.

Intel i7 CPU, AMD R7 GPU, Windows 10 x64. Tried it with similar results on laptops with: Intel i7 CPU, AMD Radeon 6000 series GPU, Windows 7 x64 (2017 nightly). Intel i7 CPU, GeForce M930 GPU, Windows 7 x64 (2017 nightly).

The PPSSPP debug console shows this after the game comes back from the sound test softlock: ATRAC3 play E[ME]: HLE\sceAtrac.cpp:570 avcodec_decode_audio4: Error decoding audio -1094995529 / bebbb1b7

The debug console doesn't display anything for the abrupt fadeout.

Most importantly, for the cutscene crash, the debug console doesn't show anything, but when I use "dump next frame to log" (which normally displays all kind of steps to drawing the next frame's graphics) it shows this single line instead of the usual wall of graphical calls: 35:30:868 ATRAC3 play N[G3D]: Vulkan\GPU_Vulkan.cpp:291 DUMPING THIS FRAME

I never tried with the EU version considering I don't own it, but I will try to get it somehow and try reproducing this bug with it.

Thanks a lot for the replies and interest.

eiendream-ar commented 6 years ago

Can confirm the exact same bug appears with ULES00841.

LunaMoo commented 6 years ago

If I leave song playing for too long it does break, but I couldn't trigger it by switching, I also didn't get any soft lock(and yeah I do have fast mem enabled), the music just stops playing, tried both main menu sound test as well as rondo of blood original sound test. I did used one non default setting - simulate UMD delays which does help in some poorly coded games and could be the reason why the game couldn't hang for me;p.

eiendream-ar commented 6 years ago

@LunaMoo Thanks a lot for your reply. I think it solved the biggest problem for me.

By changing "System > I/O Timing Method" to "Simulate UMD Delays", the music swaps and the cutscenes no longer softlock and proceed normally, which make the game at least finishable 100% even though the voice acting and the music backgrounds fading out suddenly is still an annoyance that I'd wish to see fixed one day.

relu419 commented 6 years ago

@LunaMoo Thanks a lot for your reply. I think it solved the biggest problem for me.

By changing "System > I/O Timing Method" to "Simulate UMD Delays", the music swaps and the cutscenes no longer softlock and proceed normally, which make the game at least finishable 100% even though the voice acting and the music backgrounds fading out suddenly is still an annoyance that I'd wish to see fixed one day.

A timing problem. On my US version, before the loop, the game cuts the music on Rondo of Blood. Can we skip that? I can remember the problem using the game on SD: the game runs before the loading and to OST will cut after the first loop cut.

ghost commented 5 years ago

Having the same issues as the rest of you but I can confirm that changing I/O Timing Method from Fast to Simulate UMD Delays fixes the cutscenes.

The audio issues still occur with sound and music stops playing though.

relu419 commented 5 years ago

Having the same issues as the rest of you but I can confirm that changing I/O Timing Method from Fast to Simulate UMD Delays fixes the cutscenes.

The audio issues still occur with sound and music stops playing though.

It's Atrac3+ problem. The loop and the cut need a right TG16 audio emulation. Only devs can solve this. Or back to an old version with some properly/better solution.

ghost commented 5 years ago

Thanks for answering!

Hopefully one day this issue will be solved, luckily I own the original PC Engine version that I can play with Mednafen in the mean time.

ghost commented 4 years ago

Related #5564 ?

HyenaPinetree commented 2 years ago

How is this still a problem 8 years later?? The PS4 version of these games is essentially the only functional way to play them outside of extremely expensive original hardware at this point.

I wish I had the know-how or time to figure this out on my own. Hopefully this can be resolved at some point.

hrydgard commented 2 years ago

Simple: sound bugs can be some of the hardest ones to fix, and nobody who has the game and abilities to debug has prioritized it yet over all the other issues. Emulation is hard, and there are some extra hard edge cases here and there that need serious work to fix. Complaining won't help.

opsodps commented 1 year ago

Music cutting out in the original Rondo of Blood still occurs on v1.15.4. Cutscene softlock also occurs with default settings, but changing I/O Timing Method from "Fast" to "Simulate UMD Delays" fixes it. As far as I know there's still no way to fix the first issue.

EspeonScottie commented 1 year ago

Music cutting out in the original Rondo of Blood still occurs on v1.15.4. Cutscene softlock also occurs with default settings, but changing I/O Timing Method from "Fast" to "Simulate UMD Delays" fixes it. As far as I know there's still no way to fix the first issue.

Same here on the newest v1.16.

sum2012 commented 12 months ago

v1.16.6-280-g6d063ce3e I test no problem for the sound

MikelAibi commented 11 months ago

v1.16.6-280-g6d063ce3e I test no problem for the sound

I just tested this specific build, and the issue still persists - music still gets cut off

sum2012 commented 11 months ago

@MikelAibi does it same as #5564 ?

MikelAibi commented 10 months ago

@MikelAibi does it same as #5564 ?

It's the same as described in this comment - the music just stops playing halfway through and abruptly stops playing