1 /* $NetBSD: tgareg.h,v 1.1 1998/04/15 20:16:33 drochner Exp $ */ 2 3 /* 4 * Copyright (c) 1995, 1996 Carnegie-Mellon University. 5 * All rights reserved. 6 * 7 * Author: Chris G. Demetriou 8 * 9 * Permission to use, copy, modify and distribute this software and 10 * its documentation is hereby granted, provided that both the copyright 11 * notice and this permission notice appear in all copies of the 12 * software, derivative works or modified versions, and any portions 13 * thereof, and that both notices appear in supporting documentation. 14 * 15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 17 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 18 * 19 * Carnegie Mellon requests users of this software to return to 20 * 21 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU 22 * School of Computer Science 23 * Carnegie Mellon University 24 * Pittsburgh PA 15213-3890 25 * 26 * any improvements or extensions that they make and grant Carnegie the 27 * rights to redistribute these changes. 28 */ 29 30 #ifndef _ALPHA_INCLUDE_TGAREG_H_ 31 #define _ALPHA_INCLUDE_TGAREG_H_ 32 33 /* 34 * Device-specific PCI register offsets and contents. 35 */ 36 37 #define TGA_PCIREG_PVRR 0x40 /* PCI Address Extension Register */ 38 39 #define TGA_PCIREG_PAER 0x44 /* PCI VGA Redirect Register */ 40 41 /* 42 * TGA Memory Space offsets 43 */ 44 45 #define TGA_MEM_ALTROM 0x0000000 /* 0MB -- Alternate ROM space */ 46 #define TGA_MEM_CREGS 0x0100000 /* 1MB -- Core Registers */ 47 /* Display and Back Buffers mapped at config-dependent addresses */ 48 49 /* 50 * TGA Core Space register numbers and contents. 51 */ 52 53 typedef u_int32_t tga_reg_t; 54 55 #define TGA_REG_GCBR0 0x000 /* Copy buffer 0 */ 56 #define TGA_REG_GCBR1 0x001 /* Copy buffer 1 */ 57 #define TGA_REG_GCBR2 0x002 /* Copy buffer 2 */ 58 #define TGA_REG_GCBR3 0x003 /* Copy buffer 3 */ 59 #define TGA_REG_GCBR4 0x004 /* Copy buffer 4 */ 60 #define TGA_REG_GCBR5 0x005 /* Copy buffer 5 */ 61 #define TGA_REG_GCBR6 0x006 /* Copy buffer 6 */ 62 #define TGA_REG_GCBR7 0x007 /* Copy buffer 7 */ 63 64 #define TGA_REG_GFGR 0x008 /* Foreground */ 65 #define TGA_REG_GBGR 0x009 /* Background */ 66 #define TGA_REG_GPMR 0x00a /* Plane Mask */ 67 #define TGA_REG_GPXR_S 0x00b /* Pixel Mask (one-shot) */ 68 #define TGA_REG_GMOR 0x00c /* Mode */ 69 #define TGA_REG_GOPR 0x00d /* Raster Operation */ 70 #define TGA_REG_GPSR 0x00e /* Pixel Shift */ 71 #define TGA_REG_GADR 0x00f /* Address */ 72 73 #define TGA_REG_GB1R 0x010 /* Bresenham 1 */ 74 #define TGA_REG_GB2R 0x011 /* Bresenham 2 */ 75 #define TGA_REG_GB3R 0x012 /* Bresenham 3 */ 76 77 #define TGA_REG_GCTR 0x013 /* Continue */ 78 #define TGA_REG_GDER 0x014 /* Deep */ 79 /* reserved 0x015 */ 80 #define TGA_REG_GSMR 0x016 /* Stencil Mode */ 81 #define TGA_REG_GPXR_P 0x017 /* Pixel Mask (persistent) */ 82 #define TGA_REG_CCBR 0x018 /* Cursor Base Address */ 83 #define TGA_REG_VHCR 0x019 /* Horizontal Control */ 84 #define TGA_REG_VVCR 0x01a /* Vertical Control */ 85 #define TGA_REG_VVBR 0x01b /* Video Base Address */ 86 #define TGA_REG_VVVR 0x01c /* Video Valid */ 87 #define TGA_REG_CXYR 0x01d /* Cursor XY */ 88 #define TGA_REG_VSAR 0x01e /* Video Shift Address */ 89 #define TGA_REG_SISR 0x01f /* Interrupt Status */ 90 #define TGA_REG_GDAR 0x020 /* Data */ 91 #define TGA_REG_GRIR 0x021 /* Red Increment */ 92 #define TGA_REG_GGIR 0x022 /* Green Increment */ 93 #define TGA_REG_GBIR 0x023 /* Blue Increment */ 94 #define TGA_REG_GZIR_L 0x024 /* Z-increment Low */ 95 #define TGA_REG_GZIR_H 0x025 /* Z-Increment High */ 96 #define TGA_REG_GDBR 0x026 /* DMA Base Address */ 97 #define TGA_REG_GBWR 0x027 /* Bresenham Width */ 98 #define TGA_REG_GZVR_L 0x028 /* Z-value Low */ 99 #define TGA_REG_GZVR_H 0x029 /* Z-value High */ 100 #define TGA_REG_GZBR 0x02a /* Z-base address */ 101 /* GADR alias 0x02b */ 102 #define TGA_REG_GRVR 0x02c /* Red Value */ 103 #define TGA_REG_GGVR 0x02d /* Green Value */ 104 #define TGA_REG_GBVR 0x02e /* Blue Value */ 105 #define TGA_REG_GSWR 0x02f /* Span Width */ 106 #define TGA_REG_EPSR 0x030 /* Pallete and DAC Setup */ 107 108 /* reserved 0x031 - 0x3f */ 109 110 #define TGA_REG_GSNR0 0x040 /* Slope-no-go 0 */ 111 #define TGA_REG_GSNR1 0x041 /* Slope-no-go 1 */ 112 #define TGA_REG_GSNR2 0x042 /* Slope-no-go 2 */ 113 #define TGA_REG_GSNR3 0x043 /* Slope-no-go 3 */ 114 #define TGA_REG_GSNR4 0x044 /* Slope-no-go 4 */ 115 #define TGA_REG_GSNR5 0x045 /* Slope-no-go 5 */ 116 #define TGA_REG_GSNR6 0x046 /* Slope-no-go 6 */ 117 #define TGA_REG_GSNR7 0x047 /* Slope-no-go 7 */ 118 119 #define TGA_REG_GSLR0 0x048 /* Slope 0 */ 120 #define TGA_REG_GSLR1 0x049 /* Slope 1 */ 121 #define TGA_REG_GSLR2 0x04a /* Slope 2 */ 122 #define TGA_REG_GSLR3 0x04b /* Slope 3 */ 123 #define TGA_REG_GSLR4 0x04c /* Slope 4 */ 124 #define TGA_REG_GSLR5 0x04d /* Slope 5 */ 125 #define TGA_REG_GSLR6 0x04e /* Slope 6 */ 126 #define TGA_REG_GSLR7 0x04f /* Slope 7 */ 127 128 #define TGA_REG_GBCR0 0x050 /* Block Color 0 */ 129 #define TGA_REG_GBCR1 0x051 /* Block Color 1 */ 130 #define TGA_REG_GBCR2 0x052 /* Block Color 2 */ 131 #define TGA_REG_GBCR3 0x053 /* Block Color 3 */ 132 #define TGA_REG_GBCR4 0x054 /* Block Color 4 */ 133 #define TGA_REG_GBCR5 0x055 /* Block Color 5 */ 134 #define TGA_REG_GBCR6 0x056 /* Block Color 6 */ 135 #define TGA_REG_GBCR7 0x057 /* Block Color 7 */ 136 137 #define TGA_REG_GCSR 0x058 /* Copy 64 Source */ 138 #define TGA_REG_GCDR 0x059 /* Copy 64 Destination */ 139 /* GC[SD]R aliases 0x05a - 0x05f */ 140 141 /* reserved 0x060 - 0x077 */ 142 143 #define TGA_REG_ERWR 0x078 /* EEPROM write */ 144 145 /* reserved 0x079 */ 146 147 #define TGA_REG_ECGR 0x07a /* Clock */ 148 149 /* reserved 0x07b */ 150 151 #define TGA_REG_EPDR 0x07c /* Pallete and DAC Data */ 152 153 /* reserved 0x07d */ 154 155 #define TGA_REG_SCSR 0x07e /* Command Status */ 156 157 /* reserved 0x07f */ 158 159 #endif /* _ALPHA_INCLUDE_TGAREG_H_ */ 160