/[gxemul]/upstream/0.4.4/src/include/bt459.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.4.4/src/include/bt459.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35 - (show annotations)
Mon Oct 8 16:21:26 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/plain
File size: 5962 byte(s)
0.4.4
1 /* gxemul: $Id: bt459.h,v 1.3 2005/03/05 12:34:02 debug Exp $ */
2
3 #ifndef BT459_H
4 #define BT459_H
5
6 /* $NetBSD: bt459.h,v 1.6 2000/01/08 01:02:35 simonb Exp $ */
7
8 /*-
9 * Copyright (c) 1992, 1993
10 * The Regents of the University of California. All rights reserved.
11 *
12 * This code is derived from software contributed to Berkeley by
13 * Ralph Campbell.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 * 3. All advertising materials mentioning features or use of this software
24 * must display the following acknowledgement:
25 * This product includes software developed by the University of
26 * California, Berkeley and its contributors.
27 * 4. Neither the name of the University nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
32 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 * @(#)cfbreg.h 8.1 (Berkeley) 6/10/93
44 */
45
46 /*
47 * Mach Operating System
48 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
49 * All Rights Reserved.
50 *
51 * Permission to use, copy, modify and distribute this software and its
52 * documentation is hereby granted, provided that both the copyright
53 * notice and this permission notice appear in all copies of the
54 * software, derivative works or modified versions, and any portions
55 * thereof, and that both notices appear in supporting documentation.
56 *
57 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
58 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
59 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
60 *
61 * Carnegie Mellon requests users of this software to return to
62 *
63 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
64 * School of Computer Science
65 * Carnegie Mellon University
66 * Pittsburgh PA 15213-3890
67 *
68 * any improvements or extensions that they make and grant Carnegie the
69 * rights to redistribute these changes.
70 */
71
72 /*
73 * HISTORY
74 * Log: bt459.h,v
75 * Revision 2.4 91/02/05 17:39:43 mrt
76 * Added author notices
77 * [91/02/04 11:11:57 mrt]
78 *
79 * Changed to use new Mach copyright
80 * [91/02/02 12:09:39 mrt]
81 *
82 * Revision 2.3 90/12/05 23:30:26 af
83 * Cursor color register are supported, contrary to specs.
84 * [90/12/03 23:07:22 af]
85 *
86 * Revision 2.1.1.1 90/11/01 03:36:40 af
87 * Created, from Brooktree specs:
88 * "Product Databook 1989"
89 * "Bt459 135 MHz Monolithic CMOS 256x64 Color Palette RAMDAC"
90 * Brooktree Corp. San Diego, CA
91 * LA59001 Rev. J
92 * [90/09/03 af]
93 */
94
95 /*
96 * File: bt459.h
97 * Author: Alessandro Forin, Carnegie Mellon University
98 * Date: 9/90
99 *
100 * Defines for the bt459 Cursor/RAMDAC chip
101 */
102
103 typedef struct {
104 unsigned char addr_lo;
105 char pad0[3];
106 unsigned char addr_hi;
107 char pad1[3];
108 unsigned char addr_reg;
109 char pad2[3];
110 unsigned char addr_cmap;
111 char pad3[3];
112 } bt459_regmap_t;
113
114 /*
115 * Additional registers addressed indirectly
116 */
117
118 /* 0000-00ff Color Map entries */
119 /* 0100-010f Overlay color regs, unsupp */
120 #define BT459_REG_CCOLOR_1 0x0181 /* Cursor color regs */
121 #define BT459_REG_CCOLOR_2 0x0182
122 #define BT459_REG_CCOLOR_3 0x0183
123 #define BT459_REG_ID 0x0200 /* read-only, gives "4a" */
124 #define BT459_REG_CMD0 0x0201
125 #define BT459_REG_CMD1 0x0202
126 #define BT459_REG_CMD2 0x0203
127 #define BT459_REG_PRM 0x0204
128 /* 0205 reserved */
129 #define BT459_REG_PBM 0x0206
130 /* 0207 reserved */
131 #define BT459_REG_ORM 0x0208
132 #define BT459_REG_OBM 0x0209
133 #define BT459_REG_ILV 0x020a
134 #define BT459_REG_TEST 0x020b
135 #define BT459_REG_RSIG 0x020c
136 #define BT459_REG_GSIG 0x020d
137 #define BT459_REG_BSIG 0x020e
138 /* 020f-02ff reserved */
139 #define BT459_REG_CCR 0x0300
140 #define BT459_REG_CXLO 0x0301
141 #define BT459_REG_CXHI 0x0302
142 #define BT459_REG_CYLO 0x0303
143 #define BT459_REG_CYHI 0x0304
144 #define BT459_REG_WXLO 0x0305
145 #define BT459_REG_WXHI 0x0306
146 #define BT459_REG_WYLO 0x0307
147 #define BT459_REG_WYHI 0x0308
148 #define BT459_REG_WWLO 0x0309
149 #define BT459_REG_WWHI 0x030a
150 #define BT459_REG_WHLO 0x030b
151 #define BT459_REG_WHHI 0x030c
152 /* 030d-03ff reserved */
153 #define BT459_REG_CRAM_BASE 0x0400
154 #define BT459_REG_CRAM_END 0x07ff
155
156 #ifdef _KERNEL
157 int bt459init __P((struct fbinfo *));
158 void bt459RestoreCursorColor __P((struct fbinfo *));
159 void bt459CursorColor __P((struct fbinfo *, unsigned int []));
160 void bt459PosCursor __P((struct fbinfo *, int, int));
161 void bt459InitColorMap __P((struct fbinfo *));
162 int bt459LoadColorMap __P((struct fbinfo *, const u_char *, int, int));
163 int bt459GetColorMap __P((struct fbinfo *, u_char *, int, int));
164 void bt459LoadCursor __P((struct fbinfo *, u_short *));
165 int bt459_video_on __P((struct fbinfo *));
166 int bt459_video_off __P((struct fbinfo *));
167 #endif /* _KERNEL */
168
169 #endif /* BT459_H */

  ViewVC Help
Powered by ViewVC 1.1.26