Yellow Pig's BBC Computer Pages

The BBC Master 512

Extra Info Index | GEM Config | FIDDLOAD | Key Correspondence
Control Sequences | Disk Formats | Screen | Interrupts | XIOS | The Tube

About the 512 | Outline | Bibliography | Problems | Software | Photos | Index

Configuring GEM

The main program on Disk 4 of the Master 512's supplied set of disks is a GEM application called "GEM Setup". If you run this then you find that it is meant be a program to help you configure GEM to your own system and specifications. This is not adequately described in the Master 512 User Guide, and there is little mention of it in any of the other published documentation about the machine.

Perhaps the main reason for this is that GEM Setup has a bug in it and it doesn't work properly. To be quite fair, it does work sometimes; but usually it doesn't, and you cannot tell at the time whether it has worked or not. You are told that your set-up has been saved on the GEM start-up disk, but when you try to re-start GEM from that disk then either there is an error message or else the machine hangs completely.

However, it is not difficult to by-pass the GEM Setup program and achieve the same results manually. You just need to know something about how the various parts of the GEM system inter-relate, and then you can easily put things together for yourself. Also, this gives you a bit more scope than the GEM Setup program would (if it worked).

In what follows I shall assume that you have two floppy disk drives. If you are running GEM from a hard disk, then it should not be too difficult to make the necessary adjustments.

When GEM starts up, the way it configures itself is controlled by files in the directory GEMSYS. If you look at the contents of this directory on your original GEM disk (or rather the working copy) you will find it contains quite a lot of files.

Three of the files in this directory have nothing at all to do with setting up the system. These are: OUTPUT.APP, the main Output application program; OUTPUT.RSC, the resource file for Output (which contains the text of all the messages and the details of all the dialogue boxes used by OUTPUT.APP); and FORMAT.COM, the DOS disk formatter which can be called from GEM. (There may also be a file called DEFAULT.OPT, which will be the default settings saved from Output using the "Make default" command.) From here on I shall ignore these files.

The remaining files in the GEMSYS directory control the way that the system is configured. Most of them are either device drivers (such as a printer driver) or else files of character fonts. These latter all have the extension .FNT.

There are also two special files which govern the use of the others. The main one is called GEMVDI.EXE. This is known as the GEM "Virtual Device Interface". It acts as a kind of software interface between the main body of GEM (which is stored in the file GEM.EXE in the GEMBOOT directory) and all the peripheral devices which may vary from one system to another. It links together all the various necessary device drivers and directs input and output through them to and from GEM. The GEMVDI.EXE file is a complex program and should not be touched!

The file you can do something about is called ASSIGN.SYS. This is actually a text file, so you can edit it with any text-editor or word-processor. (GEM Write is quite adequate for this, but make sure that you turn "Document Mode" off in the "Format" option of the "Page" menu).

ASSIGN.SYS is really no more than a list of device drivers and subsidiary files (such as fonts). At start-up the VDI looks at this file to find the names and kinds of the device drivers it is to use. So to set up GEM in your own way, all you need to do is:

         Edit ASSIGN.SYS so that it mentions all the files you want included in your setup,
    Make sure all the files refered to in ASSIGN.SYS are present in the GEMSYS directory.

You can examine your original version of ASSIGN.SYS to see what format the file has to be in. It is made up of lines of text, and the lines are of two kinds. On the one hand, there are the main device driver lines. Each of these takes the following form:

         A two-digit number, of which the second digit is always a "1". This indicates what device the driver controls.
    The file name of the driver (without the file type, which is always assumed to be .SYS).
    An optional comment preceded by a semi-colon. This is ignored by the GEM VDI, but it is displayed by the GEM Setup program, and you might as well include it to help you keep track.

Then there are subsidiary lines which are in a slightly different form, namely:

         A couple of spaces. These are really optional, but the indenting does help in letting you see what's what.
    The file name of the subsidiary file. This time the file type is included, and the ones you have to play with are all font files with the extension .FNT.
    Again an optional comment preceded by a semi-colon.

The numbers at the start of the device driver lines have the following meanings:

      01     Screen driver. In GEM this is usually called a "Graphics card" because of the way it is possible to plug various cards into the IBM PC to give it greater or lesser graphics capability.
  11    Plotter driver.
  21    Printer driver.
  31    "Metafile" creator.
  41    Camera driver.
  51    Tablet driver.
  61    Miscellaneous other driver.

Of these, you might as well ignore the Camera, Tablet and Miscellaneous. There are no camera, tablet or other drivers provided with the Master 512 version of GEM, no-one has ever supplied any, and you can't use any of these gadgets without one.

The subsidiary lines each relate to the device line which precedes them. Thus the screen driver is followed by a list of screen fonts, the printer driver by a list of printer fonts, etc. On some systems (ie other PC-compatibles) there may also be information about which ports are to be used for the mouse, printer, etc, but you can ignore these on the 512 because there are no alternatives.

Using all this you can easily edit your ASSIGN.SYS file to include all the files that you want to use, and to save memory or disk space you can leave out the ones you are not interested in. Make sure the significant files are all present in the GEMSYS directory, if necessary copying them from the other disks. Then re-start GEM to see the effect.

Possible Options

So what can you do with all of this? Here are some of the things that you can include or leave out.

Screen Drivers

You must include a screen driver, and there are three to choose from. There is the standard monochrome driver called ACORNBW.SYS, which is in the GEMSYS directory on Disk 2. Secondly there is slightly updated version, also called ACORNBW.SYS, on Disk 4, though there is a small problem with this that needs putting right before you can use it. Thirdly there is a 4-colour driver called ACORNCOL.SYS on Disk 4. All of these drivers include a mouse driver, so you do not need to mention the mouse in ASSIGN.SYS.

An Alternative Monochrome Screen Driver

The original version of ACORNBW.SYS, which is already in place on Disk 2, will run GEM on a white background. The newer version on Disk 4 will run GEM with white windows on a grey background. I think this looks better but, of course, that is a matter of taste. The new one, though, has a couple of other advantages when you get it working properly. The appearance of the calculator is much improved, and also the clock is better. With this version the clock shows the date. In the older version you cannot see the date – technically it is there, and it can be altered, but as it is shown as white figures on a white background it is not very visible! Also, when you click on the little clock-face icon it changes to a little bell to indicate that you are looking at the alarm time. (Click on the little note icon to make the alarm active – it will beep when the alarm time is reached.)

But why "when you get it working properly"? Unfortunately, as it is supplied there is a slight fault in this version of the screen driver, and if you do not correct it then neither the clock nor the calculator will work at all. What you need to do is to tack on an extra 20kb of bytes to the end of the driver file. This is awkward from DOS but it is not too difficult if you swap to BBC native mode. Follow this procedure (which you will only have to do once):

         Use MOVE (or PUTFILE) to copy the ACORNBW.SYS file to an ADFS or DFS disk. (Remember that you will need to have both MOVE.EXE and ACORNBW.SYS accessible from DOS as well as having the BBC format disk in one drive. If you are using only floppy disks this usually involves copying one file onto the same disk as the other, or else putting one of them in a memory disk.)
    Switch off the tube and enter BASIC.

With the file in the current directory, enter:

FOR N%=1 TO &5000:BPUT#X%,0:NEXT

(The FOR loop in line 3 of this will take a minute or two to complete. If you are working on a genuine Master you can replace lines 2 and 3 with:


and this will be quite a bit quicker.)

    Switch the tube back on and re-boot DOS.
    Use MOVE again (or GETFILE) to copy the new file back into DOS format.

After going through all this the new version of ACORNBW.SYS will work correctly.

Colour Screen Driver

The 4-colour screen driver is called ACORNCOL.SYS, and it can be found on Disk 4. It can give some quite pretty effects with GEM Paint, but text tends to be rather difficult to read because of the poor screen resolution.

If you decide to use this driver, then you can change the colours with the COLOUR.EXE program from the boot disk. Use


with x equal to 4, 5, 6 or 7 and y the physical (BBC) colour number.

There are a couple of things to watch with the 4-colour driver. One is that memory space is a bit tight. There are sometimes things you can do to get round this, though, if it is a serious problem (see below).

The second thing is that you need to remember that two GEM pixels are represented as one screen pixel (because that is the best that BBC Mode 1 can do). This can be deceptive. What appears to GEM as a pattern of alternate pixels will appear on the screen as a solid block of colour. (You can see what the pixels "really" are by looking at an area with the Microscope tool.) Further, the way that the two GEM pixels are combined into one visible BBC pixel is really rather odd. Each row of 8 GEM pixels (4 BBC pixels) is stored internally in two bytes. If within this set of 8 there is at least one GEM pixel of colour 0, then the pairs of pixels within the set are "ORed" together to produce the visible screen pixels. On the other hand, if there is no GEM pixel of colour 0 within the row of 8, then the pairs are "ANDed" together. This means that occasionally changing one GEM pixel can alter the appearance of 4 BBC pixels.

Screen Fonts

There are six screen font files in the original GEM Setup, the files being in the GEMSYS directory. These are called IBMLSS##.FNT and IBMLTR##.FNT, where ## is 10, 14 and 18. You can see them in action in the Text mode of GEM Paint. (GEM Write does not use the screen font files at all.) The GEM Paint Typeface menu lists the screen fonts that are installed. The system fonts are there as part of the screen driver, and you do not need any font files to have these. Of the others, the IBMLSS series give you the Swiss fonts, and the IBMLTR files the Dutch ones. (In case you hadn't worked it out, "SS" actually stands for "Sans Serif" and "TR" for "Times Roman".) Each file provides two font sizes: the one in the file name and twice that. Thus IBMLSS14.FNT provides the Swiss 14 and 28 point fonts. These larger ones are produced just by doubling up from the smaller ones and, to be honest, they are rather ugly.

Note that there are newer (and slightly improved) versions of the standard font files on Disk 4. You might as well replace the originals with these on your working disk.

There are a couple of much more attractive 36-point font files on Disk 4. If you use these you will get far better 36-point text than the doubling up of the 18-point gives you, and quite acceptable 72-point characters as well.

For variety, you can use any of the other fonts on Disks 3 and 4 as screen fonts and then use them in GEM Paint. These are designed as printer fonts but work perfectly well on the screen. They do not appear the same size as the official screen fonts of the same point value, but provided that you remember what you are doing, that is no problem. Some of them will give very big letters and can be quite useful for eye-catching displays.

If you want to have more than one font file of a given point size from any of the two font types (Swiss or Dutch) then you have to do a little bit more work. If you try to include both the original 10-point Swiss screen font and one of the "printer-type" 10-point Swiss fonts, for example, then the system will only recognize one of them. You can get round this quite easily, though, by a little bit more editing. This time you need to change the first few bytes of the font files themselves, and the EDBIN utility is quite adequate for doing this. In each font file the first two bytes are the font series ID number, the next two are the font point size, and then comes the font name. All the font files in a series must have the same ID number and font name, but these must be different from those in any other series.

So, for example, if you wanted to include all the "EPSLSS" series of fonts (Epson Swiss – see below) and also the original "IBMLSS" series, then you might do it by changing all the "EPSLSS" files so that the first byte of each of them was 4 (the original is 2) and you might change the name to "EpsonSwiss". (The font name can be up to 15 characters long.) You must, of course, make sure that all the file names are included in the ASSIGN.SYS file and that all the files exist in the GEMSYS directory.

Plotter Drivers

There is only one plotter driver supplied on the Master 512 disks. It is called IBMHP746.SYS and is on Disk 4. It will control a number of the Hewlett-Packard plotters. There are no plotter fonts supplied. A plotter is not a good output device for the results of GEM Paint or GEM Write, but might be very good for displaying output from GEM Draw or GEM Graph.

Printer Drivers

You must include a printer driver in your set-up if you want to print anything from GEM. The one in the supplied set-up (called EPSMONL6.SYS) will cause graphics to be printed out on an Epson-compatible printer in lo-res mode. If your printer will support hi-res graphics, then you could replace this driver with EPSMONH6.SYS from Disk 4. This will not affect text output but will make the graphics much more intense without changing the size. Printing will be slower but the results more effective if you want them to be eye-catching.

For non-Epson-compatible printers there are a number of other printer drivers supplied on Disk 4. These are:

      EPSCOLH6.SYS    for Epson JX80 colour printer
  APLASRH6.SYS for Apple LaserWriter
  HPLASRL6.SYS for HP LaserJet I
  HPLASRH6.SYS for HP LaserJet Plus
  DIBCOLH6.SYS for Diablo C150 colour ink-jet
  DIBL6306.SYS for Diablo 630 daisy-wheel

Do note that these printer driver programs are much more complex than the printer drivers used by programs like VIEW. (They are closer to those used for Windows.) If your printer will not work with any of these drivers, then it is more reasonable to get a printer that does than to try and write a driver for the one you have!

Printer Fonts

You do not need any printer fonts if you are only using the supplied programs GEM Write and GEM Paint. However, if you have other GEM applications, then they may be necessary. There are sets of printer fonts (most of them on Disk 3, a few on Disk 4) to go with each of the supplied printer drivers (except the Diablo daisy-wheel).

The file names make it quite clear which are which. As with the screen fonts, the files ....SS##.FNT are the Swiss ("Sans Serif") series and ....TR##.FNT the Dutch ("Times Roman") ones, and the ## is the point size.

As I have mentioned already, whether or not you actually need printer fonts, you can have fun using them on the screen.


A GEM Metafile provides a sort of internal interface between various GEM applications. It allows the production of a .GEM file so that the results of one application can be used in others.

You do not need Metafiles if you are only using the supplied GEM applications. GEM Write does not produce .GEM files, and GEM Paint produces them automatically without the need of an extra driver. However, for certain other applications, in particular GEM Draw, you must have one included. The driver allowing them to be created is called METAFIL6.SYS.

Memory Considerations

If you want to include a lot of font files, particularly to use them along with the 4-colour screen driver, then you can find memory space becoming a problem. Some of the big fonts are very memory hungry. If you just add the two 36-point screen font files to the normal 2-colour screen driver, for example, then you will find that GEM Paint will not allow more than one full-size open window.

Naturally you can maximize memory by leaving out any screen fonts you do not want to use. However it does not help to leave out the printer driver (or genuine printer fonts) since these are only loaded into memory when OUTPUT needs them.

If you do not mind losing the desktop accessories, then you can get a bit more memory by deleting these. The calculator, clock and print spooler are all in the file CALCLOCK.ACC and the snapshot file is called SNAPSHOT.ACC (both in the GEMBOOT directory). Deleting them both will give you about 40kb extra memory. You have to re-start GEM before this memory becomes available.

On a machine that has had its co-processor RAM extended to 1 Megabyte these problems are less likely to arise. However, even on such a machine you need to do a little more work for GEM to be able to use the extra memory. This time it is the GEM.BAT file in the root directory that needs to be modified. This is again a text file, which can be edited with a word-processor. You will see that the first line of this file is:


You need to alter the number in this line. There has to be a bit of compromise here, because there is a sort of inconsistency between the way that different GEM applications use the allocated memory. GEM Paint stores its screens within the specified memory allocation, so the larger the ADDMEM number the better. On the other hand, GEM Write stores its working document in the memory outside the given allocation, so it will not work properly if the ADDMEM number is made too big. I have found that changing the line to:


gives about the best overall result on a 1Mb machine.

Extra Info Index | GEM Config | FIDDLOAD | Key Correspondence
Control Sequences | Disk Formats | Screen | Interrupts | XIOS | The Tube

About the 512 | Outline | Bibliography | Problems | Software | Photos | Index