Inside the XF551 Disk Drive by Bob Woolley - Part 1 & 2

NOTICE: This article originally appeared in the January, 1989 issue of
Atari Interface Magazine and may be freely distributed or reprinted in
non-profit User Group publications as long as the article's author and
Atari Interface Magazine are credited AND this notice is reprinted with
the article.  All other publications must obtain written permission from
Unicorn Publications, 3487 Braeburn Circle, Ann Arbor, MI 48108,
Phone: (313) 973-8825 before using this article.

Inside the XF551 Disk Drive by Bob Woolley - Part 1:

[Editorial notes by Len spencer]
[further "personal" notes by Andreas Magenheimer]

It has been almost a year since I first got my hands on an XF551.  Busy
little hands... Of course, the first thing I did was to tear the thing
apart to see how it was put together.  And, maybe do a little "put"ing
myself.  As a result, I have made a few modifications that may be of
interest to other XF551 owners.  You will not be able to successfully
make these changes unless you have reasonably decent electronic skills,
so don't gamble with your new XF551 unless you know what you are doing.
Most User Groups have skilled members that will be happy to guide you if
you need help.

First

But, before I get caught up in details of the drive, I would like to
clarify some points on the XF551.  The drive IS double sided and can
read and write in single, enhanced or double density.  The "book" that
comes with the drive is incorrect.  MyDOS [SuperDOS, TOP DOS, Bibo DOS,
Turbo DOS] and SpartaDOS can all format the drive as double sided and 
double density. Previous Atari drives did not use the INDEX hole on the 
diskette, which allowed us to flip the disk over and format the back of 
the media. The XF551 uses a standard, bone stock, IBM-style drive. Alas, 
it uses INDEX. Thus it will not FORMAT the back of a diskette unless the 
disk jacket has two index holes. It WILL read and write to the back of 
any disk. Guaranteed! [Well Bob, here in Europe we do not only have 
Mitsumi-XF drives. Many of our Atari XF drives have other mechanics, for 
example Chinon; these drives are even worse than the original Mitsumi 
drives: they will NOT! read, nor write, nor format side B of a disk unless 
a) it has two index holes or b) you build a sort of timing-hole redirection; 
german: Indexloch-Umgehung. A.M.]

On side one, the tracks on the disk are written from the outer edge in, from
0 to 39. On side two, the tracks are written from the inner edge out. This
allows us to read the first 40 tracks of a DSDD diskette on a SSDD drive.
The second side is not backwards nor could it be read on a SS drive even
if you changed it. The speed of the drive is NOT 288 RPM, the speed you
are used to seeing, but 300 RPM, the industry standard.  The XF551
compensates for the difference by using a clock frequency 4% (.33mhz)
higher than it should be. This will read and write the data in exactly
the same place on the diskette as your 288 RPM drive, although programs that 
measure the speed of the drive will read 300 RPM.

Talking To The Drive

The XF551, as it comes from Atari, has the ability to format a diskette
in any of four configurations: single density (SSSD-90K), 1050 density
(SSED-130K), double density (SSDD-180k) and double-sided, double
density (DSDD-360K). The DSDD format has a standard skew (skew
is the physical sequence of the sectors on the disk) and a high speed skew
option available to the user. This extra skew layout allows faster data
transfers on the SIO bus, much like the ICD Doubler upgrade on the 1050.
For those of you interested in programming, the DSDD format SIO
command is $23. For a high speed skew format in DSDD, you just need to
turn on bit 7 for a value of $A3 (the SSSD and SSED formats do not have a
high speed skew, although the drive will transfer data at high speed in those
densities [Well, thats not pretty correct: the XF551 will not automatically
transfer data at high speed in single or 1050 density; you need a DOS or a
sector copier that uses XF highspeed SIO to do that. Here in Europe there
are many XF DOS versions and XF sector copiers available, since Atari sold 
only the XF551 -and not the 1050- drive to eastern europe. A.M.]  

To transmit data at high speed to and from the XF551, just set bit 7 of the 
command to "1" again (a get sector ($52) with bit 7 on is $D2). You must 
still send the command frame at the normal SIO rate ($28 in $D204) and then 
set $D204 to $10 for high speed operation during the data frame. The drive 
will also recognize the Put (and Get) Option Table command ($4F and $4E), 
which are similar to the Percom configuration table operations. Only bytes 
4-8 are changed by the Put command, however, and only the four supported 
formats will be recognized. Even if you sent the Option Table a 512 byte 
sector size, you would only get 256 byte sectors. A number of the newest DOS 
versions (SpartaDOS X, SuperDOS 5.x, DOS-XE...) [here in Europe also: DOS-XF, 
Turbo-DOS, Bibo-DOS, Bewe-DOS, X-DOS, etc. A.M.] now have XF551 support built 
in. Alas, most disk versions of Sparta DOS do not like the XF551 or XF351 
drive, they will respond with a nasty "Error - no DOS!" message and you have
to reboot the disk and try again. Luckily, some files are available in Atari8  
on CompuServe that will modify SpartaDOS 3.2 for the XF551 features (two 
programs and docs. in Basic, one will modify SpartaDOS, the other will modify
the format-programm XINIT.COM). Using any of these methods will transfer data 
almost twice as fast as good old DOS 2.0.

Into The Hardware.

The first thing you notice about the ICs in the drive is the one in a
nice socket, the ROM.  Makes it a lot easier to burn an EPROM (use a 2764)
to make code change if you can just plug and unplug your devices. [Here in
Europe we have built-in Eproms as drive OS. These PAL OSs have small
differences compared to the NTSC ROMs. Thats why some extra XF551
OSs / upgrades made in the US will not work properly on PAL XF drives and
vice versa: PAL upgrades will not work on NTSC drives. A.M.]. I didn't see 
the ROM source code printed anywhere, so I wrote a simple disassembler for 
the 8050 MPU used as the brains of the drive. [Some were manufactured with 
an 8040. It has the same 256 bytes working RAM as the 8050, but no built-in 
ROM. Apparently the internal ROM was never used, as the drive OS is on its 
own ROM elsewhere on the board. - L.S.]. It was very nice when Atari used a 
6507 (which uses 6502 OPCodes) in their drives but, no more. Everything Atari 
comes out with now seems to use a different chip and this 8050 stuff was a 
bear. Finally, I got most of the program logic worked out and designed some 
changes:

One upgrade that was available for the 1050 is a ROM change that will
re-address the drive as D5: through D8:.  This can be done on the XF551
ROM by altering location $0095 from $31 to $35 ($33 gives you a range of
D3: to D6:, etc.). Having 360K is nice. Having 720K is even nicer.
Putting a 720K, 3.5 inch drive in place of the stock drive is not too
hard, so let's start with the ROM. There is a little bug in the code
that allows the drive to start writing the track before it has reached
operating speed. To remedy that, change $528 from $90 to $00, $C1D from
$88 to $80 and $E25 from $88 to $80. [I have heard reports that this may
be unnecessary, so you may or may not want to make the aforementioned
changes. I have had the problem, so better safe than sorry. - L.S.]
The 720K drive has 80 tracks per side which requires you to change $680
from $28 to $50, $80F from $30 to $60 and $811 from $FD to $FA. A 3.5
inch drive uses a 3ms seek time -- change $53D from $00 to $03, $57B
from $18 to $13, $9D1 from $08 to $03, and $B15 from $18 to $13. Finally,
the 3.5s use write pre-compensation -- change $61D from $F6 to $F4, $621
from $F6 to $F4 and $D0D from $A2 to $A0.  

For a drive, I used a unit from JDR Microdevices (MF353B Mitsubishi) that 
plugs right into the 5.25 connectors and uses the same mountings as the 
larger drive. This simplifies the installation quite a bit. When you go to 
plug in the 3.5, you may notice that the 34 pin cable is too short. I 
de-soldered the connector and added a longer cable, but one hacker, Joe 
Wyks, managed to pry the top off of the board connector and crimp his new 
cable into place without soldering.  [The latter was the method I used, as 
it is a little easier on the circuit board. L.S.] The power connector can 
be adapted with cables made for that purpose, if necessary. That's about all 
that's needed to run a 720K 3.5.  Format a disk using SpartaDOS XINIT, 
option 7 (DS 80 tracks) and start filling it up!  You now have 2880 DD 
sectors.

[Or try MyDOS option "O" 80 tracks, double-sided, then option "P"
double-density and finally option "I" formatting, which will also give 
you more than 2800 DOS 2 formatted sectors. I have been told that Top 
DOS and DOS 4, as well as other DOS versions, also support 720kbyte or 
at least they can be patched to do so. Just try it out - A.M.]

**************************************************************************

Inside the XF551 Disk Drive by Bob Woolley - Part 2:

Betreff: XF551 Upgrades to 3.5
Datum: Sun, 11 Aug 2002 20:59:13 -0700
Von: "Bob Woolley" <ataribob@directvinternet.com>
Foren: comp.sys.atari.8bit

I noticed that Andreas posted the original XF551 upgrade from AIM magazine.
I would like to add the later changes that you might wish to make in
addition to the originals. Some of the original changes have been deleted
and some values have changed. I do not enable spin-up at $0C1D and $0E25
anymore. I do not enable spin-up on a seek at $057B, $09D1, or $0B15 (the
values have changed). The stock Atari XF551 will only switch from DD to SD
when it tries to read a new disk. It will NOT switch from SD to DD unless
you are reading sectors 1-3. This makes it very difficult to read a sequence
of disks that contain both densities. Once you boot a DD disk and then read
a SD disk, you have to re-boot to read another DD disk. With the additional
code, you can just wait for the drive to get an error (or, you can hit
BREAK) and when it re-tires, it will try the other density. Try it - you'll
like it! I have done hundreds of disks with this version with no problems at
all.

Here are the changes made to a standard XF551 ROM :

   ADDR    TO

1. $0528  $00  spin-up on FORMAT only.
2. $0680  $50  make 80 tracks.
3. $080F  $60  2's compl of max sector.
4. $0811  $FA  hi byte of #3.
5. $053D  $03  seek to 3ms+spin-up.
6. $057B  $1B  seek to 3ms.
7. $09D1  $0B  seek to 3ms.
8. $0B15  $1B  seek to 3ms.
9. $061D  $F4  write with precomp.
10.$0621  $F4  write with precomp.
11.$0D0D  $A0  write with precomp.

     To alter the retry restore (where the drive is trying to re-read a
track that gave him an error), add a JMP $E0 (24,E0) at $09AF. AT $9E0 and
$9F0, add the patch:

a. $9E0   $09       INPUT A P1
          $53,08    AND #08
          $C6,F0    JZ $F0  jump if zero
          $9A,CF    AND P2 #CF
          $8A,10    OR P2 #10
          $99,E7    AND P1 #E7
          $24,B1    JMP $B1
b. $9F0   $8A,30    OR P2 #30
          $89,08    OR P1 #08
          $99,EF    AND P1 #EF
          $24,B1    JMP $B1

     This will force the alternate density every time you do a retry restore
and thus switch you to DD when you need it. It works on 5 1/4 and 3 1/2 and
is independent of the other changes.

Bob Woolley

(EOF)


