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

Nana Subete wa Daimaou no Omichibiki hangup when starting a match #6802

Closed
daniel229 opened this issue Aug 28, 2014 · 20 comments
Closed

Nana Subete wa Daimaou no Omichibiki hangup when starting a match #6802

daniel229 opened this issue Aug 28, 2014 · 20 comments

Comments

@daniel229
Copy link
Collaborator

01

seems to never work before.
info log infinitely throw out these

user_main    W[KERNEL]: acf56f986e98e7c9\Core/HLE/sceKernel.h:460 Kernel: Bad object handle -1 (ffffffff)
user_main    E[KERNEL]: HLE\sceKernelMbx.cpp:510 sceKernelPollMbx(-1, 09fff66c): invalid mbx id

when it hang debug log infinitely throw out these

snd_thread_m D[ME]: HLE\sceAtrac.cpp:718 80630024=sceAtracDecodeData(4, 08aef340, 09fbda68[00000000], 09fbda64[00000001], 09fbda60[0])

debug log (rename jpg to rar)
ppsspplog

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

JPCSP fix in-game hang in
http://code.google.com/p/jpcsp/source/detail?r=3467
Not sure PPSSPP need same change

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

Seem same problem in sceatrac in #3552

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

I have fixed it.
5
fixed #3552 too.

@daniel229 Does this change break other games ?
sum2012@e7ae993

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

@daniel229 Sorry,no need test,this is wrong

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

PPSSPP sceatrac log
https://drive.google.com/file/d/0B3OaSdeV0L8kMGZtZ0RKSTdEc1E/edit?usp=sharing
Real PSP log:
https://gist.github.com/sum2012/a9093cacac79843de945

In Real PSP , do not return 80630024 (ATRAC_ERROR_ALL_DATA_DECODED)
edit:I find this one from real PSP log but PPSSPP do not have it
16:17:21.041003 snd_thread_main - <- sceAtracSetLoopNum 0x1, 0xFFFFFFFF = 0x80630021
Edit2:Just no logging in PPSSPP

@unknownbrackets
Copy link
Collaborator

Well, all those funcs really need tests. In the short run it'll break stuff but in the long run more things will work.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

I test from JPCSP emulator.I find that PPSSPP this check is too fast.
JPCSP also hang with this check first.

    if (atrac->currentSample >= atrac->endSample && atrac->loopNum == 0) {
        *SamplesNum = 0;
        *finish = 1;
        *remains = 0;
        ret = ATRAC_ERROR_ALL_DATA_DECODED;

@sum2012
Copy link
Collaborator

sum2012 commented Aug 31, 2014

I have another idea,at least make sense to me.
edit:studenly compiler error :/

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@unknownbrackets sorry,ask you a question ,why comment this have compile error ?
sum2012@0612f95
2

@unknownbrackets
Copy link
Collaborator

You're doing this:

/*
if (x) {
   y();
} else {
*/
   z();
}

That won't work. You need to also comment the trailing brace, or leave it uncommented. Either of these will work:

/*
if (x) {
   y();
} else*/ {
   z();
}
/*
if (x) {
   y();
} else {
*/
   z();
/* } */

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@unknownbrackets Thanks ,this is a bit complex to me.

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@unknownbrackets Does this change make sense ?
sum2012@c6850a4
Modify log:
https://gist.github.com/sum2012/f2acddc7c1c3f34fb856

@unknownbrackets
Copy link
Collaborator

Hmm. I think the effect of that is that it will overwrite everything but ret. Theoretically the only difference should be atrac->getRemainFrames(). I'm assuming this improves it? Without tests I don't know, but it's possible it's correct.

You can try the original code and change *remains = 0; to *remains = atrac->getRemainFrames();.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@unknownbrackets your change same with offical version
Hang due to call ATRAC_ERROR_ALL_DATA_DECODED
log:
https://drive.google.com/file/d/0B3OaSdeV0L8kRGd4MVhueXc4SnM/edit?usp=sharing

@unknownbrackets
Copy link
Collaborator

Well, I know that the first decode is supposed to return a smaller amount of data. If this game only works when it to take exactly X frames or something, that will be a problem.

So, your previous change made it work? It wasn't returning ATRAC_ERROR_ALL_DATA_DECODED?

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@unknownbrackets my previous change work,It only call ATRAC_ERROR_ALL_DATA_DECODED(80630024) once
edit: I mean second change (Move "passed the end" 's test to later)

@sum2012
Copy link
Collaborator

sum2012 commented Sep 1, 2014

@daniel229 Does this change break any games (sound problem or hang) ? Thanks
sum2012@c6850a4

@daniel229
Copy link
Collaborator Author

quick test 30 games seems no problem
.
01

@sum2012
Copy link
Collaborator

sum2012 commented Sep 2, 2014

Thanks @daniel229

@unknownbrackets
Copy link
Collaborator

Fixed by #6935, yay.

-[Unknown]

This issue was closed.
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.

3 participants