Sunday, April 11, 2010

Update on the Async bug

Well, I've been really busy with life lately, but I recently had some time to get back to code. I've managed to make some progress on the Async bug and what seems to be getting skip are the Audio Interface Interrupts(AII). I can in a hacky way force this not to be skipped in Async mode or in Disabled. For Async, this means the Async bug never activates and this means we don't lose sound (I tested this in SM64 and SSB on the intro). For Disabled, this means games like Turok can boot completely without sound. Also when working with Turok, I discovered that the audio interrupt has to occur at the beginning of the frame rather than the end of it. I believe this is the proper for it to be done in order to reduce some of the popping as well. I be experimenting further with this tonight so that Sync, and Async are both using the same method. Upon a scene change (like when entering a level in SM64), the missing audio interrupt with the bug active is what causes it to freeze due to not updating the registers properly. It's creating a busy wait situation when it's not actually busy and getting stuck in a loop. I believe that all of this should yield multiple benefits in the form of better sound(with fewer delays in between sound processing cycles), faster speed (by only processing the AII we have to), and better compatibility (with more modes working with more titles and without the sound dropping).