Visit Atarimax Store


Free-Net Logo
The Atari SIG Historical Archive
Created and hosted by: atarimax.com
[ HOME | GO ATARI | 8-BIT | ST/TT | PORTFOLIO | LYNX | JAGUAR | LIBRARY ]


Article #67 (75 is last):
From: aa700@cleveland.Freenet.Edu (Michael Current)
Newsgroups: freenet.sci.comp.atari.prog.8bit.resource
Subject: XF551 upgrade to DS/HD 3,5"???
Reply-To: aa700@cleveland.Freenet.Edu (Michael Current)
Posted-By: xx004 (Atari SIG)
Date: Wed Jul  1 11:43:09 1998


From: JTKirk 
Date: Tue, 19 May 1998 18:24:57 -0500

I came across this article the other day, while searching for info on
the XF551 controller (the WD1772), and thought it Nmay also be applied to
the ATARI 8-bit computers.
I also took a look at the XF551's tech specs, and that's what I found out:

Processor: 8040/8050AH at 8.3333MHz (docs say 18.33, but it's a mistake)
Disk controller: WD 1772 02-02 (I opened my drives and looked at the
complete code)
SIO data rate: normal: 19040bps (NTSC)/18866bps (PAL)
               high speed: 38908bps(NTSC)/38553bps (PAL)
Rotaton rate: 300RPM
Power source: external power adapter, 9V AC, 31VA, 60Hz (NTSC)/50Hz (PAL)

 perating modes:  Single      Dual       Double Density
Number of sides   1           1          2
Total tracks      40          40         80
Sectors per track 18          26         18
Bytes per sector  128         128        256
Total bytes       92160       133120     368640
Encoding method   FM          MFM        MFM
Transfer rate     125000bps   250000bps  250000bps
Acces time: (maximum)
  track to track  40ms        40ms       40ms
  motor start     1000ms      1000ms     1000ms

After checking thNe following article and comparing with the specs for the
XF551, I began to think tht it could also apply to the XF551 for making
it a HD drive. Read the following and then express you opinions. The
original authors'names should appear down there within the text.

-----------[begin quote]-----------


 Introduction and Notes for adding High density disk drives to the Atari ST

The first thing you must do, is to verify that your existing HDD controller
IC is a suitable one for the modifications. The controller on the Atari ST
is a Western Digital WD1772 and carries a suffix (usually) of 00-02 or
02-02. As it is explained in the following texts, the original chip is
designed to run at 10MHz and only the 02-02 chip will handle the higher
clock speed of 16MHz, so ensure that you have a compatible HD controller
first.

There are no major problems with running two disk drives either one of each
or two high density drives but a little jiggery pokery is required to get
it all rolling properly. The Ntype of HD drive you select will depend upon
you but some are easier to work with than others - it is essential that you
get a drive that will handle the full Shugart specs and not one of the
(increasingly common) PC type HD drives that has limited functions. The HD
drive MUST have the ability to send out the HD select signal on it's
interface connector. The PC does not use this normally as the HD select is
controlled by the PC host card and tells the drive what kind of disk is
inserted (this is the reason that the PC can mess up a HD disk by
formatting the media with the wrong data rate).

For full compatibility you'll need to gate the HD select signal with the
drive select lines so that you can mix both high density and normal density
drives on the same bus.

Some of the later series of HD drives have a pull-up on the HD select line
that will stop you accessing the normal 720k drive as a second unit. This
can be overcome by swapping jumpers (assuming you get a drive that can be
configured pNroperly) or by changing the pull-up to a higher value and
arranging gates so that it is driven and held low for non high density disk
access.

You may also experiance timing problems with some obscure makes of drive,
so be careful to make sure you know what the drive unit you are buying
can/can't do.

Finally, if you boot from the A: drive and you make this your high density
one then be aware that you will need a small "autoboot" program to set the
step rate BEFORE you can boot from a high density disk. This program MUST
reside on the first track of the disk or the boot will fail for resons
explained below
---------------------------------------------------------------------------

                                How it Works

Basically the 720k and 1.44 meg disks drives are compatible in as much as
that they both have 2 sides and 80 tracks. Now the important difference is
the speed at which they write to the media. With 720k disks, the data is
written out by the drive at 250k bits/second N- this is known as "double
density" and uses MFM encoding. A high density drive uses exactly twice
this speed at 500kb/s and hence, writes twice as much data to the media.
This is layed down by the format program as 18 sectors (instead of 9 on a
720k) per track of 512 bytes per sector. This faster rate is still MFM
encoded and is known as "high density". There is yet a faster rate again at
1Mb/s that is used on the IBM machines and creates disks of 2.88 meg
capacity but a new controller IC would be needed for this (anyway, the
disks are too expensive yet) and it's known as "quad density" and there is
an older standard known as "single density" which was half the data rate of
the original 720k we discussed at 125Kb/s (remember the old CPM machines
and things).

OK, you've swallowed all that (what you haven't....) now consider that
since the physical interface is the same and only the data rate changes (a
high density drive unit switches it's data rate up to 500kb/s when you plug
in a disk with Nan extra hole) between 720k and 1.44 meg disks, it becomes
easy to see that if we send the data at the same speed as the high density
standard, then we can talk to high density media. How do we do this - easy,
double the clock rate to the disk contoller chip. It's normally run at
8MHz, so run it now at 16 MHz and presto... you have your high density
interface. You can pick up a 16MHz clock in the Atari from the video
shifter.

One unfortunate side effect of doing this, to which I referred earlier was
that since the data rate has changed and the speed doubled, then it now
takes the HD controller chip half the time to carry out any operation than
it did before. Now this means that effectively, the STEP rate of the disk
drive (a function of the controller chip) is now halved from 3ms to 1.5ms
(and I haven't yet found a drive that'll go this fast). So the problem when
booting from a HD disk, is that you must load a little utility that will
change the STEP rate (programmed by the operating system) tNo 6ms (which
when clock doubled becomes 3ms).

Now, this utility has to be small enough to fit on track 0 otherwise the
disk drive will try and step out to the second track at 1.5ms (which it
won't do) and the drive goes out of sync. Quite a number of programs
incorporate the ability to change step rates and a small program can be
written to do the job (I have written such a small utility if anyone wants
it).
---------------------------------------------------------------------------

                               Compatability

There are one or two commercial 720k disks that complain and refuse to load
if tried in a converted machine with a 1.44 meg as drive A: and if you're a
games freak then it is probably better that you make the HD unit, your B:
drive to maintain compatibilty. Once written and formatted, TOS takes care
of how many sectors per track there are and I have found no (serious)
problems at all with two HD drives fitted to my Atari Mega 3. One last
point to bear in mind is thNat a lot of (both commercial and PD) utilities
were written to allow the use of 9, 10 or 11 sector formats, so these will
not work with an 18 sector disk and any cleanup/repair/disk doctors that
can't handle HD media, will most probabyly foul things up for you and make
an even worse mess - you have been warned.

Oh yes, forgot to mention you can handle 5.25" HD drives as well but you
need to fit an external switch (the 5.25" HD doesn't have an HD select line
OUT)

Happy hacking.....
Martin GW6HVA @ GB7OSP
---------------------------------------------------------------------------

                 Atari ST High Density Disk Drives - Part 2



/* formath.c Formatter fuer High Density Disketten */

/* nur fuer angepasste Hardware! Floppycontroller und Laufwerk */

/* muessen High-Density tauglich sein! */

/* Hartmut Semken, Lupsteiner Weg 67 1000 Berlin 37 */

/* hase@hase_1.mbx.sub.org or hase@netmbx.mbx.sub.org */

/* 03-SEP-89 */

#include

#include

#include



#define SLEEPTIME 1     /* 1: Zeitschleife, 0: Taste */

#define BLANK (0xE5E5)

#define MAGIC (0x87654321L)

#define BUFSIZE (20*1024) /* Platz fuer mehr als 18 Sektoren... */



#define DEVICE 0        /* 0 = Floppy A, 1 = Floppy B   */

#define SIDES 2         /* je                           */

#define SECTORS 18      /* nach                         */

#define TRACKS 80       /*Belieben                      */



#define TOTSEC (TRACKS * SIDES * SECTORS)



extern int errno;



main()?

        int track;

        int side;

        int status;

        short *bf;

        register char reply;

        short *middle;

        char buffer[512];



        printf("\033E\n");

        printf("Public Domain High Density Mini Formatter\n");

        printf("von H. Semken\nDer Autor garantiert in keiner Weise fr die

 Funktion\nDieses Programmes.\nBenutzung auf eigene Gefahr.\n");

        printf("\n\n\n");

        printf("\007\033pFormatiere Diskette in Drive %c\033q\n%d Seiten\n%d
Sektoren

 pro Spur\n%d Spuren\n\n", (65+DEVICE), SIDES, SECTORS, TRACKS);

        printf("Wirklich formatieren? ");

        fflush(stdout);

        if ((reply = Crawcin()) != 'y' && reply != 'Y' && reply != 'j' && reply
!= 'J')

 ?

                printf("Nein. Floppy nicht formatiert.\n");

                sleep(1);

                Pterm0();

        ?

        printf("Ja.\n");

        printf("Diskette einlegen; Taste drcken...");

        fflush(stdout);

        Crawcin();

        printf("\n");

        bf = malloc(BUFSIZE);

        for (track = TRACKS-1; track >= 0; track--) ?

                for (side = 0; side < SIDES; side++) ?

                        printf("Formatiere Spur %d, Seite %d", track, side);

                        fflush(stdout);

                        status = Flopfmt(bf, 0L, DEVICE, SECTORS, track, side,
1, MAGIC, BLANK);

                        if (status) ?

                                middle = bf;

                                printf("\t%d\n", status);

                                while (*middle) ?

                                        printf("\tDefekter Sektor %d\n",
*middle++);

                                ?

                        ? else ?

                                printf("\tokay\r");

                        ?

                ?

        ?

        printf("\n\nAlle Spuren formatiert\n");

        printf("Initialisiere Directory\n");

        for (track = 0; track < (BUFSIZE>>1); bf[track++] = 0);

        for (track = 0; track < 2;track++) ?

                for (side = 0; side < SIDES; side++)?

                if (status = Flopwr(bf, 0L, DEVICE, 1, track, side, SECTORS)) ?

                        errno = -status;

                        perror("Write Error");

                ?

                ?

        ?

        Protobt(buffer, (long)Random(),3,0); /* Prototyp Bootsector fr

                                              * 80 * 2 * 9 Sektoren */

        /* Prototyp Bootsektor fr das neue Format anpassen */

        /* Bytes 19 und 20 enthalten die Sektoren pro Disk */



        /* unteres Byte von TOTSEC */

        buffer[19] = (char)(((TOTSEC>>8)<<8)~TOTSEC);

        /* oberes Byte von TOTSEC; es lebe das Intel int-Format */

        buffer[20] = (char)(TOTSEC>>8);

        buffer[24] = (char)SECTORS; /* Sektoren pro Spur */

        status = Flopwr(buffer, 0L, DEVICE, 1, 0, 0, 1);

        if (status) ?

                errno = -status;

                perror("Write Error (Bootsector)");

        ?

        status = Flopver(buffer, 0L, DEVICE, 1, 0, 0, 1);

        if (status) ?

                errno = -status;

                perror("Verify Error (Bootsector)");

        ?

        printf("Diskette in Laufwerk %c formatiert\n", (65+DEVICE));

        sleep(1);

        Pterm0();

?



sleep(seconds)

int seconds;

#if SLEEPTIME

?

        clock_t t;

        for(t = clock();clock() < (t + CLK_TCK*seconds););

?

#else

?

        printf("Taste druecken\n");

        fflush(stdout);

        Crawcin();

?

#endif

--

Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37 hase@hase_1.UUCP

Dennis had stepped up into the top seat whet its founder had died of a

lethal overdose of brick wall, taken while under the influence of a

Ferrari and a bottle of tequila. (Douglas Adams; the long dark teatime...)



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

--
__________   ____---____       Marco Antonio  Checa  Funcke
\_________D /-/---_----'       mailto:mcheca@li.urp.edu.pe,
       _H__/_/            jtkirk@usa.net,JTKirk@HoTMaiL.com
      '-_____|(     http://www.GeoCities.com/Hollywood/2645
-- 
Michael Current, mailto:mcurrent@carleton.edu
8-bit Atari FAQ and Vendor Lists, http://www.faqs.org/faqs/atari-8-bit/
Cleveland Free-Net Atari SIG, telnet://freenet-in-c.cwru.edu (go atari)
St. Paul Atari Computer Enthusiasts, http://www.library.carleton.edu/space/


Visit Atarimax Store