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.37k stars 2.19k forks source link

Games that still hang or crash trying to play a video #3338

Closed hrydgard closed 8 years ago

hrydgard commented 11 years ago

Our video playback is now working pretty well but there are apparently a few edge cases left. Here are the ones I know of that likely have this problem, let's collect them here.

PSMF:

MPEG:

Uncategorized:

thedax commented 11 years ago

Does this include games that "hang" after finishing a video? By this I mean you usually have to press start, select, or some other button to get around them not finishing automatically.

hrydgard commented 11 years ago

That's also a video issue indeed, although of course not as critical.

bonquacks commented 11 years ago

Sorry to butt in, but isn't this sorta a duplicate of https://github.com/hrydgard/ppsspp/issues/2172 ?

At least I think it is, I was just searching around.

vsub commented 11 years ago

ppsspp also freeze on Dead Head Fred when he tries to load the first video(making the game unplayable) the problem is somewhere between 0.8.1 and 0.8.1-8

It's ok on 0.8.1

thedax commented 11 years ago

To name a few:

Here's a screen of Pangya to show what I mean: Screenshot 01

Fixed games on this list:

ghost commented 11 years ago

Heroes VS (NPJH50660) doesn't play the intro movie aswell, the only way to advance is to skip it by pressing start, the log continuously spam these lines: 10:41:217 W[HLE]: HLE\sceUtility.cpp:94 UtilityGetStatus() Faked dialog : wrong dialog type 10:41:217 E[HLE]: HLE\sceUtility.cpp:419 UNIMPL -2146369531=sceUtilityGamedataInstallGetStatus() 10:41:219 W[HLE]: HLE\sceUtility.cpp:94 UtilityGetStatus() Faked dialog : wrong dialog type 10:41:219 E[HLE]: HLE\sceUtility.cpp:419 UNIMPL -2146369531=sceUtilityGamedataInstallGetStatus()

which I find odd, from what I can read it does complain about the install data function, what have in conjunction with the opening is beyond me. Aside this, does the issue related to God eater burst fit this page aswell? As far I know the game crashes after the ending credits before asking to save the game on chapters 6 and 10, it tries to play something which can't be skipped, leading to a CTD.

iWaambo14 commented 11 years ago

Metal Gear Solid Peace Walker continues to load forever & never load game after intro video. Unplayable

thedax commented 11 years ago

On Android, perhaps. Works fine on Windows.

dbz400 commented 11 years ago

Midnight Club 3 missing video at the very beginning .

internetakias commented 11 years ago

P2 Innocent Sin hangs only a few seconds into the OP on the latest android build now.

arg274 commented 11 years ago

I remember that in an old build (FFMPEG wasn't implemented then) MotorStorm could reach upto 'loading'.and right then PPSSPP freezed.(not a crash,a freeze)

sfageas commented 11 years ago

The Warriors hangs at Rockstar Games logo warriors

vsub commented 11 years ago

Some more: Naruto Shippuden Ultimate Ninja Heroes 3 - crashing before loading the video Key of Heaven - it was working(kinda)before but now if don't hold X when you start the game until the title,screen,the game will freeze when the first video start(which is actually black screen...it was visible before but the speed was really low)...the other videos a re black screen too but it doesn't freeze on all of them.

thedax commented 11 years ago

Stack trace of Naruto Heroes 3:

>   PPSSPPWindows64.exe!MediaEngine::openContext() Line 237 C++
    PPSSPPWindows64.exe!MediaEngine::addStreamData(unsigned char * buffer, int addSize) Line 296    C++
    PPSSPPWindows64.exe!PostPutAction::run(MipsCall & call) Line 917    C++
    PPSSPPWindows64.exe!ActionAfterMipsCall::run(MipsCall & call) Line 2883 C++
    PPSSPPWindows64.exe!__KernelReturnFromMipsCall() Line 3235  C++
    PPSSPPWindows64.exe!CallSyscall(Memory::Opcode op) Line 490 C++

It seems to be getting the wrong video stream id or something. It has an access violation trying to get the codec pointer.

unknownbrackets commented 11 years ago

Try:

if (m_videoStream == -1) {

->

if (m_videoStream == -1 || m_videoStream >= (int)m_pFormatCtx->nb_streams) {

-[Unknown]

thedax commented 11 years ago

That fixes it, but now it hangs on the second movie it tries to play, e.g. the second developer logo. http://www.mediafire.com/download/8vxw6m2eb289hv7/ninja_3.7z

unknownbrackets commented 11 years ago

It keeps calling sceMpegGetAtracAu(), I think it thinks the audio is behind...

-[Unknown]

unknownbrackets commented 11 years ago

Potentially also Zero no Kiseki according to the forum.

-[Unknown]

unknownbrackets commented 11 years ago

Heavens Will (ULJM05186) Ace Combat: Joint Assault (if I understand right)

-[Unknown]

unknownbrackets commented 11 years ago

Also World Neverland: #2642.

-[Unknown]

papel commented 11 years ago

Zero no Kiseki worked in the past (https://github.com/hrydgard/ppsspp/issues/698).

papel commented 11 years ago

I have a small problem with Lunar: The Silver Star. Before the beginning of any video, the game may or may not freeze in black screen and the video does not start. I see nothing different in the log. If I reset the game or load a state and try to start the video again, the problem always happens. If I close the emulator, open it again, load a state and try to start the video, the problem may or may not happen again. The easiest way to test it is with the opening video, after Xseed logo.

unknownbrackets commented 11 years ago

Hmm, which region? Does pressing start skip it, or it just hangs?

-[Unknown]

papel commented 11 years ago

USA version. Yes, pressing start skips it and the game continues normally and other videos may work again.

brujo5 commented 11 years ago

same problem in obscure the aftermath.

dbz400 commented 11 years ago

Just for record .Starting video in GTA series have been missing.

solarmystic commented 11 years ago

@raven02

The issue for the missing GTA videos (including the responsible commit) is documented here:-

https://github.com/hrydgard/ppsspp/issues/2771#issuecomment-20922654

papel commented 11 years ago

Valkyrie Profile: Lenneth http://forums.ppsspp.org/showthread.php?tid=944&pid=45599#pid45599 and the following message.

sasha6282 commented 11 years ago

TMNT, Motorstorm: Arctic Edge work after video on v0.9.1-808-ga537aa9

unknownbrackets commented 11 years ago

Ore no Dungeon appears to have this issue as well.

-[Unknown]

solarmystic commented 10 years ago

I reckon FFIV (https://github.com/hrydgard/ppsspp/issues/4550) can be added to the list as the game freezes when attempting to play a video after a specific sequence of events, as detailed in the original issue report. This prevents the player from advancing any further in the game on any buld compiled after the maxim at3+ merge.

unknownbrackets commented 10 years ago

In Valkyrie Profile, it seems to start playing a second video too early (the one with the wings.) I've figured out and fixed why the first video is just black (it's doing a block transfer to upload it to a framebuffer), although needs more testing, but the second video seems weird.

I've dumped all the bytes send to put ringbuffer, and it's a totally valid video, ffplay loves it lots. Then I dump the bytes sent to ffmpeg and they're pretty different. It doesn't like that file at all. Hmm.

-[Unknown]

unknownbrackets commented 10 years ago

Hmm, I've managed to get the video to play, although it's overwriting some of the initial frames... game continues now. But in a way that will almost definitely break other games, ugh (forcing it to enqueue quite a few more packets before starting the video.)

Will have to figure out how much the PSP requires to be enqueued before playing...

-[Unknown]

unknownbrackets commented 10 years ago

I've updated the first post with all the games noted and crossed out the ones I understand to be fixed. Are there any others working now in the latest git build (maybe the recent changes helped others)?

-[Unknown]

brujo5 commented 10 years ago

@unknownbrackets

tried in oscure the aftermath but no sense.still hang .

thx

unknownbrackets commented 10 years ago

Several games have been fixed recently and @raven02 found something that likely was happening in other games.

My expectation is that all of the games listed in the first post are still broken. Repeating any that are broken won't teach me anything new. But, if any of them are no longer broken, that'd be great to know, because it would help to narrow down the issues and focus on the ones that are still broken.

So reports that any of the listed games are working would be great.

-[Unknown]

dbz400 commented 10 years ago

Btw , MotorStorm is not fixed yet . There should a running CG in background

-PPSSPP screen00216

-Real PSP 1

mr-chya commented 10 years ago

Kingdom of Paradise (aka US version of Key of Heaven) videos are now working at least as of v0.9.6-185 although there is an odd stuttering during the videos that makes them look and sound like they are running at half speed even though speed shows it's running at 100% and FPS is running at 30/30.

dbz400 commented 10 years ago

Heroes Phantasia should be okay to playback the CG now in latest build .Please cross-line it.

screen00112

dbz400 commented 10 years ago

Ore no Dungeon somehow can press 'start' to skip the CG and in-game however it we watch the CG it will stop in between at this point .(it is a CLIMAX enterainment logo)

screen00219

dbz400 commented 10 years ago

@hrydgard , please link #5003 to Dead Head Fred

unknownbrackets commented 10 years ago

Ore no Dungeon: does it use psmf or mpeg to play the video? That sounds similar to the FF2 issue (which is psmf, it seems that scePsmfPlayerStop reschedules multiple times or something.)

-[Unknown]

hrydgard commented 10 years ago

Maybe we should split this issue up by psmf vs mpeg?

dbz400 commented 10 years ago

@unknownbrackets , yep , it uses PSMF

48:40:461 user_main I[ME]: HLE\scePsmf.cpp:496 scePsmfSetPsmf(08935500, 092b67b0) 48:40:461 user_main I[ME]: HLE\scePsmf.cpp:226 PSMF MPEG data found: id=e0, privid=00, epmoff=000000a2, epmnum=00000005, width=480, height=272 48:40:461 user_main I[ME]: HLE\scePsmf.cpp:235 PSMF private audio found: id=bd, privid=00, channels=2, freq=2

dbz400 commented 10 years ago

Just tested Zero no Kiseki in latest build .It show the FAICOM logo then stop with lots of invalid addresses

00:40:443 user_main I[ME]: HLE\sceMpeg.cpp:703 sceMpegAvcDecode(09501b00, 09501b04, 512, 0bfff4c8, 0bfff4c4) 00:40:477 user_main I[ME]: HLE\sceMpeg.cpp:781 sceMpegAvcDecodeDetail(09501b00, 0bfff4d0) 00:40:477 user_main I[ME]: HLE\sceMpeg.cpp:1053 PSP_ERROR_MPEG_NO_DATA=sceMpegGetAvcAu(09501b00, 00000001, 09501b04, 0bfff4c0) 00:41:611 user_main I[KERNEL]: HLE\sceKernelThread.cpp:2395 sceKernelTerminateDeleteThread(334) 00:41:611 user_main E[ME]: HLE\sceMpeg.cpp:726 sceMpegAvcDecodeStop(09501b00, 00000200, 0bfff504, 0bfff500) 00:41:611 user_main I[ME]: HLE\sceMpeg.cpp:629 sceMpegFreeAvcEsBuf(09501b00, 1) 00:41:611 user_main I[ME]: HLE\sceMpeg.cpp:462 sceMpegDelete(09501b00) 00:41:612 user_main I[ME]: HLE\sceMpeg.cpp:1397 sceMpegRingbufferDestruct(09501b84) 00:41:612 user_main I[ME]: HLE\sceMpeg.cpp:1111 sceMpegFinish(...) 00:41:649 user_main W[MM]: MemmapFunctions.cpp:96 ReadFromHardware: Invalid address 13e83e64 PC 08a31c90 LR 089f420c 00:41:649 user_main W[MM]: MemmapFunctions.cpp:96 ReadFromHardware: Invalid address 13e83e68 PC 08a31c94 LR 089f420c 00:41:649 user_main W[MM]: MemmapFunctions.cpp:96 ReadFromHardware: Invalid address 13e83e6c PC 08a31c98 LR 089f420c 00:41:649 user_main W[MM]: MemmapFunctions.cpp:96 ReadFromHardware: Invalid address 13e83e60 PC 08a31c9c LR 089f420c

dbz400 commented 10 years ago

For Ace Combat: Joint Assault , it should be working now and in-game.Just tested it on latest build .

screen00220

dbz400 commented 10 years ago

Just tested Street Supremacy , it stop with same message as Obscure Aftermath

11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:960 84=sceMpegRingbufferAvailableSize(08a0dd48) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:1003 sceMpegRingbufferPut(08a0dd48, 32, 84) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:993 packetAdded: 32 packetsRead: 4768 packetsTotal: 4800 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:960 52=sceMpegRingbufferAvailableSize(08a0dd48) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:1003 sceMpegRingbufferPut(08a0dd48, 32, 52) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:993 packetAdded: 32 packetsRead: 4800 packetsTotal: 4800 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:960 20=sceMpegRingbufferAvailableSize(08a0dd48) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:1003 sceMpegRingbufferPut(08a0dd48, 20, 20) 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:993 packetAdded: 20 packetsRead: 4820 packetsTotal: 4800 11:40:200 readThread I[ME]: HLE\sceMpeg.cpp:960 0=sceMpegRingbufferAvailableSize(08a0dd48)

dbz400 commented 10 years ago

Just tested The Warrior , it stuck at the 'Rockstar' Logo .Looks like it is pts issue .

It uses sceMpegAtracDecode()

avcAu.pts = ctx->mediaengine->getAudioTimeStamp() + ctx->mpegFirstTimestamp;

If i change ctx->mediaengine->getAudioTimeStamp() to ctx->mediaengine->getVideoTimeStamp() . it pass CG okay

Since ctx->mediaengine->getAudioTimeStamp() and getVideoTimeStamp() basically return the m_videopts except here

 s64 MediaEngine::getVideoTimeStamp() {
       return m_videopts;
 }

 s64 MediaEngine::getAudioTimeStamp() {
       if (m_demux)
              return std::max(m_audiopts - 4180, (s64)0);
       return m_videopts;
 }
dbz400 commented 10 years ago

This also fixes Dead Head Fred. All the CG can be played completely .

unknownbrackets commented 10 years ago

I don't really know what the 4180 is about. Does removing that help?

-[Unknown]