PROGRAM PITSTOP
Your Sinclair, February 1990

And now, direct from a smelly bed somewhere near
Kent University, it's (da da!) Jonathan Daviezzzzzzzzz!

Here's an interesting thought - the total number of different programs
that could be written on the Speccy is two raised to the power of
336000 (ish). That's two with 10,000 zeros after it, a number which
would fill about one and a half pages if I wrote it out in full (so
I'd better not). Blimey. Most of them would be pretty crap, of course,
printing flashing squares all over the screen and that kind of thing,
but they'd keep the CodeMasters in baggy T-shirts for years to come.
An interesting thought.

Or maybe not. Shows how bored I am, doesn't it? Life at "Uni" (as we
call it) can get pretty tedious at times, what with everything laid on
so I hardly have to lift a finger. Lardy da! All I seem to have to do
is get up in the morning and go to bed again in the evening, if that.
Ah well, only 2.666666 years to go and then I'm out. (On yer bum,
mate!! Ed) In the meantime, here's some stuff to type in.

Entertainment this month comes courtesy of, among others, Daniel
Cannon and his mesmerisingly marvellous Minstrel, which will allow 48K
owners to realise their ultimate fantasy (ooooo-er!). Then we've got
those Prog Pit Good Lifers, the Fractal Farm, with a postscript to
last month's Machine Code Mandelbrot generator, Son Of Mandelbrot.
This one's called, erm, Mandelbrot - The Story Continues. Makes sense,
doesn't it?

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

MINSTREL
by Daniel Cannon

[The article doesn't give the USR address to run the CODE (it's not]
[the load address), but 64849 seems to work OK.                JimG]

I seem to get hundreds of letters every week from frantic 48K owners
clamouring to know how to make their Speccies play tunes in the
background while they get on with running their programs. So you can
probably imagine my relief when this one turned up. With a minimal
amount of fingertip fatigue you too will now be able to add musical
accompaniment to even the most stubborn of games.

Getting the show on the road is simplicity itself. Actually, it's a
little tricky, but not off- puttingly so. As always, knock in the
Basic first and save it. Follow this with the hex, which should be
entered via the Hex Loader at address 64834. Then reload the Basic and
run it. You'll be asked to enter a number. This is the length of each
chunk of a note (lots of chunks are played very quickly, one after the
other, to give a fair impression of a continuous note). Values of
between .002 and .009 give a reasonable result without slowing down
the computer too much.

You'll then be asked to load the Machine Code back in. Finally, a
stand-alone block of code will be generated and saved on to tape ready
to be loaded back in at a later date.

Before you can get the thing to actually play a tune you'll need to
tell it the notes to play. These are represented by the following
values:
	-28: Stop tune
	-27: Restart tune
	-26: Pause for current note length
	-25,x: Change note length to x 50th of a second
	-24...+24: Normal beep value of pitch

To POKE them into memory, might I suggest a program along the lines of
the following?

This plays the scale of C major with notes of 0.2 seconds length, over
and over again. The first person to send in the whole of Beethoven's
9th Symphony (with choral parts included) wins a YS badge. They don't
call me Jonty The Generous for nothing.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

MANDELBROT - THE STORY CONTINUES
by The Fractal Farm

Right, this is definitely the last Mandelbrot generator. I promise.
I've just got this urge to keep printing them at the moment. And the
Fractal Farm have to have their say after all.

This one is part machine code, part Basic, but it manages to churn out
a set at a fair rate owing to a radically different algorithm. Where
other generators plot every point in the set, this one just goes round
the edge. You'll see what I mean when you run it. It also cheats a bit
by using the symmetry of the set to avoid doing everything twice.

Okay, type away.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Cock-Up Corner
Getting to be a bit of a habit this, isn't it? Referring back to the
Mandelbrot Magic program in the November issue I note that I wrote the
following: "Nothing fractal-related would be complete ..." And, sure
enough, the listings weren't. I missed the last line. This line, in
fact - 250 NEXT N: NEXT M

Thank you, Brooke Westcott, for your correction. Now beat it before I
kick you!

Bye Now!
Right, I'm going back to bed now for a hard(ly)-earned rest. I've got
no lectures for at least four days so when I wake up I expect to see
all your truly scrumptious programs lying on my doormat. Got that?
Right. And don't forget that #50 prize. It might be yours if you come
up with a really spanky Prog Pit popper. The address is Program
Pitstop, Your Sinclair, 14 Rathbone Place, London W1P 1DE.
