Home | History | Annotate | Line # | Download | only in ibus
pmreg.h revision 1.2
      1 /*	$NetBSD: pmreg.h,v 1.2 2003/12/13 23:04:38 ad Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1992, 1993
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * This code is derived from software contributed to Berkeley by
      8  * Ralph Campbell.
      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. Neither the name of the University nor the names of its contributors
     19  *    may be used to endorse or promote products derived from this software
     20  *    without specific prior written permission.
     21  *
     22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32  * SUCH DAMAGE.
     33  *
     34  *	@(#)pmreg.h	8.1 (Berkeley) 6/10/93
     35  */
     36 
     37 #ifndef _PMREG_H_
     38 #define	_PMREG_H_
     39 
     40 /*
     41  * Structure to describe the programmable cursor chip (DC503) from DEC.
     42  */
     43 typedef volatile struct PCCRegs {
     44 	u_short	cmdr;	/* cursor command register */
     45 	short	pad1;
     46 	u_short	xpos;	/* cursor X position */
     47 	short	pad2;
     48 	u_short	ypos;	/* cursor Y position */
     49 	short	pad3;
     50 	u_short	xmin1;	/* region 1 left edge */
     51 	short	pad4;
     52 	u_short	xmax1;	/* region 1 right edge */
     53 	short	pad5;
     54 	u_short	ymin1;	/* region 1 top edge */
     55 	short	pad6;
     56 	u_short	ymax1;	/* region 1 bottom edge */
     57 	short	pad7[9];
     58 	u_short	xmin2;	/* region 2 left edge */
     59 	short	pad8;
     60 	u_short	xmax2;	/* region 2 right edge */
     61 	short	pad9;
     62 	u_short	ymin2;	/* region 2 top edge */
     63 	short	pad10;
     64 	u_short	ymax2;	/* region 2 bottom edge */
     65 	short	pad11;
     66 	u_short	memory;	/* cursor sprite pattern load */
     67 } PCCRegs;
     68 
     69 /*
     70  * Bits in pcc_cmdr.
     71  */
     72 #define PCC_TEST	0x8000
     73 #define PCC_HSHI	0x4000
     74 #define PCC_VBHI	0x2000
     75 #define PCC_LODSA	0x1000
     76 #define PCC_FORG2	0x0800
     77 #define PCC_ENRG2	0x0400
     78 #define PCC_FORG1	0x0200
     79 #define PCC_ENRG1	0x0100
     80 #define PCC_XHWID	0x0080
     81 #define PCC_XHCL1	0x0040
     82 #define PCC_XHCLP	0x0020
     83 #define PCC_XHAIR	0x0010
     84 #define PCC_FOPB	0x0008
     85 #define PCC_ENPB	0x0004
     86 #define PCC_FOPA	0x0002
     87 #define PCC_ENPA	0x0001
     88 
     89 /*
     90  * Magic offset for cursor X & Y locations.
     91  */
     92 #define PCC_X_OFFSET	212
     93 #define PCC_Y_OFFSET	34
     94 
     95 /*
     96  * Defines for the BrookTree bt478 VDAC.
     97  */
     98 typedef volatile struct VDACRegs {
     99 	u_char	mapWA;		/* address register (color map write) */
    100 	char	pad1[3];
    101 	u_char	map;		/* color map */
    102 	char	pad2[3];
    103 	u_char	mask;		/* pixel read mask */
    104 	char	pad3[3];
    105 	u_char	mapRA;		/* address register (color map read) */
    106 	char	pad4[3];
    107 	u_char	overWA;		/* address register (overlay map write) */
    108 	char	pad5[3];
    109 	u_char	over;		/* overlay map */
    110 	char	pad6[7];
    111 	u_char	overRA;		/* address register (overlay map read) */
    112 } VDACRegs;
    113 
    114 #endif	/* !_PMREG_H_ */
    115