home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / BattMem.def < prev    next >
Text File  |  1996-08-01  |  4KB  |  160 lines

  1. (*
  2. **    Cyclone Modula-2 Interface module:
  3. **    $VER: battmem.h 36.4 (1.5.90)
  4. **    Includes Release 40.15
  5. **
  6. **    BattMem resource
  7. **
  8. **    (C) Copyright 1989-1993 Commodore-Amiga Inc.
  9. **        All Rights Reserved
  10. **
  11. **      Interface module by Marcel Timmermans
  12. **      (C) Copyright 1995-1996 Marcel Timmermans
  13. **          All Rights Reserved
  14. *)
  15.  
  16. (*$ Implementation- *)
  17. DEFINITION MODULE BattMem;
  18.  
  19. FROM SYSTEM IMPORT ADDRESS;
  20.  
  21. IMPORT Reg;
  22.  
  23. CONST
  24.  battmemName="battmem.resource";
  25.  
  26. (*
  27.  * Amiga specific bits in the battery-backedup ram.
  28.  *
  29.  *      Bits 0 to 31, inclusive
  30.  *)
  31.  
  32. (*
  33.  * AMIGA_AMNESIA
  34.  *
  35.  *              The battery-backedup memory has had a memory loss.
  36.  *              This bit is used as a flag that the user should be
  37.  *              notified that all battery-backed bit have been
  38.  *              reset and that some attention is required. Zero
  39.  *              indicates that a memory loss has occured.
  40.  *)
  41.  
  42.  battmemAmigaAmnesiaAddr        = 0;
  43.  battmemAmigaAmnesiaLen         = 1;
  44.  
  45. (*
  46.  * SCSI_TIMEOUT
  47.  *
  48.  *              adjusts the timeout value for SCSI device selection.  A
  49.  *              value of 0 will produce short timeouts (128 ms) while a
  50.  *              value of 1 produces long timeouts (2 sec).  This is used
  51.  *              for SeaCrate drives (and some Maxtors apparently) that
  52.  *              don`t respond to selection until they are fully spun up
  53.  *              and intialised.
  54.  *)
  55.  
  56.  battmemScsiTimeoutAddr   = 1;
  57.  battmemScsiTimeoutLen    = 1;
  58.  
  59. (*
  60.  * SCSI_LUNS
  61.  *
  62.  *              Determines if the controller attempts to access logical
  63.  *              units above 0 at any given SCSI address.  This prevents
  64.  *              problems with drives that respond to ALL LUN addresses
  65.  *              (instead of only 0 like they should).  Default value is
  66.  *              0 meaning don't support LUNs.
  67.  *)
  68.  
  69.  battmemScsiLunsAddr    = 2;
  70.  battmemScsiLunsLen     = 1;
  71.  
  72. (*
  73.  * Shared bits in the battery-backedup ram.
  74.  *
  75.  *      Bits 64 and above
  76.  *)
  77.  
  78. (*
  79.  * SHARED_AMNESIA
  80.  *
  81.  *              The battery-backedup memory has had a memory loss.
  82.  *              This bit is used as a flag that the user should be
  83.  *              notified that all battery-backed bit have been
  84.  *              reset and that some attention is required. Zero
  85.  *              indicates that a memory loss has occured.
  86.  *)
  87.  
  88.  battmemSharedAmnesiaAddr       = 64;
  89.  battmemSharedAmnesiaLen        = 1;
  90.  
  91. (*
  92.  * SCSI_HOST_ID
  93.  *
  94.  *              a 3 bit field (0-7) that is stored in complemented form
  95.  *              (this is so that default value of 0 really means 7)
  96.  *              It's used to set the A3000 controllers SCSI ID (on reset)
  97.  *)
  98.  
  99.  battmemScsiHostIdAddr  = 65;
  100.  battmemScsiHostIdLen   = 3;
  101.  
  102. (*
  103.  * SCSI_SYNC_XFER
  104.  *
  105.  *              determines if the driver should initiate synchronous
  106.  *              transfer requests or leave it to the drive to send the
  107.  *              first request.  This supports drives that crash or
  108.  *              otherwise get confused when presented with a sync xfer
  109.  *              message.  Default=0=sync xfer not initiated.
  110.  *)
  111.  
  112.  battmemScsiSyncXferAddr        = 68;
  113.  battmemScsiSyncXferLen         = 1;
  114.  
  115. (*
  116.  *      See Amix documentation for these bit definitions
  117.  *
  118.  *      Bits 32 to 63, inclusive
  119.  *)
  120.  
  121. (*
  122.  * SCSI_FAST_SYNC
  123.  *
  124.  *              determines if the driver should initiate fast synchronous
  125.  *              transfer requests (>5MB/s) instead of older <=5MB/s requests.
  126.  *              Note that this has no effect if synchronous transfers are not
  127.  *              negotiated by either side.
  128.  *              Default=0=fast sync xfer used.
  129.  *)
  130.  
  131.   battmemScsiFastSyncAddr   = 69;
  132.   battmemScsiFastSyncLen    = 1;
  133.  
  134. (*
  135.  * SCSI_TAG_QUEUES
  136.  *
  137.  *              determines if the driver should use SCSI-2 tagged queuing
  138.  *              which allows the drive to accept and reorder multiple read
  139.  *              and write requests.
  140.  *              Default=0=tagged queuing NOT enabled
  141.  *)
  142.  
  143.   battmemScsiTagQueuesAddr   = 70;
  144.   battmemScsiTagQueuesLen    = 1;
  145.  
  146.  
  147. PROCEDURE ObtainBattSemaphore(base{Reg.A6}:ADDRESS); CODE -6;
  148. PROCEDURE ReleaseBattSemaphore(base{Reg.A6}:ADDRESS); CODE -12;
  149. PROCEDURE ReadBattMem(base{Reg.A6}:ADDRESS;buffer{Reg.A0}:ADDRESS;
  150.                       offset{Reg.D0}:LONGCARD;
  151.                       length{Reg.D1}:LONGCARD):LONGCARD; CODE -18;
  152.  
  153.  
  154. PROCEDURE WriteBattMem(base{Reg.A6}:ADDRESS;buffer{Reg.A0}:ADDRESS;
  155.                        offset{Reg.D0}:LONGCARD;
  156.                        length{Reg.D1}:LONGCARD):LONGCARD; CODE -24;
  157.  
  158.  
  159. END BattMem.
  160.