Skip to content
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

Afterburner Black Falcon - Freezes after Dev Logo/Copyright Screen #6794

Closed
4XPG opened this issue Aug 27, 2014 · 38 comments
Closed

Afterburner Black Falcon - Freezes after Dev Logo/Copyright Screen #6794

4XPG opened this issue Aug 27, 2014 · 38 comments

Comments

@4XPG
Copy link

4XPG commented Aug 27, 2014

I recall this game used to be working back on v0.9.1 (according to the forum entry, it doesn't work since 0.9.5-0.9.6 and still never been fixed since then), but it freezes after the dev logo FMV/copyright screen on the later version (I'm using v0.9.9-80 in this case).

The sound thread appears to be stuck at endless loop, here's the log:
https://gist.github.com/4XPG/1a529bc99d1959f6c4fc

@unknownbrackets
Copy link
Collaborator

Does it actually work in v0.9.1?
https://github.com/hrydgard/ppsspp/releases/tag/v0.9.1

Does it work in JPCSP or something else? Just want to make sure you have a good rip.

-[Unknown]

@daniel229
Copy link
Collaborator

The last working build is v0.9.6-453-gda97a67,It hanged up since #5044 ,

@4XPG
Copy link
Author

4XPG commented Aug 27, 2014

It worked on both old v0.9.1 (bad sounds, but the rest are fine) and JPCSP (100% working).

@sum2012
Copy link
Collaborator

sum2012 commented Aug 27, 2014

This is v0.9.9.1-144-g8edf255 scempeg log:
https://gist.github.com/sum2012/e5fb7cb7dc1e4a0a60fe
It freeze in 47:31:509 decodeThread D[ME]: HLE\sceMpeg.cpp:1607 80618001=sceMpegGetAtracAu(0bfff380, 00000004, 0bfff44c, 0bfc8e40)

@daniel229
Copy link
Collaborator

revert unknownbrackets@af411e6 the video won't hang,but frameskipping.
03

@unknownbrackets
Copy link
Collaborator

That implies that the pts is either not getting set correctly or getting stuck. When it's hung, what is m_videopts? And what are m_readSize and m_streamSize at that point?

-[Unknown]

@daniel229
Copy link
Collaborator

How to find these value?

@daniel229
Copy link
Collaborator

commemt out this in sceMpegGetAtracAu() the video won't hang also,and no frameskipping in intro video.

/*  if (ctx->atracRegistered && ctx->mediaengine->IsNoAudioData() && !ctx->endOfAudioReached) {
        WARN_LOG(ME, "Audio end reach. pts: %i dts: %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp());
        ctx->endOfAudioReached = true;
        result = ERROR_MPEG_NO_DATA;
    }*/

@unknownbrackets
Copy link
Collaborator

If you only comment out ctx->endOfAudioReached = true;, it doesn't work, right? What if you only comment out result = ERROR_MPEG_NO_DATA;?

-[Unknown]

@daniel229
Copy link
Collaborator

Only works with comment out result = ERROR_MPEG_NO_DATA;

@unknownbrackets
Copy link
Collaborator

What's strange is, it seems to be adding extra packets, one would think they might include audio.

Maybe it's something wrong with how it's starting up, like not doing the warm up (which I'm pretty sure mpeg is supposed to, but eventually I'll need to take the plunge on sceMpeg tests, unless someone else wants to write some and help...)

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jan 5, 2015

Can we have a work around ?

@sum2012
Copy link
Collaborator

sum2012 commented Oct 18, 2015

Update the log to v1.1.1-43-g6c31612
(I have switched to USA version to debug)
https://gist.github.com/sum2012/d062601b36159dde64d6

@sum2012
Copy link
Collaborator

sum2012 commented Oct 18, 2015

I change the log to
WARN_LOG(ME, "Audio end reach. pts: %i dts: %i m_videopts %i m_audiopts %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp(), ctx->mediaengine->m_videopts, ctx->mediaengine->m_audiopts);

output:
01:53:818 decodeThread W[ME]: HLE\sceMpeg.cpp:1609 Audio end reach. pts: 866654 dts: 780780 m_videopts 774774 m_audiopts 780834

@unknownbrackets
Copy link
Collaborator

So then getAudioTimeStamp() is ahead of the video indeed? Hmm. That implies to me that it's decoding audio frames faster than video...

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Oct 18, 2015

So just return 0 would solve the problem

@LunaMoo
Copy link
Collaborator

LunaMoo commented Oct 18, 2015

More like a hack than solution, since 0 just means no error when it clearly got one it was designed to detect. You can do that via CWCheat if you want to, just find the syscall in ppsspp disassembly and force v0 or whatever v0 is passed to after that syscall to 0 - this can be done by setting it's value to 0(li v0,0) or by moving value of zero register(move v0,zero).

BTW is that code related -

if (ctx->atracRegistered && (ctx->mediaengine->getVideoTimeStamp() > ctx->mediaengine->getAudioTimeStamp() + getMaxAheadTimestamp(mpegRingbuffer)))

It seems like it was stopping this from happening, disabled because it does't happen on psp?

@sum2012
Copy link
Collaborator

sum2012 commented Oct 18, 2015

In the real PSP,this game of video don't return ERROR_MPEG_NO_DATA
JPCSPTrace log:
https://gist.github.com/sum2012/43a7a73f9a0dac1175a0

@unknownbrackets
Copy link
Collaborator

Yes, but maybe something else is causing it to call that too frequently. Does it call it the same number of times?

The real firmware returns no data when there's no audio remaining. It doesn't even mean end; it means there's no audio data in the buffer, afaict. So the issue here can be any of:

  1. It's reading audio data out faster than video data, and shouldn't be.
  2. It's not filling the buffer as fast as it should be.
  3. There's some other bug somewhere (e.g. it's ignoring data that was fed to it.)

I'm pretty sure it should NOT return 0 when there's no audio data, and doing so will DEFINITELY break other games. I'm also pretty sure it should not delay to manually sync audio with video, since that is the game's job, and iirc, doing that again will ALSO break other games.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Oct 18, 2015

If I make change,at least the following:
if ((int)ctx->mediaengine->getLastTimeStamp() > ctx->mediaengine->m_audiopts)
result = ERROR_MPEG_NO_DATA;

Don't break Obscure the Aftermath,Pacman land 3 ,it still hit ERROR_MPEG_NO_DATA;

@sum2012
Copy link
Collaborator

sum2012 commented Oct 21, 2015

@unknownbrackets jpcsp fix this game by jpcsp/jpcsp@f4a49b8
//It seems that sceMpegGetAtracAu returns ERROR_MPEG_NO_DATA only when both
// the audio and the video have reached the end of the stream.
// No error is returned when only the audio has reached the end of the stream.

@unknownbrackets
Copy link
Collaborator

I'm really not sure that's correct, since that sounds like it contradicts firmware tests I did previously, although it's been a while. I'd like to see actual firmware tests confirming this.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Oct 21, 2015

(no wrong)
This game's firmware is 2.82

@slowfellow
Copy link

Can someone please adress this issue?, I very much like to play After Burner on the latest version.
Regards

@sum2012
Copy link
Collaborator

sum2012 commented Oct 29, 2015

@slowfellow what device are you using ? Windows 32 bit,Windows 64 bit,Android

@slowfellow
Copy link

I am using both Windows32 and Android 5.1.1 (Xperia Z5 compact)

@sum2012
Copy link
Collaborator

sum2012 commented Oct 30, 2015

The is test build
Windows 32 build
https://drive.google.com/file/d/0B3OaSdeV0L8kVTI1MG1GRUlaaWc/view?usp=sharing
Android build
https://drive.google.com/file/d/0B3OaSdeV0L8kaHlCbmRkWWctcW8/view?usp=sharing
If it break other game of video ,I would appreciate that you tell me.Thanks

@sum2012
Copy link
Collaborator

sum2012 commented Oct 31, 2015

oop ,my change break Obscure The Aftermath

@slowfellow
Copy link

Thanx, I will try them out, windows version now supports Afterburner. Thanx, will try android later.

@slowfellow
Copy link

Why not make it an optional switch if it breaks some games, but supports others?

@sum2012
Copy link
Collaborator

sum2012 commented Oct 31, 2015

Becuase I didn't test when I compiled

@slowfellow
Copy link

Well I have tested some 20 games so far everything works, maybe this Obscure, The Aftermath is a combination of things

@unknownbrackets
Copy link
Collaborator

If you un-revert e866d83, does this work? Just wondering, since it's related to the jpcsp change.

-[Unknown]

@daniel229
Copy link
Collaborator

No,it doesn't.

@daniel229
Copy link
Collaborator

Fixed in #8867

@unknownbrackets
Copy link
Collaborator

Oh, that makes sense. So it was likely related to how it was reading the header.

Thanks for testing.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Aug 8, 2016

Video flicking in beginning.
Old version (eg: v1.1.1-577-gefc1768) no problem.
I post here or open new issue ?

@unknownbrackets
Copy link
Collaborator

Hmm, probably a new issue is better since it started at a different time - better to avoid getting confused with the old issue.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants