Previous | Index | Next

Master 512 Forum by Robin Burton
Beebug Vol. 11 No. 10 April 1993

Well well, here I am again after all.

Last month we looked at displays up to CGA. This month we'll cover CGA to the present. This won't help you to persuade programs to run on the 512, but you will see why some can't. Also, if you're contemplating a machine upgrade it's an introduction to current PC graphics, which can then be compared with alternatives.

EGA AND BEYOND

CGA was the first PC colour display, but as hardware advanced, so did the demands made on graphics hardware by applications. Soon CGA wasn't enough.

EGA (the Enhanced Graphics Adaptor) came next after CGA. The modes and resolutions supported include all those in last month's table plus the following.

Mode     Resolution
13   320 x 200 16 colour graphics
14   640 x 200 16 colour graphics
15   640 x 350 monochrome graphics
16  

640 x 350 4 or 16 colour graphics

EGA DISPLAY MODES

Clearly EGA was quite a leap forward in colours and resolution. At 320x200 the number of colours jumped from four in CGA to sixteen, while 640x200 offered sixteen colours as opposed to CGA's two at that resolution.

Note that, although the maximum horizontal resolution is still 640 pixels (which the BBC can match) vertical resolution increased by 75%, even in colour. It hardly needs saying that 640x350 pixels is way beyond the BBC micro (and the 512). Even without colour 640x350 requires 28K, so if a program demands EGA, forget it as far as the 512 is concerned: everything from now on is for information only.

One point you might notice is that there was no additional DOS text support with the introduction of EGA. Since CGA text surely offers all one could reasonably want in the way of coloured text, it was not surprising that nothing was added. CGA is still the standard for DOS text today, regardless of display type. Note, however that I said 'for DOS'. It's not necessarily so for all PCs.

With the arrival of EGA, extra display RAM could be used for text. Using a specially installed driver, text could be displayed in 25, 43 or 50 lines by 80 or 132 characters, even though these aren't standard in DOS itself.

Interestingly, EGA was also the first standard under which there was some choice over how much RAM to use for the display. The minimum used (in mode sixteen) gave four colours at 640x350 pixels, but simply by adding RAM to your existing card this could be increased to sixteen at relatively low cost.

Calculating display RAM is simple. Four colours require two bits (values 0 to 3) for each pixel, so 640x350 requires 640x350x2 bits for a full screen, or 56K. Sixteen colours require twice the number of bits (values 0 to 15) so 112K are needed.

Notice that this amount of display RAM represents almost twice the total RAM the 6502 processor can address. It's easy to see why no-one ever offered graphics enhancement hardware for the 8-bit BBC – it can't be done. The only way is to completely redesign the machine, then call it something else, such as "Archimedes"!

DOS AND BEYOND

Of course EGA wasn't the end either. Along came VGA (Video Graphics Array) offering higher resolution and more colours again. The range was now from 640x400 in sixteen colours (128K needed) to 640x480 in up to 256 colours (512K). VGA is the minimum you can now buy, but it too has been long surpassed, as we shall see.

VGA was notable as the first display to employ what is now the norm for graphics support in PCs. Bear in mind that, although MS-DOS is up to version 5 and DR-DOS is on version 6 (with 7 soon to be released) MS-DOS 3.3 is still very much current and most PC vendors offer the choice of 3.3 or 5. As you can see from the table, DOS doesn't support VGA, so how's it done?

PC graphics hardware developed faster than DOS, a normal state of affairs when, unlike Acorn, Macintosh, Amiga and others, the hardware manufacturers don't provide the operating system. If you design and supply everything yourself you have to make sure it all matches (more or less). If you don't, as is the case with PCs, it's not your problem.

Display modes already provided by DOS must be maintained for millions of old machine users, otherwise.they can't upgrade. Given the huge numbers of users with old display hardware, any other idea is financially out of the question, so existing DOS screen modes are supported by all new versions of DOS. My old XT, for example, runs MDA, CGA and EGA quite happily in DR-DOS 5.

A different approach is needed, one that doesn't rely on, or affect, DOS. The answer, inspired by the PC's original design, was to remove graphics support from DOS. VGA installable graphics drivers began to appear.

Once a method of dealing with a problem has been devised there's often a knock-on effect. just as EGA was the first display to offer support for text in DOS's built-in modes, VGA was the first to offer support for graphics. This approach is now standard for all current display types, though the original screen modes are still supported by DOS.

CURRENT TRENDS

Over the past couple of years SVGA (Super VGA) and XVGA (eXtended VGA) have become the norm for PC displays. Notice I didn't say 'standard'. Neither of these terms is well enough defined for everyone to agree precisely where the boundaries lie. Suffice it to say, the name doesn't matter, since both exceed VGA resolution by a considerable margin.

Minimum VGA colour graphics stabilised at 600 x 480 pixels in 16 colours, but SVGA or XVGA is what you'll normally get with a new machine these days. If you request a monochrome display it will be monochrome VGA. SVGA offers 800x600 and (some say) 1024x768 resolution, while XVGA offers 1280x1024. Naturally, most SVGA and XVGA boards support lower resolutions too.

It's not easy to specify a standard number of colours for SVGA and XVGA either, since that depends on the amount of RAM fitted and the board type. At their highest resolutions the cheaper (£40.00 or so) SVGA boards only manage 16 colours, but 256 is more usual. SVGA resolution is the minimum if you intend to do much work in Windows or DTP, while XVGA is required for serious CAD. Naturally, as the resolution of PC graphics increased, so did that of screen hardware, using finer phosphor dots and operating at higher refresh rates. However, be aware that when you get past 800x600 pixels, regardless of colour, a 14-inch monitor really isn't up to the job. This is because, however good a screen's definition or quality, the physical area of a 14-inch screen just isn't enough for the huge amount of data which can be displayed at high graphics resolutions. Large high resolution screens are pretty expensive, but prices are falling as competition increases. SVGA plus a 15 inch screen is a popular choice for home use (constrained by cost) but 17 inch is the minimum for XVGA at 1280x1024.

The number of display colours varies in proportion to the amount of graphics RAM and inversely with resolution. 256 colours at 800 by 600 is the minimum for any self-respecting SVGA card, but the following table shows the options more fully. The first figure is the actual amount of RAM required, while the figure in brackets is the physical amount you'll need on a board to provide it.

Resolution      Colours      Ram needed
640x480   16   153,600  (256K)
640x480   256   307,200 (512K)
800x600   16   240,000 (256K)
800x600   256   480,000 (512K)
1024x768   16   393,216 (512K)
1024x768   256   786,432 (1Mb)
1280x1024   16   655,360 (1Mb)
1280x1024   256   1,310,720 (2Mb)
Display resolution/colours versus RAM

These are the commonest resolutions, but if you really want to push the boat out you can go to 1600x1200 colour graphics too, though screen cost becomes a major consideration at that level. You definitely need a 20 or 21 inch screen and a suitable model will cost (and weigh) more than the average 486 PC.

WHAT NEXT?

Higher resolution with more colours demands more graphics RAM, but another factor becomes significant. Supporting full XVGA in colour can require formidable processing power. Work it out! At 1280x1024 there are over 1.3 million pixels to maintain, while at 1600x1200 the number is almost 2 million (and you've still got to deal with colours).

At 1600x1200 in 256 colours a complete screen re-draw means moving 2Mb of data – after you've processed it all. Clearly this takes time, enough in fact for even today's fastest 486 processors (now 66MHz) to begin to show the strain, with undesirable effects on overall performance. Until very recently the only options were to accept poor performance, or to upgrade to a PC with a faster processor.

Looking ahead a little, it's clearly not possible to continue to push displays much further without a rethink. The quantity of RAM needed and (perhaps more importantly) the power to drive it varies with the product of a display's X,Y resolution. For example a display of 2148x1600 would be almost 3.5 million pixels, which would need 4Mb of RAM in 256 colours.

Display RAM is already independent of the computer's main RAM, while software support is already independent of DOS. The next step is fairly obvious – direct graphics processor support.

The latest (affordable) development in display adaptors are 'graphics accelerator' cards and 'local-bus' main boards. These cards have a dedicated graphics processor (usually an S3) and a high speed, custom colour chip called a RAMDAC, plus typically 2 or 3Mb of RAM. (Let's ignore TIGA boards, they start at over £1000.00!) Local-bus means the main processor has a fast, direct 32bit data path to the graphics controller, by-passing the slow AT-bus.

Graphics accelerators are rapidly becoming popular, though of course they cost more than normal graphics boards. Typically £300.00 buys a card that, with a suitable screen (hold your breath!) can handle a resolution of 1280x1024 displaying 32,000 colours from a palette of 16.7 million. Some cards support lower resolutions too, if drivers are provided, but at say 640x480 pixels they offer more colours than there are pixels to display them, so some don't!

Accelerator cards relieve the main processor of much of the graphics load, operating quite differently from conventional display methods. The principle is more similar to the page description languages used by laser printers than to a normal display. The main processor tells the graphics card what to draw and where to draw it, but not how to. The graphics processor knows all about geometric shapes, bezier curves, lines, vectors, coordinates and so on, while the RAMDAC supplies the colour. A simplified example of how this works goes as follows.

The main processor tells the graphics processor to display (say) a filled circle of a certain size in a particular shade of a certain colour, centred on screen coordinates of X and Y This data amounts to only a few dozen bytes. Having told the graphics processor what to do, the main processor can immediately get on with something else while the circle is being drawn by the accelerator card.

DISPLAY DRIVERS

Ever since VGA appeared, graphics and text drivers have taken over display support from DOS. Drivers are installed in the system and loaded as and when when required, bypassing the BIOS often even in text modes. Drivers must be supplied with each graphics card.

Without display drivers most high resolution display cards can produce only CGA text in DOS. In fact some of the more specialised cards can't even do that on their own and a few don't even support DOS text at all. This is one reason, as mentioned last month, for dual screen systems. DOS runs on one (cheap) display, while high definition graphics are displayed exclusively on the other (very much more expensive) one.

Display drivers aren't only specific to a graphics card – they must also match the application or the application's environment. A range of drivers is supplied with graphics cards to cater for a range of the most popular tasks. Most mass-market SVGA and XVGA cards do provide support for standard DOS modes, but nowadays even simple cards employ a different driver for each different graphics resolution.

Drivers for entirely graphical environments such as Windows and OS/2, or for major DOS graphics applications like AutoCAD, are supplied with the majority of display cards. For less popular applications drivers must often be acquired separately. It's usual in such cases for the application itself to provide a range of drivers for the more popular graphics cards.

However (and this might be amusing for 512 users), if you have a specialised graphics card AND you want to use an obscure graphics application, you may well find the two incompatible if no-one has yet written a suitable driver.

THE END? NOT YET!

I hope, after this flight through modern PC graphics you can see why questions about DOS 5 and Windows are frustrating. The subject is complex, and it should be obvious even from our brief look at the subject that such questions are mostly pointless. Not only is there a yawning (and ever-increasing) gulf between the 512's hardware and current PC hardware, the software employed in VGA, SVGA and XVGA display cards is beyond the 80186 processor anyway. It wouldn't work even if the 512 processor was used in a real PC, when we wouldn't be restricted by the venerable old Beeb at the other end of the Tube. It wouldn't even be any help if you could run DOS 3.3 or 5 on the 512, since DOS doesn't handle these new displays.

There is a cheerful note for 512 users though. There are still millions of XTs and even a good many 80286 ATs that can't support more than a megabyte of main RAM. XTs can't run Windows (recommended minimum 4Mb) or OS/2 (8Mb) at all, since they use an earlier processor than the 80186, and they can't run displays more recent than EGA either. 286 machines can run Windows, but they are so slow that they are virtually unusable.

Why is this good news? Well, no-one writes programs for EGA or VGA these days. They either write programs for standard DOS screen modes, or for the latest display standards. Many do both.

This means, leaving aside SVGA and XVGA (and whatever happens next), that the 512 is still reasonably compatible with the majority of PCs in use today, and software is still being written for these machines. Old machines don't make headlines, but there are far too many of them for even the likes of Microsoft to ignore. A recent market projection showed that the number of DOS users is expected to continue to rise for the rest of the decade and that in five years DOS users will still outnumber Windows users four to one.

Speaking of recent technology, you may find this interesting. You probably know that the 80186 was never used as a PC processor, but did you know that it has lately found a new role? It's the processor in at least one type of hard disc caching controller, used to speed up average disc access and data throughput rates. There's life in the old chip yet!

Previous | Index | Next

About the Master 512 | Bibliography