/[projet1]/public/atari/tools/rembrandt/DIVERS/CONVERT2.S
Defence Force logotype

Contents of /public/atari/tools/rembrandt/DIVERS/CONVERT2.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations)
Sat Apr 25 18:10:46 2009 UTC (10 years, 7 months ago) by dbug
File size: 1183 byte(s)
Added Rembrandt and Forgotten Bits
1 *
2 *
3 * Petite routine … la con destin‚e a convertir une image
4 * DEGAS en image TRUE COLOR
5 *
6 *
7 deb
8 opt o+,p+
9
10 image_degas dc.l "Dbug"
11 buffer dc.l "NeXT"
12
13 ;
14 ; Avant tout, on commence par triturer la palette pour qu'elle soit plus
15 ; rapide … valider.
16 ;
17 movem.l d0-a6,-(sp)
18 move.l image_degas(pc),a0
19 addq #2,a0
20 moveq #16-1,d7
21 convert_palette
22 move (a0),d0
23
24 move d0,d1
25 and #15,d1
26
27 lsr #4,d0
28 move d0,d2
29 and #15,d2
30
31 lsr #4,d0
32 move d0,d3
33 and #15,d3
34
35 move d3,d4
36 lsl #5,d4
37 or d2,d4
38 lsl #6,d4
39 or d1,d4
40 lsl #2,d4
41 move d4,(a0)+
42 dbra d7,convert_palette
43
44 ;
45 ; Maintenant, on s'occupe de l'image.
46 ;
47
48 move.l image_degas(pc),a0 La palette
49 addq #2,a0
50 lea 32(a0),a1 L'image … convertir
51 move.l buffer(pc),a2 Le buffer pour stocker l'image
52 lea 32(a2),a2
53
54 move #4000-1,d7
55 convert_image
56 movem (a1)+,d0-d3
57 moveq #16-1,d6
58 convert_bloc
59 moveq #0,d4
60 roxr d3
61 roxl d4
62 roxr d2
63 roxl d4
64 roxr d1
65 roxl d4
66 roxr d0
67 roxl d4
68 move (a0,d4*2),-(a2)
69 dbra d6,convert_bloc
70 lea 64(a2),a2
71 dbra d7,convert_image
72 movem.l (sp)+,d0-a6
73 rts
74
75 nop
76 nop
77 nop
78 nop
79 nop
80 nop
81 nop
82 nop
83 nop
84 nop
85
86 fin

  ViewVC Help
Powered by ViewVC 1.1.26