[NOTE: This article originally appeared in the July '92 issue of Atari Interface magazine. It can be freely reprinted in non-commercial user group newsletters, so long as this header appears with the reprint. All other publications must first obtain permission (written or verbal) before reprinting this article. Atari Interface, 3487 Braeburn Circle, Ann Arbor, Michigan 48108, phone: (313) 973-8825.] Porting from the ST Making the ST and Portfolio Talk to Each Other Bill Rayl Probably the hardest thing an Atari ST user encounters as a new Portfolio user is getting the two computers talking to each other for the very first time. The Portfolio has built-in software for file transfers via the Parallel Interface and the Parallel Interface comes with compatible transfer software to run on an IBM. Unfortunately, this method cannot be used on an ST, even under IBM emulation. The reason for this is that the ST's parallel port does not use a couple pins that are extremely important to this software. So, how do you use your ST to transfer software to the Portfolio? Every article written on the subject in Atari publications so far tells you that you have four basic options: Borrow someone's IBM and use it to transfer a telecommunications package to your Portfolio. Buy the DOS Utilities card from Atari or an Atari dealer (retail price $89.95). It has XTERM, the PD terminal package of choice for the Portfolio. Find someone else who owns a Portfolio and has already gotten a terminal package onto it, then have them copy it to your RAM card. (Some people have even gone so far as to send their cards to Don Thomas at Atari to have him give them a copy of XTERM!) Purchase TransporT from Artisan Software (retail $29.95) and use a null modem cable to transfer your terminal package to the Portfolio. Of these options, TransporT is the one I'd recommend most...if you want to use only those choices. You see, all of those articles have missed the least expensive way to get a terminal package onto your Portfolio from your ST. In fact, some of those other articles state that what I'm going to tell you here is impossible. Other than the cables you'd need to buy anyway to use the Portfolio with a modem, chances are you already have almost everything you need. The Supplies All the hardware you need is: An ST A Portfolio The Serial Interface for the Portfolio A modem cable and null modem adaptor (or just a null modem cable) Your best option is to use a modem cable with 9-pin female connector on one end and 25-pin male connector on the other. Then, get a null modem adaptor with one 25-pin male end and a 25-pin female connector on the other end. This way, you can use the modem cable minus the null modem adaptor for normal telecommunications. If all you can find is a modem cable with 9-pin AND 25-pin female connectors and a null modem cable with both male ends (these do seem to be the most prevalent), don't worry. Just pick up an RS232 Gender Changer with 25-pin female connections at both ends. Your local Radio Shack should carry all of these cables and adaptors. The ST software you need is a terminal package that supports transfer rates of as low as 110 baud. This includes Flash! and many PD and Shareware packages. Chances are the ST terminal package you already use can handle this. If not, there's another option. First, you need the Atari Control Panel (or any software giving you the capability to set your RS232 parameters). Since the Control Panel comes with every system Atari sells, it's a good bet you already have it, even if it's not installed. Then, you need a program that can send information out the serial port. I personally used EdHak (available from Clear Thinking) to test this, and it worked beautifully. As for the files you are going to transfer to the Portfolio, you need the following: HEXBIN.COM -- A utility to convert HEX files into BINARY runnable format. File size: 257 bytes. Checksum: 408D. (Checksums will be explained later.) XTERM2.HEX -- HEX version of the XTERM2 telecommunications package for the Portfolio. Supports Xmodem and ASCII file transfers and lots more. XTERM2.DOC -- Text documentation for XTERM2. You don't really need this file for the transfer to work, but you'll probably need it to use XTERM2 effectively. You can simply leave this doc file on your ST and read it from there or print it out for reference. CHECKSUM.COM -- A small utility that gives you a Checksum corresponding to a given file. This file is optional to the process, but it helps. File size: 129 bytes. Checksum: 30A7. These are all Public Domain files available from the Portfolio Forum on CompuServe (GO APORTFOLIO). If you're at all interested in the Portfolio, this is THE place to be. There are literally hundreds of programs for the Portfolio there...all just a quick download away. The files are also available on this month's ST disk, in the ST2PORT.APP self-extracting archive. The Starting Block We'll assume you have all the files listed above somewhere on your ST. For this article, I'm going to describe doing the transfers using Flash. If you are using some other terminal package, you may need to slightly modify these directions. Start with both the ST and Portfolio turned off. It helps if you have both machines fairly close together, so that you can type on them both without moving from where you are. Plug the Serial Interface into the Portfolio. Attach the modem cable's 9-pin end to the Interface, plug one end of the null modem adaptor into the "normal" 25-pin end (adding on the Gender Changer if needed) and then plug the whole thing into the ST's serial port. On the ST Side Boot up the ST and run Flash. Set the baud rate in Flash to 110 baud (use Alt-B and click on the "110" button). While in the dialog box, make sure you have 8-bits, no parity and 1 stop bit set, as well. Click OK when done. If you want to watch the file's progress as it sends, you should also set Flash to Half Duplex (type Alt-P). Now, we'll go set the ASCII transfer options. Press the right mouse button to switch to the GEM screen. Select "Ascii UL/DL" from the Edit drop down menu. At the dialog box, set LINE PAUSE to its maximum of 9 and turn everything else off EXCEPT METERING, which should be turned on. Click OK. Go to the Upload drop down menu and select "File Ascii." Use the File Selector to find the file HEXBIN.COM. Click ONCE on the file, but don't send the file yet (i.e., select the file but don't press Return, don't click OK, and don't double-click the file!). Place the mouse pointer right above the OK button and leave it there. On the Port Side Boot up the Portfolio and get into Setup. Select "RS232 port..." from the menu. Set the Baud rate to 110, Parity to None, Data bits to 8 and Stop bits to 1. Then, select Initialize! from the menu. If you get a "Communication error" message the first time, try Initializing the Interface again. If you repeatedly get this error, there's a serious problem with either the Interface or its connection to the Portfolio. Turn the Portfolio off, make sure the Interface is firmly connected and try Initializing it again. Once the Interface is initialized, get to the DOS prompt (press Esc a couple times). At the DOS prompt, path to your RAM Card by typing A: and hitting a carriage return. Then, type the following (DON'T hit a carriage return after this yet!): COPY AUX: HEXBIN.COM Ready, Set... The next step takes a little bit of timing on your part. Thankfully, you don't have to be too quick about this, though. What you need to do is press Return on the Portfolio and then click the ST's left mouse button (or press Return) BEFORE the Portfolio times out trying to copy from the Serial Interface. You'll know if the Portfolio times out you'll see an "Abort, Retry, Ignore" message on the Portfolio but the ST is still sending. If the Portfolio does timeout, simply type 'A' to Abort, retype the COPY command (or press and hold the Fn key, followed by F3) and re-setup for the file transfer on the ST side. Then, try it again. If everything goes well, the ST will finish sending while the Portfolio continues to display "AUX to A:\HEXBIN.COM." A few seconds later, you'll see Not ready error Abort, Retry, Ignore? Yes, that's the same message you'll see if the Portfolio times out. That's why it's important that you can recognize the difference between success and failure here. If the ST is still sending and this error occurs, the transfer has failed. If the ST has finished sending and you see this error, everything is great. Type 'A' to Abort and type DIR (followed by a Return). You should see the file HEXBIN.COM safely stored on the RAM Card with a file size of 257 bytes. Round and Round Repeat the above file transferring steps for XTERM2.HEX and, optionally, CHECKSUM.COM. You can use CHECKSUM to verify that the files transferred successfully. At the DOS prompt, simply type CHECKSUM, followed by the name of the file you want to test and a return. For instance, to test HEXBIN.COM, enter the following (with a carriage return) at the DOS prompt: CHECKSUM HEXBIN.COM Once you have both HEXBIN and XTERM2.HEX on the Portfolio, you're in the home stretch. At the DOS prompt, type the following line (with a carriage return at the end): HEXBIN XTERM2.HEX The HEXBIN program will now convert the hexadecimal values in XTERM2.HEX into a binary, executable program. The output file is automatically called RESULT.OUT. Type, again from DOS and with a return at the end: REN RESULT.OUT XTERM2.COM The new program file should be 2,898 bytes in length and have a checksum of 99F3. If not...try, try again. That's All Folks! You should now have a working terminal program on your Portfolio. Turn your Portfolio and ST back off (just to be safe) and disconnect the modem cable from the ST. Keep the Serial Interface connected to the Portfolio. Remove the null modem adaptor or null modem cable and use the normal modem cable to connect the Interface and Portfolio to your modem. Boot up your Portfolio and go to Setup again. Reset your RS232 port to whatever your highest baud rate is on your modem -- XTERM2 can handle 9600 baud with no problem! You can skip Initializing the port, because XTERM2 will do it for you. Now, get to the DOS prompt again, path to A: if necessary, and run XTERM2 by typing "XTERM2" (without the quotes) followed by a carriage return. You should be greeted with XTerm's copyright notice and mini help screen. From here on out, anything you type in is sent directly to your modem. If using a Hayes-compatible, you can use ATDT to dial the modem, etc. Support files on CompuServe can even give you a Dialing Directory of sorts for XTerm. Make sure to read XTerm's documentation and keep a hardcopy of the docs handy for reference. That's all there is to it, folks! It may seem a little convoluted, but it's basically no different than null modem file transfers to any other computer...except you're starting out with no transfer software on one of the machines. I should note here that it may not be necessary to use 110 baud AND set metering to its slowest possible option. Better to be a little slower than necessary than too fast, though. I have had only mediocre success in transferring files at 300 baud, so I don't recommend using faster than 110 baud. At 110 baud and metering set to 9 in Flash (or Slow in EdHak), I've had 100% success with over a dozen file transfer attempts. Another important note is that you should not try this method with larger binary programs (like ACOM.EXE or even XTERM2.COM). It simply will not work, because these files contain control characters that stop the transfer dead. Things like Control-C, Control-D, etc. end the transfer. Play it safe and transfer the files listed in this article. Then, use your newly created XTERM2.COM to do Xmodem file transfers from then on. Of course, you can use this method at any time to transfer ASCII text files to and from your Portfolio. Sometimes the impossible isn't really all that hard.