mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-23 12:33:32 +00:00
shave some cycles (front load end-of-loop comparisons)
This commit is contained in:
parent
e3f65ff220
commit
7ce75c9092
@ -48,18 +48,28 @@ counter = $FF
|
||||
!source "src/fx/macros.a"
|
||||
!source "src/fx/fx.dhgr.common.a"
|
||||
|
||||
exit=*+3
|
||||
+COPY_TO_AUXMEM $60, $07
|
||||
|
||||
lda #(40+24+7-1) ; columns + rows + blocks per row - 1
|
||||
lda #(40+24+7) ; columns + rows + blocks per row
|
||||
sta counter
|
||||
|
||||
lda #39
|
||||
lda #40
|
||||
sta col
|
||||
|
||||
ColLoop
|
||||
lda #23
|
||||
lda $c000
|
||||
bmi exit
|
||||
dec col
|
||||
dec counter
|
||||
beq exit
|
||||
|
||||
lda #24
|
||||
sta row
|
||||
ldy col
|
||||
RowLoop
|
||||
dec row
|
||||
bmi ColLoop
|
||||
ldx row
|
||||
lda hgrrowlo, x
|
||||
sta src
|
||||
@ -189,14 +199,7 @@ RowLoop
|
||||
sta $C002
|
||||
sta $C004
|
||||
iny
|
||||
dec row
|
||||
+LBPL RowLoop
|
||||
lda $c000
|
||||
bmi @exit
|
||||
dec col
|
||||
dec counter
|
||||
+LBNE ColLoop
|
||||
@exit rts
|
||||
jmp RowLoop
|
||||
|
||||
; next table can not cross a page boundary
|
||||
!if <* > $E8 {
|
||||
|
Loading…
Reference in New Issue
Block a user