2021-11-29 02:50:09 +00:00
|
|
|
;license:MIT
|
|
|
|
;(c) 2021 by 4am
|
|
|
|
|
|
|
|
!cpu 6502
|
2021-12-03 03:22:28 +00:00
|
|
|
!to "build/FX.INDEXED/SHR.DIAGONAL",plain
|
2021-11-29 02:50:09 +00:00
|
|
|
*=$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
|
|
|
|
+COPY_SCB_AND_PALETTES
|
|
|
|
|
|
|
|
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 sta $C004
|
|
|
|
rts
|
|
|
|
counter !word 200 + 160 + 256
|
|
|
|
}
|
|
|
|
end
|