Product specifications
The VDP is in text mode, when mode bits M1 = 1, M2 = 0 and M3 = 0 (see section 2.2
register 1 bits 3 and 4).
When the VDP is first initialised into text mode the VRAM is organised as shown in the
table below.
VRAM sub-block Length in bytes
Pattern generator table 2048
Pattern name table 960
Text mode VRAM arrangement in BASIC has already been discussed in section 2.4,
because in BASIC it has been designed to be an integral part of the tabling for graphic
mode 2.
It can be seen however, that the text pattern generator table as BASIC sets it up is
only 1K long. This will only allow you to have a maximum of 128 different patterns in
this mode. As explained in section 2.4 concerning the reduction in size of the sprite
generator table, this is a compromise measure in order to have both graphics two
mode and text mode resident in VRAM at the same time.
Sprites are not available in this mode because it is concerned only with the use of text
type characters.
Text mode has many advantages in that it is very compact. A text mode set-up only
occupies 3K of VRAM. It is possible to build up several different text libraries in VRAM
and several screens, and switch to a complete new text set-up by changing only two
VDP write-only registers.
Alternatively it is possible to have one text library held in the text pattern generator
table, and to have up to 14 completely separate display screens, which can be
changed to a new screen by changing only one VDP write-only register (Register 2), in
a time interval of about 11 micro-seconds. This would be very useful for building up
animated displays.
The text pattern generator table is 2048 bytes long and is split into 256 text patterns,
each of which is 8 bytes long. Since each text position on the screen is six pixels
across, the least significant bits 9ie bits 1 and 0) of each text pattern byte are ignored.
Each block of eight bytes in the text pattern library define a text pattern in which the
1’s take on the text foreground colour, while the 0’s take on the background (or
backdrop) colour. These colours are chosen by loading VDP register 7 as described in
section 2.2 example 1.
Any one of any of the patterns held in the text pattern library can be displayed in any
position on the current text display screen, simply by loading the value of the desired
pattern number into the appropriate position in the text display screen area.
Assuming we had a standard ascii character set held in our pattern library and that the
text display screen was located at 7K, then we could use the simple routine below to
print out strings to this screen. The routine uses the VRAM I/O routines as described
in section 1.