[comp.sys.atari.st] floppy disk-change

logajan@ns.network.com (John Logajan) (03/25/90)

From time to time I've seen mention of replacement floppy drives not indicating
disk change status.  Since I've had a replacement drive for longer than my
human memory works, I don't recall if the original could really detect disk
change status either.

Looking at the pinouts and schematics for a 520 ST reveals that there is
no dedicated "disk change" signal.  So if the original Atari floppy drives
could inform of disk change condition, that information would HAVE to be
indicated in some way over the only lines available to do so, namely:
read-data, track-0, write-protect, and index.   Furthermore, these signals
go directly and only to the floppy controller chip, so that if there is
any disk-change detection going on, it has to be occuring there.

I will pursue this by looking into the specs of the floppy controller,
but if anyone has any clues or knows the answer to this, let me know.
Thanks.

-- 
- John Logajan @ Network Systems; 7600 Boone Ave; Brooklyn Park, MN 55428
- logajan@ns.network.com, john@logajan.mn.org, 612-424-4888, Fax 424-2853

hcj@lzsc.ATT.COM (HC Johnson) (03/27/90)

In article <1990Mar24.192858.1655@ns.network.com>, logajan@ns.network.com (John Logajan) writes:
> From time to time I've seen mention of replacement floppy drives not indicating
> disk change status.  Since I've had a replacement drive for longer than my
> human memory works, I don't recall if the original could really detect disk
> change status either.
> 
> Looking at the pinouts and schematics for a 520 ST reveals that there is
> no dedicated "disk change" signal.  So if the original Atari floppy drives

The problem is that ATARI uses the media present information.
If the media is removed, it is detected, and when it reappears, GOTCHA.

But, the same line also passes Write Protect info, so when a disk is write
protected, TOS can't tell if its removed (I think I got that straight).

Also, for those who notice there drive select light flickering dimmly:
TOS polls the drives at V Blank time to see if there has been a media
change.  This requires a very brief drive select.

Howard C. Johnson
ATT Bell Labs
att!lzsc!hcj
hcj@lzsc.att.com

clf3678@ultb.isc.rit.edu (C.L. Freemesser) (03/27/90)

In article <1990Mar24.192858.1655@ns.network.com> logajan@ns.network.com (John Logajan) writes:
>From time to time I've seen mention of replacement floppy drives not indicating
>disk change status.  Since I've had a replacement drive for longer than my
>human memory works, I don't recall if the original could really detect disk
>change status either.
>

There are a number of things you can do to solve the disk change
problem.  First off, try running a jumper between pins 2 and 28 on the
drive's connector.  For many drives, this will give you the needed
signals for regular media changes.

If that doesn't work because when the jumper is hooked up, you get a
write protect error, use a momentarily closed button.  Run the wires of
the button to pins 2 and 28, and hold the button in when inserting a
disk.  This will give the computer the media change signals, but will
remove the write protect errors when the button is released.

More elegant solutions to this are:

1) Get TOS 1.4:  it fixes all the problems be re-reading the disk on
   every access.
2) A program called FMC.PRG will force media detects, basically doing
   what TOS 1.4 does.  However, it doesn't seem to be 100% operational.

Considering you can set up your own drive for 40% of a "real drive",
the money saved more than offsets the potential troubles you'll have.


Chris Freemesser, Rochester Institute of Technology (  THE ACORN BBS
   |||    BITNET: clf3678@ritvax                     ) (716)436-3078
   |||    Usenet: clf3678@ultb.rit.isc.edu          (  2400 baud/42 megs
  / | \   GEnie: C.FREEMESSER                        ) full Atari support

fischer-michael@CS.YALE.EDU (Michael Fischer) (03/28/90)

In article <1990Mar24.192858.1655@ns.network.com> logajan@ns.network.com (John Logajan) writes:
>From time to time I've seen mention of replacement floppy drives not indicating
>disk change status.  Since I've had a replacement drive for longer than my
>human memory works, I don't recall if the original could really detect disk
>change status either.

Media change is detected using the write-protect line and the disk ID
written in the boot sector.  It is assumed that this line will go on
whenever a disk is removed.  Whenever a disk operation is requested,
the system determines whether or not the media has changed by the
following algorithm: If the write protect line has gone on since the
last disk operation and more than a second or two of time has elapsed,
then read the boot sector and check if the disk ID has changed.  If it
has, then a new disk has been inserted.  Otherwise, assume the same
disk is still in the drive. 

Notes: (1) if the disk is write protected, then the boot sector will
be reread whenever an operation is performed after the disk has been
idle more than a second or two.  This is safe but takes extra time.
(2) If two disks have the same disk ID, or the write-protect line does
not work, then media change will NOT be detected, with predictably
disasterous results. 

==================================================
| Michael Fischer                                |
|    Arpanet:    <fischer-michael@cs.yale.edu>   |
|    Bitnet:     <fischer-michael@yalecs.bitnet> |
|    UUCP:       <fischer-michael@yale.UUCP>     |
==================================================