Home | History | Annotate | Line # | Download | only in dev
      1  1.11  tsutsui /*	$NetBSD: ctreg.h,v 1.11 2021/07/05 14:51:23 tsutsui Exp $	*/
      2   1.4      cgd 
      3   1.1      cgd /*
      4   1.3  mycroft  * Copyright (c) 1982, 1990, 1993
      5   1.3  mycroft  *	The Regents of the University of California.  All rights reserved.
      6   1.1      cgd  *
      7   1.1      cgd  * Redistribution and use in source and binary forms, with or without
      8   1.1      cgd  * modification, are permitted provided that the following conditions
      9   1.1      cgd  * are met:
     10   1.1      cgd  * 1. Redistributions of source code must retain the above copyright
     11   1.1      cgd  *    notice, this list of conditions and the following disclaimer.
     12   1.1      cgd  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1      cgd  *    notice, this list of conditions and the following disclaimer in the
     14   1.1      cgd  *    documentation and/or other materials provided with the distribution.
     15   1.8      agc  * 3. Neither the name of the University nor the names of its contributors
     16   1.1      cgd  *    may be used to endorse or promote products derived from this software
     17   1.1      cgd  *    without specific prior written permission.
     18   1.1      cgd  *
     19   1.1      cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20   1.1      cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21   1.1      cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22   1.1      cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23   1.1      cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24   1.1      cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25   1.1      cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26   1.1      cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27   1.1      cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28   1.1      cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29   1.1      cgd  * SUCH DAMAGE.
     30   1.1      cgd  *
     31   1.4      cgd  *	@(#)ctreg.h	8.1 (Berkeley) 6/10/93
     32   1.1      cgd  */
     33   1.1      cgd 
     34   1.1      cgd struct	ct_iocmd {
     35   1.1      cgd 	char	unit;
     36   1.1      cgd 	char	saddr;
     37   1.1      cgd 	short	addr0;
     38   1.1      cgd 	long	addr;
     39   1.1      cgd 	char	nop2;
     40   1.1      cgd 	char	slen;
     41   1.1      cgd 	long	len;
     42   1.1      cgd 	char	nop3;
     43   1.1      cgd 	char	cmd;
     44   1.1      cgd };
     45   1.1      cgd 
     46   1.1      cgd struct	ct_rscmd {
     47   1.1      cgd 	char	unit;
     48   1.1      cgd 	char	cmd;
     49   1.1      cgd };
     50   1.1      cgd 
     51   1.1      cgd struct	ct_stat {
     52   1.1      cgd 	char	c_vu;
     53   1.1      cgd 	char	c_pend;
     54   1.1      cgd 	short	c_ref;
     55   1.1      cgd 	short	c_fef;
     56   1.1      cgd 	short	c_aef;
     57   1.1      cgd 	short	c_ief;
     58   1.1      cgd 	short	c_blk0;
     59   1.1      cgd 	long	c_blk;
     60   1.1      cgd 	char	c_pad[4];
     61   1.1      cgd };
     62   1.1      cgd 
     63   1.1      cgd struct	ct_ssmcmd {
     64   1.1      cgd 	char	unit;
     65   1.1      cgd 	char	cmd;
     66   1.1      cgd 	short	refm;
     67   1.1      cgd 	short	fefm;
     68   1.1      cgd 	short	aefm;
     69   1.1      cgd 	short	iefm;
     70   1.1      cgd };
     71   1.1      cgd 
     72   1.1      cgd struct	ct_srcmd {
     73   1.1      cgd 	char	unit;
     74   1.1      cgd 	char	nop;
     75   1.1      cgd 	char	cmd;
     76   1.1      cgd 	char	param;
     77   1.1      cgd };
     78   1.1      cgd 
     79   1.1      cgd struct	ct_soptcmd {
     80   1.1      cgd 	char	unit;
     81   1.1      cgd 	char	nop;
     82   1.1      cgd 	char	cmd;
     83   1.1      cgd 	char	opt;
     84   1.1      cgd };
     85   1.1      cgd 
     86   1.1      cgd struct	ct_ulcmd {
     87   1.1      cgd 	char	unit;
     88   1.1      cgd 	char	cmd;
     89   1.1      cgd };
     90   1.1      cgd 
     91   1.1      cgd struct	ct_wfmcmd {
     92   1.1      cgd 	char	unit;
     93   1.1      cgd 	char	cmd;
     94   1.1      cgd };
     95   1.1      cgd 
     96   1.1      cgd struct	ct_clearcmd {
     97   1.1      cgd 	char	unit;
     98   1.1      cgd 	char	cmd;
     99   1.1      cgd };
    100   1.1      cgd 
    101   1.1      cgd #define	CT7946ID	0x220
    102   1.1      cgd #define CT9145ID	0x268
    103   1.1      cgd #define	CT9144ID	0x260
    104   1.1      cgd #define	CT9144		0
    105   1.1      cgd #define	CT7912PID	0x209
    106   1.1      cgd #define	CT7914PID	0x20B
    107   1.1      cgd #define	CT88140		1
    108   1.7   kleink #define	CT35401ID	0x270
    109   1.1      cgd 
    110   1.1      cgd /* convert bytes to 1k tape block and back */
    111   1.1      cgd #define CTBTOK(x)	((x) >> 10)
    112   1.1      cgd #define CTKTOB(x)	((x) << 10)
    113   1.1      cgd 
    114   1.1      cgd #define	CTCTLR		15
    115   1.1      cgd 
    116   1.1      cgd #define	REF_MASK	0x0
    117   1.1      cgd #define	FEF_MASK	0x0
    118   1.1      cgd #define	AEF_MASK	0x0
    119   1.1      cgd #define	IEF_MASK	0xF970
    120   1.1      cgd 
    121   1.1      cgd #define	FEF_PF		0x0002
    122   1.1      cgd #define	FEF_REXMT	0x0001
    123   1.1      cgd #define	AEF_EOF		0x0010
    124   1.1      cgd #define	AEF_EOV		0x0008
    125   1.1      cgd 
    126   1.1      cgd #define	C_READ		0x00
    127   1.1      cgd #define	C_WRITE		0x02
    128   1.1      cgd #define	C_CLEAR		0x08
    129   1.1      cgd #define	C_STATUS	0x0d
    130   1.1      cgd #define	C_SADDR		0x10
    131   1.1      cgd #define	C_SLEN		0x18
    132   1.1      cgd #define	C_SUNIT(x)	(0x20 | (x))
    133   1.1      cgd #define	C_SVOL(x)	(0x40 | (x))
    134   1.1      cgd #define	C_NOP		0x34
    135   1.1      cgd #define C_DESC		0x35
    136   1.1      cgd #define	C_SOPT		0x38
    137   1.1      cgd #define	C_SREL		0x3b
    138   1.1      cgd #define	C_SSM		0x3e
    139   1.1      cgd #define	C_WFM		0x49
    140   1.1      cgd #define	C_UNLOAD	0x4a
    141   1.6   scottr #define C_REL		0xc0
    142   1.1      cgd 
    143   1.1      cgd #define	C_CMD		0x05
    144   1.1      cgd #define	C_EXEC		0x0e
    145   1.1      cgd #define	C_QSTAT		0x10
    146   1.1      cgd #define	C_TCMD		0x12
    147   1.1      cgd 
    148   1.1      cgd #define C_CC            1
    149   1.1      cgd #define C_SKSPAR        2
    150   1.1      cgd #define	C_OPT		4
    151   1.1      cgd #define C_SPAR          4
    152   1.1      cgd #define C_IMRPT         8
    153