HOW TO HACK

By Jon North

Sinclair ZX Spectrum
ISSUE 60
This month sees a slight difference to the column (apart from another change to the logo, probably). I'm taking a month out to answer some of your questions, because it seems that some of you are getting hopelessly lost by what I've been doing over the last few months.
First up, I've had absolutely billions of letters asking about the SoftRom (well, one or two anyway). It's basically similar to a Multiface, but instead of 8K ROM and 8K RAM, the SoftRom has 16K RAM. You can load your own ROM's into it and call them up as and when, for instance, you could load the Multiface ROM into it and change it into a Multiface. It cost 65 quid, but are now unavailable (as far as I know). I got mine from one of Graham Mason's (remember him?) mates, who builds them himself. If I find out where you can get them from (short of Input Output), I'll let you know.
Someone who doesn't have a name and address, or who simply forgot to put them on their letter, asked what the E stands for in Basic numbers, such as 33e3. E stands for Exponent, or in English, a power of 10. 33e3 is 33 with an exponent of 3, which is 10 cubed (1000), ie 33000. The easiest way to remember it is to think of 33 'e'xtended by 3 zeros.
Crosbie Smith, apart from sending his Turrican pokes, asked how to handle R-register decryption loops with DevPac. Very simply, move the loop somewhere convenient, start it with a DI: LD A,num: LD R,A and finish with LD A,R: breakpoint. The value returned in A is 2 more than the value of R (the command LD A,R increments R by two), but remember that bit 7 is always either set or reset (when R gets to 127, it increments to 0, not 128). To work out how much R will be incremented, find the amount of bytes taken by the instruction WITHOUT THE OPERANDS, for instance LD A,120 and LD HL,40000 both increment R by one, but LD A,R or LD IX,23400 will increment it by two. Finally LDIR, CPIR and the other "repeating" instructions increment R by BC*2, for instance an LDIR with BC=100 will increment R by 200 (but watch out for that 7th bit!)
A few of you wrote with problems hacking the Zythum loader, so here's Wayne Hazell of Rochester in Kent to explain it (I haven't seen it yet).

1. *Load the basic loader;
2. POKE 23997,43: POKE 23998,45 to make it return to Basic;
3. RANDOMIZE USR 23972 to load the main loader;
4. POKE 40064,43: POKE 40065,45 to make it return to Basic;
5. CLEAR 24150: RANDOMIZE USR 4e4 to load the game;
6. CLEAR 65535 and either hack it in the normal way or enter your pokes.
7. RANDOMIZE USR 50944 starts the game.

Cheers, Wayne, and thanks for the compliments!
Paul Miller is looking for more information on loaders. As I said at the start of this series, Paul, I'll be covering a different loader every month or two. I've already done Flashload and Bleepload, so get a few back issues!
A bit of a tricky one next. Stefan Dawson signs "Yours in complete frustratedness" after being unable to get Project Stealth Fighter to load into his +2 (with that tape deck I'm not surprised!). What should he do? I'm not sure, because I've only got a rubbery 48K (any unwanted 128's gratefully received), but generally the 128 paging routine is:

LD A,page
LD BC,7FFD
OUT (C),A

The value in A is calculated by the following:
Bit 0-2: page number 0-7, which appears at C000-FFFF
Bit 3 : in 0 then screen is from page 5; if 1 then screen is page 7
Bit 4 : if 0 then 128K ROM is resident; if 1 then 48K ROM
Bit 5 : if 1 then lock ULA in 48K mode. This is the same as typing "Spectrum" in 128K basic.
Try looking for the above code in the loader and the game, and playing around with it. But please, if you're going to send me listings, send assembler code, not hex dumps!
I hope that sorted out your problems. Next month will see a mammoth Speedlock Special, covering everything from Daley's Decathlon in 1984 to Vendetta, only a few months old. If you've got any snags, I advise you to see a doctor. If that doesn't help, write to Jon North, How-2-Hack, YS, 30 Monmouth Street, Bath, Avon BA1 2AP. Catch you next month.
Sinclair ZX Spectrum

  Previous Page Back Next Page