  This archive contains reconstructed source for the four known drivers for
the Acorn BBC Master 512 - two colour and two mono.

  The drivers included are as follows:

DOSPLUS ver. |  Disk | Orig. name   |  Date       | Size  | Buggy? | Built as
-------------+-------+--------------+-------------+-------+--------+-----------
1.2          |     2 | ACORNBW .SYS | 28 Aug 1986 | 35328 | No     | SDBBM2.CGA
1.2          |     4 | ACORNBW .SYS | 28 Aug 1986 | 35328 | No     | SDBBM2.CGA
1.2          |     4 | ACORNCOL.SYS | 28 Aug 1986 | 76288 | No     | SDBBC2.CGA
2.1          |     2 | ACORNBW .SYS | 11 Apr 1986 | 55805 | Yes    | SDBBM1.CGA
2.1          |     4 | ACORNBW .SYS | 25 May 1986 | 55805 | Yes    | SDBBM1.CGA
2.1          |     4 | ACORNCOL.SYS | 25 May 1986 | 76288 | No     | SDBBC1.CGA
-------------+-------+--------------+-------------+-------+--------+-----------

Copying
~~~~~~~
  The drivers I disassembled contained only Digital Research copyright
messages. I am assuming that they were covered by the release of GEM under the
GNU GPL <http://www.simpits.org/pipermail/gem-dev/2007-March/001405.html>
and have accordingly made extensive use of the existing GEM/3 GPL source tree.

Notes
~~~~~
*  The driver listing at 
   <http://www.cowsarenotpurple.co.uk/bbccomputer/master512/gemconfig.html> 
   says:

   > 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 [...]

    but this hasn't been the case with the two sets of Master 512 disk images 
   that I've seen. Both my 1.2 and 2.1 disks have the same driver on Disk 2 as
   on Disk 4 (though in one case, the date is different; see the list above).

*  The version numbering I've used is not an accident - the drivers from the 
   DOSPLUS 2.1 disks are dated prior to the ones from the DOSPLUS 1.2 disks.
   Differences between the versions are:

   - The copyright messages in the earlier drivers (supplied with 2.1) read
    "GSX-86 V2.0 C version 05/11/84". The later ones read
    "GEMVDI Acorn DOS series" (with no date). If the 1984 date is accurate 
    (whether as 5th November or 11th May) it makes these drivers the earliest
    known pieces of GEM code.

   - The v_exit_cur() function, which switches to graphics mode, uses a 
    different code path in the later version of the driver.

   - The colour mapping table in the earlier black-and-white driver incorrectly
    maps the colours 0-15 to 0,1,2,3,0,1,2,3... . There are two bugs here. 
    Firstly it's assuming there are four colours whereas there are actually 
    two (so only the low bit is significant); secondly, colours after the last
    one should map to black. So the correct table (used in the later b&w 
    driver) is 0,1,1,1,1...

   - The earlier black-and-white driver does not use the DOS Plus framebuffer
    at B800:0. Instead, it uses a buffer within the driver. The later version
    detects if it's running under DOS Plus or Concurrent DOS; under DOS Plus
    it uses the framebuffer at B800:0, and under Concurrent DOS it allocates
    a framebuffer using the MC_ALLOC function. This is why the later driver
    is 20k smaller than the earlier one.

   - The earlier colour driver clears both graphics planes in one go. For 
    some reason the later one clears them individually.

   - A bug fix: When updating the rectangle surrounding the mouse pointer, the 
    earlier drivers do not always manage to clip the rectangle to the size of
    the screen. The later ones do.

*  Although these drivers were released with GEM 2.0, their internal structure
   is closest to the '??????P2.SYS' drivers supplied with GEM 1.1. The mention
   of 'GSX 2.0' likewise suggests the early days of GEM. 

*  The early date, the similarities to GEM/1 and the use of an internal 
   framebuffer all suggest that the drivers were originally written for 
   Concurrent DOS on the unreleased ABC 300/310 computers, and then fairly
   minimal changes were made to convert them to the Master 512.

*  The colour driver is, internally, a 4-colour 640x256 driver. The conversion
   to 320x256 is not done by the driver; it is done by the Tube client code
   in DOS Plus. This suggests that either the ABC 300/310, or some future 
   machine in the ABC line, was intended to support a full 640x256 4-colour 
   video mode.

