I don't recall all the changes and modifications. At some point we also modified the code to work with Bass Guitar and this required a longer sampling of the wave (due to the lower frequency).
In this code, the numbers 255 and 250 determine the sampling size (in fact the time that we sample the incoming audio), so these will have an impact into latency. DELAY1 and DELAY2 are nested decrementing counters during sampling of the signal. I don't remember why this was changed, maybe to correct some errors in detection for the low E string. If I recall correcty the orignal code was using around 12ms, which is a little short to cover the 82Hz of the low E.
PEAKS
CLRF PEAKH
MOVLW 255
MOVWF PEAKL
MOVLW 4
MOVWF DELAY1
CL2 MOVLW 250
MOVWF DELAY2
Regarding the other change, I remember at some point we played with the "amplitude detection flag" to avoid some undesired behaviours. But I don't recall exactly how the flag works.