Xref: utzoo comp.sys.atari.st:29792 comp.sys.ibm.pc.misc:218 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!inria!laas!ralph From: ralph@laas.fr (Ralph P. Sobek) Newsgroups: comp.sys.atari.st,comp.sys.ibm.pc.misc Subject: Re: Writing ST floppies on a SUN SparcStation (Need help). Summary: Unofficial Patch4 to Mtools version 1.6.2 Keywords: MTools, Patch Message-ID: Date: 24 Jul 90 12:27:39 GMT References: <1990Jun22.105700.5878@planet.bt.co.uk> Sender: news@laas.laas.fr Reply-To: ralph@laas.fr Organization: LAAS-CNRS France Lines: 86 In-reply-to: rmh@planet.bt.co.uk's message of 22 Jun 90 10:57:00 GMT In article <1990Jun22.105700.5878@planet.bt.co.uk> rmh@planet.bt.co.uk (Ray Hollett) writes: | | I am attempting to use a SUN Sparc Station 1 to put files from the Net onto | 720k floppy disks for use on my ST. I have been using the MTOOLS (with the | 3 patches) software to write PC compatible files on the SUN, but these are | not correctly read by the ST. Even PC applications will break and not be able to read the floppies. | The files seem to be OK when read on a PC, but on the ST the first couple of | sectors are repeated thoughout the file. I suspect that there is a problem | with the FAT formats used; can anybody explain the problem or suggest a fix. I have found two problems with MTools formatting and updating of FATs. MTools 1) creates by default an all-blanks volume-id (which breaks the gulam shell, for instance), and 2) does not update the second FAT after writes (a simple #undef to #define problem). So here is my unofficial Patch4 to mtools which is 100 % compatible with PCs and STs (at least for me!). Yes, there are a few residual problems with MTools. By the way, do you STers ever use `patch' on your ST to update sources from USENET? I recently used it to update Sozobon 1.2 according to the patches posted in comp.sys.atari.st. It's great! It was written by John R. Dunning. Maybe someone should post an updated version to the net. *** ./init.c Thu Jun 14 13:01:58 1990 --- 1.6.2/init.c Tue May 29 17:41:27 1990 *************** *** 11,17 **** #include "devices.h" #include "msdos.h" ! #define DUP_FAT extern int fd, dir_len, dir_start, clus_size, fat_len, num_clus; extern unsigned char *fatbuf; --- 11,17 ---- #include "devices.h" #include "msdos.h" ! /* #undef DUP_FAT */ extern int fd, dir_len, dir_start, clus_size, fat_len, num_clus; extern unsigned char *fatbuf; *** ./mkdfs.c Thu Jun 14 12:39:04 1990 --- 1.6.2/mkdfs.c Wed Jun 6 10:55:32 1990 *************** *** 95,108 **** for( sec=fat_len; --sec ; ) Write(fd,buf,MSECSIZ) ; /* Rest of FAT */ } ! if (strncmp(disklabel," ",11) != 0) { ! strcpy(((struct directory *)buf)->name,disklabel) ; ! ((struct directory *)buf)->attr= VOLLBL ; ! Write(fd,buf,MSECSIZ) ; /* Root dir */ ! bzero(buf,strlen(disklabel)) ; ! ((struct directory *)buf)->attr= 0 ; ! } ! else dir_len++ ; for( ; --dir_len ; ) Write(fd,buf,MSECSIZ) ; /* Root dir */ } --- 95,105 ---- for( sec=fat_len; --sec ; ) Write(fd,buf,MSECSIZ) ; /* Rest of FAT */ } ! strcpy(((struct directory *)buf)->name,disklabel) ; ! ((struct directory *)buf)->attr= VOLLBL ; ! Write(fd,buf,MSECSIZ) ; /* Root dir */ ! bzero(buf,strlen(disklabel)) ; ! ((struct directory *)buf)->attr= 0 ; for( ; --dir_len ; ) Write(fd,buf,MSECSIZ) ; /* Root dir */ } Cheers, -- Ralph P. Sobek Disclaimer: The above ruminations are my own. ralph@laas.fr Addresses are ordered by importance. ralph@laas.uucp, or ...!uunet!laas!ralph If all else fails, try: sobek@eclair.Berkeley.EDU =============================================================================== Reliable software should kill people reliably! -Andy Mickel, Pascal News #13,78