Home » Personal collection » Acorn hard disk » misc » misc3 » eug_titles/PT3/+P2

eug_titles/PT3/+P2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » misc » misc3
Filename: eug_titles/PT3/+P2
Read OK:
File size: 1CBC bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
There are, however, a few precautionary points which should be mentioned
about this technique of saving screen memory:

- As you probably realise, in four colour modes, the four colours you
can use can be changed from the default black, red, yellow and white by
using VDU 19 to change the palette. The colours in the palette are not
saved when this technique is used, and must be restored by repeating the
VDU 19 commands again. If you define the palette to, for example, black,
blue, cyan and white, and create a picture which looks good in this colour
scheme, you must remember that unless you define the palette to these four
colours before performing *LOAD to restore the picture, it may appear
rather odd when reloaded, as it will appear in black, red, yellow and
white - the default colour scheme.

- The exact reason why this happens is rather complicated, but if you allow
the cursor to go down off the bottom line of the screen, and allow the screen
to scroll up one line, this technique stops working until you perform a
MODE command, or clear the screen using CLS. Basically what happens is that
the computer does not physically move every line of text on the screen up
one line, but instead makes a note that every line in screen memory is stored
one line lower than it should be. When you reload from disk, this note is
lost, and the computer draws every line lower than it should be. Each time
that CLS or MODE is executed, screen memory is cleared and reinitiated, so
that every line is stored in memory where you would expect it to be. Simply
remember not to allow the screen to scroll between clearing it, and saving
the contents of screen memory to disc.

- The files created when you save the contents of screen memory to disk
are fairly large - so large, in fact, that you can often only fit around
15 such files onto each disk that you use (the exact number depends upon
what modes the images are in). Therefore this technique is not feasable
for a large number of images. Each screen in a game like Shipwrecked cannot
be stored in this way - if I had stored every screen of the game like this,
it would have required six floppy disks to store the data for the game!
This means that saved screens must be reserved for the purposes of title
screens only.

Earlier in the article, I mentioned several examples of screens which I have
done for EUG using saved screens using this technique. These included the
title screens for both Shipwrecked games, and also several EUG title
screens. You may have noticed that these were actually animated (see the
starfield in Jupiter 3 and the EUG 35 title). This was achieved by palette
switching as used in the previous article. If you look again at the
programming technique demonstration from this article (on EUG 36), and
select option 5, the same effect will appear on your screen. The same
principal was applied in both animated screens mentioned above - the only
difference is that in these title screens the pattern on screen which is
being palette switched is rather more complex. Shipwreck's title screen
(with the animated water scene) was also created in this way, except that
for this screen there was also a machine code program altering the contents
of screen memory as well, to enhance the effect.

So, we have a technique which allows us to store a small number of very
detailed screens on floppy, and recall then at very great speed. But what if
we want to use this method for a large number of screens? And what if we
want a situation like a game, where the user can move sprites on the screen
around. This can also be done by altering the values in screen memory
directly, but in a different way...

2. Editing screen memory

The basic idea is this: in any program, you only usually require a certain,
small number of little 'blocks' to make up a whole picture. In a word
processor, for example, you only need the letters of the alphabet to appear
on the screen. These letters are small blocks of graphics which appear on
your screen (called characters). Because only these 26 blocks are required,
the word processor does not need to store every letter as all of the pixels
which make it up (ie. as a bitmap), but just as a code for that particular
letter. When the word processor wants to display a letter on the screen, it
looks up the letter code, and then copies the graphic data for what that
letter looks like onto the screen. Therefore, the graphic data for what
colour all of the pixels should be for that particular letter (which might
take several bytes) need only be stored once, and that letter can be stored
in your script in just one byte, for the letter code. Thus, the memory
taken up by your script is reduced dramatically.

The same principal can be used in graphics. Look at two brick walls in
an arcade adventure such as Shipwrecked - can you see the difference
between them? If they are the same, surely you only need to store the
graphic data for a brick wall once, and then copy it onto the screen
whenever you want a brick wall. In Shipwrecked, for example, the graphic
data to describe what a brick wall looks like took 128 bytes. Yet every
time I wanted that brick wall (which was over a hundred times) I could
simply use one byte to say "Put a brick wall here!".

The easiest way to use this block idea, as you may already have realised,
is using user defined characters. You redefine the letters of the alphabet
as different pictures, and then use the standard BASIC PRINT command to
output these pictures to the screen, as and when they are required. But,
as we already realised in the last article, this only allows you to use
one colour in each character. Even so, this is a reasonable technique if
you don't mind the lack of colour. Many commercial games actually never
addressed this problem, and had graphics which lacked colour somewhat.
Even Dizzy (for those who have never heard of it, a great arcade adventure
of the 1980s, which caused quite a cult following at the time on the
Spectrum and C64, but never quite reached the Elk) did not have more than
one colour (other than black) per block. Different blocks were, however,
different colours - trees were green and the ground was red - but there
was never any overlap between the two colour areas.

There is, however, a way of creating an effect just like user defined
characters, but in full colour, and the principal is very similar to
that used before in saving screen memory. Basically, you design you small
block on the screen, using whatever technique you like to draw it, and then
save the small part of screen memory which contains your design. This time,
however, you will not save it to floppy disc, but to another area of memory.
You can then copy this block back to screen memory whenever and wherever you
want it. If you want it, say, in the fifth row down, and twelve characters
along, you can calculate where abouts this corresponds to in screen memory,
and copy the block to this location. As the block is stored in your
computer's RAM, as opposed to on floppy, this transfer can be done by
machine code at very great speed (taking only a small fraction of a second).
For those programmers who are not familiar with machine code, a module
is included with this tutorial allowing you to do this. The program code
for this module is actually taken directly from Shipwrecked.
00000000  54 68 65 72 65 20 61 72  65 2c 20 68 6f 77 65 76  |There are, howev|
00000010  65 72 2c 20 61 20 66 65  77 20 70 72 65 63 61 75  |er, a few precau|
00000020  74 69 6f 6e 61 72 79 20  70 6f 69 6e 74 73 20 77  |tionary points w|
00000030  68 69 63 68 20 73 68 6f  75 6c 64 20 62 65 20 6d  |hich should be m|
00000040  65 6e 74 69 6f 6e 65 64  0d 61 62 6f 75 74 20 74  |entioned.about t|
00000050  68 69 73 20 74 65 63 68  6e 69 71 75 65 20 6f 66  |his technique of|
00000060  20 73 61 76 69 6e 67 20  73 63 72 65 65 6e 20 6d  | saving screen m|
00000070  65 6d 6f 72 79 3a 0d 0d  2d 20 41 73 20 79 6f 75  |emory:..- As you|
00000080  20 70 72 6f 62 61 62 6c  79 20 72 65 61 6c 69 73  | probably realis|
00000090  65 2c 20 69 6e 20 66 6f  75 72 20 63 6f 6c 6f 75  |e, in four colou|
000000a0  72 20 6d 6f 64 65 73 2c  20 74 68 65 20 66 6f 75  |r modes, the fou|
000000b0  72 20 63 6f 6c 6f 75 72  73 20 79 6f 75 0d 63 61  |r colours you.ca|
000000c0  6e 20 75 73 65 20 63 61  6e 20 62 65 20 63 68 61  |n use can be cha|
000000d0  6e 67 65 64 20 66 72 6f  6d 20 74 68 65 20 64 65  |nged from the de|
000000e0  66 61 75 6c 74 20 62 6c  61 63 6b 2c 20 72 65 64  |fault black, red|
000000f0  2c 20 79 65 6c 6c 6f 77  20 61 6e 64 20 77 68 69  |, yellow and whi|
00000100  74 65 20 62 79 0d 75 73  69 6e 67 20 56 44 55 20  |te by.using VDU |
00000110  31 39 20 74 6f 20 63 68  61 6e 67 65 20 74 68 65  |19 to change the|
00000120  20 70 61 6c 65 74 74 65  2e 20 54 68 65 20 63 6f  | palette. The co|
00000130  6c 6f 75 72 73 20 69 6e  20 74 68 65 20 70 61 6c  |lours in the pal|
00000140  65 74 74 65 20 61 72 65  20 6e 6f 74 0d 73 61 76  |ette are not.sav|
00000150  65 64 20 77 68 65 6e 20  74 68 69 73 20 74 65 63  |ed when this tec|
00000160  68 6e 69 71 75 65 20 69  73 20 75 73 65 64 2c 20  |hnique is used, |
00000170  61 6e 64 20 6d 75 73 74  20 62 65 20 72 65 73 74  |and must be rest|
00000180  6f 72 65 64 20 62 79 20  72 65 70 65 61 74 69 6e  |ored by repeatin|
00000190  67 20 74 68 65 0d 56 44  55 20 31 39 20 63 6f 6d  |g the.VDU 19 com|
000001a0  6d 61 6e 64 73 20 61 67  61 69 6e 2e 20 49 66 20  |mands again. If |
000001b0  79 6f 75 20 64 65 66 69  6e 65 20 74 68 65 20 70  |you define the p|
000001c0  61 6c 65 74 74 65 20 74  6f 2c 20 66 6f 72 20 65  |alette to, for e|
000001d0  78 61 6d 70 6c 65 2c 20  62 6c 61 63 6b 2c 0d 62  |xample, black,.b|
000001e0  6c 75 65 2c 20 63 79 61  6e 20 61 6e 64 20 77 68  |lue, cyan and wh|
000001f0  69 74 65 2c 20 61 6e 64  20 63 72 65 61 74 65 20  |ite, and create |
00000200  61 20 70 69 63 74 75 72  65 20 77 68 69 63 68 20  |a picture which |
00000210  6c 6f 6f 6b 73 20 67 6f  6f 64 20 69 6e 20 74 68  |looks good in th|
00000220  69 73 20 63 6f 6c 6f 75  72 0d 73 63 68 65 6d 65  |is colour.scheme|
00000230  2c 20 79 6f 75 20 6d 75  73 74 20 72 65 6d 65 6d  |, you must remem|
00000240  62 65 72 20 74 68 61 74  20 75 6e 6c 65 73 73 20  |ber that unless |
00000250  79 6f 75 20 64 65 66 69  6e 65 20 74 68 65 20 70  |you define the p|
00000260  61 6c 65 74 74 65 20 74  6f 20 74 68 65 73 65 20  |alette to these |
00000270  66 6f 75 72 0d 63 6f 6c  6f 75 72 73 20 62 65 66  |four.colours bef|
00000280  6f 72 65 20 70 65 72 66  6f 72 6d 69 6e 67 20 2a  |ore performing *|
00000290  4c 4f 41 44 20 74 6f 20  72 65 73 74 6f 72 65 20  |LOAD to restore |
000002a0  74 68 65 20 70 69 63 74  75 72 65 2c 20 69 74 20  |the picture, it |
000002b0  6d 61 79 20 61 70 70 65  61 72 0d 72 61 74 68 65  |may appear.rathe|
000002c0  72 20 6f 64 64 20 77 68  65 6e 20 72 65 6c 6f 61  |r odd when reloa|
000002d0  64 65 64 2c 20 61 73 20  69 74 20 77 69 6c 6c 20  |ded, as it will |
000002e0  61 70 70 65 61 72 20 69  6e 20 62 6c 61 63 6b 2c  |appear in black,|
000002f0  20 72 65 64 2c 20 79 65  6c 6c 6f 77 20 61 6e 64  | red, yellow and|
00000300  0d 77 68 69 74 65 20 2d  20 74 68 65 20 64 65 66  |.white - the def|
00000310  61 75 6c 74 20 63 6f 6c  6f 75 72 20 73 63 68 65  |ault colour sche|
00000320  6d 65 2e 0d 0d 2d 20 54  68 65 20 65 78 61 63 74  |me...- The exact|
00000330  20 72 65 61 73 6f 6e 20  77 68 79 20 74 68 69 73  | reason why this|
00000340  20 68 61 70 70 65 6e 73  20 69 73 20 72 61 74 68  | happens is rath|
00000350  65 72 20 63 6f 6d 70 6c  69 63 61 74 65 64 2c 20  |er complicated, |
00000360  62 75 74 20 69 66 20 79  6f 75 20 61 6c 6c 6f 77  |but if you allow|
00000370  0d 74 68 65 20 63 75 72  73 6f 72 20 74 6f 20 67  |.the cursor to g|
00000380  6f 20 64 6f 77 6e 20 6f  66 66 20 74 68 65 20 62  |o down off the b|
00000390  6f 74 74 6f 6d 20 6c 69  6e 65 20 6f 66 20 74 68  |ottom line of th|
000003a0  65 20 73 63 72 65 65 6e  2c 20 61 6e 64 20 61 6c  |e screen, and al|
000003b0  6c 6f 77 20 74 68 65 20  73 63 72 65 65 6e 0d 74  |low the screen.t|
000003c0  6f 20 73 63 72 6f 6c 6c  20 75 70 20 6f 6e 65 20  |o scroll up one |
000003d0  6c 69 6e 65 2c 20 74 68  69 73 20 74 65 63 68 6e  |line, this techn|
000003e0  69 71 75 65 20 73 74 6f  70 73 20 77 6f 72 6b 69  |ique stops worki|
000003f0  6e 67 20 75 6e 74 69 6c  20 79 6f 75 20 70 65 72  |ng until you per|
00000400  66 6f 72 6d 20 61 0d 4d  4f 44 45 20 63 6f 6d 6d  |form a.MODE comm|
00000410  61 6e 64 2c 20 6f 72 20  63 6c 65 61 72 20 74 68  |and, or clear th|
00000420  65 20 73 63 72 65 65 6e  20 75 73 69 6e 67 20 43  |e screen using C|
00000430  4c 53 2e 20 42 61 73 69  63 61 6c 6c 79 20 77 68  |LS. Basically wh|
00000440  61 74 20 68 61 70 70 65  6e 73 20 69 73 20 74 68  |at happens is th|
00000450  61 74 0d 74 68 65 20 63  6f 6d 70 75 74 65 72 20  |at.the computer |
00000460  64 6f 65 73 20 6e 6f 74  20 70 68 79 73 69 63 61  |does not physica|
00000470  6c 6c 79 20 6d 6f 76 65  20 65 76 65 72 79 20 6c  |lly move every l|
00000480  69 6e 65 20 6f 66 20 74  65 78 74 20 6f 6e 20 74  |ine of text on t|
00000490  68 65 20 73 63 72 65 65  6e 20 75 70 0d 6f 6e 65  |he screen up.one|
000004a0  20 6c 69 6e 65 2c 20 62  75 74 20 69 6e 73 74 65  | line, but inste|
000004b0  61 64 20 6d 61 6b 65 73  20 61 20 6e 6f 74 65 20  |ad makes a note |
000004c0  74 68 61 74 20 65 76 65  72 79 20 6c 69 6e 65 20  |that every line |
000004d0  69 6e 20 73 63 72 65 65  6e 20 6d 65 6d 6f 72 79  |in screen memory|
000004e0  20 69 73 20 73 74 6f 72  65 64 0d 6f 6e 65 20 6c  | is stored.one l|
000004f0  69 6e 65 20 6c 6f 77 65  72 20 74 68 61 6e 20 69  |ine lower than i|
00000500  74 20 73 68 6f 75 6c 64  20 62 65 2e 20 57 68 65  |t should be. Whe|
00000510  6e 20 79 6f 75 20 72 65  6c 6f 61 64 20 66 72 6f  |n you reload fro|
00000520  6d 20 64 69 73 6b 2c 20  74 68 69 73 20 6e 6f 74  |m disk, this not|
00000530  65 20 69 73 0d 6c 6f 73  74 2c 20 61 6e 64 20 74  |e is.lost, and t|
00000540  68 65 20 63 6f 6d 70 75  74 65 72 20 64 72 61 77  |he computer draw|
00000550  73 20 65 76 65 72 79 20  6c 69 6e 65 20 6c 6f 77  |s every line low|
00000560  65 72 20 74 68 61 6e 20  69 74 20 73 68 6f 75 6c  |er than it shoul|
00000570  64 20 62 65 2e 20 45 61  63 68 20 74 69 6d 65 0d  |d be. Each time.|
00000580  74 68 61 74 20 43 4c 53  20 6f 72 20 4d 4f 44 45  |that CLS or MODE|
00000590  20 69 73 20 65 78 65 63  75 74 65 64 2c 20 73 63  | is executed, sc|
000005a0  72 65 65 6e 20 6d 65 6d  6f 72 79 20 69 73 20 63  |reen memory is c|
000005b0  6c 65 61 72 65 64 20 61  6e 64 20 72 65 69 6e 69  |leared and reini|
000005c0  74 69 61 74 65 64 2c 20  73 6f 0d 74 68 61 74 20  |tiated, so.that |
000005d0  65 76 65 72 79 20 6c 69  6e 65 20 69 73 20 73 74  |every line is st|
000005e0  6f 72 65 64 20 69 6e 20  6d 65 6d 6f 72 79 20 77  |ored in memory w|
000005f0  68 65 72 65 20 79 6f 75  20 77 6f 75 6c 64 20 65  |here you would e|
00000600  78 70 65 63 74 20 69 74  20 74 6f 20 62 65 2e 20  |xpect it to be. |
00000610  53 69 6d 70 6c 79 0d 72  65 6d 65 6d 62 65 72 20  |Simply.remember |
00000620  6e 6f 74 20 74 6f 20 61  6c 6c 6f 77 20 74 68 65  |not to allow the|
00000630  20 73 63 72 65 65 6e 20  74 6f 20 73 63 72 6f 6c  | screen to scrol|
00000640  6c 20 62 65 74 77 65 65  6e 20 63 6c 65 61 72 69  |l between cleari|
00000650  6e 67 20 69 74 2c 20 61  6e 64 20 73 61 76 69 6e  |ng it, and savin|
00000660  67 0d 74 68 65 20 63 6f  6e 74 65 6e 74 73 20 6f  |g.the contents o|
00000670  66 20 73 63 72 65 65 6e  20 6d 65 6d 6f 72 79 20  |f screen memory |
00000680  74 6f 20 64 69 73 63 2e  0d 0d 2d 20 54 68 65 20  |to disc...- The |
00000690  66 69 6c 65 73 20 63 72  65 61 74 65 64 20 77 68  |files created wh|
000006a0  65 6e 20 79 6f 75 20 73  61 76 65 20 74 68 65 20  |en you save the |
000006b0  63 6f 6e 74 65 6e 74 73  20 6f 66 20 73 63 72 65  |contents of scre|
000006c0  65 6e 20 6d 65 6d 6f 72  79 20 74 6f 20 64 69 73  |en memory to dis|
000006d0  6b 0d 61 72 65 20 66 61  69 72 6c 79 20 6c 61 72  |k.are fairly lar|
000006e0  67 65 20 2d 20 73 6f 20  6c 61 72 67 65 2c 20 69  |ge - so large, i|
000006f0  6e 20 66 61 63 74 2c 20  74 68 61 74 20 79 6f 75  |n fact, that you|
00000700  20 63 61 6e 20 6f 66 74  65 6e 20 6f 6e 6c 79 20  | can often only |
00000710  66 69 74 20 61 72 6f 75  6e 64 0d 31 35 20 73 75  |fit around.15 su|
00000720  63 68 20 66 69 6c 65 73  20 6f 6e 74 6f 20 65 61  |ch files onto ea|
00000730  63 68 20 64 69 73 6b 20  74 68 61 74 20 79 6f 75  |ch disk that you|
00000740  20 75 73 65 20 28 74 68  65 20 65 78 61 63 74 20  | use (the exact |
00000750  6e 75 6d 62 65 72 20 64  65 70 65 6e 64 73 20 75  |number depends u|
00000760  70 6f 6e 0d 77 68 61 74  20 6d 6f 64 65 73 20 74  |pon.what modes t|
00000770  68 65 20 69 6d 61 67 65  73 20 61 72 65 20 69 6e  |he images are in|
00000780  29 2e 20 54 68 65 72 65  66 6f 72 65 20 74 68 69  |). Therefore thi|
00000790  73 20 74 65 63 68 6e 69  71 75 65 20 69 73 20 6e  |s technique is n|
000007a0  6f 74 20 66 65 61 73 61  62 6c 65 0d 66 6f 72 20  |ot feasable.for |
000007b0  61 20 6c 61 72 67 65 20  6e 75 6d 62 65 72 20 6f  |a large number o|
000007c0  66 20 69 6d 61 67 65 73  2e 20 45 61 63 68 20 73  |f images. Each s|
000007d0  63 72 65 65 6e 20 69 6e  20 61 20 67 61 6d 65 20  |creen in a game |
000007e0  6c 69 6b 65 20 53 68 69  70 77 72 65 63 6b 65 64  |like Shipwrecked|
000007f0  20 63 61 6e 6e 6f 74 0d  62 65 20 73 74 6f 72 65  | cannot.be store|
00000800  64 20 69 6e 20 74 68 69  73 20 77 61 79 20 2d 20  |d in this way - |
00000810  69 66 20 49 20 68 61 64  20 73 74 6f 72 65 64 20  |if I had stored |
00000820  65 76 65 72 79 20 73 63  72 65 65 6e 20 6f 66 20  |every screen of |
00000830  74 68 65 20 67 61 6d 65  20 6c 69 6b 65 20 74 68  |the game like th|
00000840  69 73 2c 0d 69 74 20 77  6f 75 6c 64 20 68 61 76  |is,.it would hav|
00000850  65 20 72 65 71 75 69 72  65 64 20 73 69 78 20 66  |e required six f|
00000860  6c 6f 70 70 79 20 64 69  73 6b 73 20 74 6f 20 73  |loppy disks to s|
00000870  74 6f 72 65 20 74 68 65  20 64 61 74 61 20 66 6f  |tore the data fo|
00000880  72 20 74 68 65 20 67 61  6d 65 21 0d 54 68 69 73  |r the game!.This|
00000890  20 6d 65 61 6e 73 20 74  68 61 74 20 73 61 76 65  | means that save|
000008a0  64 20 73 63 72 65 65 6e  73 20 6d 75 73 74 20 62  |d screens must b|
000008b0  65 20 72 65 73 65 72 76  65 64 20 66 6f 72 20 74  |e reserved for t|
000008c0  68 65 20 70 75 72 70 6f  73 65 73 20 6f 66 20 74  |he purposes of t|
000008d0  69 74 6c 65 0d 73 63 72  65 65 6e 73 20 6f 6e 6c  |itle.screens onl|
000008e0  79 2e 0d 0d 45 61 72 6c  69 65 72 20 69 6e 20 74  |y...Earlier in t|
000008f0  68 65 20 61 72 74 69 63  6c 65 2c 20 49 20 6d 65  |he article, I me|
00000900  6e 74 69 6f 6e 65 64 20  73 65 76 65 72 61 6c 20  |ntioned several |
00000910  65 78 61 6d 70 6c 65 73  20 6f 66 20 73 63 72 65  |examples of scre|
00000920  65 6e 73 20 77 68 69 63  68 20 49 20 68 61 76 65  |ens which I have|
00000930  0d 64 6f 6e 65 20 66 6f  72 20 45 55 47 20 75 73  |.done for EUG us|
00000940  69 6e 67 20 73 61 76 65  64 20 73 63 72 65 65 6e  |ing saved screen|
00000950  73 20 75 73 69 6e 67 20  74 68 69 73 20 74 65 63  |s using this tec|
00000960  68 6e 69 71 75 65 2e 20  54 68 65 73 65 20 69 6e  |hnique. These in|
00000970  63 6c 75 64 65 64 20 74  68 65 0d 74 69 74 6c 65  |cluded the.title|
00000980  20 73 63 72 65 65 6e 73  20 66 6f 72 20 62 6f 74  | screens for bot|
00000990  68 20 53 68 69 70 77 72  65 63 6b 65 64 20 67 61  |h Shipwrecked ga|
000009a0  6d 65 73 2c 20 61 6e 64  20 61 6c 73 6f 20 73 65  |mes, and also se|
000009b0  76 65 72 61 6c 20 45 55  47 20 74 69 74 6c 65 0d  |veral EUG title.|
000009c0  73 63 72 65 65 6e 73 2e  20 59 6f 75 20 6d 61 79  |screens. You may|
000009d0  20 68 61 76 65 20 6e 6f  74 69 63 65 64 20 74 68  | have noticed th|
000009e0  61 74 20 74 68 65 73 65  20 77 65 72 65 20 61 63  |at these were ac|
000009f0  74 75 61 6c 6c 79 20 61  6e 69 6d 61 74 65 64 20  |tually animated |
00000a00  28 73 65 65 20 74 68 65  0d 73 74 61 72 66 69 65  |(see the.starfie|
00000a10  6c 64 20 69 6e 20 4a 75  70 69 74 65 72 20 33 20  |ld in Jupiter 3 |
00000a20  61 6e 64 20 74 68 65 20  45 55 47 20 33 35 20 74  |and the EUG 35 t|
00000a30  69 74 6c 65 29 2e 20 54  68 69 73 20 77 61 73 20  |itle). This was |
00000a40  61 63 68 69 65 76 65 64  20 62 79 20 70 61 6c 65  |achieved by pale|
00000a50  74 74 65 0d 73 77 69 74  63 68 69 6e 67 20 61 73  |tte.switching as|
00000a60  20 75 73 65 64 20 69 6e  20 74 68 65 20 70 72 65  | used in the pre|
00000a70  76 69 6f 75 73 20 61 72  74 69 63 6c 65 2e 20 49  |vious article. I|
00000a80  66 20 79 6f 75 20 6c 6f  6f 6b 20 61 67 61 69 6e  |f you look again|
00000a90  20 61 74 20 74 68 65 0d  70 72 6f 67 72 61 6d 6d  | at the.programm|
00000aa0  69 6e 67 20 74 65 63 68  6e 69 71 75 65 20 64 65  |ing technique de|
00000ab0  6d 6f 6e 73 74 72 61 74  69 6f 6e 20 66 72 6f 6d  |monstration from|
00000ac0  20 74 68 69 73 20 61 72  74 69 63 6c 65 20 28 6f  | this article (o|
00000ad0  6e 20 45 55 47 20 33 36  29 2c 20 61 6e 64 0d 73  |n EUG 36), and.s|
00000ae0  65 6c 65 63 74 20 6f 70  74 69 6f 6e 20 35 2c 20  |elect option 5, |
00000af0  74 68 65 20 73 61 6d 65  20 65 66 66 65 63 74 20  |the same effect |
00000b00  77 69 6c 6c 20 61 70 70  65 61 72 20 6f 6e 20 79  |will appear on y|
00000b10  6f 75 72 20 73 63 72 65  65 6e 2e 20 54 68 65 20  |our screen. The |
00000b20  73 61 6d 65 0d 70 72 69  6e 63 69 70 61 6c 20 77  |same.principal w|
00000b30  61 73 20 61 70 70 6c 69  65 64 20 69 6e 20 62 6f  |as applied in bo|
00000b40  74 68 20 61 6e 69 6d 61  74 65 64 20 73 63 72 65  |th animated scre|
00000b50  65 6e 73 20 6d 65 6e 74  69 6f 6e 65 64 20 61 62  |ens mentioned ab|
00000b60  6f 76 65 20 2d 20 74 68  65 20 6f 6e 6c 79 0d 64  |ove - the only.d|
00000b70  69 66 66 65 72 65 6e 63  65 20 69 73 20 74 68 61  |ifference is tha|
00000b80  74 20 69 6e 20 74 68 65  73 65 20 74 69 74 6c 65  |t in these title|
00000b90  20 73 63 72 65 65 6e 73  20 74 68 65 20 70 61 74  | screens the pat|
00000ba0  74 65 72 6e 20 6f 6e 20  73 63 72 65 65 6e 20 77  |tern on screen w|
00000bb0  68 69 63 68 20 69 73 0d  62 65 69 6e 67 20 70 61  |hich is.being pa|
00000bc0  6c 65 74 74 65 20 73 77  69 74 63 68 65 64 20 69  |lette switched i|
00000bd0  73 20 72 61 74 68 65 72  20 6d 6f 72 65 20 63 6f  |s rather more co|
00000be0  6d 70 6c 65 78 2e 20 53  68 69 70 77 72 65 63 6b  |mplex. Shipwreck|
00000bf0  27 73 20 74 69 74 6c 65  20 73 63 72 65 65 6e 0d  |'s title screen.|
00000c00  28 77 69 74 68 20 74 68  65 20 61 6e 69 6d 61 74  |(with the animat|
00000c10  65 64 20 77 61 74 65 72  20 73 63 65 6e 65 29 20  |ed water scene) |
00000c20  77 61 73 20 61 6c 73 6f  20 63 72 65 61 74 65 64  |was also created|
00000c30  20 69 6e 20 74 68 69 73  20 77 61 79 2c 20 65 78  | in this way, ex|
00000c40  63 65 70 74 20 74 68 61  74 0d 66 6f 72 20 74 68  |cept that.for th|
00000c50  69 73 20 73 63 72 65 65  6e 20 74 68 65 72 65 20  |is screen there |
00000c60  77 61 73 20 61 6c 73 6f  20 61 20 6d 61 63 68 69  |was also a machi|
00000c70  6e 65 20 63 6f 64 65 20  70 72 6f 67 72 61 6d 20  |ne code program |
00000c80  61 6c 74 65 72 69 6e 67  20 74 68 65 20 63 6f 6e  |altering the con|
00000c90  74 65 6e 74 73 0d 6f 66  20 73 63 72 65 65 6e 20  |tents.of screen |
00000ca0  6d 65 6d 6f 72 79 20 61  73 20 77 65 6c 6c 2c 20  |memory as well, |
00000cb0  74 6f 20 65 6e 68 61 6e  63 65 20 74 68 65 20 65  |to enhance the e|
00000cc0  66 66 65 63 74 2e 0d 0d  53 6f 2c 20 77 65 20 68  |ffect...So, we h|
00000cd0  61 76 65 20 61 20 74 65  63 68 6e 69 71 75 65 20  |ave a technique |
00000ce0  77 68 69 63 68 20 61 6c  6c 6f 77 73 20 75 73 20  |which allows us |
00000cf0  74 6f 20 73 74 6f 72 65  20 61 20 73 6d 61 6c 6c  |to store a small|
00000d00  20 6e 75 6d 62 65 72 20  6f 66 20 76 65 72 79 0d  | number of very.|
00000d10  64 65 74 61 69 6c 65 64  20 73 63 72 65 65 6e 73  |detailed screens|
00000d20  20 6f 6e 20 66 6c 6f 70  70 79 2c 20 61 6e 64 20  | on floppy, and |
00000d30  72 65 63 61 6c 6c 20 74  68 65 6e 20 61 74 20 76  |recall then at v|
00000d40  65 72 79 20 67 72 65 61  74 20 73 70 65 65 64 2e  |ery great speed.|
00000d50  20 42 75 74 20 77 68 61  74 20 69 66 0d 77 65 20  | But what if.we |
00000d60  77 61 6e 74 20 74 6f 20  75 73 65 20 74 68 69 73  |want to use this|
00000d70  20 6d 65 74 68 6f 64 20  66 6f 72 20 61 20 6c 61  | method for a la|
00000d80  72 67 65 20 6e 75 6d 62  65 72 20 6f 66 20 73 63  |rge number of sc|
00000d90  72 65 65 6e 73 3f 20 41  6e 64 20 77 68 61 74 20  |reens? And what |
00000da0  69 66 20 77 65 0d 77 61  6e 74 20 61 20 73 69 74  |if we.want a sit|
00000db0  75 61 74 69 6f 6e 20 6c  69 6b 65 20 61 20 67 61  |uation like a ga|
00000dc0  6d 65 2c 20 77 68 65 72  65 20 74 68 65 20 75 73  |me, where the us|
00000dd0  65 72 20 63 61 6e 20 6d  6f 76 65 20 73 70 72 69  |er can move spri|
00000de0  74 65 73 20 6f 6e 20 74  68 65 20 73 63 72 65 65  |tes on the scree|
00000df0  6e 0d 61 72 6f 75 6e 64  2e 20 54 68 69 73 20 63  |n.around. This c|
00000e00  61 6e 20 61 6c 73 6f 20  62 65 20 64 6f 6e 65 20  |an also be done |
00000e10  62 79 20 61 6c 74 65 72  69 6e 67 20 74 68 65 20  |by altering the |
00000e20  76 61 6c 75 65 73 20 69  6e 20 73 63 72 65 65 6e  |values in screen|
00000e30  20 6d 65 6d 6f 72 79 0d  64 69 72 65 63 74 6c 79  | memory.directly|
00000e40  2c 20 62 75 74 20 69 6e  20 61 20 64 69 66 66 65  |, but in a diffe|
00000e50  72 65 6e 74 20 77 61 79  2e 2e 2e 0d 0d 32 2e 20  |rent way.....2. |
00000e60  45 64 69 74 69 6e 67 20  73 63 72 65 65 6e 20 6d  |Editing screen m|
00000e70  65 6d 6f 72 79 0d 0d 54  68 65 20 62 61 73 69 63  |emory..The basic|
00000e80  20 69 64 65 61 20 69 73  20 74 68 69 73 3a 20 69  | idea is this: i|
00000e90  6e 20 61 6e 79 20 70 72  6f 67 72 61 6d 2c 20 79  |n any program, y|
00000ea0  6f 75 20 6f 6e 6c 79 20  75 73 75 61 6c 6c 79 20  |ou only usually |
00000eb0  72 65 71 75 69 72 65 20  61 20 63 65 72 74 61 69  |require a certai|
00000ec0  6e 2c 0d 73 6d 61 6c 6c  20 6e 75 6d 62 65 72 20  |n,.small number |
00000ed0  6f 66 20 6c 69 74 74 6c  65 20 27 62 6c 6f 63 6b  |of little 'block|
00000ee0  73 27 20 74 6f 20 6d 61  6b 65 20 75 70 20 61 20  |s' to make up a |
00000ef0  77 68 6f 6c 65 20 70 69  63 74 75 72 65 2e 20 49  |whole picture. I|
00000f00  6e 20 61 20 77 6f 72 64  0d 70 72 6f 63 65 73 73  |n a word.process|
00000f10  6f 72 2c 20 66 6f 72 20  65 78 61 6d 70 6c 65 2c  |or, for example,|
00000f20  20 79 6f 75 20 6f 6e 6c  79 20 6e 65 65 64 20 74  | you only need t|
00000f30  68 65 20 6c 65 74 74 65  72 73 20 6f 66 20 74 68  |he letters of th|
00000f40  65 20 61 6c 70 68 61 62  65 74 20 74 6f 20 61 70  |e alphabet to ap|
00000f50  70 65 61 72 0d 6f 6e 20  74 68 65 20 73 63 72 65  |pear.on the scre|
00000f60  65 6e 2e 20 54 68 65 73  65 20 6c 65 74 74 65 72  |en. These letter|
00000f70  73 20 61 72 65 20 73 6d  61 6c 6c 20 62 6c 6f 63  |s are small bloc|
00000f80  6b 73 20 6f 66 20 67 72  61 70 68 69 63 73 20 77  |ks of graphics w|
00000f90  68 69 63 68 20 61 70 70  65 61 72 20 6f 6e 0d 79  |hich appear on.y|
00000fa0  6f 75 72 20 73 63 72 65  65 6e 20 28 63 61 6c 6c  |our screen (call|
00000fb0  65 64 20 63 68 61 72 61  63 74 65 72 73 29 2e 20  |ed characters). |
00000fc0  42 65 63 61 75 73 65 20  6f 6e 6c 79 20 74 68 65  |Because only the|
00000fd0  73 65 20 32 36 20 62 6c  6f 63 6b 73 20 61 72 65  |se 26 blocks are|
00000fe0  20 72 65 71 75 69 72 65  64 2c 0d 74 68 65 20 77  | required,.the w|
00000ff0  6f 72 64 20 70 72 6f 63  65 73 73 6f 72 20 64 6f  |ord processor do|
00001000  65 73 20 6e 6f 74 20 6e  65 65 64 20 74 6f 20 73  |es not need to s|
00001010  74 6f 72 65 20 65 76 65  72 79 20 6c 65 74 74 65  |tore every lette|
00001020  72 20 61 73 20 61 6c 6c  20 6f 66 20 74 68 65 20  |r as all of the |
00001030  70 69 78 65 6c 73 0d 77  68 69 63 68 20 6d 61 6b  |pixels.which mak|
00001040  65 20 69 74 20 75 70 20  28 69 65 2e 20 61 73 20  |e it up (ie. as |
00001050  61 20 62 69 74 6d 61 70  29 2c 20 62 75 74 20 6a  |a bitmap), but j|
00001060  75 73 74 20 61 73 20 61  20 63 6f 64 65 20 66 6f  |ust as a code fo|
00001070  72 20 74 68 61 74 20 70  61 72 74 69 63 75 6c 61  |r that particula|
00001080  72 0d 6c 65 74 74 65 72  2e 20 57 68 65 6e 20 74  |r.letter. When t|
00001090  68 65 20 77 6f 72 64 20  70 72 6f 63 65 73 73 6f  |he word processo|
000010a0  72 20 77 61 6e 74 73 20  74 6f 20 64 69 73 70 6c  |r wants to displ|
000010b0  61 79 20 61 20 6c 65 74  74 65 72 20 6f 6e 20 74  |ay a letter on t|
000010c0  68 65 20 73 63 72 65 65  6e 2c 20 69 74 0d 6c 6f  |he screen, it.lo|
000010d0  6f 6b 73 20 75 70 20 74  68 65 20 6c 65 74 74 65  |oks up the lette|
000010e0  72 20 63 6f 64 65 2c 20  61 6e 64 20 74 68 65 6e  |r code, and then|
000010f0  20 63 6f 70 69 65 73 20  74 68 65 20 67 72 61 70  | copies the grap|
00001100  68 69 63 20 64 61 74 61  20 66 6f 72 20 77 68 61  |hic data for wha|
00001110  74 20 74 68 61 74 0d 6c  65 74 74 65 72 20 6c 6f  |t that.letter lo|
00001120  6f 6b 73 20 6c 69 6b 65  20 6f 6e 74 6f 20 74 68  |oks like onto th|
00001130  65 20 73 63 72 65 65 6e  2e 20 54 68 65 72 65 66  |e screen. Theref|
00001140  6f 72 65 2c 20 74 68 65  20 67 72 61 70 68 69 63  |ore, the graphic|
00001150  20 64 61 74 61 20 66 6f  72 20 77 68 61 74 0d 63  | data for what.c|
00001160  6f 6c 6f 75 72 20 61 6c  6c 20 6f 66 20 74 68 65  |olour all of the|
00001170  20 70 69 78 65 6c 73 20  73 68 6f 75 6c 64 20 62  | pixels should b|
00001180  65 20 66 6f 72 20 74 68  61 74 20 70 61 72 74 69  |e for that parti|
00001190  63 75 6c 61 72 20 6c 65  74 74 65 72 20 28 77 68  |cular letter (wh|
000011a0  69 63 68 20 6d 69 67 68  74 0d 74 61 6b 65 20 73  |ich might.take s|
000011b0  65 76 65 72 61 6c 20 62  79 74 65 73 29 20 6e 65  |everal bytes) ne|
000011c0  65 64 20 6f 6e 6c 79 20  62 65 20 73 74 6f 72 65  |ed only be store|
000011d0  64 20 6f 6e 63 65 2c 20  61 6e 64 20 74 68 61 74  |d once, and that|
000011e0  20 6c 65 74 74 65 72 20  63 61 6e 20 62 65 20 73  | letter can be s|
000011f0  74 6f 72 65 64 0d 69 6e  20 79 6f 75 72 20 73 63  |tored.in your sc|
00001200  72 69 70 74 20 69 6e 20  6a 75 73 74 20 6f 6e 65  |ript in just one|
00001210  20 62 79 74 65 2c 20 66  6f 72 20 74 68 65 20 6c  | byte, for the l|
00001220  65 74 74 65 72 20 63 6f  64 65 2e 20 54 68 75 73  |etter code. Thus|
00001230  2c 20 74 68 65 20 6d 65  6d 6f 72 79 0d 74 61 6b  |, the memory.tak|
00001240  65 6e 20 75 70 20 62 79  20 79 6f 75 72 20 73 63  |en up by your sc|
00001250  72 69 70 74 20 69 73 20  72 65 64 75 63 65 64 20  |ript is reduced |
00001260  64 72 61 6d 61 74 69 63  61 6c 6c 79 2e 0d 0d 54  |dramatically...T|
00001270  68 65 20 73 61 6d 65 20  70 72 69 6e 63 69 70 61  |he same principa|
00001280  6c 20 63 61 6e 20 62 65  20 75 73 65 64 20 69 6e  |l can be used in|
00001290  20 67 72 61 70 68 69 63  73 2e 20 4c 6f 6f 6b 20  | graphics. Look |
000012a0  61 74 20 74 77 6f 20 62  72 69 63 6b 20 77 61 6c  |at two brick wal|
000012b0  6c 73 20 69 6e 0d 61 6e  20 61 72 63 61 64 65 20  |ls in.an arcade |
000012c0  61 64 76 65 6e 74 75 72  65 20 73 75 63 68 20 61  |adventure such a|
000012d0  73 20 53 68 69 70 77 72  65 63 6b 65 64 20 2d 20  |s Shipwrecked - |
000012e0  63 61 6e 20 79 6f 75 20  73 65 65 20 74 68 65 20  |can you see the |
000012f0  64 69 66 66 65 72 65 6e  63 65 0d 62 65 74 77 65  |difference.betwe|
00001300  65 6e 20 74 68 65 6d 3f  20 49 66 20 74 68 65 79  |en them? If they|
00001310  20 61 72 65 20 74 68 65  20 73 61 6d 65 2c 20 73  | are the same, s|
00001320  75 72 65 6c 79 20 79 6f  75 20 6f 6e 6c 79 20 6e  |urely you only n|
00001330  65 65 64 20 74 6f 20 73  74 6f 72 65 20 74 68 65  |eed to store the|
00001340  0d 67 72 61 70 68 69 63  20 64 61 74 61 20 66 6f  |.graphic data fo|
00001350  72 20 61 20 62 72 69 63  6b 20 77 61 6c 6c 20 6f  |r a brick wall o|
00001360  6e 63 65 2c 20 61 6e 64  20 74 68 65 6e 20 63 6f  |nce, and then co|
00001370  70 79 20 69 74 20 6f 6e  74 6f 20 74 68 65 20 73  |py it onto the s|
00001380  63 72 65 65 6e 0d 77 68  65 6e 65 76 65 72 20 79  |creen.whenever y|
00001390  6f 75 20 77 61 6e 74 20  61 20 62 72 69 63 6b 20  |ou want a brick |
000013a0  77 61 6c 6c 2e 20 49 6e  20 53 68 69 70 77 72 65  |wall. In Shipwre|
000013b0  63 6b 65 64 2c 20 66 6f  72 20 65 78 61 6d 70 6c  |cked, for exampl|
000013c0  65 2c 20 74 68 65 20 67  72 61 70 68 69 63 0d 64  |e, the graphic.d|
000013d0  61 74 61 20 74 6f 20 64  65 73 63 72 69 62 65 20  |ata to describe |
000013e0  77 68 61 74 20 61 20 62  72 69 63 6b 20 77 61 6c  |what a brick wal|
000013f0  6c 20 6c 6f 6f 6b 73 20  6c 69 6b 65 20 74 6f 6f  |l looks like too|
00001400  6b 20 31 32 38 20 62 79  74 65 73 2e 20 59 65 74  |k 128 bytes. Yet|
00001410  20 65 76 65 72 79 0d 74  69 6d 65 20 49 20 77 61  | every.time I wa|
00001420  6e 74 65 64 20 74 68 61  74 20 62 72 69 63 6b 20  |nted that brick |
00001430  77 61 6c 6c 20 28 77 68  69 63 68 20 77 61 73 20  |wall (which was |
00001440  6f 76 65 72 20 61 20 68  75 6e 64 72 65 64 20 74  |over a hundred t|
00001450  69 6d 65 73 29 20 49 20  63 6f 75 6c 64 0d 73 69  |imes) I could.si|
00001460  6d 70 6c 79 20 75 73 65  20 6f 6e 65 20 62 79 74  |mply use one byt|
00001470  65 20 74 6f 20 73 61 79  20 22 50 75 74 20 61 20  |e to say "Put a |
00001480  62 72 69 63 6b 20 77 61  6c 6c 20 68 65 72 65 21  |brick wall here!|
00001490  22 2e 0d 0d 54 68 65 20  65 61 73 69 65 73 74 20  |"...The easiest |
000014a0  77 61 79 20 74 6f 20 75  73 65 20 74 68 69 73 20  |way to use this |
000014b0  62 6c 6f 63 6b 20 69 64  65 61 2c 20 61 73 20 79  |block idea, as y|
000014c0  6f 75 20 6d 61 79 20 61  6c 72 65 61 64 79 20 68  |ou may already h|
000014d0  61 76 65 20 72 65 61 6c  69 73 65 64 2c 0d 69 73  |ave realised,.is|
000014e0  20 75 73 69 6e 67 20 75  73 65 72 20 64 65 66 69  | using user defi|
000014f0  6e 65 64 20 63 68 61 72  61 63 74 65 72 73 2e 20  |ned characters. |
00001500  59 6f 75 20 72 65 64 65  66 69 6e 65 20 74 68 65  |You redefine the|
00001510  20 6c 65 74 74 65 72 73  20 6f 66 20 74 68 65 20  | letters of the |
00001520  61 6c 70 68 61 62 65 74  0d 61 73 20 64 69 66 66  |alphabet.as diff|
00001530  65 72 65 6e 74 20 70 69  63 74 75 72 65 73 2c 20  |erent pictures, |
00001540  61 6e 64 20 74 68 65 6e  20 75 73 65 20 74 68 65  |and then use the|
00001550  20 73 74 61 6e 64 61 72  64 20 42 41 53 49 43 20  | standard BASIC |
00001560  50 52 49 4e 54 20 63 6f  6d 6d 61 6e 64 20 74 6f  |PRINT command to|
00001570  0d 6f 75 74 70 75 74 20  74 68 65 73 65 20 70 69  |.output these pi|
00001580  63 74 75 72 65 73 20 74  6f 20 74 68 65 20 73 63  |ctures to the sc|
00001590  72 65 65 6e 2c 20 61 73  20 61 6e 64 20 77 68 65  |reen, as and whe|
000015a0  6e 20 74 68 65 79 20 61  72 65 20 72 65 71 75 69  |n they are requi|
000015b0  72 65 64 2e 20 42 75 74  2c 0d 61 73 20 77 65 20  |red. But,.as we |
000015c0  61 6c 72 65 61 64 79 20  72 65 61 6c 69 73 65 64  |already realised|
000015d0  20 69 6e 20 74 68 65 20  6c 61 73 74 20 61 72 74  | in the last art|
000015e0  69 63 6c 65 2c 20 74 68  69 73 20 6f 6e 6c 79 20  |icle, this only |
000015f0  61 6c 6c 6f 77 73 20 79  6f 75 20 74 6f 20 75 73  |allows you to us|
00001600  65 0d 6f 6e 65 20 63 6f  6c 6f 75 72 20 69 6e 20  |e.one colour in |
00001610  65 61 63 68 20 63 68 61  72 61 63 74 65 72 2e 20  |each character. |
00001620  45 76 65 6e 20 73 6f 2c  20 74 68 69 73 20 69 73  |Even so, this is|
00001630  20 61 20 72 65 61 73 6f  6e 61 62 6c 65 20 74 65  | a reasonable te|
00001640  63 68 6e 69 71 75 65 20  69 66 0d 79 6f 75 20 64  |chnique if.you d|
00001650  6f 6e 27 74 20 6d 69 6e  64 20 74 68 65 20 6c 61  |on't mind the la|
00001660  63 6b 20 6f 66 20 63 6f  6c 6f 75 72 2e 20 4d 61  |ck of colour. Ma|
00001670  6e 79 20 63 6f 6d 6d 65  72 63 69 61 6c 20 67 61  |ny commercial ga|
00001680  6d 65 73 20 61 63 74 75  61 6c 6c 79 20 6e 65 76  |mes actually nev|
00001690  65 72 0d 61 64 64 72 65  73 73 65 64 20 74 68 69  |er.addressed thi|
000016a0  73 20 70 72 6f 62 6c 65  6d 2c 20 61 6e 64 20 68  |s problem, and h|
000016b0  61 64 20 67 72 61 70 68  69 63 73 20 77 68 69 63  |ad graphics whic|
000016c0  68 20 6c 61 63 6b 65 64  20 63 6f 6c 6f 75 72 20  |h lacked colour |
000016d0  73 6f 6d 65 77 68 61 74  2e 0d 45 76 65 6e 20 44  |somewhat..Even D|
000016e0  69 7a 7a 79 20 28 66 6f  72 20 74 68 6f 73 65 20  |izzy (for those |
000016f0  77 68 6f 20 68 61 76 65  20 6e 65 76 65 72 20 68  |who have never h|
00001700  65 61 72 64 20 6f 66 20  69 74 2c 20 61 20 67 72  |eard of it, a gr|
00001710  65 61 74 20 61 72 63 61  64 65 20 61 64 76 65 6e  |eat arcade adven|
00001720  74 75 72 65 0d 6f 66 20  74 68 65 20 31 39 38 30  |ture.of the 1980|
00001730  73 2c 20 77 68 69 63 68  20 63 61 75 73 65 64 20  |s, which caused |
00001740  71 75 69 74 65 20 61 20  63 75 6c 74 20 66 6f 6c  |quite a cult fol|
00001750  6c 6f 77 69 6e 67 20 61  74 20 74 68 65 20 74 69  |lowing at the ti|
00001760  6d 65 20 6f 6e 20 74 68  65 0d 53 70 65 63 74 72  |me on the.Spectr|
00001770  75 6d 20 61 6e 64 20 43  36 34 2c 20 62 75 74 20  |um and C64, but |
00001780  6e 65 76 65 72 20 71 75  69 74 65 20 72 65 61 63  |never quite reac|
00001790  68 65 64 20 74 68 65 20  45 6c 6b 29 20 64 69 64  |hed the Elk) did|
000017a0  20 6e 6f 74 20 68 61 76  65 20 6d 6f 72 65 20 74  | not have more t|
000017b0  68 61 6e 0d 6f 6e 65 20  63 6f 6c 6f 75 72 20 28  |han.one colour (|
000017c0  6f 74 68 65 72 20 74 68  61 6e 20 62 6c 61 63 6b  |other than black|
000017d0  29 20 70 65 72 20 62 6c  6f 63 6b 2e 20 44 69 66  |) per block. Dif|
000017e0  66 65 72 65 6e 74 20 62  6c 6f 63 6b 73 20 77 65  |ferent blocks we|
000017f0  72 65 2c 20 68 6f 77 65  76 65 72 2c 0d 64 69 66  |re, however,.dif|
00001800  66 65 72 65 6e 74 20 63  6f 6c 6f 75 72 73 20 2d  |ferent colours -|
00001810  20 74 72 65 65 73 20 77  65 72 65 20 67 72 65 65  | trees were gree|
00001820  6e 20 61 6e 64 20 74 68  65 20 67 72 6f 75 6e 64  |n and the ground|
00001830  20 77 61 73 20 72 65 64  20 2d 20 62 75 74 20 74  | was red - but t|
00001840  68 65 72 65 0d 77 61 73  20 6e 65 76 65 72 20 61  |here.was never a|
00001850  6e 79 20 6f 76 65 72 6c  61 70 20 62 65 74 77 65  |ny overlap betwe|
00001860  65 6e 20 74 68 65 20 74  77 6f 20 63 6f 6c 6f 75  |en the two colou|
00001870  72 20 61 72 65 61 73 2e  0d 0d 54 68 65 72 65 20  |r areas...There |
00001880  69 73 2c 20 68 6f 77 65  76 65 72 2c 20 61 20 77  |is, however, a w|
00001890  61 79 20 6f 66 20 63 72  65 61 74 69 6e 67 20 61  |ay of creating a|
000018a0  6e 20 65 66 66 65 63 74  20 6a 75 73 74 20 6c 69  |n effect just li|
000018b0  6b 65 20 75 73 65 72 20  64 65 66 69 6e 65 64 0d  |ke user defined.|
000018c0  63 68 61 72 61 63 74 65  72 73 2c 20 62 75 74 20  |characters, but |
000018d0  69 6e 20 66 75 6c 6c 20  63 6f 6c 6f 75 72 2c 20  |in full colour, |
000018e0  61 6e 64 20 74 68 65 20  70 72 69 6e 63 69 70 61  |and the principa|
000018f0  6c 20 69 73 20 76 65 72  79 20 73 69 6d 69 6c 61  |l is very simila|
00001900  72 20 74 6f 0d 74 68 61  74 20 75 73 65 64 20 62  |r to.that used b|
00001910  65 66 6f 72 65 20 69 6e  20 73 61 76 69 6e 67 20  |efore in saving |
00001920  73 63 72 65 65 6e 20 6d  65 6d 6f 72 79 2e 20 42  |screen memory. B|
00001930  61 73 69 63 61 6c 6c 79  2c 20 79 6f 75 20 64 65  |asically, you de|
00001940  73 69 67 6e 20 79 6f 75  20 73 6d 61 6c 6c 0d 62  |sign you small.b|
00001950  6c 6f 63 6b 20 6f 6e 20  74 68 65 20 73 63 72 65  |lock on the scre|
00001960  65 6e 2c 20 75 73 69 6e  67 20 77 68 61 74 65 76  |en, using whatev|
00001970  65 72 20 74 65 63 68 6e  69 71 75 65 20 79 6f 75  |er technique you|
00001980  20 6c 69 6b 65 20 74 6f  20 64 72 61 77 20 69 74  | like to draw it|
00001990  2c 20 61 6e 64 20 74 68  65 6e 0d 73 61 76 65 20  |, and then.save |
000019a0  74 68 65 20 73 6d 61 6c  6c 20 70 61 72 74 20 6f  |the small part o|
000019b0  66 20 73 63 72 65 65 6e  20 6d 65 6d 6f 72 79 20  |f screen memory |
000019c0  77 68 69 63 68 20 63 6f  6e 74 61 69 6e 73 20 79  |which contains y|
000019d0  6f 75 72 20 64 65 73 69  67 6e 2e 20 54 68 69 73  |our design. This|
000019e0  20 74 69 6d 65 2c 0d 68  6f 77 65 76 65 72 2c 20  | time,.however, |
000019f0  79 6f 75 20 77 69 6c 6c  20 6e 6f 74 20 73 61 76  |you will not sav|
00001a00  65 20 69 74 20 74 6f 20  66 6c 6f 70 70 79 20 64  |e it to floppy d|
00001a10  69 73 63 2c 20 62 75 74  20 74 6f 20 61 6e 6f 74  |isc, but to anot|
00001a20  68 65 72 20 61 72 65 61  20 6f 66 20 6d 65 6d 6f  |her area of memo|
00001a30  72 79 2e 0d 59 6f 75 20  63 61 6e 20 74 68 65 6e  |ry..You can then|
00001a40  20 63 6f 70 79 20 74 68  69 73 20 62 6c 6f 63 6b  | copy this block|
00001a50  20 62 61 63 6b 20 74 6f  20 73 63 72 65 65 6e 20  | back to screen |
00001a60  6d 65 6d 6f 72 79 20 77  68 65 6e 65 76 65 72 20  |memory whenever |
00001a70  61 6e 64 20 77 68 65 72  65 76 65 72 20 79 6f 75  |and wherever you|
00001a80  0d 77 61 6e 74 20 69 74  2e 20 49 66 20 79 6f 75  |.want it. If you|
00001a90  20 77 61 6e 74 20 69 74  2c 20 73 61 79 2c 20 69  | want it, say, i|
00001aa0  6e 20 74 68 65 20 66 69  66 74 68 20 72 6f 77 20  |n the fifth row |
00001ab0  64 6f 77 6e 2c 20 61 6e  64 20 74 77 65 6c 76 65  |down, and twelve|
00001ac0  20 63 68 61 72 61 63 74  65 72 73 0d 61 6c 6f 6e  | characters.alon|
00001ad0  67 2c 20 79 6f 75 20 63  61 6e 20 63 61 6c 63 75  |g, you can calcu|
00001ae0  6c 61 74 65 20 77 68 65  72 65 20 61 62 6f 75 74  |late where about|
00001af0  73 20 74 68 69 73 20 63  6f 72 72 65 73 70 6f 6e  |s this correspon|
00001b00  64 73 20 74 6f 20 69 6e  20 73 63 72 65 65 6e 20  |ds to in screen |
00001b10  6d 65 6d 6f 72 79 2c 0d  61 6e 64 20 63 6f 70 79  |memory,.and copy|
00001b20  20 74 68 65 20 62 6c 6f  63 6b 20 74 6f 20 74 68  | the block to th|
00001b30  69 73 20 6c 6f 63 61 74  69 6f 6e 2e 20 41 73 20  |is location. As |
00001b40  74 68 65 20 62 6c 6f 63  6b 20 69 73 20 73 74 6f  |the block is sto|
00001b50  72 65 64 20 69 6e 20 79  6f 75 72 0d 63 6f 6d 70  |red in your.comp|
00001b60  75 74 65 72 27 73 20 52  41 4d 2c 20 61 73 20 6f  |uter's RAM, as o|
00001b70  70 70 6f 73 65 64 20 74  6f 20 6f 6e 20 66 6c 6f  |pposed to on flo|
00001b80  70 70 79 2c 20 74 68 69  73 20 74 72 61 6e 73 66  |ppy, this transf|
00001b90  65 72 20 63 61 6e 20 62  65 20 64 6f 6e 65 20 62  |er can be done b|
00001ba0  79 0d 6d 61 63 68 69 6e  65 20 63 6f 64 65 20 61  |y.machine code a|
00001bb0  74 20 76 65 72 79 20 67  72 65 61 74 20 73 70 65  |t very great spe|
00001bc0  65 64 20 28 74 61 6b 69  6e 67 20 6f 6e 6c 79 20  |ed (taking only |
00001bd0  61 20 73 6d 61 6c 6c 20  66 72 61 63 74 69 6f 6e  |a small fraction|
00001be0  20 6f 66 20 61 20 73 65  63 6f 6e 64 29 2e 0d 46  | of a second)..F|
00001bf0  6f 72 20 74 68 6f 73 65  20 70 72 6f 67 72 61 6d  |or those program|
00001c00  6d 65 72 73 20 77 68 6f  20 61 72 65 20 6e 6f 74  |mers who are not|
00001c10  20 66 61 6d 69 6c 69 61  72 20 77 69 74 68 20 6d  | familiar with m|
00001c20  61 63 68 69 6e 65 20 63  6f 64 65 2c 20 61 20 6d  |achine code, a m|
00001c30  6f 64 75 6c 65 0d 69 73  20 69 6e 63 6c 75 64 65  |odule.is include|
00001c40  64 20 77 69 74 68 20 74  68 69 73 20 74 75 74 6f  |d with this tuto|
00001c50  72 69 61 6c 20 61 6c 6c  6f 77 69 6e 67 20 79 6f  |rial allowing yo|
00001c60  75 20 74 6f 20 64 6f 20  74 68 69 73 2e 20 54 68  |u to do this. Th|
00001c70  65 20 70 72 6f 67 72 61  6d 20 63 6f 64 65 0d 66  |e program code.f|
00001c80  6f 72 20 74 68 69 73 20  6d 6f 64 75 6c 65 20 69  |or this module i|
00001c90  73 20 61 63 74 75 61 6c  6c 79 20 74 61 6b 65 6e  |s actually taken|
00001ca0  20 64 69 72 65 63 74 6c  79 20 66 72 6f 6d 20 53  | directly from S|
00001cb0  68 69 70 77 72 65 63 6b  65 64 2e 0d              |hipwrecked..|
00001cbc