;----------------------------- ;A=0..n-1=no.of bytes to skip ;must have been calculated ;directly before to ensure ;correct setting of the z-flag ;----------------------------- sta bra+1 bra bne * nop ;2 cycles lda #$a9 ;2 lda #$a9 ;2 lda #$a9 ;2 lda $ea ;3 ;----------------------------- ;page break here ;----------------------------- code ...
;----------------------- ;cycle no. taken from ;lft's example ;----------------------- ;32..41 (31 not poss. with the opt) ;A=0..9 (10 not poss.) sta bra+1 ;36..45 bra bne * ;38 (only for A=0) nop ;40 (branch taken, nop skipped) lda #$a9 ;42 lda #$a9 ;44 lda #$a9 ;46 lda $ea ;49 ;----------------------------- ;page break here ;----------------------------- code ...
;--------------------------------- ;trying to stick to lft's example ;with all the cycle numbers ;--------------------------------- ;23..33 ldx timer ;27..37 lda table,x ;31..41 ;A=0..10 sta bra+1 ;35..45 bra bpl * ;38 (35+3 for A=0 or 36+2 for A=$ff) nop ;40 lda #$a9 ;42 lda #$a9 ;44 lda #$a9 ;46 lda $ea ;49 code ... table !by $09,$08,$07,$06,$05,$04,$03,$02,$01,$ff,$00
;--------------------------------- ;23..33 ldx timer ;27..37 lda table,x ;if timer holds the max-val, the table access reads above the page end -> extra cycle! ;32..41 ;A=0..9 sta bra+1 ;36..45 bra bpl * ;39 (36+3 for A=0 or 37+2 for A=$ff) lda #$a9 ;41 lda #$a9 ;43 lda #$a5 ;45 nop ;48 (ends one cycle earlier as the first dejitter cycle is the lookup-table penalty cylce) code ... table !by $08,$07,$06,$05,$04,$03,$02,$01,$ff,$00 ;------------------------------------------------- ;page break here ;------------------------------------------------- !by $00
;--------------------------------- ;23..33 ldx timer ;27..37 lda table,x ;if timer holds the max-val, the table access reads above the page end -> extra cycle! ;32..41 ;A=0,0,$ff,1,..,8 (see table) sta bra+1 ;36..45 bra bpl * ;39 (36+3 for A=0 or 37+2 for A=$ff) lda #$a9 ;41 lda #$a9 ;43 lda #$a9 ;45 lda $ea ;48 (ends one cycle earlier as the first dejitter cycle is the lookup-table penalty cylce) code ... table !by $08,$07,$06,$05,$04,$03,$02,$01,$ff,$00 ;------------------------------------------------- ;page break here ;------------------------------------------------- !by $00