home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / diskutil / mtools / patch.10t < prev    next >
Text File  |  1993-08-05  |  5KB  |  159 lines

  1. From raichle@azu.informatik.uni-stuttgart.de Fri Oct 25 16:15:08 1991
  2. Received: from laas.laas.fr by vega.laas.fr, Fri, 25 Oct 91 16:15:07 +0100,Sendmail 5.61+
  3. Received: from ifi.informatik.uni-stuttgart.de by laas.laas.fr, Fri, 25 Oct 91 16:08:39 +0100,Sendmail 5.61+
  4. Received: from azu.informatik.uni-stuttgart.de by ifi.informatik.uni-stuttgart.de with SMTP; Fri, 25 Oct 91 16:10:13 +0100
  5. Message-Id: <9110251514.AA11786@azu.informatik.uni-stuttgart.de>
  6. Received: by azu.informatik.uni-stuttgart.de; Fri, 25 Oct 91 16:14:44 +0100
  7. In-Reply-To: "Ralph P. Sobek"'s message of Fri, 25 Oct 91 15:58:43 +0100 <9110251458.AA22935@orion.laas.fr>
  8. From: Bernd Raichle <raichle@azu.informatik.uni-stuttgart.de>
  9. To: ralph@vega
  10. Subject: Re: Downloading to ST disk's using MTools on a SPARC.
  11. Date: Fri, 25 Oct 91 16:14:44 +0100
  12.  
  13. Ralph,
  14. > I also have used Mtools version 2.0.4, dated 11 Apr 91, but I am
  15. > interested in the patch which allows 10 sector/track disks!
  16. >
  17. > Can you pass it along?
  18.  
  19. The following patch is ok for Mtools 2.04 (the patched mtools is
  20. running without problems since July 91), but you can't format
  21. a 10 Sec/Trk disk on the Sparcstation.
  22.  
  23. Enjoy,
  24.   -bernd
  25.  
  26. ------------------------------ CUT
  27. From: r90p@jupiter.sun.csd.unb.ca (Schultz)
  28. Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech
  29. Subject: Re: ST Disks & Sparcstation Drives
  30. Date: 21 Mar 91 04:54:27 GMT
  31. Organization: University of New Brunswick, Fredericton
  32.  
  33. >
  34. >    A few months ago, some people were talking about reading Atari
  35. >    ST disks from a Sparcstation.  Does anyone know how to go about
  36. >    this?
  37. >
  38. >    Specifically, I want to read files from a double sided disk onto
  39. >    my Sparc and then transfer them to my ST hard disk via modem (I
  40. >    only have a single-sided floppy).
  41.  
  42. >From Mtools 2.03, patch #3:
  43.  
  44. # Mtools was posted to the unix-pc.sources news group (and mailed to the
  45. # moderator of comp.sources.unix) on the 17th of September 1990.  Since
  46. # then, patch #1 and #2 have been posted to unix-pc.sources,
  47. # comp.sources.bugs, and emailed to Rich Salz.
  48. # In addition, the current version of Mtools and all the patches are
  49. # available via anonymous ftp from cerl.cecer.army.mil (129.229.1.101).
  50. # Emmet P. Gray                           US Army, HQ III Corps & Fort Hood
  51. # ...!uunet!uiucuxc!fthood!egray          Attn: AFZF-DE-ENV
  52. # fthood!egray@uxc.cso.uiuc.edu           Directorate of Engineering & Housing
  53. #                                         Environmental Management Office
  54. #                                         Fort Hood, TX 76544-5057
  55.  
  56. Just a few days ago, I modified Mtools so that they can read
  57. and (be careful!) write single sided 3.5" floppies and e.g.
  58. floppies with 10 sec/track:
  59.  
  60. ---------------------------- < cut here > -------------------------
  61. *** devices.c_as_distrubuted    Mon Mar 11 17:39:48 1991
  62. --- devices.c    Mon Mar 11 17:41:34 1991
  63. ***************
  64. *** 27,37 ****
  65.   #endif /* MASSCOMP */
  66.   
  67.   #ifdef SPARC
  68.   struct device devices[] = {
  69. !     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
  70. !     {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
  71.       {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  72.   };
  73.   #endif /* SPARC */
  74.   
  75.   #ifdef UNIXPC
  76. --- 27,94 ----
  77.   #endif /* MASSCOMP */
  78.   
  79.   #ifdef SPARC
  80. + #include <sys/types.h>
  81. + #include <sun/dkio.h>
  82. + #include <fcntl.h>
  83. + int init_sparc_fd();
  84.   struct device devices[] = {
  85. !     {'A', "/dev/rfd0c", 0L, 12, 0, init_sparc_fd, 80, 2, 0},
  86.       {'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
  87.   };
  88. + /*
  89. +  * Stuffing back the floppy parameters into the driver
  90. +  * allows for gems like 10 sector or single sided floppies
  91. +  * from Atari ST systems.
  92. +  * Also the table needs only one entry (SunOS already tries
  93. +  * for HD and DD floppies).
  94. +  * Note that it is necessary to set the partition info,
  95. +  * since otherwise e.g. a 800k floppy (80 tr., 2 heads, 10 sectors)
  96. +  * would only be read and writeable up to 720k.
  97. +  * 
  98. +  * Martin Schulz, Universite de Moncton, March 11, 1991.
  99. +  */
  100. + int
  101. + init_sparc_fd(fd, ntracks, nheads, nsect)
  102. + int fd, ntracks, nheads, nsect;
  103. + {
  104. + struct fdk_char dkbuf;
  105. + struct dk_map   dkmap;
  106. +     if (ioctl(fd, FDKIOGCHAR, &dkbuf) != 0) {
  107. +         ioctl(fd, FDKEJECT, NULL);
  108. +         return(1);
  109. +     }
  110. +     if (ioctl(fd, DKIOCGPART, &dkmap) != 0) {
  111. +         ioctl(fd, FDKEJECT, NULL);
  112. +         return(1);
  113. +     }
  114. +     if ( ntracks && nheads )
  115. +         dkbuf.ncyl    = ntracks * nheads;
  116. +     if ( nheads )
  117. +         dkbuf.nhead    = nheads;
  118. +     if ( nsect )
  119. +         dkbuf.secptrack = nsect;
  120. +     if ( ntracks && nheads && nsect )
  121. +         dkmap.dkl_nblk  = ntracks * nheads * nsect;
  122. +     if (ioctl(fd, FDKIOSCHAR, &dkbuf) != 0) {
  123. +         ioctl(fd, FDKEJECT, NULL);
  124. +         return(1);
  125. +     }
  126. +     if (ioctl(fd, DKIOCSPART, &dkmap) != 0) {
  127. +         ioctl(fd, FDKEJECT, NULL);
  128. +         return(1);
  129. +     }
  130. +     return(0);
  131. + }
  132.   #endif /* SPARC */
  133.   
  134.   #ifdef UNIXPC
  135. ---------------------------- < cut here > -------------------------
  136.  
  137. Replies to:                 Martin Schulz
  138.                             martin@atlantic.cs.unb.ca
  139.  
  140. ------------------------------ CUT
  141.  
  142. __________________________________________________________________________
  143. Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source
  144. privat: Stettener Str. 73, D-W-7300 Esslingen     |  de malentendus"
  145. email:  raichle@azu.informatik.uni-stuttgart.de   |  (A. de Saint-Exupery)
  146.  
  147.