FreeCalypso > hg > tcs211-pirelli
comparison chipsetsw/drivers/drv_app/r2d/lcds/ColorBoard/r2d_board_color_lcd_ia.s @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 | |
2 | |
3 | |
4 | |
5 | |
6 .state32 | |
7 | |
8 .sect ".r2dlcd" | |
9 | |
10 | |
11 .include "r2d_asm_configs.inc" | |
12 .include "r2d_asm_utils.inc" | |
13 .include "r2d_asm_patch_utils.inc" | |
14 | |
15 | |
16 .if (R2D_ASM = R2D_ON) | |
17 | |
18 | |
19 .ref _r2d_lcd_alpha_operator | |
20 .ref _r2d_lcd_foreground_pixel | |
21 .ref _r2d_lcd_to_color | |
22 .ref _r2d_color_to_lcd | |
23 | |
24 .def _r2d_ialpha_op | |
25 .def _r2d_iforeground_pixel_test | |
26 | |
27 .def _r2d_icolor_to_lcd | |
28 .def _r2d_ilcd_to_color | |
29 | |
30 | |
31 .global _r2d_lcd_start_copy | |
32 .global _r2d_lcd_start_or | |
33 .global _r2d_lcd_start_and | |
34 .global _r2d_lcd_start_xor | |
35 .global _r2d_lcd_start_notcopy | |
36 .global _r2d_lcd_start_notor | |
37 .global _r2d_lcd_start_notand | |
38 .global _r2d_lcd_start_notxor | |
39 .global _r2d_lcd_start_erase | |
40 .global _r2d_lcd_start_alpha | |
41 .global _r2d_lcd_start_foreground_pixel | |
42 .global _r2d_start_get_color | |
43 .global _r2d_start_color_to_lcd | |
44 .global _r2d_start_lcd_to_color | |
45 | |
46 _r2d_lcd_start_copy: | |
47 MOV calca,calca | |
48 MOV calcb,calca | |
49 MOV calcb,calcb | |
50 _r2d_lcd_end_copy | |
51 | |
52 _r2d_lcd_start_or: | |
53 MOVS calca,calca,LSL #24 | |
54 MOVNEQ calcb,calca,LSR #24 | |
55 NOP | |
56 ;MOV calca,calca | |
57 ;ORR calcb,calcb,calca | |
58 ;MOV calcb,calcb | |
59 _r2d_lcd_end_or | |
60 | |
61 _r2d_lcd_start_and: | |
62 MOV calca,calca | |
63 AND calcb,calcb,calca | |
64 MOV calcb,calcb | |
65 _r2d_lcd_end_and | |
66 | |
67 _r2d_lcd_start_xor: | |
68 MOV calca,calca | |
69 EOR calcb,calcb,calca | |
70 MOV calcb,calcb | |
71 _r2d_lcd_end_xor | |
72 | |
73 _r2d_lcd_start_notcopy: | |
74 MOV calca,calca | |
75 MVN calcb,calca | |
76 MOV calcb,calcb | |
77 _r2d_lcd_end_notcopy | |
78 | |
79 _r2d_lcd_start_notor: | |
80 MOV calca,calca | |
81 ORR calcb,calcb,calca | |
82 MVN calcb,calcb | |
83 _r2d_lcd_end_notor | |
84 | |
85 _r2d_lcd_start_notand: | |
86 MOV calca,calca | |
87 AND calcb,calcb,calca | |
88 MVN calcb,calcb | |
89 _r2d_lcd_end_notand | |
90 | |
91 _r2d_lcd_start_notxor: | |
92 MOV calca,calca | |
93 EOR calcb,calcb,calca | |
94 MVN calcb,calcb | |
95 _r2d_lcd_end_notxor | |
96 | |
97 _r2d_lcd_start_erase: | |
98 MOVS calca,calca,LSL #24 | |
99 MOVNEQ calcb,#0 | |
100 NOP | |
101 _r2d_lcd_end_erase | |
102 | |
103 _r2d_lcd_start_alpha | |
104 ; Identifying code telling the patcher that a special | |
105 ; construct required to branch to a C function is used | |
106 .long BRANCH_ID | |
107 ; The absolute address of the C function which is going to be | |
108 ; converted to a PC relative offset by the patcher | |
109 .long _r2d_ialpha_op | |
110 _r2d_lcd_stop_alpha | |
111 | |
112 _r2d_lcd_start_foreground_pixel | |
113 ; Identifying code telling the patcher that a special | |
114 ; construct required to branch to a C function is used | |
115 .long BRANCH_ID | |
116 ; The absolute address of the C function which is going to be | |
117 ; converted to a PC relative offset by the patcher | |
118 .long _r2d_iforeground_pixel_test | |
119 _r2d_lcd_stop_foreground_pixel | |
120 | |
121 | |
122 _r2d_start_lcd_to_color | |
123 ; Identifying code telling the patcher that a special | |
124 ; construct required to branch to a C function is used | |
125 .long BRANCH_ID | |
126 ; The absolute address of the C function which is going to be | |
127 ; converted to a PC relative offset by the patcher | |
128 .long _r2d_ilcd_to_color | |
129 _r2d_stop_lcd_to_color | |
130 | |
131 _r2d_start_color_to_lcd | |
132 ; Identifying code telling the patcher that a special | |
133 ; construct required to branch to a C function is used | |
134 .long BRANCH_ID | |
135 ; The absolute address of the C function which is going to be | |
136 ; converted to a PC relative offset by the patcher | |
137 .long _r2d_icolor_to_lcd | |
138 _r2d_stop_color_to_lcd | |
139 | |
140 | |
141 | |
142 ; Stub function allowing to branch to a C one whose interface | |
143 ; is UINT32 r2d_lcd_some_operator(UINT32 old,UINT32 value) | |
144 _r2d_ialpha_op: | |
145 R2D_OP_SAVE_CONTEXT | |
146 BL _r2d_lcd_alpha_operator | |
147 R2D_OP_RESTORE_CONTEXT | |
148 | |
149 ; Check kind of pixel | |
150 _r2d_iforeground_pixel_test: | |
151 R2D_COL_SAVE_CONTEXT | |
152 BL _r2d_lcd_foreground_pixel | |
153 R2D_COL_RESTORE_CONTEXT | |
154 | |
155 ; All color conversion subroutines | |
156 _r2d_icolor_to_lcd: | |
157 R2D_COLCONV_SAVE_CONTEXT | |
158 BL _r2d_color_to_lcd | |
159 R2D_COLCONV_RESTORE_CONTEXT | |
160 | |
161 _r2d_ilcd_to_color: | |
162 R2D_COLCONV_SAVE_CONTEXT | |
163 BL _r2d_lcd_to_color | |
164 R2D_COLCONV_RESTORE_CONTEXT | |
165 | |
166 .endif | |
167 |