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