Home | History | Annotate | Line # | Download | only in isa
madreg.h revision 1.2.4.1
      1  1.2.4.1   thorpej /*	$NetBSD: madreg.h,v 1.2.4.1 1997/08/23 07:13:24 thorpej Exp $	*/
      2      1.1  augustss /*
      3      1.1  augustss  * Copyright (c) 1996 Lennart Augustsson
      4      1.1  augustss  * Copyright (c) 1995 Hannu Savolainen
      5      1.1  augustss  * Copyright (c) 1991-1993 Regents of the University of California.
      6      1.1  augustss  * All rights reserved.
      7      1.1  augustss  *
      8      1.1  augustss  * Redistribution and use in source and binary forms, with or without
      9      1.1  augustss  * modification, are permitted provided that the following conditions
     10      1.1  augustss  * are met:
     11      1.1  augustss  * 1. Redistributions of source code must retain the above copyright
     12      1.1  augustss  *    notice, this list of conditions and the following disclaimer.
     13      1.1  augustss  * 2. Redistributions in binary form must reproduce the above copyright
     14      1.1  augustss  *    notice, this list of conditions and the following disclaimer in the
     15      1.1  augustss  *    documentation and/or other materials provided with the distribution.
     16      1.1  augustss  * 3. All advertising materials mentioning features or use of this software
     17      1.1  augustss  *    must display the following acknowledgement:
     18      1.1  augustss  *	This product includes software developed by the Computer Systems
     19      1.1  augustss  *	Engineering Group at Lawrence Berkeley Laboratory.
     20      1.1  augustss  * 4. Neither the name of the University nor of the Laboratory may be used
     21      1.1  augustss  *    to endorse or promote products derived from this software without
     22      1.1  augustss  *    specific prior written permission.
     23      1.1  augustss  *
     24      1.1  augustss  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     25      1.1  augustss  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26      1.1  augustss  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27      1.1  augustss  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     28      1.1  augustss  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29      1.1  augustss  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30      1.1  augustss  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31      1.1  augustss  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32      1.1  augustss  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33      1.1  augustss  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34      1.1  augustss  * SUCH DAMAGE.
     35      1.1  augustss  *
     36      1.1  augustss  */
     37      1.1  augustss 
     38      1.1  augustss /*
     39      1.1  augustss  * Variations of the suppored chips.
     40      1.1  augustss  */
     41      1.1  augustss 
     42      1.1  augustss #define MAD_NONE	0
     43      1.1  augustss #define MAD_82C928	1		/* OPTi 82C928     MAD16 */
     44      1.1  augustss #define MAD_OTI601D	2		/* OAK OTI-601D    Mozart */
     45      1.1  augustss #define MAD_82C929	3		/* OPTi 82C929     MAD16 Pro */
     46      1.1  augustss 
     47      1.1  augustss /*
     48      1.1  augustss  *    Registers
     49      1.1  augustss  *
     50      1.1  augustss  *      The MAD16 occupies I/O ports 0xf8d to 0xf93 (fixed locations).
     51      1.1  augustss  *      All ports are inactive by default. They can be activated by
     52      1.1  augustss  *      writing 0xE2 or 0xE3 to the password register. The password is valid
     53      1.1  augustss  *      only until the next I/O read or write.
     54      1.1  augustss  */
     55      1.1  augustss 
     56      1.1  augustss #define MAD_BASE	0xf8d
     57      1.1  augustss #define MAD_NPORT	7
     58      1.1  augustss 
     59      1.1  augustss #define MC1_PORT	0	/* SB address, CDROM interface type, joystick */
     60      1.1  augustss #define MC2_PORT	1	/* CDROM address, IRQ, DMA, plus OPL4 bit */
     61      1.1  augustss #define MC3_PORT	2
     62      1.1  augustss #define MC_PASSWD_REG	MC3_PORT
     63      1.1  augustss #define MC4_PORT	3
     64      1.1  augustss #define MC5_PORT	4
     65      1.1  augustss #define MC6_PORT	5
     66      1.1  augustss #define MC7_PORT	6
     67      1.1  augustss 
     68      1.1  augustss #define MC1_NOCD	0x00
     69      1.1  augustss #define MC1_JOYDISABLE	0x01
     70      1.1  augustss #define MC1_SONY	0x02
     71      1.1  augustss #define MC1_MITSUMI	0x04
     72      1.1  augustss #define MC1_PANASONIC	0x06
     73      1.1  augustss #define MC1_SECIDE	0x08
     74      1.1  augustss #define MC1_PRIMIDE	0x0a
     75      1.1  augustss 
     76      1.1  augustss #define MC2_CDDISABLE	0x03
     77      1.1  augustss #define MC2_OPL4	0x20
     78      1.1  augustss 
     79      1.1  augustss /* Possible WSS emulation ports */
     80      1.1  augustss #define M_WSS_PORT0 0x530
     81      1.1  augustss #define M_WSS_PORT1 0xe80
     82      1.1  augustss #define M_WSS_PORT2 0xf40
     83      1.1  augustss #define M_WSS_PORT3 0x604
     84      1.1  augustss #define M_WSS_NPORTS 4
     85      1.1  augustss 
     86      1.1  augustss /* Port 1 */
     87      1.1  augustss #define M_WSS_PORT_SELECT(i) (0x80 | ((i) << 4))
     88      1.1  augustss 
     89      1.1  augustss #define M_PASSWD_928	0xe2
     90      1.1  augustss #define M_PASSWD_929	0xe3
     91  1.2.4.1   thorpej 
     92  1.2.4.1   thorpej /* Regions of I/O space that the MAD occupies besides
     93  1.2.4.1   thorpej    WSS emulation and MAD_BASE.  Talk about waste. */
     94  1.2.4.1   thorpej #define MAD_REG1 0x220
     95  1.2.4.1   thorpej #define MAD_LEN1 16
     96  1.2.4.1   thorpej #define MAD_REG2 0x380
     97  1.2.4.1   thorpej #define MAD_LEN2 2
     98  1.2.4.1   thorpej #define MAD_REG3 0x388
     99  1.2.4.1   thorpej #define MAD_LEN3 4
    100