-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Minimal change that gets Naruto Shippuden Ultimate Ninja 3 going again. But why? #11772
Conversation
The most important problem here is that sceMpegGetAtracAu should return ERROR_MPEG_NO_DATA when there's no audio stream at all. Even if That mostly only affects games that play video using shared code, and sometimes the video has no audio. See #8437, I think? Or maybe it was another game too... It also should keep returning it if you reach the end of the video. If it doesn't, some games may get stuck thinking the audio is still playing. What actually happens in Naruto? A) Does it call this on a video that has no audio at all, and break when it says it has no audio? Sounds like stuffing a bug under a rug. B) Does it call this on a video after the audio stream has ended, and get angry because the audio stream ended too early / with different timing than video? C) Does it call this on a video after doing something that should apparently reset/restart the video, but it doesn't clear the flag properly? D) Does it call this on a video which has audio, but somehow get no audio data (perhaps because the ring buffer is not full enough)? I think there might even be a test that shows this behavior (returning no data for a video with no audio) in pspautotests, btw. -[Unknown] |
Logs below. [deleted wrong thought]. Might be that the videos lack audio indeed. Without the hack, hang after the first video:
With the hack, it succeeds starting up a second video, directly afterwards:
|
Looks like the problem is that It registers two video and two audio streams. Video stream 1 doesn't even exist, so probably audio stream 1 doesn't exist either. But when registered, we set that as the current audio stream (possibly incorrect.) We then call This is possibly also an issue for -[Unknown] |
Right, that makes sense. So should we change sceMpegRegistStream to only set the current audio/video stream if one of that kind isn't already set? Or simply not set the current stream at all and let sceMpegAtracDecode figure out which one should be played? It seems most logical to me that sceMpegRegistStream shouldn't actually change the current stream at all, that doesn't sound like what it's for. |
Probably, but I think both -[Unknown] |
Closing this in favor of #11780. |
The game's been broken since early post-1.3 commits, and it keeps getting reported. There's already some discussion in #9591 about possible causes.
I've confirmed that this change gets the game going again but it's unclear why - it could be two bugs cancelling each other. It's strange that the game seems to want the error to only be reported once. Anyway, I'm not really sure how to best proceed here. Some experimentation might be in order as this is difficult to accurately test on hardware..