Fix bcc/bcs typo when initializing timers

This commit is contained in:
Lucas Scharenbroich 2021-10-07 16:38:20 -05:00
parent 87ded17e20
commit 4006f76c02
3 changed files with 13 additions and 71 deletions

View File

@ -36,6 +36,9 @@ DoTimers EXT
StartScript EXT
StopScript EXT
; Direct access to internals
DoScriptSeq EXT
; Allocate a full 64K bank
AllocBank EXT
@ -45,7 +48,3 @@ AllocBank EXT
ScreenAddr EXT
OneSecondCounter EXT
BlitBuff EXT

View File

@ -69,6 +69,14 @@ ARG1 equ 2
ARG2 equ 4
ARG3 equ 6
DoScriptSeq ENT
phb
phk
plb
jsl _DoScriptSeq ; Yes, this is a special JSL, because _DoScriptSeq is a time callback
plb
rtl
_DoScriptSeq
phx ; save the timer index; will need to update user data at the end
phb ; save the current data bank
@ -178,8 +186,3 @@ _UserCallback
lda: ARG3,y
:dispatch jsl $000000
brl _dss_cmd_rtn

View File

@ -101,7 +101,7 @@ AddTimer ENT
stz Timers+14,x ; Clear the user data space
plp
bcc :oneshot
bcs :oneshot
lda Timers+0,x ; if not a one-shot, put the counter
sta Timers+2,x ; value into the reset field
@ -147,6 +147,7 @@ DoTimers ENT
plb
jsr _GetVBLTicks
cmp lastTick ; Throttle to 60 fps
beq :exit
tax ; Calculate the increment
@ -212,64 +213,3 @@ _DoTimers
pla
rts