[comp.sys.atari.8bit] More on SIO

slackey@bbn.com (Stan Lackey) (04/21/89)

OK, I just KNOW there are many many of you out there who are just dying
for an update on my PC-DOS-to-Atari disk file transfer progress...

The way I left it was I could read 810 and 1050 format disks OK, but was
unable to read XF551 (DD) disks at all.  Well, part of the problem is
fixed, that is I can read Atari-formatted DD disks now.  Apparently what
had happened was I had put the XF551 into some bogus state by attempting
to read the PC-written disk, and then attempting to read sectors 1,2,3 
of an Atari disk (which, by the way, Atari keeps in SD.  Question 1.
Is that done by software in the computer, or by the drive itself?)

As I recall, when I used Spartados DSDD XF551, it seems those sectors
may have been formatted DD because it took a couple "tries" before
a DD would boot.  Question 2. Does anybody know?

Finally.  I still can't read PC-DOS disks.  Are they in 256-byte sectors?
Is there some other incompatibility that will stop me?  How do I find
out?

Why not...  Is there more up-to-date information available from Atari,
later than the tech notes?  Specifically on DOSXE and/or the XF551?

Oh - I had noticed in the DOSXE book that disk files can have holes in them,
that is, NOTE/POINT don't have to add on to the end of a file.  I read on
to see how this works, and found that the file format includes a sector
map, apparently to allow NOTE/POINT to work even when a file is copied.
(The NOTE/POINT implementation is incompatible with DOS2, which actually
uses physical sector numbers.)  I thought this was really neat!  Do other 
DOS's have this feature?  Just curious.
Thanks, your help is appreciated.  -Stan

rcbamw@eutrc3.UUCP (m.waucomont) (04/25/89)

In article <38936@bbn.COM> slackey@BBN.COM (Stan Lackey) writes:
>...
>to read the PC-written disk, and then attempting to read sectors 1,2,3 
>of an Atari disk (which, by the way, Atari keeps in SD.  Question 1.
>Is that done by software in the computer, or by the drive itself?)
>..
>...SpartaDos... it seems those sectors may have been formatted DD...
>... Question 2. Does anybody know?
>..
>Finally.  I still can't read PC-DOS disks.  Are they in 256-byte sectors?
>Is there some other incompatibility that will stop me?  How do I find
>out?

Hi Stan!

A little tutorial upon Atari DOS, also interesting for those who wonder why
it is so hard to write software for an Atari to read/write PC-format...

First of all, there is the BOOT PROCESS: When an Atari is turned on, it
polls the serial bus for the presence of a drive. If it finds a drive,
it loads the first three sectors, called the BOOTSECTORS. These sectors
contain a piece of code (called the BOOTSTRAP), to load the rest of
DOS.SYS. This code will be executed right after it is loaded. The code 
to read the bootsectors is in the ROM of the Atari and originates from
the early days of the machine. When they had 128 byte sectors... This
explains why, even on a DD (=256 byte sectors) disk, the first three
sectors _have_ to be SD. On a DD disk the bootstrap does not only contain
code to load DOS.SYS, but also code that replaces the OS-routines for
sector I/O, thus allowing the next sectors to be of another density.
Quite logical, isn't it?

This is an answer to your first question. And to your second: No DOS can
ever write DD bootsectors, since the Atari OS _requires_ SD bootsectors.

Then there are some physical differences between Atari disks and PC disks.
Atari uses SS, 40 track, 18 sectors/track, 128 (or 256) bytes/sector,
versus (SS XT floppy) 40 track, 9 sectors/track, 512 bytes/track on a PC.
An unmodified 1050 (I do not know anything about the XF551) can _ONLY_ read/
write 128 byte sectors. When those drives came out, Atari advertised with
its capability to read/write E(nhanced)D(ensity) disks. They just crammed
26 sectors in a track (40*26*128=130K, vs SD:40*18*128=90K). As far as I
have understood, the new (after my Atari time, so that's new to me :-)) )
XF551 can read/write 256 byte sectors, BUT THAT IS STILL NO 512 !!!

To make things even worse, a PC drive uses the index hole of a disk to
determine which sector is the first of a track. The 1050 makes that sector
(about) twice as long... This should answer your third question...
Sorry, but there is only one way to make an Atari drive read/write PC
format disks: MODIFY THE DRIVE!!. The Atari drives contain a 6508, which
is in fact a baby-6502(smaller casing, smaller address space), some ROM
(containing software to perform its tasks, ie read/write, communicate
with the Atari over a serial line, format a disk etc..), some RAM for
sector buffering (only 128 bytes in a 1050..) and the very same disk
controller as used in the PC (a WD1793, I believe). So the controller
can be programmed to read/write PC format, but only by changing the
code in the ROM of the drive....

DON'T PANIC: You don't have to do this all, it has been done allready!!
There is an upgrade available for Atari drives, the Happy controller,
which does all the things described. It was originally meant to boost
the capacity of the slow 1050 and 810 drives. It does not only double
the storage capacity, but also speeds things up quite a bit. I have
heard that they ship their Happy Controller with software to read and
write PC format disks!! Sorry, but I do not have their address.....
(too bad...)

Ciao!

Michel J. Waucomont.



DISCLAIMER: All the knowledge about the Atari 1050, it's internals and
how to control it are reproduced from memory. The last time I have seriously
been working with an Atari is about two years ago. This should explain
my lack of knowledge about their latest products (XF551) and some of
the inaccuracies, which might be in this article. The recent purchase of
a second hand 800XL w. 1050, which happened to be equipped with a
Happy controller, just revived my interest in the machine. Furthermore,
I have got nothing to do with Happy, other than being a satisfied
owner of a product of them...

hans@umd5.umd.edu (Hans Breitenlohner) (04/29/89)

In article <38936@bbn.COM> slackey@BBN.COM (Stan Lackey) writes:
>  ... read sectors 1,2,3
>of an Atari disk (which, by the way, Atari keeps in SD.  Question 1.
>Is that done by software in the computer, or by the drive itself?)

The sectors on the disk are actually 256 byte double density sectors.  
The drive only transfers the first 128 bytes from/to the computer.

>
>As I recall, when I used Spartados DSDD XF551, it seems those sectors
>may have been formatted DD because it took a couple "tries" before
>a DD would boot.  Question 2. Does anybody know?
>
I think these problems are related to the drive not recognizing (at least not
until it gets several errors) that the disk is double sided.

>Finally.  I still can't read PC-DOS disks.  Are they in 256-byte sectors?

No, 9 512 byte sectors per track.
A slight additional complication is the fact that all Atari formats write
the complement of the data to disk.

hans@umd5.umd.edu (Hans Breitenlohner) (04/29/89)

In article <604@eutrc3.UUCP> rcbamw@eutrc3.UUCP (m.waucomont) writes:
>To make things even worse, a PC drive uses the index hole of a disk to
>determine which sector is the first of a track. The 1050 makes that sector
>(about) twice as long... This should answer your third question...

This is not quite accurate.  The PC (and most other reasonable disks) start
a track at the index mark, write the required number of sectors (with all
the appropriate headers and gaps), and then write a gap until they encounter
the index mark again.  The 1050 does not use the index mark, and therefore
must use a different approach to ensure that the track does not contain
unwanted sector headers:  It writes a very long gap (about 1/4 track, I 
think), then all the sectors, and then stops immediately.  Most of the
long gap gets overwritten.
The resulting track format is almost identical, and most disk drives /
controllers / software drivers can read disks formated by either method
equally well.

Ordania-DM@cup.portal.com (Charles K Hughes) (04/30/89)

  RE: XF551 & Spartados, etc

   The XF551 when first turned on pretends that it is a single sided single 
density (SSSS) disk.  IT doesn't care what disk you put it, it retains that 
configuration until the computer access the drive; at that time, it 
reconfigures for the correct type of disk that is inserted.  Unfortunately, 
SpartaDos thinks the drive is still SSSS when actually it is a DSDD disk.  
This causes the boot error, but if you hit reset it will boot correctly.  This
may even happen with DOS XE, but since I can't see a reason to use it, I don't
know for sure.


 
Ordania-DM
 @cup.portal.com

rcbamw@eutrc3.UUCP (m.waucomont) (05/01/89)

In article <4781@umd5.umd.edu> hans@umd5.umd.edu (Hans Breitenlohner) writes:
>In article <604@eutrc3.UUCP> rcbamw@eutrc3.UUCP (m.waucomont) writes:
>>To make things even worse, a PC drive uses the index hole of a disk to
>>determine which sector is the first of a track. The 1050 makes that sector
>>(about) twice as long... This should answer your third question...
>
>This is not quite accurate.  The PC (and most other reasonable disks) start

You're right Hans! But the point I tried to make in my article was to tell
Stan that it is not possible to control such features by modifying software
in the Atari. To do so, the software in the drive must be re-written.
Thanks for your reaction though.. I have learnt something :-)))

M. 'Mikki' Waucomont