4cade/src/fx/fx.hgr.1bit.fizzle.a

76 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-10-16 01:51:51 +00:00
;license:MIT
2020-09-03 22:42:38 +00:00
;(c) 2017-2020 by qkumba/4am
2019-10-16 01:51:51 +00:00
!cpu 6502
!to "build/FX/BIT.FIZZLE",plain
*=$6000
copymasks = $6100 ; [256 bytes]
addrs = $6200 ; [256 bytes]
2020-09-04 05:01:32 +00:00
jsr swapzp
ldx #0
lda #1
-- ldy #$20
- sta copymasks, x
inx
dey
bne -
asl
bne --
clc
-- ldy #$20
tya
- sta addrs, x
adc #$1
inx
dey
bne -
txa
bne --
sty <rnd2+1
iny
sty <rnd1+1
2020-09-04 04:20:56 +00:00
jsr $0
swapzp ldx #(end-start-1)
2020-09-04 04:20:56 +00:00
- lda $0, x
pha
lda start, x
2020-09-04 04:20:56 +00:00
sta $0, x
pla
sta start, x
2020-09-04 04:20:56 +00:00
dex
bpl -
rts
start
2020-09-04 04:20:56 +00:00
!pseudopc 0 {
loop lda <rnd1+1
2020-09-04 04:20:56 +00:00
loop2 eor #$ff
2020-09-04 05:01:32 +00:00
tay
lsr <rnd2+1
ror <rnd1+1
2019-10-16 01:51:51 +00:00
bcc +
lda <rnd2+1
2020-09-04 05:01:32 +00:00
eor #$B4
sta <rnd2+1
2020-09-04 04:20:56 +00:00
+ lda addrs, x
sta <dst+2
2019-10-16 01:51:51 +00:00
eor #$60
sta <src+2
lda (<dst+1), y
src eor $FD00, y
2020-09-04 04:20:56 +00:00
and copymasks, x
eor (<dst+1), y
dst sta $FD00, y
2020-09-04 04:20:56 +00:00
rnd2 ldx #$FD
bne loop
lda $c000
2020-09-04 04:20:56 +00:00
bmi exit
rnd1 lda #$FD
cmp #1
2020-09-04 04:20:56 +00:00
bne loop2
exit rts
}
end