xref: /original-bsd/sys/pmax/dev/pmreg.h (revision 3705696b)
1 /*
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Ralph Campbell.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)pmreg.h	8.1 (Berkeley) 06/10/93
11  */
12 
13 /*
14  * Defines for the graphics hardware.
15  */
16 
17 /*
18  * Structure to descripte the programmable cursor chip (DC503) from DEC.
19  */
20 typedef volatile struct PCCRegs {
21 	u_short	cmdr;	/* cursor command register */
22 	short	pad1;
23 	u_short	xpos;	/* cursor X position */
24 	short	pad2;
25 	u_short	ypos;	/* cursor Y position */
26 	short	pad3;
27 	u_short	xmin1;	/* region 1 left edge */
28 	short	pad4;
29 	u_short	xmax1;	/* region 1 right edge */
30 	short	pad5;
31 	u_short	ymin1;	/* region 1 top edge */
32 	short	pad6;
33 	u_short	ymax1;	/* region 1 bottom edge */
34 	short	pad7[9];
35 	u_short	xmin2;	/* region 2 left edge */
36 	short	pad8;
37 	u_short	xmax2;	/* region 2 right edge */
38 	short	pad9;
39 	u_short	ymin2;	/* region 2 top edge */
40 	short	pad10;
41 	u_short	ymax2;	/* region 2 bottom edge */
42 	short	pad11;
43 	u_short	memory;	/* cursor sprite pattern load */
44 } PCCRegs;
45 
46 	/* define bits in pcc_cmdr */
47 #define PCC_TEST	0x8000
48 #define PCC_HSHI	0x4000
49 #define PCC_VBHI	0x2000
50 #define PCC_LODSA	0x1000
51 #define PCC_FORG2	0x0800
52 #define PCC_ENRG2	0x0400
53 #define PCC_FORG1	0x0200
54 #define PCC_ENRG1	0x0100
55 #define PCC_XHWID	0x0080
56 #define PCC_XHCL1	0x0040
57 #define PCC_XHCLP	0x0020
58 #define PCC_XHAIR	0x0010
59 #define PCC_FOPB	0x0008
60 #define PCC_ENPB	0x0004
61 #define PCC_FOPA	0x0002
62 #define PCC_ENPA	0x0001
63 
64 	/* offset for cursor X & Y locations */
65 #define PCC_X_OFFSET	212
66 #define PCC_Y_OFFSET	34
67 
68 typedef volatile struct VDACRegs {
69 	u_char	mapWA;		/* address register (color map write) */
70 	char	pad1[3];
71 	u_char	map;		/* color map */
72 	char	pad2[3];
73 	u_char	mask;		/* pixel read mask */
74 	char	pad3[3];
75 	u_char	mapRA;		/* address register (color map read) */
76 	char	pad4[3];
77 	u_char	overWA;		/* address register (overlay map write) */
78 	char	pad5[3];
79 	u_char	over;		/* overlay map */
80 	char	pad6[7];
81 	u_char	overRA;		/* address register (overlay map read) */
82 } VDACRegs;
83