forked from historicalsource/asteroids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
A35127.XX
581 lines (539 loc) · 12.5 KB
/
A35127.XX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
.TITLE ASTVEC - ASTEROID STATIC VECTORS
.RADIX 10
.ASECT
.SBTTL *****************************
.SBTTL * *
.SBTTL * PROGRAMMER: ED LOGG *
.SBTTL * *
.SBTTL *****************************
.GLOBL SHIPS,ROCKS,EXPPIC,SAUCER,EXPSHP ;GLOBAL ENTRY POINTS
.GLOBL TEST1,BNKERR ;SELF TEST PATTERNS
.GLOBL EXPDIR,ASTMSG,L0,SINCOS,SHIP17
.REPT 0
DATE INITIATED: 23-FEB-79
PROJECT CHARGE #: 21503
DISK #: 32 (BACKUP B46)
OTHER INFORMATION: SEE FILE 'ASTROD'
ASSEMBLY COMMAND: R MAC65
ASTVEC/A
LINK COMMAND: SEE FILE 'ASTROD'
.ENDR
.INCLUDE VECMAC
;ASCIN - TAKE AN ASCII STRING AND MAP 3 CHARACTERS TO 2 BYTES
;
;THIS MACRO PACKS 3 ASCII CHARACTERS (BLANK, A THRU Z,0,1 OR 2) INTO 2
;BYTES IN THE FORMAT
; AAAAABBB BBCCCCCD
;WHERE D=1 MEANS END OF LIST
; AAAAA,BBBBB,CCCCC=INDEX AS FOLLOWS
; 0=END OF LIST
; 1=BLANK
; 2=0
; 3=1
; 4=2
; 5=A
; ETC.
.MACRO ASCIN STRING
..N=0
.NCHR ..C,<STRING>
.ENABL M68
.IRPC ..5,<STRING>
..4=''..5
..C=..C-1
..3=0
.IIF EQ,..4-^H20,..3=1
.IF GE,..4-^H30
.IIF LT,..4-^H33,..3=..4-^H30+2
.ENDC
.IF GE,..4-^H41
.IIF LT,..4-^H5B,..3=..4-^H41+5
.ENDC
.IIF EQ,..N,..1=..3
.IIF EQ,..N-1,..2=..3
..N=..N+1
.IF EQ,..N-3
..N=0
.IIF EQ,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>+1
.IIF NE,..C,.WORD <..1*^H800>+<..2*^H40>+<..3*2>
.ENDC
.ENDM
.IIF EQ,..N-1,.WORD ..1*^H800
.IIF EQ,..N-2,.WORD <..1*^H800>+<..2*^H40>
.DSABL M68
.ENDM
.BRITE =7 ;VECTOR BRIGHTNESS
.BRITR =.BRITE+5
.=^H5000
TEST1: LABS 0,128 ;JMPL USED TO START THIS TEST
WAIT 7
VCTR 1023,0,.BRITE ;DRAW EDGE OF SCREEN
VCTR 0,767,.BRITE
VCTR -1023,0,.BRITE
VCTR 0,-767,.BRITE
VCTR 767,767,.BRITE ;DRAW 45 DEGREE LINES
VCTR 256,-256,.BRITE
VCTR -511,-511,.BRITE
VCTR -512,512,.BRITE
VCTR 256,255,.BRITE
VCTR 767,-767,.BRITE
LABS 1023,895 ;DRAW THE OTHER 45 DEGREE LINES
WAIT 7
VCTR -767,-767,.BRITE
VCTR -256,255,.BRITE
VCTR 512,512,.BRITE
VCTR 511,-511,.BRITE
VCTR -256,-256,.BRITE
VCTR -767,767,.BRITE
LABS 500,508
WAIT 7
VCTR 24,0,13
VCTR 0,4,0
VCTR -24,0,12
VCTR 0,4,0
VCTR 24,0,11
VCTR 0,4,0
VCTR -24,0,10
VCTR 0,4,0
VCTR 24,0,9
VCTR 0,4,0
VCTR -24,0,8
VCTR 0,4,0
VCTR 24,0,7
VCTR 0,4,0
VCTR -24,0,6
VCTR 0,4,0
VCTR 24,0,5
VCTR 0,4,0
VCTR -24,0,4
VCTR 0,4,0
VCTR 24,0,3
VCTR 0,4,0
VCTR -24,0,2
RTSL
.=.-2
CKSUM0: .BYTE ^H04C ;CHKSUM FOR 5000-53FF
.=.+1
BNKERR: LABS 300,228,1 ;SELF-TEST ERROR MESSAGE
WAIT 7 ;FOR BANK SELECT NOT WORKING
ALPHA <PAGE SELECT ERROR>
RTSL
ASTMSG: LABS 380,128 ;ASTEROIDS COPY RIGHT MESSAGE
WAIT 7
ALPHA <ASTEROIDS BY ATARI>
RTSL
EXPSHP: VCTR -8,-12,.BRITR ;PICTURES OF SHIP PIECES FOR EXPLOSION
VCTR 4,-8,.BRITR ;THESE MUST BE ALPH INSTRUCTIONS
VCTR 6,2,.BRITR
VCTR -8,8,.BRITR
VCTR -6,2,.BRITR
VCTR 4,-4,.BRITR
EXPDIR: .BYTE -40,30 ;(X,Y) CHANGE IN DIRECTION
.BYTE 50,-20 ;ALSO USED FOR STARTING POSITION OF EACH
.BYTE 0,-60 ;EXPLODING PIECE
.BYTE 60,20
.BYTE 10,70
.BYTE -40,-40
EXPPIC: JSRL EXP10 ;10/16 SIZE OF EXPLOSION
JSRL EXP12 ;12/16 SIZE OF EXPLOSION
JSRL EXP14 ;14/16 SIZE OF EXPLOSION
JSRL EXP16 ;EXPOLOSION PICTURES-FULL PICTURE
EXP16: VCTR -16,0,0 ;16/16 PICTURE OF EXPLOSION
VCTR 0,0,.BRITE
VCTR -16,-16,0
VCTR 0,0,.BRITE
VCTR 16,-16,0
VCTR 0,0,.BRITE
VCTR 24,8,0
VCTR 0,0,.BRITE
VCTR 16,-8,0
VCTR 0,0,.BRITE
VCTR 0,16,0
VCTR 0,0,.BRITE
VCTR 8,24,0
VCTR 0,0,.BRITE
VCTR -8,24,0
VCTR 0,0,.BRITE
VCTR -32,-8,0
VCTR 0,0,.BRITE
VCTR -24,8,0
VCTR 0,0,.BRITE
RTSL
EXP14: VCTR -14,0,0 ;14/16 PICTURE OF EXPLOSION
VCTR 0,0,.BRITE
VCTR -14,-14,0
VCTR 0,0,.BRITE
VCTR 14,-14,0
VCTR 0,0,.BRITE
VCTR 21,7,0
VCTR 0,0,.BRITE
VCTR 14,-7,0
VCTR 0,0,.BRITE
VCTR 0,14,0
VCTR 0,0,.BRITE
VCTR 7,21,0
VCTR 0,0,.BRITE
VCTR -7,21,0
VCTR 0,0,.BRITE
VCTR -28,-7,0
VCTR 0,0,.BRITE
VCTR -21,7,0
VCTR 0,0,.BRITE
RTSL
EXP12: VCTR -12,0,0 ;12/16 PICTURE OF EXPLOSION
VCTR 0,0,.BRITE
VCTR -12,-12,0
VCTR 0,0,.BRITE
VCTR 12,-12,0
VCTR 0,0,.BRITE
VCTR 18,6,0
VCTR 0,0,.BRITE
VCTR 12,-6,0
VCTR 0,0,.BRITE
VCTR 0,12,0
VCTR 0,0,.BRITE
VCTR 6,18,0
VCTR 0,0,.BRITE
VCTR -6,18,0
VCTR 0,0,.BRITE
VCTR -24,-6,0
VCTR 0,0,.BRITE
VCTR -18,6,0
VCTR 0,0,.BRITE
RTSL
EXP10: VCTR -10,0,0 ;10/16 PICTURE OF EXPLOSION
VCTR 0,0,.BRITE
VCTR -10,-10,0
VCTR 0,0,.BRITE
VCTR 10,-10,0
VCTR 0,0,.BRITE
VCTR 15,5,0
VCTR 0,0,.BRITE
VCTR 10,-5,0
VCTR 0,0,.BRITE
VCTR 0,10,0
VCTR 0,0,.BRITE
VCTR 5,15,0
VCTR 0,0,.BRITE
VCTR -5,15,0
VCTR 0,0,.BRITE
VCTR -20,-5,0
VCTR 0,0,.BRITE
VCTR -15,5,0
VCTR 0,0,.BRITE
RTSL
ROCKS: JSRL ROCK1 ;JSRL TABLE FOR ASTEROID PICTURES
JSRL ROCK2
JSRL ROCK3
JSRL ROCK4
ROCK1: VCTR 0,16,0
VCTR 16,16,.BRITE
VCTR 16,-16,.BRITE
VCTR -8,-16,.BRITE
VCTR 8,-16,.BRITE
VCTR -24,-16,.BRITE+1
VCTR -24,0,.BRITE+1
VCTR -16,16,.BRITE
VCTR 0,32,.BRITE
VCTR 16,16,.BRITE
VCTR 16,-16,.BRITE
RTSL
ROCK2: VCTR 16,8,0
VCTR 16,8,.BRITE
VCTR -16,16,.BRITE
VCTR -16,-8,.BRITE
VCTR -16,8,.BRITE
VCTR -16,-16,.BRITE
VCTR 8,-16,.BRITE
VCTR -8,-16,.BRITE
VCTR 16,-16,.BRITE
VCTR 8,8,.BRITE
VCTR 24,-8,.BRITE+1
VCTR 16,24,.BRITE+1
VCTR -16,16,.BRITE
RTSL
ROCK3: VCTR -16,0,0
VCTR -16,-8,.BRITE
VCTR 16,-24,.BRITE
VCTR 16,24,.BRITE
VCTR 0,-24,.BRITE
VCTR 16,0,.BRITE
VCTR 16,24,.BRITE
VCTR 0,16,.BRITE
VCTR -16,24,.BRITE
VCTR -24,0,.BRITE
VCTR -24,-24,.BRITE
VCTR 16,-8,.BRITE
RTSL
ROCK4: VCTR 8,0,0
VCTR 24,8,.BRITE
VCTR 0,8,.BRITE-1
VCTR -24,16,.BRITE
VCTR -24,0,.BRITE
VCTR 8,-16,.BRITE-1
VCTR -24,0,.BRITE
VCTR 0,-24,.BRITE
VCTR 16,-24,.BRITE
VCTR 24,8,.BRITE
VCTR 8,-8,.BRITE-1
VCTR 16,16,.BRITE-1
VCTR -24,16,.BRITE
RTSL
SAUCER: JSRL 10$
10$: VCTR -16,8,0
VCTR 32,0,.BRITR
VCTR 24,-16,0
VCTR -80,0,.BRITR+1
VCTR 24,-16,.BRITR+1
VCTR 32,0,.BRITR
VCTR 24,16,.BRITR+1
VCTR -24,16,.BRITR+1
VCTR -8,16,.BRITR
VCTR -16,0,.BRITR
VCTR -8,-16,.BRITR
VCTR -24,-16,.BRITR+1
RTSL
SHIPS: .WORD SHIP0 ;JSRL TABLE FOR SHIP PICTURES
.WORD SHIP1
.WORD SHIP2
.WORD SHIP3
.WORD SHIP4
.WORD SHIP5
.WORD SHIP6
.WORD SHIP7
.WORD SHIP8
.WORD SHIP9
.WORD SHIP10
.WORD SHIP11
.WORD SHIP12
.WORD SHIP13
.WORD SHIP14
.WORD SHIP15
.WORD SHIP16
SHIP0:
VCTR -24,-16,0
VCTR 0, 32,.BRITR
VCTR -16, 16,.BRITR-1
VCTR 96,-32,.BRITR
VCTR -96,-32,.BRITR
VCTR 16, 16,.BRITR-1
RTSL
VCTR -32,16,.BRITR ;FLAME PICTURE AFTER SHIP PICTURE
VCTR 32,16,.BRITR
RTSL
SHIP1:
VCTR -22,-18,0
VCTR -3, 32,.BRITR
VCTR -17, 14,.BRITR
VCTR 99,-22,.BRITR
VCTR -92,-41,.BRITR
VCTR 14, 17,.BRITR
RTSL
VCTR -33,13,.BRITR
VCTR 30,19,.BRITR
RTSL
SHIP2:
VCTR -20,-20,0
VCTR -6, 31,.BRITR
VCTR -19, 13,.BRITR
VCTR 100,-13,.BRITR
VCTR -88,-50,.BRITR
VCTR 13, 19,.BRITR
RTSL
VCTR -35,9,.BRITR
VCTR 28,22,.BRITR
RTSL
SHIP3:
VCTR -18,-22,0
VCTR -9, 31,.BRITR
VCTR -20, 11,.BRITR
VCTR 101,-3,.BRITR
VCTR -83,-58,.BRITR
VCTR 11, 20,.BRITR
RTSL
VCTR -35,6,.BRITR
VCTR 26,25,.BRITR
RTSL
SHIP4:
VCTR -16,-24,0
VCTR -12, 30,.BRITR
VCTR -21, 9,.BRITR
VCTR 101, 7,.BRITR
VCTR -76,-66,.BRITR
VCTR 9, 21,.BRITR
RTSL
VCTR -36,3,.BRITR
VCTR 23,27,.BRITR
RTSL
SHIP5:
VCTR -14,-25,0
VCTR -15, 28,.BRITR
VCTR -22, 7,.BRITR
VCTR 100, 17,.BRITR
VCTR -70,-73,.BRITR
VCTR 7, 22,.BRITR
RTSL
VCTR -36,-1,.BRITR
VCTR 21,29,.BRITR
RTSL
SHIP6:
VCTR -11,-27,0
VCTR -18, 27,.BRITR
VCTR -22, 4,.BRITR
VCTR 98, 27,.BRITR
VCTR -62,-80,.BRITR
VCTR 4, 22,.BRITR
RTSL
VCTR -35,-4,.BRITR
VCTR 18,31,.BRITR
RTSL
SHIP7:
VCTR -8,-28,0
VCTR -20, 25,.BRITR
VCTR -23, 2,.BRITR
VCTR 95, 36,.BRITR
VCTR -54,-86,.BRITR
VCTR 2, 23,.BRITR
RTSL
VCTR -35,-8,.BRITR
VCTR 15,33,.BRITR
RTSL
SHIP8:
VCTR -6,-28,0
VCTR -23, 23,.BRITR
VCTR -23, 0,.BRITR
VCTR 91, 45,.BRITR
VCTR -45,-91,.BRITR
VCTR 0, 23,.BRITR
RTSL
VCTR -34,-11,.BRITR
VCTR 11,34,.BRITR
RTSL
SHIP9:
VCTR -3,-29,0
VCTR -25, 20,.BRITR
VCTR -23,-2,.BRITR
VCTR 86, 54,.BRITR
VCTR -36,-95,.BRITR
VCTR -2, 23,.BRITR
RTSL
VCTR -33,-15,.BRITR
VCTR 8,35,.BRITR
RTSL
SHIP10:
VCTR 0,-29,0
VCTR -27, 18,.BRITR
VCTR -22,-4,.BRITR
VCTR 80, 62,.BRITR
VCTR -27,-98,.BRITR
VCTR -4, 22,.BRITR
RTSL
VCTR -31,-18,.BRITR
VCTR 4,35,.BRITR
RTSL
SHIP11:
VCTR 3,-29,0
VCTR -28, 15,.BRITR
VCTR -22,-7,.BRITR
VCTR 73, 70,.BRITR
VCTR -17,-100,.BRITR
VCTR -7, 22,.BRITR
RTSL
VCTR -29,-21,.BRITR
VCTR 1,36,.BRITR
RTSL
SHIP12:
VCTR 6,-28,0
VCTR -30, 12,.BRITR
VCTR -21,-9,.BRITR
VCTR 66, 76,.BRITR
VCTR -7,-101,.BRITR
VCTR -9, 21,.BRITR
RTSL
VCTR -27,-23,.BRITR
VCTR -3,36,.BRITR
RTSL
SHIP13:
VCTR 8,-28,0
VCTR -31, 9,.BRITR
VCTR -20,-11,.BRITR
VCTR 58, 83,.BRITR
VCTR 3,-101,.BRITR
VCTR -11, 20,.BRITR
RTSL
VCTR -25,-26,.BRITR
VCTR -6,35,.BRITR
RTSL
SHIP14:
VCTR 11,-27,0
VCTR -31, 6,.BRITR
VCTR -19,-13,.BRITR
VCTR 50, 88,.BRITR
VCTR 13,-100,.BRITR
VCTR -13, 19,.BRITR
RTSL
VCTR -22,-28,.BRITR
VCTR -9,35,.BRITR
RTSL
SHIP15:
VCTR 14,-25,0
VCTR -32, 3,.BRITR
VCTR -17,-14,.BRITR
VCTR 41, 92,.BRITR
VCTR 22,-99,.BRITR
VCTR -14, 17,.BRITR
RTSL
VCTR -19,-30,.BRITR
VCTR -13,33,.BRITR
RTSL
SHIP16:
VCTR 16,-24,0
VCTR -32, 0,.BRITR
VCTR -16,-16,.BRITR
VCTR 32, 96,.BRITR
VCTR 32,-96,.BRITR
VCTR -16, 16,.BRITR
RTSL
VCTR -16,-32,.BRITR
VCTR -16,32,.BRITR
RTSL
SHIP17: VCTR -16,-24,0 ;SHIP FOR NUMBER OF LIVES
VCTR 32,0,.BRITE
VCTR 16,-16,.BRITE
VCTR -32,96,.BRITE
VCTR -32,-96,.BRITE
VCTR 16,16,.BRITE
VCTR 80,24,0
RTSL
.=.-2
CKSUM1: .BYTE ^H032 ;CHKSUM FOR 5400-57FF
.=.+1
.INCLUDE VECAN
L0: .BYTE 10$-L0,11$-L0,12$-L0,13$-L0,14$-L0
.BYTE 15$-L0,16$-L0,17$-L0,18$-L0,19$-L0
.BYTE 20$-L0
10$: ASCIN ^/HIGH SCORES/
11$: ASCIN ^/PLAYER /
12$: ASCIN ^/YOUR SCORE IS ONE OF THE TEN BEST/
13$: ASCIN ^/PLEASE ENTER YOUR INITIALS/
14$: ASCIN ^/PUSH ROTATE TO SELECT LETTER/
15$: ASCIN ^/PUSH HYPERSPACE WHEN LETTER IS CORRECT/
16$: ASCIN ^/PUSH START/
17$: ASCIN ^/GAME OVER/
18$: ASCIN ^/1 COIN 2 PLAYS/
19$: ASCIN ^/1 COIN 1 PLAY/
20$: ASCIN ^/2 COINS 1 PLAY/
SINCOS: .BYTE 0,3,6,9,12,16,19,22 ;SIN(0 TO 7)
.BYTE 25,28,31,34,37,40,43,46
.BYTE 49,51,54,57,60,63,65,68
.BYTE 71,73,76,78,81,83,85,88
.BYTE 90,92,94,96,98,100,102,104
.BYTE 106,107,109,111,112,113,115,116
.BYTE 117,118,120,121,122,122,123,124
.BYTE 125,125,126,126,126,127,127,127 ;SIN(0-63)
.BYTE 127 ;SIN(64)
.NLIST MEB
.REPT ^H5800-.
.BYTE 0 ;FILL WITH ZEROS
.ENDR
.END