Screen Modes - AMSTRAD CPC464 User Manual

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

5.1.2 Transparent option and the relationship of PEN, INK and
PAPER.
Except for the conditions where the flashing alternate colours are specified, two INKs are used when
writing to the screen; one INK determines the colour of the PEN , while the other determines the
colour of the PAPER .
NB The number associated with PAPER command is the INK declared for that number - and NOT
the colour number as listed in Appendix VI. Similarly the number associated with the PEN
command is the INK declared for that PEN number, and NOT the colour number as listed in
Appendix VI.
The PAPER number defaults to 0 if not specified, while the PEN number defaults to 1 if not
specified. To set the INK for PAPER number 0 to green, which is colour number 9, you would type in:
INK 0,9
Similarly to set the INK for PEN number 1 to black, which is colour number 0, you would type in:
INK 1,0
Setting the PAPER to the same INK as the PEN ie: INK 0,0 will black out the entire display.
The text ' writing' can be set to be transparent or opaque using one of a series of control characters
that provide useful extensions to the major BASIC graphics commands. With the transparent option,
you can either ignore the paper colour and overwrite the graphics, or completely overwrite the
background. This brief program illustrates the effect available:
[CTRL][SHIFT][ESC]
1 0 MODE 1
2 0 I N K 2 , 1 9
3 0 D R A W 2 0 0 , 2 0 0 , 2
4 0 L O C A T E 1,21
5 0 P R I N T " 1 N O R M A L "
6 0 P R I N T C HR $ ( 2 2 ) + C H R $ ( 1 )
7 0 O R I G I N 0 , 0
8 0 D R A W 5 0 0 , 2 0 0 , 2
9 0 L O C A T E 12,18
1 0 0 P R I N T " 2 T R A N S P A R E N T "
1 1 0 P R I N T C H R $ ( 2 2 ) + C H R $ ( 0 )
1 2 0 L O C A T E 2 2 , 1 5
1 3 0 P R I N T " 3 N O R M A L A G A I N "
The first DRAW command in line 30 was performed before transparent mode was set, but the second
was drawn after the CHR$(22) +CHR$(1) command to set transparent mode was issued in line
60. Note how the overlap points have changed colour, and how (in transparent mode) the INK filling
the character cell has been completely overwritten.
Swap the location of the transparency-on (line 60) and transparency-off (line 110) commands in the
program and see how this affects the displayed results. A full list of these additional commands is
given in Appendix VI.

5.2 Screen modes

There are three modes in which the screen (the text and graphics operation) functions:
a) Normal
Mode 1: 40 columns x 25 lines, 4 INK text
320x200 pixels, individually addressable in 4 colours
b) Multicolour mode

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents