Graphics Using The Extra Memory - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

On the screen the graphics are ORed into place - see lines 230 and 240. The colour
seen on the screen in any particular pixel is determined by the most significant bit of
the resultant at that point. Therefore an image in a 'more significant' plane will
always obscure an image in a 'less significant' plane, but the background will be
preserved and can be seen again if the 'more-significant' image is removed. The way
'to remove an image is to plot it using the AND ink mode with INK numbers of7 ,11,13
or 14 removing original INKs of8,4,2 and 1 respectively - see lines 280 and 290.
Graphics Using the Extra Memory
To conclude this chapter, we provide you with a comprehensive 'Graphics Screen
Designer' program that makes use of the extra 64K of RAM in the 6128.
10 'SCREEN DESIGNER by DAVID RADISIC
20 ' copyright (c) AMSOFT 1985
30 '
40 'Remember to RUN "BANKMAN" before running program!
50 '*************************************************
60 '
70 ON ERROR GOTO 2740 .
80 DEFINT a-x
90 MODE 1:ch=127:cmnd=1:pn(0)=0:pn(1)=26:pn(2)=15:pn(3)
=6:pn(4)=0:pn=1:norx=1:menu=1:zzz=HIMEM
100 DIM command$(22)
110 norx$(0)="Normal":norx$(1)="XOR
":norx$(2)="Trans
p":norx$(3)="XOR
"
120 RESTORE:READ cmnds$(1),cmnds$(2):cmnd$=CHR$(16)+CHR
$(&7F)+cmnds$(1)+cmnds$(2)
130 READ cmno:FOR i=1 TO cmno:READ command$(;):NEXT
140 READ st$:IF st$<>"**" THEN cmnd$(cmnd)=st$:cmnd=cmn
d+1:GOTO 140
150 WINDOW #0,1,40,1,3:PAPER #0,0:PEN #0,1:CLS #0
160 WINDOW #1,1,40,4,4:PAPER #1,3:PEN #1,1:CLS #1
170 ORIGIN 0,0,0,640,0,334
180 x=320:y=200:MOVE x,y
190 BORDER pn(4):FOR ;=0 TO 3:INK ;,pn(i):NEXT
200 MASK 255,0:PAPER 0:PEN 1:PAPER #1,3:PEN #1,1:GRAPHI
CS PEN pn,norx
210 IF flag<>5 THEN 280
Continued on the next page
Chapter 9 Page 56
At your leisure ....

Advertisement

Table of Contents
loading

Table of Contents