Previous | Index | Next

Master 512 Forum by Robin Burton
Beebug Vol. 7 No. 10 April 1989

This month we'll look at discs, a topic raised frequently by your letters.


One area which seems to cause difficulty is that of formatting discs which are to be read by other machines.

Quite a few 512 users take PC work home, and this involves transporting software from one machine to anther, and moving data in both directions via a disc format common to both systems. I do this myself, writing source programs on the 512 to be transported to a mainframe for compilation and testing, via one of a number of directly connected micros. Usually, I reverse the process at the end of the day to take the files home again for further development.

It sounds straightforward, but of course things are rarely so simple, as some of you have discovered, even though the 512 is more flexible in this area than virtually any machine I know. Most PCs can only manage a couple of formats, while cheaper machines, or those a few years old are usually limited to 360K only.

You can see some of the 512's range of disc formats on the menu of 'DISK.CMD', which you have no doubt used many times. In fact, the displayed list isn't complete, as I found by sifting through the XIOS source. Other formats include a surprising array of machines: Tandon, Philips, Zenith and others, some pretty obscure.

The range is quite impressive, and at first it appears that there is little problem. Unfortunately, in practice, discs formatted by the 512 more often than not cannot be read by PCs or clones, even though the size is correct. This applies to all 512 formats, and its cause is quite simple.


The problem is the speed of the disc hardware in our humble Acorn micros, which operates faster than that of many PCs. Disc speed is controlled by two factors, the floppy disc controller and the type of drive used.

Consider the drives first, as they are often the ultimate limiting factor. Obviously your drives were supplied as separate items, since the BBC has none as standard. This probably means that you selected the drives, buying what you considered to be the best that you could find. No matter what you paid, your drives must be at least of a reasonable standard, or they couldn't handle the 512's 800K format.

In a PC or a clone the drives are already fitted, and clearly there is not much choice when the drives come with the machine. No prizes for guessing whether cost or performance comes first in the priorities of a manufacturer trying to build to a target price in a very competitive market.

This is one reason why many PCs (especially cheaper ones) have 360K drives. The 512 demonstrates that 800K 5.25" discs are possible while still allowing compatibility with other sizes too. This might sound cynical, but obviously there is no need for higher speed (higher cost!) drives if, as with 360K format, the data density doesn't call for it. The idea is, stick to low density formats and you needn't use the best hardware to achieve adequate reliability.

It follows that if the drives cannot manage high recording densities then the controller needn't operate quickly either. This leads to the root of the problem. The inter-sector gap written by the 512 when formatting is the difficulty; it's too small for the average PC to handle.

If you examined 512 formatted discs and compared them with real PC formats, you would find that the inter-sector gap is the only difference. I've checked discs from about half a dozen different PCs and found that the 512s are usually the smallest. <But note here – YP>

You can compare formats with a disc toolkit like the Advanced Disc Investigator. This can handle almost any track and sector size on a 5.25" disc, but to investigate inter-sector gaps you will have to write your own 6502 machine code routines.

The result of smaller inter-sector gaps is that after reading a sector, the average PC spends so long digesting the data that it misses the start of the next logical sector. The next actual sector found is therefore incorrect and the machine gives up, if you are lucky with a message like 'Bad sector ID', 'Sector not found' or something similar.

If you upgraded to a Master from a model B you may have had similar problems, in that your existing drives wouldn't work with the controller built into the Master, although they were quick enough for the 8271. The solution was faster drives, which isn't a practical option for a PC, especially if it's not yours. It is expensive, and in many cases it wouldn't solve the problem because of the controller.

You probably know that some of the variables for disc control can be altered in the BBC, by the keyboard links in a model B or '*CONFIGURE FDRIVE' in a Master. If you look into the floppy disc control you'll find various factors which affect speed. One, for example, is 'head settle time'. This defines the delay the drive needs before it can read or write data, after starting up or after the heads have moved to another track.

Adjusting these settings overcomes some problems between different BBC micros, but it does not solve the PC problem.


What is the solution? Fortunately it's simple. A disc formatted on the 512 cannot be read by most IBM compatibles, but if the disc is formatted on the PC, both machines will happily read or write to it. This of course assumes that there is a format which suits both machines; for 5.25" discs it is usually 360K or 720K.

To transfer files between your 512 and a PC, make sure that all formatting is done by the PC and not the 512. This will ensure that the discs are readable on both systems.

I have experienced this problem with several different types of PC, and this always solves the problem, if a solution exists at all. The note of caution is because sometimes there is no answer. For example, some Future PCs support a 360K format, but the 512 cannot read them, and neither can most PCs for that matter.

One other point may save someone from wasting time. Don't bother trying to read Macintosh discs. They are not PCs anyway, but that's not the problem. They use rotational speed control, which varies with the track number. Data is read or written at a constant rate, but on the outer (i.e. greater circumference) tracks of a disc more sectors are used, because the disc is made to rotate slowly. Closer to the centre, owing to the smaller physical track size, rotational speed increases and fewer sectors are used. Very few other micros do this, and discs formatted in this way can only in general be read on a computer of the same type.


One or two of you are also thinking of buying a winchester, to get more from your 512, but are unsure of how they are set up for use with DOS+.

This is a two stage process, requiring the winchester to be first formatted in ADFS mode. The format program is obviously different to that used for floppy drives, and it is usually provided along with the winchester.

During or after the formatting (which can take some time on the larger sizes), you will see messages indicating the number of errors found. There is no need to panic, a few are quite normal, given the large number of sectors and the high data density. These will be ignored when the disc is used, but if there are dozens you should insist on a replacement drive. After the formatting is complete, your winchester is ready for use as a large capacity ADFS disc.

To use the winchester in DOS+ you must then carry out stage two. This is done by booting DOS normally, then using 'HDISK', which is included on DOS+ disc 1, to create a DOS partition. This is recognised by DOS+ as drive C, and is referred to as such when you access it. If you've previously been using the winchester in ADFS mode, as with all disc operations remember the rules: before you start, ensure that you have adequate, up-to-date backups of all your files.

The size of the partition to be set up is selected during the initialisation process. This creates a locked ADFS file called DRIVE_C, of the size requested. You can also make the hard disc bootable by copying the system files to it during this process, although this is optional.

The partition size will depend on the size of your winchester and the amount of space you want in DOS, but ensure that there is enough free space (in ADFS) to allow for the DOS partition, or the initialisation will fail. The remainder of the disc, after the partition is set up, is available for use in ADFS when operating in normal BBC mode.

The DOS partition is allocated as an ADFS file, and it's a good idea to force the DOS partition to the 'end' of the disc. This is done by first *COMPACTing the existing files then *CREATEing a suitably sized dummy file in ADFS mode, to reserve the rest of the required ADFS space as a single block.

After DRIVE_C is set up, delete the dummy file, and ADFS will then be restricted to the first part of the drive, while DOS will use the second part. This results in better performance, as ADFS files won't 'jump over' the DOS partition when they extend, and unnecessary head movement is avoided. On a more unpleasant note, it also means less trouble if you ever need to recover data from the winchester the hard way, by editing sectors.

You can, of course, still boot DOS from floppies, but if you boot from the winchester there are two obvious differences. The first is that it's much quicker, and the second is that the initial screen is in white, not green as it is with floppies.

If you later decide that the partition size needs changing, you can alter it by repeating the installation process, but if you do this take note that you MUST secure all your DOS files. The vital point is that re-allocating the partition loses the previous contents, much like formatting. A new, empty root directory will always be created, because the partition may well start in a different physical place on the disc.

After creating the DOS partition all you'll have to do is copy the DOS utilities to it, and any other files you'll need. The copying operation is precisely the same as it is for floppies.

It is normal to create a directory called 'DOS' in which all the DOS utilities are put, keeping them separate from your other files. You should then set 'path' to point to this directory by the command:

path C:\dos

This command should be included in your 'AUTOEXEC.BAT' file, in the root directory of drive C. This ensures it is always issued when booting the system from the hard disc.


If you find that none of the partition sizes in the standard hard disc set-up suits you, you can '*CREATE DRIVE_C' yourself in ADFS mode, to any size you like. Naturally the comments on backups apply equally if you use this approach.

After creating 'DRIVE_C' don't forget to lock it, because that's all that prevents ADFS from being able to delete it. Next, boot DOS+ from floppies and proceed as before, setting up directories and copying files as necessary.

Finally, did you know that there is a much quicker way to format 800K discs than using the laborious 'DISK' command. On the Gem Applications disc (No.2), you'll find a directory 'GEMSYS' and in it a file called 'FORMAT.COM'. Copy this to your DOS utility disc. Then, to format an 800K disc just type 'FORMAT'.

There is no menu, but you can append a drive identifier to indicate the drive to be used. Assuming A: as the current drive, with the program on the disc in A:, to format drive B: the command would be:

format b:

If you omit the drive identifier formatting takes place on the current drive. This is quite safe, as the program always prompts for a new disc in the appropriate drive, then waits for a keypress before proceeding.

It's more convenient than 'DISK' and as it doesn't verify it is much quicker too - but beware! If you tell it to format an already formatted disc, it does NOT stop to request confirmation.

Previous | Index | Next

About the Master 512