/[projet1]/public/atari/demos/next/phaleon-gigademo/reset/APP2.S
Defence Force logotype

Contents of /public/atari/demos/next/phaleon-gigademo/reset/APP2.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (show annotations)
Wed Apr 22 20:23:35 2009 UTC (10 years, 11 months ago) by dbug
File size: 7777 byte(s)
Added the reset screen of the phaleon demo
1 appeff
2 moveq #0,d4
3 lea coord,a0
4 moveq #0,d7
5 move (a0)+,d7
6 add.l d7,d7
7 add.l d7,d7
8 move.l a0,a5
9 add.l d7,a5
10 move.l ecr,a1
11 move.l ecrb,a4
12 addq #4,a1
13 addq #4,a4
14 move.l ou_suite_par,a0
15 move #80-1,d7
16 .appf
17 move (a0)+,d0
18 move (a0)+,d1
19 cmp.l a5,a0
20 bgt.s .finappelm
21 add #160,d0
22 add #100,d1
23
24 move d0,d2
25 and #$f,d2
26 and #$fff0,d0
27 lsr d0
28
29 mulu #160,d1
30 add d0,d1
31 move.l a1,a2
32 move.l a4,a3
33 add d1,a2
34 add d1,a3
35
36 add d2,d2
37
38 move .table_xf(pc,d2.w),d0
39 eor d0,(a2)
40 eor d0,(a3)
41
42 cmp.b #$39,$fffffc02.w
43 beq.s .finappelm1
44 dbra d7,.appf
45 move.l a0,ou_suite_par
46 moveq #0,d7
47 rts
48 .finappelm
49 moveq #-1,d4
50 moveq #0,d7
51 rts
52 .finappelm1
53 moveq #-1,d7
54 rts
55 .table_xf
56 dc %1000000000000000
57 dc %100000000000000
58 dc %10000000000000
59 dc %1000000000000
60 dc %100000000000
61 dc %10000000000
62 dc %1000000000
63 dc %100000000
64 dc %10000000
65 dc %1000000
66 dc %100000
67 dc %10000
68 dc %1000
69 dc %100
70 dc %10
71 dc %1
72
73
74 app
75 moveq #0,d4
76
77 move.l eclat,a0
78 lea nb_par*6(a0),a0
79 rept nb_par
80 move.l -(a0),a1
81 move -(a0),(a1)
82 endr
83
84 move.l eclat,a4
85 lea table_t,a3
86 move.l ecr,a1
87 addq #6,a1
88 lea coord,a0
89 moveq #0,d7
90 move (a0)+,d7
91 subq #1,d7
92 add.l d7,d7
93 add.l d7,d7
94 move.l a0,a5
95 add.l d7,a5
96
97 move.l ou_suite_par,a6
98
99 moveq #nb_par-1,d7
100 moveq #0,d6
101 .app
102 move (a3)+,d6
103 add.l #vit_par,d6
104 cmp.l #($7fff/vit_par)*vit_par,d6
105 blt.s .app1
106 moveq #0,d6
107 move d6,-2(a3)
108 move.l (a3),a0
109 move.l a6,(a3)+
110 addq #4,a6
111 move (a0)+,d0
112 move (a0)+,d1
113 move #$ffff,d6
114 bra.s .app2
115 .app1
116 move.l (a3)+,a0
117 cmp.l a5,a0
118 bgt.s .fin1
119 move d6,-6(a3)
120 move (a0)+,d0
121 move (a0)+,d1
122 muls d6,d0
123 muls d6,d1
124 add.l d0,d0
125 add.l d1,d1
126 swap d0
127 swap d1
128 .app2
129 add #160,d0
130 add #100,d1
131 move.l a1,a2
132 add d1,d1
133
134 move d0,d2
135 and #$f,d2
136 and #$fff0,d0
137 lsr d0
138
139 move .table_y(pc,d1.w),d5
140 add d0,d5
141 add d5,a2
142
143
144 add d2,d2
145 addq #1,d6
146 beq .fin3
147
148 move (a2),d0
149 move d0,(a4)+
150 or .table_x(pc,d2.w),d0
151 move d0,(a2)
152 move.l a2,(a4)+
153
154 dbra d7,.app
155 bra .ffin
156 rts
157 .fin1
158 addq #1,d4
159 addq #2,a4
160 move.l #merde,(a4)+
161 dbra d7,.app
162 bra .ffin
163
164 .fin3
165 move .table_x(pc,d2.w),d1
166 or d1,-(a2)
167 addq #2,a4
168 move.l #merde,(a4)+
169 move.l ecrb,a2
170 addq #4,a2
171 add d5,a2
172 or d1,(a2)
173 dbra d7,.app
174 bra .ffin
175
176
177 .table_x
178 dc %1000000000000000
179 dc %100000000000000
180 dc %10000000000000
181 dc %1000000000000
182 dc %100000000000
183 dc %10000000000
184 dc %1000000000
185 dc %100000000
186 dc %10000000
187 dc %1000000
188 dc %100000
189 dc %10000
190 dc %1000
191 dc %100
192 dc %10
193 dc %1
194 .table_y
195 x set 0
196 rept 200
197 dc x
198 x set x+160
199 endr
200 .ffin
201 *
202 move.l eclat,d0
203 move.l eclat1,eclat
204 move.l d0,eclat1
205 move.l a6,ou_suite_par
206 moveq #0,d7
207 rts
208
209 init_par
210 lea coord_depack,a2
211 .kjk
212 cmp.l a1,a0
213 bge.s .kji
214 move.l (a0)+,(a2)+
215 bra.s .kjk
216 .kji
217 lea coord_depack+2,a0
218 bsr depack
219
220 lea coord_depack,a0
221 move.l a0,a1
222 addq #2,a0
223 lea coord+2,a2
224 moveq #-100,d1
225 moveq #0,d2
226 move #199,d7
227 .loop0
228 move #-160,d0
229 moveq #19,d6
230 .loop1
231 move (a0)+,d4
232 moveq #15,d5
233 .loop2
234 btst d5,d4
235 beq.s .pas_points
236 move d0,(a2)+
237 move d1,(a2)+
238 addq #1,d2
239 .pas_points
240 addq #1,d0
241 dbra d5,.loop2
242 dbra d6,.loop1
243 addq #1,d1
244 dbra d7,.loop0
245 move d2,coord
246
247 lea coord,a0
248 move (a1),d0
249 tst d0
250 beq .pas_effet
251 cmp #1,d0
252 bne.s .pas_random
253 move (a0)+,d0
254 move d0,d1
255 subq #1,d0
256 .loopa0
257 move.l d0,-(sp)
258 random
259 and.l #$ffff,d0
260 lsr.l #3,d0
261 move.l d0,d3
262 mulu d1,d3
263 swap d3
264 and.l #$ffff,d3
265 add.l d3,d3
266 add.l d3,d3
267 lea coord+2,a1
268 add.l d3,a1
269 move.l (a1),d2
270 move.l (a0),(a1)
271 move.l d2,(a0)+
272 move.l (sp)+,d0
273 dbra d0,.loopa0
274 bra .pas_effet
275 .pas_random
276
277 cmp #2,d0
278 bne.s .pas_random1
279 move (a0)+,d0
280 move d0,d1
281 subq #1,d0
282 .loopa1
283 move.l d0,-(sp)
284 random
285 and.l #$ffff,d0
286 lsr d0
287 move.l d0,d3
288 mulu d1,d3
289 swap d3
290 and.l #$ffff,d3
291 add.l d3,d3
292 add.l d3,d3
293 lea coord+2,a1
294 add.l d3,a1
295 move.l (a1),d2
296 move.l (a0),(a1)
297 move.l d2,(a0)+
298 move.l (sp)+,d0
299 dbra d0,.loopa1
300 bra .pas_effet
301 .pas_random1
302
303 cmp #3,d0
304 bne.s .pas_haut_bas
305 moveq #0,d0
306 move (a0)+,d0
307 move.l d0,d1
308 add.l d1,d1
309 add.l d1,d1
310 move.l a0,a1
311 add.l d1,a1
312 lsr #2,d0
313 tst d0
314 beq.s .loopef3
315 subq #1,d0
316 .loopef3
317 addq #4,a0
318 subq #4,a1
319 move.l -(a1),d1
320 move.l (a0),(a1)
321 move.l d1,(a0)+
322 dbra d0,.loopef3
323 bra .pas_effet
324 .pas_haut_bas
325
326 cmp #4,d0
327 bne .random2
328 move (a0)+,d0
329 move d0,d1
330 move.l a0,a2
331 moveq #0,d2
332 move d0,d2
333 add.l d2,d2
334 add.l d2,d2
335 add.l d2,a2
336 subq #1,d0
337 .loopa2
338 move.l d0,-(sp)
339 random
340 and.l #$ffff,d0
341 lsr #3,d0
342 move.l d0,d3
343 mulu d1,d3
344 swap d3
345 and.l #$ffff,d3
346 add.l d3,d3
347 add.l d3,d3
348 move.l a0,a1
349 add.l d3,a1
350 cmp.l a2,a1
351 blt .ok4
352 move.l (sp)+,d0
353 bra .pas_effet
354 .ok4
355 move.l (a1),d2
356 move.l (a0),(a1)
357 move.l d2,(a0)+
358 move.l (sp)+,d0
359 dbra d0,.loopa2
360 .random2
361
362 cmp #5,d0
363 bne .pas_dg
364 moveq #0,d0
365 move (a0)+,d0
366 move.l a0,a2
367 add.l d0,d0
368 add.l d0,d0
369 add.l d0,a2
370 move #-160,d7
371 move #160,d6
372 .loopa3
373
374 move.l a0,a1
375 .cherche0
376 tst d7
377 bgt .cherche0a
378 .cherche00
379 cmp (a1),d7
380 blt.s .cherche1
381 move.l (a0),d1
382 move.l (a1),(a0)+
383 move.l d1,(a1)
384 .cherche1
385 addq #4,a1
386 cmp.l a2,a1
387 blt.s .cherche00
388 bra.s .cherche2
389 .cherche0a
390 cmp (a1),d7
391 bgt.s .cherche1a
392 move.l (a0),d1
393 move.l (a1),(a0)+
394 move.l d1,(a1)
395 .cherche1a
396 addq #4,a1
397 cmp.l a2,a1
398 blt.s .cherche0a
399 bra .cherche2
400 .cherche2
401 tst d7
402 bgt.s .pos
403 beq .pas_effet
404 addq #8,d7
405 bra.s .pos1
406 .pos
407 subq #8,d7
408 .pos1
409 exg d6,d7
410 bra.s .loopa3
411 .pas_dg
412
413 .pas_effet
414
415
416
417
418 lea teclat,a0
419 move.l a0,eclat
420 move.l a0,eclat1
421 add.l #nb_par*6,eclat1
422 move #(nb_par*2)-1,d7
423 .in
424 clr (a0)+
425 move.l #merde,(a0)+
426 dbra d7,.in
427
428 lea coord+2,a1
429 lea table_t,a0
430 move #nb_par-1,d7
431 moveq #0,d6
432 .ft
433 move d7,d6
434 lsl #8,d6
435 lsl #3,d6
436 and #$7fff,d6
437 move d6,(a0)+
438 move.l a1,(a0)+
439 addq #4,a1
440 dbra d7,.ft
441 move.l a1,ou_suite_par
442 rts
443 applogo
444 move.b #-2,starapp
445 move.l (a0)+,a1 *adr graphic
446 move (a0)+,d7 * nb de multiple en x a afficher
447 move (a0)+,d5 * nb sde ligne en hauteur a afficher
448 move.l (a0)+,a2 * adr de la pallette en degrade
449 move (a0)+,d4 * nb de vbl d'attente entre l'apparition et la disparition
450
451 .waitsa
452 tst.b starapp
453 bne.s .waitsa
454 lea $ffff8240.w,a6
455 moveq #7,d2
456 .clearc
457 clr.l (a6)+
458 dbra d2,.clearc
459
460 * on efface les ecrans
461 move.l ecr,a3
462 move.l ecrb,a4
463 move #4000-1,d3
464 moveq #0,d2
465 .clear
466 move.l d2,(a3)+
467 move.l d2,(a4)+
468 move.l d2,(a3)+
469 move.l d2,(a4)+
470 dbra d3,.clear
471
472 move.l ecr,a3
473 move.l ecrb,a4
474 * affiche le logo
475 move #200,d2
476 sub d5,d2
477 lsr d2
478 mulu #160,d2
479 add d2,a3
480 add d2,a4
481 moveq #20,d2
482 sub d7,d2
483 lsr d2
484 lsl #3,d2
485 add d2,a3
486 add d2,a4
487
488 moveq #20,d2
489 sub d7,d2
490 lsl #3,d2
491
492 subq #1,d5
493 .ligney
494 move d7,d6
495 subq #1,d6
496 .lignex
497 move.l (a1),(a3)+
498 move.l (a1)+,(a4)+
499 move.l (a1),(a3)+
500 move.l (a1)+,(a4)+
501 dbra d6,.lignex
502 add d2,a3
503 add d2,a4
504 dbra d5,.ligney
505
506 moveq #15,d2
507 .rt0
508 wait 3
509 cmp.b #$39,$fffffc02.w
510 beq .fin_applogo
511 lea $ffff8240.w,a0
512 moveq #7,d7
513 .rt
514 move.l (a2)+,(a0)+
515 dbra d7,.rt
516 dbra d2,.rt0
517
518 .waitv
519 vsync
520 cmp.b #$39,$fffffc02.w
521 beq .fin_applogo
522 dbra d4,.waitv
523
524 moveq #15,d2
525 .rt01
526 wait 3
527 cmp.b #$39,$fffffc02.w
528 beq .fin_applogo
529 lea ($ffff8240+16*2).w,a0
530 moveq #7,d7
531 .rt1
532 move.l -(a2),-(a0)
533 dbra d7,.rt1
534 dbra d2,.rt01
535
536 * on efface les ecrans
537 move.l ecr,a3
538 move.l ecrb,a4
539 move #4000-1,d3
540 moveq #0,d2
541 .clear1
542 move.l d2,(a3)+
543 move.l d2,(a4)+
544 move.l d2,(a3)+
545 move.l d2,(a4)+
546 dbra d3,.clear1
547
548 move.b #1,starapp
549 moveq #0,d7
550 rts
551 .fin_applogo
552 moveq #-1,d7
553 rts
554

  ViewVC Help
Powered by ViewVC 1.1.26