-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayk240.cnf
8367 lines (8356 loc) · 282 KB
/
playk240.cnf
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
; vim: autoindent nowrap noexpandtab softtabstop=0 tabstop=16 shiftwidth=8 ignorecase:
; novim: list listchars=tab\:\ ░:
; Config file for using ira to disassemble K240 disk 2 "playk240" v2.000.
; Updated 2024-05-06 to fix duplicate and erroneous symbol names.
COMMENT $00000000 | _ ______ _ _ ___ |
COMMENT $00000000 | | |/ /___ \| || | / _ \ |
COMMENT $00000000 | | ' / __) | || |_| | | | |
COMMENT $00000000 | | . \ / __/|__ _| |_| | v2.000 |
COMMENT $00000000 | _ _ |_|\_\_____| |_| \___/ _ _ |
COMMENT $00000000 | __| (_)___ __ _ ______ ___ _ __ | |__| |_ _ |
COMMENT $00000000 | / _` | (_-</ _` (_-<_-</ -_) ' \| '_ \ | || | |
COMMENT $00000000 | \__,_|_/__/\__,_/__/__/\___|_|_|_|_.__/_|\_, | |
COMMENT $00000000 | <https://tetracorp.github.io/k240/> |__/ |
COMMENT $00000000
COMMENT $00000000 K240 is copyright 1994 Gremlin Graphics.
COMMENT $00000000 This annotated disassembly is believed to constitute fair use
COMMENT $00000000 for the purpose of analysis and commentary.
COMMENT $00000000
COMMENT $00000000 Disassemble using this config file:
COMMENT $00000000 ira -A -keepzh -newstyle -compat=bi -config playk240 playk240.68k.asm
COMMENT $00000000
COMMENT $00000000 Reassemble from the source code:
COMMENT $00000000 vasmm68k_mot -no-opt -Fhunkexe -nosym -o playk240 playk240.68k.asm
MACHINE 68000
ENTRY $00000000
OFFSET $00000000
; instruct data
CODE $00000000 - $000000F2
CODE $000001AA - $000002B0
CODE $000002E4 - $0000036E
CODE $00000374 - $0000046A
CODE $0000058E - $00000760
CODE $00000768 - $00000bb0
CODE $00000BB8 - $00000c58
CODE $00000c60 - $00000d22
CODE $00000D2C - $00000e44
CODE $00000e56 - $00001E66
CODE $00001E6C - $00002022
CODE $0000207E - $00002b3a
CODE $00002b76 - $00002e44
CODE $00002e54 - $00003f60
CODE $00003f66 - $00004174
CODE $00004196 - $00004a34
CODE $00004a3c - $00004b0e
CODE $00004b12 - $00004bd8
CODE $00004bdc - $00005364
CODE $00005378 - $00005C48
CODE $00005C4E - $00006016
CODE $0000605A - $00006836
CODE $00006840 - $000070be
CODE $000070c4 - $000088fe
CODE $00008902 - $00008c3c
CODE $00008c4a - $00008ed4
CODE $00008ee2 - $0000aaa8
CODE $0000aaac - $0000acc8
CODE $0000acd0 - $0000b300
CODE $0000b312 - $0000b72c
CODE $0000b732 - $0000b994
CODE $0000b99a - $0000bc12
CODE $0000bc1a - $0000c2de
CODE $0000c2ea - $0000c79e
CODE $0000c816 - $0000c914
CODE $0000c916 - $0000cb26
CODE $0000cb2a - $0000e6d6
CODE $0000e6da - $0000ef88
CODE $0000ef8c - $0000f5d2
CODE $0000f5e4 - $0000f9fa
CODE $0000f9fe - $000107d2
CODE $000107dc - $0001117c
CODE $00011180 - $00011f2a
CODE $00011f2e - $00013338
CODE $00013342 - $00013daa
CODE $00013dae - $00014062
CODE $00014066 - $000140ea
CODE $000140ee - $000159b0
CODE $000159b4 - $00015a50
CODE $00015a54 - $00016a3a
CODE $00016a3e - $00017c6c
CODE $00017c70 - $00019734
CODE $00019736 - $0001A9DC
; version string
TEXT $00006016 - $0000605a
; filename strings
TEXT $0001AB40 - $0001AB54
TEXT $0001AB5C - $0001AB6E
TEXT $0001AB76 - $0001AB88
TEXT $0001AB90 - $0001ABA4
TEXT $0001ABAC - $0001ABBE
TEXT $0001ABC6 - $0001ABD6
TEXT $0001ABF6 - $0001AC08
TEXT $0001AC10 - $0001AC22
TEXT $0001AC2A - $0001AC3C
TEXT $0001AC44 - $0001AC56
TEXT $0001AC5E - $0001AC70
TEXT $0001AC78 - $0001AC8A
TEXT $0001ACAA - $0001ACC6
TEXT $0001ACCE - $0001ACEA
TEXT $0001ACF2 - $0001AD0E
TEXT $0001AD16 - $0001AD32
TEXT $0001AD3A - $0001AD56
TEXT $0001AD5E - $0001AD7A
TEXT $0001AD9A - $0001ADB6
TEXT $0001ADBE - $0001ADDA
TEXT $0001ADE2 - $0001ADFE
TEXT $0001AE06 - $0001AE22
TEXT $0001AE2A - $0001AE46
TEXT $0001AE4E - $0001AE6A
TEXT $0001AE72 - $0001AE84
TEXT $0001AE8C - $0001AE9E
TEXT $0001AEA6 - $0001AEB8
TEXT $0001AEC0 - $0001AED4
TEXT $0001AEDC - $0001AEEE
TEXT $0001AEF6 - $0001AF08
; other strings
TEXT $0001D4C2 - $0001D4D2
; the rest are added later
EQU DMACONR_2 $00000204.W
EQU BLTCON0_64 $00004A96.W $00004B6C.W $000054FC.W $0000555E.W $000055A2.W $00005618.W $000056B8.W $00006324.W $00007B68.W $0001133A.W $00011408.W $00011F48.W $00011F6E.W $00011FAA.W
EQU BLTCON1_66 $00004A8E.W $00004B64.W $000054DC.W $00005564.W $000055A8.W $000055FA.W $000056C2.W $000062FE.W $00006338.W $00007B4C.W $00011330.W $000113FE.W $00011F52.W $00011FB0.W
EQU BLTAFWM_68 $00004A4A.W $00004B20.W $000054E6.W $00005572.W $000055B6.W $00005600.W $0000632A.W $00007B46.W $0000C924.W $00011324.W $000113F2.W $00011FC6.W
EQU BLTALWM_70 $00004A50.W $00004B26.W $00006368.W $0000C92A.W $0001132A.W $000113F8.W
EQU BLTCPTH_72 $00011360.W $0001142E.W $00011FE6.W
EQU BLTBPTH_76 $00011364.W $00011432.W $00011FE2.W
EQU BLTAPTH_80 $00005554.W $00005598.W $00005628.W $00011358.W $00011386.W $00011426.W $00011454.W $00011FDE.W
EQU BLTDPTH_84 $00005500.W $00005510.W $00005520.W $00005530.W $00005558.W $0000559C.W $0000562C.W $000056B2.W $0001135C.W $0001142A.W $00011F42.W $00011F68.W $00011FEA.W
EQU BLTSIZE_88 $00005504.W $00005514.W $00005524.W $00005534.W $00005578.W $000055BC.W $00005630.W $000056C8.W $00011368.W $00011436.W $00011F58.W $00011F74.W $00011FF0.W
EQU BLTCMOD_96 $0000630A.W $0000631E.W $00006344.W $00006358.W $00007B5E.W $0001134E.W $0001141C.W $00011FC0.W
EQU BLTBMOD_98 $00007B54.W $00011344.W $00011412.W $00011FB8.W
EQU BLTAMOD_100 $0000556C.W $000055B0.W $0000560A.W $000062F8.W $0000635E.W $00007B50.W $00011340.W $0001140E.W $00011FBC.W
EQU BLTDMOD_102 $000054F2.W $00005568.W $000055AC.W $0000560E.W $000056BE.W $00006304.W $00006318.W $0000633E.W $00006352.W $00007B5A.W $0001134A.W $00011418.W $00011F4E.W $00011FB4.W
EQU BLTADAT_116 $000054E0.W
EQU COP1LCH_128 $0000034E.W $000009A4.W
EQU DMACON_150 $0000031E.W $00000324.W $00000868.W $00000948.W $0001A3D4.W $0001A402.W $0001A430.W $0001A5AE.W $0001A5DA.W $0001A604.W $0001A630.W $0001A65A.W $0001A686.W $0001A6B0.W $0001A6DC.W
EQU INTENA_154 $00000942.W
EQU INTREQ_156 $0001A3E2.W $0001A410.W $0001A43E.W $0001A5C2.W $0001A5E6.W $0001A618.W $0001A63C.W $0001A66E.W $0001A692.W $0001A6C4.W $0001A6E8.W
EQU AUD0PER_166 $0001A3DC.W $0001A5B6.W $0001A5CC.W
EQU AUD0VAL_168 $0001A5D4.W
EQU AUD1PER_182 $0001A40A.W $0001A60C.W $0001A622.W
EQU AUD1VAL_184 $0001A62A.W
EQU AUD2PER_198 $0001A438.W $0001A662.W $0001A678.W
EQU AUD2VAL_200 $0001A680.W
EQU AUD3PER_214 $0001A6B8.W $0001A6CE.W
EQU AUD3VAL_216 $0001A6D6.W
EQU BPLCON1_258 $000009EA.W $00000A28.W
EQU _DOSForbid $000000bc.W $000003ea.W
EQU _DOSIoErr $000035ae.W
EQU _DOSOwnBlitter $000003aa.W
EQU _DOSDoIO $00000624.W $00000656.W
EQU _DOSAddIntServer $0000085C.W
; _DOSAddIntServer = (JSR -168)
EQU _DOSEnable $000005E2.W $00000630.W $0000066A.W $0000092C.W $00000988.W $0001A79C.W
; _DOSEnable = (JSR -126)
EQU _DOSDisable $00000594.W $0000063A.W $0000083C.W $00000936.W $0001A758.W
; _DOSDisable = (JSR -120)
EQU _DOSOpenDevice $000005CA.W
; _DOSOpenDevice = (JSR -444)
EQU _DOSCloseLibrary $00000384.W $00000392.W
; _DOSCloseLibrary = (JSR -414)
EQU _DOSUnLock $00001E62.W $00003340.W $0000357E.W $00003784.W
; _DOSUnLock = (JSR -90)
EQU _DOSLock $00001E52.W $00003318.W $0000377A.W
; _DOSLock = (JSR -84)
EQU _DOSAddPort $000005B4.W $000007E2.W
; _DOSAddPort = (JSR -354)
EQU _DOSWaitTOF $00000346.W
; _DOSWaitTOF = (JSR -270)
EQU _DOSFindTask $0000000E.W
; _DOSFindTask = (JSR -294)
EQU _DOSPermit $000000C6.W $00000444.W
; _DOSPermit = (JSR -138)
EQU _DOSGetMsg $0000003A.W
; _DOSGetMsg = (JSR -372)
EQU _DOSRemIntServer $00000984.W
; _DOSRemIntServer = (JSR -174)
EQU _DOSWaitPort $00000034.W
; _DOSWaitPort = (JSR -384)
EQU _DOSOpenLibrary $00000050.W $00000062.W $00000238.W
; _DOSOpenLibrary = (JSR -552)
EQU _DOSDeleteFile $000035A2.W
; _DOSDeleteFile = (JSR -72)
EQU _DOSWrite $000002AC.W $00003442.W $00003460.W $0000347C.W $00003498.W $000034B4.W $000034D0.W $000034EC.W $00003508.W $00003524.W
; _DOSWrite = (JSR -48)
EQU _DOSRemPort $00000666.W $00000812.W
; _DOSRemPort = (JSR -360)
EQU _DOSReplyMsg $000000C2.W
; _DOSReplyMsg = (JSR -378)
EQU _DOSRead $00000CFA.W $00000E1C.W $00003686.W $00003824.W $00003842.W $0000391E.W $0000393A.W $00003956.W $00003972.W $0000398E.W $000039AA.W $000039C6.W
; _DOSRead = (JSR -42)
EQU _DOSClose $00000270.W $00000D04.W $00000E26.W $00003532.W $00003598.W $00003690.W $000039D4.W
; _DOSClose = (JSR -36)
EQU _DOSDisownBlitter $000003D6.W
; _DOSDisownBlitter = (JSR -462)
EQU _DOSDelay $0000025E.W $00000428.W $000007A2.W
; _DOSDelay = (JSR -198)
EQU _DOSOpen $00000292.W $00000C90.W $00000D76.W $00003426.W $00003672.W $00003808.W
; _DOSOpen = (JSR -30)
EQU _DOSCloseDevice $0000065E.W
; _DOSCloseDevice = (JSR -450)
EQU _DOSLoadView $000001EC.W $00000358.W
; _DOSLoadView = (JSR -222)
EQU _DOSInfo $0000332A.W
; _DOSInfo = (JSR -114)
EQU _DOSAllocSignal $00000786.W
; _DOSAllocSignal = (JSR -330)
EQU _DOSWaitBlit $000003AE.W $000003D2.W
; _DOSWaitBlit = (JSR -228)
EQU _DOSSetIntVector $00000892.W $000008C2.W $000008F2.W $00000922.W $00000954.W $00000960.W $0000096C.W $00000978.W
; _DOSSetIntVector = (JSR -162)
EQU _DOSFreeMem $0000045E.W $0000082E.W
; _DOSFreeMem = (JSR -210)
EQU _DOSFreeSignal $000007AC.W $00000826.W
; _DOSFreeSignal = (JSR -336)
; Done.
; Comments
COMMENT $000002aa Write to CON:
COMMENT $0000045c FreeMem
COMMENT $0000046a Buffer definitions. Some buffers have individual labels because
COMMENT $0000046a they're used by things like the save game data (probably checking
COMMENT $0000046a the buffer size to load/save it correctly). Buffers here marked
COMMENT $0000046a SAVED are saved by the save game function.
COMMENT $0000046a ;
COMMENT $0000046a Buffer 00 40000 bytes chip (Screen: 320x200x5 bitplanes)
COMMENT $0000046a Buffer 01 40000 bytes chip (Screen)
COMMENT $0000046a Buffer 02 40000 bytes chip (Screen)
COMMENT $0000046a Buffer 03 28064 bytes chip Unpacking buffer?
COMMENT $0000046a Buffer 04 22800 bytes chip Alien data 2, ship sprites
COMMENT $0000046a Buffer 05 8000 bytes chip
COMMENT $0000046a Buffer 06 1200 bytes chip
COMMENT $0000046a Buffer 07 128 bytes public
COMMENT $0000046a Buffer 08 64 bytes public
COMMENT $0000046a Buffer 09 37800 bytes SAVED Ships
COMMENT $0000046a Buffer 10 33600 bytes SAVED Buildings
COMMENT $0000046a Buffer 11 27564 bytes Text strings
COMMENT $0000046a Buffer 12 18000 bytes SAVED Asteroids (750x24)
COMMENT $0000046a Buffer 13 4752 bytes
COMMENT $0000046a Buffer 14 2336 bytes SAVED Fleets (292x8)
COMMENT $0000046a Buffer 15 2336 bytes SAVED Enemy fleets
COMMENT $0000046a Buffer 16 2244 bytes
COMMENT $0000046a Buffer 17 1920 bytes Building total
COMMENT $0000046a Buffer 18 1600 bytes chip
COMMENT $0000046a Buffer 19 29464 bytes chip Voice
COMMENT $0000046a Buffer 20 23104 bytes chip Wireplan graphic
COMMENT $0000046a Buffer 21 25926 bytes chip Scitek graphic
COMMENT $0000046a Buffer 22 19092 bytes chip Satpic graphic
COMMENT $000004b2 Defines buffer size for data on all ships (54 bytes x 700)
COMMENT $000004ba Buildings, used in save file
COMMENT $0000053a Pointer to data loaded from alien file a1data2, which can be
COMMENT $0000053a from 20450 to 22780 bytes. Alien ship sprites.
COMMENT $000005b6 http://amigadev.elowar.com:80/read/ADCD_2.1/Devices_Manual_guide/node00CA.html
COMMENT $000006d8 input buffer?
COMMENT $000006dc $e8: Left mouseup
COMMENT $000006e2 $e9: Right mouseup
COMMENT $000006e8 $68: Left mousedown
COMMENT $000006ee $69: Right mousedown
COMMENT $000006f4 right mousedown
COMMENT $000006f4 MouseBtn bit 0 = left click, bit 1 = right click
COMMENT $0000070a Cap mouse position at 320x200
COMMENT $00000768 Blocking key wait. Waits for a keypress.
COMMENT $00000b0e appears to be the only point where this variable is read
COMMENT $00000b5e screen 1, 2, 3 or 5
COMMENT $00000b8c ;72
COMMENT $00000bde Wait for mouse click, then return.
COMMENT $00000bf4 What's interesting about this is that it seeds RNG from the position of the CRT scan beam.
COMMENT $00000c0c Random number generator. Important function used by many game
COMMENT $00000c0c mechanics. Takes D0 as input, generating a number between 0
COMMENT $00000c0c and D0 minus 1, and storing the result in D0. This behaviour
COMMENT $00000c0c has been tested to work. e.g. if d0 is 100, this function
COMMENT $00000c0c generates a number from 0 to 99. Often used this way to
COMMENT $00000c0c calculate percentage chances.
COMMENT $00000c42 A modulo operation divides the random 16-bit seed by the input
COMMENT $00000c42 number and returns the remainder.
COMMENT $00000c8e open
COMMENT $00000cb0 char 5 is the disk number (e.g. 2 in k240_2:)
COMMENT $00000ce8 50,000 bytes
COMMENT $00000cf8 Read
COMMENT $00000d02 Close
COMMENT $00000d2c Loads a .mgl file.
COMMENT $00000d8e 5 = offset of disk number in filename
COMMENT $00000dc4 356: PLEASE INSERT K240 GAME DISK x IN ANY DRIVE...
COMMENT $00000e1a Read
COMMENT $00000e24 Close
COMMENT $00000e44 -------Begin MGL file reading code-------
COMMENT $00000e56 Appears to be a loader for the .MGL compressed file format.
COMMENT $00000e56 All files the game loads are .mgl, except for the alien files
COMMENT $00000e56 which have their own loader and appear to be uncompressed,
COMMENT $00000e56 and save game files.
COMMENT $00001e3c -------End MGL file reading code-------
COMMENT $00001e3c
COMMENT $00001e3c Checks for presence of ID file which determines whether
COMMENT $00001e3c or not the game is running from HD
COMMENT $00001e50 lock
COMMENT $00001ea8 Attempting to look at an asteroid
COMMENT $00001eba Checks if you can see the asteroid
COMMENT $00001eda 479: YOU HAVE NO SPY SATELLITE ORBITING THAT ASTEROID!
COMMENT $00001f08 Screen switcher, probably.
COMMENT $00001f08 "E", or 69
COMMENT $00001f2e view 4
COMMENT $00001f62 win screen
COMMENT $0000207e Init player's asteroid
COMMENT $0000208c Loop over every square in the asteroid map
COMMENT $0000208c Clear non-default values in the first two bytes
COMMENT $0000208c of each square (01 first byte, 00-0f second byte)
COMMENT $00002094 Negative value for third byte? (00 by default)
COMMENT $00002094 Sets a random terrain sprite 2d to 2f
COMMENT $000020b6 d0 = random 22-38
COMMENT $00002100 Bit 0: Asteroid occupied
COMMENT $00002100 Bit 1: Asteroid viewable by player
COMMENT $00002100 Bit 2: Gravity Nullifier active. Player and alien start with
COMMENT $00002100 a free temporary gravity nullifier effect for fairness. It's
COMMENT $00002100 rarely noticed because you don't start with Asteroid Tracker
COMMENT $00002100 except against the Tylarans.
COMMENT $00002100 Bit 4: Asteroid known to player
COMMENT $00002100 Bit 5: Asteroid has been surveyed for ore
COMMENT $00002106 Zero radiation. You start off with 30% radiation anyway,
COMMENT $00002106 because of background radiation caused by the starting
COMMENT $00002106 asteroid's 300 Asteros.
COMMENT $0000210e Start CPU production at 500.
COMMENT $00002114 Load with ores
COMMENT $00002128 Terran place CPU for startup
COMMENT $00002132 -127 build time. Will auto-build in one turn.
COMMENT $0000213e $37 - Transporter
COMMENT $0000214e A6 = ship
COMMENT $0000214e Hardpoints: Disruptor, Shield x10
COMMENT $00002160 ?
COMMENT $00002170 alien
COMMENT $00002186 [0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256]
COMMENT $00002186 + [0, 2, 4, 6, 8, 10, 12, 14]
COMMENT $000021b6 probably establish empty asteroids
COMMENT $000021de Update sprite buffer references to the correct offset.
COMMENT $000021ee Load 44 Terran building sprites
COMMENT $000024fa create a ship?
COMMENT $00002590 hotkeys ($50-$59 = F1-F10)
COMMENT $00002590 A bug lets you see an enemy asteroid without a spy satellite
COMMENT $00002590 by hotkey, as long as you are currently at another asteroid
COMMENT $000025fc GAME PAUSED.
COMMENT $0000263a Switch to dark palette after 7200 frames (144 seconds PAL)
COMMENT $0000267c restore normal non-dark palette
COMMENT $00002704 cache information in case it is asked for a second time
COMMENT $0000270c spy satellite spot chance increases
COMMENT $00002720 missile target
COMMENT $00002728 asteroid name
COMMENT $00002746 UNKNOWN AT THIS TIME.
COMMENT $000027c6 UNKNOWN AT THIS TIME.
COMMENT $00002836 43 = battleship
COMMENT $00002856 vary by -2 to +1
COMMENT $000028ca population
COMMENT $000028ce 1000
COMMENT $000029f2 NONE OF OUR ASTEROIDS!
COMMENT $00002a2e missile inventory
COMMENT $00002a9c spy building count
COMMENT $00002af4 vary by -6 to +5
COMMENT $00002b52 Our asteroids known to enemy - intel
COMMENT $00002cda blue text
COMMENT $00002dd8 INSUFFICIENT FUNDS FOR THAT REPORT
COMMENT $00002e54 win screen
COMMENT $00002f0e 318: INCOMING, ENCODED MESSAGE FROM TETRACORP...
COMMENT $00002f44 251: CONGRATULATIONS ON DEFEATING THE SWIXARANS!
COMMENT $00002f44 THE EMPRESS HERSELF SENDS HER APPRECIATION OF
COMMENT $00002f44 YOUR EFFORTS TO CLEAR SECTOR K240. SHE REQUESTS
COMMENT $00002f44 YOUR PRESENCE ON THE IMPERIAL HOMEWORLD AT
COMMENT $00002f44 ONCE, AND WISHES TO APPOINT YOU AS COLONIAL
COMMENT $00002f44 GOVERNOR OF K240.
COMMENT $00002f44 ;
COMMENT $00002f44 TETRACORP AWARDS YOU A PERFORMANCE BONUS OF
COMMENT $00002f44 FIVE MILLION CREDITS. YOUR WORK HERE IS FINISHED.
COMMENT $00002f4e The game appears to intentionally lock itself in a loop if you defeated
COMMENT $00002f4e the Swixarans, so you can't quit. Otherwise, it locks in a loop until
COMMENT $00002f4e mouse click is detected.
COMMENT $00002fc0 LOAD SAVE ALIEN FX SPEECH DOS END
COMMENT $0000309e 562: WELCOME TO TETRACORP.......
COMMENT $000030bc 69: SELECT 'ALIEN' AND CHOOSE A SCENARIO...
COMMENT $00003130 566: SOUND EFFECTS: ACTIVATED.
COMMENT $0000313c SOUND EFFECTS: DEACTIVATED.
COMMENT $0000316e SPEECH: ACTIVATED.
COMMENT $0000317a SPEECH: DEACTIVATED.
COMMENT $000031c6 WARNING!!
COMMENT $000031c6 ;
COMMENT $000031c6 YOU ARE ABOUT TO EXIT THE GAME.
COMMENT $000031c6 ;
COMMENT $000031c6 PRESS 'Y' TO EXIT TO DOS, OR
COMMENT $000031c6 PRESS 'N' TO STAY IN THE GAME.
COMMENT $0000325a PRESENTING TETRACORP....
COMMENT $00003270 Randomly select Tetracorp slogans from #358-365
COMMENT $000032b8 568: SAVE GAME FACILITY...
COMMENT $000032b8 ;
COMMENT $000032b8 INSERT SAVE DISK IN DRIVE DF0:
COMMENT $000032b8 PRESS LEFT MOUSE BUTTON WHEN READY
COMMENT $000032e4 ANALYSING DISK
COMMENT $00003388 POSITION X CURRENTY HOLDS A SAVE GAME
COMMENT $000033d4 578: SAVING GAME TO DISK...
COMMENT $00003406 IDFile is a file which lets the game determine whether it's playing
COMMENT $00003406 from floppy disk or hard disk.
COMMENT $00003414 SAVE FILE FORMAT
COMMENT $00003414 BYTES DATA START
COMMENT $00003414 18 $1b4f8 - save name and alien ID
COMMENT $00003414 30 $20304 - alien data
COMMENT $00003414 55,810 tblTransporters onward
COMMENT $00003414 37,800 pBuff09_Ships
COMMENT $00003414 33,600 pBuff10_Buildings
COMMENT $00003414 18,000 asteroids
COMMENT $00003414 1,920 pBuff17_BldgTotal
COMMENT $00003414 2,336 pBuff14_Save7 terran fleets
COMMENT $00003414 2,336 pBuff15_Save8 alien fleets
COMMENT $00003418 Set the filename aside in case one of the writes fails, in which case
COMMENT $00003418 it will be deleted.
COMMENT $0000341e Open in mode 1006 (MODE_NEWFILE). This is writing a new save game file.
COMMENT $0000341e http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node02D6.html
COMMENT $0000341e http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node0068.html
COMMENT $0000341e Other access modes are 1005 ($3ed), MODE_OLDFILE read/write
COMMENT $0000341e from the beginning of an existing file; and 1004 ($3ec) MODE_READWRITE,
COMMENT $0000341e opens file with shared lock, creating it if it doesn't exist.
COMMENT $0000343e Write 18 bytes.
COMMENT $00003440 write to disk
COMMENT $00003440 http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node0310.html
COMMENT $00003440 D0: return value for how many bytes actually written
COMMENT $00003440 D1: File pointer
COMMENT $00003440 D2: Pointer to buffer containign data written
COMMENT $00003440 D3: Length of data written.
COMMENT $00003456 Mysterious. I previously stated that the alien building data
COMMENT $00003456 table address is the exact filesize of the save file, or
COMMENT $00003456 131,870 bytes / $0x2031e in the v1.886 disassembly. However,
COMMENT $00003456 the actual save filesize is 151,850 in all versions, so I'm
COMMENT $00003456 not sure where I got this idea. In the raw EXE it's 0x5946
COMMENT $00003456 (22,854).
COMMENT $00003456 Actual effect is that it simply writes 30 bytes here,
COMMENT $00003456 starting at 0x20304.
COMMENT $00003544 SAVE SUCCESSFUL.
COMMENT $00003596 Close
COMMENT $000035a0 Delete file.
COMMENT $000035cc DISK ERROR!
COMMENT $000035f8 OPERATION ABORTED!
COMMENT $000035f8 RECTIFY THE FAULT AND TRY AGAIN
COMMENT $0000361a SCANNING FOR SAVED GAMES....
COMMENT $00003652 "EMPTY"
COMMENT $0000366a MODE_OLDFILE (read/write existing file from beginning)
COMMENT $00003696 NONAME
COMMENT $000036bc DISK DIRECTORY...
COMMENT $000036bc ;
COMMENT $000036bc POSITION 1:
COMMENT $000036bc POSITION 2:
COMMENT $000036bc POSITION 3:
COMMENT $000036bc POSITION 4:
COMMENT $000036fe CLICK LEFT BUTTON ON DESIRED SLOT, OR
COMMENT $000036fe CLICK RIGHT BUTTON TO ABORT....
COMMENT $00003722 LOAD GAME FACILITY...
COMMENT $00003722 ;
COMMENT $00003722 INSERT SAVE DISK IN DRIVE DF0:
COMMENT $00003722 PRESS LEFT MOUSE BUTTON WHEN READY...
COMMENT $0000374e ANALYSING DISK....
COMMENT $0000385c PREPARING TO LOAD SCENARIO DATA...
COMMENT $0000385c ;
COMMENT $0000385c INSERT GAME DISK 2 IN ANY DRIVE.
COMMENT $0000385c PRESS LEFT MOUSE BUTTON WHEN READY...
COMMENT $000038b2 INSERT SAVE DISK IN DRIVE DF0:
COMMENT $000038b2 PRESS LEFT MOUSE BUTTON WHEN READY...
COMMENT $000038e8 LOADING GAME FROM DISK....
COMMENT $000039e0 LOAD SUCCESSFUL.
COMMENT $00003b2e WELCOME TO SCI-TEK.......
COMMENT $00003b2e ;
COMMENT $00003b2e THE TECHNOLOGY YOU PREFER.
COMMENT $00003b72 PREV NEXT PURCHASE CLEAR END
COMMENT $00003c9a Sound Q: Error boop
COMMENT $00003c9a Error boop
COMMENT $00003cdc THANKYOU FOR ORDERING FROM SCI-TEK....
COMMENT $00003cdc ;
COMMENT $00003cdc YOUR BLUEPRINTS WILL ARRIVE ON THE NEXT
COMMENT $00003cdc IMPERIAL TRANSPORT.
COMMENT $00003d96 LOADING FROM DATABASE....
COMMENT $00003e4c THE IMPERIAL TRANSPORTER HAS BROUGHT THE FOLLOWING BLUEPRINTS:
COMMENT $00003e78 whatever saved_1b4f4 is, 16 bytes appear in the save file
COMMENT $00003ea6 593: LOAD SAVE ALIEN FX SPEECH DOS END
COMMENT $00003ec4 605: ENTER A NAME FOR THE SAVED FILE:
COMMENT $00003f06 $44 = return (numpad), $43 = Enter, $41 = Backspace
COMMENT $00003fae The manual codes are plainly stored as strings of Amiga key scancodes.
COMMENT $00003fae A lot of them have "20" where they end in spaces.
COMMENT $00004032 $44 = return (numpad), $43 = Enter, $41 = Backspace
COMMENT $000040c6 0x025b: AUTHORISATION CODE INVALID!!
COMMENT $000040c6 Manual protection check. The cracked version changes the first two
COMMENT $000040c6 bytes from 303c to 6016, branching forward 24 bytes to "code accepted".
COMMENT $000040de 0x025c: AUTHORISATION CODE ACCEPTED...
COMMENT $000041fc 597: YOU HAVE ELECTED TO CONTINUE WITH YOUR MISSION.
COMMENT $000041fc ;
COMMENT $000041fc ;
COMMENT $000041fc THE COMPANY ADMIRES YOUR DETERMINATION AND WISHES
COMMENT $000041fc YOU EVERY SUCCESS.
COMMENT $000041fc ;
COMMENT $000041fc GET READY TO CONTINUE
COMMENT $00004238 THIS ACTION WILL CAUSE YOUR EXISTING MISSION TO
COMMENT $00004238 BE ABORTED!!
COMMENT $00004238 ;
COMMENT $00004238 CLICK LEFT MOUSE BUTTON TO CONFIRM, OR
COMMENT $00004238 RIGHT MOUSE BUTTON TO RETURN TO YOUR PREVIOUS
COMMENT $00004238 MISSION.
COMMENT $00004274 598: GET READY TO CONTINUE
COMMENT $0000428c 600: YOU HAVE ELECTED TO BEGIN A NEW MISSION
COMMENT $0000428c ;
COMMENT $0000428c NOW LOADING STAR CHARTS FOR AN UNEXPLORED REGION
COMMENT $0000428c OF SECTOR K240....
COMMENT $000042cc 547: LAST MINUTE INTELLIGENCE...
COMMENT $000042f4 Last minute intelligence strings 541 to 546 for aliens 1-6.
COMMENT $0000430e YOU ARE GIVEN THE FOLLOWING EQUIPMENT:
COMMENT $0000433a 0b000000 0b000000 0b1a1c00 06101600 07080000 08141800
COMMENT $0000433a Four bytes for each alien determining which blueprints you start with.
COMMENT $00004392 599: PRESS A MOUSE BUTTON TO CONTINUE
COMMENT $000043c4 Tylaran-specific init variables
COMMENT $000043c4 Enable Asteroid Tracker display by default
COMMENT $000043fa Initialize new game. Reset memory values.
COMMENT $00004440 Iterate over 6400 bytes and set it to false
COMMENT $0000447a Set bit 5 (PAFW enabled)
COMMENT $00004482 Imperial transport countdown: 150 days
COMMENT $000044aa Clear extracted buttons
COMMENT $000044d4 380
COMMENT $000044e2 E2.380.01
COMMENT $000045ce Triggers on values 0100, 0105, 0109 and 010c.
COMMENT $000045ce Deploys a random value from $2d to $2f.
COMMENT $000045fa Probably actually load language select screen
COMMENT $000048ea alien text list
COMMENT $00004938 NEXT PLAY END
COMMENT $00005290 IFF ILBM image files
COMMENT $000052a4 "HD" - BMHD, Bitmap Header (IFF ILBM)
COMMENT $000052c0 "AP" - CMAP, Palette (IFF ILBM)
COMMENT $000052f8 "DY" - BODY, Image Data (IFF ILBM)
COMMENT $00005378 DMACONR - check for blitter DMA enabled
COMMENT $0000579e 24,000
COMMENT $000057ae 8,000
COMMENT $000058e2 suspect bitplanes
COMMENT $00005c4e Look at asteroid
COMMENT $00005cb4 appears to be clicking on things
COMMENT $00005d9e NO SPY SATELLITE ORBITING THAT ASTEROID!
COMMENT $00005f4e Amiga keyboard scancodes
COMMENT $00005f4e Right arrow
COMMENT $00005f5c Left arrow
COMMENT $00005f6a 0
COMMENT $00005f74 1-9
COMMENT $00005f9c Spacebar (toggles between normal and flat view)
COMMENT $00005fb4 D (demolish cursor)
COMMENT $00005fc4 S (ship cursor)
COMMENT $00005fd4 V (Version string)
COMMENT $00005fee mousewait
COMMENT $00005ffa F1-F10
COMMENT $00006016 K240 - VERSION 1.886, 20-5-94 13:25
COMMENT $00006016 CLICK MOUSE TO CONTINUE GAME...
COMMENT $0000624a Sound S: Turret fire
COMMENT $00006376 sprite functions
COMMENT $00006376 Loops over four 8000-byte bitplanes for 16-color graphics
COMMENT $000065b8 a 1600 byte chip buffer
COMMENT $000066d6 ( 1 DAY )
COMMENT $000066e4 ( DAYS )
COMMENT $00006884 random screen coords
COMMENT $000068d6 Random screen coords
COMMENT $000069c2 105: THIS ASTEROID IS IN A STASIS FIELD.
COMMENT $000069de Population check
COMMENT $000069e4 420: COLONY NOT YET ESTABLISHED!
COMMENT $00006a74 max 100 buildings per asteroid
COMMENT $00006ab4 Landing pad
COMMENT $00006ac4 LANDING PAD TOO NEAR EDGE OF ASTEROID!
COMMENT $00006b2c Build instantly.
COMMENT $00006b58 four square buildings:
COMMENT $00006b80 Set bits 0,1,4,5
COMMENT $00006b94 064: YOUR SITE IS OBSTRUCTED.
COMMENT $00006b9a 065: YOU CANNOT BUILD IN SPACE!
COMMENT $00006ba2 448: ASTEROID STRUCTURE TOO WEAK!
COMMENT $00006ba2 This will occur if there are already 100 buildings, regardless of size.
COMMENT $00006c0e the result of clicking on an asteroid square
COMMENT $00006c28 Sound D: Pip (button click)
COMMENT $00006c28 Button click sound
COMMENT $00006c9e Deals 120 damage, enough to destroy any building
COMMENT $00006d48 Most buildings don't do anything special when destroyed
COMMENT $00006d64 If this building is affected by a shield generator:
COMMENT $00006d64 Half damage, minimum 1
COMMENT $00006d74 If looping over a ship's hardpoints (?)
COMMENT $00006d86 Destroy building if HP = 0
COMMENT $00006d90 Special rules for destroying certain Terran buildings
COMMENT $00006eb2 Most buildings do nothing special when destroyed
COMMENT $00006eb2 Some have obvious special effects.
COMMENT $00006f6c When a storage tower or facility is destroyed, if this reduces
COMMENT $00006f6c capacity below necessary, ore is lost starting from selenium.
COMMENT $00006f72 The building numbers here are the standard building list counting from 0
COMMENT $00006f72 an incrementing 2 at a time.
COMMENT $00006f86 300*( facilities + 2*(towers+protected towers) ) - ore total
COMMENT $000070c4 Places building D4, but in practice this is only ever called
COMMENT $000070c4 to place a CPU, when establishing the initial colony or
COMMENT $000070c4 starting a new colony
COMMENT $000070ca If asteroid byte 89 bits 6 or 7 are set to 1, you can't build.
COMMENT $000070ca bit 7 = stasis.
COMMENT $000070da D0 here acquires the value 4 if the building is one of the
COMMENT $000070da 4-square buildings, otherwise 1.
COMMENT $00007100 Find an empty building slot
COMMENT $00007134 Building armor gives an additional 10 armour to any building.
COMMENT $00007134 Only applies to new buildings. Applies to new CPUs.
COMMENT $000071f4 loop 2400 times, 24 x 100 buildings
COMMENT $00007310 Tetracorp load screen typer
COMMENT $00007352 Text will not progress to the next item if a mouse button is held
COMMENT $00007352 An undocumented feature to let you stop and read Tetracorp slogans.
COMMENT $0000735e type char
COMMENT $0000735e 7f = ascii del ?
COMMENT $00007364 Skip half
COMMENT $00007380 ascii: A E I O U
COMMENT $00007380 Text typer. In order to create the right sound, it appears to only
COMMENT $00007380 make the text tick on consonants and punctuation, not vowels.
COMMENT $0000739e Sound C: Tick (typer)
COMMENT $0000739e This sound is identical to the finance window ticker
COMMENT $0000739e However, it is technically a separate sound.
COMMENT $000073b8 ascii tab?
COMMENT $0000749c 400
COMMENT $000074b0 1 million
COMMENT $000074cc 100,000
COMMENT $000074d2 100,000
COMMENT $000074ee 10,000
COMMENT $00007520 Gets the address of the string.
COMMENT $00007532 Same as previous but loads into register A1
COMMENT $00007544 "Please insert disk" blocks game. You can't cancel it.
COMMENT $00007546 356: PLEASE INSERT K240 GAME DISK x IN ANY DRIVE...
COMMENT $00007546 offset of disk number in this string varies by language
COMMENT $0000756c Interesting quirk here. ENGLISH.MGL consists of a list of
COMMENT $0000756c byte offsets followed by a list of null-byte terminated
COMMENT $0000756c strings which are referenced by the string. String 102 is
COMMENT $0000756c "AREA EXP.", followed by a null byte, followed by the string
COMMENT $0000756c "--- NONE ---", but the latter string has no entry in the
COMMENT $0000756c byte offset list. The only way to access it is to point to
COMMENT $0000756c the "AREA EXP." string and advance the pointer 10 bytes.
COMMENT $0000756c I suspect this was done to add AREA EXP. to the string list
COMMENT $0000756c without adding a new string to the string list.
COMMENT $0000756e 102: AREA EXP./--- NONE ---
COMMENT $00007824 Sound Q: Error boop
COMMENT $00007824 Error noise
COMMENT $00007844 Sound Q: Error boop
COMMENT $00007844 Error noise
COMMENT $0000787e text typer?
COMMENT $00007896 CD: 400400 (cash total display string)
COMMENT $000078c0 10 million
COMMENT $000078c8 9,999,999. Cap currency display at that
COMMENT $000078ce 1 million
COMMENT $0000792a 106: -- IN STASIS --
COMMENT $00007d60 window layout?
COMMENT $00007fda 104: MISSILE CONSTRUCTION FUND RUNNING LOW!
COMMENT $00007ffe 157: MISSILE PODS NEED MORE
COMMENT $0000821c 170: CONSTRUCTION PROCEEDING NORMALLY.
COMMENT $0000836e 391: YOU HAVE NO ACTIVE CPU ON THIS ASTEROID!
COMMENT $0000836e Error shown when you try to fire missiles.
COMMENT $00008384 160: NO MISSILE SILOS ON ASTEROID
COMMENT $0000849e 558: COMET!!
COMMENT $000085f4 Sound B: Tick
COMMENT $000085f4 money tick
COMMENT $0000860c Sound B: Tick
COMMENT $000087f0 Ore survey of an asteroid that doesn't exist
COMMENT $0000881a Asteroid name
COMMENT $00008838 Ore survey of an asteroid that does exist
COMMENT $00008854 Survey completed:
COMMENT $0000885a ore
COMMENT $00008966 558: FROM:
COMMENT $00008984 598: TO
COMMENT $00008b76 Sound B: Tick
COMMENT $00008bb8 Sound B: Tick
COMMENT $00008bb8 money tick
COMMENT $00008bc4 SOURCE ASTEROID STORES FULL!
COMMENT $00008bd0 DESTINATION ASTEROID STORES FULL!
COMMENT $00008bdc NO DESTINATION TELEPORTER SPECIFIED!
COMMENT $00008be8 DESTINATION HAS NO ORE TELEPORTER!
COMMENT $00008e58 Sound B: Tick
COMMENT $00008e9c Sound B: Tick
COMMENT $00008fd0 D0: String ID of message text.
COMMENT $00008fd0 D1 Pointer to asteroid named. If none, this is set to 0.
COMMENT $00008fd0 D2: Money reward. If none, set to 0.
COMMENT $00008fd0 D3: ? 1, 6 (powerplant burnout)
COMMENT $00008fd0 D4: ? 12 (rad warning), 0 (cloak powered down, inaccurate survey)
COMMENT $00008fd0 13 (powerplant burnout, air fail)
COMMENT $0000901c If an asteroid was named, put its name's address into a text field
COMMENT $00009040 Money reward
COMMENT $00009338 Sound B: Tick
COMMENT $00009350 Sound B: Tick
COMMENT $000095aa 590: TRANSPORT LOCATIONS:
COMMENT $000095e8 Asteroid name
COMMENT $0000962c 555: IN SPACE
COMMENT $00009692 BUILDING WITHOUT POWER!
COMMENT $00009784 BUILDING WITHOUT POWER!
COMMENT $00009a88 Coordinates of ship hardpoints on the screen.
COMMENT $00009ae6 First eight hardpoints are weapons.
COMMENT $00009af6 135: ION CANNON
COMMENT $00009af6 Note: 135 to 150 are ship hardpoints.
COMMENT $00009d0a Sound D: Pip (button click)
COMMENT $00009d0a button click sound
COMMENT $00009d7e Sound D: Pip (button click)
COMMENT $00009d8e Sound D: Pip (button click)
COMMENT $00009ef4 135: ION CANNON
COMMENT $00009ef4 Note: 135 to 150 are ship hardpoints.
COMMENT $0000a0e6 Sound D: Pip (button click)
COMMENT $0000a0e6 Button click
COMMENT $0000a15a Sound D: Pip (button click)
COMMENT $0000a16a Sound D: Pip (button click)
COMMENT $0000a3e2 some blueprint shipbuildy thing. Space dock?
COMMENT $0000a54c 135: ION CANNON
COMMENT $0000a54c Note: 135 to 150 are ship hardpoints.
COMMENT $0000a7e0 Sound D: Pip (button click)
COMMENT $0000a854 Sound D: Pip (button click)
COMMENT $0000a864 Sound D: Pip (button click)
COMMENT $0000a9c0 ore in stores
COMMENT $0000a9c4 Somewhere in here is the cause of the
COMMENT $0000a9c4 YARDS NEED MORE DRAGONIUM bug
COMMENT $0000a9c4 My guess is that it's comparing the current ore to the total ore needed
COMMENT $0000a9c4 instead of the remaining ore needed.
COMMENT $0000a9c4 Thus a ship requiring 8 dragonium which uses 7 should only need 1 more,
COMMENT $0000a9c4 but will complain if there is not a full 8 in stores.
COMMENT $0000aa1a 169: VEHICLE CONSTRUCTION FUND RUNNING LOW!
COMMENT $0000aa3c 168: YARDS NEED MORE
COMMENT $0000aae4 19,000,000
COMMENT $0000aaec 9,999,999
COMMENT $0000aaf2 1,000,000
COMMENT $0000ab24 100,000
COMMENT $0000ac9c Sound B: Tick
COMMENT $0000af88 173: ORBITAL SPACE DOCK
COMMENT $0000afd6 asteroid name
COMMENT $0000b1f0 "INVALID INSTRUCTION - YOU CAN'T USE THAT HERE!"
COMMENT $0000b250 Ship pointer
COMMENT $0000b452 YOU HAVE NO ACTIVE CPU ON THIS ASTEROID!
COMMENT $0000b462 asteroid name
COMMENT $0000b46c population
COMMENT $0000b474 worker surplus
COMMENT $0000b486 radiation
COMMENT $0000b498 population maximum
COMMENT $0000b49e 342: ASTEROID SECURE.
COMMENT $0000b49e 343: LOW MORALE.
COMMENT $0000b49e 344: SOCIAL UNREST.
COMMENT $0000b49e 345: MAJOR CRIMINAL ACTIVITY
COMMENT $0000b49e 346: SECURITY ALERT!
COMMENT $0000b4be Power usage. 12 fields are PAFW production/usage/surplus
COMMENT $0000b568 fleets
COMMENT $0000b7f6 Sound E: Warning klaxon
COMMENT $0000b836 YOU OWN THE FOLLOWING BLUEPRINTS:
COMMENT $0000babe SPEED:
COMMENT $0000bb0a 121: ACTIVE.
COMMENT $0000bb14 122: INACTIVE.
COMMENT $0000bb38 DAYS:
COMMENT $0000bc22 YOU HAVE NO COMMAND CENTRES!
COMMENT $0000be52 555: IN SPACE
COMMENT $0000be74 556: ENEMY FLEET
COMMENT $0000bf18 126: ORBITAL SHUTTLE
COMMENT $0000bf18 Note: 127-133 are terran ship names. 126 is unused.
COMMENT $0000c0de Fleet bug fix applied in v2.000. This single BNE.W fixes a bug
COMMENT $0000c0de present in v1.886 which causes the game to crash on a fleet
COMMENT $0000c0de move after fleet incorrectly makes a sudden jump to a
COMMENT $0000c0de different asteroid. This is the only change to v2.000.
COMMENT $0000c4d6 Presumably handles scoutship spying orders
COMMENT $0000c51a Sound A: Beep
COMMENT $0000c540 Asteroid name
COMMENT $0000c686 tylaran
COMMENT $0000c6f8 8 = ship ID. This refers to the Terran large ships.
COMMENT $0000c722 warp generator
COMMENT $0000c722 This is probably sprite code
COMMENT $0000c732 static inducer
COMMENT $0000c74a Check if ship firing
COMMENT $0000c76e Ship ID
COMMENT $0000c772 02: Assault Fighter
COMMENT $0000c772 03: Combat Eagle
COMMENT $0000c772 04: Scout Ship
COMMENT $0000c782 0 35: Destructor
COMMENT $0000c782 1 36: Terminator
COMMENT $0000c782 2 37: Transporter
COMMENT $0000c782 3 38: Fleet Battleship
COMMENT $0000c782 4 39: Orbital Spacedock
COMMENT $0000c782 5+ 3c-43: Alien ships
COMMENT $0000c79e 30 entries = 15 pairs: 5 large terran ships and 8 alien ships
COMMENT $0000c79e Destructor
COMMENT $0000c7a6 Terminator
COMMENT $0000c7ae Transporter
COMMENT $0000c7b6 Fleet Battleship
COMMENT $0000c7be Orbital Spacedock
COMMENT $0000c7c6 Small alien ship 3c
COMMENT $0000c7ce Small alien ship 3d
COMMENT $0000c7d6 Alien ship 3e
COMMENT $0000c7de Alien ship 3f
COMMENT $0000c7e6 Alien ship 40
COMMENT $0000c7ee Alien ship 41
COMMENT $0000c7f6 Alien ship 42
COMMENT $0000c7fe Alien ship 43
COMMENT $0000c806 Alien ship 44?
COMMENT $0000c80e Alien ship ??
COMMENT $0000cb4a Fleet is set
COMMENT $0000cc0e Reduce 1 from ship's firing cooldown
COMMENT $0000cc24 clear firing weapon
COMMENT $0000cdfc ship destroyed flag?
COMMENT $0000ce66 cooldown timer: 16
COMMENT $0000ce6c weapon firing
COMMENT $0000ce78 static inducer effect
COMMENT $0000cf1e appears to involve moving screens
COMMENT $0000d064 not in stasis
COMMENT $0000d0da Stasis
COMMENT $0000d0e0 If not in stasis, do _107da and clear static inducer
COMMENT $0000d1f8 A list of 45 possible things ships can be made to do.
COMMENT $0000d1f8 "Ships" also includes missiles, fire, vortex storms.
COMMENT $0000d1f8 List starts from 1. Listed here in hex
COMMENT $0000d2c0 Sound W: Spy satellite launch
COMMENT $0000d2c0 Spy satellite launch
COMMENT $0000d3a2 axz antivirus
COMMENT $0000d41e Set armour to 150. Used by the Imperial Transporter.
COMMENT $0000d4f6 Swixaran cloaked asteroid detection
COMMENT $0000d582 Report upon return from mission finding asteroids
COMMENT $0000d584 73: A SCOUT REPORTS FINDING 1 ASTEROID.
COMMENT $0000d592 74: A SCOUT REPORTS FINDING x ASTEROIDS.
COMMENT $0000d5c4 5,000 per asteroid found
COMMENT $0000d600 Every 16 days:
COMMENT $0000d618 Return home
COMMENT $0000d648 ore survey
COMMENT $0000d658 if asteroid doesn't exist:
COMMENT $0000d66c coords?
COMMENT $0000d6da every 8 days
COMMENT $0000d6f6 Swixaran-specific
COMMENT $0000d760 Pick a random ground target?
COMMENT $0000d796 random coords?
COMMENT $0000d816 random position?
COMMENT $0000d834 Movement?
COMMENT $0000d8ca You need 30,000 in general cash.
COMMENT $0000d8d6 COLONY NOT ESTABLISHED DUE TO LACK OF MONEY.
COMMENT $0000d8f6 285: COLONY ESTABLISHED ON THIS ASTEROID.
COMMENT $0000d90a Building ID 21: CPU
COMMENT $0000d916 Start CPU output at 500
COMMENT $0000d946 Non-large ships. Perhaps moving off the top of the screen
COMMENT $0000da0c landing pad
COMMENT $0000dbe0 9: facing
COMMENT $0000dc06 action 04, often set by default. patrol asteroid?
COMMENT $0000dc9a Adds a new ship to the list. Caps out at 700.
COMMENT $0000dc9a Missiles and vortex storms also appear to be ships.
COMMENT $0000dc9a d2 = ship type
COMMENT $0000dd28 random facing
COMMENT $0000dd40 large ships, transporter size and up
COMMENT $0000e1fa Tyl Energiser: d0=50, d1=$88, d5=0
COMMENT $0000e28a Applies to the Kll triangular ship which rotates
COMMENT $0000e2d4 Burning fire, e.g. napalm, hellfire sprite.
COMMENT $0000e324 Sound G: Missile launch
COMMENT $0000e324 Missile launch sound
COMMENT $0000e38e Fire deals double damage to Swixaran
COMMENT $0000e38e 2 instead of 1
COMMENT $0000e3ee Missile
COMMENT $0000e4de 10 damage
COMMENT $0000e4e0 Deflector
COMMENT $0000e4ea Deflector reduces damage to half rounded down, minimum zero
COMMENT $0000e4f0 order ship to explode if it is below 1hp
COMMENT $0000e5ac Destroy small/medium ships
COMMENT $0000e5e6 Destroy large ships (transporter/battleship size)
COMMENT $0000e6e4 more ship destroy
COMMENT $0000e6ec imperial transport
COMMENT $0000e6f2 terran transporter
COMMENT $0000e700 Alien transporter: 5,000 reward
COMMENT $0000e714 Alien battleship: 10,000 credit reward
COMMENT $0000e804 Destroys a ship A6
COMMENT $0000e804 Called by scout breakup routine
COMMENT $0000e806 transporter
COMMENT $0000e818 Alien transporter
COMMENT $0000e820 Gain 5,000 credits
COMMENT $0000e82c Alien battleship
COMMENT $0000e832 Gain 10,000 credits
COMMENT $0000e858 Destruction of a terran ship:
COMMENT $0000e86e If necessary, remove from fleet
COMMENT $0000e88c Destruction of an alien ship:
COMMENT $0000e8d0 missiles thing
COMMENT $0000e8fc Missile, on launch
COMMENT $0000e912 Specific effect for Axz warhead 00:
COMMENT $0000e916 Otherwise:
COMMENT $0000ea00 Axz, warhead 10 (Antivirus):
COMMENT $0000ea0a Ax-Zilanth specific Explosive missile effects:
COMMENT $0000ea48 Static Inducer warhead
COMMENT $0000ea60 init hardpoints empty
COMMENT $0000ea8e First hardpoint slot is always a weapon
COMMENT $0000eaa4 Reroll static inducer
COMMENT $0000eaaa Reroll warp generator
COMMENT $0000eab8 appears to be coords
COMMENT $0000eac0 ships
COMMENT $0000eadc Transporter, Battleship, or their alien equivalents
COMMENT $0000eb1a missiles en route
COMMENT $0000eb2e missiles
COMMENT $0000eb3a Alien
COMMENT $0000eb42 not missiles in transit
COMMENT $0000eb48 missiles in transit
COMMENT $0000eb60 Terran missiles
COMMENT $0000eb68 Not in transit
COMMENT $0000eb9a Coords?
COMMENT $0000eba6 Random offset -4 to 5
COMMENT $0000ec0a misl
COMMENT $0000ec18 Terran missile:
COMMENT $0000ec22 Terran missile, non-Tylaran alien:
COMMENT $0000ec28 Terran missile, non-Tylaran alien, not known to player
COMMENT $0000ec2c Fired by alien, or vs Tylaran, or known to player.
COMMENT $0000ec2c In other words, the player cannot fire missiles against an enemy
COMMENT $0000ec2c asteroid that he has not formally discovered (usually happens when
COMMENT $0000ec2c you can see an asteroid with Telescope cheat, but haven't officially
COMMENT $0000ec2c sent a scout ship to find it yet). HOWEVER, Tylaran are exempt, and
COMMENT $0000ec2c you can fire missiles at undiscovered Tylaran asteroids all you like.
COMMENT $0000ec86 missiles launching
COMMENT $0000ecd4 Alien missiles
COMMENT $0000ed12 Terran missiles
COMMENT $0000ed1e Tylaran don't use missiles
COMMENT $0000ed44 Spy satellite
COMMENT $0000edba ships
COMMENT $0000edda small ships
COMMENT $0000ee1e large ships
COMMENT $0000ee66 ;
COMMENT $0000ee7a asteroid discovered
COMMENT $0000ee84 Swap source/destination?
COMMENT $0000ee96 Spy satellite enters orbit?
COMMENT $0000ef1e Tylaran, incoming Terran missiles
COMMENT $0000ef48 Warp Manipulator
COMMENT $0000ef5c 50% chance
COMMENT $0000efea movement. missile?
COMMENT $0000f02e missile strike
COMMENT $0000f07e Ax-Zilanth:
COMMENT $0000f0e4 Incoming missiles
COMMENT $0000f0e4 A0 = asteroid
COMMENT $0000f0e4 A4 = building count
COMMENT $0000f0e4 A5 = buildings
COMMENT $0000f0e4 A6 = missile
COMMENT $0000f0ee Terran missile:
COMMENT $0000f0ee Anti-Missile pods ignore Terran Antivirus
COMMENT $0000f0f6 Terran non-Antivirus:
COMMENT $0000f102 if there is at least one anti-missile pod
COMMENT $0000f10a d0 = ast[88] = pods x 2
COMMENT $0000f10e d2 = 20
COMMENT $0000f10e d1 = p-1
COMMENT $0000f110 If there's more than one pod:
COMMENT $0000f114 d1 = (p-1)*4
COMMENT $0000f114 d2 = ((p-1)*4)+20
COMMENT $0000f116 Alien missiles:
COMMENT $0000f11c missile pod's powerfail - seems to be alien missiles only
COMMENT $0000f130 if there is at least one anti-missile pod
COMMENT $0000f134 88 = 2 x missile pods
COMMENT $0000f13c d2 = 20
COMMENT $0000f13c d1 = p-1
COMMENT $0000f140 d1 = (p-1)*2
COMMENT $0000f140 ast[88] = pods*2
COMMENT $0000f140 d2 = ((pods-1)*2) + 20
COMMENT $0000f140 20%, +2% for each pod after the first, max 70% at 26 pods
COMMENT $0000f142 cap D2 at 70 (26 pods?)
COMMENT $0000f148 Pods | Terran | Alien
COMMENT $0000f148 ;------|--------|-------
COMMENT $0000f148 1 | 20% | 20%
COMMENT $0000f148 2 | 24% | 22%
COMMENT $0000f148 3 | 28% | 24%
COMMENT $0000f148 4 | 32% | 26%
COMMENT $0000f148 5 | 36% | 28%
COMMENT $0000f148 6 | 40% | 30%
COMMENT $0000f148 7 | 44% | 32%
COMMENT $0000f148 8 | 48% | 34%
COMMENT $0000f148 9 | 52% | 36%
COMMENT $0000f148 10 | 56% | 38%
COMMENT $0000f148 11 | 60% | 40%
COMMENT $0000f148 12 | 64% | 42%
COMMENT $0000f148 13 | 68% | 44%
COMMENT $0000f148 14 | 70% | 46%
COMMENT $0000f148 15 | 70% | 48%
COMMENT $0000f148 16 | 70% | 50%
COMMENT $0000f148 17 | 70% | 52%
COMMENT $0000f148 18 | 70% | 54%
COMMENT $0000f148 19 | 70% | 56%
COMMENT $0000f148 20 | 70% | 58%
COMMENT $0000f148 21 | 70% | 60%
COMMENT $0000f148 22 | 70% | 62%
COMMENT $0000f148 23 | 70% | 64%
COMMENT $0000f148 24 | 70% | 66%
COMMENT $0000f148 25 | 70% | 68%
COMMENT $0000f148 26+ | 70% | 70%
COMMENT $0000f156 NOTE: since BMI branches on negative, it doesn't branch on zero,
COMMENT $0000f156 so a 20% chance is really a 21% chance.
COMMENT $0000f156 The chance to shoot down a missile with a pod is therefore
COMMENT $0000f156 21% for the first pod, +2% per additional pod, max 71% at 26 pods.
COMMENT $0000f156 presumably blows up the missile
COMMENT $0000f16a missile scatter or antivirus
COMMENT $0000f172 missile not scatter or antivirus
COMMENT $0000f1ac 50% chance missile sprite direction
COMMENT $0000f1c6 missile not scatter or antivirus
COMMENT $0000f222 Effect of a missile on successful hit
COMMENT $0000f222 missile (a6): 27 = missile ID
COMMENT $0000f26c Static Inducer warhead effect
COMMENT $0000f286 2/3 chance:
COMMENT $0000f286 Appears to be Static Inducer effect
COMMENT $0000f298 Sound R: Static Inducer
COMMENT $0000f298 Static Inducer zip sound
COMMENT $0000f2ea 10 damage.
COMMENT $0000f2f8 Ax-Zilanth seems to have Antivirus. All other uses replace
COMMENT $0000f2f8 it with a custom missile.
COMMENT $0000f2f8 Ore-Eaters' missile is rated medium yield.
COMMENT $0000f2f8 Swixaran's is rated high yield.
COMMENT $0000f2f8 Ax-Zilanth and Rigellian's is rated "other".
COMMENT $0000f32e terran, axz
COMMENT $0000f380 Green stuff?
COMMENT $0000f390 -10% background radiation
COMMENT $0000f3ae Virus fired by Ore-Eater sets ast[90] bit 0
COMMENT $0000f3bc Virus fired by player or any alien except Ore-Eater
COMMENT $0000f3c6 Virus fired by, or at, Axz:
COMMENT $0000f3cc Virus fired at Axz:
COMMENT $0000f3d6 Special case when Axz hit by a Virus after the first:
COMMENT $0000f3d6 Essentially, it appears that the Axz adapt after the
COMMENT $0000f3d6 first Virus. In practice, it means all Virus you fire after