PROGRAM PITSTOP
from Your Sinclair #29 (May 1988)

Guess who? Nope, not Terry Wogan, not Anneka Rice - just plain ol' David
"The Rabid" McCandless and his programming endeavours.


This month's Pitstop has a distinctly foreign flavour. No, I didn't
spill vindaloo over it, but half the routines have been sent in from
overseas. First there's Ruud Muilwijk's screen shading routine Shades,
and Alexandre Cunha's +3 Recover program. Not to mention me, with the
next bed-wetting, nail-biting instalment of Arcade Antics. Oh, and I
mustn't forget that ace programmer Dave Thompson who isn't from over-
seas, but as he comes from "up north" he counts as a foreigner.

Pitstop's getting bigger and better every month, so keep up the trend.
If possible send all your routines on tape and include a source code
listing. I'll try and return all your tapes (please send a SAE) within a
month, but bear with me.

Right now, on to the juicy bit - lemme have all of your programs. And if
you're a professional programmer, don't just sit back and let the
amateurs take over. Show us what you're made of. Send all contributions
to David McCandless, Program Pitstop, YS, 14 Rathbone Place, London W1P
1DE. Don't forget to send a piccy and some gen on yourself. And the best
contribution gets a dosh handout.


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


PROPORTIONAL PRINTING (Arcade Antics)
by David McCandless
from Your Sinclair #29 (May 1988)
[files PROPPRNT.*]

Letters are a little like people in a way. You know, fat, tall, thin,
small, straight, curved, wiggly! But the Speccy treats them all the same
way - as if they were one byte wide. But this is where I come in. I've
developed a routine that prints a string of letters proportionally,
without the extra 768 bytes a slick character set would need. Cool eh?

Method

Right, let's get going. Use the Hex Loader (from Recover +3) to input
the short routine, saving it with SAVE "print" CODE 40136,216. Then
follow it up with the little demo program that'll have effective 42
column text spurting about all over the screen. Brill!
[There should have been 217 bytes in the m/code; 40352=9C(156)]
[completes the return JP address after dealing with CHR$ 13.  ]

Fat, slim, thin

To use the routine as it stands, you need to prepare a string in memory.
So, let's say your string is at 40000. POKE this address into the
routine with:

POKE 40153,40000-256*INT (40000/256)
POKE 40154,INT (40000/256)

Then if you're feeling cocky (oo-er), you can use these specialist
control codes in your string:

Codes

22 - PRINT AT. You must follow it with two numbers, the X and Y co-ordinates.
[The following two numbers should be: Y line offset, X pixel offset.]
13 - RETURN. This'll make the string begin again on the next line down.
00 - This tells the routine that it's reached the end of the string.

Should you be an artistic type and have your own font in memory, then
POKE its address into 40139 and 40140 in the same way as you POKEd the
message address. The default address is 15360 (#3C00 in Hex).

After doing that, just type RANDOMIZE USR 40136 to see your string
deposited on the screen. If you're still lost then examine the demo
program for further info. Got it?


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


SHADES (Screen Shader)
by Ruud Muilwijk
from Your Sinclair #29 (May 1988)
[files SHADES.*]

Hold on! I know what you're thinking. You're thinking that these are the
kind of shades you wear when you go to the bar and ask for a Babycham.
But - you're wrong. This is actually a very nifty program for shaded
screen dumps from Ruud Muilwijk. The dumps from the program will work on
any printer, including the ZX printer, as long as it uses the COPY command.

Method

Type in the Basic listing, save it with SAVE "SHADE1" LINE 10 and then
type the small code SAVE "SHADE2" CODE 60000,112. [The CODE actually has
to be saved as "shaded.o" to match what is expected by the Basic
listing. Jimg] Now you're all set.

Shading

The future's so bright I gotta wear ... ahem! Running the program makes
a menu flash (oo-er) on the screen. Follow these instructions to use it:
SHADE - This option will shade the current screen in memory by changing
all the paper and ink colours into pixel patterns.
BLACK/WHITE - This'll shade the screen into just two shades.
SHADED - This allows you to select the shades. On the bottom of the
screen you'll see ABCDEFGH change into the shady patterns.
ISOLATE - This powerful option'll let you isolate particular colours.
Enter a number 0-7 after the prompt, then press Enter and type another
if you want. Press Enter twice to finish. Now when you press 0 (shade)
only the selected colours will appear shaded. This is very useful if you
want to merge screens with each other.
SHOW SCREEN - This'll just display the whole screen with no menu
obscuring it.
GET ORIG - This retrieves the original piccy back, just in case you made
a pig's ear of the copy.
LOAD UDG - You can even define your own shades patterns as UDGs and load
them with this option.
SAVE SCREEN - Pretty self-explanatory really. It won't save the
original.
LOAD SCREEN - Whaddya mean you don't understand this?
PRINT - Yes, you've guessed it, this dumps screens to printer.

Well, that's pretty easy. Get typing.


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


RECOVER +3
by Alexandre Cunha
from Your Sinclair #29 (May 1988)
[files RECOVER3.*]

This is our first +3 utility and well useful it is too! You can use it
when you get into a fit with your computer and accidentally erase a file
from disk. Thanks go to Alexandre Cunha.

Method

As you can see, there are three main routines: old Hex Loader, the usual
Basic listing and a daunting chunk of Hex. Just use the Hex Loader to
pile in the chunk of Hex numbers and then type in the Basic listing.
Keep the Hex Loader on tape.

Recovering

Yes, I'm feeling much better thank you. Once you've typed in the
programs, Saved and Verified them, you Run the Basic and follow the
prompts to recover your files. If you've saved anything after acci-
dentally erasing, then don't be surprised if your file is corrupted. To
check whether Recover is working correctly, type in this example and
insert a new disk:

SAVE "a:exp1.exp"
SAVE "a:exp2.exp"
ERASE "a:*.exp"
CAT "a:*.exp"

Now run Recover and both files (exp1 and exp2) will re-appear.

Basic Listing

Yeah, pretty simple innit? Ha! Save this with SAVE "RECOVER1" LINE 60.

Machine Code

Save the program with SAVE "RECOVER2" CODE 30000,400; or if you want to
save it to disk then SAVE "rec.code" CODE 30000,400. ["rec.code" is an
invalid file name for disk; it should be "recover.cod" to match the name
expected in the Basic listing. JimG]


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


STAR TIP 10
by David Thompson
from Your Sinclair #29 (May 1988)
[files STARTIPA.*]

[There were several errors in this listing, which I've corrected. ]
[1. The eight bytes starting at 45800 were printed twice.         ]
[2. The title wasn't centred properly.                            ]
[3. The phrase "YOUR ONE MEAN MAN" was grammatically incorrect,   ]
[   so I changed it to "YOU'RE A MEAN MAN".                       ]
[4. The bottom line of keys "YZ[\]RE" should be "YZ [\]RE" (ie.   ]
[   the third character should be a space), so any character      ]
[   selected after Z on the bottom line came out wrong. I inserted]
[   the missing space, which meant moving down the location at    ]
[   which the hi-score was held.                              JimG]

At last! For all of you who've been suffering from extreme, excruciating
Star Tip withdrawal symptoms, here's one at last. Phew! It's from David
Thompson and it's a great, soopa, smashing, ace (etc), Hi-Score chart.
Let's hear it for Dave! Raaayhhhhhh!

Dave

As you can see from the picture, Dave has a head, a couple of legs, and
- oh look! - two arms. Wow! He started programming on a ZX81 at the
cherubic age of 13, about five years ago. His first game was Butch Hard
Guy, followed by the cool Ultimate Combat Mission, and the forthcoming
Future Bike Simulator, designed by "Playability by Design", graphicked
by Dennis Mulinen, and consulted by Mark Wallace. In his spare time he
dons his Green Beret for a bout of Russki bashing, and we all hope he's
gonna' be a regular contributor to these pages (get the hint Dave?).

Method

Type in the code with the Hex Loader, save it with SAVE "hi-score" CODE
45000,904, and then RANDOMIZE USR 45000 to score highly.

The Charts That Count

The first thing you'll see when you type RANDOMIZE USR 45000 will be a
straightforward "are you asleep yet?" GAME OVER message. Just press any
key and you'll be greeted by a table of letters, a row of dots, and a
blank stare reflected back at you from the black TV screen. You'll also
see that one of the letters is darker than the rest; this is the cursor.
Press Z and X to move it left or right, and then press SPACE to place
the current letter onto the dots. In this way, you can spell your name.
The R letter represents a backspace, and the E letter will quit the
chart. Once you've finished, the chart will appear for you to goggle at.

The maximum number of digits is seven and these should be POKEd into
addresses 45890-45896. Should you decide to use an alternative (yes,
very rude) character set, you must POKE its address into 45104 and 45105
(hi and low bytes respectively). And if you do use another character
set, characters 91, 92 and 93 ([,\,]) can all be re-defined.

The Code

Look, I know it's big, I know you've hardly any time, yes I know the
cheetah is the fastest land animal, but this is worth it, especially if
you need a Hi-Score chart on your most recent megagame.


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


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England (http://www.users.globalnet.co.uk/~jimg/)
--

