A couple of things were done along with some optimizations to ensure no ASM filesize changes occurred.
First off, !EchoDelay is now used again, because it is not updated when the loader is called up.
This pull request closes #357.
Note that this can be upgraded. Currently the upgrade imposes a delay when a new song starts up and the buffer is being allocated for the first time, which is the same general behavior as 1.0.8. There are two paths possible:
Have the program wait for the echo to sync up before loading. This transfers the delay to just before the loader, and eliminates startup lag for the music. However, this adds waiting for the echo to the loading time. The EDL is already set to zero just before the loader, so we do have that helping us out. This would involve splitting the echo waiting into its own routine (restoring the WaitForDelay label in the process) and then inserting two calls: one where it's waiting now, and one just before jumping to the loader.
Use the hardware timer to keep track of time while loading new data. This is more complicated and slightly slows down loading, but the end result is that startup delays can be bypassed for the music. However, this may need a SNES-side modification so that it can properly track an acknowledgement signal ($2141/$F5 cleared in this case) rather than use NOPs because there is now an inconsistent delay between the end of loading and when the sound driver is ready to play music again.
A couple of things were done along with some optimizations to ensure no ASM filesize changes occurred. First off, !EchoDelay is now used again, because it is not updated when the loader is called up.
This pull request closes #357.
Note that this can be upgraded. Currently the upgrade imposes a delay when a new song starts up and the buffer is being allocated for the first time, which is the same general behavior as 1.0.8. There are two paths possible: