Here is the first Breakout Game I typed with a friend, on the ZX81 ...
Francois LE COAT wrote:EED4B206E0922226E2A286E0922246E7A8357AFBA2007E13600606936800E0A06000420FD0D20F83A316E47AFB83804010000C93A2540473EF7B820041EFD18073EEFB8204E1E033A2A6EF58306FEB820023E01061FB820023E1C211111222540C148F506002A2B6EE50970237023702A2D6EE5097023702370E1D1F1D54F32
Here is the first Breakout Game I typed with a friend, on the ZX81 ...
I managed to OCR your PDF, tidy it up, and with the help of
ZXText2P[1], get it into an emulator. Unfortunately, I think there
might still be a typo in the machine code. I certainly missed a couple
in the BASIC at first. It doesn't crash the machine, surprisingly, but
it's definitely not working properly.
In days gone by, I'd probably have been flamed for posting an entire
listing, but there's hardly anyone around here any more, and it's not
very long, so screw it. I had to change the graphics characters to hash
signs (which ZXText2P turns into pound symbols, for some reason) but
they're easy enough to change back in the emulator.
1 REM AUTEUR REMY HEAULME
2 REM ******MUR******
5 FAST
10 LET DFILE=PEEK 16396+2S6*PEEK 16397
20 LET R=3E4
30 LET C$="2A206E3A336EBC300A3A326EBD3004010100C916001E002A226EAFBE28051601CD4A762A246EBE28051E01CD4A76BA2011BB200EED4B266E094E282D16015ACD4A76BA280F3A266EED4432266E3A276E2F32276EAFBB280F3A286EED4432286E3A296E2F32296E18112A266EED4B286E09ED4B206EC50922206E2A266
49 FOR X=1 TO LEN C$-1 STEP 2 50 POKE R+INT ((X-1)/2), (CODE C$(X) -28) *16+CODE C$ (X+1) -28 60 NEXT X
70 LET N=0
71 CLS
75 PRINT "QUEL NIVEAU ?","1 TRES BON",,"2 BON",,"3 MOYEN",,"4 DEBUTANT"
80 PAUSE 4E4
85 LET Z=(CODE INKEY$-28) *3+8
90 POKE 30155,Z
100 CLS
110 LET a=28192
120 LET B=INT (RND*30) +2+DFILE+.33*6
130 POKE A,B-256*INT (B/256)
135 POKE a+1,INT (B/256)
140 POKE A+2,B+1-256*INT ((B+1)/256)
145 POKE A+3,INT ((B+1) /256)
150 POKE A+4,B+33-256*INT ((B+33) /256)
155 POKE A+5,INT ((B+33) /256)
160 POKE A+6,1
165 POKE A+7,0
170 POKE A+8,33
175 POKE A+9,0
185 POKE A+10,16
190 LET B=DFILE+33*21+1
195 POKE A+11,B-256*INT (B/256)
200 POKE A+12, INT (B/256)
205 LET B=DFILE+33*14+1
210 POKE A+13,B-256*INT (B/256)
215 POKE A+14, INT (B/256)
220 POKE A+17,90
225 LET B=DFILE+33*14+3
230 POKE A+18,B-256*INT (B/256)
235 POKE A+19, INT (B/256)
240 SLOW
250 REM DESSIN DE L ECRAN
260 PRINT "################################"
280 FOR X=0 TO 21
290 PRINT AT X,0;"#""; TAB 31;"#"
300 NEXT X
310 FOR Y=5 TO 7
340 PRINT AT Y,1;"##############################"
350 NEXT Y
360 PRINT AT 14,16;"###";AT 21,16;"###"
370 REM DEBUT DU PROGRAMME DE CALCUL
400 LET A=USR 30000
410 IF A THEN GOTO 500
420 LET N=N+1
430 GOTO 100
500 LET P=N*90+90-PEEK 28209
510 PRINT AT 10,0;"VOUS AVEZ ";P;" POINT";
520 IF P>1 THEN PRINT "S"
530 PRINT AT 12,0;"AU NIVEAU ";(Z-8) /3
540 PRINT AT 20,0; "APPUYEZ POUR UN AUTRE ESSAI"
550 PAUSE 4E4
560 GOTO 70
[1] http://freestuff.grok.co.uk/zxtext2p/index.html
This is really kind of you to have prepared all this work for me.
I will manage to make it work. I know I can, because it already
worked.
Francois LE COAT wrote:
This is really kind of you to have prepared all this work for me.
I will manage to make it work. I know I can, because it already
worked.
Not a problem. It's been a long time since I did anything on the ZX81,
so I quite enjoyed the nostalgia. :) (And don't worry; it didn't take
as long as you might think. Maybe a couple of hours in total. The OCR
was surprisingly good.)
I think I felt a certain affinity with your problem, because I've
lost the first game I ever wrote. It *might* still be hanging around on
a cassette somewhere, but I haven't been able to find it.
Good luck! Let us all know how you get on.
I corrected the sources, loading the ZX81 program with the emulator.
The actual problem is the game can't be played. The breakout graphics
are drawn, but the ball is not displayed. Nothing happens.
Francois LE COAT writes:
I corrected the sources, loading the ZX81 program with the emulator.
The actual problem is the game can't be played. The breakout graphics
are drawn, but the ball is not displayed. Nothing happens.
One more typo: on line 10, 2S6 should be 256 (digit 5 not letter S). If
I load your breakout.p and fix that line, it works!
Francois LE COAT <lecoat@atari.org> writes:
I corrected the sources, loading the ZX81 program with the emulator.
The actual problem is the game can't be played. The breakout
graphics are drawn, but the ball is not displayed. Nothing happens.
One more typo: on line 10, 2S6 should be 256 (digit 5 not letter S).
If I load your breakout.p and fix that line, it works!
Adam Sampson wrote:
Francois LE COAT writes:
I corrected the sources, loading the ZX81 program with the emulator.
The actual problem is the game can't be played. The breakout
graphics are drawn, but the ball is not displayed. Nothing happens.
One more typo: on line 10, 2S6 should be 256 (digit 5 not letter S).
If I load your breakout.p and fix that line, it works!
Aha! I thought I'd caught all of those. And, now I see it, I think I
know what happened: I was so worried about making sure the machine code
was right, I probably just skimmed past everything before it.
I couldn't understand why it *almost* worked. Usually when you get a
typo in a hex listing like that, it crashes spectacularly. But it makes
sense now.
Great teamwork, folks! :)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 64:57:23 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,834 |