[net.followup] Summary: reading CP/M floppies on 11/780

david (03/04/83)

Thanks to everyone who responded to my request for a program to read
and write CP/M floppy disks on the console floppy drive built into
every VAX 11/780.  I learned about 3 available programs:

cpmff:
	author: ...!decvax!microsoft!ubc-vision!mprvaxa!cornish
		(Allan Cornish, Microtel Pacific Research)
	This was posted to net.sources (article ID mprvaxa.143) soon after
	my request (2/6/83).

cpm:
	author: ucbvax!helge (Helge Skrivervik)
	This is available from the author and will probably be on
	the 4.2BSD distribution. He is working on improvements (see note).

cpmutl7:
	author: Aaron Wohl (wohl@cmuc)
	This is the original program that I had seen mention of on the net
	but I didn't know how to obtain it. The comments in the source
	say it is available on the Arpanet from:
  		unix host vlsi@cmuc
    		pathname /usr/avw/cpmutl/cpmutlVERSION-NUMBER.c
    		vlsi is on the arpanet running TCP-IP
  		a copy is also kept on mit-mc cpm;ar43:cpmutl VERSION-NUMBERc
  		and on [cmuc]ps:<wohl.bar>cpmutl.c.VERSION-NUMBER
		(for people that can't figure out how to use ITS)
 	Scott Bradner at Harvard (decvax!genradbo!wjh12!sob)
	is working on improvements (see note later in this summary).
	I received a copy from duke!ucf-cs!goldfarb (Thanks).

The following are my comments on the different programs:

cpmff: Syntax similar to tar and arff commands
       Can create a new floppy or floppy image from scratch
       Cannot add or delete individual files from floppy
       When moving files from unix to CP/M, the user is responsible for
          adding CR to end of line (CP/M wants both CR and LF).
	  (I have written a shell script called cpmtrans to do this:
	  I've added it to the end of this note).
       When transferring files from CP/M to UNIX, sometimes garbage
	  is found after a ^Z at end of file.

cpm:   Can add and delete individual files from floppy
       Cannot create a new floppy from scratch
       Automatically handles appending deleting of CR to end of line
       Handles EOF of CP/M files correctly
       The interactive mode is very nice: the commands (dir, ren, era,
	  type,etc.) and their responses are similar to CP/M.
       Has help command.

Both cpmff and cpm have manual pages. cpm does not handle CP/M user numbers,
 and I don't think cpmff does either, but I haven't checked.

cpmutl7:  I haven't tried it yet, as I received it last, and so far
	am quite happy with cpm.
	No manual page: the only documentation is in its help command.
	May have more flexibility with wild card filenames.
	Supports CP/M user numbers.

-------------------------------------------

The following are various comments I received from authors and others
(my comments are in braces):


Date: Sat Feb  5 17:43:18 1983
Subject: cpm on unix
we have taken the cpmutility that we got over the net & made it more
interactive, it seems to work but we are still in process ( no doc yet...)
if you want a copy let me know.
              scott bradner
              harvard university
              ...decvax!genradb!wjh12!sob
[I believe this refers to cpmutl7 - DRB]

>From decvax!microsof!fluke!corey Tue Feb  8 01:51:51 1983 remote from sytek
Date: Mon Feb  7 22:55:08 1983
Subject: cpm floppies

Hi.  One of our guys picked up your news request and forwarded it to me.
I mailed away for the program you mentioned.  The version I got had
bugs.  Substantial bugs.  It didn't successfully figure out when a disk
was full so it wrote forever, AND it didn't write a directory such that
CPM could read it.  I suspect that if you knew what you were doing, both
of these would be pretty simple to fix, cause the code looked pretty
structured judging from the number of procedures and their names.

I got mine from the author: ucbvax!helge

I suspect he has been so innundated with requests that he has regretted
his original publication, but I may be wrong.

			--Corey--
[The manual page says that if the floppy file becomes full, the file
is closed and the command aborted, and data is not corrupted. I haven't
tried it; perhaps this is a later addition - DRB]

>From decvax!cithep!citsrl!mark Mon Feb  7 22:26:45 1983 remote from sytek
Date: Mon Feb  7 09:34 PST 1983
Yes, we have used the program Bridge under unix 7+ system.  The program
does read and write cpm to unix floppies.  Program is a little slow if
you use your system alot.  Now that they have fixed the program to work
with word star it appears to work with most cpm programs.  Why do you 
want to run cpm on your vax ?

	For more information: ...!decvax!cithep!citsrl!mark

Mark
..........

>From decvax!microsof!ubc-vision!mprvaxa!cornish Mon Feb  7 22:26:35 1983 remote from sytek
Date: Mon Feb  7 10:35:58 1983
Subject: reading cpm disks on vax 11/780

I have written a program to read single density, single sided cpm floppies,
utilizing the vax 11/780 console floppy disk drive.  We have used it
successfully to read distribution disks of cpm software, and to write
disks for distributing software.  It works much like the ar command,
but is quite slow, due to requirement to do 128 byte i/o to the floppy,
and the communication that is required between the vax and the console lsi11.
If you feel there is sufficient interest, I can release it to net.sources.
Otherwise, I can mail it to you.

It can be used with the console floppy directly, or with a image file.
The image file can be manipulated using the flcopy(1) command.
Thus, you can flcopy the floppy into a file, then use cpmff on the file.
You can use cpmff to create a floppy image file, then flcopy the file to floppy.
You can use cpmff to directly manipulate the console floppy (if permitted).

	Allan Cornish
	Microtel Pacific Research
	8999 Nelson Way
	Burnaby, B.C. V5A 4B5
	Canada
	(604) 294-1471
	...!decvax!microsoft!ubc-vision!mprvaxa!cornish


>From decvax!duke!mcnc!msdc!gmha!paul Fri Feb 11 10:48:56 1983 remote from sytek
Date-Sent: Thu Feb 10 10:30:15 1983
Subject: CPM disks on 11/780

I have not used any such product but I'm told the Touchstone Software, Inc.
may have exactly what you want and more.

Uh... sorry I can't find their address but their office is in Seal Beach, Ca.
(around Los Angeles). Hope this helps.

	Paul Manno
	Medical Systems Development Corp
	(...decvax!duke!mcnc!msdc!paul)

[DRB: Touchstone is selling a CP/M-under-UNIX simulator, similar to the
Bridge, but much cheaper.  When I talked to them last month, they had
just released their first version for the Zilog system; they have not
done one for the PDP11 or the VAX yet, but will soon. When they do a
VAX version, we'll know if they can read from the floppy drive.
Their address is:
	Touchstone Software Corp.
	909 Electric Avenue Suite 308
	Seal Beach, Ca. 90740
	(213) 594-9266
]


Date: 18 Feb 83 09:55:58 PST (Fri)
From: ucbvax!UCBARPA:helge (Helge Skrivervik)
Subject: unix-cpm.......source

Here's the source, good luck ! Some enhancements may be made in the near
future: initialization of cpm disk files and a copy command for binary
files. If or when this is ready I will post a message to net.sources and
net.info-cpm (whenever that group becomes available again). I plan
to use this program as a base for an equivalent UCSD/unix file transfer
utility in the near future (next three months I hope), but if you get to
know of an existing program that does this, please let me know. I do not
know of any such utility for ISIS (I'm working on one for VERSAdos).
You are welcome to use my letters in summaries or whatever, but don't
redistribute the source, tell those interested where they can get it.

helge

[DRB: I had asked helge about a similar program for reading ISIS (Intel MDS)
and UCSD Pascal format floppies as well.  If anyone knows of something
like that or has an interest, please let me know.  Once again, thanks
to everyone who responded to my request.

	David Brown
	Varian Instruments
	2700 Mitchell Dr.
	Walnut Creek, Ca. 94598
	(415) 939-2400
	...!decvax!sytek!zehntel!varian!david
	...!{ucbvax,decvax}!tektronix!zehntel!varian!david
]
--------------

PS: here's the cpmtrans shell script. The sed line contains a CR (^M)
after the ampersand which may get eaten by uucp or rnews somewhere:

: shell script to translate NL (LF) to CR LF.
: This is needed when moving files from UNIX to CPM floppies
:  via the cpmff utility.
: usage:  cpmtrans file [file] ...
: The original file will be renamed file.u
: The new file will have the original name.
for i
do
 echo $i
 mv $i $i.u
 sed -e 's/.*$/&
/' $i.u > $i
done

karn (03/11/83)

One comment regarding reading floppies using the console drive on a VAX-11/780:

On the BTL versions of Unix, e.g., System III and V, the floppy driver
is slightly different - it skips the first track and applies the DEC RT-11
sector skew function to the remainder of the disk.  In addition, the
special file for the floppy is usually called /dev/conflp instead of
/dev/floppy.  It is a fairly simple matter to add another minor device
to the console driver to provide raw disk access a la BSD.

Phil