Serious implementation for SNES ADSR. (I had all this day for this job...)