/[projet1]/public/oric/games/Space 1999/Sources/trailer/draw_df_logo.s
Defence Force logotype

Contents of /public/oric/games/Space 1999/Sources/trailer/draw_df_logo.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 365 - (show annotations)
Mon Jul 19 10:58:27 2010 UTC (9 years ago) by dbug
File size: 7348 byte(s)
Added the Space:1999 Trailer to the repository.

1
2
3
4 #define ADDR_LOGO $a000+40*60
5 #define ADDR_LOGO_LETTERS $a000+40*71+5
6
7
8 TempX .byt 0
9 TempY .byt 0
10 TempOffset .byt 0
11 TempColor .byt 0
12
13 DiplayAngle1 .byt 0
14 DiplayAngle2 .byt 0
15 DisplayPosX .byt 0
16 DisplayMemoX .byt 0
17
18 OldByte .byt 0
19 blablabla .byt 0
20
21
22 DisplayParamBlackFrameTop
23 .byt 10 ; Count
24 .byt 2 ,64+1+2 ; Black pixels
25 .byt 2+40,64+1+2 ; Black pixels
26 .byt 3 ,16+0 ; Black paper
27 .byt 3+40,16+0 ; Black paper
28 .byt 36 ,0 ; Black ink
29 .byt 36+40 ,0 ; Black ink
30 .byt 37 ,64+1+2 ; Black pixels
31 .byt 37+40,64+1+2 ; Black pixels
32 .byt 38 ,16+7 ; White paper
33 .byt 38+40,16+7 ; White paper
34
35 DisplayParamBlueFrame
36 .byt 12
37 .byt 2 ,64+1+2 ; Black pixels
38 .byt 2+40 ,64+1+2 ; Black pixels
39 .byt 3 ,16+4 ; Blue paper
40 .byt 3+40 ,16+6 ; Cyan paper
41 .byt 4 ,3 ; Yellow ink
42 .byt 4+40 ,1 ; Red ink
43 .byt 36 ,0 ; Black ink
44 .byt 36+40 ,0 ; Black ink
45 .byt 37 ,64+1+2 ; Black pixels
46 .byt 37+40,64+1+2 ; Black pixels
47 .byt 38 ,16+7 ; White paper
48 .byt 38+40,16+7 ; White paper
49
50 DisplayParamBlueFrameShadow
51 .byt 14
52 .byt 2 ,64+1+2 ; Black pixels
53 .byt 2+40 ,64+1+2 ; Black pixels
54 .byt 3 ,16+4 ; Blue paper
55 .byt 3+40 ,16+6 ; Cyan paper
56 .byt 4 ,3 ; Yellow ink
57 .byt 4+40 ,1 ; Red ink
58 .byt 36 ,0 ; Black ink
59 .byt 36+40 ,0 ; Black ink
60 .byt 37 ,64+1+2 ; Black pixels
61 .byt 37+40,64+1+2 ; Black pixels
62 .byt 38 ,16+0 ; Black paper
63 .byt 38+40,16+0 ; Black paper
64 .byt 39 ,16+7 ; White paper
65 .byt 39+40,16+7 ; White paper
66
67 DisplayParamBlackFrameBottom
68 .byt 12 ; Count
69 .byt 2 ,64+1+2 ; Black pixels
70 .byt 2+40,64+1+2 ; Black pixels
71 .byt 3 ,16+0 ; Black paper
72 .byt 3+40,16+0 ; Black paper
73 .byt 36 ,0 ; Black ink
74 .byt 36+40 ,0 ; Black ink
75 .byt 37 ,64+1+2 ; Black pixels
76 .byt 37+40,64+1+2 ; Black pixels
77 .byt 38 ,16+0 ; Black paper
78 .byt 38+40,16+0 ; Black paper
79 .byt 39 ,16+7 ; White paper
80 .byt 39+40,16+7 ; White paper
81
82 DisplayParamBlackFrameBottomShadow
83 .byt 6 ; Count
84 .byt 4 ,16+0 ; Black paper
85 .byt 4+40,16+0 ; Black paper
86 .byt 38 ,16+0 ; Black paper
87 .byt 38+40,16+0 ; Black paper
88 .byt 39 ,16+7 ; White paper
89 .byt 39+40,16+7 ; White paper
90
91
92
93 DisplayNextLine
94 clc
95 lda tmp1
96 adc #80
97 sta tmp1
98 bcc skip_display_rasters
99 inc tmp1+1
100 skip_display_rasters
101 rts
102
103
104
105 DisplayScanLine
106 stx TempX
107
108 LoopDisplayScanLineOuter
109 ldy #0
110 lda (tmp0),y
111 iny
112 tax
113
114 LoopDisplayScanLine
115 lda (tmp0),y // Get offset
116 sta TempOffset
117 iny
118 lda (tmp0),y // Get color
119 sta TempColor
120 iny
121 sty TempY
122
123 ldy TempOffset
124 lda TempColor
125 sta (tmp1),y
126
127 ldy TempY
128
129 dex
130 bne LoopDisplayScanLine
131
132 jsr DisplayNextLine
133
134 dec TempX
135 bne LoopDisplayScanLineOuter
136
137 rts
138
139
140
141 _DisplayDefenceForceFrame
142 lda #<ADDR_LOGO
143 sta tmp1+0
144 lda #>ADDR_LOGO
145 sta tmp1+1
146
147 ;
148 lda #<DisplayParamBlackFrameTop
149 sta tmp0+0
150 lda #>DisplayParamBlackFrameTop
151 sta tmp0+1
152
153 ldx #1
154 jsr DisplayScanLine
155
156 ;
157 lda #<DisplayParamBlueFrame
158 sta tmp0+0
159 lda #>DisplayParamBlueFrame
160 sta tmp0+1
161
162 ldx #3
163 jsr DisplayScanLine
164
165 ;
166 lda #<DisplayParamBlueFrameShadow
167 sta tmp0+0
168 lda #>DisplayParamBlueFrameShadow
169 sta tmp0+1
170
171 ldx #40
172 jsr DisplayScanLine
173
174 ;
175 lda #<DisplayParamBlackFrameBottom
176 sta tmp0+0
177 lda #>DisplayParamBlackFrameBottom
178 sta tmp0+1
179
180 ldx #1
181 jsr DisplayScanLine
182
183 ;
184 lda #<DisplayParamBlackFrameBottomShadow
185 sta tmp0+0
186 lda #>DisplayParamBlackFrameBottomShadow
187 sta tmp0+1
188
189 ldx #3
190 jsr DisplayScanLine
191
192 rts
193
194
195
196
197
198
199 DisplayMakeShiftedLogo
200 ldx #67
201 LoopDisplayMakeShiftedLogo_Y
202
203 lda #0
204 sta OldByte
205 ldy #0
206 LoopDisplayMakeShiftedLogo_X
207 lda (tmp0),y
208 sta blablabla
209 ;pha
210 and #63
211 lsr
212 ora OldByte
213 ora #64
214 sta (tmp1),y
215
216 lda blablabla
217 ;pla
218 and #1
219 asl
220 asl
221 asl
222 asl
223 asl
224 sta OldByte
225
226 iny
227 cpy #30
228 bne LoopDisplayMakeShiftedLogo_X
229
230 clc
231 lda tmp0
232 adc #30
233 sta tmp0
234 bcc skip_src
235 inc tmp0+1
236 clc
237 skip_src
238
239 lda tmp1
240 adc #30
241 sta tmp1
242 bcc skip_dst
243 inc tmp1+1
244 skip_dst
245
246 dex
247 bne LoopDisplayMakeShiftedLogo_Y
248 rts
249
250
251 _DisplayMakeShiftedLogos
252 ; 0
253 lda #<_BufferUnpack
254 sta tmp0
255 lda #>_BufferUnpack
256 sta tmp0+1
257 lda #<_LabelPicture1
258 sta tmp1
259 lda #>_LabelPicture1
260 sta tmp1+1
261 jsr DisplayMakeShiftedLogo
262
263 ; 1
264 lda #<_LabelPicture1
265 sta tmp0
266 lda #>_LabelPicture1
267 sta tmp0+1
268 lda #<_LabelPicture2
269 sta tmp1
270 lda #>_LabelPicture2
271 sta tmp1+1
272 jsr DisplayMakeShiftedLogo
273
274 ; 2
275 lda #<_LabelPicture2
276 sta tmp0
277 lda #>_LabelPicture2
278 sta tmp0+1
279 lda #<_LabelPicture3
280 sta tmp1
281 lda #>_LabelPicture3
282 sta tmp1+1
283 jsr DisplayMakeShiftedLogo
284
285 ; 3
286 lda #<_LabelPicture3
287 sta tmp0
288 lda #>_LabelPicture3
289 sta tmp0+1
290 lda #<_LabelPicture4
291 sta tmp1
292 lda #>_LabelPicture4
293 sta tmp1+1
294 jsr DisplayMakeShiftedLogo
295
296 ; 4
297 lda #<_LabelPicture4
298 sta tmp0
299 lda #>_LabelPicture4
300 sta tmp0+1
301 lda #<_LabelPicture5
302 sta tmp1
303 lda #>_LabelPicture5
304 sta tmp1+1
305 jsr DisplayMakeShiftedLogo
306 rts
307
308
309 DisplayTableLogoLow
310 .byt <_BufferUnpack
311 .byt <_LabelPicture1
312 .byt <_LabelPicture2
313 .byt <_LabelPicture3
314 .byt <_LabelPicture4
315 .byt <_LabelPicture5
316
317 DisplayTableLogoHigh
318 .byt >_BufferUnpack
319 .byt >_LabelPicture1
320 .byt >_LabelPicture2
321 .byt >_LabelPicture3
322 .byt >_LabelPicture4
323 .byt >_LabelPicture5
324
325
326
327 _DisplayScrappIt
328 clc
329 lda DiplayAngle1
330 sta tmp4
331 adc #2
332 sta DiplayAngle1
333
334 clc
335 lda DiplayAngle2
336 sta reg1
337 adc #5
338 sta DiplayAngle2
339
340 ; Offset source
341 lda #<0
342 sta tmp0
343 lda #>0
344 sta tmp0+1
345
346 ; Screen address
347 lda #<ADDR_LOGO_LETTERS
348 sta tmp1
349 lda #>ADDR_LOGO_LETTERS
350 sta tmp1+1
351
352 ldx #67
353 LoopDisplayScrappItY
354 stx DisplayMemoX
355
356 ; pos_x=(int)CosTable[angle_1];
357 ; pos_x+=(int)CosTable[angle_2];
358 ; pos_x=(pos_x*12)/(256*2);
359 clc
360 ldx tmp4
361 lda _CosTable,x
362 ldx reg1
363 adc _CosTable,x
364 tax
365
366 ; Increment angles
367 inc tmp4
368
369 clc
370 lda reg1
371 adc #5
372 sta reg1
373
374 ; Compute src adress
375 lda _TableMod6,x
376 tay
377 clc
378 lda DisplayTableLogoLow,y
379 adc tmp0
380 sta tmp2
381 lda DisplayTableLogoHigh,y
382 adc tmp0+1
383 sta tmp2+1
384
385
386 ; Compute dst adress
387 clc
388 lda _TableDiv6,x
389 adc tmp1
390 sta tmp3
391 lda tmp1+1
392 adc #0
393 sta tmp3+1
394
395 ldy #0
396 LoopDisplayScrappItX
397 lda (tmp2),y
398 sta (tmp3),y
399 iny
400
401 lda (tmp2),y
402 sta (tmp3),y
403 iny
404
405 lda (tmp2),y
406 sta (tmp3),y
407 iny
408
409 lda (tmp2),y
410 sta (tmp3),y
411 iny
412
413 lda (tmp2),y
414 sta (tmp3),y
415 iny
416
417 lda (tmp2),y
418 sta (tmp3),y
419 iny
420
421 lda (tmp2),y
422 sta (tmp3),y
423 iny
424
425 lda (tmp2),y
426 sta (tmp3),y
427 iny
428
429 lda (tmp2),y
430 sta (tmp3),y
431 iny
432
433 lda (tmp2),y
434 sta (tmp3),y
435 iny
436
437 cpy #30
438 bne LoopDisplayScrappItX
439
440 clc
441 lda tmp0
442 adc #30
443 sta tmp0
444 bcc display_skip_src
445 inc tmp0+1
446 clc
447 display_skip_src
448
449 lda tmp1
450 adc #40
451 sta tmp1
452 bcc display_skip_dst
453 inc tmp1+1
454 display_skip_dst
455
456 ldx DisplayMemoX
457
458 dex
459 beq DisplayScrappItYEnd
460 jmp LoopDisplayScrappItY
461
462 DisplayScrappItYEnd
463 rts
464
465
466 _DisplayPaperSet
467 lda #$00
468 sta tmp0
469 lda #$a0
470 sta tmp0+1
471
472 ldx #200
473 LoopDisplayPaperSet
474 ldy #0
475 lda #16+7
476 sta (tmp0),y
477 iny
478 lda #0
479 sta (tmp0),y
480
481 lda tmp0
482 clc
483 adc #40
484 sta tmp0
485 bcc skipbla
486 inc tmp0+1
487 skipbla
488
489 dex
490 bne LoopDisplayPaperSet
491 rts
492
493
494
495
496
497
498
499
500

  ViewVC Help
Powered by ViewVC 1.1.26