totty@flute.cs.uiuc.edu (Brian Totty) (03/21/91)
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). / Brian Totty o o /__ __ o 1304 W. Springfield Avenue o / / / / Urbana, IL 61801 \_/ "We have corn in /__/ / / totty@cs.uiuc.edu Massachusetts too!"
r90p@jupiter.sun.csd.unb.ca (Schultz) (03/21/91)
> > 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
boyd@nu.cs.fsu.edu (Mickey Boyd) (03/21/91)
In article <1991Mar20.193859.11943@m.cs.uiuc.edu>, totty@flute.cs.uiuc.edu (Brian Totty) writes: > 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). Hmm, if you already have it on a DSDD disk, why not just transfer it on a PC to a DSSD disk (by formatting using "format x: /t:40 /n:9"). If you still want mtools, you should ftp it from 129.217.64.63. All I had to do to compile it was to add a "#define sparc" somewhere, the docs tell it all. Email if you have questions. -- ---------------------------------+------------------------------------- Mickey R. Boyd | "It's amazing how much growing up FSU Computer Science | resembles being too tired." Technical Support Group | email: boyd@fsucs.cs.fsu.edu | - Heinlein ---------------------------------+-------------------------------------
marc@sequoia.cray.com (Marc Bouron) (03/21/91)
In article <1991Mar20.193859.11943@m.cs.uiuc.edu>, totty@flute.cs.uiuc.edu (Brian Totty) writes: |> |> A few months ago, some people were talking about reading Atari |> ST disks from a Sparcstation. Does anyone know how to go about |> this? If you have the mtools suite on the Sparc, it's simply a matter of putting the DS ST disk in the slot, and using mdir (directory listing) and mcopy to trans- fer the data. To transfer text files, use a -t flag on mcopy to translate the Atari CRLFs. Binary (.PRG, .RSC, etc...) don't need this flag. Examples: copy from disk to Sparc: mcopy a:/tetris.prg tetris.prg mcopy -t a:/tetris.doc tetris.doc copy from Sparc to disk: mcopy tetris.prg a:/tetris.prg mcopy -t tetris.doc a:/tetris.doc I use this often and have no problems whatsoever. I format my disks on the ST, and it sure beats the hell out of playing with kermit on an attached PS/2! [M][a][r][c] ################################################################################ # # marc@sequoia.cray.com # . . # # Marc CR Bouron # M.Bouron@cray.co.uk (ARPA) # _|\ /|_ # # Cray Research (UK) Ltd. # M.Bouron@crayuk.uucp (DOMAIN) # (_|_V_|_) # # +44 344 485971 x2208 # M.Bouron@uk.co.cray (JANET) # | | # # # ...!ukc!crayuk!M.Bouron (UUCP) # # ################################################################################
kentd@FtCollins.NCR.com (Kent.Dalton) (03/22/91)
>>>>> On 21 Mar 91 10:02:34 GMT, marc@sequoia.cray.com (Marc Bouron) said: > |> > |> A few months ago, some people were talking about reading Atari > |> ST disks from a Sparcstation. Does anyone know how to go about > |> this? Hmmm... we should really put this in a FAQ list somewhere... > If you have the mtools suite on the Sparc, it's simply a matter of putting the > DS ST disk in the slot. Also, if you (the original poster) have problems with it try recompiling mtools with DUP_FAT #define'd. This causes both FAT copies on an ST Disk to be updated. Since you're reading I don't think it should make any difference... but if you want to write to it, mtools won't write an ST compatible disk with DUP_FAT. -- /**************************************************************************/ /* Kent Dalton * EMail: Kent.Dalton@FtCollins.NCR.COM */ /* NCR Microelectronics * CIS: 72320,3306 */ /* 2001 Danfield Ct. MS470A * */ /* Fort Collins, Colorado 80525 * (303) 223-5100 X-319 */ /**************************************************************************/ Fortune: If a group of _N persons implements a COBOL compiler, there will be _N-1 passes. Someone in the group has to be the manager. -- T. Cheatham
kentd@FtCollins.NCR.com (Kent.Dalton) (03/22/91)
>>>>> On 22 Mar 91 09:07:48 GMT, kentd@FtCollins.NCR.com (Kent.Dalton) said: me> to be updated. Since you're reading I don't think it should make any me> difference... but if you want to write to it, mtools won't write an ST me> compatible disk with DUP_FAT. ^^^^ |||| Ooops, I meant "without"! -- /**************************************************************************/ /* Kent Dalton * EMail: Kent.Dalton@FtCollins.NCR.COM */ /* NCR Microelectronics * CIS: 72320,3306 */ /* 2001 Danfield Ct. MS470A * */ /* Fort Collins, Colorado 80525 * (303) 223-5100 X-319 */ /**************************************************************************/ Fortune: "Calling J-Man Kink. Calling J-Man Kink. Hash missle sighted, target Los Angeles. Disregard personal feelings about city and intercept."
klute@tommy.informatik.uni-dortmund.de (Rainer Klute) (03/25/91)
|> Also, if you (the original poster) have problems with it try recompiling |> mtools with DUP_FAT #define'd. This causes both FAT copies on an ST Disk |> to be updated. Since you're reading I don't think it should make any |> difference... but if you want to write to it, mtools won't write an ST |> compatible disk with DUP_FAT. No, you should not try to fiddle around with an old and obsolete mtools version. The latest version - which you should get - does not have the DUP_FAT define anymore but finds out itself whether the disk has a single or double FAT. -- Dipl.-Inform. Rainer Klute klute@irb.informatik.uni-dortmund.de Univ. Dortmund, IRB klute@unido.uucp, klute@unido.bitnet Postfach 500500 |)|/ Tel.: +49 231 755-4663 D-4600 Dortmund 50 |\|\ Fax : +49 231 755-2386
phil@dgbt.doc.ca (Phil Blanchfield) (03/27/91)
> 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). SUN-OS V4.1.1 supports reading, writing and formatting 760K DOS/ST diskettes directly. To format use: fdformat -l -d To use put: /dev/fd0 /pcfs pcfs rw,noauto 0 0 into /etc/fstab (usually there already) Then mount with: mount /pcfs Then regular UNIX commands (ls cp mv etc.) will work with the floppy. Problem: You have to su root to do the mount /pcfs. -- Phil Blanchfield The Communications Research Centre 3701 Carling Avenue, Ottawa Ontario CANADA Internet: phil@dgbt.doc.ca OR phil@dgbt.crc.dnd.ca