SPACE MINING
Alan Lee, Tring, Hertfordshire
from Your Computer, February 1984

SPACE MINING IS A game for the expanded ZX-81. You are in a cave on an
alien planet mining a precious grey mineral which makes up the roof of the
cave. The rock is brought down by shooting it. Before you can get to the
precious mineral you must shoot away the worthless black rock which protects
it; but this has a tendency to grow downwards towards you. If it reaches the
ground your base is destroyed.

You also have the problem of a UFO constantly patrolling the mine. When you
shoot down a block of the precious mineral, it leaves a hole in the roof
which the UFO may fire down at you. If you manage to clear a mine you are
moved on to another, where the black rock grows faster and the UFO becomes
more likely to fire at you.

To enter Space Mining, a Rem statement of 792 characters must be entered.
This can be done in the following way:

Enter line 1 REM @@108 characters@@; edit this for lines 2-7; type in the
following lines directly. Do not attempt to recall the listing by pressing
NEWLINE between each line, as this will crash the machine:

POKE 16511,26
POKE 16512,3
POKE 16514,118
POKE 16515,118
POKE 16510,0

Now type in 5 REM NEWLINE and POKE 16419,5. If you now press NEWLINE,
line 5 only will be displayed.

Enter program 1, the hex loader. Run the program and enter the hex codes as
listed in program 2. More than one code can be entered at once, hut do not
put spaces between the codes.

When the last code at 17305 has been entered the hex loader will stop.
Delete lines 10 to 50 then press EDIT and change line 5 to LET L=USR 17035.
Save the program on tape before attempting to run it. When the program is
run, there should he a line of grey squares near the top, with columns cf
black squares extending downwards.

Your laser base nearer the bottom of the screen, should move right when 8
is pressed and move left when 5 is pressed. 0 should fire a bomb, which
will travel upwards and should disappear when a black square is hit; one point
is scored for this. If a grey square is hit, it will reappear on the line
beneath your laser base; 10 points are scored for this. The UFO should be
continuously moving from right to left along the top line of the screen,
and it may release a bomb when flying over a gap in the roof.

If you are hit by one of these you lose one of your three lives. If a column
of black rock hits the ground, the game ends regardless of how many lives
you had left. If you remove all 28 grey squares, you move on to the next
screen.

If all of this does not happen, and the machine crashes, reload the program
and type in program 3, the hex checker, which will display the hex codes
you entered, in columns similar to program 2. Compare the codes displayed
with those in program 2; if a discrepancy is found, correct it by POKEing
the correct code direc1y; hex to decimal conversions are in the back of the
Sinclair manual.

To help debugging here is a list of the locations of the more important
routines.

16576 to 16614: extends a column of black rock
16615 to 16643: starts a bomb when '0' is pressed
16671 to 16750: moves this bomb
16751 to 16800: moves the UFO
16801 to 16843: moves UFO bombs
16854 to 16872: prints your laser base
16918 to 17034: sets up screen layout
17035 to 17118: main loop

To make the black rock advance faster POKE 17063,23 or POKE 17062,0 to make
them advance slower.

To make the UFO fire more often, POKE 16790,23 or POKE 16789,0 to make them
fire less often.

To slow the game down generally, POKE 17109 with a high number, or a
two-byte number  greater than 256 into 17109 and 17110 by the method shown
on page 177 of the ZX-81 manual. The original contents of 17109 and 17110
are 1 and 0 respectively. The byte at 17037 is 43 hex.
