BridgePort Tools Version 1.01 Copyright (c) 1994 M. C. Henderson These programs have been tested extensively. However, use them is at your own risk. I will not be responsible for any damage or loss of data caused directly or indirectly by these programs. Caution is particularly advised since this is the original release of these programs. In other words, make sure you have backups of your valuable data! 1.0 Introduction The BridgePort comes with a set of utility programs which allow you to create and use virtual IBM disk drives on the Amiga. These jdisk drives can be written to, and read from using the IBM programs AWRITE.EXE and AREAD.EXE. Although these programs can be fine for transferring small amounts of data, they can be slow when large files are being moved. I wrote these Amiga programs included herein so I could quickly transfer large amounts of data to the jdisks located on the Amiga. Using an Amiga 3000 with a 286 BridgePort, the WriteJD program will write a 250KB file from the harddrive to a ram based jdisk file in approximately 9 seconds versus 62 seconds using the AREAD program. The ReadJD program will transfer this same file from the jdisk to Amiga ram in approximately 6 seconds versus 62 seconds using AWRITE. 2.0 Programs BPTools consists of four programs: 1. "JDir" is an Amiga program which allows you to get a directory listing of a jdisk file while in the Amiga mode. 2. "MakeJD" is an Amiga program which allows you to create a jdisk drive while in the the Amiga mode. 3. "ReadJD" is an Amiga program which allows you to read files from a jdisk file while in the Amiga mode. 4. "WriteJD" is an Amiga program which allows you to write to a jdisk file while in the Amiga mode. 3.0 Instructions In the instructions given below I have assumed that the reader has a good working knowledge of creating and working with jdisk files. If not, I suggest you throughly read the your BridgePort user's guide. Particularly the information on using JLINK.EXE, AREAD.EXE and AWRITE.EXE. Note that these programs only work with jlinked jdisk files (virtual IBM disks). They will not read or write to psuedo IBM harddrives. 3.1 JDir As stated above, JDir is an Amiga program for getting a directory listing of a jdisk file from the Amiga side. This jdisk file could have been created on the IBM side with the JLINK.EXE program or the MakeJD program discused below. Use the following syntax to get a directory listing: JDir vd Where vd is the full path name of the jdisk file on the Amiga (eg DH1:IBMdata/vd). Note that there is no colon after the file name. If it is included, the Amiga will think you are asking for a volume name and put up a requester asking for it. The syntax for subdirectors is: JDir vd\dir1\dir2\dir3 Note that the IBM backslash convention was used to separate directory entries. This was done so the Amiga would not treat these entries as a request for information on an Amiga file. The IBM wildcard symbol "*" (asterick) can be used to get information on specific files: JDir ram:vd\dir1\*.exe This command will list all the files in subdirectory "dir1" that end in "exe". Limitations: JDir doesn't have any fancy options such as /p or /w to get paged listings. Maybe this is something which could be added if there is a request for it. 3.2 MakeJD MakeJD is an Amiga program to create a jdisk file on the Amiga. The program is similar to the BridgePort IBM program called JLINK.EXE. It will create a file on the Amiga which acts as a virtual disk drive on the IBM. MakeJD will allow you to create a jdisk file and the programs WriteJD and ReadJD discussed below will allow you to write and read files to it. MakeJD will NOT however, jlink the file to the IBM. You must still do this using JLINK.EXE. The syntax for using MakeJD is: MakeJD jdisk kilobytes Where "jdisk" is the full path and file name of the file you wish to create (eg. Ram:dir/vd). "kilobytes" is the number of kilobytes you want to assign to this virtual drive (eg. 300 = 300,000 bytes). Note that like JLINK.EXE, MakeJD does not create a file that is "kilobytes" large, it only creates a file which is allowed to become this size. The file becomes larger as you add files to it. Like JLINK.EXE, MakeJD will create jdisk files from 160KB to 30MB. As a sample session, assume you want to create a 300KB jdisk file named "vd" in ram and make this file drive d: on the IBM. You would enter: MakeJD ram:vd 300 Then you would go to the IBM and enter: jlink d: ram:vd When you were through with it, you could unlink it by entering: jlink d: /u Of course it would have been just as easy to create the jdisk on the IBM without using MakeJD if this all you wanted to do. The primary reason for writing MakeJD was so I could create the jdisk on the Amiga, transfer files to it on the Amiga side, then go to the IBM side and link it. In my case, I have a VGA card and I have to change the monitor output before going to the BridgePort, hence it is nicer (and faster) to be able transfer the data before I switch over. Limitations: MakeJD has none of the options of JLINK.EXE. It doesn't have a /N option because there are not really any messages to surpress. It doesn't have a /U option because as explained above, JLINK.EXE must be used to link and unlink the jdisk to the IBM. I have never used the /R option (create a read only file) with JLINK.EXE, so I didn't include it in MakeJD. Again, if this is an option you would like included, let me know and I'll look into it. Although not a limitation, the file sizes created by MakeJD may not always correspond to the file sizes that would be created by JLINK.EXE. I spent considerable time trying to figure out the criteria used in the JLINK program for assigning file sizes, but never made much sense of it. I finally gave up and used my own criteria. As an example,if you ask for a 165KB file with JLINK, you get a 163KB file. With MakeJD you will always get a file at least as large as you have requested. 3.3 ReadJD ReadJD is an Amiga program which is anologous to the program called AWRITE.EXE on the IBM side. AWRITE will write a jdisk file to the Amiga. ReadJD will accomplish the same task by reading the jdisk on the Amiga side, but much faster. ReadJD will read files from any jdisk file using the following syntax: ReadJD vd\dir1\dir2\jname ram:outname This would read a file named "jname" from subdirectory "dir1\dir2" of jdisk "vd" and write a file "outname" in ram:. If the output name were omitted, the file name "jname" would be written to the current directory. Note that back slashes must be used to separate directory entries and that no colon is used between the jdisk name and the directory entries. If there were no directories, the syntax would be: ReadJD vd\jname This would read the file name "jname" and write it to the current directory. Again, there is no colon between the jdisk and file name. The Amiga interperts the colon as being part of a volume name, and will put up a requester asking for it. The IBM style wildcard symbol "*" (asterick) can be used to read multiple files, as for example: ReadJD vd\*.c This would read all files with a "c" extension into the current Amiga directory. There is only one option with ReadJD, /t. I'am sure not everone will be happy with it. I have flipped the /b option that is used with the IBM program AWRITE.EXE. The /b option is used in AWRITE to specify binary files. Since most of the files I transfer are binary and I was always forgetting to add the /b. I wrote ReadJD to handle binary as the default mode. To transfer text files, you must add a /t. This option will strip the carriage returns from the IBM text files. For example: ReadJD vd\ibm.txt dh1:amiga.txt /t This would read the IBM text file "ibm.txt", strip the carriage returns, and write a file named "amiga.txt" to drive dh1:. The option /t must be the last entry of the command. Limitations: As mentioned above, I substituted /t for reading text files for the /b option used in AWRITE.EXE for writing binary files. At present there is no /cr or /nc options. Let me know if these are desired. 3.4 WriteJD WriteJD is anologous to the BridgePort program AREAD.EXE. The IBM program AREAD is used to read Amiga files to a jdisk. WriteJD is an Amiga program used to write Amiga files to a jdisk (but much faster). The syntax is as follows: WriteJD dh0:amiga.dat vd\dir1\dir2 This command would write the file named "amiga.dat" found on drive dh0: to jdisk "vd" into subdirectory "dir1\dir2". Note that as with ReadJD, back slashes are used to separate subdirectory entries on the jdisk and no colon is used between the jdisk name subdirectories. If there were no subdirectories on the jdisk, the commamd would have simply been: WriteJD dh0:amiga.dat vd\ You can also write to a specific file name on the jdisk: WriteJD ram:amiga.dat vd\ibm.dat This would transfer the file named "amiga.dat" in ram to jdisk "vd" and name it "ibm.dat". You can also use wildcards to transfer files: WriteJD work:cprogs/*.c vd\cprogs This command would transfer all files with a "c" extension found in the Amiga volume "work",subdirectory "cprogs" to jdisk "vd" subdirectory "cprogs". It should be noted that WriteJD will not create directories on the jdisk if they don't exist. This example assumes that the subdirectory "cprogs" had been created on the jdisk "vd" using the MSDOS command mkdir. As with the ReadJD program, the default mode on WriteJD is binary. All of the files in the examples above would have been written to the jdisk as is. To write text files to a jdisk, a /t option would be required: WriteJD ram:amiga.txt vd\ibm.txt /t The /t option would cause a carriage return to be inserted before every line feed. The above command would read the file "amiga.txt" from ram, insert carriage returns, and write it to the file "ibm.txt" on the jdisk "vd". As with ReadJD, the /t option must be the last entry in the command line. Limitations: As mentioned above, I substituted /t for writing text files for the /b option used in AREAD.EXE for reading binary files. At present there is no /cr or /nc options. Let me know if these are desired. If you write files to a jdisk, then go to the IBM and link it with JLINK.EXE, you can do a dir command and all the transfered files will be listed. If you go back to the Amiga and transfer more files, these new files will not show up on subsequent directory listings on the IBM side. Apparently the IBM makes a copy of the directory listing and won't updated it if it thinks nothing has changed. To get these files to show up on the directory listing, you have two choices. The first is to unlink and relink the jdisk file. The second method, which I recommend, is to issue a chkdsk command. This forces the IBM to update the directory listing. By using the chkdsk command, you also ensure that nothing has gone wrong with the transfer of the files. In fact, I recommend doing chkdsk commands periodically anyway to make sure everthing is ok with the jdisk. WARNING If you have a jdisk linked to the Amiga and do subsequent writes with WriteJD, either unlink and relink it, or do a chkdsk command. If you use the BridgePort to write to this jdisk without doing this it will corrupt the jdisk. I'am planning on fixing this by forcing a reset of the IBM drives from the Amiga, but I haven't been able to get my hands on the Janus header files yet. There is also something that I discovered when I wrote these programs. If you overwrite an existing file, and you run out of disk space, you will lose the original file on the disk. This is the case whether you are using MSDOS, AREAD.EXE or my program WriteJD. All of these programs destroy the orginal to make room for the new copy, so if it can't find room for the new, the orginal is gone. Of course, you can always write the file to another storage device. Comments, errors, suggestions can be sent to: Milt Henderson 6815 Wallsey Dr. San Diego,Ca USA 92119 Like I stated above, I have spent considerable time trying to beat all the errors out of these programs, but this is the original release and there could be something I missed. So be sure your data is backed-up.