/**********************************************************************/
/*                                                                    */
/*            SupraDirect.h                                           */
/*                                                                    */
/*            For the Amiga                                           */
/*            Series II                                               */
/*            Version 1.09                                            */
/*            January 5, 1990                                         */
/*                                                                    */
/*            SUPRA CORPORATION                                       */
/*            by Clark A. Stevens                                     */
/*                                                                    */
/*            (c) 1988,1989,1990                                      */
/*                                                                    */
/**********************************************************************/

/**********************************************************************/
/*                                                                    */
/*  Copyright 1988,89,90  Clark A. Stevens & Supra Corporation        */
/*                                                                    */
/*  All Rights Reserved                                               */
/*                                                                    */
/*  The files and information contained in this file may not be       */
/*  transmitted, transcribed, translated, or reproduced in any form.  */
/*                                                                    */
/**********************************************************************/

/**********************************************************************/
/*                                                                    */
/*                            DISCLAIMER                              */
/*                                                                    */
/*  THE INFORMATION CONTAINED HEREIN IS SUBJECT TO CHANGE WITHOUT     */
/*  NOTICE AND IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,     */
/*  EITHER EXPRESS OR IMPLIED.  SUPRA MAKES NO REPRESENTATIONS AS TO  */
/*  THE ACCURACY, RELIABILITY, OR CURRENTNESS OF THIS INFORMATION,    */
/*  AND THE ENTIRE RISK AS TO THE USE OF THIS INFORMATION IS ASSUMED  */
/*  BY THE USER.                                                      */
/*                                                                    */
/**********************************************************************/

/**********************************************************************/
/*  A special note regarding this code.                               */
/*                                                                    */
/*  This code was written with tabs set to 4 on a screen running      */
/*  overscan.  If the format of the code looks weird to you, try      */
/*  those settings.                                                   */
/*                                                                    */
/*  This code is in an on going state of refinement.  As such, there  */
/*  are many features that aren't included yet, mostly because so     */
/*  far there hasn't been for them.  Currently, the most apparent     */
/*  place this code may be found lacking, is that it only supports    */
/*  one open device at a time.  However, a little reorganization      */
/*  could have this code working easily with handles.                 */
/*                                                                    */
/**********************************************************************/

#ifndef	SUPRA_DIRECT_H
#define	SUPRA_DIRECT_H
#endif


/*-- SCSI Commands --*/

#define	SCSI_READY			0x00
#define	SCSI_ZERO			0x01
#define	SCSI_SENSE			0x03
#define	SCSI_FORMAT			0x04
#define	SCSI_ASSIGN			0x07
#define	SCSI_READ			0x08
#define	SCSI_WRITE			0x0a
#define	SCSI_SEEK			0x0b
#define	SCSI_INIT			0x0c
#define	SCSI_TRANS			0x0f
#define SCSI_ALTTRACK		0x0e
#define	SCSI_ID_RD			0x12
#define	SCSI_MODE_WR		0x15
#define	SCSI_MODE_RD		0x1a
#define	SCSI_SEND_DIAG		0x1d
#define	SCSI_EXT_READ		0x28
#define	SCSI_EXT_WRITE		0x2A



/*-- Supra's autoconfig product id numbers --*/

#define IF_A1_A5	1L
#define IF_DMA		3L
#define IF_AB500	8L
#define IF_WORDSYNC	12L
#define IF_BYTESYNC	13L



/*-- Useful structures --*/

struct ScsiCmdBlock {
	UBYTE	scb_command;	/* command opcode					*/
	UBYTE	scb_addrHi;		/* high byte of address				*/
	UBYTE	scb_addrMd;		/* middle byte of address			*/
	UBYTE	scb_addrLo;		/* low byte of address				*/
	UBYTE	scb_argmnt;		/* count or interleave value		*/
	UBYTE	scb_vendor;		/* vendor byte -- seek algorithm	*/
};

struct ScsiSenseBlock {
	UBYTE	ssb_stCode;		/* status code						*/
	UBYTE	ssb_addrHi;		/* address, when valid				*/
	UBYTE	ssb_addrMd;
	UBYTE	ssb_addrLo;
};


/*-- Private flag for supradirect.device.  DO NOT USE! --*/

#define	HD_SETDEVFLAG	40

