|
|
1.1 root 1: /*
2: * Copyright (c) 1988 University of Utah.
3: * Copyright (c) 1990 The Regents of the University of California.
4: * All rights reserved.
5: *
6: * This code is derived from software contributed to Berkeley by
7: * the Systems Programming Group of the University of Utah Computer
8: * Science Department.
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 University of
21: * California, Berkeley and its contributors.
22: * 4. Neither the name of the University nor the names of its contributors
23: * may be used to endorse or promote products derived from this software
24: * without specific prior written permission.
25: *
26: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36: * SUCH DAMAGE.
37: *
38: * from: Utah $Hdr: grf_gbreg.h 1.1 90/07/09$
39: *
40: * @(#)grf_gbreg.h 7.2 (Berkeley) 11/4/90
41: */
42:
43: /*
44: * Gatorbox driver regs
45: */
46:
47: #define TILER_ENABLE 0x80
48: #define LINE_MOVER_ENABLE 0x80
49: #define UP_LEFT 0x00
50: #define DOWN_RIGHT 0x40
51: #define MOVE_UP_LEFT TILER_ENABLE|UP_LEFT
52: #define MOVE_DOWN_RIGHT TILER_ENABLE|DOWN_RIGHT
53:
54: #define tile_mover_waitbusy(regaddr) \
55: while (((struct gboxfb *)(regaddr))->sec_interrupt & 0x10)
56:
57: #define line_mover_waitbusy(regaddr) \
58: while ((((struct gboxfb *)(regaddr))->status & 0x80) == 0)
59:
60: #define gbcm_waitbusy(regaddr) \
61: while (((struct gboxfb *)(regaddr))->cmap_busy != 0xff)
62:
63: #define vu_char volatile u_char
64:
65: struct gboxfb {
66: u_char :8;
67: vu_char reset; /* reset register 0x01 */
68: vu_char sec_interrupt; /* Secondary interrupt register 0x03 */
69: vu_char interrupt; /* interrupt register 0x03 */
70: u_char :8;
71: vu_char fbwmsb; /* frame buffer width MSB 0x05 */
72: u_char :8;
73: vu_char fbwlsb; /* frame buffer width MSB 0x07 */
74: u_char :8;
75: vu_char fbhmsb; /* frame buffer height MSB 0x09 */
76: u_char :8;
77: vu_char fbhlsb; /* frame buffer height MSB 0x0b */
78: u_char :8;
79: vu_char dwmsb; /* display width MSB 0x0d */
80: u_char :8;
81: vu_char dwlsb; /* display width MSB 0x0f */
82: u_char :8;
83: vu_char dhmsb; /* display height MSB 0x11 */
84: u_char :8;
85: vu_char dhlsb; /* display height MSB 0x13 */
86: u_char :8;
87: vu_char fbid; /* Scondary frame buffer id 0x15 */
88: u_char f1[0x5d-0x15-1];
89: vu_char fbomsb; /* frame buffer offset MSB 0x5d */
90: u_char :8;
91: vu_char fbolsb; /* frame buffer offset LSB 0x5f */
92: u_char f2[0x4000-0x5f-1];
93: vu_char crtc_address; /* CTR controller address reg 0x4000 */
94: vu_char status; /* Status register 0x4001 */
95: vu_char crtc_data; /* CTR controller data reg 0x4002 */
96: u_char f3[6];
97: vu_char line_mover_rep_rule; /* Line move rep rule */
98: u_char :8, :8;
99: vu_char line_mover_width; /* Line move width */
100: u_char f4[0xff3];
101: vu_char width; /* width in tiles 0x5001 */
102: u_char :8;
103: vu_char height; /* height in tiles 0x5003 */
104: u_char f5[3];
105: vu_char rep_rule; /* replacement rule 0x5007 */
106: u_char f6[0x6001-0x5007-1];
107: vu_char blink1; /* blink 1 0x6001 */
108: u_char f7[3];
109: vu_char blink2; /* blink 2 0x6005 */
110: u_char f8[3];
111: vu_char write_protect; /* write protect 0x6009 */
112: u_char f9[0x6803-0x6009-1];
113: vu_char cmap_busy; /* color map busy 0x6803 */
114: u_char f10[0x68b9-0x6803-1];
115: vu_char creg_select; /* color map register select 0x68b8 */
116: u_char f11[0x68f1-0x68b9-1];
117: vu_char cmap_write; /* color map write trigger 0x68f1 */
118: u_char f12[0x69b3-0x68f1-1];
119: vu_char cmap_red; /* red value register 0x69b3 */
120: u_char :8;
121: vu_char cmap_grn; /* green value register 0x69b5 */
122: u_char :8;
123: vu_char cmap_blu; /* blue value register 0x69b6 */
124: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.