[comp.sys.atari.st] Setting Floppy Seek Rate in all TOS versions

vsnyder@jato.jpl.nasa.gov (Van Snyder) (03/19/91)

Here's the poop on setting the seek step rate for floppies, from page 60
of the Rainbow TOS distribution:

"Floprate:      -  Floprate, XBIOS function 41, checks or sets the seek
                   rate for a floppy drive.  This is new; the seek rate
                   must be set with (previously) undocumented variables
                   on earlier versions of TOS.

                   Floprate example.

        int devno, newrate;
        oldrate = Floprate(devno,newrate);

                   This returns the current seek rate if newrate is -1,
                   otherwise sets the seek rate to newrate.  For doing this
                   with previous versions of TOS, the seekrate byte
                   locations for drive A and B are:

                   OS Version   Drive A   Drive B
                   ----------   -------   -------
                    0x0100       $A09      $A0D
                    0x0102       $A4F      $A53

                   In either case valid seek rate byte values are:

                   Value        Rate
                   -----        ----
                   00           6 ms
                   01          12 ms
                   02           2 ms
                   03           3 ms

                   This call does not range check the drive ID or new seek
                   rate.  If devno is zero, it assumes drive A:, if
                   nonzero, drive B:."  That's 41 decimal.
You can get the TOS version from offset 02.w from the place pointed at
by 0x4F2.L (_sysbase).

-- 
vsnyder@jato.Jpl.Nasa.Gov
ames!elroy!jato!vsnyder
vsnyder@jato.uucp

hase@netmbx.UUCP (Hartmut Semken) (03/23/91)

vsnyder@jato.jpl.nasa.gov (Van Snyder) writes:

>Here's the poop on setting the seek step rate for floppies, from page 60
>of the Rainbow TOS distribution:

>"Floprate:      -  Floprate, XBIOS function 41, checks or sets the seek
>                   rate for a floppy drive.  This is new; the seek rate
>                   must be set with (previously) undocumented variables
>                   on earlier versions of TOS.

This is true if You want to set different seek rates for both drives.
If You want to set both drives to te same seek rate, place the new seek
rate in adress 0x440 (zero: six, 1: 12, 2: 2, 3: 3 milliseconds) and
call the function pointed to by the vector in adress 0x46A (hdv_init).
This will make new Bios parameter blocks for both drives and tel TOS to
use the new seek rate.
Works on all TOS versions, cause it uses only documented system
variables.

hase
-- 
Hartmut Semken, Lupsteiner Weg 67, 1000 Berlin 37 hase@netmbx.UUCP
Hi! (Zaphod Beeblebrox)

ytsuji@wucc.waseda.ac.jp (Y.Tsuji Y.Tsuji shagaku) (03/25/91)

I don't bother setting the step rates because nearly all the drives can
move from track to track in 3 ms. What you need is to feed the STEP signal
of WD1772 to 74123N, a TTL, with C & R for 7.0 ms and let this negate the
HD-mode. Just another IC and you can forget how to set the steprate.