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

Stuck issue with Mega Man Maverick Hunter X #3318

Closed
hdd60311 opened this issue Aug 22, 2013 · 72 comments · Fixed by #8803
Closed

Stuck issue with Mega Man Maverick Hunter X #3318

hdd60311 opened this issue Aug 22, 2013 · 72 comments · Fixed by #8803

Comments

@hdd60311
Copy link

Reported form http://forums.ppsspp.org/showthread.php?tid=384&pid=41935#pid41935
when run this game it freezes at ACCESS page, press start button can continue it.

1

@hdd60311
Copy link
Author

Could anyone take a look at this?

@unknownbrackets
Copy link
Collaborator

Don't have the game, a log at least might help.

-[Unknown]

@hdd60311
Copy link
Author

@unknownbrackets
Copy link
Collaborator

So just to clarify, the issue here is that it doesn't pass that screen without you pressing a key, right?

Did this work previously, and stopped working, or it never worked?

-[Unknown]

@hdd60311
Copy link
Author

Tested repeatedly and seems this issue is fixed in latest build.

@hdd60311
Copy link
Author

hdd60311 commented Nov 7, 2013

Alright this issue is still there in latest build.
log : http://www.mediafire.com/download/w8bxbk9qto5nm7s/Mega_Man(2).log

@hdd60311 hdd60311 reopened this Nov 7, 2013
@unknownbrackets
Copy link
Collaborator

If this worked at one point and was broken again, can you find which build it last worked in and the first build it stopped working in?

-[Unknown]

@scraggles80
Copy link

the closest i could get is it worked in ppsspp-v0.8-91 and stopped in ppsspp-v0.8.1

@unknownbrackets
Copy link
Collaborator

Hmm, maybe it was video related (sorry forgot to post that) - could be fixed with recent video improvements. Any change here?

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Jan 15, 2014

I picked up this game recently, and no, it's still "hanging" on accessing until the user presses start, when first booting the game.

59:22:046              I[ME]: HLE\sceMpeg.cpp:365 sceMpegInit()
59:22:046              I[ME]: HLE\sceMpeg.cpp:465 095200a0=sceMpegCreate(0bfbc960, 09520070, 65536, 0bfbc964, 512, 0, 0)
59:22:047              W[ME]: HLE\scePsmf.cpp:645 scePsmfQueryStreamOffset(09530090, 08a327d4)
59:22:047              I[ME]: HLE\sceMpeg.cpp:302 Stream offset: 2048, Stream size: 0xB7800
59:22:047              I[ME]: HLE\sceMpeg.cpp:303 First timestamp: 90000, Last timestamp: 540450
59:22:047              I[ME]: HLE\scePsmf.cpp:496 scePsmfSetPsmf(08a327a4, 09530090)
59:22:047              I[ME]: HLE\scePsmf.cpp:226 PSMF MPEG data found: id=e0, privid=00, epmoff=000000a2, epmnum=00000004, width=480, height=272
59:22:047              I[ME]: HLE\scePsmf.cpp:235 PSMF private audio found: id=bd, privid=00, channels=2, freq=2
59:22:047              I[ME]: HLE\scePsmf.cpp:563 scePsmfSpecifyStreamWithStreamTypeNumber(08a327a4, 00000000, 00000000)
59:22:047              I[ME]: HLE\sceMpeg.cpp:583 sceMpegRegistStream(0bfbc960, 0, 0)
59:22:047              I[ME]: HLE\sceMpeg.cpp:583 sceMpegRegistStream(0bfbc960, 1, 0)
59:22:065              I[KERNEL]: HLE\sceKernelThread.cpp:2129 316=sceKernelCreateThread(name=soundThread, entry=08912720, prio=3d, stacksize=2048)
59:22:065              I[KERNEL]: HLE\sceKernelThread.cpp:2180 sceKernelStartThread(thread=316, argSize=4, argPtr=08a3279c)
59:22:067              I[ME]: HLE\sceMpeg.cpp:302 Stream offset: 2048, Stream size: 0x10C800
59:22:067              I[ME]: HLE\sceMpeg.cpp:303 First timestamp: 90000, Last timestamp: 900810
59:22:082              I[ME]: HW\MediaEngine.cpp:84 FF: deprecated pixel format used, make sure you did set range correctly
59:22:082              I[ME]: HW\MediaEngine.cpp:84 FF: No accelerated colorspace conversion found from yuv420p to rgba.

@unknownbrackets
Copy link
Collaborator

Does it play the video through and then stop, or does it never even play the video?

If you mark "sceMpeg.cpp" with the following after the includes:

#undef DEBUG_LOG
#define DEBUG_LOG NOTICE_LOG

And also scePsmf.cpp the same for good measure, is it continuing to call sceMpeg/scePsmf syscalls while hung, or has it stopped?

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Jan 15, 2014

It's supposed to play a 2 or 3 second video and then show the Capcom logo, but it never displays. It hangs on Accessing, and then when the user hits start, it immediately skips to the Capcom logo as if it never happened.

While it's hanging, it doesn't continue to call other mpeg/psmf functions, it seems.

https://gist.github.com/thedax/4bfa95062d65ac16883c/raw/818c6764f599d2865567aef9af38d0719b12cc9c/gistfile1.txt

Here's a video that happens to depict the little video it's supposed to show, it's within the first 2-3 seconds: http://www.youtube.com/watch?v=Ld6L5feOZ_8

@dbz400
Copy link
Contributor

dbz400 commented Jan 15, 2014

It is working now and video playback ok (You have to press SPACE bar then the Capcom logo will come out .It is funny)

screen00329
screen00330

screen00328
screen00331

@dbz400
Copy link
Contributor

dbz400 commented Jan 15, 2014

Tested it on JPCSP as well .Also need to press SPACE then will show up CAPCOM logo and in-game .

@thedax
Copy link
Collaborator

thedax commented Jan 15, 2014

Yeah, the other videos work fine, but the video with blue binary numbers before the Capcom logo doesn't play, so the issue isn't resolved.

@dbz400
Copy link
Contributor

dbz400 commented Jan 16, 2014

I think it is this one "blue binary numbers"

untitled

@thedax
Copy link
Collaborator

thedax commented Jan 16, 2014

Correct.

@dbz400
Copy link
Contributor

dbz400 commented Jan 17, 2014

However i still wonder why we need to press SPACE in order to pass on .Not too sure how this do on real PSP ...

@thedax
Copy link
Collaborator

thedax commented Jan 17, 2014

Because one of the MPEG functions always returns 1200 something packets remaining, so the game thinks the movie hasn't ended. On the real PSP, the video plays and then the Capcom logo displays. The video can be skipped with start, which is why the game even works on PPSSPP.

@dbz400
Copy link
Contributor

dbz400 commented Jan 17, 2014

But i did try to press start button , it didn't work .Only keyboard SPACE button let it pass on .

@thedax
Copy link
Collaborator

thedax commented Jan 17, 2014

..Space is the emulated PSP's start button by default.

@dbz400
Copy link
Contributor

dbz400 commented Jan 17, 2014

Oops I see as I keep pressing start button on my xbox 360 device but didnt work

@hrydgard
Copy link
Owner

Hm, should work the same, check your control mappings.

@dbz400
Copy link
Contributor

dbz400 commented Jan 17, 2014

I did try this start button on XBOX 360 device , it works okay for other games but not this one .Only SPACE works

@hrydgard
Copy link
Owner

Huh, that doesn't make much sense..

@dbz400
Copy link
Contributor

dbz400 commented Jan 17, 2014

I think it is this own game specific issue probably.

@sum2012
Copy link
Collaborator

sum2012 commented Mar 29, 2015

JPCSPTrace log:
https://gist.github.com/sum2012/e5f332933cf121d2f4af/raw/gistfile1.txt

@unknownbrackets
Real psp return sceMpegRingbufferAvailableSize to 0 in some case !!

@unknownbrackets
Copy link
Collaborator

Do note that because the call can flood logs, we don't log duplicate sceMpegRingbufferAvailableSize return values.

I had a lead at one point on what this might be - I can't remember if it was from a log or something, but I think sceMpegRingbufferPut rejects invalid packets, and we don't. Not sure if that would actually fix this.

Anyway, you can see in the log that it returns an error sometimes:
sceMpegRingbufferPut 0x9FB7464, 0x20, 0x2 = 0x806101FE

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 29, 2015

Thanks @unknownbrackets
I will install back VS2013 to test this

@unknownbrackets
Copy link
Collaborator

FYI, you can install both at the same time. I have 2008, 2010, 2012, and 2013 I think... haven't really used 2008 for a while, should probably uninstall it...

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Mar 29, 2015

@unknownbrackets This commit work but make other games have problem
sum2012@7662f3e
Log: https://drive.google.com/file/d/0B3OaSdeV0L8kZnFzbUpPMWtuYTA/view?usp=sharing

@unknownbrackets
Copy link
Collaborator

Hmm, interesting. Well, there are probably other rules to how exactly it returns the error. I think the best way to understand it will be using a PSP and sending different data at it to see when it responds with the error code.

-[Unknown]

@daniel229
Copy link
Collaborator

The versions around 0.9.1-716-g86caa70 may working sometime.
It randomly happens thses
1.stuck on access screen.
2.skip all videos.
3.all videos work.
not perfect,it plays the opening video twice
http://youtu.be/Yg8J20ql9D4

01

@sum2012
Copy link
Collaborator

sum2012 commented Apr 15, 2015

@unknownbrackets I give log to jpcsp.
it fixed in jpcsp/jpcsp@f2a701b
and jpcsp/jpcsp@8d10998

@unknownbrackets
Copy link
Collaborator

With some testing, I've determined that this behavior varies by mpeg version.

The behavior here changed in version 1.05. Versions 1.01 - 1.04 all exhibit this behavior, but I've only tested 1.05 and 1.10 for the latter. After 1.05, it seems the mpeg library was always part of firmware. But it doesn't seem the sdkver affects this; I think all versions on firmware don't do this validation.

Based on my tests so far, sending even one invalid packet at the start is enough to get the error code back. But it can also happen with valid packets - it's all about alignment.

If I have a buffer of 512 packets, and it's empty, I can add up to 1024 packets (yes, really), no error. It will wrap around and fill the buffer twice. No errors. I haven't checked decoding, so it's either the offset into the ring or # of packets, but if that offset + the number I add exceeds 2 * capacity, it generates this error pretty consistently (regardless of size.)

Edit: Hmm, there's more interaction here with the # of packets returned. Maybe it's actually when it hits a boundary in some way...

Note that, it still calls the callback, and still reads in the packets. I can read in 2048 packets, and it'll ask for all of them. It's only a problem if the callback actually (with multiple iterations, of course) returns >= 2 * capacity - offset.

Anyway, I'm not sure if this latter behavior is important here, although it's the more interesting one. What seems to happen in this log is that there's space, and it rejects the packet. I can reproduce this one reliably by adding a single garbage data packet.

As such, I believe jpcsp's behavior is incorrect. FYI @gid15.

-[Unknown]

@sergiobenrocha2
Copy link
Contributor

It completely hangs now with 1.2.1

@sum2012
Copy link
Collaborator

sum2012 commented Feb 19, 2016

@sergiobenrocha2 Do you mean start button cannot skip ?

@l12436
Copy link

l12436 commented Mar 12, 2016

according to my test, start button can not skip..., complete stock right there.

@sum2012
Copy link
Collaborator

sum2012 commented Mar 12, 2016

Press "space bar" for keyboard for pc

@l12436
Copy link

l12436 commented Mar 12, 2016

it will immediately stock when it show access. press space bar is not work. event esc is not working.

@sum2012
Copy link
Collaborator

sum2012 commented Mar 12, 2016

What is your os ? windows , linux

@l12436
Copy link

l12436 commented Mar 12, 2016

linux
ubuntu 14.04.4
kernel 4.2

@sum2012
Copy link
Collaborator

sum2012 commented Mar 12, 2016

So it don't work for linux.
We need to wait @unknownbrackets fix it.

@l12436
Copy link

l12436 commented Mar 12, 2016

OK, thanks

@sonikokaruto
Copy link

Exact same thing is happening on the libreto version for the raspberry pi

@klyoungblood
Copy link
Contributor

The Pi thread on the forums mentioned that SDL only polls inputs on video updates, which means SDL-based version including Linux and Pi can never register the button press to skip the broken video.

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Jun 5, 2016
When we've got garbage data, this has to stay incorrect.  Without this,
Megaman X gets confused when playing its video (because it enqueues
garbage packets.)

See hrydgard#3318.
unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Jun 5, 2016
When we've got garbage data, this has to stay incorrect.  Without this,
Megaman X gets confused when playing its video (because it enqueues
garbage packets.)

See hrydgard#3318.
@sum2012
Copy link
Collaborator

sum2012 commented Jun 5, 2016

@Voltkraken42
Copy link

Voltkraken42 commented Jun 24, 2016

I have a similar issue on Openemu (core version 0.9.9.1) on Mac. It tells me about the autosave function and then goes to accessing, but it's just a static picture. How could you help me with this? (I'm not that good with changing code, and Terminal doesn't work on my mac.) About the space/start thing, start is mapped to return on my Mac.

@unknownbrackets
Copy link
Collaborator

There's no workaround for SDL, afaik. This has been fixed in a new version, so v0.9.9.1 will forever not work. It will be in something like v1.3 (which hasn't been released yet.) If you want it now, you need to use a git build (check the downloads page.)

-[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

Successfully merging a pull request may close this issue.

16 participants