[comp.sys.atari.st.tech] 1.44MB project - the GAL listing + docs !

michaels@messua.informatik.rwth-aachen.de (Michael Schwingen) (06/18/91)

OK, as I got some requests, I am now posting the jedec file + docs for the
GAL 16V8 which contains nearly everything that is necessary to connect
HD-drives to a ST.  A GAL is a programmable logic device which is very
versatile and can be reprogrammed about 100 times.  Here in germany, a GAL
16V8-25 costs about 2.50 DM (around 1.50 $). It is a small 20-pin device -
so this is a very simple solution if you want to connect HD-drives to your
ST.  It is very versatile because there are nearly no modifications necessary
if you change the type of one drive after building this circuit.  The only
problem is to program the GAL ...

I have phoned the author (Gerd Knops) - it may be freely distributed if it is
not used commercially.

  In addition to the programmed GAL, you need a WD1772/VLSI1772 which does
work with 16MHz clock.  As there is no real 16 MHz version available, there
are only hints which versions of this chip work with HD and which do not.  It
seems that most WD1772-0002 do not work at 16 MHz (but a few do).  Nearly all
WD1771-0202 do work at 16 MHz, but a few do not.  The VLSI1772 seems to work
in most cases, too, but a bit less often than the WD1772-0202.

  The GAL needs a 16MHz-signal which has to be connected to Pin 1 and 2 (see
below).  You can get this signal from the video shifter - but this can cause
trouble if you have a ST with a weird timing or if you have other circuits
already connected to this pin (eg.  a 16MHz-CPU-accelerator).  In this cases,
you should use a new 16MHz-oscillator.  The signal does not have to be in
phase with the system clock - you can simply connect any 16MHz crystal
oscillator here.  16MHz crystal oscillators are available as a complete unit
the size of a 14-pin IC (but actually only with 4 pins).


The following is a rough translation of the file HD_CTRL.TXT:
===============================================================================
WARNING: in order to understand this, it is recommended that you know the
contents of the article 'Ganz schoen dicht' from the german magazine
'ST-Computer', 1/1990, page 28.

Short description of GAL 16V8 'HD_CTRL:
---------------------------------------

The GAL does the following:

- Buffering of critical signals (side select, drive select)
- It generates the drive delect signal for a third floppy drive
- It generates the high-density-signal for normal drives
- It divides the crystal frequency. The 16/8 MHz clock is generated under
  control of the high-density signal.

Tha GAL can be used to connect either normal or HD 3.5"-drives as drives 0/1
and a 5 1/4"-drive as drive 2. This drive can be used as drive 1 (= B:)


Pinout of GAL 16V8 'HD_CTRL'
----------------------------

PIN 1,2:        In      16 MHz clock-signal (from video shifter oder better
                                             from independant crystal osc.)

Pin 3:          In      SideSelect       -- from ST (AY-3-8910)
Pin 4:          In      Drive Select 0   -- from ST (AY-3-8910)
Pin 5:          In      Drive Select 1   -- from ST (AY-3-8910)

Pin 6:          In      B=Drive Select 2
                        If this pin is connected to +5V, the output drive
                        select 2 is used instead of drive select 1.
                        This pin can be controlled via a simple switch or by
                        connecting it to a ST port (eg.  RTS from the MIDI-ACIA,
                        pin 5, which is usually unused and which is LOW after a
                        reset).
                        If you do not have a second 3.5"-drive, but a 5 1/4"-
                        drive, you should connect this pin directly to +5V.

Pin 7:          In      High: Drive 2 = Low Density
                        If a 5.25"-drive is used as drive 2, this pin selects
                        whether the drive is in HD or 2D mode. It can be
                        controlled via a switch or by connecting it to a ST
                        port (eg. RTS of the KEYBOARD-ACIA, pin 5, which is
                        usually unused and which is LOW after a RESET.

Pin 8:          In      High: Drive 1 = Low Density    These two lines are
Pin 9:          In      High: Drive 0 = Low Density    connected to 0 or 1
                                                   depending on the drives.
                                                   If the drive is an original
                                                   2D drive, the corres-
                                                   ponding pin is connected
                                                   to +5V. If the drive is a
                                                   HD-drive, the pin is con-
                                                   nected to GND.

Pin 10:                 GND

Pin 11:         In      /OE, connect directly to GND

Pin 12:         Out     Clock
                        This pin delivers the 8/16 MHz clock for the floppy
                        controller. Connect this to pin 18 of the 1772

Pin 13:         ---     used internally, leave open

Pin 14:         Out     Drive Select 2                    * to drive-bus
Pin 15:         Out     Drive Select 1                    * to drive-bus
Pin 16:         Out     Drive Select 0                    * to drive-bus
Pin 17:         Out     Side Select                       * to drive-bus
Pin 18:         Out/In  High Density (Pin 2 Shugart Bus)  * to/from drive-bus

Pin 19:         Out     8 MHz, is used internally, leave open

Pin 20:                 Vcc +5V


Connect Pin 1 and 2 to the 16MHz-signal.

Cut the side select and the two drive select lines from the soundchip and
connect them to the GAL (pins 3-5).

Connect pins 6 and 7 to switches or to the ACIAs.

WARNING: On most ST pcb's, the RTS-outputs of both ACIAs are connected to each
other. This connection makes absolutely no sense and MUST be cut if you want
to use one or both ACIA outputs.

Connect pins 8 and 9 to +5V or to GND, depending on drive types.

Connect pins 10 and 11 to GND, pin 20 to +5V

Cut the connection between the clock pin of the 1772 (pin 18) and the rest of
the ST. Connect pin 18 of the 1772 to pin 12 of the GAL.

Connect pin 14-18 of the GAL to the shugart-bus (drives):

GAL  Shugart
18       2
17      32
16      10
15      12
14      14

ready.

If you have questions:
       Gerd Knops, Rosenstrae 77a, 4154 Tnisvorst 1, Germany
       Telephone: 02151-700522   or   Mausnet: Gerd Knops @ Ms

Programmed GALs and circuit schematics are available at the author by
sending 10DM and a stamped, self-addressed envelope
(I do not know if he will ship them outside germany - MS)

ANY COMMERCIAL USE MUST BE AUTHORIZED BY THE AUTHOR!
===============================================================================

NOTE: If you have an TT, this circuit is not needed, because it is already
build-in! All you have to do is connect a HD-drive and set configuration
switch 8 on the TT board to 'ON'. You can then select 'HD' in the format
dialog box. However, this requires TT-TOS 3.05 - there is a bug in 3.01 which
disables the button.


I hope this helps.  I have added some text at different points of the
description, so it might be a bit easier to understand if you do not know the
original german article.  I have tried to be accurate, but I can not
guarantee that everything is correct.
YOU DO ALL MODIFICATIONS TO THE ST AT YOUR OWN RISK!

===============================================================================
! Michael Schwingen, Ahornstrasse 36, W-5100 Aachen, Germany                  !
! michaels%cip-s01.informatik.rwth-aachen.de@unido.bitnet       (preferred)   !
! michaels@cip-s01.informatik.rwth-aachen.de                                  !
! (if 'cip-s01' does not work, try 'cip-s02' or 'messua' instead)             !
-------------------------------------------------------------------------------
! PLEASE KEEP MAIL FROM OUTSIDE GERMANY SHORT-I HAVE TO PAY FOR INCOMING MAIL !
===============================================================================

The following is an uuencoded lharc-file which contains the JEDEC-file for
programming the GAL (binary file!) and the original german text.

begin 666 hd_ctrl.lzh
M(CLM;&@Q+:("  "$#   @@'8%"  #$A$7T-44DPT+DI%1/3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