How to read and write disk images for the M20 system
The disc format used by the Olivetti M20 is rather peculiar. The differences 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.You have a few possible solutions:
RDM20 and WRM20by Dwight K. Elvey
This first solution based on three programs contained in this packet . They are able to read and write a disk image of a 320kB PCOS disk and to format a M20 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 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.
Many bugs and enhancements have been fix and changed. This file is for release 6/20/06. If you've had troubles in the past on your machine with these programs, you may find that it now works correctly on your machine.
Carlo Merlano describes his experiences in using Dwight's utilities:
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.
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 @.
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 compatible 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.
Dave Dunfield's ImageDiskImageDisk is a general purpose disk image utility written by Dave Dunfeld. It is possible to use it with M20 disks, but one needs to be careful about the 0 track, since MF is not supported by all controllers. Anyway, you can find all relevant information about the use of this utility on Dave's pages.
TelediskTeledisk is a program which reads a floppy diskette into an image file on the PC, and can recreate a nearly exact copy of the floppy at a later date from that image file. It can be used for M20 disks, but it is a closed source commercial software which is no longer sold by its former vendors. There are some useful informations in Dave Dunfeld's pages.
Disk images under Linux: dd and sddby Christian Groessler
In order to read and write real M20 floppies, a dd like tool which supports skipping (not by reading and discarding, but by seeking) the input and output files is needed. I use sdd by Jörg Schilling, you can find it on this ftp site.
On NetBSD, you'll need the patch in PR15199 to access non-standard floppies.
Reading and writing diskette images
After installing fdutils and sdd, you can get an image of an existing M20 floppy by issuing the commands# set floppy parameters (here we're using the 2nd drive)
# do this after inserting the disk into the drive
setfdprm /dev/fd1 OLI320
# read diskette image
sdd iseek=4096 oseek=4096 if=/dev/fd1 of=m20disk.img bs=256 count=1104
Please note that we're skipping the first 4096 bytes of the floppy. These are the blocks of Track 0/Head 0. Track 0/Head 0 is formatted in FM mode, which isn't readable by many PC floppy controllers.
This is no problem when reading existing M20 floppies as there seems nothing important to be stored in this area. I was able to read all files of a full disk without reading this area.
It _is_ a problem when creating new disks on the PC as the M20 doesn't accept disks where this area is formatted differently. So you cannot create new M20 disks on the PC. What is possible is to format the disk on the M20 and then write a new image to it on the PC.
The command to write a new/modified M20 image to floppy disk is something like this:
# set floppy parameters (here we're using the 2nd drive)
In the time between reading the image and writing the image back you can modify the image's contents with the supplied "m20" command :-)
Olivetti is a registered trademark of Telecom Italia. This site is not related to Olivetti nor to Telecom Italia. The material presented is meant for personal use only and is shared in a "fair use" spirit. If you own the copyright of some of the stuff presented here and you think it should be removed, please contact the webmaster.