1 /* $OpenBSD: mc6845.h,v 1.3 2002/07/02 19:38:55 nate Exp $ */ 2 3 /* 4 * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. 5 * Copyright (c) 1992, 1993 Brian Dunford-Shore. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by Michael Shalayeff. 19 * 4. The name of the author may not be used to endorse or promote products 20 * derived from this software without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 24 * 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 */ 35 36 37 #define MONO_BASE 0x3B4 /* crtc index register address mono */ 38 #define CGA_BASE 0x3D4 /* crtc index register address color */ 39 40 #define CRTC_ADDR 0x00 /* index register */ 41 42 #define CRTC_HTOTAL 0x00 /* horizontal total */ 43 #define CRTC_HDISPLE 0x01 /* horizontal display end */ 44 #define CRTC_HBLANKS 0x02 /* horizontal blank start */ 45 #define CRTC_HBLANKE 0x03 /* horizontal blank end */ 46 #define CRTC_HSYNCS 0x04 /* horizontal sync start */ 47 #define CRTC_HSYNCE 0x05 /* horizontal sync end */ 48 #define CRTC_VTOTAL 0x06 /* vertical total */ 49 #define CRTC_OVERFLL 0x07 /* overflow low */ 50 #define CRTC_IROWADDR 0x08 /* initial row address */ 51 #define CRTC_MAXROW 0x09 /* maximum row address */ 52 #define CRTC_CURSTART 0x0A /* cursor start row address */ 53 #define CRTC_CUREND 0x0B /* cursor end row address */ 54 #define CRTC_STARTADRH 0x0C /* linear start address mid */ 55 #define CRTC_STARTADRL 0x0D /* linear start address low */ 56 #define CRTC_CURSORH 0x0E /* cursor address mid */ 57 #define CRTC_CURSORL 0x0F /* cursor address low */ 58 #define CRTC_VSYNCS 0x10 /* vertical sync start */ 59 #define CRTC_VSYNCE 0x11 /* vertical sync end */ 60 #define CRTC_VDE 0x12 /* vertical display end */ 61 #define CRTC_OFFSET 0x13 /* row offset */ 62 #define CRTC_ULOC 0x14 /* underline row address */ 63 #define CRTC_VBSTART 0x15 /* vertical blank start */ 64 #define CRTC_VBEND 0x16 /* vertical blank end */ 65 #define CRTC_MODE 0x17 /* CRTC mode register */ 66 #define CRTC_SPLITL 0x18 /* split screen start low */ 67 68 /* start of ET4000 extensions */ 69 70 #define CRTC_RASCAS 0x32 /* ras/cas configuration */ 71 #define CRTC_EXTSTART 0x33 /* extended start address */ 72 #define CRTC_COMPAT6845 0x34 /* 6845 comatibility control */ 73 #define CRTC_OVFLHIGH 0x35 /* overflow high */ 74 #define CRTC_SYSCONF1 0x36 /* video system configuration 1 */ 75 #define CRTC_SYSCONF2 0x36 /* video system configuration 2 */ 76 77 /* start of WD/Paradise extensions */ 78 79 #define CRTC_PR10 0x29 /* r/w unlocking */ 80 #define CRTC_PR11 0x2A /* ega switches */ 81 #define CRTC_PR12 0x2B /* scratch pad */ 82 #define CRTC_PR13 0x2C /* interlace h/2 start */ 83 #define CRTC_PR14 0x2D /* interlace h/2 end */ 84 #define CRTC_PR15 0x2E /* misc control #1 */ 85 #define CRTC_PR16 0x2F /* misc control #2 */ 86 #define CRTC_PR17 0x30 /* misc control #3 */ 87 /* 0x31 .. 0x3f reserved */ 88 /* Video 7 */ 89 90 #define CRTC_V7ID 0x1f /* identification register */ 91 92 /* Trident */ 93 94 #define CRTC_MTEST 0x1e /* module test register */ 95 #define CRTC_SOFTPROG 0x1f /* software programming */ 96 #define CRTC_LATCHRDB 0x22 /* latch read back register */ 97 #define CRTC_ATTRSRDB 0x24 /* attribute state read back register*/ 98 #define CRTC_ATTRIRDB 0x26 /* attribute index read back register*/ 99 #define CRTC_HOSTAR 0x27 /* high order start address register */ 100 101