Atari ST series Technical Reference Manual page 56

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Floppy Disk Functions
The XBIOS includes a few functions that deal specifically
with floppy disks as opposed to the more general BIOS disk
routines. Among other functions, they are used to format
and initialize a floppy disk. This operation requires several
steps. The first is to format all the tracks on the disk, using
the XBIOS routine Flopfmt(), which formats and verifies a
single track. The syntax for this call is:
long buffer, skewtabl, magic;
int status, devnum, spt, tracknum,
sidenum, intrlev, magic, initial;
status = Flopfmt(buffer, skewtabl, devnum, spt, tracknum,
sidenum, intrlev, magic, initial)
As you can see, you must supply quite a few parameters for
this call. Buffer is a pointer to a memory buffer used to hold
the data for the track image. For the normal layout (nine sec­
tors per track), an 8K buffer is recommended. This buffer
must start at an even address (a word boundary). The next
parameter, skewtabl, is ignored in the first (preblitter) version
of the TOS ROMs, which always write each sector sequen­
tially on the track. The new blitter ROMs, however, allow
sectors to be skewed within a track. While the first track has
its sectors in the regular order:
Track 1 :1 , 2, 3, 4, 5, 6, 7, 8, 9
the second track may have its sectors in a slightly different
order:
Track 2: 8, 9 ,1 , 2, 3, 4, 5, 6, 7
Skewing the tracks this way makes sequential tracks read
much faster. To use a skewed track format, place a — 1 in the
intrlev variable and have skewtabl point to a skew table that
contains a 16-bit sector number for each sector, in the order
in which sectors are to appear on successive tracks. If intrlev
is set to something other than - 1 , the skewtable variable is
ignored, but it must still be passed as a place holder.
The next parameter to pass is devnum,, the drive speci­
fier. This value is 0 for drive A:, and 1 for drive B:. Next
comes spt, which is short for sectors per track. The normal
48
CHAPTER 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents