(*$M-*)
DEFINITION MODULE TrackDisk;

FROM SYSTEM IMPORT
 BYTE,SHIFT;
FROM Exec IMPORT
 clear,read,update,write,nonstd,IOStdReq,Unit;

CONST
 trackDiskName="trackdisk.device";
 motor=nonstd;
 seek=nonstd+1;
 format=nonstd+2;
 remove=nonstd+3;
 changeNum=nonstd+4;
 changeState=nonstd+5;
 protStatus=nonstd+6;
 rawRead=nonstd+7;
 rawWrite=nonstd+8;
 getDriveType=nonstd+9;
 getNumTracks=nonstd+10;
 addChangeInt=nonstd+11;
 remChangeInt=nonstd+12;
 lastComm=nonstd+13;
 extCom=8000H;
 extWrite=write+extCom;
 extRead=read+extCom;
 extMotor=motor+extCom;
 extSeek=seek+extCom;
 extFormat=format+extCom;
 extUpdate=update+extCom;
 extClear=clear+extCom;
 extRawRead=rawRead+extCom;
 extRawWrite=rawWrite+extCom;
 numSecs=11;
 numUnits=4;
 sector=512;
 secShift=9;
 labelSize=16;
 indexSync=4;
 allowNon35=0;
 drive35=1;
 drive525=2;
 notSpecified=20;
 noSecHdr=21;
 badSecPreamble=22;
 badSecId=23;
 badHdrSum=24;
 badSecSum=25;
 tooFewSecs=26;
 badSecHdr=27;
 writeProt=28;
 diskChanged=29;
 seekError=30;
 noMem=31;
 badUnitNum=32;
 badDriveType=33;
 driveInUse=34;
 postReset=35;

TYPE
 IOTrackDisk=RECORD
  req:IOStdReq;
  count:LONGCARD;
  secLabel:LONGCARD;
 END;
 IOTrackDiskPtr=POINTER TO IOTrackDisk; 
 TDUPublicUnit=RECORD
  unit:Unit;
  comp01Track:CARDINAL;
  comp10Track:CARDINAL;
  comp11Track:CARDINAL;
  stepDelay:LONGCARD;
  settleDelay:LONGCARD;
  retryCnt:[0..255]
 END;

END TrackDisk.

