Mtools on 3.5 drive

Peter Fales psfales at cbnewsc.ATT.COM
Sat Jul 22 08:27:46 AEST 1989


In article <1989Jul20.025132.14819 at ivucsb.sba.ca.us>, todd at 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 at att.com	work:	(312) 979-8031



More information about the Unix-pc.sources mailing list