/[projet1]/public/oric/demos/assembly_2002/display.s
Defence Force logotype

Contents of /public/oric/demos/assembly_2002/display.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 473 - (show annotations)
Fri Apr 29 22:00:16 2011 UTC (8 years, 10 months ago) by dbug
File size: 14491 byte(s)
Added the Assembly 2002 demo, it's very messy, need some cleanup, but well
1
2
3
4
5 ; Alternate charset in hires from $9c00 to $a000
6 ; is a nice 1024 bytes buffer
7
8 _MovieFrame .byt 0
9
10 _DisplayColumn .byt 39
11
12 _FrameUnpack
13 lda #<_picture_frames
14 sta tmp0
15 clc
16 lda #>_picture_frames
17 adc _MovieFrame
18 sta tmp0+1
19
20 ldy #0
21
22 ldx #0
23 FrameUnpackLoop0
24 lda (tmp0),y
25 iny
26
27 pha
28 and #3
29 sta $9c00,x
30 inx
31
32 pla
33 lsr
34 lsr
35 pha
36 and #3
37 sta $9c00,x
38 inx
39
40 pla
41 lsr
42 lsr
43 pha
44 and #3
45 sta $9c00,x
46 inx
47
48 pla
49 lsr
50 lsr
51 sta $9c00,x
52 inx
53
54 bne FrameUnpackLoop0
55
56
57 ldx #0
58 FrameUnpackLoop1
59 lda (tmp0),y
60 iny
61
62 pha
63 and #3
64 sta $9d00,x
65 inx
66
67 pla
68 lsr
69 lsr
70 pha
71 and #3
72 sta $9d00,x
73 inx
74
75 pla
76 lsr
77 lsr
78 pha
79 and #3
80 sta $9d00,x
81 inx
82
83 pla
84 lsr
85 lsr
86 sta $9d00,x
87 inx
88
89 bne FrameUnpackLoop1
90
91
92 ldx #0
93 FrameUnpackLoop2
94 lda (tmp0),y
95 iny
96
97 pha
98 and #3
99 sta $9e00,x
100 inx
101
102 pla
103 lsr
104 lsr
105 pha
106 and #3
107 sta $9e00,x
108 inx
109
110 pla
111 lsr
112 lsr
113 pha
114 and #3
115 sta $9e00,x
116 inx
117
118 pla
119 lsr
120 lsr
121 sta $9e00,x
122 inx
123
124 bne FrameUnpackLoop2
125
126
127 ldx #0
128 FrameUnpackLoop3
129 lda (tmp0),y
130 iny
131
132 pha
133 and #3
134 sta $9f00,x
135 inx
136
137 pla
138 lsr
139 lsr
140 pha
141 and #3
142 sta $9f00,x
143 inx
144
145 pla
146 lsr
147 lsr
148 pha
149 and #3
150 sta $9f00,x
151 inx
152
153 pla
154 lsr
155 lsr
156 sta $9f00,x
157 inx
158
159 bne FrameUnpackLoop3
160
161 rts
162
163
164 _TabColors
165 .byt 64
166 .byt 64
167 .byt 64+2+4
168 .byt 64+2+4+8+16
169
170 _TabColors1
171 .byt 64
172 .byt 64+1+2
173 .byt 64+1+2+4+8
174 .byt 64+1+2+4+8+16+32
175
176
177 _FrameFlip .byt 0
178
179
180 #define SCREEN_BEGIN_ODD $a000+40*8+1
181 #define SCREEN_BEGIN_EVEN $a000+40*8+40+1
182
183
184 _FrameDisplay
185 lda _FrameFlip
186 beq FrameDisplayOdd
187 jmp FrameDisplayEven
188
189 FrameDisplayOdd
190 lda #1
191 sta _FrameFlip
192
193 ldy #0
194 FrameDisplayOddLoopX
195 ldx $9c00+40*0,y
196 lda _TabColors,x
197 sta SCREEN_BEGIN_ODD+320*0+0,y
198 sta SCREEN_BEGIN_ODD+320*0+240,y
199 lda _TabColors1,x
200 sta SCREEN_BEGIN_ODD+320*0+80,y
201 sta SCREEN_BEGIN_ODD+320*0+160,y
202
203 ldx $9c00+40*1,y
204 lda _TabColors,x
205 sta SCREEN_BEGIN_ODD+320*1+0,y
206 sta SCREEN_BEGIN_ODD+320*1+240,y
207 lda _TabColors1,x
208 sta SCREEN_BEGIN_ODD+320*1+80,y
209 sta SCREEN_BEGIN_ODD+320*1+160,y
210
211 ldx $9c00+40*2,y
212 lda _TabColors,x
213 sta SCREEN_BEGIN_ODD+320*2+0,y
214 sta SCREEN_BEGIN_ODD+320*2+240,y
215 lda _TabColors1,x
216 sta SCREEN_BEGIN_ODD+320*2+80,y
217 sta SCREEN_BEGIN_ODD+320*2+160,y
218
219 ldx $9c00+40*3,y
220 lda _TabColors,x
221 sta SCREEN_BEGIN_ODD+320*3+0,y
222 sta SCREEN_BEGIN_ODD+320*3+240,y
223 lda _TabColors1,x
224 sta SCREEN_BEGIN_ODD+320*3+80,y
225 sta SCREEN_BEGIN_ODD+320*3+160,y
226
227 ldx $9c00+40*4,y
228 lda _TabColors,x
229 sta SCREEN_BEGIN_ODD+320*4+0,y
230 sta SCREEN_BEGIN_ODD+320*4+240,y
231 lda _TabColors1,x
232 sta SCREEN_BEGIN_ODD+320*4+80,y
233 sta SCREEN_BEGIN_ODD+320*4+160,y
234
235 ldx $9c00+40*5,y
236 lda _TabColors,x
237 sta SCREEN_BEGIN_ODD+320*5+0,y
238 sta SCREEN_BEGIN_ODD+320*5+240,y
239 lda _TabColors1,x
240 sta SCREEN_BEGIN_ODD+320*5+80,y
241 sta SCREEN_BEGIN_ODD+320*5+160,y
242
243 ldx $9c00+40*6,y
244 lda _TabColors,x
245 sta SCREEN_BEGIN_ODD+320*6+0,y
246 sta SCREEN_BEGIN_ODD+320*6+240,y
247 lda _TabColors1,x
248 sta SCREEN_BEGIN_ODD+320*6+80,y
249 sta SCREEN_BEGIN_ODD+320*6+160,y
250
251 ldx $9c00+40*7,y
252 lda _TabColors,x
253 sta SCREEN_BEGIN_ODD+320*7+0,y
254 sta SCREEN_BEGIN_ODD+320*7+240,y
255 lda _TabColors1,x
256 sta SCREEN_BEGIN_ODD+320*7+80,y
257 sta SCREEN_BEGIN_ODD+320*7+160,y
258
259 ldx $9c00+40*8,y
260 lda _TabColors,x
261 sta SCREEN_BEGIN_ODD+320*8+0,y
262 sta SCREEN_BEGIN_ODD+320*8+240,y
263 lda _TabColors1,x
264 sta SCREEN_BEGIN_ODD+320*8+80,y
265 sta SCREEN_BEGIN_ODD+320*8+160,y
266
267 ldx $9c00+40*9,y
268 lda _TabColors,x
269 sta SCREEN_BEGIN_ODD+320*9+0,y
270 sta SCREEN_BEGIN_ODD+320*9+240,y
271 lda _TabColors1,x
272 sta SCREEN_BEGIN_ODD+320*9+80,y
273 sta SCREEN_BEGIN_ODD+320*9+160,y
274
275
276 ldx $9c00+40*10,y
277 lda _TabColors,x
278 sta SCREEN_BEGIN_ODD+320*10+0,y
279 sta SCREEN_BEGIN_ODD+320*10+240,y
280 lda _TabColors1,x
281 sta SCREEN_BEGIN_ODD+320*10+80,y
282 sta SCREEN_BEGIN_ODD+320*10+160,y
283
284 ldx $9c00+40*11,y
285 lda _TabColors,x
286 sta SCREEN_BEGIN_ODD+320*11+0,y
287 sta SCREEN_BEGIN_ODD+320*11+240,y
288 lda _TabColors1,x
289 sta SCREEN_BEGIN_ODD+320*11+80,y
290 sta SCREEN_BEGIN_ODD+320*11+160,y
291
292 ldx $9c00+40*12,y
293 lda _TabColors,x
294 sta SCREEN_BEGIN_ODD+320*12+0,y
295 sta SCREEN_BEGIN_ODD+320*12+240,y
296 lda _TabColors1,x
297 sta SCREEN_BEGIN_ODD+320*12+80,y
298 sta SCREEN_BEGIN_ODD+320*12+160,y
299
300 ldx $9c00+40*13,y
301 lda _TabColors,x
302 sta SCREEN_BEGIN_ODD+320*13+0,y
303 sta SCREEN_BEGIN_ODD+320*13+240,y
304 lda _TabColors1,x
305 sta SCREEN_BEGIN_ODD+320*13+80,y
306 sta SCREEN_BEGIN_ODD+320*13+160,y
307
308 ldx $9c00+40*14,y
309 lda _TabColors,x
310 sta SCREEN_BEGIN_ODD+320*14+0,y
311 sta SCREEN_BEGIN_ODD+320*14+240,y
312 lda _TabColors1,x
313 sta SCREEN_BEGIN_ODD+320*14+80,y
314 sta SCREEN_BEGIN_ODD+320*14+160,y
315
316 ldx $9c00+40*15,y
317 lda _TabColors,x
318 sta SCREEN_BEGIN_ODD+320*15+0,y
319 sta SCREEN_BEGIN_ODD+320*15+240,y
320 lda _TabColors1,x
321 sta SCREEN_BEGIN_ODD+320*15+80,y
322 sta SCREEN_BEGIN_ODD+320*15+160,y
323
324 ldx $9c00+40*16,y
325 lda _TabColors,x
326 sta SCREEN_BEGIN_ODD+320*16+0,y
327 sta SCREEN_BEGIN_ODD+320*16+240,y
328 lda _TabColors1,x
329 sta SCREEN_BEGIN_ODD+320*16+80,y
330 sta SCREEN_BEGIN_ODD+320*16+160,y
331
332 ldx $9c00+40*17,y
333 lda _TabColors,x
334 sta SCREEN_BEGIN_ODD+320*17+0,y
335 sta SCREEN_BEGIN_ODD+320*17+240,y
336 lda _TabColors1,x
337 sta SCREEN_BEGIN_ODD+320*17+80,y
338 sta SCREEN_BEGIN_ODD+320*17+160,y
339
340 ldx $9c00+40*18,y
341 lda _TabColors,x
342 sta SCREEN_BEGIN_ODD+320*18+0,y
343 sta SCREEN_BEGIN_ODD+320*18+240,y
344 lda _TabColors1,x
345 sta SCREEN_BEGIN_ODD+320*18+80,y
346 sta SCREEN_BEGIN_ODD+320*18+160,y
347
348 ldx $9c00+40*19,y
349 lda _TabColors,x
350 sta SCREEN_BEGIN_ODD+320*19+0,y
351 sta SCREEN_BEGIN_ODD+320*19+240,y
352 lda _TabColors1,x
353 sta SCREEN_BEGIN_ODD+320*19+80,y
354 sta SCREEN_BEGIN_ODD+320*19+160,y
355
356
357 ldx $9c00+40*20,y
358 lda _TabColors,x
359 sta SCREEN_BEGIN_ODD+320*20+0,y
360 sta SCREEN_BEGIN_ODD+320*20+240,y
361 lda _TabColors1,x
362 sta SCREEN_BEGIN_ODD+320*20+80,y
363 sta SCREEN_BEGIN_ODD+320*20+160,y
364
365 ldx $9c00+40*21,y
366 lda _TabColors,x
367 sta SCREEN_BEGIN_ODD+320*21+0,y
368 sta SCREEN_BEGIN_ODD+320*21+240,y
369 lda _TabColors1,x
370 sta SCREEN_BEGIN_ODD+320*21+80,y
371 sta SCREEN_BEGIN_ODD+320*21+160,y
372
373 ldx $9c00+40*22,y
374 lda _TabColors,x
375 sta SCREEN_BEGIN_ODD+320*22+0,y
376 sta SCREEN_BEGIN_ODD+320*22+240,y
377 lda _TabColors1,x
378 sta SCREEN_BEGIN_ODD+320*22+80,y
379 sta SCREEN_BEGIN_ODD+320*22+160,y
380
381 ldx $9c00+40*23,y
382 lda _TabColors,x
383 sta SCREEN_BEGIN_ODD+320*23+0,y
384 sta SCREEN_BEGIN_ODD+320*23+240,y
385 lda _TabColors1,x
386 sta SCREEN_BEGIN_ODD+320*23+80,y
387 sta SCREEN_BEGIN_ODD+320*23+160,y
388
389
390 iny
391 cpy _DisplayColumn
392 beq FrameDisplayOddLoopXEnd
393 jmp FrameDisplayOddLoopX
394
395
396 FrameDisplayOddLoopXEnd
397
398 lda #<$a000+40*8
399 sta tmp0
400 lda #>$a000+40*8
401 sta tmp0+1
402
403 ldy #0
404 ldx #96
405 FrameDisplayOddLoopColors
406 lda #2
407 ldy #0
408 sta (tmp0),y
409 lda #1
410 ldy #40
411 sta (tmp0),y
412
413 clc
414 lda tmp0
415 adc #80
416 sta tmp0
417 bcc skipoddcolor
418 inc tmp0+1
419 skipoddcolor
420
421 dex
422 bne FrameDisplayOddLoopColors
423
424
425 ldx _DisplayColumn
426 cpx #39
427 beq FrameDisplayNotFillLastColumns
428 jmp FrameDisplayFillLastColumns
429 FrameDisplayNotFillLastColumns
430 rts
431
432
433
434 FrameDisplayEven
435 lda #0
436 sta _FrameFlip
437
438 ldy #0
439 FrameDisplayEvenLoopX
440 ldx $9c00+40*0,y
441 lda _TabColors,x
442 sta SCREEN_BEGIN_EVEN+320*0+0,y
443 sta SCREEN_BEGIN_EVEN+320*0+240,y
444 lda _TabColors1,x
445 sta SCREEN_BEGIN_EVEN+320*0+80,y
446 sta SCREEN_BEGIN_EVEN+320*0+160,y
447
448 ldx $9c00+40*1,y
449 lda _TabColors,x
450 sta SCREEN_BEGIN_EVEN+320*1+0,y
451 sta SCREEN_BEGIN_EVEN+320*1+240,y
452 lda _TabColors1,x
453 sta SCREEN_BEGIN_EVEN+320*1+80,y
454 sta SCREEN_BEGIN_EVEN+320*1+160,y
455
456 ldx $9c00+40*2,y
457 lda _TabColors,x
458 sta SCREEN_BEGIN_EVEN+320*2+0,y
459 sta SCREEN_BEGIN_EVEN+320*2+240,y
460 lda _TabColors1,x
461 sta SCREEN_BEGIN_EVEN+320*2+80,y
462 sta SCREEN_BEGIN_EVEN+320*2+160,y
463
464 ldx $9c00+40*3,y
465 lda _TabColors,x
466 sta SCREEN_BEGIN_EVEN+320*3+0,y
467 sta SCREEN_BEGIN_EVEN+320*3+240,y
468 lda _TabColors1,x
469 sta SCREEN_BEGIN_EVEN+320*3+80,y
470 sta SCREEN_BEGIN_EVEN+320*3+160,y
471
472 ldx $9c00+40*4,y
473 lda _TabColors,x
474 sta SCREEN_BEGIN_EVEN+320*4+0,y
475 sta SCREEN_BEGIN_EVEN+320*4+240,y
476 lda _TabColors1,x
477 sta SCREEN_BEGIN_EVEN+320*4+80,y
478 sta SCREEN_BEGIN_EVEN+320*4+160,y
479
480 ldx $9c00+40*5,y
481 lda _TabColors,x
482 sta SCREEN_BEGIN_EVEN+320*5+0,y
483 sta SCREEN_BEGIN_EVEN+320*5+240,y
484 lda _TabColors1,x
485 sta SCREEN_BEGIN_EVEN+320*5+80,y
486 sta SCREEN_BEGIN_EVEN+320*5+160,y
487
488 ldx $9c00+40*6,y
489 lda _TabColors,x
490 sta SCREEN_BEGIN_EVEN+320*6+0,y
491 sta SCREEN_BEGIN_EVEN+320*6+240,y
492 lda _TabColors1,x
493 sta SCREEN_BEGIN_EVEN+320*6+80,y
494 sta SCREEN_BEGIN_EVEN+320*6+160,y
495
496 ldx $9c00+40*7,y
497 lda _TabColors,x
498 sta SCREEN_BEGIN_EVEN+320*7+0,y
499 sta SCREEN_BEGIN_EVEN+320*7+240,y
500 lda _TabColors1,x
501 sta SCREEN_BEGIN_EVEN+320*7+80,y
502 sta SCREEN_BEGIN_EVEN+320*7+160,y
503
504 ldx $9c00+40*8,y
505 lda _TabColors,x
506 sta SCREEN_BEGIN_EVEN+320*8+0,y
507 sta SCREEN_BEGIN_EVEN+320*8+240,y
508 lda _TabColors1,x
509 sta SCREEN_BEGIN_EVEN+320*8+80,y
510 sta SCREEN_BEGIN_EVEN+320*8+160,y
511
512 ldx $9c00+40*9,y
513 lda _TabColors,x
514 sta SCREEN_BEGIN_EVEN+320*9+0,y
515 sta SCREEN_BEGIN_EVEN+320*9+240,y
516 lda _TabColors1,x
517 sta SCREEN_BEGIN_EVEN+320*9+80,y
518 sta SCREEN_BEGIN_EVEN+320*9+160,y
519
520
521 ldx $9c00+40*10,y
522 lda _TabColors,x
523 sta SCREEN_BEGIN_EVEN+320*10+0,y
524 sta SCREEN_BEGIN_EVEN+320*10+240,y
525 lda _TabColors1,x
526 sta SCREEN_BEGIN_EVEN+320*10+80,y
527 sta SCREEN_BEGIN_EVEN+320*10+160,y
528
529 ldx $9c00+40*11,y
530 lda _TabColors,x
531 sta SCREEN_BEGIN_EVEN+320*11+0,y
532 sta SCREEN_BEGIN_EVEN+320*11+240,y
533 lda _TabColors1,x
534 sta SCREEN_BEGIN_EVEN+320*11+80,y
535 sta SCREEN_BEGIN_EVEN+320*11+160,y
536
537 ldx $9c00+40*12,y
538 lda _TabColors,x
539 sta SCREEN_BEGIN_EVEN+320*12+0,y
540 sta SCREEN_BEGIN_EVEN+320*12+240,y
541 lda _TabColors1,x
542 sta SCREEN_BEGIN_EVEN+320*12+80,y
543 sta SCREEN_BEGIN_EVEN+320*12+160,y
544
545 ldx $9c00+40*13,y
546 lda _TabColors,x
547 sta SCREEN_BEGIN_EVEN+320*13+0,y
548 sta SCREEN_BEGIN_EVEN+320*13+240,y
549 lda _TabColors1,x
550 sta SCREEN_BEGIN_EVEN+320*13+80,y
551 sta SCREEN_BEGIN_EVEN+320*13+160,y
552
553 ldx $9c00+40*14,y
554 lda _TabColors,x
555 sta SCREEN_BEGIN_EVEN+320*14+0,y
556 sta SCREEN_BEGIN_EVEN+320*14+240,y
557 lda _TabColors1,x
558 sta SCREEN_BEGIN_EVEN+320*14+80,y
559 sta SCREEN_BEGIN_EVEN+320*14+160,y
560
561 ldx $9c00+40*15,y
562 lda _TabColors,x
563 sta SCREEN_BEGIN_EVEN+320*15+0,y
564 sta SCREEN_BEGIN_EVEN+320*15+240,y
565 lda _TabColors1,x
566 sta SCREEN_BEGIN_EVEN+320*15+80,y
567 sta SCREEN_BEGIN_EVEN+320*15+160,y
568
569 ldx $9c00+40*16,y
570 lda _TabColors,x
571 sta SCREEN_BEGIN_EVEN+320*16+0,y
572 sta SCREEN_BEGIN_EVEN+320*16+240,y
573 lda _TabColors1,x
574 sta SCREEN_BEGIN_EVEN+320*16+80,y
575 sta SCREEN_BEGIN_EVEN+320*16+160,y
576
577 ldx $9c00+40*17,y
578 lda _TabColors,x
579 sta SCREEN_BEGIN_EVEN+320*17+0,y
580 sta SCREEN_BEGIN_EVEN+320*17+240,y
581 lda _TabColors1,x
582 sta SCREEN_BEGIN_EVEN+320*17+80,y
583 sta SCREEN_BEGIN_EVEN+320*17+160,y
584
585 ldx $9c00+40*18,y
586 lda _TabColors,x
587 sta SCREEN_BEGIN_EVEN+320*18+0,y
588 sta SCREEN_BEGIN_EVEN+320*18+240,y
589 lda _TabColors1,x
590 sta SCREEN_BEGIN_EVEN+320*18+80,y
591 sta SCREEN_BEGIN_EVEN+320*18+160,y
592
593 ldx $9c00+40*19,y
594 lda _TabColors,x
595 sta SCREEN_BEGIN_EVEN+320*19+0,y
596 sta SCREEN_BEGIN_EVEN+320*19+240,y
597 lda _TabColors1,x
598 sta SCREEN_BEGIN_EVEN+320*19+80,y
599 sta SCREEN_BEGIN_EVEN+320*19+160,y
600
601
602 ldx $9c00+40*20,y
603 lda _TabColors,x
604 sta SCREEN_BEGIN_EVEN+320*20+0,y
605 sta SCREEN_BEGIN_EVEN+320*20+240,y
606 lda _TabColors1,x
607 sta SCREEN_BEGIN_EVEN+320*20+80,y
608 sta SCREEN_BEGIN_EVEN+320*20+160,y
609
610 ldx $9c00+40*21,y
611 lda _TabColors,x
612 sta SCREEN_BEGIN_EVEN+320*21+0,y
613 sta SCREEN_BEGIN_EVEN+320*21+240,y
614 lda _TabColors1,x
615 sta SCREEN_BEGIN_EVEN+320*21+80,y
616 sta SCREEN_BEGIN_EVEN+320*21+160,y
617
618 ldx $9c00+40*22,y
619 lda _TabColors,x
620 sta SCREEN_BEGIN_EVEN+320*22+0,y
621 sta SCREEN_BEGIN_EVEN+320*22+240,y
622 lda _TabColors1,x
623 sta SCREEN_BEGIN_EVEN+320*22+80,y
624 sta SCREEN_BEGIN_EVEN+320*22+160,y
625
626 ldx $9c00+40*23,y
627 lda _TabColors,x
628 sta SCREEN_BEGIN_EVEN+320*23+0,y
629 sta SCREEN_BEGIN_EVEN+320*23+240,y
630 lda _TabColors1,x
631 sta SCREEN_BEGIN_EVEN+320*23+80,y
632 sta SCREEN_BEGIN_EVEN+320*23+160,y
633
634
635 iny
636 cpy _DisplayColumn
637 beq FrameDisplayEvenLoopXEnd
638 jmp FrameDisplayEvenLoopX
639
640 FrameDisplayEvenLoopXEnd
641 lda #<$a000+40*8
642 sta tmp0
643 lda #>$a000+40*8
644 sta tmp0+1
645
646 ldy #0
647 ldx #96
648 FrameDisplayEvenLoopColors
649 lda #1
650 ldy #0
651 sta (tmp0),y
652 lda #2
653 ldy #40
654 sta (tmp0),y
655
656 clc
657 lda tmp0
658 adc #80
659 sta tmp0
660 bcc skipevencolor
661 inc tmp0+1
662 skipevencolor
663
664 dex
665 bne FrameDisplayEvenLoopColors
666
667 ldx _DisplayColumn
668 cpx #39
669 bne FrameDisplayFillLastColumns
670 rts
671
672
673
674 FrameDisplayFillLastColumns
675 lda #<$a000+40*8+1
676 sta tmp0
677 lda #>$a000+40*8+1
678 sta tmp0+1
679
680 ldy _DisplayColumn
681 ldx #192
682 FrameDisplayFillLastColumnsLoop
683 lda #16 ; 63+1+4+16
684 sta (tmp0),y
685
686 clc
687 lda tmp0
688 adc #40
689 sta tmp0
690 bcc skipfillcolor
691 inc tmp0+1
692 skipfillcolor
693
694 dex
695 bne FrameDisplayFillLastColumnsLoop
696 rts
697
698
699 _DisplayClearScreen
700 ldx #192
701
702 lda #<$a000+40*8
703 sta tmp0
704 lda #>$a000+40*8
705 sta tmp0+1
706
707 ldx #192
708 DisplayClearScreenLoopY
709
710 ldy #0
711 lda #16 ; Black paper
712 sta (tmp0),y
713 iny
714 lda #0 ; Black ink
715 sta (tmp0),y
716 iny
717 lda #64
718 DisplayClearScreenLoopX
719 sta (tmp0),y
720 iny
721 cpy #40
722 bne DisplayClearScreenLoopX
723
724 clc
725 lda tmp0
726 adc #40
727 sta tmp0
728 bcc skipclearcolor
729 inc tmp0+1
730 skipclearcolor
731
732 dex
733 bne DisplayClearScreenLoopY
734
735 rts
736
737
738
739 ;memcpy((unsigned char*)0xa000+40*8,(unsigned char*)0xdc00,40*192);
740
741
742
743 _DisplayEmptyScreen
744 ;jmp _DisplayEmptyScreen
745 ldx #192
746
747 lda #<$a000+40*8
748 sta tmp0
749 lda #>$a000+40*8
750 sta tmp0+1
751
752 ldx #192
753 DisplayEmptyScreenLoopY
754
755 ldy #2
756 DisplayEmptyScreenLoopX
757 lda #64
758 sta (tmp0),y
759 iny
760 cpy #40
761 bne DisplayEmptyScreenLoopX
762
763 clc
764 lda tmp0
765 adc #40
766 sta tmp0
767 bcc skipdisplayempty
768 inc tmp0+1
769 skipdisplayempty
770
771 dex
772 bne DisplayEmptyScreenLoopY
773 rts
774
775
776
777
778 _DisplayFighter
779 ldx #192
780
781 lda #<$dc00
782 sta tmp0
783 lda #>$dc00
784 sta tmp0+1
785
786
787 lda #<$a000+40*8
788 sta tmp1
789 lda #>$a000+40*8
790 sta tmp1+1
791
792 ldx #192
793 DisplayFighterFlipLoopY
794
795 ldy #2
796 DisplayFighterFlipLoopX
797 lda (tmp0),y
798 eor #63
799 sta (tmp1),y
800 iny
801 cpy #40
802 bne DisplayFighterFlipLoopX
803
804 clc
805 lda tmp0
806 adc #40
807 sta tmp0
808 bcc skipdisplayfighter1
809 inc tmp0+1
810 skipdisplayfighter1
811
812 clc
813 lda tmp1
814 adc #40
815 sta tmp1
816 bcc skipdisplayfighter2
817 inc tmp1+1
818 skipdisplayfighter2
819
820 dex
821 bne DisplayFighterFlipLoopY
822
823
824 rts
825
826
827
828

  ViewVC Help
Powered by ViewVC 1.1.26