2020-08-14 15:35:55 +00:00
|
|
|
;license:MIT
|
2020-10-23 22:16:18 +00:00
|
|
|
;(c) 2020 by 4am
|
2020-08-14 15:35:55 +00:00
|
|
|
;
|
|
|
|
!cpu 6502
|
2021-10-16 01:34:39 +00:00
|
|
|
!to "build/FX.INDEXED/REDLINES",plain
|
2020-08-14 15:35:55 +00:00
|
|
|
*=$6000
|
|
|
|
|
|
|
|
row1 = $fe
|
|
|
|
row2 = $ff
|
|
|
|
|
2022-08-26 01:56:15 +00:00
|
|
|
!source "src/fx/macros.a"
|
2020-08-14 15:35:55 +00:00
|
|
|
!source "src/constants.a"
|
|
|
|
|
|
|
|
lda #$00
|
|
|
|
sta row1
|
|
|
|
lda #$BF
|
|
|
|
sta row2
|
|
|
|
@loop1
|
|
|
|
jsr WaitForVBL
|
|
|
|
lda row1
|
|
|
|
jsr DrawRedLine
|
|
|
|
lda row2
|
|
|
|
jsr DrawRedLine
|
|
|
|
ldx row1
|
|
|
|
beq +
|
|
|
|
dex
|
|
|
|
txa
|
|
|
|
jsr DrawBlackLine
|
|
|
|
+ ldx row2
|
|
|
|
inx
|
|
|
|
cpx #$C0
|
|
|
|
beq +
|
|
|
|
txa
|
|
|
|
jsr DrawBlackLine
|
|
|
|
+
|
|
|
|
lda #$30
|
|
|
|
jsr WaitForKeyWithTimeout
|
|
|
|
bmi @exit
|
|
|
|
inc row1
|
|
|
|
dec row2
|
|
|
|
lda row1
|
|
|
|
cmp #$60
|
|
|
|
bne @loop1
|
|
|
|
|
|
|
|
@loop2
|
|
|
|
jsr WaitForVBL
|
|
|
|
lda row1
|
|
|
|
cmp #$C0
|
|
|
|
beq +
|
|
|
|
jsr DrawRedLine
|
|
|
|
+ lda row2
|
|
|
|
bmi +
|
|
|
|
jsr DrawRedLine
|
|
|
|
+ ldx row1
|
|
|
|
dex
|
|
|
|
txa
|
|
|
|
jsr CopyLine
|
|
|
|
ldx row2
|
|
|
|
inx
|
|
|
|
txa
|
|
|
|
jsr CopyLine
|
|
|
|
lda #$30
|
|
|
|
jsr WaitForKeyWithTimeout
|
|
|
|
bmi @exit
|
|
|
|
inc row1
|
|
|
|
dec row2
|
|
|
|
lda row1
|
|
|
|
cmp #$C1
|
|
|
|
bne @loop2
|
|
|
|
@exit jmp UnwaitForVBL
|
|
|
|
|
|
|
|
DrawRedLine
|
|
|
|
jsr HGRCalc
|
|
|
|
ldy #$27
|
|
|
|
lda #$AA
|
|
|
|
- eor #$7F
|
|
|
|
sta ($26), y
|
|
|
|
dey
|
|
|
|
bpl -
|
|
|
|
rts
|
|
|
|
|
|
|
|
DrawBlackLine
|
|
|
|
jsr HGRCalc
|
|
|
|
ldy #$27
|
|
|
|
lda #$00
|
|
|
|
- sta ($26), y
|
|
|
|
dey
|
|
|
|
bpl -
|
|
|
|
rts
|
|
|
|
|
|
|
|
CopyLine
|
|
|
|
jsr HGRCalc
|
|
|
|
ldy #$27
|
|
|
|
- lda ($3c), y
|
|
|
|
sta ($26), y
|
|
|
|
dey
|
|
|
|
bpl -
|
|
|
|
rts
|
|
|
|
|
|
|
|
!source "src/wait.a"
|
2020-11-14 02:24:30 +00:00
|
|
|
+HGR_CALC_ROUTINES
|