p9100reg.h revision 1.1 1 1.1 macallan /* $NetBSD: p9100reg.h,v 1.1 2005/05/16 14:43:23 macallan Exp $ */
2 1.1 macallan
3 1.1 macallan /*-
4 1.1 macallan * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 1.1 macallan * All rights reserved.
6 1.1 macallan *
7 1.1 macallan * This code is derived from software contributed to The NetBSD Foundation
8 1.1 macallan * by Matt Thomas.
9 1.1 macallan *
10 1.1 macallan * Redistribution and use in source and binary forms, with or without
11 1.1 macallan * modification, are permitted provided that the following conditions
12 1.1 macallan * are met:
13 1.1 macallan * 1. Redistributions of source code must retain the above copyright
14 1.1 macallan * notice, this list of conditions and the following disclaimer.
15 1.1 macallan * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 macallan * notice, this list of conditions and the following disclaimer in the
17 1.1 macallan * documentation and/or other materials provided with the distribution.
18 1.1 macallan * 3. All advertising materials mentioning features or use of this software
19 1.1 macallan * must display the following acknowledgement:
20 1.1 macallan * This product includes software developed by the NetBSD
21 1.1 macallan * Foundation, Inc. and its contributors.
22 1.1 macallan * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 macallan * contributors may be used to endorse or promote products derived
24 1.1 macallan * from this software without specific prior written permission.
25 1.1 macallan *
26 1.1 macallan * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 macallan * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 macallan * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 macallan * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 macallan * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 macallan * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 macallan * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 macallan * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 macallan * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 macallan * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 macallan * POSSIBILITY OF SUCH DAMAGE.
37 1.1 macallan */
38 1.1 macallan
39 1.1 macallan
40 1.1 macallan #ifndef P9100_REG_H
41 1.1 macallan #define P9100_REG_H
42 1.1 macallan
43 1.1 macallan /* The Tadpole 3GX Technical Reference Manual lies. The ramdac registers
44 1.1 macallan * are map in 4 byte increments, not 8.
45 1.1 macallan */
46 1.1 macallan #define SCRN_RPNT_CTL_1 0x0138 /* Screen Respaint Timing Control 1 */
47 1.1 macallan #define VIDEO_ENABLED 0x00000020
48 1.1 macallan #define PWRUP_CNFG 0x0194 /* Power Up Configuration */
49 1.1 macallan #define DAC_CMAP_WRIDX 0x0200 /* IBM RGB528 Palette Address (Write) */
50 1.1 macallan #define DAC_CMAP_DATA 0x0204 /* IBM RGB528 Palette Data */
51 1.1 macallan #define DAC_PXL_MASK 0x0208 /* IBM RGB528 Pixel Mask */
52 1.1 macallan #define DAC_CMAP_RDIDX 0x020c /* IBM RGB528 Palette Address (Read) */
53 1.1 macallan #define DAC_INDX_LO 0x0210 /* IBM RGB528 Index Low */
54 1.1 macallan #define DAC_INDX_HI 0x0214 /* IBM RGB528 Index High */
55 1.1 macallan #define DAC_INDX_DATA 0x0218 /* IBM RGB528 Index Data (Indexed Registers) */
56 1.1 macallan #define DAC_INDX_CTL 0x021c /* IBM RGB528 Index Control */
57 1.1 macallan
58 1.1 macallan #define ENGINE_STATUS 0x2000 /* drawing engine status register */
59 1.1 macallan #define BLITTER_BUSY 0x80000000
60 1.1 macallan #define ENGINE_BUSY 0x40000000
61 1.1 macallan #define COMMAND_BLIT 0x2004
62 1.1 macallan #define COMMAND_QUAD 0x2008
63 1.1 macallan #define PIXEL_1 0x2080 /* pixel data for monochrome colour expansion */
64 1.1 macallan /* apparently bits 2-6 control how many pixels we write - n+1 */
65 1.1 macallan
66 1.1 macallan /* drawing engine registers */
67 1.1 macallan #define COORD_INDEX 0x218c
68 1.1 macallan #define WINDOW_OFFSET 0x2190
69 1.1 macallan
70 1.1 macallan #define FOREGROUND_COLOR 0x2200
71 1.1 macallan #define BACKGROUND_COLOR 0x2204
72 1.1 macallan #define PLANE_MASK 0x2208
73 1.1 macallan #define DRAW_MODE 0x220c
74 1.1 macallan #define PATTERN_ORIGIN_X 0x2210
75 1.1 macallan #define PATTERN_ORIGIN_Y 0x2214
76 1.1 macallan #define RASTER_OP 0x2218
77 1.1 macallan #define ROP_NO_SOLID 0x02000 /* if set use pattern instead of color for quad operations */
78 1.1 macallan #define ROP_2BIT_PATTERN 0x04000 /* 4-colour pattern instead of mono */
79 1.1 macallan #define ROP_PIX1_TRANS 0x08000 /* transparent background in mono */
80 1.1 macallan #define ROP_OVERSIZE 0x10000
81 1.1 macallan #define ROP_PATTERN 0x20000 /* the manual says pattern enable */
82 1.1 macallan #define ROP_TRANS 0x20000 /* but XFree86 says trans */
83 1.1 macallan #define ROP_SRC 0xCC
84 1.1 macallan #define ROP_PAT 0xF0
85 1.1 macallan #define ROP_DST 0xAA
86 1.1 macallan #define ROP_SET 0xff
87 1.1 macallan
88 1.1 macallan #define PIXEL_8 0x221c
89 1.1 macallan #define WINDOW_MIN 0x2220
90 1.1 macallan #define WINDOW_MAX 0x2224
91 1.1 macallan
92 1.1 macallan #define PATTERN0 0x2280
93 1.1 macallan #define PATTERN1 0x2284
94 1.1 macallan #define PATTERN2 0x2288
95 1.1 macallan #define PATTERN3 0x228c
96 1.1 macallan #define USER0 0x2290
97 1.1 macallan #define USER1 0x2294
98 1.1 macallan #define USER2 0x2298
99 1.1 macallan #define USER3 0x229c
100 1.1 macallan #define BYTE_CLIP_MIN 0x22a0
101 1.1 macallan #define BYTE_CLIP_MAX 0x22a4
102 1.1 macallan
103 1.1 macallan /* coordinate registers */
104 1.1 macallan #define ABS_X0 0x3008
105 1.1 macallan #define ABS_Y0 0x3010
106 1.1 macallan #define ABS_XY0 0x3018
107 1.1 macallan #define REL_X0 0x3028
108 1.1 macallan #define REL_Y0 0x3030
109 1.1 macallan #define REL_XY0 0x3038
110 1.1 macallan
111 1.1 macallan #define ABS_X1 0x3048
112 1.1 macallan #define ABS_Y1 0x3050
113 1.1 macallan #define ABS_XY1 0x3058
114 1.1 macallan #define REL_X1 0x3068
115 1.1 macallan #define REL_Y1 0x3070
116 1.1 macallan #define REL_XY1 0x3078
117 1.1 macallan
118 1.1 macallan #define ABS_X2 0x3088
119 1.1 macallan #define ABS_Y2 0x3090
120 1.1 macallan #define ABS_XY2 0x3098
121 1.1 macallan #define REL_X2 0x30a8
122 1.1 macallan #define REL_Y2 0x30b0
123 1.1 macallan #define REL_XY2 0x30b8
124 1.1 macallan
125 1.1 macallan #define ABS_X3 0x30c8
126 1.1 macallan #define ABS_Y3 0x30d0
127 1.1 macallan #define ABS_XY3 0x30d8
128 1.1 macallan #define REL_X3 0x30e8
129 1.1 macallan #define REL_Y3 0x30f0
130 1.1 macallan #define REL_XY3 0x30f8
131 1.1 macallan
132 1.1 macallan /* meta-coordinates */
133 1.1 macallan #define POINT_RTW_X 0x3208
134 1.1 macallan #define POINT_RTW_Y 0x3210
135 1.1 macallan #define POINT_RTW_XY 0x3218
136 1.1 macallan #define POINT_RTP_X 0x3228
137 1.1 macallan #define POINT_RTP_Y 0x3220
138 1.1 macallan #define POINT_RTP_XY 0x3238
139 1.1 macallan
140 1.1 macallan #define LINE_RTW_X 0x3248
141 1.1 macallan #define LINE_RTW_Y 0x3250
142 1.1 macallan #define LINE_RTW_XY 0x3258
143 1.1 macallan #define LINE_RTP_X 0x3268
144 1.1 macallan #define LINE_RTP_Y 0x3260
145 1.1 macallan #define LINE_RTP_XY 0x3278
146 1.1 macallan
147 1.1 macallan #define TRIANGLE_RTW_X 0x3288
148 1.1 macallan #define TRIANGLE_RTW_Y 0x3290
149 1.1 macallan #define TRIANGLE_RTW_XY 0x3298
150 1.1 macallan #define TRIANGLE_RTP_X 0x32a8
151 1.1 macallan #define TRIANGLE_RTP_Y 0x32a0
152 1.1 macallan #define TRIANGLE_RTP_XY 0x32b8
153 1.1 macallan
154 1.1 macallan #define QUAD_RTW_X 0x32c8
155 1.1 macallan #define QUAD_RTW_Y 0x32d0
156 1.1 macallan #define QUAD_RTW_XY 0x32d8
157 1.1 macallan #define QUAD_RTP_X 0x32e8
158 1.1 macallan #define QUAD_RTP_Y 0x32e0
159 1.1 macallan #define QUAD_RTP_XY 0x32f8
160 1.1 macallan
161 1.1 macallan #define RECT_RTW_X 0x3308
162 1.1 macallan #define RECT_RTW_Y 0x3310
163 1.1 macallan #define RECT_RTW_XY 0x3318
164 1.1 macallan #define RECT_RTP_X 0x3328
165 1.1 macallan #define RECT_RTP_Y 0x3320
166 1.1 macallan #define RECT_RTP_XY 0x3338
167 1.1 macallan
168 1.1 macallan #endif
169