Product specifications

Byte Bits Bits 8
Number 7 6 5 4 3 2 1 0 PIXELS
****
1 COLOUR A COLOUR B 8 *AB*
2 COLOUR C COLOUR D PIXELS *CD*
****
^(Illus 4 – ABCD diagrammed from above)
The location of the two bytes within the eight byte segment of the pattern generator
table pointed to by the character label value held in any one of the display screen
character positions is dependent on the screen position in which the character label is
held. This is also elaborated to some extent by the diagram below.
For names in the top row of the display screen (ie values 0 to 31), the first two colour
bytes of the pattern generator cell are accessed. For the second row of the display
screen (ie values 32 to 63), the second two colour bytes of the pattern generator cell
are accessed. The next row of the screen uses the fifth and sixth bytes and the next
row uses the seventh and eighth . This series repeats for the remainder of the screen.
Pattern Generator Screen Pattern Generator
Cells Rows Bytes
0 to 31 0 0 and 1
32 to 63 1 2 and 3
64 to 95 2 4 and 5
96 to 127 3 6 and 7
128 to 159 4 0 and 1
160 to 193 5 2 and 3
(X) to (X+31) (X DIV 32) (X DIV 16 MOD 8
and (X DIV 16 + 1) MOD 8
NB: X = start location of each of the display screen rows relative to the top left hand
of the screen.
Points to look out for
2.8
One of the major points to look out for when manipulating the VDP chip through any of
the four different modes is a direct result of the action of BASIC.
BASIC services VRAM at all sorts of odd times using various interrupts. If you are
using the same modes as BASIC uses there will be no problems if you are using them
in the same way as BASIC does. If however, you are using and creating your own
VDP modes or are using the same modes with different VRAM table set-ups you will
have to choose between having BASIC around or not, else BASIC and your code will
conflict and you will end up with garbage.