[comp.sys.att] Mtools on 3.5 drive

todd@ivucsb.sba.ca.us (Todd Day) (07/20/89)

I would like to modify the latest release of Mtools so it
will work with 3.5" MS-DOS disks.  The relevant changes
have to be made to init.c, but I do not know what the
FAT types are for 3.5 disks.  When I tried to read a 3.5
disk, I get:

Unknown format 'f9'
mdir: Cannot initialize diskette

Now, I've looked in init.c and it seems like it would be
easy to change if I knew what all the relevant parameters
were for MS-DOS 3.5" disks.

		case 0xfd:		/* 40 trk, 9 sect, 2 sides */
			dir_start = 5;
			dir_len = 7;
			clus_size = 2;
			fat_len = 2;
			num_clus = 354;
			gdbuf.params.heads = 2;
			gdbuf.params.psectrk = 9;
			gdbuf.params.pseccyl = 18;
			break;

I suspect that for 80 tracks, all I would have to do is change
num_clus, but I really have no idea.  Anyone?

-- 

"Like a pillar of cloud, the smoke lingers	| Todd Day
 High in the air				| todd@ivucsb.sba.ca.us
 In fascination - with the eyes of the world	| ivucsb!todd@anise.acc.com
 We stare ..."  -- Neil Peart of Rush, from "Countdown" on _Signals_

egray@fthood.UUCP (07/21/89)

>Reference the question on 720k 3.5in floppies with mtools...

The parameters for the init.c file are:

 	dir_start = 7;
 	dir_len = 7;
 	clus_size = 2;
 	fat_len = 3;
 	num_clus = 713;

if on a AT&T 7300, also add:

 	gdbuf.params.heads = 2;
 	gdbuf.params.cyls = 80;
 	gdbuf.params.psectrk = 9;
 	gdbuf.params.pseccyl = 18;

Emmet P. Gray				US Army, HQ III Corps & Fort Hood
...!uunet!uiucuxc!fthood!egray		Attn: AFZF-DE-ENV
fthood!egray@uxc.cso.uiuc.edu		Directorate of Engineering & Housing
					Environmental Management Office
					Fort Hood, TX 76544-5057

psfales@cbnewsc.ATT.COM (Peter Fales) (07/22/89)

In article <1989Jul20.025132.14819@ivucsb.sba.ca.us>, todd@ivucsb.sba.ca.us (Todd Day) writes:
> I would like to modify the latest release of Mtools so it
> will work with 3.5" MS-DOS disks.  The relevant changes
> have to be made to init.c, but I do not know what the
> FAT types are for 3.5 disks.  

Craig Votava (hi Craig!) figured out how to get mtools1.5 working
with the 720K disks.   Putting his changes into mtools 1.6 is simply
a matter of adding the following patch:  (This assumes that the
only 80 track drives on your system are 9 sector, i.e. no 1.2MB
or 1.44MB disks, a reasonable assumption on the Unix-pc).

Patch follows:

*** /u/osrc/mtools16/init.c	Wed Jul 19 22:17:35 1989
--- init.c	Wed Jul 19 22:34:38 1989
***************
*** 95,100
  			gdbuf.params.psectrk = 9;
  			gdbuf.params.pseccyl = 18;
  			break;
  		default:
  			fprintf(stderr, "Unknown format '%02x'\n", fat);
  			code = 1;

--- 95,112 -----
  			gdbuf.params.psectrk = 9;
  			gdbuf.params.pseccyl = 18;
  			break;
+ 
+ 		case 0xf9:		/* all 80 track disks */
+ 			dir_start = 7;
+ 			dir_len = 7;
+ 			clus_size = 2;
+ 			fat_len = 3;
+ 			num_clus = 713;
+ 			gdbuf.params.heads = 2;
+ 			gdbuf.params.cyls = 80;
+ 			gdbuf.params.psectrk = 9;
+ 			gdbuf.params.pseccyl = 18;
+ 			break;
  		default:
  			fprintf(stderr, "Unknown format '%02x'\n", fat);
  			code = 1;
-- 
Peter Fales			AT&T, Room 5B-420
				2000 N. Naperville Rd.
UUCP:	...att!peter.fales	Naperville, IL 60566
Domain: peter.fales@att.com	work:	(312) 979-8031