diff --git a/src/Timer.s b/src/Timer.s index 544e03c..3c3e3fc 100644 --- a/src/Timer.s +++ b/src/Timer.s @@ -182,11 +182,16 @@ _DoTimers plx pla + lda Timers+2,x ; Load the reset value, if it's zero + beq :oneshot ; then this was a one-shot timer + clc - adc Timers+2,x ; Add the increment - sta Timers,x ; Store in the count + adc Timers,x ; Add to the current count and store + sta Timers,x bra :retry ; See if we have >0 ticks to wait until the next trigger +:oneshot stz Timers,x + :skip txa clc adc #8 @@ -232,6 +237,8 @@ _DoTimers + +