projects
/
xscreensaver
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver]
/
hacks
/
images
/
m6502
/
rorschach.asm
1
; "Rorschach test"
2
; Not at all what it was supposed to be,
3
; but it turns out pretty cool and can
4
; create some interesting patterns.
5
6
lda #8
7
tax
8
dr:
9
sta $3cb,x
10
sta $40b,x
11
dex
12
bpl dr
13
sta $3f3
14
sta $3eb
15
16
lda #1
17
sta $3ec
18
19
ldx #255
20
mk:
21
lda $fe
22
sta $1200,x
23
lda $fe
24
sta $1300,x
25
lda $fe
26
sta $1400,x
27
lda $fe
28
sta $1500,x
29
dex
30
cpx #$ff
31
bne mk
32
33
; smooth it
34
35
ldy #0
36
re:
37
lda #1
38
sta $3ec,y
39
40
ldx #255
41
sm:
42
lda $1201,x
43
adc $11ff,x
44
adc $1220,x
45
adc $11e0,x
46
lsr
47
lsr
48
sta $1200,x
49
50
lda $1301,x
51
adc $12ff,x
52
adc $1320,x
53
adc $12e0,x
54
lsr
55
lsr
56
sta $1300,x
57
58
lda $1401,x
59
adc $13ff,x
60
adc $1420,x
61
adc $13e0,x
62
lsr
63
lsr
64
sta $1400,x
65
66
lda $1501,x
67
adc $14ff,x
68
adc $1520,x
69
adc $14e0,x
70
lsr
71
lsr
72
sta $1500,x
73
74
dex
75
cpx #$ff
76
bne sm
77
iny
78
cpy #7
79
bne re
80
81
lda #1
82
sta $3f0
83
84
;copy it
85
86
clc
87
ldx #255
88
cp:
89
lda $1200,x
90
lsr
91
lsr
92
tay
93
lda colors,y
94
sta $200,x
95
96
lda $1300,x
97
lsr
98
lsr
99
tay
100
lda colors,y
101
sta $300,x
102
103
lda $1400,x
104
lsr
105
lsr
106
tay
107
lda colors,y
108
sta $400,x
109
110
lda $1500,x
111
lsr
112
lsr
113
tay
114
lda colors,y
115
sta $500,x
116
117
dex
118
cpx #$ff
119
bne cp
120
rts
121
122
colors:
123
dcb 0,0,0,0,0,$9,$9,1,1,0,0,0,0,0
124