4cade/src/fx/fx.shr.diagonal.a

68 lines
1.4 KiB
Plaintext

;license:MIT
;(c) 2021 by 4am
!cpu 6502
!to "build/FX.INDEXED/SHR.DIAGONAL",plain
*=$A000
!source "src/fx/fx.shr.common.a"
shrlo = $301 ; $C8 bytes
shrhi = $201 ; $C8 bytes
ldx #(end-start-1) ; copy loop to zero page
- lda start, x
sta $00, x
dex
bpl -
+BUILD_SHR_LOOKUP_TABLES shrlo, shrhi
;X=0
+COPY_SCB_AND_PALETTES
;WRITEAUXMEM active
jmp colloop
start
!pseudopc 0 {
colloop
ldx #$C8
startcollo=*+1
ldy #$9F ; SMC
startcolhi=*+1
lda #$00
sta <colhi
rowloop
colhi=*+1
lda #$00
bne +
cpy #$A0
bcs +
lda shrlo-1, x
sta <dst+1
lda shrhi-1, x
sta <dst+2
lda (<dst+1), y
dst sta $FDFD, y ; SMC
+ iny
bne +
inc <colhi
+ dex
bne rowloop
dec <startcollo
lda <startcollo
cmp #$FF
bne +
dec <startcolhi
+ lda $C000
bmi exit
dec <counter
bne colloop
dec <counter+1
bne colloop
exit
rts
counter !word 200 + 160 + 256
}
end