Maggot - John Charlesworth (Your Computer-November 83-Page 134)

THE INSECTS FIGHT BACK IN JOHN CHARLESWORTH'S FAST-MOVING GAME FOR THE
SPEC- TRUM. ASSORTED MOLLUSCS AND ARACHNIDS ARE INTENT ON YOUR
DESTRUCTION. AND THE OBJECT? SIMPLY STAY ALIVE.

This machine code program entitled Maggots playes the arcade game of
centipede on any ZX Spectrum, 16K or 48K. This version has on-screen
scoring, machine- code sound, a high-score table and high-speed colour
action involving a mag- got, a bounching spider, a very fast snail and
your laser base.

The idea in maggots is that you, a little laser base must survive in a
mush- room field while all manner of creepy crawlies try to kill you.
You start off with three lives but you lose a life wach time you are
hit by the spider or a segment of the maggot.

If you bump into the snail it will just go round you. The snail does,
how- ever, have a nasty trick - if the snail bumps into a mushroom it
will poison it - the mushroom turns from red to green - and later if
the maggot hits a poisoned mushroom it will be poisoned and plummet
downwards.

To survive you are armed with a laser gun and this is used to shoot up
any- thing that moves and anything which does not. If you shoot a
spider or a snail you get 100 points. A segment of the maggot is worth
50 points and where it is shot a mushroom will grow. If you shoot the
maggot in the middle it will split up, this will also happen if the
spider hits it. For shooting a mushroom you earn 10 points.

When you have finally killed the maggot you will be placed in a new
mushroom field with a slightly longer maggot, up to a maximum lenght
of 20 segments. If the maggot ever reaches the bottom of the screen it
will keep wandering around in the lower few lines of the screen until
either the maggot or you are dead.

For those people interested in machine code the main subroutine and
their addresses are given in figure 1 in case you wish to disasemble them.

To enter the program, type in listing 1 and then Save it using:
        SAVE "MAGGOT" LINE 1
Do not Run it yet as it calls a machine-code routine which has not yet
been Poked in and so might crash. Now comes the task of typing in the
2K of machine code.

Type NEW to clear out the computer and then enter listing 2. When Run
it should take about two minutes to Poke in the 2K of machine code. As
the pro- gram Pokes the code in, it will also check it is correct with
a checksum. If it is incorrect it will tell you which lines is wrong.
After the program fi- nally runs correctly, Save the resultant code with:
        SAVE "CODE" CODE 30500,2267
and then verify it with:
        VERIFY "CODE" CODE
When you now Load the program it will auto-run and Load the machine
code, then it will play the game. The instructions are printed on
Running the game. Finally at first you are not very good at the game,
address 30613 holds the initial number of lives +1 so if you want n
lives type poke 30613,n+1.

FIGURE 1:

Read keyboard           32515
Move laser base         32350
Print score             32290
Move / fire missile     31570
Move maggot             31240
Move / start snail      31080
Move / start spider     30890
Print screen            30750
Main program            30580

TYPE: Arcade (Centipede)


This info file was typed by Michael Bruhn


Modification from YC Feb'84, page 44 (not included)
------------------------------------
[...]
To make the game slightly more playable, if you
	POKE 31435,0
then the maggot returns to the top of the screen once it reaches the
bottom.
  On the machine code: I notice J Charlesworth uses the powerful Z-80
instruction LDIR, but further savings could be made in the keyboard
sub-routines. Instead of, for example:
	IN A,(c)
	AND 16
	CP 16
	JR Z d
to mask off one key,
	IN A,(c)
	BIT 4,A
	JR NZ d
does the same with a two byte saving, etc.
E.A. Kissack
RAF Wildenrath

