-
Notifications
You must be signed in to change notification settings - Fork 0
/
11-s517.asm
11255 lines (9825 loc) · 213 KB
/
11-s517.asm
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
;
; 11-s517.asm - key sector for 11-s518
;
; This source code is copyright (c) 2008 Jason Duerstock
; jason.duerstock@gmail.com
;
; The original program is copyright (c) 1987 Intellicreations Inc.
;
; This file is part of the ardungeon project which is an attempt to
; reverse engineer "Alternate Reality: The Dungeon" for the Atari 8-bit
; computer.
;
; ardungeon is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License version 2
; as published by the Free Software Foundation.
;
; ardungeon is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with ardungeon; if not, write to the
; Free Software Foundation, Inc.
; 51 Franklin Street, Fifth Floor
; Boston, MA 02110-1301 USA
;
.include "equates.inc"
.include "globals.inc"
.include "macros.inc"
; .ORG $100
.SEGMENT "SEG_3C_KEY"
.BYTE $42,$05,$00,$4f,$d4,$ee,$ca,$7c,$58,$be,$41,$ff,$11,$1a,$97,$bd
.BYTE $d4,$15,$ae,$5b,$8a,$35,$b7,$6d,$f1,$74,$7d,$f4,$98,$e8,$d5,$16
.BYTE $31,$47,$2d,$e3,$62,$94,$d4,$d6,$45,$78,$9b,$3a,$76,$db,$db,$6d
.BYTE $70,$5c,$37,$b6,$b8,$66,$ed,$56,$61,$aa,$db,$6b,$03,$85,$59,$12
.BYTE $d0,$f2,$3c,$e8,$af,$97,$b5,$0e,$c6,$46,$26,$3f,$04,$ad,$82,$72
.BYTE $85,$f3,$fc,$18,$73,$39,$cf,$0d,$28,$2b,$6a,$d5,$ee,$83,$b8,$6d
.BYTE $f9,$a0,$74,$38,$53,$48,$1b,$cd,$1b,$f2,$df,$2d,$25,$e6,$f7,$5a
.BYTE $c6,$00,$90,$1f,$6d,$f2,$28,$bc,$5c,$ce,$41,$9a,$54,$6b,$2c,$74
.SEGMENT "SEG_3C"
; .ORG $1400
.BYTE $00,$00,$00,$00,$00,$00,$00,$00
.BYTE $78,$9C,$3C,$36,$3E,$66,$66,$C3
.BYTE $EE,$73,$63,$6E,$63,$63,$63,$DE
.BYTE $3C,$66,$CC,$C0,$C0,$C0,$E6,$7C
.BYTE $EE,$73,$63,$63,$63,$63,$63,$DE
.BYTE $FE,$66,$60,$78,$60,$63,$66,$7C
.BYTE $FE,$66,$60,$78,$60,$60,$60,$60
.BYTE $3C,$66,$C6,$C0,$DE,$C6,$66,$3C
.BYTE $C6,$C6,$C6,$CE,$FE,$E6,$C6,$C6
.BYTE $30,$18,$18,$18,$18,$18,$18,$0C
.BYTE $1E,$0C,$0C,$0C,$0C,$1C,$38,$60
.BYTE $C6,$6C,$6C,$78,$78,$6C,$6C,$C6
.BYTE $E0,$60,$60,$60,$60,$66,$7E,$78
.BYTE $C6,$EE,$FE,$D6,$C6,$C6,$C6,$C6
.BYTE $C6,$C6,$E6,$F6,$DE,$CE,$C6,$C6
.BYTE $7C,$CE,$C6,$C6,$C6,$C6,$E6,$7C
.BYTE $FC,$66,$66,$66,$6C,$60,$60,$C0
.BYTE $7C,$E6,$C6,$C6,$C6,$C6,$CE,$7F
.BYTE $EE,$73,$66,$6C,$66,$66,$63,$C3
.BYTE $3A,$66,$60,$3C,$06,$06,$66,$5C
.BYTE $FE,$30,$60,$C0,$C0,$C2,$C6,$7C
.BYTE $E6,$66,$66,$66,$66,$66,$6E,$3F
.BYTE $C3,$66,$66,$66,$66,$66,$3C,$18
.BYTE $C3,$C3,$C3,$D3,$CB,$DF,$77,$62
.BYTE $C3,$C3,$66,$3C,$3C,$66,$C3,$C3
.BYTE $C3,$66,$66,$3C,$18,$18,$18,$18
.BYTE $7E,$C6, $C,$18,$FE,$60,$C3,$FE
.BYTE $00,$00,$00,$00,$00,$18,$18,$00
.BYTE 0, 0, 0, 0,$7E, 0, 0, 0
.BYTE 0,$18,$18,$18, 0, 0, 0, 0
.BYTE $18,$3C,$3C,$3C,$18,$18, 0,$18
.BYTE $3C,$66,$66, $C,$18, 0,$18, 0
.BYTE 0, 0, 0, 0, 0, 0, 0, 0
.BYTE $18,$3C,$3C,$3C,$18,$18, 0,$18
.BYTE $66,$66,$66, 0, 0, 0, 0, 0
.BYTE 0,$66,$FF,$66,$66,$FF,$66, 0
.BYTE $18,$3E,$60,$3C, 6,$7C,$18, 0
.BYTE 0,$66,$6C,$18,$30,$66,$46, 0
.BYTE $1C,$36,$1C,$38,$6F,$66,$3B, 0
.BYTE 0,$18,$18,$18, 0, 0, 0, 0
.BYTE 6, $E,$1C,$18,$18,$1C, $E, 6
.BYTE $60,$70,$38,$18,$18,$38,$70,$60
.BYTE 0,$66,$3C,$FF,$3C,$66, 0, 0
.BYTE 0,$18,$18,$7E,$18,$18, 0, 0
.BYTE 0, 0, 0, 0, 0,$18,$18,$30
.BYTE 0, 0, 0,$7E, 0, 0, 0, 0
.BYTE 0, 0, 0, 0, 0,$18,$18, 0
.BYTE 3, 6, $C,$18,$30,$60,$40, 0
.BYTE $7C,$CE,$C6,$C6,$C6,$E6,$7C, 0
.BYTE $38,$38,$18,$18,$18,$18,$18, 0
.BYTE $7C,$E6, $C,$18,$30,$60,$FE, 0
.BYTE $7E, $C,$18, $C, 6,$66,$3C, 0
.BYTE $C,$1C,$3C,$6C,$CC,$FE, $C, 0
.BYTE $7E,$60,$7C, 6, 6,$66,$3C, 0
.BYTE $7C,$C6,$C0,$FC,$CE,$E6,$7C, 0
.BYTE $7E, 6, $C,$18,$30,$30,$30, 0
.BYTE $7C,$CE,$E6,$7C,$CE,$E6,$7C, 0
.BYTE $7C,$CE,$C6,$E6,$7E, $C,$18,$30
.BYTE 0,$38,$38, 0, 0,$38,$38, 0
.BYTE 0, 0,$18,$18, 0,$18,$18,$30
.BYTE 6, $C,$18,$30,$18, $C, 6, 0
.BYTE 0, 0,$7E, 0, 0,$7E, 0, 0
.BYTE $60,$30,$18, $C,$18,$30,$60, 0
.BYTE $3C,$66,$66, $C,$18, 0,$18, 0
.BYTE 0,$3C,$66,$6E,$6E,$60,$3E, 0
.BYTE $78,$9C,$3C,$36,$3E,$66,$66,$C3
.BYTE $EE,$73,$63,$6E,$63,$63,$63,$DE
.BYTE $3C,$66,$CC,$C0,$C0,$C0,$E6,$7C
.BYTE $EE,$73,$63,$63,$63,$63,$63,$DE
.BYTE $FE,$66,$60,$78,$60,$63,$66,$7C
.BYTE $FE,$66,$60,$78,$60,$60,$60,$60
.BYTE $3C,$66,$C6,$C0,$DE,$C6,$66,$3C
.BYTE $C6,$C6,$C6,$CE,$FE,$E6,$C6,$C6
.BYTE $30,$18,$18,$18,$18,$18,$18, $C
.BYTE $1E, $C, $C, $C, $C,$1C,$38,$60
.BYTE $C6,$6C,$6C,$78,$78,$6C,$6C,$C6
.BYTE $E0,$60,$60,$60,$60,$66,$7E,$78
.BYTE $C6,$EE,$FE,$D6,$C6,$C6,$C6,$C6
.BYTE $C6,$C6,$E6,$F6,$DE,$CE,$C6,$C6
.BYTE $7C,$CE,$C6,$C6,$C6,$C6,$E6,$7C
.BYTE $FC,$66,$66,$66,$6C,$60,$60,$C0
.BYTE $7C,$E6,$C6,$C6,$C6,$C6,$CE,$7F
.BYTE $EE,$73,$66,$6C,$66,$66,$63,$C3
.BYTE $3A,$66,$60,$3C, 6, 6,$66,$5C
.BYTE $FE,$30,$60,$C0,$C0,$C2,$C6,$7C
.BYTE $E6,$66,$66,$66,$66,$66,$6E,$3F
.BYTE $C3,$66,$66,$66,$66,$66,$3C,$18
.BYTE $C3,$C3,$C3,$D3,$CB,$DF,$77,$62
.BYTE $C3,$C3,$66,$3C,$3C,$66,$C3,$C3
.BYTE $C3,$66,$66,$3C,$18,$18,$18,$18
.BYTE $7E,$C6, $C,$18,$FE,$60,$C3,$FE
.BYTE $1E,$18,$18,$18,$18,$18,$18,$1E
.BYTE 0,$40,$60,$30,$18, $C, 6, 0
.BYTE $78,$18,$18,$18,$18,$18,$18,$78
.BYTE 0, 8,$1C,$36,$63, 0, 0, 0
.BYTE 0, 0, 0, 0, 0, 0, 0,$FF
.BYTE $7E,$7E,$7E,$7E,$7E,$7E,$7E,$7E
.BYTE 0, 0,$3E,$66,$66,$66,$3B, 0
.BYTE $E0,$60,$60,$7C,$66,$66,$7C, 0
.BYTE 0, 0,$3C,$66,$60,$66,$3C, 0
.BYTE $C, 6, 6,$3E,$66,$66,$3B, 0
.BYTE 0, 0,$3C,$66,$7E,$60,$3E, 0
.BYTE $E,$18,$18,$18,$3E,$18,$18, 0
.BYTE 0, 6,$7C,$CC,$CC,$78,$C2,$7C
.BYTE $C0,$60,$60,$6C,$76,$66,$66, 0
.BYTE $30, 0,$18, $C, $C, $C, $C, 0
.BYTE $C, 0, $C, $C, $C, $C, $C,$38
.BYTE $C0,$60,$66,$6C,$78,$6C,$E6, 0
.BYTE $30,$18,$18,$18,$18,$18, $C, 0
.BYTE 0,$C0,$66,$7E,$7E,$6B,$63, 0
.BYTE 0,$C0,$7C,$66,$66,$66,$63, 0
.BYTE 0, 0,$3C,$6E,$66,$76,$3C, 0
.BYTE 0,$C0,$7C,$66,$66,$7C,$60,$E0
.BYTE 0, 0,$3B,$66,$66,$3E, 6, 7
.BYTE 0,$C0,$7C,$76,$60,$60,$60, 0
.BYTE 0, 0,$3E,$60,$3C, 6,$7C, 0
.BYTE 0,$30,$7E,$30,$30,$30,$36,$1C
.BYTE 0, 0,$E6,$66,$66,$6E,$3B, 0
.BYTE 0, 0,$E6,$66,$66,$3C,$18, 0
.BYTE 0, 0,$E3,$6B,$7F,$3E,$36, 0
.BYTE 0, 3,$66,$3C,$18,$3C,$66,$C0
.BYTE 0, 0,$E6,$66,$66,$3E,$CC,$78
.BYTE 0, 0,$7E, $C,$7E,$31,$7E, 0
.BYTE $18,$18,$18,$FF,$FF,$18,$18,$18
.BYTE $C, $C,$D8,$FC,$3F,$1B,$30,$30
.BYTE $42,$E7,$7E,$3C,$3C,$7E,$E7,$42
.BYTE $30,$30,$1B,$3F,$FC,$D8, $C, $C
.BYTE 8,$18,$30,$7C,$18,$30,$60,$40
; ---------------------------------------------------------------------------
JMP sub_2979 ; $1800
; ---------------------------------------------------------------------------
JMP loc_2F80 ; $1803
; ---------------------------------------------------------------------------
JMP loc_2FF3 ; $1806
; ---------------------------------------------------------------------------
JMP loc_30E3 ; $1809
; ---------------------------------------------------------------------------
JMP loc_3183 ; $180C
; ---------------------------------------------------------------------------
j_sub_1A0D:
JMP sub_1A0D ; $180F
; ---------------------------------------------------------------------------
JMP sub_1C84 ; $1812
; ---------------------------------------------------------------------------
JMP sub_1C88 ; $1815
; ---------------------------------------------------------------------------
JMP loc_1C8C ; $1818
; ---------------------------------------------------------------------------
JMP sub_1C2C ; $181B
; ---------------------------------------------------------------------------
JMP sub_2643 ; $181E
; ---------------------------------------------------------------------------
j_sub_262F:
JMP sub_262F ; $1821
; ---------------------------------------------------------------------------
JMP sub_275B ; $1824
; ---------------------------------------------------------------------------
JMP sub_245D ; $1827
; ---------------------------------------------------------------------------
JMP sub_28A1 ; $182A
; ---------------------------------------------------------------------------
j_READSECTOR:
JMP READSECTOR ; $182D
; ---------------------------------------------------------------------------
JMP loc_24C6 ; $1830
; ---------------------------------------------------------------------------
JMP loc_2494 ; $1833
; ---------------------------------------------------------------------------
JMP sub_3C61 ; $1836
; ---------------------------------------------------------------------------
JMP sub_2A41 ; $1839
; ---------------------------------------------------------------------------
JMP sub_2BB0 ; $183C
; ---------------------------------------------------------------------------
j_UPPER:
JMP UPPER ; $183F
; ---------------------------------------------------------------------------
j_SEGLOAD:
JMP SEGLOAD ; $1842
; ---------------------------------------------------------------------------
JMP loc_3C27 ; $1845
; ---------------------------------------------------------------------------
j_sub_3C2D:
JMP sub_3C2D ; $1848
; ---------------------------------------------------------------------------
JMP sub_3CA5 ; $184B
; ---------------------------------------------------------------------------
JMP sub_3CC2 ; $184E
; ---------------------------------------------------------------------------
j_sub_3C5C:
JMP sub_3C5C ; $1851
; ---------------------------------------------------------------------------
JMP loc_2D8F ; $1854
; ---------------------------------------------------------------------------
JMP loc_2C6F ; $1857
; ---------------------------------------------------------------------------
j_sub_2BFC:
JMP sub_2BFC ; $185A
; ---------------------------------------------------------------------------
j_sub_2C9B:
JMP sub_2C9B ; $185D
; ---------------------------------------------------------------------------
j_SETBIT:
JMP SETBIT ; $1860
; ---------------------------------------------------------------------------
j_TESTBIT:
JMP TESTBIT ; $1863
; ---------------------------------------------------------------------------
j_BLOCKMOVE:
JMP BLOCKMOVE ; $1866
; ---------------------------------------------------------------------------
j_sub_2E31:
JMP sub_2E31 ; $1869
; ---------------------------------------------------------------------------
JMP loc_2E6B ; $186C
; ---------------------------------------------------------------------------
j_SUBSTAT1:
JMP SUBSTAT1 ; $186F
; ---------------------------------------------------------------------------
j_SUBSTAT2:
JMP SUBSTAT2 ; $1872
; ---------------------------------------------------------------------------
JMP loc_2E45 ; $1875
; ---------------------------------------------------------------------------
j_ADDSTAT1:
JMP ADDSTAT1 ; $1878
; ---------------------------------------------------------------------------
j_ADDSTAT2:
JMP ADDSTAT2 ; $187B
; ---------------------------------------------------------------------------
JMP loc_2E9E ; $187E
; ---------------------------------------------------------------------------
JMP sub_2CC2 ; $1881
; ---------------------------------------------------------------------------
j_sub_4B4D:
JMP sub_4B4D ; $1884
; ---------------------------------------------------------------------------
j_LOADINV:
JMP LOADINV ; $1887
; ---------------------------------------------------------------------------
JMP sub_4AC9 ; $188A
; ---------------------------------------------------------------------------
JMP loc_4E06 ; $188D
; ---------------------------------------------------------------------------
JMP sub_49B0 ; $1890
; ---------------------------------------------------------------------------
JMP sub_55B7 ; $1893
; ---------------------------------------------------------------------------
JMP sub_4EC4 ; $1896
; ---------------------------------------------------------------------------
j_RND_A:
JMP sub_2B6B ; $1899
; ---------------------------------------------------------------------------
JMP sub_5471 ; $189C
; ---------------------------------------------------------------------------
JMP loc_375F ; $189F
; ---------------------------------------------------------------------------
JMP sub_2B47 ; $18A2
; ---------------------------------------------------------------------------
j_sub_408B:
JMP sub_408B ; $18A5
; ---------------------------------------------------------------------------
JMP loc_3771 ; $18A8
; ---------------------------------------------------------------------------
JMP loc_5BB8 ; $18AB
; ---------------------------------------------------------------------------
j_sub_2AA0:
JMP sub_2AA0 ; $18AE
; ---------------------------------------------------------------------------
JMP loc_5492 ; $18B1
; ---------------------------------------------------------------------------
JMP loc_2EC6 ; $18B4
; ---------------------------------------------------------------------------
byte_18B7: .BYTE 0 ; DATA XREF: RAM:23AFvw
byte_18B8: .BYTE 0 ; DATA XREF: RAM:1A86vw RAM:1B32vr ...
byte_18B9: .BYTE 0 ; DATA XREF: sub_1A0D+1vw RAM:234Bvr ...
byte_18BA: .BYTE 0 ; DATA XREF: RAM:loc_1ABBvw RAM:1B61vr ...
byte_18BB: .BYTE 0 ; DATA XREF: RAM:1B67vr
byte_18BC: .BYTE 0 ; DATA XREF: RAM:1B6Dvr
byte_18BD: .BYTE 0 ; DATA XREF: RAM:1B79vr
byte_18BE: .BYTE 0 ; DATA XREF: RAM:1BC8vr
byte_18BF: .BYTE 0 ; DATA XREF: RAM:1B73vr
.BYTE 0
byte_18C1: .BYTE 0 ; DATA XREF: sub_1C88+8vr sub_1C88+4Dvw
.BYTE 0
.BYTE 0
byte_18C4: .BYTE 0 ; DATA XREF: sub_1C88+Dvr sub_1C88+56vw
.BYTE 0
.BYTE 0
byte_18C7: .BYTE 0 ; DATA XREF: sub_1C88+16vr sub_1C88+5Bvw
.BYTE 0
.BYTE 0
byte_18CA: .BYTE 0 ; DATA XREF: RAM:loc_1E40vr
; RAM:loc_1E59vr
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
byte_18D4: .BYTE 0 ; DATA XREF: sub_2A41:loc_2A47vw
; sub_2A41+50vr
unk_18D5: .RES 40,$80 ; DATA XREF: sub_2A41+1Evw sub_2A41+55vw ...
.BYTE 0
byte_18FE: .BYTE 0 ; DATA XREF: RAM:1E71vr RAM:5816vw ...
byte_18FF: .BYTE 0 ; DATA XREF: RAM:2659vr RAM:2667vw ...
CONSOL_SAVE: .BYTE 0 ; DATA XREF: sub_267A+10vr
; sub_267A:loc_269Fvw
byte_1901: .BYTE 0 ; DATA XREF: sub_27DE+16vw sub_27DE+7Bvr ...
byte_1902: .BYTE 0 ; DATA XREF: sub_27DE+19vw sub_27DE+83vw ...
word_1903: .WORD 0 ; DATA XREF: sub_28A1+32vw sub_2937+Avr
byte_1905: .BYTE 0 ; DATA XREF: sub_28D7vr
; sub_2937:loc_2969vr
byte_1906: .BYTE 0 ; DATA XREF: sub_28A1+2Fvr
word_1907: .WORD 0 ; DATA XREF: sub_27DE+4Bvr sub_27DE+62vr ...
SEGNO: .BYTE 0 ; DATA XREF: sub_28A1+4vr sub_2CC2+2vr ...
.BYTE 0
SEGADDR: .WORD 0 ; DATA XREF: sub_27DE+1Cvr
; sub_27DE:loc_2845vr ...
byte_190D: .BYTE 0 ; DATA XREF: sub_2799+36vw
byte_190E: .BYTE 0 ; DATA XREF: sub_2799+Cvw sub_28D7+21vr ...
byte_190F: .BYTE 0 ; DATA XREF: sub_275B+Bvw sub_275B+21vw
byte_1910: .BYTE 0 ; DATA XREF: sub_28D7+13vw RAM:29D0vo
byte_1911: .BYTE 0 ; DATA XREF: sub_28D7+10vw RAM:29C4vo
byte_1912: .BYTE 0 ; DATA XREF: sub_2BFA+393vw
; sub_2BFA+5BCvw ...
byte_1913: .BYTE $80 ; DATA XREF: RAM:2EE8vw sub_3C2D+19vr ...
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
byte_191A: .BYTE $80 ; DATA XREF: RAM:3338vw sub_3596+16vw
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
byte_1923: .BYTE $80 ; DATA XREF: RAM:2EEDvw sub_3C2D+1Evr ...
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
byte_192A: .BYTE $80 ; DATA XREF: RAM:333Bvw RAM:3590vw ...
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
.BYTE $80
byte_1933: .BYTE 0 ; DATA XREF: RAM:2EE3vw RAM:2F64vw ...
byte_1934: .BYTE 0 ; DATA XREF: RAM:2F54vw RAM:3C77vr ...
byte_1935: .BYTE 0 ; DATA XREF: RAM:2F15vw RAM:37FEvw ...
byte_1936: .BYTE 0 ; DATA XREF: sub_3CA5+3vw sub_3CC2+Bvr
byte_1937: .BYTE 0 ; DATA XREF: sub_2BFA+9vw RAM:2C5Fvw ...
byte_1938: .BYTE 0 ; DATA XREF: sub_2BFA+396vw RAM:3627vw ...
byte_1939: .BYTE 0 ; DATA XREF: sub_2BFA+39Cvw sub_322C+Bvr ...
off_193A: .WORD $FFFF ; DATA XREF: RAM:36B3vw RAM:36CAvw ...
off_193C: .WORD $FFFF ; DATA XREF: sub_502E+Evw sub_502E+14vw ...
off_193E: .WORD $FFFF ; DATA XREF: RAM:5D6Fvo
off_1940: .WORD $FFFF ; DATA XREF: RAM:5D85vo
off_1942: .WORD $FFFF
off_1944: .WORD $FFFF ; DATA XREF: RAM:36D4vw sub_51B6+24vw ...
byte_1946: .BYTE 0 ; DATA XREF: sub_502E:loc_5032vw
; sub_508C+6vr ...
.BYTE 0
.BYTE 0
.BYTE 0
byte_194A: .BYTE 0 ; DATA XREF: sub_3635+29vw RAM:3694vr ...
.BYTE 0
.BYTE 0
byte_194D: .BYTE 0 ; DATA XREF: RAM:5349vr
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
byte_1953: .BYTE $80 ; DATA XREF: RAM:4245vr
byte_1954: .BYTE 0 ; DATA XREF: RAM:32E7vw
byte_1955: .BYTE 0 ; DATA XREF: RAM:23C1vr RAM:23D3vr
byte_1956: .BYTE 0 ; DATA XREF: sub_2BFA:loc_306Avw
; sub_408B+2Fvw
byte_1957: .BYTE 0 ; DATA XREF: sub_408B:loc_40BFvw
byte_1958: .BYTE 0 ; DATA XREF: sub_2BFA+3FFvr
; sub_2BFA+40Dvw ...
byte_1959: .BYTE 0 ; DATA XREF: sub_2BFA+404vr
; sub_2BFA+5E6vw ...
byte_195A: .BYTE 0 ; DATA XREF: sub_2BFA+5D1vw RAM:3548vr ...
.BYTE 0
.BYTE 0
byte_195D: .BYTE 0 ; DATA XREF: sub_2BFA+447vr
; sub_2BFA+44Evw ...
byte_195E: .BYTE 0 ; DATA XREF: RAM:420Avw RAM:4234vr ...
byte_195F: .BYTE 0 ; DATA XREF: sub_2BFA+39Fvw RAM:346Bvw ...
byte_1960: .BYTE 0 ; DATA XREF: sub_2BFA+3A2vw
; RAM:loc_41FCvr ...
byte_1961: .BYTE 0 ; DATA XREF: sub_51B6+62vw RAM:52C8vw ...
byte_1962: .BYTE 0 ; DATA XREF: RAM:23F3vw sub_408B+Dvr ...
byte_1963: .BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
.BYTE 0
byte_1968: .BYTE 0 ; DATA XREF: sub_2BFA+48Avr
; sub_2BFA+49Bvr
.BYTE 0
byte_196A: .BYTE 0 ; DATA XREF: sub_2BFA+399vw RAM:3621vw
unk_196B: .BYTE 0 ; DATA XREF: RAM:loc_337Avr RAM:3391vw
.BYTE 0
.BYTE 0
.BYTE 0
byte_196F: .BYTE 0 ; DATA XREF: RAM:3389vw RAM:loc_3397vr ...
byte_1970: .BYTE 0 ; DATA XREF: RAM:loc_334Evw
; RAM:loc_341Cvr ...
byte_1971: .BYTE 0 ; DATA XREF: sub_2BFA:loc_300Dvr
; RAM:3364vw ...
byte_1972: .BYTE 0 ; DATA XREF: RAM:41A2vr RAM:43B9vr ...
byte_1973: .BYTE 0 ; DATA XREF: sub_2BFA+610vw RAM:4149vr
byte_1974: .BYTE 0 ; DATA XREF: sub_2BFA+5C6vw sub_322C+8vr ...
byte_1975: .BYTE 0 ; DATA XREF: RAM:30E5vw RAM:3115vw ...
byte_1976: .BYTE 0 ; DATA XREF: RAM:4207vw RAM:422Bvr ...
off_1977: .WORD 0 ; DATA XREF: sub_2BFA:loc_2C26vr
; sub_2BFA+3Avw ...
byte_1979: .BYTE 0 ; DATA XREF: sub_2BFA+41Dvr
; sub_2BFA+424vw ...
byte_197A: .BYTE 0 ; DATA XREF: sub_3635+2vw RAM:367Dvw ...
byte_197B: .BYTE 0 ; DATA XREF: sub_2BFA:loc_3032vr
; sub_5857+2vw
byte_197C: .BYTE $80 ; ; DATA XREF: sub_2CFB:loc_2D03vw
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
unk_1987: .BYTE $80 ; ; DATA XREF: sub_2CFB:loc_2D18vw
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
.BYTE $80 ;
byte_199C: .BYTE 0 ; DATA XREF: sub_245D+1Cvw sub_2503vr ...
byte_199D:
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $30 ; 0
.BYTE $42 ; B
.WORD $400
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE 2
.BYTE $41 ; A
.WORD byte_199D
byte_19BE:
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $30 ; 0
.BYTE $42
.WORD $400
.BYTE $80 ;
.BYTE 2
.BYTE $80 ;
.BYTE 2
.BYTE $80 ;
.BYTE 2
.BYTE $80 ;
.BYTE 2
.BYTE 2
.BYTE $80 ;
.BYTE $44 ; D
.WORD $4F0
.BYTE 4
.BYTE $84 ;
.BYTE $84 ;
.BYTE 4
.BYTE $84 ;
.BYTE 4
.BYTE 4
.BYTE $84 ;
.BYTE 0
.BYTE 0
.BYTE $42 ; B
.WORD $658
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE 0
.BYTE 2
.BYTE $41 ; A
.WORD byte_19BE
unk_19EF: .BYTE >byte_199D ; DATA XREF: sub_1A0D+14vr
.BYTE >byte_19BE
.BYTE >byte_19BE
unk_19F2: .BYTE <byte_199D ; DATA XREF: sub_1A0D+1Avr
.BYTE <byte_19BE
.BYTE <byte_19BE
byte_19F5:
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $70 ; p
.BYTE $42
.WORD byte_197C
.BYTE $41
.WORD byte_19F5
byte_1A0A:
.BYTE $41
.WORD byte_1A0A
; --------------- S U B R O U T I N E ---------------------------------------
sub_1A0D: ; CODE XREF: RAM:180F^j RAM:2ED5vp ...
TAX
STA byte_18B9
LDA #0
LDY #3
STY $253
loc_1A18: ; CODE XREF: sub_1A0D+Fvj
STA $D000,Y
DEY
BPL loc_1A18
JSR sub_2454
LDA unk_19EF,X
STA off_254+1
LDA unk_19F2,X
STA off_254
LDY unk_1C21,X
LDA #0
loc_1A32: ; CODE XREF: sub_1A0D+29vj
STA $4C8,Y
DEY
BPL loc_1A32
LDA unk_1A41,X
PHA
LDA unk_1A44,X
PHA
RTS
; End of function sub_1A0D
; ---------------------------------------------------------------------------
unk_1A41: .BYTE >(loc_1A47-1) ; DATA XREF: sub_1A0D+2B^r
.BYTE >(loc_1A65-1)
.BYTE >(loc_1B19-1)
unk_1A44: .BYTE <(loc_1A47-1) ; DATA XREF: sub_1A0D+2F^r
.BYTE <(loc_1A65-1)
.BYTE <(loc_1B19-1)
; ---------------------------------------------------------------------------
loc_1A47:
LDA #<loc_1B55
STA off_200
STA off_248
LDA #>loc_1B55
STA off_200+1
STA off_248+1
LDX #7
LDA #0
loc_1A5B: ; CODE XREF: RAM:1A5Fvj
STA $D000,X
DEX
BPL loc_1A5B
STA $253
RTS
; ---------------------------------------------------------------------------
loc_1A65:
LDA #<loc_1B2F
STA off_200
STA off_248
LDA #>loc_1B2F
STA off_200+1
STA off_248+1
dldi off_24A, loc_1B56
LDA #$C0
STA NMIEN
LDA #0
STA byte_18B8
ldi PRIOR, $34
LDX #3
STX $D008
STX $D009
loc_1A96: ; CODE XREF: RAM:1AABvj
LDA unk_1C24,X
STA $D004,X
LDA unk_1C28,X
STA $D000,X
LDA #0
STA $D00D,X
STA COLPM0,X
DEX
BPL loc_1A96
STA GRACTL
STA COLPF3
STX $D011
STX SIZEM
LDX #5
loc_1ABB: ; CODE XREF: RAM:1ABFvj
STA byte_18BA,X
DEX
BPL loc_1ABB
JSR sub_1C09
dldi off_7, $4F0
dldi off_9, $50D
LDX #9
loc_1AD6: ; CODE XREF: RAM:1AFEvj
LDY #$A
loc_1AD8: ; CODE XREF: RAM:1AE5vj
LDA (off_7),Y
ORA #$80
STA (off_7),Y
LDA (off_9),Y
ORA #$80
STA (off_9),Y
DEY
BPL loc_1AD8
LDA off_7
CLC
ADC #40
STA off_7
BCC loc_1AF2
INC off_7+1
loc_1AF2: ; CODE XREF: RAM:1AEE^j
LDA off_9
CLC
ADC #40
STA off_9
BCC loc_1AFD
INC off_9+1
loc_1AFD: ; CODE XREF: RAM:1AF9^j
DEX
BNE loc_1AD6
dldi off_9, $800
LDX #$C
LDY #0
LDA #$FF
loc_1B0E: ; CODE XREF: RAM:1B11vj RAM:1B16vj
STA (off_9),Y
INY
BNE loc_1B0E
INC off_9+1
DEX
BNE loc_1B0E
RTS
; ---------------------------------------------------------------------------
loc_1B19:
JSR sub_1C09
LDA #<loc_1B2F
STA off_200
STA off_248
LDA #>loc_1B2F
STA off_200+1
STA off_248+1
JMP $760A
; ---------------------------------------------------------------------------
loc_1B2F:
PHA
TXA
PHA
LDX byte_18B8
LDA unk_1C19,X
STA WSYNC
STA COLPF2
INX
STX byte_18B8
CPX #4
BCC loc_1B52
LDA off_24A
STA off_200
LDA off_24A+1
STA off_200+1
loc_1B52: ; CODE XREF: RAM:1B44^j
PLA
TAX
PLA
loc_1B55:
RTI
; ---------------------------------------------------------------------------
loc_1B56:
PHA
dldi off_200, loc_1BA2
mv COLPF0, byte_18BA
mv COLPF1, byte_18BB
mv COLPF2, byte_18BC
mv COLPF3, byte_18BF
LDA byte_18BD
STA WSYNC
STA COLBK
ldi CHBASE, $08
LDA $7600
CMP #1
BEQ loc_1BA0
ldi COLPM0, $90
ldi COLPM1, $34
LDA #$FF
STA $D00D
STA $D00E
loc_1BA0: ; CODE XREF: RAM:1B8C^j
PLA
RTI
; ---------------------------------------------------------------------------
loc_1BA2:
PHA
dldi off_200, loc_1BB7
LDA #$C
STA WSYNC
STA CHBASE
PLA
RTI
; ---------------------------------------------------------------------------
loc_1BB7:
PHA
STA WSYNC
dldi off_200, sub_1BD6
STA WSYNC
LDA byte_18BE
STA WSYNC
STA WSYNC
STA COLBK
PLA
RTI
; ---------------------------------------------------------------------------
sub_1BD6:
PHA
dldi off_200, sub_1BEB
LDA #$10
STA WSYNC
STA CHBASE
PLA
RTI
; ---------------------------------------------------------------------------
sub_1BEB:
PHA
LDA #0
STA WSYNC
STA COLPF2
STA COLBK
STA COLPM0
STA $D013
ldi COLPF1, $0E
ldi CHBASE, $14
PLA
RTI
; --------------- S U B R O U T I N E ---------------------------------------
sub_1C09: ; CODE XREF: RAM:1AC1^p RAM:1B19^p
LDX #$77 ; 'w'
loc_1C0B: ; CODE XREF: sub_1C09+Dvj
TXA
STA $4F0,X
STA $568,X
STA $5E0,X
DEX
BPL loc_1C0B
RTS
; End of function sub_1C09
; ---------------------------------------------------------------------------
unk_1C19: .BYTE $46 ; F ; DATA XREF: RAM:1B35^r
.BYTE $68 ; h
.BYTE $88 ;
byte_1C1C: .BYTE $B6 ; ¶ ; DATA XREF: RAM:loc_23A3vr
.BYTE $76 ; v
.BYTE $9E ;
.BYTE $34 ; 4
.BYTE 0
unk_1C21: .BYTE 0 ; DATA XREF: sub_1A0D+20^r
.BYTE $27 ; '
.BYTE $13
unk_1C24: .BYTE $20 ; DATA XREF: RAM:loc_1A96^r
.BYTE $28 ; (
.BYTE $D0 ; Ð
.BYTE $D8 ; Ø
unk_1C28: .BYTE $38 ; 8 ; DATA XREF: RAM:1A9C^r
.BYTE $AC ; ¬
.BYTE 0
.BYTE 0
; --------------- S U B R O U T I N E ---------------------------------------
sub_1C2C: ; CODE XREF: RAM:181B^j RAM:loc_1F4Bvj ...
STX $1B
STY $1C
STA $1A
LDY $1F
LDX $20
CMP #$D
BEQ loc_1C63
CMP #8
BEQ loc_1C77
LDA #0
STA $1E
TXA
ASL A
ASL A
ASL A
STA $1D
ASL A
ROL $1E
ASL A
ROL $1E
ADC $1D
STA $1D
LDA $1E
ADC #4
STA $1E
LDA $1A
ORA BLINKFLAG
STA (off_1D),Y
INY
CPY #$28
BCC loc_1C6C
loc_1C63: ; CODE XREF: sub_1C2C+C^j
LDY #0
INX
CPX #$19
BCC loc_1C6C
LDX #$18
loc_1C6C: ; CODE XREF: sub_1C2C+35^j sub_1C2C+3C^j ...
STY $1F
STX $20
LDY $1C
LDX $1B
LDA $1A
RTS
; ---------------------------------------------------------------------------
loc_1C77: ; CODE XREF: sub_1C2C+10^j
DEY
BPL loc_1C6C
LDY #$27 ; '''
DEX
BPL loc_1C6C
LDX #0
BEQ loc_1C6C
RTS
; End of function sub_1C2C
; --------------- S U B R O U T I N E ---------------------------------------
sub_1C84: ; CODE XREF: RAM:1812^j RAM:2F44vp ...
LDX #0
BEQ loc_1C8E
; End of function sub_1C84
; --------------- S U B R O U T I N E ---------------------------------------