[comp.sys.apple] IBM/Apple disk interchange?

TMPLee@dockmaster.arpa (01/01/87)

Does anyone know of any software that would run on an Apple II and allow
it to read and/or write IBM PC format (5.25") disks (with a regular
Apple drive) or which would run on an IBM PC and allow it to read and/or
write Apple-formatted disks?  (I'm talking about software, not a
hardware card, for instance.)  (either Apple DOS or ProDOS format) Seems
like it ought to be possible on the Apple since the Apple drive is
driven at a very low-level by the 6502.

[Info-IBM people:  please reply directly since I don't regularly read
that digest.]

keeshu@nikhefk.UUCP (Kees Huyser) (01/02/87)

In article <861231230522.075758@DOCKMASTER.ARPA> TMPLee@dockmaster.arpa writes:
>Does anyone know of any software that would run on an Apple II and allow
>it to read and/or write IBM PC format (5.25") disks (with a regular
>Apple drive) or which would run on an IBM PC and allow it to read and/or
>write Apple-formatted disks?  (I'm talking about software, not a
>hardware card, for instance.)  (either Apple DOS or ProDOS format) Seems
>like it ought to be possible on the Apple since the Apple drive is
>driven at a very low-level by the 6502.
>

I'm afraid you're out of luck; no such program exists, nor for the Apple, nor 
for the IBM-PC. The problem is that the Apple and the IBM diskcontrollers use
a different encoding scheme to read/write. As you probably are aware the Apple 
has no 'diskcontroller', whereas the IBM has. Apple diskdrives use a clever
'software controller', hidden in DOS. The Woz thought up this scheme to avoid
using a lot of chips when he implemented the first version of DOS.
Since IBM *does* use a controller chip, and one with a different encoding 
scheme, it is not possible for Apple's to read IBM formatted disks (because DOS
doesn't know about *that* encoding scheme), nor is it possible for IBM's to
read Apple disks (because DOS uses a proprietary scheme).

The only solution is to buy a hardware card which will read Apple disks in an
IBM-PC. There are various manufacturers who produce them.

Another -cheaper- solution is to connect the Apple and the IBM with an RS232C
cable, and use a communication program to transfer whatever it is you want to
transfer.

-- Kees

|  Kees Huyser 
|  UUCP	: keeshu@nikhefk.uucp  or : {[wherever]!seismo}!mcvax!nikhefk!keeshu
|  BITNET : U00212@hasara5.bitnet
|  FIDO via unix : {decvax}!vaxine!spark!500!11!kees_huyser
|  FIDO via fido : kees huyser at net 500 node 11

binder@fizbin.DEC.COM (Sold - but we have others) (01/03/87)

Query from TMPLee@dockmaster.arpa:

> Does anyone know of any software that would run on an Apple II and allow it
> to read and/or write IBM PC format (5.25") disks (with a regular Apple
> drive) or which would run on an IBM PC and allow it to read and/or write
> Apple-formatted disks?  (I'm talking about software, not a hardware card,
> for instance.) (either Apple DOS or ProDOS format) Seems like it ought to be
> possible on the Apple since the Apple drive is driven at a very low-level by
> the 6502. 

Nope.  Can't be done.  IBM's disks are written and read by an industry-
standard disk control chip that will do either FM (double frequency) or MFM
(Miller Code) and nothing else.  The chip requires an Index signal from the
drive once per revolution; recording is synchronized to that Index pulse
during the formatting operation.  The Apple's controller is equally restricted
- its custom state machine can't do anything except the special GCR (group-
coded recording) that Woz invented to make it so cheap.  And the Apple drive,
also cheapified, does not provide an Index signal, because it's not needed -
Woz used self-synchronizing preamble formats.  The low-level control by the
Apple's 6502 consists of handling spinup/down, stepper motor sequencing, and
so on - there's no direct access between the read/write path and the 6502. 

Cheers,
Dick Binder   (The Stainless Steel Rat)

DEC Enet:	ASD::BINDER
UUCP:		{ decvax, allegra, ucbvax... }!decwrl!asd.dec.com!binder
ARPA:		binder%asd.DEC@decwrl.ARPA

ranger@ecsvax.UUCP (Rick N. Fincher) (01/07/87)

> 

The envoy board is another solution.  It is a disk controller that uses
IBM disks with the Apple.  It has softyware[D[D[D[D[Dware to transfer Apple files to
MSS[DDOS and vice-versa.  You can use the IBM drives as 360K prodos volumes
The only hitch is thsa[D[Dat you still need an Apple drive to boot with and
the IBM drives are such power hogs that you need IBM type drives with
their own power supply.  The Envoy board is made by Asky Inc. 4320
Stevens Creek Blvd. Suite 287, San Jose [D, CA  95129.  phone (408) 247-5742
They recomment the drive cabn[Dinet and power supply from Club AT, a CA 
mail order house.  The card retails for $180.
> The only solution is to buy a hardware card which will read Apple disks in an

binder@fizbin.DEC.COM (Sold - but we have others) (01/07/87)

We've had several people saying different things about whether IBM hardware 
can read/write Apple disks or Apple hardware read/write IBM disks.  From the
viewpoint of a hardware engineer who spent 15 years with disks and disk
controllers, I'd like to put in my two cents' worth.  Some of this stuff is
fairly heavy hardware terms!  Some or all of it may be hot air, if you've seen
something better.  If anyone out there has hard information to contradict
this, I'll be as happy as the next person to see it, but please don't shower
either me or the net with suppositions or rumors. 

The IBM 5-1/4" disk subsystem has at its heart the 765 disk controller chip.  
This chip is able to read or write only two disk recording schemes:

1.  FM (double frequency, also called single density), in which each bit is
    defined by a clock pulse at its beginning and by the next bit's clock
    pulse at its end.  Each ONE bit has a pulse between the two clocks. 
    Within the limits of disk speed tolerances, this recording scheme is
    self-clocking, in that every bit has its own clock pulse recorded on the
    disk.  IBM systems use FM for the first track of their double-density
    disks so that the system will be able to read the first track without
    knowing the density at which the remainder of the disk is recorded. 

2.  MFM (Miller Code, also called double density), in which each ONE bit is
    defined by a pulse, and there is a pulse between every two adjacent ZEROs
    to enable the phase-locked-loop data recovery system to keep tracking. 
    (This scheme is therefore not self-clocking.)  MFM is used because it
    allows twice as much data to be recorded on a disk by eliminating half
    of the magnetic pulses.

The 765 disk chip can be programmed for a very limited set of data formats, 
primarily the two used by IBM plus minor variations on those themes.  It
cannot be programmed to read the two GCR (Group Coded Recording) schemes used
by the Apple 5-1/4" disk system. 

The Apple 5-1/4" disk subsystem uses a state machine, implemented either with
a ROM and several MSI chips or as part of the Integrated Woz Machine(IWM)
superchip.  This state machine reads and writes Woz's own perverted form of 
GCR.  GCR encodes X bits of information in X+Y data bits, in which there are 
certain patterns that are defined as being illegal and other patterns that are
reserved for special meanings.  

Woz-style GCR, used by DOS 3.3 and ProDOS, uses a 4+4 GCR for the header (four
useful bits plus four more bits in each byte recorded on the disk) and a 6+2
code for the data sector - to record 256 data bytes, there are 342 actual
bytes on the disk.  (The older DOS 3.2 GCR was a 5+3 scheme.)  Among the
"illegal" patterns is the all ONEs pattern, or FF (hex). The actual pattern to
be recorded on the disk is constructed by 6502 software in a RAM buffer by
translating the desired data against a table before the state machine is
triggered.  When reading, the 342-byte pattern is translated in RAM back to
the desired data pattern. 

Among the oddities of this state machine is the way it writes and reads sector
preambles, which consist of five self- synchronization bytes (10 ONEs in a row
instead of 8). When reading, the state machine can find this 40-ONEs-in-a-row
pattern, and it is so designed that it will shift its expected byte boundaries
to be in proper synchronism at the end of the pattern even if it started
reading somewhere other than at the beginning.  The state machine would
interpret the IBM all-zeroes preamble as an all-ONEs synchronization field and
begin looking for a sector header, which also contains a series of reserved
GCR patterns.  If this series of patterns isn't found, the state machine
restarts.  It cannot be made to read FM or MFM. 

Now then, there are some tools out there that claim to be able to read
anything.  The ones I have seen are combinations of software and hardware -
the hardware is implemented in a nonstandard way, and it is designed to gobble
everything off the disk without regard to what it is.  Then the software goes
in and tries to decode it, much the same as do the common tools for copying
protected disks.  A tool like this can read either Apple or IBM, or virtually
anything else for that matter.  But it can't usually write all those different 
formats.

Okay, troops, if I'm wrong, let me know.  If I'm right, this should put an end 
to the question.

Cheers,
Dick Binder   (The Stainless Steel Rat)

DEC Enet:	ASD::BINDER
UUCP:		{ decvax, allegra, ucbvax... }!decwrl!asd.dec.com!binder
ARPA:		binder%asd.DEC@decwrl.ARPA

lane@dalcs.UUCP (John Wright/Dr. Pat Lane) (01/07/87)

In article <101@nikhefk.UUCP> keeshu@nikhefk.UUCP (Kees Huyser) writes:
>In article <861231230522.075758@DOCKMASTER.ARPA> TMPLee@dockmaster.arpa writes:
>>Does anyone know of any software that would run on an Apple II and allow
>>it to read and/or write IBM PC format (5.25") disks ) or which would run
>>on an IBM PC and allow it to read and/or write Apple-formatted disks?
>
>I'm afraid you're out of luck; no such program exists, nor for the Apple, nor 
>for the IBM-PC. The problem is that the Apple and the IBM diskcontrollers use
>a different encoding scheme to read/write. 

I always thought that this was impossible for the reasons that Kees outlines.
However, I have here the January 1987 issue of On Three (The Magasine for 
Apple /// Owners and Users).  In the letters section some one asks the same
question and the editor reports that they have just gotten there hands on
"A relatively new program...called "MatchPoint", allows the IBM to directly
read Apple /// disks."  I would think that it would then be able to read 
Apple II Prodos disks.  They go to say that they have used it and it works
well.  They promise a review in an upcoming issue.  They suggest contacting
Ms. Debbie Armstrong at:
		MicroSolutions
		125 South Fourth Street
		DeKalb, IL 60115
		(815) 756-3421
They also request that anyone who does, mention the magasine!

I have not checked this out yet though I certainly intend to.  I'll post
news of any developments.  Anyone else heard of this product?


-- 
John Wright	//////////////////	Phone:  902-424-3805  or  902-424-6527
Post: c/o Dr Pat Lane, Biology Dept, Dalhousie U, Halifax, NS, Canada, B3H-1J4
Ean/Bitnet: lane@cs.dal.cdn 	Arpa: lane%cs.dal.cdb%ubc.csnet@csnet-relay.arpa
Uucp: {seismo,watmath,utai,garfield}!dalcs!lane Csnet: lane%cs.dal.cdn@ubc.csnet	

ranger@ecsvax.UUCP (Rick N. Fincher) (01/07/87)

> I have not checked this out yet though I certainly intend to.  I'll post
> news of any developments.  Anyone else heard of this product?

  The matchpoint software has a boad that goes with it cathat works like
the Apple Turnover board from Vertex systems.  The software must have the board
to work.  Evidently someone did not have their facts straight when they 
wrote that article.

Rick Fincher
ranger@ecsvax
. 
>