For the best displaying of these tables, set tab stops to every 4 characters.

Modes 0 and 3 copy straight to video memory. Just two colours, 80 columns.
The other video modes screen memory requires re-ordering before it is sent to
the VGA card.

        A description of the physical properties of the video modes.
mode 8          mode 2          mode 5          mode 1          mode 4/6

10 chars        20 chars        20 chars        40 chars        40 chars
16 colours      16 colours      4 colours       4 colours       2 colours
40 bytes wide   80 bytes wide   40 bytes wide   80 bytes wide   40 bytes wide

                BBC Screen memory as stored in its 'RAM'
Source Byte     Source Byte     Source Byte     Source Byte     Source Byte
76543210        76543210        76543210        76543210        76543210
ABABABAB        ABABABAB        ABCDABCD        ABCDABCD        ABCDEFGH

                 Reordered Dest Byte(s) as sent to VGA card
76543210        76543210        76543210        76543210        76543210
AAAAAAAA        AAAABBBB        AAAABBBB        AABBCCDD        AABBCCDD
BBBBBBBB                        CCCCDDDD                        EEFFGGHH



Tweaked 640x264 16 colours VGA mode 10H (640x350). This allows 2 pages in
screen memory. It is a 4 plane graphics mode.

Screen memory allocation
------------------------
80*264=21120 (0x5280) thus:

A0000 page 1 \ for double buffering of video screens
A5280 page 2 /

AA500-AFFFF available for the lookup tables.

Typical lookup table appearance:

struct PaletteType
{
  const char * PaletteAddress;
  int Age;
  char CurrentPalette[16];
} PalTable[10]=
{
  { (char *) 0xaa500, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaa600, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaa700, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaa800, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaa900, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaaa00, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaab00, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaac00, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaad00, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
  { (char *) 0xaae00, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }
};

256 byte range addresses for the look up tables (PaletteAddress above)
Note that the lookup uses all 4 planes so there are 256*4=1024 bytes for
each table.

Address,Modes used for

AA500   0/3 - 10
AA600
AA700
AA800
AA900
AAA00
AAB00
AAC00
AAD00
AAE00

AAF00   1 - 10
AB000
AB100
AB200
AB300
AB400
AB500
AB600
AB700
AB800

AB900   2 - 10
ABA00
ABB00
ABC00
ABD00
ABE00
ABF00
AC000
AC100
AC200

AC300   4/6 - 10 pairs - 20
AC400
AC500
AC600
AC700
AC800
AC900
ACA00
ACB00
ACC00
ACD00
ACE00
ACF00
AD000
AD100
AD200
AD300
AD400
AD500
AD600

AD700   5 - 20
AD800
AD900
ADA00
ADB00
ADC00
ADD00
ADE00
ADF00
AE000
AE100
AE200
AE300
AE400
AE500
AE600
AE700
AE800
AE900
AEA00

AEB00   8 - 20
AEC00
AED00
AEE00
AEF00
AF000
AF100
AF200
AF300
AF400
AF500
AF600
AF700
AF800
AF900
AFA00
AFB00
AFC00
AFD00
AFE00

AFF00 - SPARE! - Use for LED's = 32 chars at 8 pixels high
012345678901234567890123456789012
MOTOR-ON CAPS-LOCK SHIFT-LOCK *
- not got around to this yet.
