M20 Olivetti M20
Home page
Technical info
Repairing
Photos
Manuals
Press
PCOS
Transferring files
Download software
FAQ
Hack the M20
Links
About this site

Forum

Transferring files and discs from/to the M20

The disc format used by the Olivetti M20 is rather peculiar. The differencies between the PCOS format and the MS-DOS one makes rather cumbersome to share file and data between the two systems. Anyway, in the mid-80 and more recently, several authors have written software able to read and write PCOS disks from a MS-DOS machine with a 360kB drive. For technical reasons, 1.2MB drives do not work.

rdm20.com and wrm20.com

The first solution is proposed by Dwight K. Elvey, who wrote two programs, rdm20.com and wrm20.com, which read and write a disk image of a 160kB and 320kB PCOS disk on a MS-DOS based computer. 640kB disks cannot be copied with this program. The main problem is that the PCOS formats the track 0 probably as 128bit/sector using MF. This is a format which can not be used by standard controllers present in IBM compatibles. The other tracks are formatted as 256bit/sector with MFM and can be treated by PC drives. Dwight's programs simply skip the first track, which is used somewhat by the M20 to identify a PCOS formatted disk, but does not contain data. To write a disk image with wrm20.com, you should use a new disk, but formatted by M20.

Data in disk images can be modified using the Chris Groessler's m20floppy utility, which is able to understand the PCOS filesystem, list and modify the content of an image.

Carlo Merlano describes his experiences in using Dwight's utilities:
Unfortunately, to use WRM20, you must have a disk formatted in the PCOS format, even if it is not empty. Also, you have to use a PC floppy disk drive having a 360kB capacity. Moreover, these utilities do not work on all PC's: I had to try with a couple of Pentium's, a Pentium III, a 5x86 and an Olivetti M24 before obtaining good results. Probably, the M24 is well suited to do that, but my machine only had 256kB of RAM, not enough to perform this operation.

The PC used to transfer the disks The computer on which I could use the programs is an 8086 based assembly, with 640kB of RAM, a 8087 mathematical coprocessor (I believe it is unnecessary for this operation), a 720kB drive (A:), a 360kB drive, a MFM 20MB hard disk and MS-DOS version 3.3 plus. It is not a general rule, but often 360kB disk drives are black.

The PC used to transfer the disks On the PC monitor, it appears the confirmation that everything was OK! I first transferred on disk the 2.0 PCOS, as the version 4.0 I own requires at least a 128kB RAM memory expansion.

You can find the detailed description in Carlo's pages

PCOSFILE.BAS and FILE-DOS.BAS

(Many thanks to Luigi Serrantoni and Ettore Migliori)

A second solution was a program written by Ettore Migliori in GWBASIC, which ran on a M24 with a 360kB disc drive and a 20MB hard disc, and was prepared in order to read PCOS 1.1a floppies. You can download it here. Ettore wrote two tools:

PCOSFILE.BAS reads a disc with a PCOS filesystem and create a file named PCOS.DAT, containing the disc image. The sector access of the disc was made using some lines in assembly language. The default drive is A: and all the work was inspired by Peter Norton's books. With the M24, the conversion was done in 20-25 minutes.

FILE-DOS.BAS is instead dedicated to the extraction of files contained in the disc image PCOS.DAT. As PCOS and MS-DOS used different file naming conventions, the auxiliary file PCOS.DIR is created, containing the PCOS file listing and other informations. For space and speed reason, the program can extract up to 112 files, which was the limit of old versions of MS-DOS. Deleted files are extracted and their name begins with @.
This second pass is faster. On the M24, it was executed in 2 or 3 minutes.

The author has tried using this programs on newer machines. On a Pentium 200 PC, with a TX mainboard and with a 360kB floppy, he has confirmed the possibility to run these programs, using the Windows 95 DOS prompt and the GWBASIC 2.0. FILE-DOS.BAS is compatable with the QBASIC.EXE you can find in the installation CD of Windows 95. PCOSFILE.BAS does not work with QBASIC, as the assembler calling convention has changed from GWBASIC.

Transfer via RS232 and XMODEM

The Olivetti M20 has a RS232 interface mounted on the motherboard. RS232 is a standard used to set up a serial communication between a wide range of devices. A lot of modern PC include a RS232 interface, even if recently it becomes to be superseded in favor of USB. Anyway, cheap USB/RS232 adaptors are available for PC and Macintosh computer.
It is interesting to create a cable to use the interface to communicate with an another system. Expanded M20's could mount 2 additional RS232 interfaces, here we refer only to the first one.

The serial connector on the Olivetti M20 This is the pinout of the serial connector you can see on the back of the M20 (the leftmost connector on the lower row). This image is taken from the Olivetti M20 hardware description manual.

The DB9 serial connector This is the pinout of a DB9 connector you most likely can find on the back of your PC. This image has been found in the Internet thanks to google images :-)


It becomes easy to fabricate a null-modem cable:

M20 connector pin: Female DB9 pin:
1 (TXD) 2 (RXD)
2 (RXD) 3 (TXD)
3 (DTR) 6 (DSR)
4 (DSR) 4 (DTR)
5 (CTS) 7 (RTS)
6 (RTS) 8 (CTS)
9 (GND) 5 (GND)

The PC used to transfer the disks Once you fabricated a cable, you need a program to implement a protocol to transfer files between the Olivetti M20 and another system. I choose the XMODEM, which is a simple transmission protocol in which the files are transmitted in 128 bytes long packets, with a checksum and a simple software handshake system.

On the PC (or Macintosh) side, you have to find a program able to understand the XMODEM protocol. In my case, I used a laptop PC running Linux and Minicom, which is a menu driven terminal emulation program.
On the M20, I did not have a terminal emulation program, so I decided to write one of my own. Unfortunately, I was not able in BASIC to transfer correctly a bynary file (problems with the ASCII 0 character). Anyway, this method should work very well with BASIC files.
You first have to load and make resident the routines needed to use the serial port. To do this, type at the PCOS prompt:
rs
pl ci
You then must configure and open the serial port on the M20. I choose a 9600 baud, 8N1 protocol without XON/XOFF and hardware handshake and a buffer of 256 bytes. To select it, you should type on the PCOS prompt:
sc com:, 9600, none, 0,8,half,off,256
Remember to use the same port configuration on your PC running the XMODEM uploader. On an unexpanded M20, you should reconfigure the BASIC interpreter to use less memory to leave the space for the resident RS232 routines:
sb 3,30000,16,256
You can now start the Basic interpreter with:
ba
and open the communication port with the command:
call "ci"(0,"o",&E%)
You can now load or type on the M20 xreceive.bas, which implements the XMODEM downloader. You start the transmission on the uploader. After you run xreceive.bas, you are asked the name to be given to the file that will be downloaded. After that, the download will begin.
You find BASIC files to download in the corresponding section of the site.