comparison src/cs/drivers/drv_app/r2d/r2d_lcd_geometry.c @ 0:92470e5d0b9e

src: partial import from FC Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 15 May 2020 01:28:16 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92470e5d0b9e
1 /**
2
3 @file: r2d_lcd_geometry.c
4
5 @author Christophe Favergeon
6
7 @version 0.5
8
9 Purpose: Low level drawing subroutines interacting directly with framebuffers
10 and with LCDs APIs
11
12 */
13
14 /*
15
16 Date Modification
17 ------------------------------------
18 06/02/2001 Create
19 10/18/2001 Version 0.5 for first integration with Riviera database
20
21
22 (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved
23 */
24
25
26 #include "rv/general.h"
27 #include "rvf/rvf_api.h"
28 #include "rvm/rvm_use_id_list.h"
29 #include "r2d/r2d_config.h"
30 #include "r2d/r2d.h"
31 #include "r2d/r2d_i.h"
32 #include "r2d/r2d_independance_layer.h"
33 #if (R2D_DEBUG == R2D_ON)
34 #include <stdio.h>
35 #endif
36
37 #if (R2D_EMBEDDED_LCD == R2D_PC_COLOR_LCD)
38 #include "Windows.h"
39 #endif
40
41
42
43 #define IND_r2d_color_to_lcd r2d_color_to_lcd
44 #define IND_r2d_get_drawing_mode r2d_get_drawing_mode
45 #define IND_rvf_send_trace rvf_send_trace
46 #define IND_r2d_lcd_to_color r2d_lcd_to_color
47
48 #define IND_r2d_lcd_foreground_pixel r2d_lcd_foreground_pixel
49
50 #define IND_r2d_color_framebuffer_foreground_pixel r2d_color_framebuffer_foreground_pixel
51
52 #if (R2D_ASM == R2D_ON)
53 extern void r2d_blit_la(UINT32 *a);
54 extern void r2d_blit_lb(UINT32 *a);
55
56 extern void r2d_patch_blit(T_R2D_GC_PTR dst_gc,T_R2D_DRAWING_MODE mode,
57 R2D_BOOLEAN use_foreground_color,INT32 srcdst);
58
59 extern UINT32 r2d_lcd_start_copy;
60 extern UINT32 r2d_lcd_start_or;
61 extern UINT32 r2d_lcd_start_and;
62 extern UINT32 r2d_lcd_start_xor;
63 extern UINT32 r2d_lcd_start_notcopy;
64 extern UINT32 r2d_lcd_start_notor;
65 extern UINT32 r2d_lcd_start_notand;
66 extern UINT32 r2d_lcd_start_notxor;
67 extern UINT32 r2d_lcd_start_alpha;
68 extern UINT32 r2d_lcd_start_foreground_pixel;
69
70 extern UINT32 r2d_color_start_copy;
71 extern UINT32 r2d_color_start_or;
72 extern UINT32 r2d_color_start_and;
73 extern UINT32 r2d_color_start_xor;
74 extern UINT32 r2d_color_start_notcopy;
75 extern UINT32 r2d_color_start_notor;
76 extern UINT32 r2d_color_start_notand;
77 extern UINT32 r2d_color_start_notxor;
78 extern UINT32 r2d_color_start_alpha;
79 extern UINT32 r2d_color_start_foreground_pixel;
80
81 extern UINT32 r2d_start_get_color;
82
83
84 // Drawing mode
85 extern UINT32 r2d_sb_down1;
86 extern UINT32 r2d_sb_down2;
87 extern UINT32 r2d_sa_up1;
88 extern UINT32 r2d_sa_up2;
89
90 // Foreground detection
91 extern UINT32 r2d_sdb_down1;
92 extern UINT32 r2d_sdb_down2;
93 extern UINT32 r2d_sda_up1;
94 extern UINT32 r2d_sda_up2;
95
96 // Color conversion
97 extern UINT32 r2d_scb_down1;
98 extern UINT32 r2d_scb_down2;
99 extern UINT32 r2d_sca_up1;
100 extern UINT32 r2d_sca_up2;
101
102 extern UINT32 r2d_start_branch_inst;
103 extern UINT32 r2d_stop_branch_inst;
104 extern UINT32 r2d_blit_foreground;
105 extern UINT32 r2d_blit_background;
106 extern UINT32 r2d_skip_color_proc_a;
107 extern UINT32 r2d_end_ynb_color_dst_a;
108 extern UINT32 r2d_skip_color_proc_b;
109 extern UINT32 r2d_end_ynb_color_dst_b;
110
111 // Patch list for write_shift_pixel_down
112 extern UINT32 r2d_sft_dst_n_b_down1,r2d_sft_dst_n_b_down2;
113 extern UINT32 r2d_sft_srcb__b_down1,r2d_sft_srcb__b_down2;
114 extern UINT32 r2d_sft_dstc__b_down1,r2d_sft_dstc__b_down2;
115
116 extern UINT32 r2d_sft_src_c_b_down1,r2d_sft_src_c_b_down2;
117 extern UINT32 r2d_sft_b_c_b_down1,r2d_sft_b_c_b_down2;
118 extern UINT32 r2d_sft_dstb_c_b_down1,r2d_sft_dstb_c_b_down2;
119 extern UINT32 r2d_sft_d_c_b_down1,r2d_sft_d_c_b_down2;
120 extern UINT32 r2d_sft_dstc_c_b_down1,r2d_sft_dstc_c_b_down2;
121
122 // Patch list for write_shift_pixel_up
123 extern UINT32 r2d_sft_dst_n_a_up1,r2d_sft_dst_n_a_up2;
124 extern UINT32 r2d_sft_srcb__a_up1,r2d_sft_srcb__a_up2;
125 extern UINT32 r2d_sft_dstc__a_up1,r2d_sft_dstc__a_up2;
126
127 extern UINT32 r2d_sft_src_c_a_up1,r2d_sft_src_c_a_up2;
128 extern UINT32 r2d_sft_b_c_a_up1,r2d_sft_b_c_a_up2;
129
130 // Patch list fro shift_pixel_down
131 extern UINT32 r2d_sft_dst_n_downa,r2d_sft_dst_n_downb,r2d_sft_dst_n_downc;
132 extern UINT32 r2d_sft_srcb_n_downa,r2d_sft_srcb_n_downb,r2d_sft_srcb_n_downc;
133
134 extern UINT32 r2d_sft_src_c_downa,r2d_sft_src_c_downb,r2d_sft_src_c_downc;
135
136 // Patch list fro shift_pixel_up
137 extern UINT32 r2d_sft_dst_n_upa,r2d_sft_dst_n_upb,r2d_sft_dst_n_upc;
138 extern UINT32 r2d_sft_srcb_n_upa,r2d_sft_srcb_n_upb,r2d_sft_srcb_n_upc;
139
140 extern UINT32 r2d_sft_src_c_upa,r2d_sft_src_c_upb,r2d_sft_src_c_upc;
141
142 extern UINT32 r2d_sconvcolb_down1,r2d_econvcolb_down1;
143 extern UINT32 r2d_sconvcolb_down2,r2d_econvcolb_down2;
144 extern UINT32 r2d_sconvcola_up1,r2d_econvcola_up1;
145 extern UINT32 r2d_sconvcola_up2,r2d_econvcola_up2;
146 extern UINT32 r2d_start_lcd_to_color,r2d_start_color_to_lcd;
147
148 extern UINT32 r2d_always_write_down,r2d_always_write_up,r2d_never_write;
149 extern UINT32 r2d_swb_down1,r2d_swb_down2,r2d_swa_up1,r2d_swa_up2;
150
151 extern UINT32 r2d_skip_color_dst_a,r2d_skip_color_dst_b;
152 extern UINT32 r2d_always_skip;
153 extern UINT32 r2d_enda,r2d_endb;
154 extern UINT32 r2d_lcd_start_nothing;
155
156 extern UINT32 r2d_skip_load_src_a_up1,r2d_skip_load_src_a_up2;
157 extern UINT32 r2d_skip_load_src_b_down1,r2d_skip_load_src_b_down2;
158 extern UINT32 r2d_skip_shift_down_downa,r2d_skip_shift_down_downb,r2d_skip_shift_down_downc;
159 extern UINT32 r2d_skip_shift_up_upa,r2d_skip_shift_up_upb,r2d_skip_shift_up_upc;
160 extern UINT32 r2d_no_null_src_counter_a,r2d_no_null_src_counter_b;
161 extern UINT32 r2d_end_a_up2,r2d_end_b_down2,r2d_end_downa,r2d_end_downb,r2d_end_downc;
162 extern UINT32 r2d_end_upa,r2d_end_upb,r2d_end_upc;
163
164 extern UINT32 r2d_always_read_b_down1,r2d_always_read_b_down2;
165 extern UINT32 r2d_always_read_a_up1,r2d_always_read_a_up2;
166 extern UINT32 r2d_always_read_down,r2d_always_read_up;
167
168 extern UINT32* r2d_g_asm_lcd_operators[];
169 extern UINT32* r2d_g_asm_color_operators[];
170
171 #endif
172
173 #include "LCDs/R2D_vertical_lcd_i.c"