home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / e / amigae / modulessrc / devices / trackdisk.e < prev   
Text File  |  1995-07-05  |  2KB  |  117 lines

  1. OPT MODULE
  2. OPT EXPORT
  3.  
  4. OPT PREPROCESS
  5.  
  6. MODULE 'exec/devices',
  7.        'exec/io'
  8.  
  9. CONST NUMSECS=11,
  10.       NUMUNITS=4,
  11.       TD_SECTOR=$200,
  12.       TD_SECSHIFT=9,
  13.       TDF_EXTCOM=$8000,
  14.       TD_MOTOR=9,
  15.       TD_SEEK=10,
  16.       TD_FORMAT=11,
  17.       TD_REMOVE=12,
  18.       TD_CHANGENUM=13,
  19.       TD_CHANGESTATE=14,
  20.       TD_PROTSTATUS=15,
  21.       TD_RAWREAD=16,
  22.       TD_RAWWRITE=17,
  23.       TD_GETDRIVETYPE=18,
  24.       TD_GETNUMTRACKS=19,
  25.       TD_ADDCHANGEINT=20,
  26.       TD_REMCHANGEINT=21,
  27.       TD_GETGEOMETRY=22,
  28.       TD_EJECT=23,
  29.       TD_LASTCOMM=24,
  30.       ETD_WRITE=$8003,
  31.       ETD_READ=$8002,
  32.       ETD_MOTOR=$8009,
  33.       ETD_SEEK=$800A,
  34.       ETD_FORMAT=$800B,
  35.       ETD_UPDATE=$8004,
  36.       ETD_CLEAR=$8005,
  37.       ETD_RAWREAD=$8010,
  38.       ETD_RAWWRITE=$8011
  39.  
  40. #define TD_NAME 'trackdisk.device'
  41.  
  42. OBJECT ioexttd
  43.   iostd:iostd
  44.   count:LONG
  45.   seclabel:LONG
  46. ENDOBJECT     /* SIZEOF=56 */
  47.  
  48. OBJECT drivegeometry
  49.   sectorsize:LONG
  50.   totalsectors:LONG
  51.   cylinders:LONG
  52.   cylsectors:LONG
  53.   heads:LONG
  54.   tracksectors:LONG
  55.   bufmemtype:LONG
  56.   devicetype:CHAR
  57.   flags:CHAR
  58.   reserved:INT
  59. ENDOBJECT     /* SIZEOF=32 */
  60.  
  61. CONST DG_DIRECT_ACCESS=0,
  62.       DG_SEQUENTIAL_ACCESS=1,
  63.       DG_PRINTER=2,
  64.       DG_PROCESSOR=3,
  65.       DG_WORM=4,
  66.       DG_CDROM=5,
  67.       DG_SCANNER=6,
  68.       DG_OPTICAL_DISK=7,
  69.       DG_MEDIUM_CHANGER=8,
  70.       DG_COMMUNICATION=9,
  71.       DG_UNKNOWN=31,
  72.       DGB_REMOVABLE=0,
  73.       DGF_REMOVABLE=1,
  74.       IOTDB_INDEXSYNC=4,
  75.       IOTDF_INDEXSYNC=16,
  76.       IOTDB_WORDSYNC=5,
  77.       IOTDF_WORDSYNC=$20,
  78.       TD_LABELSIZE=16,
  79.       TDB_ALLOW_NON_3_5=0,
  80.       TDF_ALLOW_NON_3_5=1,
  81.       DRIVE3_5=1,
  82.       DRIVE5_25=2,
  83.       DRIVE3_5_150RPM=3,
  84.       TDERR_NOTSPECIFIED=20,
  85.       TDERR_NOSECHDR=21,
  86.       TDERR_BADSECPREAMBLE=22,
  87.       TDERR_BADSECID=23,
  88.       TDERR_BADHDRSUM=24,
  89.       TDERR_BADSECSUM=25,
  90.       TDERR_TOOFEWSECS=26,
  91.       TDERR_BADSECHDR=27,
  92.       TDERR_WRITEPROT=28,
  93.       TDERR_DISKCHANGED=29,
  94.       TDERR_SEEKERROR=30,
  95.       TDERR_NOMEM=31,
  96.       TDERR_BADUNITNUM=$20,
  97.       TDERR_BADDRIVETYPE=$21,
  98.       TDERR_DRIVEINUSE=$22,
  99.       TDERR_POSTRESET=$23
  100.  
  101. OBJECT publicunit
  102.   unit:unit
  103.   comp01track:INT  -> This is unsigned
  104.   comp10track:INT  -> This is unsigned
  105.   comp11track:INT  -> This is unsigned
  106.   stepdelay:LONG
  107.   settledelay:LONG
  108.   retrycnt:CHAR
  109.   pubflags:CHAR
  110.   currtrk:INT  -> This is unsigned
  111.   calibratedelay:LONG
  112.   counter:LONG
  113. ENDOBJECT     /* SIZEOF=64 */
  114.  
  115. CONST TDPB_NOCLICK=0,
  116.       TDPF_NOCLICK=1
  117.