Tighten up vBlankCounter code.
This commit is contained in:
parent
325006664b
commit
7a04a359fa
10
pewpew.asm
10
pewpew.asm
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user