     A SIMPLE CIRCUIT FOR CONNECTING A HD (1.44MB) 3.5" FLOPPY DRIVE
                 TO AN ATARI-ST, STF, STFM OR MEGA-ST
                              (revision 2) 

This text describes a circuit for adapting an Atari ST to a HD-floppy drive.
It has been built,  tested and installed in in an  Atari   MEGA-ST computer.  

----------------------------------------------------------------------------
                               DISCLAIMER
Although  this  modification  worked fine for me,  it may not do so for you.
I shall  NOT be  responsible for  any  damage, resulting  from  trying  this
modification,  to your computer and  other equipment, or any  damage to any-
body's life and health,  or any  galactic  imbalance  whatsoever.   Whatever
you do, you do at your own risk.  Be advised  that in an open computer  box
there are  exposed  parts that are  at mains line voltage (i.e. 220V AC) and
you can easily get KILLED if you are not careful!
----------------------------------------------------------------------------

Several people have built and made available to the public the circuits and
instructions for  replacing a DD (720KB) 3.5" floppy  drive in an  ATARI-ST
computer with a HD(1.44MB) floppy drive. All these circuits are, basically,
switches which route the  16MHz clock signal ( instead of the original 8MHz
clock )  to  the floppy-disk controller chip.  This  switching should be in
effect only when a HD floppy is detected in the drive.

This text  will not try to explain  the general principles of operation  of 
such switching circuits; the  readers should find  some  of those documents
which explain this in  detail.  Instead,  this text describes one particlar
implementation  of the  circuit,  and  it is the  one that may well be  the
simplest possible, and yet with some significant  advantages  when compared
to other circuits.
 
The HD- circuits which I have seen suffer from two disadvantages:

* The floppy-controller chip is overclocked to  16MHz all  the time,  EXCEPT
  when a DD floppy is inserted in the drive, and this overclocking  can lead
  to overheating of the chip and unreliable operation. This is a consequence
  of the fact that the state of the HD-detect signal from  the  floppy drive
  is identical in cases when a HD-floppy is detected and when  NO  floppy is
  detected in the drive- so the controller is ( unnecessarily )  overclocked
  ( and overheated ) most of the time; 
  
* Most of the circuits can take care of two floppy  drives  (by watching the
  drive-select signal  ) which is very well, but  many users  have  only one
  floppy drive and will  never use a two-drives configuration,  and so  this
  ability of the circuit to work with two drives is, for them,an unnecessary
  complication;
  
* Most circuits require two TTL chips for  switching logic, and  yet the job
  can be done with one chip;  also, some circuits  use a  programmable-logic
  chips ( a GAL ) and most users do not have the ability  to program these. 
  
* Instructions for building a HD module  never  describe  how to  physically
  and mechanically-reliable install it in a computer. 
   

The most-elegant HD-circuit solution that I have seen was  created by Martin
Graiter. He proposed using a single 74LS151 chip  ( 7:1 multiplexer )  which
routes either a 8MHz or a 16MHz clock signal to  the floppy-controller chip,
depending on the states of HD-floppy detect and Drive-select lines.

My design is based on Martin Graiter's circuit,  so ALL CREDITS for an  idea
to use a single chip 74LS151 multiplexer SHOULD GO TO MARTIN.


Improvements of this circuit relative to Martin's are:

* 16MHz clock is routed to the floppy controller  depending on the states of
  the HD-detect signal from the floppy and MOTOR-ON signal from the controller.  
  Thus, the controller chip is  overclocked  only  when it is actually doing
  something with a HD-floppy;
  
* It is mounted piggy-back on the floppy controller chip,  with a minimum of
  wiring;
  
* The circuit does not recognise the existence of two  drives,  and  so  the
  routing of Drive-select signals is not needed.   


The necessary ingredients for this floppy-drive replacement are:

* Existence of a WD-1772-02-02 floppy-controller chip in the  computer;  the
  02-02 suffix means that the chip is intended for wider temperature  range, 
  and so it can work reliably when overclocked.  It is  quite probable  that
  chips without the 02-02 suffix will not work, On  the other hand they may-
  because the overheating is reduced with this circuit.  

* Possesion of a HD floppy drive that can  be  configured  (usually by means
  of jumpers)  to output a HD-floppy-detect  signal  (logical "high") at pin
  2 of the 34-pin connector.  Some (mostly newer)  drives do not output this
  signal, and some may output  a logical "low" when a HD-floppy is detected.
  (note: the floppy I used  (produced by TEAC) outputs logical "low" on  the
  HD-detect line only when a DD disk is inserted AND the motor is spinning).
  
   
Comments accompanying the attached .IMG picture:

* There is no need to extract  the WD-1772 controler chip from the  computer
  motherboard;   however,  the clock-input (pin 18)  of this chip  has to be
  cut and disconnected from the motherboard.

* The HD adaptor is installed  by soldering  "piggy-back"  on the WD-1772  a
  14-pin chip socket (crosswise,  to pins  11, 14, 15 and 18 of the WD-1772,
  so as to connect only  clock, Vcc and Gnd).  That  means,  only pins 1, 7,
  8 and 14 of the IC socket are soldered to the  WD1772.  Pin 7 is  soldered
  for mechanical stifness only, the piggyback board doesn't use this signal.
  Other pins on the socket  are to be shortened a bit,  so as to enable only
  the   four corner pins to make contact, when the socket  is placed  on the
  WD-1772. 

* To the unsoldered pins of the 14-pin IC socket  come  8 MHz clock (pin 2), 
  MOTOR-ON (pin 4), 16 MHz clock (to pin 13) and HD-detect  signals  (pin 9-
  see picture).

* The 8MHz signal is to be connected from the nearby trace  on the  computer
  motherboard, where the clock-signal pin of  the WD1772  was  cut-off.  The
  16MHz signal is  to be routed  from  pin 39 of the Shifter.  The  MOTOR-ON
  signal comes from pin 20 of the WD-1772. The HD-detect  signal  must  come
  from pin 2  of the floppy connector.  Several pieces of wire are needed to
  connect all these signals. Make  the wires short and not too thick.  Route
  them tidily among the components on the motherboard.

* Into the 14-pin socket is plugged  a little PCB with the 74LS151 chip, two
  capacitors and a resistor.  Male pins are to  be soldered to  the board so
  that the board can be plugged into the socket.

* The original state of the  floppy controller can be restored  at all times
  by plugging-out the piggy-back  PCB and installing a jumper between  8 MHz
  and clock pin-sockets (pins 1 and 2 on the 14-pin socket) .

* Pin 5 of the 74LS151 is cut-off  and NOT soldered to the piggyback  board.
  This was the most comfortable way to pass a trace on the board below it.

* Although primarily intended for  a single floppy, this adaptor permits the
  use of two drives- it is just that they  both have to be  of the same type
  with a same type (HD or DD) of floppy disk inserted.


Important additional information:

* The computer can not  be booted from a HD  floppy diskette unless  a small
  "autoboot" program  is installed on the floppy,  and  the boot  sector  is 
  appropriately modified.  This autoboot program  must set the step rate for
  the floppy to 6ms, which will, with doubled clock,  become the normal  3ms
  step rate. Otherwise the drive will try  to step  over a  HD-floppy with a
  1.5ms step rate, which it can not physically do,  not  reliably at  least.
  This program MUST reside on the first track of  the disk or the boot  will
  fail. Booting from a DD diskette will be done normally, same as before the
  modification.

* If the computer is equipped with a harddisk the  step-rate-setting program
  can reside in the AUTO folder.
  
* If the computer  is equiped  with TOS 2.06 the  step-rate-setting  is  not
  needed as this TOS is  originally  supposed to be  used  with a HD floppy.
  TOSPATCH utility is recommended for  adapting TOS 2.06, making it install
  a HD-drive cookie, etc- if one has the equipment to burn the modified TOS
  back into the EPROMs or if one is using a RAM based TOS 2.06.

* Floppy disk drive has  to be set to  "Drive 0"  instead of  the more usual
  "Drive 1".  On older drives this was  accomplished  with  a jumper.  Newer
  PC-oriented drives  may have  small  solder  pads  instead of jumpers, and
  these pads may be  hard to locate, and  they  may not be labeled.  On some
  drives a jumper setting  is  also needed to  reconfigure them to  output a
  HD-detect signal on pin 2.
 
* Some drives may have another configuration  details to  be set  by jumpers
  or solder pads.

* I have heard that some floppy drives have problems detecting a floppy-disk
  change "the Atari way". 

* If the step rate is set to 6ms the floppy drive  may output unpleasant but
  harmless sounds when used with a DD floppy.

* Some references say that HD-modules as  this  one  are  not usable for STe
  and maybe Mega-STe  computers, because they  do not have available a clean
  16MHz signal.  For those  computers a  more  complex circuit with  a local
  16MHz clock is needed- see  Martin Graiter's instructions. Anyway, a Mega-
  STe is supposed to be able to handle  the HD floppy without modifications,
  provided that a certian GAL chip exists in the computer  (not all versions
  had this chip installed from the start).
  

Schematics:  

The picture is attached, IMG format, created in  Megapaint 4. I did not sign
it, because I think that credits should go mostly  to Martin Graiter,  whose
was the original nice idea to use a 74LS151.
  
   
Possible future improvements (increasing the complexity of the circuit):

* The circuit can be adapted for use with two drives,  if  the second  drive 
  is a DD type. The  now-unused  input C of the 74LS151  multiplexer  should 
  then  be connected fo the drive-select  signal,  and  the D4-D7 inputs  to
  8MHz closk. This modification would increase  the load on the  8MHz  clock
  signal,  however.  Of course, the current PCB  would  not be applicable to
  such case.  

* Step-rate switching  could be  provided  so that a  HD floppy drive  would 
  not make the unpleasant noise when a  DD floppy is inserted, and, further-
  more, the computer could be booted  from a  HD floppy  without  additional
  software. Apparently the WD-1772 does no data transfer while STEPping, so 
  the clock can be switched to  8 MHz  while STEP is active,  and  the drive
  will work silently with a 3ms step rate.  A monostable or a  counter/timer
  should be used, with a period a little  below 3ms, triggered by  STEP  and
  its output forcing the clock to 8 MHz.  A latch would be required to  make
  sure that clock switching  happens only on clock-pulse boundaries, so that
  glitches do not happen.  A circuit like this would probably  require about
  three TTL chips: 74LS151, 74LS74, 74LS121. 


Revisions:

Revisions are contained to  this text only;  the circuit itself has not been
changed. Some  typing errors  have been  corrected  and several remarks have
been added.

                                                   Beograd, 1996
                                                   (revised 2002)

                                                   Djordje Vukovic;

                                                   e-mail:vdjole@EUnet.yu

