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