|1 : System Overview|
This part of the book serves as an introduction to the various separate elements of the 512 hardware system. The software techniques employed to connect the hardware together into a working DOS Plus system are considered in detail in subsequent chapters.
The 512 second processor consists of a single, self-contained circuit board with only one means of communicating with the outside world, via the connecting pins at either end of the board. It follows that all support for these functions must fall upon the host processor. The 512's host is responsible for providing all peripheral connections and services, including the screen, discs, printer, keyboard and mouse.
While it is true that this arrangement has some disadvantages and limitations, it also provides a highly efficient system by dividing the workload between two separate processors, which can, to some extent, work independently and simultaneously. The extremely respectable performance of the 512, particularly in some benchmarks, is due in part to this two-processor configuration.
The 512's host processor may be a BBC model B, B+ or a Master 128. In all three cases (and it is the only possibility for the first two) the 512 may be fitted into an external housing such as an Acorn Universal Second Processor Unit or some other proprietary co-processor adapter. In this case the second processor housing must also include a power supply unit to cater for the 512's 5 volt needs.
When fitted in this way, the only physical and electrical connection between the 512 and its host is provided by the external tube. This is an Acorn proprietary fast data bus, rated at 2 Mhz (theoretically up to two million bits <should read bytes> per second) and 32 bits (four bytes) wide. The tube is provided specifically for second processor connection, though not only for the 512, as it has been used for at least four other commercially available boards. (The others are 6502, Z80 CP/M, 32016 scientific and Acorn RISC Machine development Systems).
Uniquely, in the Master 128, there is a second option of using the internal tube, when the 512 does not require any additional housing since it is fitted directly to the Master's mother board within its own case. In this type of installation the 512 also takes its power from the Master's power supply unit. Because there is no separate on-off switch by which to enable or disable the 512, software switching is employed, provided by the host's MOS. Selection between the external and internal tube is achieved by the Master's *CONFIGURE command, as is enabling or disabling the tube interface itself.
While there is no essential difference between the host's support of the second processor whichever connection is used, two particular points are worthy of note when the internal tube is employed.
First, the 80186 processor chip in the 512 becomes extremely hot after even a short time. This is completely normal, but after an hour or so it is likely to be too hot to touch. This does very significantly increase the ambient temperature within the Master's case, and any ICs that may be on the limits of their operating temperature tolerance have an increased probability of transient failure. It is vital that the ventilation slots in the case are not obstructed.
Cases are known of users who, after fitting a 512 internally, begin to experience problems after an hour or two of operation, even when the 512 is not in use. This is because the 512 consumes some electrical power whether it is selected by software or not.
There are two solutions to the problem. One is to have suspect ICs replaced, but identification can prove difficult and expensive. The other is to switch the connection of the 512 to the external tube. Similar problems are rarely experienced when a 6502 second processor is fitted internally, as these run very much cooler.
It is worth noting that the WD1772 floppy disc controller fitted to some Masters has proved to be more troublesome than other chips. If problems are experienced which seen to be related to the floppy disc system after fitting a 512 (especially internally) changing to the more reliable, though slightly slower, WD1770 may well provide a solution.
The second point about the internal tube is that fitting one type of second processor to it does not preclude the simultaneous attachment of yet another, connected via the external tube. It is possible to have both a 6502 and a 512 second processor permanently attached, switching between them as required, with the command *CONFIGURE EXTUBE/INTUBE.
The 512 with DOS Plus 2.1 runs virtually all application packages which are legally written to be compatible with MS-DOS version 2.1, PC-DOS 2.1 or CP/M86, which was the forerunner of DOS Plus. Arguably the most notable aspect of the 512 is that much of the software written for PCs, which have very different architecture, does run satisfactorily.
Inevitably some software will not function correctly or even at all in the 512. The Dabs Press Master 512 User Guide contains a good overview of the general problems and some of the steps you can take when trying out the compatibility of a new package.
Not surprisingly, some incompatibilities are more easily predicted than others. The prime requisite is that the package does not require more memory than the 512 can provide. This is typically about 358k bytes in an empty 512 running DOS Plus 2.1 and no other program, but it can be further reduced by background programs, the memory disc and other memory-resident utilities.
Some more recent packages are written to expect 640k, which is virtually the standard memory size for PCs these days. This problem is further compounded by the fact that DOS Plus takes about 90k more memory than MS-DOS for its memory resident portion. The result is that, even if software is suitable for a 512k MS-DOS machine, it's still entirely possible that it will not run in the 512 because of lack of memory.
Expanded memory 512s offer more directly addressable memory than any true PC so, however severe this problem is, it can be overcome. The PC Plus by Solidisk is no longer available (except second hand), therefore a 512k bytes expansion project is included in this volume to overcome this problem.
Memory constraints aside, if software claims compatibility with DOS 2.1, the majority of any remaining problems stem from the limitations imposed by the two processor hardware configuration of the 512 system, or to the capabilities of the 6502 host. Most of these problem areas can be identified and are virtually all concerned with screen handling, the keyboard or discs.
Screen support provided by the host 6502 is naturally limited to the facilities that are available when running in native BBC mode. Despite the fact that the 6845 CRTC (Cathode Ray Tube Controller) employed in the BBC Micro is the same chip as is used by many PCs, the display facilities available are not the same.
The major difference between the screen displays provided by the 512 and other DOS Systems is the restricted colour capability, especially when operating in 80 column text mode. In these modes the BBC Micro uses its native screen mode 3, which is a single colour mode. Although the 512 offers a CGA (Colour Graphics Adapter) compatible screen map to DOS applications, the true PC CGA screen of 80 columns in colour is ultimately restricted by the BBC mode 3 display.
Keyboard support by the 6502 host can offer very particular problems in DOS, especially if a Model B or B+ is used. The prime difficulty is that the keyboards employed by PCs simply have more keys than those of BBC Micros. More recent PCs also have more programmable function keys, fifteen or twenty now being common.
Some, though by no means all, recent applications software expects to take advantage of these extra keys and, unless such software is configurable for earlier PCs, it will be difficult, if not impossible, to run satisfactorily in the 512.
Some of the extra keys provided by PCs are included for highly specialised purposes, directly related to hardware, or more properly firmware functions of other parts of the machine. In the BBC Micro no such hardware to firmware dialogue is provided, all keyboard scanning being entirely under the control of the host's MOS. To illustrate, the nearest equivalent operation in the BBC Micro is the effect of the shift and control keys which, when pressed simultaneously will normally prevent the screen from scrolling regardless of the application used.
In addition, the method of translating keyboard hardware matrix scans to an internal key representation is entirely different in PCs. Even for those keys that are common to both the BBC Micro and PCs there are differences because the actual internal number produced by most key presses is different. For the 512 system all key-presses passed across the tube must first be translated by software to the required IBM code before being passed onto DOS applications.
It follows that an application expecting to detect an IBM key at source by reading the keyboard hardware matrix will fail, but so will any package which expects to respond to one of the extra IBM keys, even if the legal DOS keyboard facilities are used.
For example, in most PCs the left and right SHIFT keys generate two different internal key numbers. While entering text into a word processor there may seem to be no operational difference between these two keys, but at other times they can serve entirely different purposes. Both keys can be detected and distinguished separately in PCs either by scanning the keyboard hardware matrix (strictly speaking illegal, but it doesn't matter in a PC) or by reading the internal key number using legal DOS calls. Applications that use the first of these methods will always fail, while those that require the extra keys will fail to respond correctly (or at all) in the 512.
This type of low-level non-ASCII key detection is not possible with the BBC Micro because the keyboard matrix is much simpler and does not provide the fall range of PC keys, nor does it provide any hard-wired functions. Also the keyboard is on the wrong side of the tube for direct access by DOS or any application, therefore the keyboard is not directly addressable as it is in true PCs.
Model B or B+ Micros have additional problems in that they use an even more simple keyboard than the Master. Even for those PC keys which are emulated on the Master's numeric keypad when used in conjunction with SHIFT-LOCK, the results may not always be reliable because they depend on the method of access employed by the application as well as the key number expected.
The Western Digital 1770 or 1772 FDC (Floppy Disc Controller) employed by Acorn for ADFS is eminently suitable for use with DOS disc formats but there are one or two specific points to note.
DOS expects two disc drives for a practical usable system. It is possible to run DOS Plus with only a single drive, provided that all applications leave enough free RAM for an adequate memory disc. In practice this would be highly restrictive, therefore to all intents and purposes two physical drives should be regarded as the minimum.
For floppy disc drives both must be 80-track double sided. There is no longer such a thing as a single sided DOS disc drive, although the ancient and rarely seen 160k discs were single sided 40-track devices. Although IBM 360k formats use 40 tracks, it should be noted that, even if switchable drives are fitted to the host, they should always be set to 80-track operation as all format detection and track double stepping is catered for in the 512's software.
The third real disc that may be attached is a hard or Winchester disc. This runs as drive C:, and optionally it may or may not be the boot disc. Because of the non-standard (as far as DOS is concerned) interfacing of the Winchester to the host, control of drive C: is left to the ADFS ROM in the 6502. In the source for 6502.SYS it can clearly be seen that the Winchester control code has not been implemented.
Although CP/M (on which DOS Plus is based) is capable of supporting up to 13 physical disc drives, in the 512 implementation only two floppy drives (limited by the host), one hard disc and one memory disc are supported.
Apart from the hard disc and the memory disc, the formats of which are not variable from DOS's point of view, the MOS contains suitable code for support of several physical floppy disc formats as used by different versions of PC compatible micros. There are limitations to the effectiveness of this dynamic software configuring, forced by the host's hardware.
A common requirement is that of using discs to transport data between a PC and the 512. The 512 is more flexible than most PCs in the range of disc formats supported and will successfully read and write the majority of PC discs. One might hope the task would prove to be straightforward, but the operation is almost certain to encounter problems if the discs are formatted by the 512 rather than the PC in question. Even though the format may be nominally of the correct specification and the 512 verifies that the disc is error free, successful reading or writing of the disc by a PC is unlikely.
Although this appears at first to be a serious problem, it is quite simple. The size of the inter-sector gap written by the host's WD1770/2 when formatting is too small for the majority of PCs, which are unable to read such discs <But see here - YP>. The solution is equally simple. If discs used to transport files are formatted by the PC, both the 512 and the PC will be able to successfully read and write the disc.
This assumes that both a disc size and format is available which is common to both the PC and the 512. For both sizes of disc (5.25" and 3.5") this will be either 360K (also called single density) or 720K (double density) format. It also means that if files are transported between several machines you may need several discs, one for each, as not all PC disc formats are compatible with each other.
Under no circumstances will the 512 read or write either of the two high-density (HD) formats, which are now available on recent PC machines. These are 1.2Mb for 5.25" and 1.44Mb for 3.5" discs. This is not usually a problem, since such machines will also support both single and double density formats. However, it is possible that, even with their higher specification drives and faster controllers, these machines will still reject 512 single or double-density formatted discs.
The success of the technique of formatting discs on a target PC is not guaranteed for all machines. Some PCs appear to support standard disc formats, but will themselves produce discs that the 512 will neither read nor write, or more dangerously, will not read or write reliably.
The second possibility usually arises because the PC has a slightly non-standard catalogue or it stores the file allocation table in a different internal format. The disc may verify and can even respond to a DIR command correctly with no error reported. It may only be later, when you find that the information read from a file bears no relationship to the file's true contents that the problem becomes apparent. Always check by writing a couple of known files from each machine and reading them successfully on the other before you commit to this method of data transfer on an unknown machine.
Equally, some machines which appear to support a recognised standard disc format, produce discs which cannot be read at all by the 512. (There are certain 360K and 720K PC formats which a real IBM PC will not read either.) The only definite statement that can be made on the subject of disc formats is that not all PC compatibles are compatible and trial and error is the only true test.
If data transfer is required between the 512 and a PC but cannot be achieved directly via a common disc format, two remaining possibilities exist. A third PC might produce a format which can he read and written by both of the other two. This strange situation arises because some PCs cannot be instructed to format IBM standard discs, but will correctly self-configure to read or write them, like the 512, when the discs are already formatted.
If no other solution can be found, an alternative method of data transfer that might prove acceptable is via the serial port, either directly connecting the 512 to the PC or at a distance by means of a modem. (See RS232 below).
Fortunately printers hold few problems, either for DOS or the 512. The vast majority of recent printers provide either an optional IBM mode (usually IBM Proprinter X24 emulation) or they provide adequate IBM block graphics character set support. The standard DOS Plus background print utility operates quite satisfactorily in the 512, with the small condition that you disable the printer's automatic line feed if you wish to avoid double spacing.
Whether you do this by means of the printer's DIP switches or the host's printer ignore character is a matter of personal preference, though regular users of the 512 will find it more convenient to disable the line feed in the printer's hardware, than issue (or configure)
in the BBC host in native mode, or *CONFIGURE IGNORE 0 on a Master. This avoids the need for use the relatively tedious and slow STAR command when the 512 is active.
The standard printer connection for DOS Systems is a Centronics (or parallel) interface. In DOS Plus the logical print device is PRN, while in MS-DOS or PC-DOS it is usually LPT1. This may give rise to problems with some software in the 512, for example, GW-BASIC.
Within applications, owing to the proliferation of PC compatibles, a printer configuration section is included in the installation process of most packages. Generally such packages write to the printer legally, as it is a slow speed device, and leave the logical to physical device assignment to the operating system. However, in a limited number of cases it may be necessary to change the printer device assignment within the application. If so this should be set to PRN (or LPT1 if PRN is not accepted). The package should then print correctly.
A useful tip with GW-BASIC in which the LPRINT command will not work on a 512, is instead to 'open' the printer with the command
OPEN "PRN" FOR OUTPUT AS #1
at the start of the program, and then to use PRINT #1,a$ instead of LPRINT a$ when you need to print to the printer. If your program uses files, then the channel number may have to be changed from 1 to another free channel number.
The more capable packages also will include a list of different printers from which your model, or a 100% control code compatible alternative can be selected, ensuring correct control codes will be sent for each of the various typeface effects and enhancements. More recent packages will also cater for a range of laser printers too.
Serial connection of printers is not directly supported, either by DOS or by applications software. As is normally required when in native mode, the speed should be set correctly, either by using STAR or the MODE command. Also printer output should be directed to the serial port either by means of STAR again, or by logical to physical device assignment using DOS's DEVICE command.
If printing from an application proves impossible with a serial printer, you may find the package provides a print to file or a save ASCII data option. If no such option is provided, it may be possible to use DOS's re-direction facilities to achieve effectively the same result. In either case the resulting file can be printed afterwards, by means of the standard DOS Plus PRINT command. This last 'trick' can also solve problems with some packages that refuse to communicate with 'PRN' or 'LPT1'. If this proves unacceptably inconvenient or impossible, the only alternative is to change the printer's interface to parallel.
Like the printer's Centronics interface, the RS232 serial port is a standard communications connection, which has been adopted by micros, rather than the reverse. There are few problems concerned with the 512's serial port except in the area of proprietary PC software.
Support for the RS232 port is notably weak in MS-DOS and PC-DOS, and access is very slow via the legal calls. In consequence, most communications software authors find it necessary to write their own hardware driver code. Because of this, virtually all DOS communications software uses illegal direct hardware addressing to provide more sophisticated facilities and to permit the use of the higher speeds. Since the 512's serial port is located on the far side of the tube it is impossible to use such techniques in the 512 as they are guaranteed to fail. There is no possible fix for this problem, so do not invest in DOS communications software, except as mentioned below, or which you have seen working in a 512.
Margolis & Co are the only company to have produced a communications package that operates legally and satisfactorily in the 512. A brief description and report of the package is included later in the book, together with the address for inquiries.
The well known public domain file transfer system, KERMIT, originally produced at Columbia University in the USA and available in the UK from Lancaster University, also works satisfactorily in the 512 if PC version 2.32 is used. KERMIT is produced for a vast array of machines, from home micros like the BBC up to and including all types of mainframe.
Proprietary communications software apart, there are no problems with the 512's serial port except those which also apply when the host is used in native mode.
The only points of relevance are that the physical connection in the BBC Micro uses a non-standard DIN type plug and the lead must either be made up from components or purchased from an Acorn dealer. Standard RS232 leads from other sources are of no use, as they will usually have a 25 way connector fitted at both ends.
The Acorn implementation does not conform to the full RS232C communications standard either, being a cut down version. In practice this is little problem. For connection to a modem it is usually possible to achieve success by using only three of the five available connections wired null modem, data-in to data-out, data-out to data-in and ground to ground.
If handshaking is not required, as for example with the 512 and a PC directly connected back-to-back so that each machine's operator can know what the other is doing, the three-wire connection can also usually be used successfully to transmit files in either direction. Some machines will insist on a more sophisticated connection, when both the RTS and CTS will be needed too, and possibly one or both of these may also need to be connected to the DTE and DTR pins of the other machine. In this area PCs often differ, and some persistence with experimentation may be required before success is achieved. <See, for example, here>
Of all the facilities that might have been omitted from the 512, a suitable mouse driver is the one, which causes the most complaint. This is especially unfortunate since production of a mouse driver would have been much easier for the original supplier, but given the size of the 512 market and the decisions taken when customising the XIOS, it is commercially much less attractive after the event.
Although mouse driver software is included on the issue discs for the 512's GEM collection, it is neither a separate mouse driver, nor would it be suitable for use with anything but GEM if it were. The Acorn GEM mouse driver is a one-off program produced purely for GEM in the 512. In fact there are two programs, depending on whether you're using colour or black and white.
Because there is no mouse port in the 6502 host, the user port was pressed into service. This introduces two problems for conventional DOS mouse software. First, there is no physical mouse port to address (it's the far side of the tube again) and if there were it would not have the normal characteristics. This means that no standard DOS mouse driver, whether generic or supplied with an application, will work successfully in the 512.
Because of this, a further step was taken. In the interests of reducing the memory resident portion of DOS plus, since it would not be used, all the mouse pointer code was omitted at source, along with the mouse interrupt processing code.
The result is that implementing a mouse driver for the 512 involves writing the code to read the mouse's movements from the XIOS, decoding them and passing them on to an application via an interrupt which must also be implemented by the program.
This not inconsiderable task has been completed by Tull Computer Services, whose address is given later in the book. <Alternatively, see here>