ipatix/agbplay

Incorrect Panning in Sonic Advance 2

Closed this issue · 5 comments

As far as I can tell, Sonic Advance 2 uses a completely standard m4a implementation, but I could be wrong about that. Anyway, you can hear the issue if you load up the game and play song 28 (True Area 53). There are two squares that are supposed to be panned to the left and right (pan 34 and 94), but they are both played completely center-panned. Additionally, AGBPlay shows them as being +30 and -30, even though it does not play them as such.

Well panning of squares only has 3 valid states: left, center and right (hardware limitation of GBA). agbplay currently does the rounding at +-32. As long as you're sure it's not how it's played in the game, I'll check original the assembly code.

I'm not sure how I didn't realize that, I must have thought the GBA added more panning states or something. But I am certain that's not how it's played in game; I literally fired up my DS Lite and played the game to be sure.

Also, unless I'm misunderstanding, why would it be rounded to +/- 32 if it's supposed to be completely left/right?

Thank you for looking into this.

Well, the rounding is done "at" and not "to". Which basically means if it's above/below +-32 it will be left/right and center otherwise.

Anyway, if I get the time i'll check it out.

If I understand correctly, this issue should be fixed now.

Yes, sorry, I should have closed this once it got merged.