home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0600
/
CCE_0624.ZIP
/
CCE_0624.PD
/
TAPE_DRV
/
README
< prev
next >
Wrap
Text File
|
1993-09-01
|
4KB
|
101 lines
Many people asked me to post my version of a SCSI streamer tape
driver for TOS - here it is. I tested it on the following hard-
ware:
Mega ST 4 with TOS 1.2 (Blitter version). ICD Advantage ST+ SCSI
Host Adapter. Cipher CT540 streamer tape (QIC 24, 40/60 MB)
(jumpered at SCSI ID 2). Megafile 30 (SCSI ID 1). ST1480N (SCSI
ID 0).
The driver was written for a ST - I don't know if it runs on STEs
or TTs.
What do you get? tapeio.[sh], mt, tar, bkrs.
The tape driver:
================
The tape driver source is in tapeio.s + tapeio.h. You can call it
directly from C - no need to install a driver before starting
your program, no wasted spece when your program exits. This ver-
sion of the driver has many parents (beside me):
* Paul Moreau, who posted st_tar (which includes a tape driver)
* J. R. Bammi, who included a tape driver in the GCC-Minix-Kernel
* C. Brod, whose book "Scheibenkleister" was used extensively
The driver is set up for a streamer tape with SCSI ID 2. You may
change this in tapeio.s, line 2 (insert SCSI_ID << 5).
Many tape driver functions (especially those without DMA) need
some delay before the drive is ready for the next command. I did
_NOT_ wait in the driver because usually there are other things
to be done so I don't want to waste my time in an idle loop. If
needed you may put a "msleep (1L)" between two calls to
mt_*-routines. (There is no need to do this after a mt_read or
mt_write request).
There is an unresolved problem: When trying to do many reads/
writes in a short time (for instance 16 writes of 250 blocks each
without doing anything else) I had to notice that garbage is
read/written from/to tape. At the moment I tend to think that
this may be a bug in my DMA chip. I WOULD LIKE TO KNOW IF THIS IS
A GENERAL PROBLEM OR NOT. If you want to try it out have a look
at bkrs.c, line 384. The "#define MAXBLOCK" puts a limit on the
buffer size used - this should not be necessary.
mt:
===
The usual tape manipulation tool:
append ( skip to end for appending ),
buffer ( set buffered mode ),
erase ( erase ),
fsf ( skip n filemarks forward, default is 1 ),
fsb ( skip n blocks forward, default is 1 ),
load ( load tape at BOT ),
nobuffer ( set unbuffered mode ),
retense ( retense tape ),
rewind ( rewind tape ),
unload ( unload tape ),
wfm ( write n file marks, default is 1 ),
tar:
====
Based on st_tar (Paul Moreau), with most of its problems, but
with many bugs fixed (and a few new ones :-( I guess). It is
definitely not cuspy at all, but it does its job.
bkrs:
=====
A quick and dirty disk backup and restore tool. It works with the
AHDI, CBHD and ICD disk drivers. Multivolume backup/restore is
supported. The default value for the disk size (bkrs.c, line 11:
#define DISKSIZE ...) is for my old Megafile 30. Change it for
your needs if you want.
Disclaimer:
===========
tapeio.s is all I _want_ you to post - all the rest is just to
give you a working example. I know that the code is ugly - all I
wanted to do is testing my driver under TOS as a standalone envi-
ronment before putting it into a Minix tape driver. Bug reports
welcome, comments on style to /dev/null, please.
Wolfgang
==================================================================
Name : Wolfgang Denk (+49)-89-68004-288
Company : PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Munich, Germany.
UUCP : ..[pyramid ;uunet!unido]!pcsbst!wd (PYRAMID PREFERRED!!)
DOMAIN : wd@pcsbst.pcs.[ COM From rest of world; DE From Europe ]
###################################################################
# "UNIX was not designed to stop you from doing stupid things, #
# because that would also stop you from doing clever things." #
# -- Doug Gwyn #
###################################################################