mirror of
https://github.com/a2-4am/4cade.git
synced 2024-09-29 09:55:29 +00:00
64 lines
1.3 KiB
Plaintext
64 lines
1.3 KiB
Plaintext
;license:MIT
|
|
;(c) 2021 by 4am
|
|
|
|
!cpu 6502
|
|
!to "build/FX.INDEXED/SHR.DIAGONAL",plain
|
|
*=$A000
|
|
|
|
shrlo = $301 ; $C8 bytes, indexed as shrlo-1,x
|
|
shrhi = $201 ; $C8 bytes, indexed as shrhi-1,x
|
|
|
|
!source "src/fx/macros.a"
|
|
!source "src/fx/fx.shr.common.a"
|
|
|
|
+COPY_TO_0 start, end
|
|
+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
|