CROSSDOS Typed in by ???. Edited by PARASITE. INTRODUCTION Many computer users will find it useful, maybe even necessary to share data between different computers but in this world of multiple computer types, however there usually ends up being more than one format of storing data on a disk. These formats usually differ in the way directories and files are accessed. Sometimes they also differ in the way the actual data bits are stored on the disk. Both instances are the case with MS-DOS/PC-DOS and Atari ST formatted disks and standard Amiga formatted disks. CrossDos is a software product that allows the user to read and write MS-DOS/PC-DOS and Atari ST formatted disks (Version 2.0 or higher) directly from AmigaDOS. It fully integrates itself into the Amiga operating system to allow your MS-DOS formatted disks to be accessed from virtually any utility or application, just as any other Amiga file. NOTE All further references to MS-DOS formatted disks also apply to PC-DOS and Atari ST formatted disks unless otherwise specified. Imagine working on a spreadsheet file on your PC and continuing to work on it using your Amiga spreadsheet application (such as VIP Professional, Analyze! or others ); maybe you are using a PC version of WordPerfect and have an Amiga version as well; you can create a picture with DeluxePaint on the Amiga and view it on your PC using the PC version of DeluxePaint. Many other data sharing can be done between databases, language compilers, CAD programs, etc. The following MS-DOS formatted disks types are supported by CrossDos : - standard density 80 track 3 1/2" floppies ( 720 K) - standard density 80 track 5 1/4" floppies ( 720 K) - standard density 80 track 5 1/4" floppies used in double track step mode ( 360 K) - standard density 40 track 5 1/4" floppies ( 360 K) A properly mounted MS-DOS device will allow you to access any file on a MS-DOS formatted disk as if it were any other valid AmigaDOS device. Refer to section "MountList Example of a MS-DOS device" for instructions on mounting a MS-DOS device. You can then proceed to use any file on the MS-DOS disk from any application. FEATURE SUMMARY The following is a list of the main features of CrossDos: - Integrates MS-DOS formatted disks as part of the Amiga operating system. This allows the MS-DOS disks to be accessed just like any other disk from any Amiga utility or application. - Read and write any file. - Relabel the Disk name. - Create directories. - Rename any files or directories within or across any directories. - Set file or directory dates. - Set or reset archive and write/delete protection attributes on any file or directory. - Access files from any application file requester. - MS-DOS and PC-DOS formatted disks Versions 2.0 (and higher) are supported. - Two ACSII text filter options are provided. - Disk changes are sensed automatically (if the drive provides the proper hardware signal). - ".info" file extensions are supported for use with Workbench. - Floppy disk parameters are sensed automatically (ie. double-sided, single-sided, 8 or 9 sectors/track, etc.). - Double Track Step Mode is availible to read/write standard 40 track floppies on an 80 track drive. - Minimal memory (approx. 80 bytes) is required when the filesystem is not accessed. - "Kill" utility is provided to recover resources and memory when MS-DOS File System not needed. - Special utilities are included to format, copy and check the integrity of MS-DOS disks. HARDWARE REQUIREMENTS CrossDos requires a standard Amiga (500, 1000, 2000, 2000HD or 2500) with at least 256K bytes of memory. This product includes a special device driver, "mfm.device", for use with 3 1/2" and 5 1/4" floppies. Refer to section "MountList Example of a MS-DOS device" for configuration instructions. SOFTWARE REQUIREMENTS CrossDos requires at least AmigaDOS Version 1.2. The product at the time of this document has been tested under Versions 1.2 and 1.3. You must use a V1.3 compatible "mount" command. This command is included in this product. MINIMUM FILES NEEDED The following are files needed to mount a MS-DOS device. L:MSDOSFileSystem -- always DEVS:mfm.device -- when using floppy disks (3 1/2" or 5 1/4") C:Mount -- always (V1.3 compatible) PRODUCT LIMITATIONS High density formatted disks (1.2M and 1.44M disks formatted on the IBM-AT and PS/2) are incapable of being read due to current limitations in the standard Amiga hardware. Currently, the standard Amiga floppy drive hardware is capable of reading/writing standard density formatted floppies (360K and 720K) on 3 1/2" and 5 1/4" drives. Please note though, high density drives on IBM-compatible machines are capable of formatting, reading and writing standard density formats. This holds true for both the 3 1/2" and 5 1/4" high density drives, although the 5 1/4" drives may write data on a floppy unreliably when used in the double track step mode (Refer to section "Double Track Step Mode" for further explanation). CrossDos CANNOT directly execute any of the MS-DOS, PC-DOS or Atari ST executable files (such as .EXE or .COM files) although it can transfer these files to or from the MS-DOS disk. To execute these files on the Amiga you would need an emulator program such as the "Transformer" from Commodore which is not provided in this product. CrossDos is not guaranteed to read or write copy-protected MS-DOS disks. It will probably read most of the disk, but it cannot "crack" the protection technique used on the disk. Writing to a copy-protected MS-DOS disk is NOT recommended. There are file naming limits imposed by the MS-DOS disk format of eight alphanumeric characters for the file name and three for the file extension. Refer to section "AmigaDOS COMPATIBILITY" for further explanation. The MS-DOS disk format does not allow file comments so that this AmigaDOS function is not supported. INSTALLATION The installation instructions for mounting an MS-DOS device on the Amiga are detailed in the following sections. A simple program is included in this product for standard 3 1/2" or 5 1/4" floppy drive installation. INSTALLING THE SOFTWARE AND MOUNTLIST PARAMETERS CrossDos provides a simple installation program either executable from the CLI or the Workbench. To execute the program from the Workbench, double-click on the icon labeled "Install_MSDOSFS". To execute the program from the CLI, type the following: Install_MSDOSFS Answer the questions presented on the computer screen to complete the installation of this product in your system. If you wish to modifiy these standard parameters, edit the mountlist file using the following descriptions of the parameters. MOUNTING A MS-DOS DEVICE Once all the required files are installed in the proper directories, only "mounting" the device is needed to have the Amiga recognize the MS-DOS device. The filesystem is "mounted" by entering the command: mount FROM DEVS:mountlist.msdosFS The "mount" command can be entered manually when needed or can be executed in a startup routine such as "S:startup-sequence". If "mounted" in a startup-sequence, it can be setup to consume a minimal amount of memory (approx. 80 bytes) until MS-DOS file acccess is required. Refer to the "Mount =" parameter description in the following section. Once the device is successfully "mounted", the device can be accessed by any utility or application by specifying the device name. NOTE Only one MS-DOS File System is allowed to be mounted on any one physical device. MOUNTLIST EXAMPLE OF A MS-DOS DEVICE The following is an example mountlist entry for an MS-DOS device using the internal 3 1/2" drive in the Amiga. It is called by the name DI0: by the system. Other units and device names can be used as specified by Amiga "mount" command file parameters. DI0: /* Device-dependant mountlist parameters */ Device = mfm.device Unit = 0 Flags = 1 Surfaces = 2 BlocksPerTrack = 9 Reserved = 1 Interleave = 0 LowCyl = 0 ; HighCyl = 79 /* FileSystem-dependant mountlist parameters */ FileSystem = L:MSDOSFileSystem Stacksize = 4000 Priority = 5 GlobVec = -1 Buffers = 5 BufMemType = 0 Mount = 0 DosType = 0x4D534400 /* = 0x4D444400 using Double Track Step Mode */# NAME: The name of the device. It may be any valid alphanumeric combination that does not conflict with other device, volume or logical names already mounted. The name must end in a ":" to be recognized by the "mount" command. Device = The name of the device driver code file to be used for the particular device being acccessed. When using a floppy drive device, the device driver "mfm.device" is included in this product for this purpose. Please note: the directory "DEVS:" is assumed as the path name. Unit = The physical unit number of the particular device being acccessed. Normally, Unit 0 is the first unit. For Amiga floppy drives, Unit 0 is the internal drive. Flags = The flags needed to properly initialize the device at startup. The flags to be set will vary for each device. For the Amiga compatible floppy drives, set Flags to '1' (allow 5 1/4" drive). Surfaces = The number of physical surfaces of the device. For standard MS-DOS floppies, set this value to 2 for double-sided. For single-sided MS-DOS floppies, set this value to 1. BlocksPerTrack = The number of physical blocks on each track of the device. For standard MS-DOS floppies, set this value to 9. Reserved = The number of reserved blocks for the beginning of the partition of the device. For standard MS-DOS floppies, set this value to 1. Interleave = The physical interleave of sectors of the device. For standard MS-DOS floppies, set this value to 0. LowCyl = The physical low cylinder number of the beginning the the device partition. To calculate the LowCyl use the following formula: LowCyl = [BLOCK_beg / (Surfaces * BlocksPerTrack)] (integer part only) BLOCK_beg = The beginning block number of the partition Example => 0 = [ 0 / (2 * 9)] For standard 40 or 80 track floppy drives, set this value to 0. HighCyl = The physical high cylinder number of the end the the device partition. To calculate the HighCyl use the following formula: HighCyl = [BLOCK_end / (Surfaces * BlocksPerTrack)] (integer part only) BLOCK_end = The end block number of the partition Example => 79 = [ 1439 / (2 * 9)] For standard 80 track floppy drives, set this value to 79. For standard 40 track floppy drives, set this value to 39. For standard 80 track floppy drives used in Double Track Step Mode, set this value to 39. FileSystem = The name of the FileSystem code file to be used to allow AmigaDOS to access non-AmigaDOS formatted disks. For this product, use "L:MSDOSFileSystem". Stacksize = The stack size needed for the file system task. Use 4000 bytes or more if desired. Priority = The priority of the file system task. Should be at least a priority 5. Modify if desired. GlobVec = The global vector of the file system task. This value MUST be set to -1. Buffers = The number of cache buffers for the file system task. Set to the number of buffers to you desire. Each buffer consumes about 1040 bytes. The more buffers, the faster the performance. Be aware though, there is a point of diminishing returns with more buffers. For normal sized directories a value of 5 buffers is sufficient. If large and/or multiple levels of directories are used (ie. greater than 2), a value of 10 will yeild faster accesses. Please note: The AmigaDOS command "addbuffers" will add more buffers to the filesystem cache. BufMemType = The type of memory used by the cache buffers. It is recommended to set this value to 0 or 1 (PUBLIC memory). Mount = If this parameter is positive (>0), the "mount" command will immediately install the file system code. Otherwise, the file system will be loaded when the first access to the device occurs. It is recommended to set this value to 0 or do not include this parameter at all so that the memory for the file system and device will not be used until needed. DosType = This parameter indicates the type of file system used. For floppy drives, this value should be 0x4D534400. For 80 track 5 1/4" drives used in the 40 track (double track step) mode, this value should be 0x4D444400 (Refer to section "Double Track Step Mode" for further explanation). Device mountlist terminating character. This character MUST be present in the first column of new line to terminate the mountlist parameters for a specific device. NOTE Parameters left out of the mountlist for a device, are either automatically set to 0 or a default value. 2.5 DOUBLE TRACK STEP MODE The Double Track Step Mode is used to allow standard 40 track 5 1/4" floppies to be read or written on 80 track floppy drives. This mode can be used on 3 1/2" drives but there probably would be no need to. The Double Track Step Mode actually steps the drive head two steps instead of one. To set this mode, the mountlist parameter "Dostype =" must be set to 0x4D444400 ( MDD ). A word of caution must be noted about using the Double Track Step Mode on 80 track 5 1/4" drives. The read/write heads 80 track drives are half the width of heads on 40 track drives. This means that data written on a 80 track drive will be read back at about half the signal magnitude on a 40 track drive. Because of this difference, reading data reliably may at times be difficult. The device driver "mfm.device" provided with this product will attempt to retry reading data to recover if possible. SAMPLE SESSION Place a 3 1/2" MS-DOS formatted disk in the internal floppy drive (unit 0) in the Amiga. From the CLI, try the following commands: mount DI0: FROM DEVS:mountlist.msdosFS dir DI0: ALL dir DI0:subdir type DI0:subdir/filename cd DI0:subdir type filename info copy DI0:filename to DF0: cd DF0: ----- etc. Try reading in a file from the MS-DOS device from your favorite editor, spreadsheet, database, paint or draw programs and many other uses. NOTE Applications that bypass AmigaDOS for file access will not be able to access MS-DOS formatted files. Applications of this type are "format", "diskcopy" and AmigaDOS sector editors. AMIGADOS COMPATIBILITY The MS-DOS File System is designed to conform to AmigaDOS and MS-DOS file naming conventions wherever possible as well as multi-tasking requirements (such as file locks). There are a few exceptions due to the limitations of MS-DOS file naming conventions. The following sections detail the differences. FILE NAMING CONVENTIONS File naming conventions for MS-DOS still apply when accessing or creating file or directory names. INVALID CHARACTERS ("FileName") The following is a list of characters that are not valid for MS-DOS names. < > . " | + = ; , Although some of these characters are valid for AmigaDOS filenames, avoid them. The characters '\', '/', '[', ']', ':' are reserved for special use described below. FILE NAME ("FileName") The file (directory) name is limited to 8 alphanumeric characters. Any characters beyond 8 are ignored. The characters can be specified as lowercase and will be converted to uppercase automatically. The space character ' ' is allowed between other alphanumeric characters but it is not recommended. DI0:FILENAME ignored => DI0:FILENAME FILE EXTENSION (".Ext") The file (directory) extension is limited to 3 alphanumeric characters. Any characters beyond 3 are ignored. The extension appears after the dot ('.') but it is not necessary in a file name. The characters can be specified as lowercase and will be converted to uppercase automatically. The space character ' ' is allowed between other alphanumeric characters but it is not recommended. If multiple extensions are present in a file name, only the last extension will be used. DI0:FILENAM mignored.ign.EXT ignored => DI0:FILENAME.EXT WORKBENCH EXTENSION (".info") One exception to the 3 character extension is the Amiga extension ".info". When the file name is read from the MS-DOS disk by the MS-DOS File System, an ".INF" extension is automatically expanded to ".info" to allow the file to be seen by the WorkBench application. Subsequently, when a file is written to the MS-DOS disk with an ".info" extension, it is stored on the disk as ".INF". The original file that will have a WorkBench ".info" file associated with it must not have any other extensions in the name. If the original file already has an extension, it may not be properly accessed by WorkBench. ROOT NAME QUALIFIER (':') The character ':' is used as a root name qualifier to refer to the physical device name or volume name of the disk or the logical name of a directory path. DI0:FILENAME.EXT VOLUME NAME ("Volume_Name") The volume name is limited to 11 alphanumeric characters with spaces allowed between characters. Any characters beyond 11 are ignored. The characters can be specified as lowercase and will be converted to uppercase automatically. The volume name is normally written on the disk during a format. Since the volume name is optional to MS-DOS, it may not appear in the root directory of the disk. When the volume name is not availiable, the MS-DOS File System will use the boot block identification name and a creation date of January 1, 1980 as the volume information for AmigaDOS. "IBM 3.1:FILENAME.EXT" => DI0:FILENAME.EXT DIRECTORY NAME QUALIFIERS ('/' or '\') The directory name qualifiers can be the standard AmigaDOS '/' or MS-DOS '\' characters. The characters '/' and '\' are used to separate directory paths. A path name qualifier without a file or directory name immediately preceding it will specify a parent directory. This follows the convention established by AmigaDOS. DI0:SUBDIR/FILENAME DI0:SUBDIR\SUBSUBDIR/FILENAME DI0:SUBDIR\SUBSUBDIR// => DI0:SUBDIR FILE FILTERS Normally the MS-DOS File System will transfer data unmodified between the MS-DOS device and the Amiga. There may be occasions where certain file translating (filtering) may be desired. Two types of filtering provided by the MS-DOS File System are availiable to you as options. CTRL-M/CTRL-Z Filter (']') MS-DOS text files normally have carriage returns (CTRL-M) followed by linefeeds (CTRL-J) whereas the Amiga only needs linefeeds. They also place one or more EOFs (CTRL-Z) at the end of the file to signal the end-of-file which is also not used by the Amiga. If you wish to filter the carriage returns and EOFs, place the character ']' anywhere in the file specification (append to the end of the name works best). The filter removes carriage returns and EOFs when reading the file from the MS-DOS device. The filter will add carriage returns before linefeeds and an EOF to the end of the text when writing the file to the MS-DOS disk. DI0:SUBDIR/FILENAME.EXT] => DI0:FILENAME.EXT /* with CTRL-M/CTRL-Z Filter on */ HIGH BIT FILTER ('[') Some MS-DOS word processing files set the high bit of ceratin ASCII characters in the file to give that character special meaning. If you wish to filter the high bit to try to conform the file to standard ASCII text, place the character '[' anywhere in the file specification (append to the end of the name works best). The filter only clears the high bit when reading the file from the MS-DOS device. The filter will not set the high bit when writing the file to the MS-DOS device. DI0:SUBDIR/FILENAME.EXT[ => DI0:FILENAME.EXT /* with High bit Filter on */ NOTE Some CLI utilities may use '[' or ']' as special characters. The utility should have an escape (or literal) character (such as '*') to precede these characters. SENSING DISK CHANGES The MS-DOS File System will automatically detect disk changes and modify the system parameters if the drive used is compatible with Amiga hardware requirements for disk change detection. The 3 1/2" drive supplied with your Amiga is capable of disk change detection, whereas most 5 1/4" drives sold by Commodore-Amiga are not. For those drives that do not have hardware to detect disk change, the "diskchange" command (provided in AmigaDOS versions 1.2 and 1.3) can be used to "force" the MS-DOS File System to recognize a change of disks. WORKBENCH USAGE The MS-DOS File System will operate properly with WorkBench but some points must be covered. If you use WorkBench exclusively over the CLI, you will want to configure any MS-DOS devices to be loaded immediately when mounted (ie. Mount = 1). If this is not done, executing a directory command on the device from CLI will bring up the disk icon on WorkBench. Avoid using the "KILL" utility. Using it will free the resources and memory used by the filesystem but will crash WorkBench. Create files on the MS-DOS disk with NO file extension (ie. characters following the '.'). Applications that automatically create ".info" files will then work correctly. FILE LIST This is the current listing of the CrossDos distribution disk: PD (dir) arp13.zoo ARP V1.3 library and commands arpqr.arc ARP V1.3 "quick reference" guide c (dir) Mount V1.3 compatible cmd to "mount" device TDPatch12 trackdisk.device patch for V1.2 TDPatch13 trackdisk.device patch for V1.3 L (dir) MSDOSFileSystem MS-DOS file system code Devs (dir) mfm.device mfm device driver code mountlist.msdosFS partial mountlist for floppies LIBS (dir) arp.library ARP V1.3 library Utilities (dir) cmpPATH execution script to exercise filesystem devinfo display device info (internal use) diskchk check disk blocks diskchk.info kill kill handler or filesystem MFormat format utility for MS-DOS disks MFormat.info MDiskCopy diskcopy utility for MS-DOS disks MDiskCopy.info CrossDOS.manual The manual for this product Install_msdosFS execution program for auto-installation Install_msdosFS.info READ.ME last minute news and updates. MS-DOS FILE SYSTEM SUPPORT UTILITIES The following sections describe the utilities included with this product that are unique. "KILL" Format: KILL Template: KILL "DEVICENAME" Purpose: To remove a filesystem and free resources Path: C:KILL SPECIFICATION: This utility attempts to KILL the MS-DOS File System that is loaded. It will try to return all the resources and memory allocated. Caution must be exercised in using this command since it does not check to make sure all the file Locks are returned to the filesystem before KILLing it. If file Locks still exist (ie. if a directory in filesystem is still the current directory for the CLI being used) after KILLing the filesystem, you may crash the system. Using this utility when WorkBench is loaded will crash WorkBench. To recover, issue a "LoadWB" command again. KILL may work with other filesystems but we do not guarantee the results. "DISKCHK" Format: DISKCHK Template: DISKCHK "DEVICENAME" Purpose: To check the read integrity of any disk Path: C:DISKCHK SPECIFICATION: This utility attempts to check the read validity of any disk and report any errors. It will interactively ask which blocks to check ( lower and upper limits). If the character "r" is place after the upper limit value entered, DISKCHK will "repeat" the checking until a Control-C is typed. This utility was originally design to check MS-DOS formated disks but it should work on any disk mounted on the Amiga. "MFORMAT" Format: MFORMAT DRIVE NAME [QUICK] Template: MFORMAT "DEVICENAME,DISKNAME,QUICK/S" Purpose: Format a disk using an MS-DOS format Path: C:MFORMAT SPECIFICATION: This utility will format a disk an MS-DOS format using some of the parameters in the mountlist. The QUICK option will only reformat a previously formatted MS-DOS disk. It will supply a new boot block, file allocation tables and empty root directory. "MDISKCOPY" Format: MDISKCOPY Template: MDISKCOPY Purpose: Make a copy of an MS-DOS disk Path: C:MDISKCOPY SPECIFICATION: This utility will make a copy of an MS-DOS disk on another drive. It will interactively ask which is the SOURCE drive and which is the DESTINATION drive. Remove at least one of the disks after completing the command. "TDPatch" Format: TDPatch12 or TDPatch13 Template: TDPatch12 or TDPatch13 Purpose: Patch the trackdisk.device for V1.2 or V1.3 Path: C:TDPatch12 or TDPatch13 SPECIFICATION: This utility will patch the trackdisk.device for Kickstart V1.2 or V1.3. This patch is only needed if there is only one 3 1/2" drive in your system. There are a few bugs in the trackdisk code that manifest itself only under certain conditions. The installation program should detect your Kickstart version and apply the proper patch if your system meets the other criteria. "CmpPATH" Format: Execute CmpPATH [CMPONLY] Template: CmpPATH "SRCPATH,DSTPATH,CMPONLY/S" Purpose: Special exerciser for multiple DOS functions Path: C:CmpPATH SPECIFICATION: This execution script will execute a series of DOS utilities to test many of the DOS functions a filesystem should perform. The ARP commands MUST be used with this script. The ARP commands should be placed in the C: directory. SRCPATH is the source path from which files will be copied. DSTPATH is the destination path to which files will be copied. The DSTPATH will be modified but the SRCPATH will not. The CMPONLY option will not modify the DSTPATH but only compare the files between the two paths. Presently DOS utilities such "cd", "setdate", "makedir", "rename", "protect", "delete" and "cmp" are used in the script. TECHNICAL SPECIFICATIONS The following are the technical specifications of the filesystem and device driver. MSDOSFILESYSTEM The Amiga allows for foreign device (disk) formats as well as the standard AmigaDOS disk format by placing a common interface (DOS interface) between the application and the file system (handler). The file system code that understands the foreign disk format must conform to at least a minimum set of commands from this DOS interface. The MS-DOS File System code translates the DOS commands into MS-DOS disk format specific reads and writes to the device. If the device is a floppy disk, the file system is initialized to open the "mfm.device" to translate raw data from the disk into data blocks and vice versa. Other devices can be used by using the device driver code supplied by the device controller manufacturer. DEVS:mfm.device The "mfm.device" is used to decode and encode "mfm" data physically formatted in a standard (non-Amiga) format. It acts just like the Amiga-supplied "trackdisk.device" device driver code. It answers requests for drive control and blocks of data transfer. The "mfm.device" responds to all the command types as does the "trackdisk.device" with the following exceptions: - EXT (Extended) command qualifiers are not valid. - A new command MDCMD_SETPARMS = 22 is included to allow the device driver to set some of the physical disk parameters to new values. The FileSysStartupMsg Environment Table pointer is passed in io_Data. Any errors are returned in io_Error. The end.