Repository navigation
Expand file tree
/
Copy pathclouds.bas
More file actions
290 lines (224 loc) · 4.29 KB
/
Copy pathclouds.bas
File metadata and controls
290 lines (224 loc) · 4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
;********************************************************
;
; Super Mario Clouds
;
; BEIGE 2002/3 - Cory Arcangel
;
; http://www.post-data.org/beige/
; http://www.beigerecords.com/cory/
; http://del.icio.us/cory_arcangel/
;
; "you mess with the best, you die like the rest" - Anon
; "punks jump up to get beat down" - Brand Nubian
;
;********************************************************
asm
.inesprg 2
.ineschr 1
.inesmir 1
.inesmap 0
.org $8000
clouds_start:
.dw clouds_start_addr
clouds_start_addr:
.incbin "clouds.hex"
start:
sei
cld
.vblank_clear1
lda $2002
bpl .vblank_clear1
.vblank_clear2
lda $2002
bpl .vblank_clear2
.vblank_clear3
lda $2002
bpl .vblank_clear3
sei
cld
.vblank_clear4
lda $2002
bpl .vblank_clear4
.vblank_clear5
lda $2002
bpl .vblank_clear5
.vblank_clear6
lda $2002
bpl .vblank_clear6
lda #$00
ldx #$00
.clear_out_ram
sta $000,x
sta $100,x
sta $200,x
sta $300,x
sta $400,x
sta $500,x
sta $600,x
sta $700,x
inx
bne .clear_out_ram
lda #$00
ldx #$00
.clear_out_sprites
sta $2000,x
sta $2100,x
sta $2200,x
sta $2300,x
sta $2400,x
sta $2500,x
sta $2600,x
sta $2700,x
sta $2800,x
sta $2900,x
sta $2a00,x
sta $2b00,x
sta $2c00,x
sta $2d00,x
sta $2e00,x
sta $2f00,x
inx
bne .clear_out_sprites
ldx #$FF
txs
jsr vwait
jsr vwait
;++++++++++++++++++++++++++++++++++++++++++++++++
;load palette
;++++++++++++++++++++++++++++++++++++++++++++++++
lda #$3F
sta $2006
lda #$00
sta $2006
lda #$21 ;background [powder blue]
sta $2007
lda #$30 ;cloud inside [white]
sta $2007
lda #$11 ; highlight [blue]
sta $2007
lda #$0d ;outline [black]
sta $2007
;++++++++++++++++++++++++++++++++++++++++++++++++
;load name tables
;++++++++++++++++++++++++++++++++++++++++++++++++
endasm
array addr 2
set songloadloop 0
asm
ldx #0
ldy #0
lda #2
sta songloadloop
load_outcast:
lda clouds_start,y
sta addr,x
iny
inx
dec songloadloop
bne load_outcast
lda #$20
sta $2006
lda #$00
sta $2006
nametables:
ldx #$08
ldy #$00
load_clouds:
lda [addr],y
sta $2007
iny
bne load_clouds
txs
ldx #$01
inc addr,x
tsx
dex
bne load_clouds
lda #$00
sta $2006
sta $2006 ;Reset PPU
sta $2005
sta $2005 ;Reset Scroll
;++++++++++++++++++++++++++++++++++++++++++++++++
;init graphic settings
;++++++++++++++++++++++++++++++++++++++++++++++++
lda #%10011100
sta $2000
lda #%00001010
sta $2001
;++++++++++++++++++++++++++++++++++++++++++++++++
;set variables
;++++++++++++++++++++++++++++++++++++++++++++++++
endasm
set DELAYSCROLL 1
set NTShow 0
set SCROLL 0
asm
;++++++++++++++++++++++++++++++++++++++++++++++++
;loop forever....
;++++++++++++++++++++++++++++++++++++++++++++++++
main:
jmp main
;++++++++++++++++++++++++++++++++++++++++++++++++
;vblankzzzzzz
;++++++++++++++++++++++++++++++++++++++++++++++++
vwait:
lda $2002
bpl vwait
vwait2:
lda $2002
bmi vwait2
rts
;++++++++++++++++++++++++++++++++++++++++++++++++
;NMI Routine!!!! Very important!!!!!
;++++++++++++++++++++++++++++++++++++++++++++++++
nmi:
dec DELAYSCROLL
bne .end_no_scroll
lda #$20
sta DELAYSCROLL
lda #$ff
cmp $24 ;scroll
beq .NT_adj
jmp .end
.NT_adj:
lda #$00
cmp NTShow
beq .Show_Zero
lda #%10011100
sta $2000
lda #%00001010
sta $2001
lda #$00
sta NTShow
jmp .end
.Show_Zero:
lda #%10011101
sta $2000
lda #%00001010
sta $2001
lda #$01
sta NTShow
.end:
inc $24 ;scroll
lda $24 ;scroll
sta $2005
lda #$00
sta $2005
.end_no_scroll:
rti
irq:
rti
;++++++++++++++++++++++++++++++++++++++++++++++++
;Load Data Filez
;++++++++++++++++++++++++++++++++++++++++++++++++
.bank 3
.org $fffa
.dw nmi ;//NMI
.dw start ;//Reset
.dw irq ;//BRK
.bank 4
.org $0000
;//end of file
.incbin "mario.chr" ;gotta be 8192 bytes long
endasm