home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
m2
/
CycloneModules.lha
/
modules
/
txt
/
BattMem.def
< prev
next >
Wrap
Text File
|
1996-08-01
|
4KB
|
160 lines
(*
** Cyclone Modula-2 Interface module:
** $VER: battmem.h 36.4 (1.5.90)
** Includes Release 40.15
**
** BattMem resource
**
** (C) Copyright 1989-1993 Commodore-Amiga Inc.
** All Rights Reserved
**
** Interface module by Marcel Timmermans
** (C) Copyright 1995-1996 Marcel Timmermans
** All Rights Reserved
*)
(*$ Implementation- *)
DEFINITION MODULE BattMem;
FROM SYSTEM IMPORT ADDRESS;
IMPORT Reg;
CONST
battmemName="battmem.resource";
(*
* Amiga specific bits in the battery-backedup ram.
*
* Bits 0 to 31, inclusive
*)
(*
* AMIGA_AMNESIA
*
* The battery-backedup memory has had a memory loss.
* This bit is used as a flag that the user should be
* notified that all battery-backed bit have been
* reset and that some attention is required. Zero
* indicates that a memory loss has occured.
*)
battmemAmigaAmnesiaAddr = 0;
battmemAmigaAmnesiaLen = 1;
(*
* SCSI_TIMEOUT
*
* adjusts the timeout value for SCSI device selection. A
* value of 0 will produce short timeouts (128 ms) while a
* value of 1 produces long timeouts (2 sec). This is used
* for SeaCrate drives (and some Maxtors apparently) that
* don`t respond to selection until they are fully spun up
* and intialised.
*)
battmemScsiTimeoutAddr = 1;
battmemScsiTimeoutLen = 1;
(*
* SCSI_LUNS
*
* Determines if the controller attempts to access logical
* units above 0 at any given SCSI address. This prevents
* problems with drives that respond to ALL LUN addresses
* (instead of only 0 like they should). Default value is
* 0 meaning don't support LUNs.
*)
battmemScsiLunsAddr = 2;
battmemScsiLunsLen = 1;
(*
* Shared bits in the battery-backedup ram.
*
* Bits 64 and above
*)
(*
* SHARED_AMNESIA
*
* The battery-backedup memory has had a memory loss.
* This bit is used as a flag that the user should be
* notified that all battery-backed bit have been
* reset and that some attention is required. Zero
* indicates that a memory loss has occured.
*)
battmemSharedAmnesiaAddr = 64;
battmemSharedAmnesiaLen = 1;
(*
* SCSI_HOST_ID
*
* a 3 bit field (0-7) that is stored in complemented form
* (this is so that default value of 0 really means 7)
* It's used to set the A3000 controllers SCSI ID (on reset)
*)
battmemScsiHostIdAddr = 65;
battmemScsiHostIdLen = 3;
(*
* SCSI_SYNC_XFER
*
* determines if the driver should initiate synchronous
* transfer requests or leave it to the drive to send the
* first request. This supports drives that crash or
* otherwise get confused when presented with a sync xfer
* message. Default=0=sync xfer not initiated.
*)
battmemScsiSyncXferAddr = 68;
battmemScsiSyncXferLen = 1;
(*
* See Amix documentation for these bit definitions
*
* Bits 32 to 63, inclusive
*)
(*
* SCSI_FAST_SYNC
*
* determines if the driver should initiate fast synchronous
* transfer requests (>5MB/s) instead of older <=5MB/s requests.
* Note that this has no effect if synchronous transfers are not
* negotiated by either side.
* Default=0=fast sync xfer used.
*)
battmemScsiFastSyncAddr = 69;
battmemScsiFastSyncLen = 1;
(*
* SCSI_TAG_QUEUES
*
* determines if the driver should use SCSI-2 tagged queuing
* which allows the drive to accept and reorder multiple read
* and write requests.
* Default=0=tagged queuing NOT enabled
*)
battmemScsiTagQueuesAddr = 70;
battmemScsiTagQueuesLen = 1;
PROCEDURE ObtainBattSemaphore(base{Reg.A6}:ADDRESS); CODE -6;
PROCEDURE ReleaseBattSemaphore(base{Reg.A6}:ADDRESS); CODE -12;
PROCEDURE ReadBattMem(base{Reg.A6}:ADDRESS;buffer{Reg.A0}:ADDRESS;
offset{Reg.D0}:LONGCARD;
length{Reg.D1}:LONGCARD):LONGCARD; CODE -18;
PROCEDURE WriteBattMem(base{Reg.A6}:ADDRESS;buffer{Reg.A0}:ADDRESS;
offset{Reg.D0}:LONGCARD;
length{Reg.D1}:LONGCARD):LONGCARD; CODE -24;
END BattMem.