dc503reg.h revision 1.1 1 1.1 tsutsui /* $NetBSD: dc503reg.h,v 1.1 2023/02/11 05:59:39 tsutsui Exp $ */
2 1.1 tsutsui /* $OpenBSD: dc503reg.h,v 1.1 2006/07/23 19:17:23 miod Exp $ */
3 1.1 tsutsui /* NetBSD: pmreg.h,v 1.7 2005/12/11 12:18:36 christos Exp */
4 1.1 tsutsui
5 1.1 tsutsui /*
6 1.1 tsutsui * Copyright (c) 1992, 1993
7 1.1 tsutsui * The Regents of the University of California. All rights reserved.
8 1.1 tsutsui *
9 1.1 tsutsui * This code is derived from software contributed to Berkeley by
10 1.1 tsutsui * Ralph Campbell.
11 1.1 tsutsui *
12 1.1 tsutsui * Redistribution and use in source and binary forms, with or without
13 1.1 tsutsui * modification, are permitted provided that the following conditions
14 1.1 tsutsui * are met:
15 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright
16 1.1 tsutsui * notice, this list of conditions and the following disclaimer.
17 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright
18 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the
19 1.1 tsutsui * documentation and/or other materials provided with the distribution.
20 1.1 tsutsui * 3. Neither the name of the University nor the names of its contributors
21 1.1 tsutsui * may be used to endorse or promote products derived from this software
22 1.1 tsutsui * without specific prior written permission.
23 1.1 tsutsui *
24 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 1.1 tsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 1.1 tsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 1.1 tsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 1.1 tsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 1.1 tsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 1.1 tsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 1.1 tsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 1.1 tsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 1.1 tsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 1.1 tsutsui * SUCH DAMAGE.
35 1.1 tsutsui *
36 1.1 tsutsui * @(#)pmreg.h 8.1 (Berkeley) 6/10/93
37 1.1 tsutsui */
38 1.1 tsutsui
39 1.1 tsutsui /*
40 1.1 tsutsui * Layout of the programmable cursor chip (DC503) registers.
41 1.1 tsutsui * All registers are 16 bit wide.
42 1.1 tsutsui */
43 1.1 tsutsui
44 1.1 tsutsui #define PCC_CMD 0x00 /* cursor command register */
45 1.1 tsutsui #define PCCCMD_TEST 0x8000
46 1.1 tsutsui #define PCCCMD_HSHI 0x4000
47 1.1 tsutsui #define PCCCMD_VBHI 0x2000
48 1.1 tsutsui #define PCCCMD_LODSA 0x1000
49 1.1 tsutsui #define PCCCMD_FORG2 0x0800
50 1.1 tsutsui #define PCCCMD_ENRG2 0x0400
51 1.1 tsutsui #define PCCCMD_FORG1 0x0200
52 1.1 tsutsui #define PCCCMD_ENRG1 0x0100
53 1.1 tsutsui #define PCCCMD_XHWID 0x0080
54 1.1 tsutsui #define PCCCMD_XHCL1 0x0040
55 1.1 tsutsui #define PCCCMD_XHCLP 0x0020
56 1.1 tsutsui #define PCCCMD_XHAIR 0x0010
57 1.1 tsutsui #define PCCCMD_FOPB 0x0008
58 1.1 tsutsui #define PCCCMD_ENPB 0x0004
59 1.1 tsutsui #define PCCCMD_FOPA 0x0002
60 1.1 tsutsui #define PCCCMD_ENPA 0x0001
61 1.1 tsutsui
62 1.1 tsutsui #define PCC_XPOS 0x04 /* cursor X position */
63 1.1 tsutsui #define PCC_YPOS 0x08 /* cursor Y position */
64 1.1 tsutsui #define PCC_XMIN_1 0x0c /* region 1 left edge */
65 1.1 tsutsui #define PCC_XMAX_1 0x10 /* region 1 right edge */
66 1.1 tsutsui #define PCC_YMIN_1 0x14 /* region 1 top edge */
67 1.1 tsutsui #define PCC_YMAX_1 0x18 /* region 1 bottom edge */
68 1.1 tsutsui #define PCC_XMIN_2 0x1c /* region 2 left edge */
69 1.1 tsutsui #define PCC_XMAX_2 0x20 /* region 2 right edge */
70 1.1 tsutsui #define PCC_YMIN_2 0x24 /* region 2 top edge */
71 1.1 tsutsui #define PCC_YMAX_2 0x28 /* region 2 bottom edge */
72 1.1 tsutsui #define PCC_LOAD 0x2c /* cursor pattern load */
73 1.1 tsutsui
74 1.1 tsutsui struct dc503reg {
75 1.1 tsutsui volatile uint16_t cmdr;
76 1.1 tsutsui int16_t pad1;
77 1.1 tsutsui volatile uint16_t xpos;
78 1.1 tsutsui int16_t pad2;
79 1.1 tsutsui volatile uint16_t ypos;
80 1.1 tsutsui int16_t pad3;
81 1.1 tsutsui volatile uint16_t xmin1;
82 1.1 tsutsui int16_t pad4;
83 1.1 tsutsui volatile uint16_t xmax1;
84 1.1 tsutsui int16_t pad5;
85 1.1 tsutsui volatile uint16_t ymin1;
86 1.1 tsutsui int16_t pad6;
87 1.1 tsutsui volatile uint16_t ymax1;
88 1.1 tsutsui int16_t pad7[9];
89 1.1 tsutsui volatile uint16_t xmin2;
90 1.1 tsutsui int16_t pad8;
91 1.1 tsutsui volatile uint16_t xmax2;
92 1.1 tsutsui int16_t pad9;
93 1.1 tsutsui volatile uint16_t ymin2;
94 1.1 tsutsui int16_t pad10;
95 1.1 tsutsui volatile uint16_t ymax2;
96 1.1 tsutsui int16_t pad11;
97 1.1 tsutsui volatile uint16_t load;
98 1.1 tsutsui };
99 1.1 tsutsui
100 1.1 tsutsui #define PCC_CURSOR_SIZE 16
101