[ main | what's new | search | software | emulators | archive | documentation | links ]

File Transfer and Conversion

by Mark de Weger. (Note: external links don't work - yet!)

If you wish to transfer the BBC programs found on these pages to your BBC, or if you wish to transfer files from your BBC disks to your PC in order to run them using an emulator, you have only two problems:

  • Transferring the files between your PC and your BBC;
  • Converting the format of the BBC files on the PC to the format supported by the emulator you use.
  • This page helps you deal with both problems.


    Transferring files between a BBC and a PC

    In order to transfer files between your BBC and your PC you basically have four options:
  • Read and write BBC and PC disks on a computer that natively supports both disk formats;
  • Use a special program on your PC that can read and write BBC disks;
  • Use a special program on your BBC that can read and write PC disks;
  • Transfer files between BBC and PC via a serial cable.
  • Read and write BBC and PC disks on a computer that supports both disk formats

    Some computers have the ability to read and write both BBC disks and PC disks natively (software built-in in the OS), or with some some simple additional software. Computers I know of that have this ability are the BBC Master with a PC board, the Acorn Archimedes with a PC board, and the RiscPC.

    I can provide little information on how to transfer files, as I don't have any of these computers. However, if you have such a computer, you probably already know how to read/write BBC and PC disks, and if you don't, the information is of little use to you.

    PC programs that can read and write BBC disks

    The following programs can read and/or write BBC disks:

  • BeebDos
  • FDC
  • Anadisk
  • All of these programs are subject to the following limitations:

  • There are very few PCs that can actually read and write single density disks (e.g. standard Acorn DFS disks), due to the fact hardly any PC's floppy drive controller supports single density.
  • The number of PCs that can read double density disks using these programs is also small. (Probably again due to their floppy drive controllers.)
  • Therefore: try the programs, but if they don't work for you, please don't mail me. (I tried the programs on at least 10 different PCs and they didn't work a single time.)

    BeebDos is a program to read double density BBC disks on a PC. It was once sold commercially. I have, however, no idea of its current status. Some instructuctions are included in the BeebDos package

    FDC is another program to read double density BBC disks on a PC. It was written by Wouter Scholten. It is an improved version of FDCDemo, a program for reading and writing uncommon disk formats. Instructions are included in the FDC package.

    Anadisk is a program similar to FDC. I suggest you use FDC, as there are less commands to type in, but you may try any of them. General instructions are included in the Anadisk package. In order to read (double density) BBC disks using Anadisk, you have to enter the following commands:

  • If the BBC floppy is in a 1.2M (5 1/4 inch) drive:
    1. DDINHD, CYL 80 (if this doesn't work, try it without the DDINHD command)
    2. if the floppy is double density, DD, SECTORS 18
    3. if the floppy is 40 tracks, DOUBLESTEP
    4. if the floppy drive is drive A:, FD0
  • If the BBC floppy is in a 720K (5 1/4 inch) drive:
    1. CYL 80
    2. if the floppy is double density, DD, SECTORS 18
    3. if the floppy is 40 tracks, DOUBLESTEP
    4. if the floppy drive is drive A:, FD0
  • If the BBC floppy is in a 1.44M (3 1/2 inch) drive
    1. CYL 80 (on first try do NOT use the DDINHD command)
    2. if the floppy is double density, DD, SECTORS 18
    3. if the floppy drive is drive A:, FD0
  • BBC programs that can read and write PC disks

    There is a program, DOSFs, that can read and write PC disks on a BBC. It is subject to the following limitations:

  • It can only read/write 360K formatted floppies;
  • Your BBC needs to have a 1770 or 1772 disk controller and sideways RAM. Your BBC disk drive needs to be able to read disks formatted at 40 tracks.
  • Some instructions are included in the DOSFs package

    Transfer files between a BBC and a PC via a serial cable

    By connecting a BBC and a PC with a serial cable, you can transfer files from the BBC to the PC and vice versa. You can use programs like Kermit or Commstar to transfer the files. If you do so, one problem is that the BBC's file attributes do not get transferred.

    BBCXFer is a program that was specially written for BBC <-> PC file transfer that does transfer the BBC's file attributes. (It makes use of Wouter Scholten's standard format for storing BBC files on other computers.) In addition it contains a terminal emulator that allows you to control your BBC from your PC. Instructions for use are included in the BBCXFer package. The package also contains instructions for making a serial cable and a lengthy explanation of the standard format.

    (Note: The above BBCXFer is by Mark de Weger. There's also a BBCXFer by Tom Seddon, which is a little less advanced. Mark was so stupid to chose the same name for his program as Tom did.)


    Converting BBC file formats on a PC

    After transferring your BBC files to a PC, they are in either of the following formats:

  • Wouter Scholten's standard format for storing BBC files on other computers (if you used BBCXFer);
  • An image of a BBC disk (if you used one of the disk utilities). The following disk image formats can be distinguished:
  • Single sided, single density
  • Single sided, double density
  • Double sided, single density
  • Double sided, double density
  • The three current BBC emulators for the PC also use different formats:

  • Model-B uses a proprietory disk image format (different from any of the above);
  • BeebEm uses the above disk image format (single sided, single density or double sided, single density);
  • XBeeb uses a format similar to (but not exactly the same as) Wouter Scholten's standard format.
  • This section deals with conversion between the different formats. We use Wouter Scholten's standard format as the basis; it is explained how each format can be translated to and from this standard format (though some other conversions are explained as well).

    The following conversion issues are dealt with:

  • Manipulation of disk images
  • Conversion of disk images to and from the standard format
  • Conversion to and from XBeeb format
  • Conversion to and from Model-B format
  • Using disk images with BeebEm
  • Manipulation of disk images

    The utility BBCIm can be used to manipulate disk images. Instructions are included in the package, but the main disk manipulation commands are:

  • BBCIm -inters <diskimage1> <diskimage2> <diskimage3>: makes an interleaved (double-sided) disk image (<diskimage3>) out of two single-sided disk images (<diskimage1> and <diskimage2>);
  • BBCIm -splits <diskimage>: makes two single-sided disk images out of one double-sided disk image (<diskimage>);
  • BBCIm -ddos2dfs <diskimage>: splits a single-sided double-density DDOS disk image (<diskimage>) into multiple single-sided single-density disk images.
  • Note: you first need to convert your disk images to single-sided single-density images in order for most BBCIm commands to work.

    Other BBCIm commands related to manipulation of disk images:

  • BBCIm -new <diskimage>: makes new (empty) disk image;
  • BBCIm -40 <diskimage>, BBCIm -80 <diskimage>, and BBCIm -max <diskimage>: expand disk image to resp. 40 tracks disks, 80 tracks disks and 256K;
  • BBCIm -min <diskimage>: compresses disk image (similar to *COMPACT and then cutting off disk image after last used sector);
  • BBCIm -c <diskimage>: shows a catalogue of disk image;
  • BBCIm -d <diskimage> <file>: deletes file <file> from disk image (wildcards not allowed in <file> <file> is case sensitive).
  • Conversion of disk images to and from the standard format

    BBCIm also has commands to convert (single-sided, single-density) disk images to and from files in the standard format.

    First the conversion from standard format to disk image format:

  • BBCIm -a <diskimage> <filelist>: add the files in standard format whose names are in <filelist> to the disk image. If you use DOS or Windows, wildcards cannot be used in <filelist>. If you use Linux, you can also use wildcards. If you use the option -ar instead of -a, the files that are added to the disk image are deleted. (The command automatically skips the .INF files.)
  • Then the conversion from disk image format to standard format:

  • BBCIm -ebi <diskimage>: extracts all files from the disk image and stores them in standard format in the current directory. In addition it produces a catalogue file <diskimage>.CAT, which you can remove.
  • BBCIm has a number of other options for extraction of files. (These are not needed if you are just interested in conversion to the standard format.)
    The basic command for extraction of files from a disk image is BBCIm -e <diskimage>. This extracts files from the diskimage; a file gets the name <diskimage>.<dir>.<file>, where <file> is the file name of the file and <dir> the directory the file is in (e.g. diskimage.$.ELITE). It also produces the catalogue file.
    Other options can be obtained by adding the following characters to the -e option (e.g. -ed#):

  • d or b:
    d: makes files to be extracted in the directory <diskimage> instead of prepending the name of the disk image to the files (e.g. diskimage/$.ELITE for the above example),
    b: makes files to be extracted in the current directory (e.g. $.ELITE for the above example);
  • #: does not prepend the directory name $ to a file name and prepends all other directory names to the file names without a dot (e.g. ELITE for the above example, or RELITE for a file R.ELITE). If a name clash occurs, you get the option of renaming or overwriting an already existing file. (The option # is handy for use with DOS, as e.g. R.ELITE is not a valid DOS file name.)
  • i: produces the .INF files required for the standard format;
  • r: removes the disk image after extracting files.
  • Conversion to and from XBeeb format

    The format used by XBeeb is very similar to the standard format: instead of using .INF file for each BBC file to store the file's attributes, it uses a single catalogue file to store the attributes of all files in a directory (an XBeeb "disk"). Such a catalogue is already produced by BBCIm if you use it with the option -e.

    Therefore you can convert a disk image to XBeeb format using the command:

  • BBCIm -eb <diskimage>. You only have to manually rename the catalogue file <diskimage>.CAT that BBCIm produces to the file name required by XBeeb for its catalogue file.
  • The conversion of XBeeb format to standard format requires the splitting of the XBeeb catalogue file into multiple .INF files. This is done using the command:

  • BBCIm -s <cataloguefile>.
    The option -s can be replaced by -s#, which (similar to -e#) removes the directory name $ from a file name and replaces all other file names <dir>.<filename> by <dir><filename>.
  • The conversion of standard format to XBeeb format requires the concatenation of the multiple .INF files into a single catalogue file (and some minor modifications to this file). This is done using the command:

  • BBCIm -x <filelist>, where <filelist> is the list of files whose attributes should be put in the XBeeb catalogue file. (Wildcards not allowed in <filelist> with DOS/Windows.)
  • Conversion to and from Model-B format

    Tom Seddon's BBC emulator Model-B uses a proprietary disk image format (different from the above mentioned disk image formats), which is called DFFS. No utilities currently exist for conversion from the DFFS format to other formats. However, Tom wrote a number of utilities to convert files and disks to the DFFS format. These are, with instructions, included in the Model-B package. The utilities:

  • WSConv to convert files in the standard format to DFFS format. WSConv <dffsdisk> adds all files in the current directory in standard format to the DFFS disk image <dffsdisk>. (If the DFFS disk image does not exist yet, it is created.)
  • DConv to convert normal single-density disk images to DFFS disk images. DConv <dfsdisk> <dffsdisk> <side> converts the DFS disk image <dfsdisk> to the DFFS disk image <dffsdisk>. <side> should be:
  • S for a single-sided disk image;
  • D0 for side 1 of a double-sided disk image;
  • D1 for side 2 of a double-sided disk image.
  • DDOSConv to convert normal double-density Opus DDOS disk images into several DFFS disk images. DDOSConv <ddosdisk> convert the 80-track double-sided double-density DDOS disk image <ddosdisk> into several DFFS images. The DFFS disk images have the same base name as the DDOS disk image, with the extension <side><volume>, where <side> is the side number and <volume> the volume number on the DDOS disk image.
  • MkImg to create a new, empty, DFFS image. MkImg <dffsdisk> creates the new DFFS disk image <dffsdisk>.
  • Using disk images with BeebEm

    The emulator BeebEm uses normal single-density DFS disk images. As standard it uses the single-sided 80-track disk image "beebfile/elite" as the mounted disk. You can change this, however, by setting the environment variable BeebDiscLoad. This should have the syntax <sides>:<tracks>:<diskimage>, where:

  • <sides> is S for single-sided disk images and D for double-sided disk images;
  • <tracks> is 40 for 40-track disk images and 80 for 80-track disk images;
  • <diskimage> is the name of the disk image.
  • In order to simplify the job of setting the value of BeebDiscLoad, you can write batch files like the one below:

    @echo off
    SET BeebDiscLoad=S:80:%1
    BeebWin
    

    If you call the batch file SSD.BAT, the command SSD <diskimage> will start BeebEm with the 80-track single-sided disk image <diskimage> mounted. You could make additional batch files for double-sided disk images or 40-track images.

    Extracting from Watford disk images

    Included in the bbcim archive si the C code for a small utility called w62. Given the file name (say "watford.ssd") of a single-sided Watford disk image as its parameter, it produces a file called "watford.ssd%" which looks like a DFS image with the extra 31 files of the Wtaford image. By using bbcim to extract the two images, the net result is an extraction of all the 62-files from the Watford image.

    Robert Schmidt - rsc@nvg.org.