For years, I owned a TRS-80 Model IV two-disk system. I purchased it in the late 1990s at a community yard sale for only $25. Since then, there was little I could do with it. All I had was an L-DOS 6.3.1 boot disk. If all I wanted to do was format floppies, or type in the occasional BASIC program, then I was golden. Otherwise, I had no (cheap and convenient) means to get existing TRS-80 software transferred to a TRS-80 disk format so I can use it on the computer… until recently.
Many other classic computer systems have an easy means to transfer programs to/from a PC. This is useful for emulators and those who would like to try original programs found in archives on the Internet on a REAL classic computer. Commodore computers, for example, can have their disk drives connected to a PC using a relatively cheap special cable and write entire disk contents to a real floppy disk. For that matter, real floppies could be backed up to a disk image on a PC. There are many solutions for the latter for TRS-80 computers, but transferring file TO a TRS-80 from a PC isn’t so easy, nor appears to have been readily researched.
As far as I know, there are no other tutorials for this particular TRS-80 file transfer need. There are plenty of solutions for transferring TRS-80 files and programs TO a PC, but not FROM a PC, unless you want to invest monies into hardware solutions that may require you to disassemble your TRS-80 and/or PC to make it work. When the discovery of a TRS-80 DOS command I was not familiar with surfaced during one of my routine online romps around the collector’s scene, the solution to my dilemma came to mind. Read more for all the gory details…
At my disposal were the following items:
- TRS-80 Model IV (w/ RS-232 port)
- Modern PC running windows 7 (and having no serial port)
- USB to Serial adapter
- Laplink cable (for you newbies, Laplink was once a popular file transfer system which moved files through their included null-modem “Laplink cable”)
You may substitute your own cabling solution to connect the two computers together, as long as it’s equivalent to a null-modem cable. The first thing I needed to do was get the two computers talking via the null modem (aka Laplink) cable. To do this, I needed to install and configure my USB to Serial adapter as a low numbered COM port. A lot of times, these devices get assigned a two digit COM number like COM16 or something. I reconfigured the port in the Windows “Device Manager” to set it to COM3. I felt a low COM port number would work best with most terminal communications programs (like we used in the old days).
Once I had the PC and Model IV connected, I needed to test the connection by establishing two-way communications between the two. On the PC, I thought I’d use HyperTerm, but it has not been included by default in Windows 7, unlike earlier versions of Windows. The only way I could get HyperTerm now is if I buy it. Forget that!! Instead, I found and downloaded Tera Term v4.73 (http://ttssh2.sourceforge.jp/). It has the features I need to transfer files directly through the serial connection.
Now that I have the PC side ready to communicate, it’s time to configure the Model IV. The Model IV has a rudimentary means of communication using the Communications Line device (known as *CL), SETCOM (for configuring communications parameters, and COMM (which provides the terminal interface). This procedure was only done on in LDOS, but it should also work with TRSDOS. The following steps need to be done, in order, so that file and data transfers can be initiated.
First, the *CL device needs to be configured by assigning it to a driver. On the Model IV type:
SET *CL COM/DVR <Enter>
This sets the COM driver to the *CL device. If you get an error like, “Driver not found”, make sure the COM/DVR file is on your TRS-80 DOS disk. Next, the communications parameters need to be configured. NOTE: I tried so many different parameter configurations that I never bothered to check and see what would be the minimum amount of parameters I can get away with. So I may be “over configuring” the communications port with these values. Regardless, the values I used worked fine for me. Type:
SETCOM (BAUD=300,WORD=8,PARITY=NONE,RTS=ON,CTS=ON,DSR=ON) <Enter>
The SETCOM command allows you to set many of the popular RS-232 communications parameters. Some parameters missing from the above statement might also be important parameters, but are already set as required by default. The command above changes certain default values to the desired ones. After the command is entered, we are left with the following configuration values:
- Baud: 300bps (I’ll explain the slow speed later)
- Word: 8-bit
- Stop Bits: 1
- Parity: None
- RTS/CTS (a form of flow control): ON and ON
- DST/DSR (another form of flow control): ON and ON
I used 300 Baud for one reason; because I spent many evenings enduring failed transfer attempts over several weeks trying to get this procedure perfected!! I tried all sorts of baud rates and other settings, coming close to perfecting a clean transfer of at least ONE useful CMD file which I could successfully run. However, I eventually discovered that the above settings are the most stable. 300 baud is extremely slow, but I only need to run this particular procedure to get one specific file transferred. After that, I can ramp up the communications speed. But I digress, I’ll get to the details in a bit.
Now that the RS-232 port is configured, I needed to run the main communications program, called COMM. The COMM program opens up a terminal interface where you can type and receive text to/from a connected computer. In this case, the PC is that other connected computer. To start the COMM program, type:
COMM *CL <Enter>
This will launch the terminal program. First, you’ll need to understand how the program operates. After you run COMM, if you launch the terminal program on the PC (I’m using Tera Term) and set the communications parameters to match those set by SETCOM above, everything you type on the Model IV should appear on the PC terminal screen, and vice versa. This is an easy way to test communications. If you cannot see the text you type on the PC appearing on the Model IV, then the transfer process will not work. Please check your configuration before continuing. Also note that there is also no need to clear the screen of the text you’ve typed in to test the connection. Everything involved with transferring data files is done between the moments you start and stop the transfer program, regardless what’s on screen at the time.
My goal in this endeavor was to provide myself with an efficient means of transferring files. Simply using the COMM program isn’t enough, but it’s a starting point to transferring a special program which I found more efficient. The whole purpose of this exercise is to get that special program file onto a TRS-80 formatted floppy. You need to keep the following fact in mind:
The COMM program WILL ALMOST ALWAYS DROP DATA because there is no data checking or checksum capabilities in the program!!
That is the humbling part of the process, and the reason why I worked myself into frustration until I discovered a useable solution. Many of my file transfers would lose characters here and there, but I didn’t realize this for a long time because I had no easy indication of the issue. Characters from CMD files which I’ve tried transferring to the Model IV are in binary format, so I cannot tell if any data has been dropped. All it takes is one character to drop off in the transfer to render a CMD file inoperable. I had only one success in the past few weeks, but that success was not repeatable. I found that I needed to transfer an ASCII file (text file for you newbies) instead. That way, I can spot missing data as it gets transferred, or at least be able to correct the file manually.
The only type of text file which I thought would be useful was a BASIC program. If I find the right BASIC file, I will be able to easily monitor the transfer and check for errors, plus the program will do something useful in regards to performing more efficient file transfers. The BASIC language in LDOS (and perhaps TRSDOS) loads text files to load program content. I found the perfect BASIC program to transfer. It’s a BASIC program which reads from a collection of binary code stored in DATA statements and “builds” a working CMD file on disk. The BASIC program I chose creates a file called XMODEM/CMD on disk. With the XMODEM program, I can replace the COMM program for file transfers. XMODEM is an ancient (by today’s standards) means to transfer files over an RS-232 connection, but is perfect for transferring files from a PC to a TRS-80. XMODEM is also able to manage the transfer of data between two computers by correcting any errors or lost characters which occur. That way, all transfers are perfect copies, even for CMD files.
You can find the BASIC program here: http://www.classiccmp.org/cpmarchives/trs80/Software/Model%204/X/XModem%20v6.2a%20(19xx)(Author%20Unknown)%5bBAS%5d.zip
If you open the archive, you’ll find a file called XMDM2412.BAS inside. Save this file somewhere on your PC. If you’re curious, you can look at the contents of the file in Wordpad or other text editor (it won’t look right in Notepad).
Now back to the COMM program…
Navigating around the COMM program is a bit archaic. All commands in the COMM program involve selecting a function, then either setting its value, or turning that function on or off. Get used to using the <CLEAR> key on the Model IV. In the COMM program, the <CLEAR> key acts like a CTRL or ALT key on a PC as it’s used in combination with another key. With the COMM program running, and the XMDM2412.BAS file ready on the PC, we need to start the file receive process on the Model IV. All keypresses in the following steps will be indicated in angle brackets “<>”, and combination keypresses will be separated by a “+” symbol, which means, press and hold the first key then press the next key, etc.
To capture data in COMM, we need to initialize the “File Receive” function. Press the following key sequences:
You will be prompted for a filename. Enter
followed by <ENTER>. The TRS-80 uses a slash “/” symbol like the PC uses a period “.” to separate the filename from the file type. The “:1” portion of the name above tells COMM to save this file on the disk in Drive 1. If you’re working on a single disk system, or have more than two disk drives on your Model IV, change the number after the colon to whatever drive number you are using.
Next, the “File Receive” function needs to be “opened” so that it will start capturing data sent to it by the PC. To start the capture process, press:
At this point, all data coming from the PC will be captured, so try not to type any text on the PC until the file transfer is completed. To start the file transfer, go to the PC (you have Tera Term running already, right?) and choose Send File… under the File menu. Find the XMDM2412.BAS file you extracted earlier and send it. Look at the TRS-80. You should now see the file contents appear on the screen. You may notice why I recommended 300 Baud for the transfer. First, it doesn’t take too long for this file to transfer, plus, the transfer goes slow enough that you may see indications of dropped characters. If you’re familiar with the structure of a BASIC program, you should spot dropped characters quite easily. This file being transferred has many numbered lines of text. There are also many DATA statements in the file. Other than a few of them, these DATA statements are all the same length. You will notice if characters get dropped because the DATA statements suddenly don’t line up anymore.
I want to step aside for a moment and mention a quirk (or bug) I’ve discovered at this point in the process. This may not happen to you, but I found that it is completely repeatable with my system setup. If, during the transfer of this file, you find your disk drive occasionally turning on and off, I guarantee you will be missing data. Even at 300 Baud, the disk writing process interrupts some of the data being transferred. What’s happening is, the transfer is being saved directly to disk. This is a bug in the process because at this point, we did not yet turn on the “dump to disk” process which saves the transferred file contents to disk. We only turned on the capture process which is only supposed to transfer to memory. I found this bug occurs ONLY during the first transfer I perform each time I run the COMM program. As long as I stay in the COMM program all subsequent transfers behave as expected and go right to memory as they are being captured. This is important to keep in mind. The solution to this “bug” is easy; once all the following steps have been completed, simply restart the capture process again, starting with initializing the “Data Receive” function mentioned earlier in this tutorial.
Now back to the transfer process…
After the file completely transfers, you’ll need to turn off the capture process on the TRS-80 by pressing:
Then, you need to save the capture buffer to disk by pressing:
and finally, close the capture file by pressing:
As mentioned before, if your computer started running the disk drive DURING the transfer, you’ll need to go back and repeat the steps to ensure a clean file transfer. There should be no disk activity on the TRS-80 while the file is being transferred. The disk should only run when you first create the capture filename on the TRS-80 and when you save/close the capture buffer.
You are now done with the file transfer. You can exit the COMM program by pressing:
Back at the TRS-80 DOS prompt, type:
DIR :1 <Enter>
to see if the file you transferred is there. I will continue to use “:1” in my examples throughout this tutorial. Substitute the appropriate drive number after the “:” above if you used a different disk drive. If the file XMDM2412/BAS doesn’t exist, you can try transferring it again by repeating the steps above, starting with running the COMM program.
Next, we need to run the BASIC program file we transferred. Type:
BASIC XMDM2412/BAS:1 <Enter>
This will load and run the BASIC program. If all is successful, you’ll see a bunch of “<DATA>” text on the screen while the disk drive is operating, then ending with two checksum numbers on the screen when done. If these checksum numbers match, everything was a success. Take a look at your disk directory again:
DIR :1 <Enter>
you should see a program called
From now on, the COMM program is unnecessary. You’ll still need to use the SET and SETCOM programs to initiate the RS-232 port after restarting your computer, but you’ll be able to substitute higher Baud rates now (I’ve tested speeds up to 9600).
To transfer files from your PC with XMODEM, use the Transfer / XMODEM / Send menu item under the Tera Term File menu on the PC. You will be prompted for a filename. Choose a TRS-80 file to transfer and send it. The XMODEM transfer on the PC will now wait for the TRS-80 to initiate the receive side of the transfer. Note the filename you picked on the PC. You will type it in on the TRS-80. For example, if you chose OMNITERM.CMD on the PC, you would type the following on the TRS-80 to initiate the XMODEM receive process:
XMODEM R OMNITERM/CMD:1 <Enter>
This will start a receive (“R”) process to transfer the file OMNITERM/CMD (remember the slash) to drive “:1”. Depending on the size of the file, the transfer will pause on occasion while data is saved to disk. This is OK because XMODEM transfers support a waiting period AND error correction while data is being written to disk. The COMM program lacked these important features.
One thing to note is that TRS-80 emulator files often come in DSK or DMK format. These are “disk images” for use on an emulator. You cannot transfer these types of files to a TRS-80 using these means and expect them to work properly. You’ll need to use a program which extracts the files from the disk image on your PC, THEN transfer them individually to a blank formatted disk on the TRS-80. If someone knows how to handle entire disk images directly on a TRS-80, please let me know!
Using the above process, I have transferred many CMD and BAS files, games, and utilities to real TRS-80 formatted disks. My Model IV is now a useful exhibit in my collection of classic computers!! 🙂
I hope these instructions will help others get better use out of their TRS-80 computers.