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 >
Wrap
Text File
|
1993-08-05
|
5KB
|
159 lines
From raichle@azu.informatik.uni-stuttgart.de Fri Oct 25 16:15:08 1991
Received: from laas.laas.fr by vega.laas.fr, Fri, 25 Oct 91 16:15:07 +0100,Sendmail 5.61+
Received: from ifi.informatik.uni-stuttgart.de by laas.laas.fr, Fri, 25 Oct 91 16:08:39 +0100,Sendmail 5.61+
Received: from azu.informatik.uni-stuttgart.de by ifi.informatik.uni-stuttgart.de with SMTP; Fri, 25 Oct 91 16:10:13 +0100
Message-Id: <9110251514.AA11786@azu.informatik.uni-stuttgart.de>
Received: by azu.informatik.uni-stuttgart.de; Fri, 25 Oct 91 16:14:44 +0100
In-Reply-To: "Ralph P. Sobek"'s message of Fri, 25 Oct 91 15:58:43 +0100 <9110251458.AA22935@orion.laas.fr>
From: Bernd Raichle <raichle@azu.informatik.uni-stuttgart.de>
To: ralph@vega
Subject: Re: Downloading to ST disk's using MTools on a SPARC.
Date: Fri, 25 Oct 91 16:14:44 +0100
Ralph,
> I also have used Mtools version 2.0.4, dated 11 Apr 91, but I am
> interested in the patch which allows 10 sector/track disks!
>
> Can you pass it along?
The following patch is ok for Mtools 2.04 (the patched mtools is
running without problems since July 91), but you can't format
a 10 Sec/Trk disk on the Sparcstation.
Enjoy,
-bernd
------------------------------ CUT
From: r90p@jupiter.sun.csd.unb.ca (Schultz)
Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech
Subject: Re: ST Disks & Sparcstation Drives
Date: 21 Mar 91 04:54:27 GMT
Organization: University of New Brunswick, Fredericton
>
> A few months ago, some people were talking about reading Atari
> ST disks from a Sparcstation. Does anyone know how to go about
> this?
>
> Specifically, I want to read files from a double sided disk onto
> my Sparc and then transfer them to my ST hard disk via modem (I
> only have a single-sided floppy).
>From Mtools 2.03, patch #3:
# Mtools was posted to the unix-pc.sources news group (and mailed to the
# moderator of comp.sources.unix) on the 17th of September 1990. Since
# then, patch #1 and #2 have been posted to unix-pc.sources,
# comp.sources.bugs, and emailed to Rich Salz.
#
# In addition, the current version of Mtools and all the patches are
# available via anonymous ftp from cerl.cecer.army.mil (129.229.1.101).
#
# 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
Just a few days ago, I modified Mtools so that they can read
and (be careful!) write single sided 3.5" floppies and e.g.
floppies with 10 sec/track:
---------------------------- < cut here > -------------------------
*** devices.c_as_distrubuted Mon Mar 11 17:39:48 1991
--- devices.c Mon Mar 11 17:41:34 1991
***************
*** 27,37 ****
#endif /* MASSCOMP */
#ifdef SPARC
struct device devices[] = {
! {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
! {'A', "/dev/rfd0c", 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
{'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
};
#endif /* SPARC */
#ifdef UNIXPC
--- 27,94 ----
#endif /* MASSCOMP */
#ifdef SPARC
+ #include <sys/types.h>
+ #include <sun/dkio.h>
+ #include <fcntl.h>
+
+ int init_sparc_fd();
+
struct device devices[] = {
! {'A', "/dev/rfd0c", 0L, 12, 0, init_sparc_fd, 80, 2, 0},
{'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
};
+
+ /*
+ * Stuffing back the floppy parameters into the driver
+ * allows for gems like 10 sector or single sided floppies
+ * from Atari ST systems.
+ * Also the table needs only one entry (SunOS already tries
+ * for HD and DD floppies).
+ * Note that it is necessary to set the partition info,
+ * since otherwise e.g. a 800k floppy (80 tr., 2 heads, 10 sectors)
+ * would only be read and writeable up to 720k.
+ *
+ * Martin Schulz, Universite de Moncton, March 11, 1991.
+ */
+ int
+ init_sparc_fd(fd, ntracks, nheads, nsect)
+ int fd, ntracks, nheads, nsect;
+ {
+ struct fdk_char dkbuf;
+ struct dk_map dkmap;
+
+ if (ioctl(fd, FDKIOGCHAR, &dkbuf) != 0) {
+ ioctl(fd, FDKEJECT, NULL);
+ return(1);
+ }
+
+ if (ioctl(fd, DKIOCGPART, &dkmap) != 0) {
+ ioctl(fd, FDKEJECT, NULL);
+ return(1);
+ }
+
+ if ( ntracks && nheads )
+ dkbuf.ncyl = ntracks * nheads;
+ if ( nheads )
+ dkbuf.nhead = nheads;
+ if ( nsect )
+ dkbuf.secptrack = nsect;
+
+ if ( ntracks && nheads && nsect )
+ dkmap.dkl_nblk = ntracks * nheads * nsect;
+
+ if (ioctl(fd, FDKIOSCHAR, &dkbuf) != 0) {
+ ioctl(fd, FDKEJECT, NULL);
+ return(1);
+ }
+
+ if (ioctl(fd, DKIOCSPART, &dkmap) != 0) {
+ ioctl(fd, FDKEJECT, NULL);
+ return(1);
+ }
+
+ return(0);
+ }
#endif /* SPARC */
#ifdef UNIXPC
---------------------------- < cut here > -------------------------
Replies to: Martin Schulz
martin@atlantic.cs.unb.ca
------------------------------ CUT
__________________________________________________________________________
Bernd Raichle, Student der Universit"at Stuttgart | "Le langage est source
privat: Stettener Str. 73, D-W-7300 Esslingen | de malentendus"
email: raichle@azu.informatik.uni-stuttgart.de | (A. de Saint-Exupery)