; ; conditionals to control assembly ; dtc equ false ; dtc 510a controller xebec equ not dtc ; mscribe equ true ; dma equ true poll equ not dma ; if mscribe ncyl equ 612 ; number of cylinders nheads equ 2 ; number of heads nspt equ 32 ; number of sectors per track redcur equ 612 ; reduced write current cylinder precomp equ 612 ; precompensation track stpmode equ 7 else ncyl equ 180 ; number of cylinders nheads equ 4 ; number of heads nspt equ 32 ; number of sectors per track redcur equ 128 ; reduced write current cylinder precomp equ 180 ; precompensation track stpmode equ 8 endif ; if dtc spw equ 11 ; step pulse width (in usec) spp equ 60 ; step pulse period (50 usec increments) endif ; ; This File defines all the necessary equates and contains the ; primitive access routines to interface to a SASI disk ; controller (either DTC or XEBEC) through the DTC or the ; RBM Host Adaptor. ; ; First, the port definitions ; cpudma equ 10h ; CPU board DMA address ; habase equ 1ch ; host adaptor base address hadata equ habase hactrl equ habase+1 hastat equ habase+1 tbd2 equ 10000000b ; undefined status bit tbd1 equ 01000000b ; undefined status bit tbd0 equ 00100000b ; undefined status bit inout equ 00010000b ; SASI in/out line status cmdat equ 00001000b ; SASI command/data line status msg equ 00000100b ; SASI message line status busy equ 00000010b ; SASI busy line status req equ 00000001b ; SASI request line status btbd2 equ 7 btbd1 equ 6 btbd0 equ 5 binout equ 4 bcmdat equ 3 bmsg equ 2 bbusy equ 1 breq equ 0 hareset equ habase+2 ; ; Commands Definition ; ; Class 0 ; tstrdy equ 0 ; test ready command recal equ 1 ; recalibrate command sensrq equ 3 ; request sense status fmtdrv equ 4 ; format drive command cktkfmt equ 5 ; check track format fmttrk equ 6 ; format track command fmtbtrk equ 7 ; format bad track read equ 8 ; read data command write equ 10 ; write data command seek equ 11 ; seek track command alttrk equ 14 ; assign alternate track idchar equ 12 ; initialize drive characteristics rdeccl equ 13 ; read ecc burst length wrsecbuf equ 15 ; write sector buffer rdsecbuf equ 16 ; read sector buffer ; ; Class 7 commands ; ramdiag equ 0e0h ; RAM diagnostic drvdiag equ 0e3h ; drive diagnostic command ctlrdiag equ 0e4h ; controller internal diagnostics readlng equ 0e5h ; read long command writelng equ 0e6h ; write long command ; ; Status Completion Byte ; perror equ 00000001b ; parity error occurred error equ 00000010b ; error occurred during cmd execution ; ; Sense Return Bytes ; ; Type 0 (Drive) Error codes noindex equ 1 ; no index pulse noseek equ 2 ; no seek complete wrtfalt equ 3 ; write fault noready equ 4 ; no ready signal from the drive notrk00 equ 6 ; no track 000 indication ; ; Type 1 (Controller) Error Codes iderr equ 10h ; id read error (ECC) daterr equ 11h ; data read error (ECC) noaddmk equ 12h ; no address mark found rnf equ 14h ; sector not found sekerr equ 15h ; seek error cecc equ 18h ; correctable ECC error badtrk equ 19h ; bad track flag encountered fmterr equ 1ah ; format error daaltrk equ 1ch ; direct access to alternate track ; ; Type 2 (Command) Error Codes invcmd equ 20h ; invalid command invadd equ 21h ; invalid disk address ; ; Type 3 (Miscellaneous) Error Codes ramerr equ 30h ; Controller RAM error chksum equ 31h ; Cont. program checksum error eccerr equ 32h ; ECC polynomial error ;