ZX games
Several errors crept into my article ZX-81 Games Writing in the November issue of Your Computer. These are as follows:
1. Program 2 — an open brackets symbol is missing in the Line 1 Listing. This should be placed between NOT and CLEAR.
2. Program 5 — the graphics character before the second RND should be CHR$63h not a space.
3. Hexloader — line 60 should read:
60 PRINT AT 11,7; X; “spc.”; A$(1 TO 2)
Text should read: ” To save typing both Rem statements type in line 1 REM 255 0s”.
4. Frogger program — to RUN the display Line 10 should be changed to:
10 RAND USR 16701
not USR 16702, as stated.
Stuart Nicholls,
Keynsham, Bristol.
Gremlins
Here are some amendments to Rod Hopkin’s Spectrum Flight Simulator — December issue — which other readers may find helpful. Most of them arise because the screen construction plotting commands do not correspond entirely with those of the main program.
Line 103: change address 23054 to 23086 and similarly change lines 8745 and 9521.
8710 DRAW 84,0 instead of 86,0
9657 DRAW 84,0 instead of 86,0
In line 9651 A$=”" should read
A$=”[12 Graphic 5s]“
Add the following lines
9658 PLOT 30,7: DRAW 28,0
9501 POKE 23200,0
There are also some errors in figure 3:
Line 24 FOR N=1 TO 14
should be:
FOR N=1 TO 16
To tidy up the screen display, the following line may be added to figure 3:
1010 OVER 1
1020 PLOT 31,17
1030 FOR Q=143 TO 153: PLOT Q,23: NEXT Q
1040 PLOT 143,25: PLOT 152,25: PLOT 153:25
1050 PLOT 152,33: PLOT 153,33
1060 OVER 0
1070 PRINT PAPER 4; AT 18,18; “O”
1080 PRINT PAPER 4; INK 7; AT 19,18; “O”
1090 FOR Q=143 TO 152: PLOT INK 7; Q,31: NEXT Q
2000 OVER O
S Rendall
Abergavenny, Gwent
Machine Code
I would like to make an amendment to figure 7, page 68 of the October issue. Lines 16540 to 16547 are missing — these can be seen in program 5c immediately above the erroneous program 7.
The code from address 16540 to 16546 has been omitted. It should have been the same as in program 5 above it, that is:
16540 LD HL (NN) 42 12 64
LD DE NN 17 3 0
ADD HL DE 25
Perhaps I can add two further points to the series which may help readers list and edit the program.
We use 118 for the end-of-line marker and this, of course, will stop the printer and REM from going beyond the point at which the number first occurs. You can get round this problem by using the following technique:
Required
LD A N 62 118
or
LD C N 14 118
Solution
LD A N 62 117
INC A 60
or
LD C N 14 117
INC C 12
Only one point to watch. INC affects the flag variable. Also if you use the number 126 in your machine code program, the five digits which follow it will not be shown on the screen.
Sinclair uses this code to indicate that a number follows, the number being stored in the next five addresses. If you now enter the code into the editor, parts will disappear. Solution — if you use the code 126 in your program, you must not edit the line. Try it, and see what happens.
Kathleen Peel,
Crowborough,East Sussex.
Hauser View
I would like to point out a few factual errors in your interview with Clive Sinclair since it refers to an earlier interview with me. Sinclair’s claim in paragraph 2, page 39 of your November issue that his display takes 8K to do exactly the same as Acorn’s display does in 20K is incorrect. As some people know, our display has the following eight graphic modes:
0: 640 x 256 2-colour
graphics and 80×32 text (20K)
1: 320 x 256 4-colour
graphics and 40×32 text (20K)
2: 160 x 256 16-colour
graphics and 20×32 (20K)
3: 80 x 25 2-colour text
Models A and B (16K)
4: 320 x 256 2-colour
graphics and 40×32 (10K)
5: 160 x 256 4-colour
graphics and 20×32 text (10K)
6: 40 x 25 2-colour text (8K)
7: 40 x 25 Teletext display (1K)
The Sinclair display has only one mode, and it can only display 40 characters on the screen, giving neither the 80-character option necessary for word processing, nor the 20-character option needed for demonstration to a number of people gathered around the display.
The main shortcoming of the Spectrum display, however, is its lack of high-resolution colour graphics: since colour can only be assigned to character fields, as opposed to individual pixels as in the Acorn computer range, the colour resolution is only 32 x 44 = 1,408 colour fields, as opposed to 160 x 256 = 40,960 in the Acorn case.
The lack of a palette, which allows instant colour changes on the screen, is another difference between Sinclair and Acorn. A palette is vital for animated graphics.
I also found Sinclair’s old advertisement in your November issue, which still compares the Spectrum board with the BBC board, claiming that the Spectrum “provides more power”. In a recent test the BBC Computer was shown to be almost four times faster than the Spectrum.
Although I think the Spectrum is a reasonable computer, Sinclair’s claims that it is “more powerful” than the BBC Computer and that it can do with 8K of memory what we need 20K for, cannot be substantiated and are simply false.
Hermann Hauser,
Managing Director, Acorn Computers.
Program Name
I have been very pleased with Mr Alan Went’s Program Name for the ZX-81, November, page 110. However, some of your readers may have been having problems with it. It will work perfectly with the improved ROM, but with the original ROM — the one with the arithmetic bug — it will only work in FAST mode. In SLOW mode it will print rubbish and sometimes crash. This is because it incorporates a call to the FAST routine and this was moved when the ROM was improved.
If you have the original ROM alter the beginning of line 10 to:
LET A$=”CD200F”
or use the program as it is, but then execute the instruction POKE 16515,32. In both cases the beginning of line 1 will then appear as
REM LN 4?
It is also worth mentioning that the routine does not alter the print position and so can be embedded easily in a fancy presentation. For example:
10 PRINT “PROGRAM TITLE:””””:
20 RAND USR 16514
30 PRINT ”””’
will produce:
PROGRAM TITLE: “NAME”
Finally, the program is not relocatable, as it incorporates calls to itself, but I will leave that up to the readers’ intelligence.
GJW Cunliffe,
Horsham, West Sussex
BBC Facts
In reply to GA Bobker’s letter, November, there are some facts that I feel should be corrected. I own a BBC Micro and, although I do agree that it is expensive, I do not agree with his comments on BBC Basic.
Overall, the BBC Micro mixes the best of both worlds. GA Bobker also said it was preferable to buy cheaper computers, hence more. He suggested a ZX-81 as an example of this idea, but I can tell you from personal experience that Sinclair Basic is even more non-standard than BBC Basic is supposed to be. An example of this is using X$(…) instead of the standard Mid$, Left$ and Right$, which the BBC uses, for string slicing.
PM Hxell,
Great Missenden, Buckinghamshire.
ZX Load
Many thousands of ZX-81 users are still plagued by the machine’s inability to LOAD and SAVE regularly. The problem seems to be that the TV is emitting a very powerful mains hum, which interferes with both tape recorder and computer. Try this: first of all, type SAVE “Filename”, then insert the Mic lead from the ZX-81 into the appropriate socket in the recorder. Next, insert a small earphone into the earphone socket on the recorder. Now, turn off the TV and allow it to cool down. Press Play/Record and NEWLINE. You will know then the saving is complete, from the sounds coming from the earphone.
This done, the program should LOAD back with little difficulty.
Robert Lazarus,
Harrow, Middlesex.
One-Liner
Andrew Glaister’s strange Spectrum One-Liner, page 25 November issue, creates its spectacular graphics by a software bug which can, however, produce several useful results. The fault stems from the angle portion of:
PLOT X,Y: DRAW A,B,N*PI
if large odd values of n are used. But when n = 63 an octagon is drawn, inscribed on an imaginary circle whose diameter is defined by the line joining (x,y) and (x+a, y+b).
If the value of n is altered to 189 an eight-pointed star is drawn. 24, 56 and 72-pointed stars can be drawn, using appropriate values of n. The following program shows the effect clearly by drawing a 3D view of an octagonal conic:
10 LET N=63
20 FOR A=120 TO 30 STEP -10
30 PLOT 55,27: DRAW A,A,N*PI
40 NEXT A
The list below shows the values of n that produce well-defined shapes. I have not yet been able to produce any sharp images of odd-sided polygons or stars.
N
Octagon 63 441 567 …
8 side star 189 315 693 819 …
24 side star 105 147 273 357 …
56 side star 225 279 297 …
72 side star 301 343 …
Alan Marley
Ruislip, Middlesex