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

Sol Trigger : MIPSInt BREAK! #2417

Closed
dbz400 opened this issue Jun 23, 2013 · 21 comments · Fixed by #2466
Closed

Sol Trigger : MIPSInt BREAK! #2417

dbz400 opened this issue Jun 23, 2013 · 21 comments · Fixed by #2466

Comments

@dbz400
Copy link
Contributor

dbz400 commented Jun 23, 2013

Just for record . Break with _sceAtracGetContextAddress() . It is a known issue previously .May be oioitff has some idea since he already implemented _sceAtracGetContextAddress() recently .

1

@unknownbrackets
Copy link
Collaborator

I recently found I have a game hitting a problem with the same func, possibly related - Mad Blocker Alpha.

Still need to write tests for this func...

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Jun 23, 2013

Indeed , not many games use this function _sceAtracGetContextAddress() .

@oioitff
Copy link
Contributor

oioitff commented Jun 24, 2013

I guess those games need more detail infos for atracContext or sasVoice. I'm not familiar to write PSP tests, but I had written some psuedo codes in #2313 to dump detail infos for atracContext and sasVoice. Hopes it may help something.

@kension
Copy link

kension commented Jun 25, 2013

There's a "new" bug in the 0.76-1422 build (that merged #2313) during a certain enemy encounter (that caused freezing some time during the fight). This bug is still present in 0.8-54. This bug seems to be not present in build 0.76-1414.

soltest1

@solarmystic
Copy link
Contributor

@kension

Confirmed, getting that no free ID bug in Sol Trigger on the latest git revision (0.8-54)

EDIT:- It seems to happen even more if you skip the cutscenes manually. If you dont skip them, the game will function as intended.

capture

EDIT2:- Moving this comment to an issue page since it's a different one and unrelated to the MIPS Break! issue

@unknownbrackets
Copy link
Collaborator

I don't think this is unrelated. They're both related to how atrac IDs are being managed by the game.

-[Unknown]

@solarmystic
Copy link
Contributor

@unknownbrackets

Fair enough, thought it was worth a go for the added exposure.

@unknownbrackets
Copy link
Collaborator

@oioitff sorry, haven't done much with this yet, but initial results seem positive. It's not printing much yet but here's some of the output:

[x] Init
[r] Load avcodec: 00000000
[r] Load sascore: 00000000
[r] Load atrac3plus: 00000000
[x] __sceSasInit: 00000000
[r] Loaded sample.at3 data.
[r] Got atracID: 00000000
[x] Valid AtracID? 00000000
[x] Context: 09d3dbc0
[x] decodePos=84936193, endSample=0, loopStart=0
[x] loopEnd=1619584, samplesPerChan=102400, numFrame=1
[x] state=0
[x] __sceSasSetVoiceATRAC3: 00000000
[x] Valid AtracID? 00000000
[x] __sceSasSetKeyOn: 00000000
[x] __sceSasGetEndFlag: ffffffff
[r] __sceSasGetEndFlag (after __sasCores): ffffffff
[x] Valid AtracID? 00000000
[x] __sceSasUnsetATRAC3: 00000000
[x] Valid AtracID? 00000000
[x] sceAtracReleaseAtracID: 00000000

It's possible the sample I'm using isn't valid...

Also, my example makes PPSSPP crash in __AtracUpdateOutputMode(). pCodecCtx is NULL. I must be doing something wrong...

-[Unknown]

@oioitff
Copy link
Contributor

oioitff commented Jun 25, 2013

Hmm, I just find out that it require state = 0x10 when atrac3 voice is finished. Maybe I could give out a solution later if everything goes fine :)

@unknownbrackets
Copy link
Collaborator

I tried calling the lowlevel func:

    SceAtracLowLevelParams params;
    memset(&params, 0, sizeof(params));
    params.channels = 2;
    params.outputChannels = 2;
    params.bufSize = 0x2000;
    checkpoint("sceAtracLowLevelInitDecoder: %08x", sceAtracLowLevelInitDecoder(atracID, &params));

But it just failed:

[x] sceAtracLowLevelInitDecoder: 80630001

Anyway, cool.

-[Unknown]

@oioitff
Copy link
Contributor

oioitff commented Jun 25, 2013

Thanks.
By the way, the params.bufSize should be the atracbytesPerFrame,such as 0xC0, 0x180, 0x230 and so on...

@unknownbrackets
Copy link
Collaborator

Oh, I think I got the struct wrong, oops...

-[Unknown]

@solarmystic
Copy link
Contributor

#2466 fixed it. Thanks @oioitff

Only one small "issue" remains that does not affect the game's playability, if you're a cutscene skipping fiend in this game, characters voices in ingame cutscenes will still get muted if you skip them often enough.

They do not return until you reset the game in your next playthrough.

Do not skip the cutscenes if you wish to get full functional character voices for now.

Could be related to Danganronpa's character audio problem if you skip the dialogue boxes too fast. #1686 (comment)

That's the only one left.

@unknownbrackets
Copy link
Collaborator

Hmm, sounds like it's still running out of atrac IDs, but at least it's running. Reopening.

-[Unknown]

@CPkmn
Copy link
Contributor

CPkmn commented Jun 26, 2013

@solarmystic Danganronpa voices work fine when I skip dialog boxes (both in the demo and full version).

#2466 seems to fix God Eater Burst's sceKernelPrintf's after _sceAtracGetContextAddress().

ge_contextfix

(Don't mind the "The system cannot find the path specified." - I used my own modified sceAtrac and I added support to dump and change atrac audio; it's just reporting that it can't find a replacement audio file since I'm not using any for that audio).

@unknownbrackets
Copy link
Collaborator

@oioitff okay, now that I didn't make a stupid mistake (I had used SceAtracIdInfo), it went a lot better:

[x] Init
[r] Load avcodec: 00000000
[r] Load sascore: 00000000
[r] Load atrac3plus: 00000000
[x] __sceSasInit: 00000000
[r] Loaded sample.at3 data.
[r] Got atracID: 00000002
[x] Valid AtracID? 00000000
[x] Context: 09d3ddc0
[x] decodePos=1093, endSample=1691647, loopStart=0
[x] loopEnd=0, samplesPerChan=1093, numFrame=0
[x] state=4
[x] __sceSasSetVoiceATRAC3: 00000000
[x] Valid AtracID? 00000000
[x] __sceSasSetKeyOn: 00000000
[x] __sceSasGetEndFlag: ffffffff
[r] __sceSasConcatenateATRAC3 (curOff=444): 80420042

It doesn't like __sceSasConcatenateATRAC3() though... hmm.

-[Unknown]

@oioitff
Copy link
Contributor

oioitff commented Jun 26, 2013

@unknownbrackets Hmm, what does error 80420042 mean? By the way, "__sceSasGetEndFlag: ffffffff" means there is no voice playing?

@unknownbrackets
Copy link
Collaborator

No idea what that error code means yet. Could be related to yes - seems like the voice is not considered playing. I'm not sure what it's missing other than keyon...

-[Unknown]

@oioitff
Copy link
Contributor

oioitff commented Jun 26, 2013

Maybe it needs to call sceSasSetPitch after __sceSasSetVoiceATRAC3?

@unknownbrackets
Copy link
Collaborator

Does this still hit the break?

-[Unknown]

@dbz400
Copy link
Contributor Author

dbz400 commented Dec 7, 2013

No more break hit now .I'm close it now then.

@dbz400 dbz400 closed this as completed Dec 7, 2013
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.

6 participants