Tighten up vBlankCounter code.

This commit is contained in:
Colin McMillen 2015-05-28 08:44:38 -04:00
parent 325006664b
commit 7a04a359fa

View File

@ -596,15 +596,11 @@ VBlankCounter:
; This is a 24-bit counter. At 60 vblanks/second, this will take ; This is a 24-bit counter. At 60 vblanks/second, this will take
; 77 hours to wrap around; that's good enough for me :) ; 77 hours to wrap around; that's good enough for me :)
inc vBlankCounter inc vBlankCounter
lda vBlankCounter bne +
cmp #$00
bne VBlankCounterDone
inc vBlankCounter + 1 inc vBlankCounter + 1
lda vBlankCounter + 1 bne +
cmp #$00
bne VBlankCounterDone
inc vBlankCounter + 2 inc vBlankCounter + 2
VBlankCounterDone: +
rts rts