-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathStarRaiders.source.txt
13525 lines (13521 loc) · 820 KB
/
StarRaiders.source.txt
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
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
00001 ;*******************************************************************************
00002 ;* *
00003 ;* S T A R R A I D E R S *
00004 ;* *
00005 ;* for the Atari 8-bit Home Computer System *
00006 ;* *
00007 ;* Reverse engineered and documented assembly language source code *
00008 ;* *
00009 ;* by *
00010 ;* *
00011 ;* Lorenz Wiest *
00012 ;* *
00013 ;* (lo.wiest(at)web.de) *
00014 ;* *
00015 ;* First Release *
00016 ;* 22-SEP-2015 *
00017 ;* *
00018 ;* Last Update *
00019 ;* 10-DEC-2016 *
00020 ;* *
00021 ;* STAR RAIDERS was created by Douglas Neubauer *
00022 ;* STAR RAIDERS was published by Atari Inc. *
00023 ;* *
00024 ;*******************************************************************************
00025
00026 ; I wrote this document out of my own curiosity. When STAR RAIDERS was released
00027 ; in 1979 it became the killer app for the Atari 8-bit Home Computer System.
00028 ; Since then I have always been wondering what made it tick and how its (at that
00029 ; time) spectacular 3D graphics worked, especially the rotating star field.
00030 ; Impressed by "The Atari BASIC Source Book" I decided to reverse engineer the
00031 ; STAR RAIDERS 8KB ROM cartridge to recreate a fully documented assembly
00032 ; language source code file. I had no access to the original source code, so the
00033 ; only way to succeed was a combination of educated guesses, trial-and-error,
00034 ; and patience. Eventually, I made it.
00035 ;
00036 ; Essential in preparing this document were three programs I wrote:
00037 ;
00038 ; (1) A 6502-cross-assembler based on the syntax of the MAC/65 assembler for the
00039 ; Atari 8-bit Home Computer System to create the binary file that I verified
00040 ; against the binary of the original ROM cartridge.
00041 ;
00042 ; (2) A text formatter to layout the source code file with its copious comment
00043 ; sections. This was a big time saver, because as the documentation grew the
00044 ; source code had to be reformatted over and over again.
00045 ;
00046 ; (3) A symbol checker to verify that the ubiquitous symbol-value pairs in the
00047 ; documentation match the corresponding symbol values produced by the
00048 ; assembler.
00049 ;
00050 ; This assembly language source code file is compatible with the MAC/65
00051 ; assembler for the Atari 8-bit Home Computer System. I was able to assemble it
00052 ; on an emulated Atari running MAC/65, producing the identical binary of the ROM
00053 ; cartridge.
00054 ;
00055 ; Your feedback is welcome! Send feedback to lo.wiest(at)web.de.
00056 ;
00057 ; Enjoy! -- Lorenz
00058
00059 ;*******************************************************************************
00060 ;* *
00061 ;* N O T A T I O N *
00062 ;* *
00063 ;*******************************************************************************
00064
00065 ; BITS AND BYTES
00066 ;
00067 ; o A "byte" consists of 8 bits. They are numbered B7..0. Bit B0 is the least
00068 ; significant bit.
00069 ;
00070 ; o A "word" consists of 16 bits. They are numbered B15..B0. Bit B0 is the
00071 ; least significant bit. A word is stored in low-order then high-order byte
00072 ; order.
00073 ;
00074 ; o The high-order byte ("high byte") of a word consists of bits B15..8 of the
00075 ; word.
00076 ;
00077 ; o The low-order byte ("low byte") of a word consists of bits B7..0 of the
00078 ; word.
00079 ;
00080 ; NUMBERS
00081 ;
00082 ; o The dollar sign ($) prefixes hexadecimal numbers.
00083 ; Example: $101 is the decimal number 257.
00084 ;
00085 ; o The percent sign (%) prefixes binary numbers.
00086 ; Example: %101 is the decimal number 5.
00087 ;
00088 ; o The asterisk (*) is a wildcard character for a single hexadecimal or
00089 ; binary digit.
00090 ; Example: $0*00 is a placeholder for the numbers $0000, $0100, ..., $0F00.
00091 ;
00092 ; o The lowercase R (r) is a wildcard character for a single random
00093 ; hexadecimal or binary digit. The random digit r is chosen by a random
00094 ; number generator.
00095 ; Example: %00r0 is a placeholder for the numbers %0000 or %0010.
00096 ;
00097 ; OPERATORS
00098 ;
00099 ; o The exclamation mark (!) is the binary OR operator.
00100 ; Example: $01!$02 is $03.
00101 ;
00102 ; o The less-than sign (<) indicates bits B7..0 of a word.
00103 ; Example: <$1234 is $34.
00104 ;
00105 ; o The greater-than sign (>) indicates bits B15..8 of a word.
00106 ; Example: >$1234 is $12.
00107 ;
00108 ; o A pair of brackets ([]) groups mathematical expressions.
00109 ; Example: [3-1]*4 is 8.
00110 ;
00111 ; ASSEMBLY LANGUAGE
00112 ;
00113 ; o The uppercase A (A) indicates the accumulator register of the 6502 CPU.
00114 ;
00115 ; o The uppercase X (X) indicates the X register of the 6502 CPU.
00116 ;
00117 ; o The uppercase Y (Y) indicates the Y register of the 6502 CPU.
00118 ;
00119 ; o The prefix uppercase L and dot (L.) indicates a local variable, a memory
00120 ; location used temporarily in a subroutine.
00121 ;
00122 ; PSEUDO-FUNCTIONS
00123 ;
00124 ; o The function ABS(<num>) returns the absolute value of <num>.
00125 ; Example: ABS(3) returns 3.
00126 ; Example: ABS(-3) returns 3.
00127 ;
00128 ; o The function RND(<num1>..<num2>) returns a random integer in
00129 ; <num1>..<num2>.
00130 ; Example: RND(3..5) returns a random number out of 3, 4, or 5.
00131 ;
00132 ; o The function MAX(<num1>,<num2>) returns the larger number of <num1> and
00133 ; <num2>.
00134 ; Example: MAX(2,4) returns 4.
00135 ;
00136 ; VECTORS
00137 ;
00138 ; o The lowercase X (x) indicates the x-axis of the 3D coordinate system.
00139 ;
00140 ; o The lowercase Y (y) indicates the y-axis of the 3D coordinate system.
00141 ;
00142 ; o The lowercase Z (z) indicates the z-axis of the 3D coordinate system.
00143 ;
00144 ; o Components of a position vector (called "coordinates") have the arbitrary
00145 ; unit <KM> ("kilometers").
00146 ;
00147 ; o Components of a velocity vector have the arbitrary unit <KM/H>
00148 ; ("kilometers per hour").
00149 ;
00150 ; o A positive component of a position vector (coordinate) in hexadecimal
00151 ; notation is written in the form +$<hexNum> <KM>. <hexNum> is an unsigned
00152 ; integer value.
00153 ; Example: The starbase is +$1000 (or 4096) <KM> ahead of our starship.
00154 ;
00155 ; o A negative component of a position vector (coordinate) in hexadecimal
00156 ; notation is written in the form -($<hexNum>) <KM>. <hexNum> is an unsigned
00157 ; integer value. To calculate the actual bit pattern of this coordinate
00158 ; value compute the two's-complement of <hexNum>. See also "ON POSITION
00159 ; VECTORS".
00160 ; Example: The starbase is -($1000) (or -4096) <KM> behind our starship.
00161 ;
00162 ; o An absolute component of a position vector (coordinate) in hexadecimal
00163 ; notation is written in the form $<hexNum> <KM>. <hexNum> is an unsigned
00164 ; integer value.
00165 ; Example: The Zylon fighter fires when it is closer than $1000 (or 4096)
00166 ; <KM>.
00167 ;
00168 ; DISPLAY LIST
00169 ;
00170 ; o The following notation is used for Display List instructions:
00171 ;
00172 ; BLK<n> = Display <n> blank video lines (<n> in 1..8)
00173 ; GR1 = Display one GRAPHICS 1 row of 20 text characters
00174 ; GR2 = Display one GRAPHICS 2 row of 20 text characters
00175 ; GR7 = Display one GRAPHICS 7 row of 160 pixels
00176 ; DLI = Trigger a Display List Interrupt
00177 ; ... @ <addr> = Point to screen memory at address <addr>
00178 ; JMP @ <addr> = Jump to next Display List instruction at address <addr>
00179 ; WAITJMP @ <addr> = Wait for vertical blank phase, then jump to next
00180 ; Display List instruction at address <addr>
00181 ;
00182 ; MISCELLANEOUS
00183 ;
00184 ; o Probabilities are written in the form <percentage>% (<number of values out
00185 ; of the possible values>:<number of possible values>).
00186 ; Example: The probability to throw the number 3 with a die is 16% (1:6).
00187 ;
00188 ; o A "game loop iteration" (or "game loop") is a single execution of the game
00189 ; loop, the main program of the game.
00190 ;
00191 ; o A "TICK" is the time span it takes to update the TV screen (1/60 s on an
00192 ; NTSC TV system, 1/50 s on a PAL TV system).
00193 ;
00194 ; o A pair of braces ({}) encloses color names.
00195 ; Example: {BLACK}
00196 ;
00197 ; o A pair of parentheses enclosing a question mark ((?)) indicates code that
00198 ; is not well understood.
00199 ;
00200 ; o A pair of parentheses enclosing an exclamation mark ((!)) indicates a
00201 ; potential bug.
00202
00203 ;*******************************************************************************
00204 ;* *
00205 ;* O V E R V I E W *
00206 ;* *
00207 ;*******************************************************************************
00208
00209 ; ON POSITION VECTORS
00210 ;
00211 ; The game uses a 3D coordinate system with the position of our starship at the
00212 ; center of the coordinate system and the following coordinate axes:
00213 ;
00214 ; o The x-axis points to the right.
00215 ; o The y-axis points up.
00216 ; o The z-axis points in flight direction.
00217 ;
00218 ; By the way, this is called a "left-handed" coordinate system.
00219 ;
00220 ; The locations of all space objects (Zylon ships, meteors, photon torpedoes,
00221 ; starbase, transfer vessel, Hyperwarp Target Marker, stars, and explosion
00222 ; fragments) are described by a "position vector".
00223 ;
00224 ; A "position vector" is composed of an x, y, and z component. The values of the
00225 ; position vector components are called the x, y, and z "coordinates". They have
00226 ; the arbitrary unit <KM>.
00227 ;
00228 ; Each coordinate is a signed 17-bit integer number, which fits into 3 bytes:
00229 ;
00230 ; Sign Mantissa
00231 ; B16 B15...B8 B7....B0
00232 ; | | | | |
00233 ; 0000000* ******** ********
00234 ;
00235 ; o B16 contains the sign bit. Used values are:
00236 ; 1 -> Positive sign
00237 ; 0 -> Negative sign
00238 ; o B15..0 contain the coordinate value (or "mantissa") as a two's-complement
00239 ; integer number.
00240 ;
00241 ; The range of a position vector component is -65536..+65535 <KM>.
00242 ;
00243 ; Examples:
00244 ;
00245 ; 00000001 11111111 11111111 = +65535 <KM>
00246 ; 00000001 00010000 00000000 = +4096 <KM>
00247 ; 00000001 00001111 11111111 = +4095 <KM>
00248 ; 00000001 00000001 00000000 = +256 <KM>
00249 ; 00000001 00000000 11111111 = +255 <KM>
00250 ; 00000001 00000000 00010000 = +16 <KM>
00251 ; 00000001 00000000 00001111 = +15 <KM>
00252 ; 00000001 00000000 00000001 = +1 <KM>
00253 ; 00000001 00000000 00000000 = +0 <KM>
00254 ;
00255 ; 00000000 11111111 11111111 = -1 <KM>
00256 ; 00000000 11111111 11111110 = -2 <KM>
00257 ; 00000000 11111111 11110001 = -15 <KM>
00258 ; 00000000 11111111 11110000 = -16 <KM>
00259 ; 00000000 11111111 00000001 = -255 <KM>
00260 ; 00000000 11111111 00000000 = -256 <KM>
00261 ; 00000000 11110000 00000001 = -4095 <KM>
00262 ; 00000000 11110000 00000000 = -4096 <KM>
00263 ; 00000000 00000000 00000000 = -65536 <KM>
00264 ;
00265 ; The position vector for each space object is stored in 9 tables:
00266 ;
00267 ; o XPOSSIGN ($09DE..$0A0E), XPOSHI ($0A71..$0AA1), and XPOSLO ($0B04..$0B34)
00268 ; o YPOSSIGN ($0A0F..$0A3F), YPOSHI ($0AA2..$0AD2), and YPOSLO ($0B35..$0B65)
00269 ; o ZPOSSIGN ($09AD..$09DD), ZPOSHI ($0A40..$0A70), and ZPOSLO ($0AD3..$0B03)
00270 ;
00271 ; There are up to 49 space objects used in the game simultaneously, thus each
00272 ; table is 49 bytes long.
00273 ;
00274 ; o Position vectors 0..4 belong to space objects represented by PLAYERs
00275 ; (Zylon ships, meteors, photon torpedoes, starbase, transfer vessel, and
00276 ; Hyperwarp Target Marker).
00277 ; o Position vectors 5..48 belong to space objects represented by PLAYFIELD
00278 ; pixels. Position vectors 5..16 (stars, explosion fragments) are used for
00279 ; stars, position vectors 17..48 are used for explosion fragments and star
00280 ; trails.
00281 ;
00282 ; INFO: The x and y coordinates of space objects are converted and displayed by
00283 ; the THETA and PHI readouts of the Control Panel Display in "gradons". The
00284 ; z-coordinate is converted and displayed by the RANGE readout in "centrons".
00285 ; The conversion takes place in subroutine SHOWDIGITS ($B8CD) where the high
00286 ; byte of a coordinate (with values $00..$FF) is transformed with lookup table
00287 ; MAPTOBCD99 ($0EE9) into a BCD value of 00..99 in "gradons" or "centrons".
00288 ;
00289 ;
00290 ; ON VELOCITY VECTORS
00291 ;
00292 ; The velocities of all space objects are described by a "velocity vector". The
00293 ; velocity vector is relative to our starship.
00294 ;
00295 ; A "velocity vector" is composed of an x, y, and z component. The values of the
00296 ; velocity vector components are called the x, y, and z "velocities". They have
00297 ; the arbitrary unit <KM/H>.
00298 ;
00299 ; Each velocity vector component is an 8-bit integer number, which fits into 1
00300 ; byte:
00301 ;
00302 ; B7 Sign
00303 ; |
00304 ; |B6...B0 Mantissa
00305 ; || |
00306 ; ********
00307 ;
00308 ; o B7 contains the sign bit. Used values are:
00309 ; 0 -> Positive sign, movement along the positive coordinate axis
00310 ; (x-velocity: right, y-velocity: up, z-velocity: in flight direction)
00311 ; 1 -> Negative sign, movement along the negative coordinate axis
00312 ; (x-velocity: left, y-velocity: down, z-velocity: in reverse flight
00313 ; direction)
00314 ; o B6..B0 contain the velocity value (or "mantissa"). It is an unsigned
00315 ; number.
00316 ;
00317 ; The range of a velocity vector component is -127..+127 <KM/H>.
00318 ;
00319 ; Examples:
00320 ;
00321 ; 01111111 = +127 <KM/H>
00322 ; 00010000 = +16 <KM/H>
00323 ; 00001111 = +15 <KM/H>
00324 ; 00000001 = +1 <KM/H>
00325 ; 00000000 = +0 <KM/H>
00326 ;
00327 ; 10000000 = -0 <KM/H>
00328 ; 10000001 = -1 <KM/H>
00329 ; 10001111 = +15 <KM/H>
00330 ; 10010000 = +16 <KM/H>
00331 ; 11111111 = -127 <KM/H>
00332 ;
00333 ; The velocity vector for each space object stored in 3 tables:
00334 ;
00335 ; o XVEL ($0B97..$0BC7)
00336 ; o YVEL ($0BC8..$0BF8)
00337 ; o ZVEL ($0B66..$0B96)
00338 ;
00339 ; There are up to 49 space objects used in the game simultaneously, thus each
00340 ; table is 49 bytes long.
00341 ;
00342 ; o Velocity vectors 0..4 belong to space objects represented by PLAYERs
00343 ; (Zylon ships, meteors, photon torpedoes, starbase, transfer vessel, and
00344 ; Hyperwarp Target Marker).
00345 ; o Velocity vectors 5..48 belong to space objects represented by PLAYFIELD
00346 ; pixels. Velocity vectors 5..16 are used for stars, velocity vectors 17..48
00347 ; are used for explosion fragments and star trails.
00348 ;
00349 ; INFO: The velocity of our starship is converted and displayed by the VELOCITY
00350 ; readout of the Control Panel Display in "metrons per second" units. The
00351 ; conversion takes place in subroutine SHOWDIGITS ($B8CD) where our starship's
00352 ; velocity VELOCITYL ($70) (with values $00..$FF) is transformed with lookup
00353 ; table MAPTOBCD99 ($0EE9) into a BCD value of 00..99 in "metrons per second".
00354
00355 ;*******************************************************************************
00356 ;* *
00357 ;* M E M O R Y M A P *
00358 ;* *
00359 ;*******************************************************************************
00360 ;
00361 ; The following variables are not changed by a SYSTEM RESET:
00362 ;
00363 ; $62 MISSIONLEVEL
00364 ;
00365 ; Mission level. Used values are:
00366 ; $00 -> NOVICE mission
00367 ; $01 -> PILOT mission
00368 ; $02 -> WARRIOR mission
00369 ; $03 -> COMMANDER mission
00370 ;
00371 ; $63 FKEYCODE
00372 ;
00373 ; Function key code. Used values are:
00374 ; $00 -> No function key pressed
00375 ; $01 -> START function key pressed
00376 ; $02 -> SELECT function key pressed
00377 ;
00378 ; $64 ISDEMOMODE
00379 ;
00380 ; Indicates whether the game is in game or in demo mode. Used values
00381 ; are:
00382 ; $00 -> Game mode
00383 ; $FF -> Demo mode
00384 ;
00385 ; $65 NEWTITLEPHR
00386 ;
00387 ; New title phrase offset for the text in the title line. The new title
00388 ; phrase is not immediately displayed in the title line but only after
00389 ; the display time of the currently displayed title phrase has expired.
00390 ; Thus, setting a value to NEWTITLEPHR ($65) "enqueues" the display of
00391 ; new title phrase. Used values are:
00392 ; $00..$7B -> Title phrase offset into PHRASETAB ($BBAA)
00393 ; $FF -> Hide title line
00394 ;
00395 ; See also TITLEPHR ($D1).
00396 ;
00397 ; $66 IDLECNTHI
00398 ;
00399 ; Idle counter (high byte). Forms a 16-bit counter together with
00400 ; IDLECNTLO ($77), which is incremented during the execution of the
00401 ; Vertical Blank Interrupt handler VBIHNDLR ($A6D1). IDLECNTHI ($66) is
00402 ; reset to 0 when the joystick trigger or a keyboard key has been
00403 ; pressed, or to 1..3 when a function key has been pressed. When
00404 ; IDLECNTHI ($66) reaches a value of 128 (after about 10 min idle time)
00405 ; the game enters demo mode.
00406 ;
00407 ; The following variables are set to 0 after a SYSTEM RESET:
00408 ;
00409 ; $67 ISVBISYNC
00410 ;
00411 ; Indicates whether the Vertical Blank Interrupt handler VBIHNDLR
00412 ; ($A6D1) is executed. Used to synchronize the execution of a new game
00413 ; loop iteration in GAMELOOP ($A1F3) with the vertical blank phase.
00414 ; Used values are:
00415 ; $00 -> Halt execution at start of game loop and wait for VBI
00416 ; $FF -> Continue execution of game loop
00417 ;
00418 ; $68..$69 MEMPTR
00419 ;
00420 ; A 16-bit memory pointer.
00421 ;
00422 ; Also used as a local variable.
00423 ;
00424 ; $6A..$6B DIVIDEND
00425 ;
00426 ; A 16-bit dividend value passed in GAMELOOP ($A1F3) to subroutine
00427 ; PROJECTION ($AA21) to calculate a division.
00428 ;
00429 ; Also used as a local variable.
00430 ;
00431 ; $6C Used as a local variable.
00432 ;
00433 ; $6D JOYSTICKDELTA
00434 ;
00435 ; Used to pass joystick directions from GAMELOOP ($A1F3) to subroutine
00436 ; ROTATE ($B69B). Used values are:
00437 ; $01 -> Joystick pressed right or up
00438 ; $00 -> Joystick centered
00439 ; $FF -> Joystick pressed left or down
00440 ;
00441 ; Also used as a local variable.
00442 ;
00443 ; $6E Used as a local variable.
00444 ;
00445 ; $70 VELOCITYLO
00446 ;
00447 ; Our starship's current velocity (low byte) in <KM/H>. Forms a 16-bit
00448 ; value together with VELOCITYHI ($C1). In subroutine UPDPANEL ($B804),
00449 ; VELOCITYLO ($70) is mapped to a BCD-value in 00..99 and displayed by
00450 ; the VELOCITY readout of the Control Panel Display. See also
00451 ; NEWVELOCITY ($71).
00452 ;
00453 ; $71 NEWVELOCITY
00454 ;
00455 ; Our starship's new velocity (low byte) in <KM/H>. It is set by
00456 ; pressing one of the speed keys '0'..'9'. A pressed speed key is
00457 ; mapped to the new velocity value with VELOCITYTAB ($BAB4).
00458 ;
00459 ; $72 COUNT8
00460 ;
00461 ; Wrap-around counter. Counts from 0..7, then starts over at 0. It is
00462 ; incremented every game loop iteration. It is used to change the
00463 ; brightness of stars and explosion fragments more randomly in GAMELOOP
00464 ; ($A1F3) and to slow down the movement of the hyperwarp markers of the
00465 ; Galactic Chart in subroutine SELECTWARP ($B162).
00466 ;
00467 ; $73 EXPLLIFE
00468 ;
00469 ; Explosion lifetime. It is decremented every game loop iteration. Used
00470 ; values are:
00471 ; $00 -> Explosion is over
00472 ; < $18 -> Number of explosion fragment space objects is decremented
00473 ; < $70 -> HITBADNESS ($8A) is reset
00474 ; $80 -> Initial value at start of explosion
00475 ;
00476 ; $74 CLOCKTIM
00477 ;
00478 ; Star date clock delay timer. Counts down from 40 to 0. It is
00479 ; decremented every game loop iteration. When the timer falls below 0
00480 ; the last digit of the star date of the Galactic Chart Panel Display
00481 ; is increased and the timer is reset to a value of 40.
00482 ;
00483 ; $75 DOCKSTATE
00484 ;
00485 ; State of docking operation. Used values are:
00486 ; $00 -> NOT DOCKED
00487 ; $01 -> TRANSFER COMPLETE
00488 ; $81 -> RETURN TRANSFER VESSEL
00489 ; $FF -> ORBIT ESTABLISHED
00490 ;
00491 ; $76 COUNT256
00492 ;
00493 ; Wrap-around counter. Counts from 0..255, then starts over at 0. It is
00494 ; incremented every game loop iteration. It is used to make the
00495 ; starbase pulsate in brightness in GAMELOOP ($A1F3) and to decide on
00496 ; the creation of a meteor in subroutine MANEUVER ($AA79).
00497 ;
00498 ; $77 IDLECNTLO
00499 ;
00500 ; Idle counter (low byte). Forms a 16-bit counter together with
00501 ; IDLECNTHI ($66), which is incremented during the execution of the
00502 ; Vertical Blank Interrupt handler VBIHNDLR ($A6D1).
00503 ;
00504 ; NOTE: This variable is never properly initialized except at initial
00505 ; cartridge startup (cold start).
00506 ;
00507 ; $78 ZYLONUNITTIM
00508 ;
00509 ; Zylon unit movement timer. This delay timer triggers movement of
00510 ; Zylon units on the Galactic Chart. At the start of the game, the
00511 ; timer is initialized to a value of 100. It is decremented every 40
00512 ; game loop iterations. When the timer falls below 0 the Zylon units
00513 ; move on the Galactic Chart and the timer value is reset to 49. If a
00514 ; starbase is surrounded the timer is reset to 99 to buy you some extra
00515 ; time to destroy one of the surrounding Zylon units.
00516 ;
00517 ; $79 MAXSPCOBJIND
00518 ;
00519 ; Maximum index of used space objects in the current game loop
00520 ; iteration. Frequently used values are:
00521 ; $10 -> During regular cruise (5 PLAYER space objects + 12 PLAYFIELD
00522 ; space objects (stars), counted $00..$10)
00523 ; $30 -> During explosion or hyperwarp (5 PLAYER space objects + 12
00524 ; PLAYFIELD space objects (stars) + 32 PLAYFIELD space objects
00525 ; (explosion fragments or stars of star trails), counted
00526 ; $00..$30)
00527 ;
00528 ; $7A OLDMAXSPCOBJIND
00529 ;
00530 ; Maximum index of used space objects in the previous game loop
00531 ; iteration. Frequently used values are:
00532 ; $10 -> During regular cruise (5 PLAYER space objects + 12 PLAYFIELD
00533 ; space objects (stars), counted $00..$10)
00534 ; $30 -> During explosion or hyperwarp (5 PLAYER space objects + 12
00535 ; PLAYFIELD space objects (stars) + 32 PLAYFIELD space objects
00536 ; (explosion fragments or stars of star trails), counted
00537 ; $00..$30)
00538 ;
00539 ; $7B ISSTARBASESECT
00540 ;
00541 ; Indicates whether a starbase is in this sector. Used values are:
00542 ; $00 -> Sector contains no starbase
00543 ; $FF -> Sector contains starbase
00544 ;
00545 ; $7C ISTRACKCOMPON
00546 ;
00547 ; Indicates whether the Tracking Computer is on or off. Used values
00548 ; are:
00549 ; $00 -> Tracking Computer is off
00550 ; $FF -> Tracking Computer is on
00551 ;
00552 ; $7D DRAINSHIELDS
00553 ;
00554 ; Energy drain rate of the Shields per game loop iteration in energy
00555 ; subunits. See also subroutine UPDPANEL ($B804). Used values are:
00556 ; $00 -> Shields are off
00557 ; $08 -> Shields are on
00558 ;
00559 ; $7E DRAINATTCOMP
00560 ;
00561 ; Energy drain rate of the Attack Computer per game loop iteration in
00562 ; energy subunits. See also subroutine UPDPANEL ($B804). Used values
00563 ; are:
00564 ; $00 -> Attack Computer off
00565 ; $02 -> Attack Computer on
00566 ;
00567 ; $7F ENERGYCNT
00568 ;
00569 ; Running counter of consumed energy subunits (256 energy subunits = 1
00570 ; energy unit displayed by the 4-digit ENERGY readout of the Control
00571 ; Panel Display). Forms an invisible fractional or "decimals" part of
00572 ; the 4-digit ENERGY readout of the Control Panel Display. See also
00573 ; subroutine UPDPANEL ($B804).
00574 ;
00575 ; $80 DRAINENGINES
00576 ;
00577 ; Energy drain rate of our starship's Engines per game loop iteration
00578 ; in energy subunits (256 energy subunits = 1 energy unit displayed by
00579 ; the 4-digit ENERGY readout of the Control Panel Display). Values are
00580 ; picked from table DRAINRATETAB ($BAD3). See also subroutine UPDPANEL
00581 ; ($B804).
00582 ;
00583 ; $81 SHIELDSCOLOR
00584 ;
00585 ; Shields color. Used values are:
00586 ; $00 -> {BLACK} (Shields are off)
00587 ; $A0 -> {DARK GREEN} (Shields are on)
00588 ;
00589 ; $82 PL3HIT
00590 ;
00591 ; Collision register of PLAYER3 (usually our starship's photon torpedo
00592 ; 0) with other PLAYERs. Used values are:
00593 ; $00 -> No collision
00594 ; > $00 -> PLAYER3 has collided with another PLAYER space object. See
00595 ; subroutine COLLISION ($AF3D) for details which PLAYER has
00596 ; been hit by PLAYER3.
00597 ;
00598 ; $83 PL4HIT
00599 ;
00600 ; Collision register of PLAYER4 (usually our starship's photon torpedo
00601 ; 1) with other PLAYERs. Used values are:
00602 ; $00 -> No collision
00603 ; > $00 -> PLAYER4 has collided with another PLAYER space object. See
00604 ; subroutine COLLISION ($AF3D) for details which PLAYER has
00605 ; been hit by PLAYER4.
00606 ;
00607 ; $84 OLDTRIG0
00608 ;
00609 ; Joystick trigger state. Used values are:
00610 ; $00 -> Joystick trigger was pressed
00611 ; $01 -> Joystick trigger was not pressed
00612 ; $AA -> Joystick trigger was "virtually" pressed (will launch
00613 ; another of our starship's photon torpedoes, see subroutine
00614 ; TRIGGER ($AE29).
00615 ;
00616 ; $86 ISTRACKING
00617 ;
00618 ; Indicates whether one of our starship's photon torpedoes is currently
00619 ; tracking (homing in on) the target space object. Used values are:
00620 ; $00 -> No target space object tracked. Our starship's photon
00621 ; torpedoes will fly just straight ahead.
00622 ; > $00 -> Tracking a target space object. Our starship's photon
00623 ; torpedoes will home in on the tracked space object.
00624 ;
00625 ; $87 BARRELNR
00626 ;
00627 ; Barrel from which our starship's next photon torpedo will be
00628 ; launched. Used values are:
00629 ; $00 -> Left barrel
00630 ; $01 -> Right barrel
00631 ;
00632 ; $88 LOCKONLIFE
00633 ;
00634 ; Lifetime of target lock-on. A target remains in lock-on while
00635 ; LOCKONLIFE ($88) counts down from 12 to 0. It is decremented every
00636 ; game loop iteration.
00637 ;
00638 ; $89 PLTRACKED
00639 ;
00640 ; Index of currently tracked PLAYER. It is copied in subroutine TRIGGER
00641 ; ($AE29) from TRACKDIGIT ($095C). Used values are:
00642 ; $00 -> Track Zylon ship 0
00643 ; $01 -> Track Zylon ship 1
00644 ; $02 -> Track starbase during docking operations
00645 ; $03 -> Track Hyperwarp Target Marker during hyperwarp
00646 ;
00647 ; $8A HITBADNESS
00648 ;
00649 ; Severity of a Zylon photon torpedo hit. Used values are:
00650 ; $00 -> NO HIT
00651 ; $7F -> SHIELDS HIT
00652 ; $FF -> STARSHIP DESTROYED
00653 ;
00654 ; $8B REDALERTLIFE
00655 ;
00656 ; Lifetime of red alert. It decreases from 255 to 0. It is decremented
00657 ; every game loop iteration.
00658 ;
00659 ; $8C WARPDEPRROW
00660 ;
00661 ; Departure hyperwarp marker row number on the Galactic Chart. It is
00662 ; given in Player/Missile pixels relative to the top Galactic Chart
00663 ; border. It is initialized to a value of $47 (vertical center of
00664 ; Galactic Chart). Divide this value by 16 to get the departure sector
00665 ; row number. Used values are: $00..$7F.
00666 ;
00667 ; $8D WARPDEPRCOLUMN
00668 ;
00669 ; Departure hyperwarp marker column number on the Galactic Chart. It is
00670 ; given in Player/Missile pixels relative to the left Galactic Chart
00671 ; border and initialized to a value of $43 (horizontal center of
00672 ; Galactic Chart). Divide this value by 8 to get the departure sector
00673 ; column number. Used values are: $00..$7F.
00674 ;
00675 ; $8E WARPARRVROW
00676 ;
00677 ; Arrival hyperwarp marker row number on the Galactic Chart in
00678 ; Player/Missile pixels relative to top Galactic Chart border. It is
00679 ; initialized to a value of $47 (vertical center of Galactic Chart).
00680 ; Divide this value by 16 to get the arrival sector row number. Used
00681 ; values are: $00..$7F.
00682 ;
00683 ; $8F WARPARRVCOLUMN
00684 ;
00685 ; Arrival hyperwarp marker column number on the Galactic Chart in
00686 ; Player/Missile pixels relative to left Galactic Chart border. It is
00687 ; initialized to a value of $43 (horizontal center of Galactic Chart).
00688 ; Divide this value by 8 to get the arrival sector column number. Used
00689 ; values are: $00..$7F.
00690 ;
00691 ; $90 CURRSECTOR
00692 ;
00693 ; Galactic Chart sector of the current location of our starship. At the
00694 ; start of the game it is initialized to a value of $48. Used values
00695 ; are: $00..$7F with, for example,
00696 ; $00 -> NORTHWEST corner sector
00697 ; $0F -> NORTHEAST corner sector
00698 ; $70 -> SOUTHWEST corner sector
00699 ; $7F -> SOUTHWEST corner sector
00700 ;
00701 ; See also ARRVSECTOR ($92).
00702 ;
00703 ; $91 WARPENERGY
00704 ;
00705 ; Energy required to hyperwarp between the departure and arrival
00706 ; hyperwarp marker locations on the Galactic Chart divided by 10.
00707 ; Values are picked from table WARPENERGYTAB ($BADD). Multiply this
00708 ; value by 10 to get the actual value in energy units displayed by the
00709 ; Galactic Chart Panel Display.
00710 ;
00711 ; $92 ARRVSECTOR
00712 ;
00713 ; Galactic Chart arrival sector of our starship after hyperwarp. Used
00714 ; values are: $00..$7F with, for example,
00715 ; $00 -> NORTHWEST corner sector
00716 ; $0F -> NORTHEAST corner sector
00717 ; $70 -> SOUTHWEST corner sector
00718 ; $7F -> SOUTHWEST corner sector
00719 ;
00720 ; See also CURRSECTOR ($90).
00721 ;
00722 ; $93 HUNTSECTOR
00723 ;
00724 ; Galactic Chart sector of the starbase toward which the Zylon units
00725 ; are currently moving. Used values are: $00..$7F with, for example,
00726 ; $00 -> NORTHWEST corner sector
00727 ; $0F -> NORTHEAST corner sector
00728 ; $70 -> SOUTHWEST corner sector
00729 ; $7F -> SOUTHWEST corner sector
00730 ;
00731 ; $94 HUNTSECTCOLUMN
00732 ;
00733 ; Galactic Chart sector column number of the starbase toward which the
00734 ; Zylon units are currently moving. Used values are: 0..15.
00735 ;
00736 ; $95 HUNTSECTROW
00737 ;
00738 ; Galactic Chart sector row number of the starbase toward which the
00739 ; Zylon units are currently moving. Used values are: 0..7.
00740 ;
00741 ; $96..$9E NEWZYLONDIST
00742 ;
00743 ; Table of distances between a Zylon unit and the hunted starbase when
00744 ; the Zylon unit is tentatively moved in one of the 9 possible
00745 ; directions NORTH, NORTHWEST, WEST, SOUTHWEST, SOUTH, SOUTHEAST, EAST,
00746 ; NORTHEAST, CENTER. Used to decide into which sector the Zylon unit
00747 ; should move.
00748 ;
00749 ; $9E OLDZYLONDIST
00750 ;
00751 ; Current distance between the Zylon unit and the hunted starbase.
00752 ;
00753 ; $9F HUNTTIM
00754 ;
00755 ; Delay timer for Zylon units to decide on which starbase to hunt. It
00756 ; counts down from 7. It is decremented every game loop iteration. When
00757 ; the timer falls below 0 the Zylon units re-decide toward which
00758 ; starbase to move.
00759 ;
00760 ; $A0 BLIPCOLUMN
00761 ;
00762 ; Top-left screen pixel column number of blip shape displayed in the
00763 ; Attack Computer Display. Used in subroutine UPDATTCOMP ($A7BF). Used
00764 ; values are: 120..142.
00765 ;
00766 ; $A1 BLIPROW
00767 ;
00768 ; Top-left screen pixel row number of blip shape displayed in the
00769 ; Attack Computer Display. Used in subroutine UPDATTCOMP ($A7BF). Used
00770 ; values are: 71..81.
00771 ;
00772 ; $A2 BLIPCYCLECNT
00773 ;
00774 ; Blip cycle counter. It controls drawing the blip shape in the Attack
00775 ; Computer Display. Its value is incremented every game loop iteration.
00776 ; Used in subroutine UPDATTCOMP ($A7BF). Used values are:
00777 ; $00..$04 -> Draw 0..4th row of blip shape
00778 ; $05..$09 -> Do not draw blip shape (delay)
00779 ; $0A -> Recalculate blip shape position, erase Attack Computer
00780 ; Display
00781 ;
00782 ; $A3 ISINLOCKON
00783 ;
00784 ; Indicates whether the tracked space object is currently in full
00785 ; lock-on (horizontally and vertically centered as well as in range) in
00786 ; the Attack Computer Display. If so, all lock-on markers show up on
00787 ; the Attack Computer Display and our starship's launched photon
00788 ; torpedoes will home in on the tracked space object. Used values are:
00789 ; $00 -> Not in lock-on
00790 ; $A0 -> In lock-on
00791 ;
00792 ; $A4 DIRLEN
00793 ;
00794 ; Used to pass the direction and length of a single line to be drawn in
00795 ; the PLAYFIELD. Used in subroutines DRAWLINES ($A76F), DRAWLINE
00796 ; ($A782), and UPDATTCOMP ($A7BF). Used values are:
00797 ; Bit B7 = 0 -> Draw right
00798 ; Bit B7 = 1 -> Draw down
00799 ; Bits B6..0 -> Length of line in pixels.
00800 ;
00801 ; See also PENROW ($A5) and PENCOLUMN ($A6).
00802 ;
00803 ; $A5 PENROW
00804 ;
00805 ; Used to pass the start screen pixel row number of the line to be
00806 ; drawn in the PLAYFIELD. Used in subroutines DRAWLINES ($A76F),
00807 ; DRAWLINE ($A782), and UPDATTCOMP ($A7BF).
00808 ;
00809 ; $A6 PENCOLUMN
00810 ;
00811 ; Used to pass the start screen pixel column number of the line to be
00812 ; drawn in the PLAYFIELD. Used in subroutines DRAWLINES ($A76F),
00813 ; DRAWLINE ($A782), and UPDATTCOMP ($A7BF).
00814 ;
00815 ; $A7 CTRLDZYLON
00816 ;
00817 ; Index of Zylon ship currently controlled by the game. Used in
00818 ; subroutine MANEUVER ($AA79). The value is toggled every other game
00819 ; loop iteration. Used values are:
00820 ; $00 -> Control Zylon ship 0.
00821 ; $01 -> Control Zylon ship 1.
00822 ;
00823 ; $A8 ZYLONFLPAT0
00824 ;
00825 ; Flight pattern of Zylon ship 0. Used in subroutine MANEUVER ($AA79).
00826 ; Used values are:
00827 ; $00 -> Attack flight pattern "0"
00828 ; $01 -> Flight pattern "1"
00829 ; $04 -> Flight pattern "4"
00830 ;
00831 ; $A9 ZYLONFLPAT1
00832 ;
00833 ; Flight pattern of Zylon ship 1. Compare ZYLONFLPAT0 ($A8).
00834 ;
00835 ; $AA MILESTTIM0
00836 ;
00837 ; Delay timer of the milestone velocity indices of Zylon ship 0. Used
00838 ; in subroutine MANEUVER ($AA79).
00839 ;
00840 ; When Zylon ship 0 is active, this value is decremented every game
00841 ; loop iteration. If it falls below 0 then the milestone velocity
00842 ; indices of Zylon ship 0 are recalculated. When Zylon ship 0 is
00843 ; controlled by the computer for the first time, the timer is set to an
00844 ; initial value of 1, later to an initial value of 120.
00845 ;
00846 ; $AB MILESTTIM1
00847 ;
00848 ; Delay timer of the milestone velocity index vector of Zylon ship 1.
00849 ; Compare MILESTTIM0 ($AA).
00850 ;
00851 ; $AC MILESTVELINDZ0
00852 ;
00853 ; Milestone z-velocity index of Zylon ship 0. Used in subroutine
00854 ; MANEUVER ($AA79). The current z-velocity index of Zylon ship 0
00855 ; ZYLONVELINDZ0 ($B2) is compared with this index and gradually
00856 ; adjusted to it. Used values are: 0..15.
00857 ;
00858 ; $AD MILESTVELINDZ1
00859 ;
00860 ; Milestone z-velocity index of Zylon ship 1. Compare MILESTVELINDZ0
00861 ; ($AC).
00862 ;
00863 ; $AE MILESTVELINDX0
00864 ;
00865 ; Milestone x-velocity index of Zylon ship 0. Used in subroutine
00866 ; MANEUVER ($AA79). The current x-velocity index of Zylon ship 0
00867 ; ZYLONVELINDX0 ($B4) is compared with this index and gradually
00868 ; adjusted to it. Used values are: 0..15.
00869 ;
00870 ; $AF MILESTVELINDX1
00871 ;
00872 ; Milestone x-velocity index of Zylon ship 1. Compare MILESTVELINDX0
00873 ; ($AE).
00874 ;
00875 ; $B0 MILESTVELINDY0
00876 ;
00877 ; Milestone y-velocity index of Zylon ship 0. Used in subroutine
00878 ; MANEUVER ($AA79). The current y-velocity index of Zylon ship 0
00879 ; ZYLONVELINDY0 ($B6) is compared with this index and gradually
00880 ; adjusted to it. Used values are: 0..15.
00881 ;
00882 ; $B1 MILESTVELINDY1
00883 ;
00884 ; Milestone y-velocity index of Zylon ship 1. Compare MILESTVELINDY0
00885 ; ($B0).
00886 ;
00887 ; $B2 ZYLONVELINDZ0
00888 ;
00889 ; Current z-velocity index of Zylon ship 0. Used in subroutine MANEUVER
00890 ; ($AA79). It indexes velocity values in ZYLONVELTAB ($BF99). Used
00891 ; values are: 0..15.
00892 ;
00893 ; $B3 ZYLONVELINDZ1
00894 ;
00895 ; Current z-velocity index of Zylon ship 1. Compare ZYLONVELINDZ0
00896 ; ($B2).
00897 ;
00898 ; $B4 ZYLONVELINDX0
00899 ;
00900 ; Current x-velocity index of Zylon ship 0. Compare ZYLONVELINDZ0
00901 ; ($B2).
00902 ;
00903 ; $B5 ZYLONVELINDX1
00904 ;
00905 ; Current x-velocity index of Zylon ship 1. Compare ZYLONVELINDZ0
00906 ; ($B2).
00907 ;
00908 ; $B6 ZYLONVELINDY0
00909 ;
00910 ; Current y-velocity index of Zylon ship 0. Compare ZYLONVELINDZ0
00911 ; ($B2).
00912 ;
00913 ; $B7 ZYLONVELINDY1
00914 ;
00915 ; Current y-velocity index of Zylon ship 1. Compare ZYLONVELINDZ0
00916 ; ($B2).
00917 ;
00918 ; $B8 ISBACKATTACK0
00919 ;
00920 ; Indicates whether Zylon ship 0 will attack our starship from the
00921 ; back. Used in subroutine MANEUVER ($AA79). Used values are:
00922 ; $00 -> Zylon ship 0 attacks from the front of our starship
00923 ; $01 -> Zylon ship 0 attacks from the front and back of our starship
00924 ;
00925 ; $B9 ISBACKATTACK1
00926 ;
00927 ; Indicates whether Zylon ship 1 will attack our starship from the
00928 ; back. Compare ISBACKATTACK0 ($B8).
00929 ;
00930 ; $BA ZYLONTIMX0
00931 ;
00932 ; Delay timer of the x-velocity index of Zylon ship 0. Used in
00933 ; subroutine MANEUVER ($AA79). It is decremented every game loop
00934 ; iteration. When the timer value falls below 0 the current velocity
00935 ; index ZYLONVELINDX0 ($B4) is adjusted depending on the current
00936 ; joystick position. The new timer value is set depending on the
00937 ; resulting new x-velocity index. Used values are: 0, 2, 4, ..., 14.
00938 ;
00939 ; $BB ZYLONTIMX1
00940 ;
00941 ; Delay timer of x-velocity index of Zylon ship 1. Compare ZYLONTIMX0
00942 ; ($BA).
00943 ;
00944 ; $BC ZYLONTIMY0
00945 ;
00946 ; Delay timer of y-velocity index of Zylon ship 0. Compare ZYLONTIMX0
00947 ; ($BA).
00948 ;
00949 ; $BD ZYLONTIMY1
00950 ;
00951 ; Delay timer of y-velocity index of Zylon ship 1. Compare ZYLONTIMX0
00952 ; ($BA).
00953 ;
00954 ; $BE TORPEDODELAY
00955 ;
00956 ; After a Zylon photon torpedo has hit our starship this delay timer is
00957 ; initialized to a value of 2. It is decremented every game loop
00958 ; iteration and so delays the launch of the next Zylon photon torpedo
00959 ; for 2 game loop iterations.
00960 ;
00961 ; $BF ZYLONATTACKER
00962 ;
00963 ; Index of the Zylon ship that launched the Zylon photon torpedo. It is
00964 ; used in GAMELOOP ($A1F3) to override the current tracking computer
00965 ; settings in order to track this Zylon ship first. Used values are:
00966 ; $00 -> Zylon photon torpedo was launched by Zylon ship 0
00967 ; $01 -> Zylon photon torpedo was launched by Zylon ship 1
00968 ;
00969 ; $C0 WARPSTATE
00970 ;
00971 ; Hyperwarp state. Used values are:
00972 ; $00 -> Hyperwarp not engaged
00973 ; $7F -> Hyperwarp engaged
00974 ; $FF -> In hyperspace
00975 ;
00976 ; $C1 VELOCITYHI
00977 ;
00978 ; Our starship's velocity (high byte) in <KM/H>. Used values are:
00979 ; $00 -> Not in hyperspace (regular cruise or accelerating to
00980 ; hyperspace velocity)
00981 ; $01 -> Hyperspace velocity
00982 ;
00983 ; See also VELOCITYLO ($70).
00984 ;
00985 ; $C2 TRAILDELAY
00986 ;
00987 ; Delay timer to create the next star trail. Its value is decremented
00988 ; from 3 to 0 every game loop iteration during the hyperwarp STAR TRAIL
00989 ; PHASE in subroutine INITTRAIL ($A9B4).
00990 ;
00991 ; $C3 TRAILIND
00992 ;
00993 ; Position vector index of the star trail's first star. Used in
00994 ; subroutine INITTRAIL ($A9B4) to initialize a star trail, which is
00995 ; then displayed during the hyperwarp STAR TRAIL PHASE. Used values
00996 ; are: 17..48 in wrap-around fashion.
00997 ;
00998 ; $C4 WARPTEMPCOLUMN
00999 ;
01000 ; Temporary arrival column number of our starship on the Galactic Chart