Page 1 of 1

I need DPT values..

Posted: Sat Jun 18, 2005 11:22 am
by bubach
Does anyone have the diskette parameter table values for the common floppy disks formats?
Those values should be found at 0x000FEFC7 and contain f.ex. gap lenght etc. The problem is that I don't trust the computers, BOCHS for example always gives me 1.44mb fdd values, even if i configure it with only a 720kb floppy.

/ Christoffer

Re:I need DPT values..

Posted: Sat Jun 18, 2005 8:01 pm
by AxelDominatoR
http://www.charmed.com/txt/floppy.txt

Scroll down to a struct named: default_drive_params

The table right there holds most of the informations you seek, I think.

Axel

Re:I need DPT values..

Posted: Mon Jun 20, 2005 10:46 am
by bubach
I had a look and it doesn't seem to contain the same values as the DPT, it would be easier for me to have the exact table values as my code is made in that way.. :(

Re:I need DPT values..

Posted: Mon Jun 20, 2005 12:40 pm
by Dex4u
@bubach, do you mean these ?.

Code: Select all

;
; 256 byte sectors (default)
parmtable dw   2a1h,2a1h,2a1h,2a1h   ; Diskette params, see DISKPARAM struc
   db   0,0,0,0
   db   20,20,20,20
   db   81h,81h,81h,81h
   db   80,80,80,80
   dw   2201h,2201h,2201h,2201h
   dw   00028h,00028h,00028h,00028h
   db   0fh,0fh,0fh,0fh
   db   10,10,10,10
;
; 1024 byte sectors
;
parmtable2 dw   2a1h,2a1h,2a1h,2a1h   ; Diskette params, see DISKPARAM struc
   db   0,0,0,0
   db   20,20,20,20
   db   81h,81h,81h,81h
   db   80,80,80,80
   dw   0a03h,0a03h,0a03h,0a03h
   dw   0c48ch,0c48ch,0c48ch,0c48ch
   db   0fh,0fh,0fh,0fh
   db   10,10,10,10

sop = $ - parmtable2
[/code

Re:I need DPT values..

Posted: Thu Jun 23, 2005 11:59 am
by bubach
Nope. But thanks anyway.. If I find it, I'll post it here.

Re:I need DPT values..

Posted: Fri Jun 24, 2005 12:54 am
by distantvoices
Might tehse values be of interrest for you?

From MInix source code, so the minix copyright stuff applies:

Code: Select all

/* Seven combinations of diskette/drive are supported.
 *
 * # Drive  diskette  Sectors  Tracks  Rotation Data-rate  Comment
 * 0  360K    360K      9       40     300 RPM  250 kbps   Standard PC DSDD
 * 1  1.2M    1.2M     15       80     360 RPM  500 kbps   AT disk in AT drive
 * 2  720K    360K      9       40     300 RPM  250 kbps   Quad density PC
 * 3  720K    720K      9       80     300 RPM  250 kbps   Toshiba, et al.
 * 4  1.2M    360K      9       40     360 RPM  300 kbps   PC disk in AT drive
 * 5  1.2M    720K      9       80     360 RPM  300 kbps   Toshiba in AT drive
 * 6  1.44M   1.44M    18   80     300 RPM  500 kbps   PS/2, et al.
 *
 * In addition, 720K diskettes can be read in 1.44MB drives, but that does
 * not need a different set of parameters.  This combination uses
 *
 * X  1.44M   720K   9   80     300 RPM  250 kbps   PS/2, et al.
 */
PRIVATE char gap[NT] =
   {0x2A, 0x1B, 0x2A, 0x2A, 0x23, 0x23, 0x1B}; /* gap size */
PRIVATE char rate[NT] =
   {0x02, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00}; /* 2=250,1=300,0=500 kbps*/
PRIVATE char nr_sectors[NT] =
   {9,    15,   9,    9,    9,    9,    18};   /* sectors/track */
PRIVATE int nr_blocks[NT] =
   {720,  2400, 720,  1440, 720,  1440, 2880}; /* sectors/diskette*/
PRIVATE char steps_per_cyl[NT] =
   {1,    1,    2,    1,    2,    1,     1};   /* 2 = dbl step */
PRIVATE char mtr_setup[NT] =
   {1*HZ/4,3*HZ/4,1*HZ/4,4*HZ/4,3*HZ/4,3*HZ/4,4*HZ/4}; /* in ticks */
PRIVATE char spec1[NT] =
   {0xDF, 0xDF, 0xDF, 0xDF, 0xDF, 0xDF, 0xDF}; /* step rate, etc. */
PRIVATE char test_sector[NT] =
   {4*9,  14,   2*9,  4*9,  2*9,  4*9,  17};   /* to recognize it */

#define b(d)   (1 << (d))   /* bit for density d. */

here is the url to the complete driver:
http://minix1.hampshire.edu/src/kernel/floppy.c

Re:I need DPT values..

Posted: Fri Jun 24, 2005 5:45 pm
by bubach
Thanks alot! It seems to be the stuff I wanted (taking a closer look later).

/ Christoffer