Actually, my new mod does exaactly that: Individual control of each trigger firerate. And the codes here can do so also with little modification:
Add this to the variable definitions:
CODE
FREQL EQU 0x30
Add this to the firerate definaitions:
CODE
;**********Speed settings: change these to change speed (0x05-0xFF)
FIRERATE1 equ 0x2F
FIRERATE2 equ 0x16
FIRERATE3 equ 0x12
FIRERATE4 equ 0x0F
FIRERATE5 equ 0x2F
FIRERATE6 equ 0x16
FIRERATE7 equ 0x12
FIRERATE8 equ 0x0F
Change the left trigger interupt service routine to load FREQL instead of FREQR like so:
CODE
ActiveL
movlw 0x40
subwf STATER, w ;test if state 1
btfsc STATUS, Z
goto Continue02
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL
bcf STATUS, RP0 ;bank 0
goto EndInterupt
Continue02
btfss FLAGS, TRIGOUT
bcf GPIO, TRIGGERL
btfsc FLAGS, TRIGOUT
bsf GPIO, TRIGGERL
btfss FLAGS, PULSEONL ;is pulse active?
goto OffstateL
decfsz PULSEL, f ;if pulse is active, count down 10ms
goto EndInterupt
bcf FLAGS, PULSEONL ;10ms is over, clear flags and output
bsf STATUS, RP0 ;bank 1
bsf TRISIO, TRIGGERL;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQL, w
movwf PULSEL
goto EndInterupt
OffstateL
decfsz DWELLTIMEL, f ;count down dwell time to next pulse
goto EndInterupt
bsf FLAGS, PULSEONL ;if dwell is done turn on outputs
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERL;and reset pulse time
bcf STATUS, RP0 ;bank 0
movf FREQL, w ;from frequency value
movwf DWELLTIMEL
EndInterupt
And lastly add the code that loads the firerate values into FREQL right beside the places that load FREQR:
BurnmeUp2:
CODE
btfsc STATER, 7 ;state 1 or 2
goto Continue01
btfsc STATER, 6
goto State2
movlw FIRERATE1 ;state 1, off
movwf FREQR
bcf FLAGS, LEDON ;turn off LED
goto Start
State2
movlw FIRERATE1 ;state 2, 42ms cycle
movwf FREQR
movlw FIRERATE5 ;state 2 left
movwf FREQL
bsf FLAGS, LEDON ;turn on LED
goto Start
Continue01
btfsc STATER, 6
goto State4
movlw FIRERATE2 ;state 3, 30 ms cycle
movwf FREQR
movlw FIRERATE6 ;state 3 left
movwf FREQL
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop01
call Wait10ms
decfsz TEMP3, f
goto Loop01
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop02
call Wait10ms
decfsz TEMP3, f
goto Loop02
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop04
call Wait10ms
decfsz TEMP3, f
goto Loop04
bsf FLAGS, LEDON ;turn on LED
goto Start
State4
movlw FIRERATE3 ;state 4, 22ms cycle
movwf FREQR
movlw FIRERATE7 ;state 4 left
movwf FREQL
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop05
call Wait10ms
decfsz TEMP3, f
goto Loop05
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop06
call Wait10ms
decfsz TEMP3, f
goto Loop06
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop07
call Wait10ms
decfsz TEMP3, f
goto Loop07
bsf FLAGS, LEDON ;turn on LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop08
call Wait10ms
decfsz TEMP3, f
goto Loop08
bcf FLAGS, LEDON ;turn off LED 1/2 sec
movlw 0x0A
movwf TEMP3
Loop09
call Wait10ms
decfsz TEMP3, f
goto Loop09
bsf FLAGS, LEDON ;turn on LED
goto Start
or GameplayRF:
CODE
NextState
movlw 0x40
addwf STATE, f ;change firerate state
InitState ;begin test for
btfsc STATE, 7 ;state 1 or 2
goto State3
btfsc STATE, 6
goto State2
State1
movlw FIRERATE1 ;state 1
movwf FREQR
movlw FIRERATE5 ;state 1
movwf FREQL
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop01
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop01
bsf STATE, RIGHTACTIVE ;led on
bsf FLAGS, STATECHANGE ;notify a state change
goto ReleaseRight
State2
movlw FIRERATE2 ;state 2
movwf FREQR
movlw FIRERATE6 ;state 2
movwf FREQL
bcf STATE, RIGHTACTIVE ;blink twice, led off
movlw 0x0A
movwf TEMP3
Loop02
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop02
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop03
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop03
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop04
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop04
bsf STATE, RIGHTACTIVE ;led on
bsf FLAGS, STATECHANGE ;notify a state change
goto ReleaseRight
State3
btfsc STATE, 6
goto State4
movlw FIRERATE3 ;state 3
movwf FREQR
movlw FIRERATE7 ;state 3
movwf FREQL
bcf STATE, RIGHTACTIVE ;blink 3 times, led off
movlw 0x0A
movwf TEMP3
Loop05
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop05
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop06
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop06
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop07
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop07
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop08
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop08
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop09
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop09
bsf STATE, RIGHTACTIVE ;led on
bsf FLAGS, STATECHANGE ;notify a state change
goto ReleaseRight
State4
movlw FIRERATE4 ;state 4, 22ms cycle
movwf FREQR
movlw FIRERATE8 ;state 4
movwf FREQL
bcf STATE, RIGHTACTIVE ;blink 4 times, led off
movlw 0x0A
movwf TEMP3
Loop10
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop10
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop11
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop11
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop12
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop12
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop13
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop13
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop14
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop14
bsf STATE, RIGHTACTIVE ;led on
movlw 0x0A
movwf TEMP3
Loop15
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop15
bcf STATE, RIGHTACTIVE ;led off
movlw 0x0A
movwf TEMP3
Loop16
call Wait10ms ;100 ms
decfsz TEMP3, f
goto Loop16
bsf STATE, RIGHTACTIVE;led on
bsf FLAGS, STATECHANGE;notify a state change
ReleaseRight
btfss GPIO, BUTTONR ;wait for button release
goto ReleaseRight
call Wait10ms
btfss GPIO, BUTTONL ;wait for button release
goto ReleaseRight
btfsc FLAGS, STATECHANGE;test for button tap or state change
goto Continue01
movlw 0x01
xorwf STATE, f ;toggle left trigger if button tap
Continue01
bcf FLAGS, STATECHANGE
call WriteEE ;store state
goto Start
I believe someone mentioned that using a low firerate on the left side would help autoaiming in zombie mode for COD WAW.