Please enable JavaScript to display the menu.

How to Transfer Files to/from FM Towns?

ysflight.com

One of the questions asked during Demosplash 2021 Discord chat was how to transfer files to/from your FM Towns. If you are asking this question, I assume you must be trying to send a file that does not fit within a floppy disk, you are trying to transfer file to a virtual SCSI disk like SCSI2SD or Henkan Bancho connected to your Towns. I assume you are able to navigate through basic functionality of Towns OS and basic DOS commands. I also assume you have Towns OS installed in D drive. Since C drive is reserved for the ROM drive, TownsOS was typically installed in D drive.

The most environmentally friendly way: Serial

You can use XMODEM protocol to transfer files over serial. FM Towns has a 25-pin RS232C connector behind the chassis. You need:

If you need to extend your cable, don’t extend 9-pin cable, but do extend USB cable. Keep 9-pin cable as short as possible or even better to make it just a chain of dongles. 9-pin serial cable is more likely to pick up noise.

Then, copy the following two executables to Towns.

These files are small. You can do it by a floppy disk. You can download files from: https://github.com/captainys/FM/tree/master/TOWNS/XMODEM/EXE

You don't have a floppy-disk drive on your Windows PC? Get a USB drive. Use Towns to format a disk. If you have FM Towns 2 MX/MA or newer, you can use a 1440KB format. Well, if you have an earlier models, one of the problems is earlier FM Towns models cannot read/write 1440KB format, but I purchased 3 USB-connected floppy disk drives in the U.S., two of them could read/write 1232KB format. One didn't work. Try 720KB format. Or, get another USB disk drive.

Towns is capable of transferring data at 38400bps if the program directly access serial I/O and busy-wait for TxRDY/RxRDY signals. No known Towns apps (known to me) did 38400bps transfer though. I wrote above two executables because I didn’t want to transfer big files at 19200bps.

In fact, free terminal programs often fail if you choose more than 9600bps. The terminal programs were for talking with a modem, which was around 2400bps in 1989. Towns OS was using a real-mode interrupt to talk with serial. From the protected mode, once Towns OS receives an RxRDY interrupt, it intercepted in the protected mode, switch back to real-mode, jump to the real-mode interrupt handler, switch to the protected mode, and went on. This protected-real switch made it impossible to handle fast serial communication, but nobody cared since there was no modem faster than 2400bps.

Nonetheless, Towns’s serial communication chip, intel 8251, is capable of transferring data at 38400bps. I have tested a bunch of 8251 chips when I was working on RS232C expansion card for FM-7, and all of them had absolutely no problem sending and receiving at 38400bps.

You need to send one file at a time. It is a good idea to use an archiver like LHA.EXE. I haven’t found UNZIP that works with Towns, but there might be somewhere.

You also need a terminal program on your modern-PC side. I use TeraTerm. Please read TeraTerm documentation for how to install and basic usage. You need to choose the right serial port and set it up as:

Transfer a file to Towns:

  1. Start TeraTerm
  2. Select File -> Transfer -> XMODEM -> Send
  3. Select a file to send.
  4. Start Towns, start Console Mode, then change directory to the directory where you installed XMRECV.EXP
  5. Type the following (Assuming D is the system drive):
    D:\RUN386 -nocrt XMRECV.EXP filename
  6. Wait.

At 38400bps XMODEM, 10MB file takes about 45 minutes.

Transfer a file from Towns:

  1. Start Towns, start Console Mode, then change directory to the directory where you installed XMSEND.EXP
  2. Type the following (Assuming D is the system drive):
    D:\RUN386 -nocrt XMSEND.EXP full-path-filename
  3. Start TeraTerm
  4. Select File -> Transfer -> XMODEM -> Receive
  5. Select File Name. Can be CheckSum or CRC. Don’t check 1K. Needs to be Binary.
  6. Wait.

Equally Environmentally-Friendly Way: Directly to SCSI2SD

The hard-disk image used in the emulator such as Tsugaru and UNZ can directly be written to the microSD card and put in SCSI2SD. Or you can go the other way, save file in actual Towns, and then take a binary-dump of the microSD card and then the image can be recognized by Tsugaru and UNZ.

You can do it by a free tool like Win32DiskImager.

If the file is really large, you can go with this method. I used this method to take a hard-disk dump from an old II MX and transfer to my laptop.

The process is straight forward, but what you need to be extremely careful is not to write to where you don’t want to. DO take back up before doing. Accident did happen in the past no matter how careful you are. There always is non-zero probability. It is so easy to press “Write” button when you are supposed to press “Read”. I learned it hard way, while I was using FM-7. Since it is possible to back up, do it.

To transfer a file to a virtual hard disk on Tsugaru, copy FTCLIENT.EXP to somewhere in your virtual hard disk. FTCLIENT.EXP is available from https://github.com/captainys/TOWNSEMU/tree/master/townsapp/exp If you think it is a chicken-and-egg problem, use a disk-image tool like EDITDISK.EXE to write it to a disk image, and then copy to your hard disk.

Then follow the steps below:

  1. Start Tsugaru in command-user-interface mode, then type a command:
    host2vm file-name-to-send
  2. If you need to transfer multiple files, repeat host2vm command for other files.
  3. Then start console mode in Towns OS, change directory to where you copied FTCLIENT.EXP, and then type:
    D:\RUN386 -nocrt FTCLIENT.EXP

Then the file is copied to the current working directory of the virtual machine. It disregards the directory given to host2vm command. It just writes all the files to the current working directory.

To transfer a file from Tsugaru, you can use the same program, FTCLIENT.EXP.

  1. Start Tsugaru in command-user-interface mode, then type a command:
    vm2host file-name-to-receive
  2. The file name needs to be the path in the Tsugaru’s environment. If you want to transfer multiple files, repeat vm2host command for other files.
  3. Then start console mode in Towns OS, change directory to where you cpied FTCLIENT.EXP, and then type:
    D:\RUN386 -nocrt FTCLIENT.EXP
Then the file will be copied to the current working directory on your host computer.

Least Environmentally-Friendly Way: Using CD-R

The drawback of this method is you spend one CD-R media when you transfer a file. And, it is only one direction: modern-PC to Towns.

Towns can read any ISO standard CD-ROM, which you can easily make with a conventional CD writer. However, your Towns’s internal CD drive may not be able to read it even if it can read a pressed CD. Main reason is CD-R’s reflection rate is much lower than pressed CDs. I have a suspicion that FM TOWNS II HR’s internal drive cannot read a CD-R from the beginning. My 2F had a luck to be able to read CD-Rs, but my II MXes have bad internal CDs and cannot read anything.

In such a situation, I have developed various ways to save it by using an external SCSI CD-ROM drive. Please look at these pages for more information. Or, you can go with SCSI CD Boot Loader IPL.

Once you connect an external SCSI CD-ROM drive, and let your Towns think the external drive as the internal drive, you are good to go.

This method may be useful if you cannot use a floppy disk to transfer XMSEND.EXP and XMRECV.EXP to Towns.

Comments are welcome.  Send E-Mail to: 

Back to http://www.ysflight.com