megademo: let keypress skip ahead

This commit is contained in:
Vince Weaver 2018-09-27 00:00:36 -04:00
parent 60a7cc1fbb
commit b7e950d1d4
2 changed files with 21 additions and 12 deletions

View File

@ -391,30 +391,38 @@ bmloop6:dex ; 2
;=========================================================================
jsr move_letters ; 6+126
; Blanking time: 4550
; move_letters -132
; check keypress -7
; JMP at end -3
;========================4415 cycles
;========================4408 cycles
; Try X=24 Y=35 cycles=4411 R4
; Try X=175 Y=5 cycles=4406 R2
nop
nop
nop ; 2
ldy #35 ; 2
loop7: ldx #24 ; 2
loop8: dex ; 2
bne loop8 ; 2nt/3
ldy #5 ; 2
bmloop7:ldx #175 ; 2
bmloop8:dex ; 2
bne bmloop8 ; 2nt/3
dey ; 2
bne loop7 ; 2nt/3
bne bmloop7 ; 2nt/3
; Skip if keypressed
lda KEYPRESS ; 4
bpl bm_no_keypress ; 3
jmp bm_done ; 3
bm_no_keypress:
jmp bm_display_loop ; 3
bm_done:
bit KEYRESET ; clear keypress ; 4
rts ; 6
;===========================================================
;===========================================================
;===========================================================

View File

@ -165,7 +165,8 @@ no_keypress:
jmp display_loop ; 3
start_over:
rts
bit KEYRESET ; clear keypress ; 4
rts ; 6
;=================================