hd64461videoreg.h revision 1.5 1 1.5 kamil /* $NetBSD: hd64461videoreg.h,v 1.5 2019/04/11 11:26:13 kamil Exp $ */
2 1.1 uch
3 1.1 uch /*-
4 1.1 uch * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 1.1 uch * All rights reserved.
6 1.1 uch *
7 1.1 uch * This code is derived from software contributed to The NetBSD Foundation
8 1.1 uch * by UCHIYAMA Yasushi.
9 1.1 uch *
10 1.1 uch * Redistribution and use in source and binary forms, with or without
11 1.1 uch * modification, are permitted provided that the following conditions
12 1.1 uch * are met:
13 1.1 uch * 1. Redistributions of source code must retain the above copyright
14 1.1 uch * notice, this list of conditions and the following disclaimer.
15 1.1 uch * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 uch * notice, this list of conditions and the following disclaimer in the
17 1.1 uch * documentation and/or other materials provided with the distribution.
18 1.1 uch *
19 1.1 uch * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.1 uch * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.1 uch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.1 uch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.1 uch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.1 uch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.1 uch * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.1 uch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.1 uch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.1 uch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.1 uch * POSSIBILITY OF SUCH DAMAGE.
30 1.1 uch */
31 1.1 uch
32 1.2 uwe #ifndef _HPCSH_DEV_HD64461VIDEOREG_H_
33 1.2 uwe #define _HPCSH_DEV_HD64461VIDEOREG_H_
34 1.2 uwe
35 1.1 uch /*
36 1.1 uch * LCD Controller Control Register
37 1.1 uch */
38 1.2 uwe
39 1.1 uch /* Base Address Register */
40 1.1 uch #define HD64461_LCDCBAR_REG16 0xb0001000
41 1.1 uch #define HD64461_LCDCBAR_MASK 0x3fff
42 1.1 uch #define HD64461_LCDCBAR_SHIFT 12
43 1.1 uch #define HD64461_LCDCBAR_BASEADDR(x) \
44 1.1 uch (((x) & HD64461_LCDCBAR_MASK) << HD64461_LCDCBAR_SHIFT)
45 1.1 uch
46 1.1 uch /* Line Address Offset Register */
47 1.1 uch #define HD64461_LCDCLOR_REG16 0xb0001002
48 1.1 uch #define HD64461_LCDCLOR_MASK 0x07ff
49 1.1 uch #define HD64461_LCDCLOR(x) ((x) & HD64461_LCDCLOR_MASK)
50 1.1 uch
51 1.1 uch /* LCDC Control Register */
52 1.1 uch #define HD64461_LCDCCR_REG16 0xb0001004
53 1.1 uch #define HD64461_LCDCCR_STBAK 0x0400
54 1.1 uch #define HD64461_LCDCCR_STREQ 0x0100
55 1.1 uch #define HD64461_LCDCCR_MOFF 0x0080
56 1.1 uch #define HD64461_LCDCCR_REFSEL 0x0040
57 1.1 uch #define HD64461_LCDCCR_EPON 0x0020
58 1.1 uch #define HD64461_LCDCCR_SPON 0x0010
59 1.1 uch #define HD64461_LCDCCR_DSPSEL_MASK 0x7
60 1.1 uch #define HD64461_LCDCCR_DSPSEL(x) ((x) & HD64461_LCDCCR_DSPSEL_MASK)
61 1.1 uch #define HD64461_LCDCCR_DSPSEL_LCD_CRT 0x4
62 1.1 uch #define HD64461_LCDCCR_DSPSEL_CRT 0x2
63 1.1 uch #define HD64461_LCDCCR_DSPSEL_LCD 0x1
64 1.1 uch
65 1.1 uch /* LCD Display Register */
66 1.1 uch /* 1 */
67 1.1 uch #define HD64461_LCDLDR1_REG16 0xb0001010
68 1.1 uch #define HD64461_LCDLDR1_DINV 0x0100
69 1.1 uch #define HD64461_LCDLDR1_DON 0x0001
70 1.1 uch /* 2 */
71 1.1 uch #define HD64461_LCDLDR2_REG16 0xb0001012
72 1.1 uch #define HD64461_LCDLDR2_CC1 0x0080
73 1.1 uch #define HD64461_LCDLDR2_CC2 0x0040
74 1.1 uch #define HD64461_LCDLDR2_LM_MASK 0x7
75 1.1 uch #define HD64461_LCDLDR2_LM(x) ((x) & HD64461_LCDLDR2_LM_MASK)
76 1.1 uch #define HD64461_LCDLDR2_LM_COLOR 0x4
77 1.1 uch #define HD64461_LCDLDR2_LM_GRAY8 0x1
78 1.1 uch #define HD64461_LCDLDR2_LM_GRAY4 0x0
79 1.1 uch /* 3 */
80 1.1 uch #define HD64461_LCDLDR3_REG16 0xb000101e
81 1.1 uch #define HD64461_LCDLDR3_CS_SHIFT 5
82 1.1 uch #define HD64461_LCDLDR3_CS_MASK 0x1f
83 1.1 uch #define HD64461_LCDLDR3_CS(cr) \
84 1.1 uch (((cr) >> HD64461_LCDLDR3_CS_SHIFT) & \
85 1.1 uch HD64461_LCDLDR3_CS_MASK)
86 1.1 uch #define HD64461_LCDLDR3_CS_SET(cr, val) \
87 1.1 uch ((cr) | (((val) << HD64461_LCDLDR3_CS_SHIFT) & \
88 1.1 uch (HD64461_LCDLDR3_CS_MASK << HD64461_LCDLDR3_CS_SHIFT)))
89 1.1 uch #define HD64461_LCDLDR3_CG_MASK 0xf
90 1.1 uch #define HD64461_LCDLDR3_CG(cr) \
91 1.1 uch ((cr) & HD64461_LCDLDR3_CG_MASK)
92 1.1 uch #define HD64461_LCDLDR3_CG_CLR(cr) \
93 1.1 uch ((cr) & ~HD64461_LCDLDR3_CG_MASK)
94 1.1 uch #define HD64461_LCDLDR3_CG_SET(cr, val) \
95 1.1 uch ((cr) | ((val) & HD64461_LCDLDR3_CG_MASK))
96 1.1 uch
97 1.1 uch /*
98 1.1 uch * select CL2 frequency
99 1.1 uch * 0x0 15 MHz (color) 15/2 (monochrome)
100 1.1 uch * 0x1 2.5 MHz
101 1.3 lukem * 0x2 3.75 MHz
102 1.3 lukem * 0x4 5 MHz
103 1.3 lukem * 0x8 7.5 MHz
104 1.3 lukem * 0x10 10 MHz
105 1.1 uch */
106 1.1 uch #define HD64461_LCDLDR3_CG_COLOR16 0x8
107 1.1 uch #define HD64461_LCDLDR3_CG_COLOR8 0x4
108 1.1 uch #define HD64461_LCDLDR3_CG_GRAY6 0x3
109 1.1 uch #define HD64461_LCDLDR3_CG_GRAY4 0x2
110 1.1 uch #define HD64461_LCDLDR3_CG_GRAY2 0x1
111 1.1 uch #define HD64461_LCDLDR3_CG_GRAY1 0x0
112 1.1 uch
113 1.1 uch /* LCD Number of Characters in Horizontal Register */
114 1.1 uch #define HD64461_LCDLDHNCR_REG16 0xb0001014
115 1.1 uch #define HD64461_LCDLDHNCR_NHD_SHIFT 8
116 1.1 uch #define HD64461_LCDLDHNCR_NHD_MASK 0xff
117 1.1 uch #define HD64461_LCDLDHNCR_NHD(cr) \
118 1.1 uch (((cr) >> HD64461_LCDLDHNCR_NHD_SHIFT) & \
119 1.1 uch HD64461_LCDLDHNCR_NHD_MASK)
120 1.1 uch #define HD64461_LCDLDHNCR_NHD_SET(cr, val) \
121 1.1 uch ((cr) | (((val) << HD64461_LCDLDHNCR_NHD_SHIFT) & \
122 1.1 uch (HD64461_LCDLDHNCR_NHD_MASK << HD64461_LCDLDHNCR_NHD_SHIFT)))
123 1.1 uch #define HD64461_LCDLDHNCR_NHT_SHIFT 0
124 1.1 uch #define HD64461_LCDLDHNCR_NHT_MASK 0xff
125 1.1 uch #define HD64461_LCDLDHNCR_NHT(cr) \
126 1.1 uch (((cr) >> HD64461_LCDLDHNCR_NHT_SHIFT) & \
127 1.1 uch HD64461_LCDLDHNCR_NHT_MASK)
128 1.1 uch #define HD64461_LCDLDHNCR_NHT_SET(cr, val) \
129 1.1 uch ((cr) | (((val) << HD64461_LCDLDHNCR_NHT_SHIFT) & \
130 1.1 uch (HD64461_LCDLDHNCR_NHT_MASK << HD64461_LCDLDHNCR_NHT_SHIFT)))
131 1.1 uch
132 1.1 uch /* Start Position of Horizontal Register */
133 1.1 uch #define HD64461_LCDLDHNSR_REG16 0xb0001016
134 1.1 uch #define HD64461_LCDLDHNSR_HSW_SHIFT 8
135 1.1 uch #define HD64461_LCDLDHNSR_HSW_MASK 0xf
136 1.1 uch #define HD64461_LCDLDHNSR_HSW(cr) \
137 1.1 uch (((cr) >> HD64461_LCDLDHNSR_HSW_SHIFT) & \
138 1.1 uch HD64461_LCDLDHNSR_HSW_MASK)
139 1.1 uch #define HD64461_LCDLDHNSR_HSW_SET(cr, val) \
140 1.1 uch ((cr) | (((val) << HD64461_LCDLDHNSR_HSW_SHIFT) & \
141 1.1 uch (HD64461_LCDLDHNSR_HSW_MASK << HD64461_LCDLDHNSR_HSW_SHIFT)))
142 1.1 uch #define HD64461_LCDLDHNSR_HSP_SHIFT 0
143 1.1 uch #define HD64461_LCDLDHNSR_HSP_MASK 0xff
144 1.1 uch #define HD64461_LCDLDHNSR_HSP(cr) \
145 1.1 uch (((cr) >> HD64461_LCDLDHNSR_HSP_SHIFT) & \
146 1.1 uch HD64461_LCDLDHNSR_HSP_MASK)
147 1.1 uch #define HD64461_LCDLDHNSR_HSP_SET(cr, val) \
148 1.1 uch ((cr) | (((val) << HD64461_LCDLDHNSR_HSP_SHIFT) & \
149 1.1 uch (HD64461_LCDLDHNSR_HSP_MASK << HD64461_LCDLDHNSR_HSP_SHIFT)))
150 1.1 uch
151 1.1 uch /* Total Vertical Lines Register */
152 1.1 uch #define HD64461_LCDLDVNTR_REG16 0xb0001018
153 1.1 uch #define HD64461_LCDLDVNTR_VTL_SHIFT 0
154 1.1 uch #define HD64461_LCDLDVNTR_VTL_MASK 0x3ff
155 1.1 uch #define HD64461_LCDLDVNTR_VTL(cr) \
156 1.1 uch (((cr) >> HD64461_LCDLDVNTR_VTL_SHIFT) & \
157 1.1 uch HD64461_LCDLDVNTR_VTL_MASK)
158 1.1 uch #define HD64461_LCDLDVNTR_VTL_SET(cr, val) \
159 1.1 uch ((cr) | (((val) << HD64461_LCDLDVNTR_VTL_SHIFT) & \
160 1.1 uch (HD64461_LCDLDVNTR_VTL_MASK << HD64461_LCDLDVNTR_VTL_SHIFT)))
161 1.1 uch
162 1.1 uch /* Display Vertical Lines Register */
163 1.1 uch #define HD64461_LCDLDVNDR_REG16 0xb000101a
164 1.1 uch #define HD64461_LCDLDVNDR_VDL_SHIFT 0
165 1.1 uch #define HD64461_LCDLDVNDR_VDL_MASK 0x3ff
166 1.1 uch #define HD64461_LCDLDVNDR_VDL(cr) \
167 1.1 uch (((cr) >> HD64461_LCDLDVNDR_VDL_SHIFT) & \
168 1.1 uch HD64461_LCDLDVNDR_VDL_MASK)
169 1.1 uch #define HD64461_LCDLDVNDR_VDL_SET(cr, val) \
170 1.1 uch ((cr) | (((val) << HD64461_LCDLDVNDR_VDL_SHIFT) & \
171 1.1 uch (HD64461_LCDLDVNDR_VDL_MASK << HD64461_LCDLDVNDR_VDL_SHIFT)))
172 1.1 uch
173 1.1 uch /* Vertical Synchronization Position Register */
174 1.1 uch #define HD64461_LCDLDVSPR_REG16 0xb000101c
175 1.1 uch #define HD64461_LCDLDVSPR_VSP_SHIFT 0
176 1.1 uch #define HD64461_LCDLDVSPR_VSP_MASK 0x3ff
177 1.1 uch #define HD64461_LCDLDVSPR_VSP(cr) \
178 1.1 uch ((cr) & HD64461_LCDLDVSPR_VSP_MASK)
179 1.1 uch #define HD64461_LCDLDVSPR_VSP_SET(cr, val) \
180 1.1 uch ((cr) | ((val) & HD64461_LCDLDVSPR_VSP_MASK))
181 1.1 uch
182 1.1 uch /*
183 1.1 uch * CRT Control Register
184 1.1 uch */
185 1.1 uch /* CRTC Total Vertical Lines Register */
186 1.1 uch #define HD64461_LCDCRTVTR_REG16 0xb0001020
187 1.1 uch #define HD64461_LCDCRTVTR_SHIFT 0
188 1.1 uch #define HD64461_LCDCRTVTR_MASK 0x3ff
189 1.1 uch #define HD64461_LCDCRTVTR(cr) \
190 1.1 uch (((cr) >> HD64461_LCDCRTVTR_SHIFT) & \
191 1.1 uch HD64461_LCDCRTVTR_MASK)
192 1.1 uch #define HD64461_LCDCRTVTR_SET(cr, val) \
193 1.1 uch ((cr) | (((val) << HD64461_LCDCRTVTR_SHIFT) & \
194 1.1 uch (HD64461_LCDCRTVTR_MASK << HD64461_LCDCRTVTR_SHIFT)))
195 1.1 uch
196 1.1 uch /* CRTC Vertical Retrace Start Register */
197 1.1 uch #define HD64461_LCDCRTVRSR_REG16 0xb0001022
198 1.1 uch #define HD64461_LCDCRTVRSR_SHIFT 0
199 1.1 uch #define HD64461_LCDCRTVRSR_MASK 0x3ff
200 1.1 uch #define HD64461_LCDCRTVRSR(cr) \
201 1.1 uch (((cr) >> HD64461_LCDCRTVRSR_SHIFT) & \
202 1.1 uch HD64461_LCDCRTVRSR_MASK)
203 1.1 uch #define HD64461_LCDCRTVRSR_SET(cr, val) \
204 1.1 uch ((cr) | (((val) << HD64461_LCDCRTVRSR_SHIFT) & \
205 1.1 uch (HD64461_LCDCRTVRSR_MASK << HD64461_LCDCRTVRSR_SHIFT)))
206 1.1 uch
207 1.1 uch /* CRTC Vertical Retrace End Register */
208 1.1 uch #define HD64461_LCDCRTVRER_REG16 0xb0001024
209 1.1 uch #define HD64461_LCDCRTVRER_SHIFT 0
210 1.1 uch #define HD64461_LCDCRTVRER_MASK 0xf
211 1.1 uch #define HD64461_LCDCRTVRER(cr) \
212 1.1 uch (((cr) >> HD64461_LCDCRTVRER_SHIFT) & HD64461_LCDCRTVRER_MASK)
213 1.1 uch
214 1.1 uch #define HD64461_LCDCRTVRER_SET(cr, val) \
215 1.1 uch ((cr) | (((val) << HD64461_LCDCRTVRER_SHIFT) & \
216 1.1 uch (HD64461_LCDCRTVRER_MASK << HD64461_LCDCRTVRER_SHIFT)))
217 1.1 uch
218 1.1 uch /*
219 1.1 uch * Palette Register
220 1.1 uch */
221 1.1 uch /* Color Palette Write Address Register */
222 1.1 uch #define HD64461_LCDCPTWAR_REG16 0xb0001030
223 1.1 uch #define HD64461_LCDCPTWAR_SHIFT 8
224 1.1 uch #define HD64461_LCDCPTWAR_MASK 0xff
225 1.1 uch #define HD64461_LCDCPTWAR_SET(cr, val) \
226 1.1 uch ((cr) | (((val) << HD64461_LCDCPTWAR_SHIFT) & \
227 1.1 uch (HD64461_LCDCPTWAR_MASK << HD64461_LCDCPTWAR_SHIFT)))
228 1.1 uch
229 1.1 uch /* Color Palette Write Data Register */
230 1.1 uch #define HD64461_LCDCPTWDR_REG16 0xb0001032
231 1.1 uch #define HD64461_LCDCPTWDR_SHIFT 0
232 1.1 uch #define HD64461_LCDCPTWDR_MASK 0x3f
233 1.1 uch #define HD64461_LCDCPTWDR_SET(cr, val) \
234 1.1 uch ((cr) | ((val) & HD64461_LCDCPTWDR_MASK))
235 1.1 uch
236 1.1 uch /* Color Palette READ Address Register */
237 1.1 uch #define HD64461_LCDCPTRAR_REG16 0xb0001034
238 1.1 uch #define HD64461_LCDCPTRAR_SHIFT 8
239 1.1 uch #define HD64461_LCDCPTRAR_MASK 0xff
240 1.1 uch #define HD64461_LCDCPTRAR_SET(cr, val) \
241 1.1 uch ((cr) | (((val) << HD64461_LCDCPTRAR_SHIFT) & \
242 1.1 uch (HD64461_LCDCPTRAR_MASK << HD64461_LCDCPTRAR_SHIFT)))
243 1.1 uch
244 1.1 uch /* Color Palette READ Data Register */
245 1.1 uch #define HD64461_LCDCPTRDR_REG16 0xb0001036
246 1.1 uch #define HD64461_LCDCPTRDR_SHIFT 0
247 1.1 uch #define HD64461_LCDCPTRDR_MASK 0x3f
248 1.1 uch #define HD64461_LCDCPTRDR(cr) ((cr) & HD64461_LCDCPTRDR_MASK)
249 1.1 uch
250 1.1 uch /*
251 1.1 uch * Acceleration Common Register
252 1.1 uch */
253 1.1 uch /* Display Resolution Offset Register */
254 1.1 uch #define HD64461_LCDGRDOR_REG16 0xb0001040
255 1.1 uch #define HD64461_LCDGRDOR_SHIFT 0
256 1.1 uch #define HD64461_LCDGRDOR_MASK 0x7ff
257 1.1 uch #define HD64461_LCDGRDOR(cr) \
258 1.1 uch (((cr) >> HD64461_LCDGRDOR_SHIFT) & \
259 1.1 uch HD64461_LCDGRDOR_MASK)
260 1.1 uch #define HD64461_LCDGRDOR_SET(cr, val) \
261 1.1 uch ((cr) | (((val) << HD64461_LCDGRDOR_SHIFT) & \
262 1.1 uch (HD64461_LCDGRDOR_MASK << HD64461_LCDGRDOR_SHIFT)))
263 1.1 uch
264 1.1 uch /* Solid Color Register */
265 1.1 uch #define HD64461_LCDGRSCR_REG16 0xb0001042
266 1.1 uch
267 1.1 uch /* Accelerator Configuration Register */
268 1.1 uch #define HD64461_LCDGRCFGR_REG16 0xb0001044
269 1.1 uch #define HD64461_LCDGRCFGR_ACCSTATUS 0x0010
270 1.1 uch #define HD64461_LCDGRCFGR_ACCRESET 0x0008
271 1.1 uch #define HD64461_LCDGRCFGR_ACCSTART_MASK 0x6
272 1.1 uch #define HD64461_LCDGRCFGR_ACCSTART_BITBLT 0x0006
273 1.1 uch #define HD64461_LCDGRCFGR_ACCSTART_LINE 0x0004
274 1.1 uch #define HD64461_LCDGRCFGR_ACCSTART_OFF 0x0000
275 1.1 uch #define HD64461_LCDGRCFGR_COLORDEPTH_8BPP 0x0001
276 1.1 uch
277 1.1 uch /*
278 1.1 uch * Line Drawing Register
279 1.1 uch */
280 1.1 uch /* Line Start Address Register */
281 1.1 uch #define HD64461_LCDLNSARH_REG16 0xb0001046
282 1.1 uch #define HD64461_LCDLNSARH_MASK 0x0007
283 1.1 uch #define HD64461_LCDLNSARL_REG16 0xb0001048
284 1.1 uch #define HD64461_LCDLNSARL_MASK 0xffff
285 1.1 uch
286 1.1 uch /* Axis Pixel Length Register */
287 1.1 uch #define HD64461_LCDLNAXLR_REG16 0xb000104a
288 1.1 uch #define HD64461_LCDLNAXLR_MASK 0x07ff
289 1.1 uch
290 1.5 kamil /* Diagonal Register */
291 1.1 uch #define HD64461_LCDLNDGR_REG16 0xb000104c
292 1.1 uch #define HD64461_LCDLNDGR_LNDGR_SIGN 0x8000
293 1.1 uch #define HD64461_LCDLNDGR_LNDGR_MASK 0x07ff
294 1.1 uch #define HD64461_LCDLNDGR_LNDGR_SET(cr, x) \
295 1.1 uch ((cr) | ((x) & HD64461_LCDLNDGR_LNDGR_MASK))
296 1.1 uch
297 1.1 uch /* Axial Register */
298 1.1 uch #define HD64461_LCDLNAXR_REG16 0xb000104e
299 1.1 uch #define HD64461_LCDLNAXR_LNAXR_MASK 0x0fff
300 1.1 uch #define HD64461_LCDLNAXR_LNAXR_SET(cr, x) \
301 1.1 uch ((cr) | ((x) & HD64461_LCDLNAXR_LNAXR_MASK))
302 1.1 uch
303 1.1 uch /* Start Error Term Register */
304 1.1 uch #define HD64461_LCDLNERTR_REG16 0xb0001050
305 1.1 uch #define HD64461_LCDLNERTR_LNERTR_SIGN 0x8000
306 1.1 uch #define HD64461_LCDLNERTR_LNERTR_MASK 0x07ff
307 1.1 uch #define HD64461_LCDLNERTR_LNERTR_SET(cr, x) \
308 1.1 uch ((cr) | ((x) & HD64461_LCDLNERTR_LNERTR_MASK))
309 1.1 uch
310 1.1 uch /* Line Mode Register */
311 1.1 uch #define HD64461_LCDLNMDR_REG16 0xb0001052
312 1.1 uch #define HD64461_LCDLNMDR_MASK 0x0003
313 1.1 uch /*
314 1.1 uch * 2 1
315 1.1 uch * 3 0
316 1.1 uch * 4 7
317 1.1 uch * 5 6
318 1.1 uch *
319 1.1 uch * 1 or 5 ... 3
320 1.1 uch * 2 or 6 ... 2
321 1.1 uch * 0 or 4 ... 1
322 1.1 uch * 3 or 7 ... 0
323 1.1 uch */
324 1.1 uch
325 1.1 uch /*
326 1.1 uch * BitBLT Register
327 1.1 uch */
328 1.1 uch /* Source Start Address Register (19 bit) */
329 1.1 uch #define HD64461_LCDBBTSSARH_REG16 0xb0001054
330 1.1 uch #define HD64461_LCDBBTSSARH_SHIFT 16
331 1.1 uch #define HD64461_LCDBBTSSARH_MASK 0x0007
332 1.1 uch #define HD64461_LCDBBTSSARL_REG16 0xb0001056
333 1.1 uch #define HD64461_LCDBBTSSARL_MASK 0xffff
334 1.1 uch #define HD64461_LCDBBTSSARH(x) \
335 1.1 uch (((x) >> HD64461_LCDBBTSSARH_SHIFT) & HD64461_LCDBBTSSARH_MASK)
336 1.1 uch #define HD64461_LCDBBTSSARL(x) ((x) & HD64461_LCDBBTSSARL_MASK)
337 1.1 uch
338 1.1 uch /* Destination Start Address Register (19 bit) */
339 1.1 uch #define HD64461_LCDBBTDSARH_REG16 0xb0001058
340 1.1 uch #define HD64461_LCDBBTDSARH_SHIFT 16
341 1.1 uch #define HD64461_LCDBBTDSARH_MASK 0x0007
342 1.1 uch #define HD64461_LCDBBTDSARL_REG16 0xb000105a
343 1.1 uch #define HD64461_LCDBBTDSARL_MASK 0xffff
344 1.1 uch #define HD64461_LCDBBTDSARH(x) \
345 1.1 uch (((x) >> HD64461_LCDBBTSSARH_SHIFT) & HD64461_LCDBBTSSARH_MASK)
346 1.1 uch #define HD64461_LCDBBTDSARL(x) ((x) & HD64461_LCDBBTSSARL_MASK)
347 1.1 uch
348 1.1 uch /* Destination Block Width Register */
349 1.1 uch #define HD64461_LCDBBTDWR_REG16 0xb000105c
350 1.1 uch #define HD64461_LCDBBTDWR_MASK 0x07ff
351 1.1 uch
352 1.1 uch /* Destination Block Height Register */
353 1.1 uch #define HD64461_LCDBBTDHR_REG16 0xb000105e
354 1.1 uch #define HD64461_LCDBBTDHR_MASK 0x07ff
355 1.1 uch
356 1.1 uch /* Pattern Start Address Register (19 bit) */
357 1.1 uch #define HD64461_LCDBBTPARH_REG16 0xb0001060
358 1.1 uch #define HD64461_LCDBBTPARH_MASK 0x0007
359 1.1 uch #define HD64461_LCDBBTPARL_REG16 0xb0001062
360 1.1 uch
361 1.1 uch /* Mask Start Address Register (19 bit) */
362 1.1 uch #define HD64461_LCDBBTMARH_REG16 0xb0001064
363 1.1 uch #define HD64461_LCDBBTMARH_MASK 0x0007
364 1.1 uch #define HD64461_LCDBBTMARL_REG16 0xb0001066
365 1.1 uch
366 1.1 uch /* ROP Register */
367 1.1 uch #define HD64461_LCDBBTROPR_REG16 0xb0001068
368 1.1 uch
369 1.1 uch /* BitBLT Mode Register */
370 1.1 uch #define HD64461_LCDBBTMDR_REG16 0xb000106a
371 1.1 uch #define HD64461_LCDBBTMDR_MASKENABLE 0x0020
372 1.1 uch #define HD64461_LCDBBTMDR_PATSELECT_SOLIDCOLOR 0x0010
373 1.1 uch #define HD64461_LCDBBTMDR_SHIFT 2
374 1.1 uch #define HD64461_LCDBBTMDR_MASK 0x3
375 1.1 uch #define HD64461_LCDBBTMDR(cr) \
376 1.1 uch (((cr) >> HD64461_LCDBBTMDR_SHIFT) & HD64461_LCDBBTMDR_MASK)
377 1.1 uch
378 1.1 uch #define HD64461_LCDBBTMDR_SET(cr, val) \
379 1.1 uch ((cr) | (((val) << HD64461_LCDBBTMDR_SHIFT) & \
380 1.1 uch (HD64461_LCDBBTMDR_MASK << HD64461_LCDBBTMDR_SHIFT)))
381 1.1 uch #define HD64461_LCDBBTMDR_ON_SCREEN_TO_ON_SCREEN 0
382 1.1 uch #define HD64461_LCDBBTMDR_ON_SCREEN_TO_OFF_SCREEN 1
383 1.1 uch #define HD64461_LCDBBTMDR_OFF_SCREEN_TO_ON_SCREEN 3
384 1.1 uch
385 1.1 uch #define HD64461_LCDBBTMDR_SCANDRCT 0x0001
386 1.1 uch #define HD64461_LCDBBTMDR_SCANDRCT_RL_BT 0x1
387 1.1 uch #define HD64461_LCDBBTMDR_SCANDRCT_LR_TB 0x0
388 1.1 uch
389 1.1 uch /*
390 1.1 uch * BitBLT Function
391 1.1 uch */
392 1.1 uch #define HD64461_LCDC_BITBLT_SRCAND 0x0088
393 1.1 uch #define HD64461_LCDC_BITBLT_SRCCOPY 0x00cc
394 1.1 uch #define HD64461_LCDC_BITBLT_SRCINVERT 0x0066
395 1.1 uch #define HD64461_LCDC_BITBLT_SRCPAINT 0x00ee
396 1.1 uch #define HD64461_LCDC_BITBLT_PATCOPY 0x00f0
397 1.1 uch #define HD64461_LCDC_BITBLT_PATINVERT 0x005a
398 1.1 uch #define HD64461_LCDC_BITBLT_DSTINVERT 0x0055
399 1.1 uch #define HD64461_LCDC_BITBLT_BLACKNESS 0x0000
400 1.1 uch #define HD64461_LCDC_BITBLT_WHITENESS 0x00ff
401 1.1 uch #define HD64461_LCDC_BITBLT_MASKEDSRCCOPY 0xccaa
402 1.2 uwe
403 1.2 uwe #endif /* !_HPCSH_DEV_HD64461VIDEOREG_H_ */
404