[comp.sys.ibm.pc.misc] Writing ST floppies on a SUN SparcStation

ralph@laas.fr (Ralph P. Sobek) (07/24/90)

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

colas@avahi.inria.fr (Colas Nahaboo) (07/25/90)

My solution to this problem is that I have written small ST programs to
convert to/from floppies made on unix by "tar cfv /dev/floppy ."
into ST disks.

They have no docs, but I could be persuaded to post them if there is enough 
interest.

Colas Nahaboo, Bull Research France -- Koala Project -- GWM X11 Window Manager
colas@avahi.inria.fr            Phone: (33) 93.65.77.70, Fax: (33) 93 65 77 66
INRIA - Sophia Antipolis, 2004, rte des Lucioles, 06565 Valbonne Cedex, FRANCE

stefan@yendor.UUCP (Stefan Loesch) (07/26/90)

I'm just writing a set of prgs. that'll do that:
	read, write atari st floppys on unix machines
Also included are utilities to show the bootsector, directory and fat.
What you need for it is basically a UNIX machine that has a 3 1/2 inch
floppydrive and is capable of formatting floppys for the PC/XT 3 1/2 inch
DS, 80 tracks, 9 sectors.

The programs are in a raw state, that means they are running, 
but are not documented, not fully tested and will ocasionally dump core
when confronted with yet another new situation. AND I WILL
NOT GIVE OUT COPYS BEFORE I CONSIDER THEM READY FOR BETA TEST.
UNDER NO CIRCUMSTANCES.

I'm not sure how I will make them available (shareware ? public domain ?
freeware ?), but I'll decide the next couple of weeks.

The set should be ready in about one to two months (depending on how
often my wife lets me switch on power on my computer :-) ).

Hope that helps

Stefan

	stefan@phx.mcd.mot.com

scott@cs.odu.edu (Scott Yelich) (07/26/90)

>My solution to this problem is that I have written small ST programs to
>convert to/from floppies made on unix by "tar cfv /dev/floppy ."
>into ST disks.

Well, the patches posted a while ago didn't help me...

For me, at least, Mtools STILL creates corrupted disks...

I would appreciate a version of Mtools that actually works!
(Wanna send me a tar of YOUR version that actually WORKS?)

Or, even this program would be helpful...

Thanks!