forked from historicalsource/smashtv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DEMO.ASM
1797 lines (1638 loc) · 45.8 KB
/
DEMO.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
.FILE "DEMO.ASM"
.TITLE "ROBO-RAMA GAME PROGRAM-DEMO MODE STUFF"
.WIDTH 132
.OPTION B,D,L,T
.MNOLIST
;
; INITIATED: APRIL 13,1989
; MODIFIED: !
; SOFTWARE: MARK TURMELL
;
; COPYRIGHT (C) 1989 WILLIAMS ELECTRONICS GAMES, INC.
;
;
; GET THE SYSTEM STUFF
.INCLUDE "MPROC.EQU" ;MPROC EQUATES
.INCLUDE "DISP.EQU" ;DISPLAY PROC. EQUATES
.include "sys.inc" ;z unit system equates
.include "macros.hdr" ;macros definitions
.INCLUDE "IMGTBL.GLO"
.INCLUDE "ROBO.EQU"
.INCLUDE "BGNDTBL.GLO" ;BACKGROUND EQUATES
;
;SOUNDS
;
.REF TUNE1,FADE_UP,CROWD1,GOGO,TUNE1B,TUNE4
;
;SYMBOLS EXTERNALLY DEFINED
;
.REF SCRCLR,WNDWON,WNDWOFF,BTOF,FINDPAL,PALSET
.REF GAL1P,GAL2P,MCPTR,FRANIM,SMASHON
.REF INIT_SCORE,RD15FONT,STRCNRM,WAVE
.REF P1CTRL,P2CTRL,GAMSTATE,BAKMODS,ADJSTWTL,STFOBJ,GPALOBJ,INSOBJ
.REF BGND_UD1,KILALL,JOYSW
.REF HALT,BAKMODS,DEMOPLAY,CIRCUIT
.REF AUTOEON,GAMERASE
.REF BLAKOUT,FADEIN,FADEOUT
.REF AUTOPAL
;
;SYMBOLS DEFINED IN THIS FILE
;
; .DEF FBI_LIT
.DEF SPR_LIT,SPR_LIT1,GOS,GAMEMODS
.DEF INIT_DEMO,JOY_UPDATE,PUTBGND,DEMOBGND,DUMB,AP_LIT,LAZ_LIT
.DEF CMP_LIT,MIN_LIT,RNG_LIT,RNG_LIT2,RED1,RED2,FLR_LIT,STUD_LIT
.DEF PZON,PRZ_LIT,ORB_LIT,FLR2_LIT,P2_LIT,P1_LIT,ARW_LIT
.DEF HOSPG_LIT,STATIC_LIT,HOSPR_LIT,COLTAB
;
;UNINITIALIZED RAM DEFINITIONS
;
.BSS TMP,8
.BSS PZON,8
.BSS DUMB,8
.BSS PFRAM,96
;
;EQUATES FOR THIS FILE
;
BLSTEND .EQU 08001H
BLSTSTRT .EQU 08000H
.TEXT
DOIMG
CALLA GPALOBJ ;ALLOCATE A COLOR PALETTE
CALLA STFOBJ ;STUFF OBJECT DATA
MOVE A13,*A0(OPLINK),L
CALLA INSOBJ ;INSERT OBJECT INTO LIST
MOVE A0,A8
MOVE A11,*A8(OYPOS),W
MOVE A10,*A8(OXPOS),W
CALLA ADJSTWTL
RETS
STAR_COLOR
SLEEP 3 ;GET PAL OUT THERE!
;BLACKEN LIGHTS TO START!
MOVI LGHTFX,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDK 13,A8 ; A8 = [PAL #,1]
MOVI BLKC,A9
MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 027H
;START CROWD
;START MUSIC FOR GAMESHOW SET
MOVK 2,A11 ;FADE RATE
CREATE 0,FADE_UP
MOVE @CIRCUIT,A0
JRZ NOGO
CMPI 1,A0
JRNZ J8
MOVI TUNE1B,A0
CALLA ONESND
JRUC J88
J8 MOVI TUNE4,A0 ;CIRCUIT 3 MUSIC
CALLA ONESND
J88 CREATE 0,GOS
JRUC YGO
NOGO
MOVI TUNE1,A0
CALLA ONESND
CREATE 0,CHEER
YGO SLEEP 30
;NABBED FROM BOON FOOTBALL
MOVI LGHTFX,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDK 13,A8 ; A8 = [PAL #,1]
MOVI STARCTBL,A9
STC2 MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 009H
ADDK 010H,A9
CMPI STARCEND,A9 ; END OF TABLE ?
JRNE STC2
DIE
GOS SLEEP 6AH
MOVK 11,A9
GOS1 MOVI GOGO,A0
CALLA ONESND
SLEEP 30
DSJS A9,GOS1
DIE
CHEER SLEEP 10
MOVI CROWD1,A0
CALLA ONESND
SLEEP 25
MOVI CROWD1,A0
CALLA ONESND
SLEEP 10
MOVI CROWD1,A0
CALLA ONESND
SLEEP 45
MOVI CROWD1,A0
CALLA ONESND
SLEEP 10
MOVI CROWD1,A0
CALLA ONESND
SLEEP 10
MOVI CROWD1,A0
CALLA ONESND
SLEEP 10
MOVI CROWD1,A0
CALLA ONESND
SLEEP 45
MOVI CROWD1,A0
CALLA ONESND
SLEEP 25
MOVI CROWD1,A0
CALLA ONESND
SLEEP 45
MOVI CROWD1,A0
CALLA ONESND
DIE
STATIC
.word ( 14 *32*32)+( 14 *32)+( 14 ) ; color 48
.word ( 6 *32*32)+( 6 *32)+( 6 ) ; color 49
.word ( 10 *32*32)+( 9 *32)+( 14 ) ; color 50
.word ( 19 *32*32)+( 19 *32)+( 27 ) ; color 51
.word ( 27 *32*32)+( 23 *32)+( 23 ) ; color 52
.word ( 25 *32*32)+( 25 *32)+( 25 ) ; color 53
STATICD
.word ( 14 *32*32)+( 14 *32)+( 14 ) ; color 48
.word ( 6 *32*32)+( 6 *32)+( 6 ) ; color 49
.word ( 10 *32*32)+( 9 *32)+( 14 ) ; color 50
.word ( 19 *32*32)+( 19 *32)+( 27 ) ; color 51
.word ( 27 *32*32)+( 23 *32)+( 23 ) ; color 52
.word ( 25 *32*32)+( 25 *32)+( 25 ) ; color 53
;BRAIN
; .word ( 8 *32*32)+( 8 *32)+( 12 ) ; color 7
; .word ( 9 *32*32)+( 0 *32)+( 12 ) ; color 8
; .word ( 7 *32*32)+( 0 *32)+( 9 ) ; color 9
; .word ( 5 *32*32)+( 0 *32)+( 7 ) ; color 10
; .word ( 1 *32*32)+( 0 *32)+( 5 ) ; color 11
;BRAIND
; .word ( 8 *32*32)+( 8 *32)+( 12 ) ; color 7
; .word ( 9 *32*32)+( 0 *32)+( 12 ) ; color 8
; .word ( 7 *32*32)+( 0 *32)+( 9 ) ; color 9
; .word ( 5 *32*32)+( 0 *32)+( 7 ) ; color 10
; .word ( 1 *32*32)+( 0 *32)+( 5 ) ; color 11
HOSPR
.word ( 0 *32*32)+( 29 *32)+( 0 ) ; color 58
.word ( 0 *32*32)+( 16 *32)+( 0 ) ; color 57
.word ( 0 *32*32)+( 11 *32)+( 0 ) ; color 56
.word ( 0 *32*32)+( 7 *32)+( 0 ) ; color 55
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 54
HOSPRD
.word ( 0 *32*32)+( 29 *32)+( 0 ) ; color 58
.word ( 0 *32*32)+( 16 *32)+( 0 ) ; color 57
.word ( 0 *32*32)+( 11 *32)+( 0 ) ; color 56
.word ( 0 *32*32)+( 7 *32)+( 0 ) ; color 55
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 54
HOSPG
.word ( 31 *32*32)+( 4 *32)+( 0 ) ; color 63
.word ( 19 *32*32)+( 2 *32)+( 0 ) ; color 62
.word ( 12 *32*32)+( 0 *32)+( 0 ) ; color 61
.word ( 7 *32*32)+( 0 *32)+( 0 ) ; color 60
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 59
HOSPGD
.word ( 31 *32*32)+( 4 *32)+( 0 ) ; color 63
.word ( 19 *32*32)+( 2 *32)+( 0 ) ; color 62
.word ( 12 *32*32)+( 0 *32)+( 0 ) ; color 61
.word ( 7 *32*32)+( 0 *32)+( 0 ) ; color 60
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 59
;YELLOWT
; .word 07FE6H,06640H,03CE0H,07FE6H,06640H ; Cycling Yellow Colors
BLKC .WORD 0
;FLOOR LIGHTS
STARCTBL
.word ( 25 *32*32)+( 14 *32)+( 7 ) ; color 60
.word ( 29 *32*32)+( 21 *32)+( 8 ) ; color 59
.word ( 31 *32*32)+( 27 *32)+( 10 ) ; color 58
STARCEND
FLITE
.word ( 29 *32*32)+( 21 *32)+( 8 ) ; color 59
.word ( 25 *32*32)+( 14 *32)+( 7 ) ; color 60
.word ( 31 *32*32)+( 27 *32)+( 10 ) ; color 58
FD
.word ( 29 *32*32)+( 21 *32)+( 8 ) ; color 59
.word ( 25 *32*32)+( 14 *32)+( 7 ) ; color 60
.word ( 31 *32*32)+( 27 *32)+( 10 ) ; color 58
;COMPUTER LIGHTS
CLITE
.word ( 31 *32*32)+( 5 *32)+( 4 ) ; color 61
.word ( 4 *32*32)+( 14 *32)+( 30 ) ; color 62
.word ( 6 *32*32)+( 25 *32)+( 7 ) ; color 63
CLITED
.word ( 31 *32*32)+( 5 *32)+( 4 ) ; color 61
.word ( 4 *32*32)+( 14 *32)+( 30 ) ; color 62
.word ( 6 *32*32)+( 25 *32)+( 7 ) ; color 63
RRED
.word ( 29 *32*32)+( 0 *32)+( 0 ) ; color 63
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 62
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 62
MLIT
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 62
.word ( 29 *32*32)+( 0 *32)+( 0 ) ; color 63
MLITD
.word ( 0 *32*32)+( 0 *32)+( 0 ) ; color 62
.word ( 29 *32*32)+( 0 *32)+( 0 ) ; color 63
RLIT
.word ( 17 *32*32)+( 30 *32)+( 4 ) ; color 27
.word ( 7 *32*32)+( 18 *32)+( 6 ) ; color 28
.word ( 0 *32*32)+( 13 *32)+( 0 ) ; color 29
RLITD
.word ( 17 *32*32)+( 30 *32)+( 4 ) ; color 27
.word ( 7 *32*32)+( 18 *32)+( 6 ) ; color 28
.word ( 0 *32*32)+( 13 *32)+( 0 ) ; color 29
OLITE:
.word ( 0 *32*32)+( 0 *32)+( 31 ) ; color 1
.word ( 0 *32*32)+( 1 *32)+( 21 ) ; color 2
.word ( 0 *32*32)+( 0 *32)+( 10 ) ; color 3
.word ( 31 *32*32)+( 31 *32)+( 31 ) ; color 4
.word ( 0 *32*32)+( 17 *32)+( 0 ) ; color 5
.word ( 0 *32*32)+( 7 *32)+( 0 ) ; color 6
.word ( 31 *32*32)+( 31 *32)+( 31 ) ; color 7
OD:
.word ( 0 *32*32)+( 0 *32)+( 31 ) ; color 1
.word ( 0 *32*32)+( 1 *32)+( 21 ) ; color 2
.word ( 0 *32*32)+( 0 *32)+( 10 ) ; color 3
.word ( 31 *32*32)+( 31 *32)+( 31 ) ; color 4
.word ( 0 *32*32)+( 17 *32)+( 0 ) ; color 5
.word ( 0 *32*32)+( 7 *32)+( 0 ) ; color 6
.word ( 31 *32*32)+( 0 *32)+( 0 ) ; color 7
APLIT ;APPLAUSE LIGHT
.word ( 31 *32*32)+( 0 *32)+( 0 ) ; color 62
.word ( 21 *32*32)+( 0 *32)+( 0 ) ; color 63
APD
.word ( 31 *32*32)+( 0 *32)+( 0 ) ; color 62
.word ( 21 *32*32)+( 0 *32)+( 0 ) ; color 63
P1LIT
.word ( 11 *32*32)+( 0 *32)+( 11 ) ; color 1
.word ( 17 *32*32)+( 0 *32)+( 17 ) ; color 2
.word ( 21 *32*32)+( 5 *32)+( 23 ) ; color 3
.word ( 31 *32*32)+( 8 *32)+( 26 ) ; color 4
P1D:
.word ( 11 *32*32)+( 0 *32)+( 11 ) ; color 1
.word ( 17 *32*32)+( 0 *32)+( 17 ) ; color 2
.word ( 21 *32*32)+( 5 *32)+( 23 ) ; color 3
.word ( 31 *32*32)+( 8 *32)+( 26 ) ; color 4
P2LIT
.word ( 3 *32*32)+( 9 *32)+( 4 ) ; color 1
.word ( 0 *32*32)+( 18 *32)+( 5 ) ; color 2
.word ( 0 *32*32)+( 26 *32)+( 11 ) ; color 3
.word ( 1 *32*32)+( 31 *32)+( 21 ) ; color 4
P2D:
.word ( 3 *32*32)+( 9 *32)+( 4 ) ; color 1
.word ( 0 *32*32)+( 18 *32)+( 5 ) ; color 2
.word ( 0 *32*32)+( 26 *32)+( 11 ) ; color 3
.word ( 1 *32*32)+( 31 *32)+( 21 ) ; color 4
ARW_P
.word ( 27 *32*32)+( 0 *32)+( 0 ) ; color 39
.word ( 31 *32*32)+( 14 *32)+( 0 ) ; color 40
.word ( 31 *32*32)+( 23 *32)+( 10 ) ; color 41
.word ( 31 *32*32)+( 28 *32)+( 25 ) ; color 42
ARD
.word ( 27 *32*32)+( 0 *32)+( 0 ) ; color 39
.word ( 31 *32*32)+( 14 *32)+( 0 ) ; color 40
.word ( 31 *32*32)+( 23 *32)+( 10 ) ; color 41
.word ( 31 *32*32)+( 28 *32)+( 25 ) ; color 42
;TITCLR
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 41
; .word ( 20 *32*32)+( 16 *32)+( 0 ) ; color 42
; .word ( 23 *32*32)+( 18 *32)+( 0 ) ; color 43
; .word ( 26 *32*32)+( 20 *32)+( 0 ) ; color 44
; .word ( 28 *32*32)+( 23 *32)+( 0 ) ; color 45
; .word ( 31 *32*32)+( 28 *32)+( 0 ) ; color 46
; .word ( 31 *32*32)+( 31 *32)+( 11 ) ; color 47
; .word ( 31 *32*32)+( 31 *32)+( 14 ) ; color 48
; .word ( 31 *32*32)+( 31 *32)+( 26 ) ; color 49
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 50
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 51
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 52
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 53
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 54
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 55
;TITD
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 41
; .word ( 20 *32*32)+( 16 *32)+( 0 ) ; color 42
; .word ( 23 *32*32)+( 18 *32)+( 0 ) ; color 43
; .word ( 26 *32*32)+( 20 *32)+( 0 ) ; color 44
; .word ( 28 *32*32)+( 23 *32)+( 0 ) ; color 45
; .word ( 31 *32*32)+( 28 *32)+( 0 ) ; color 46
; .word ( 31 *32*32)+( 31 *32)+( 11 ) ; color 47
; .word ( 31 *32*32)+( 31 *32)+( 14 ) ; color 48
; .word ( 31 *32*32)+( 31 *32)+( 26 ) ; color 49
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 50
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 51
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 52
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 53
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 54
; .word ( 18 *32*32)+( 12 *32)+( 0 ) ; color 55
COLTAB .WORD 0380H,1380H,2380H,3380H,4380H,5380H,6380H,7380H,7300H
.WORD 7280H,7200H,7180H,7080H,7008H,7008H,7010H,7010H,701CH
.WORD 701CH,601CH,501CH,409CH,309CH,209CH,219CH,029CH,039CH
.WORD 139CH,239CH,339CH,539CH,739CH,7390H,7380H,6380H,4380H
COLEND .WORD 0F000H,1380H,2380H,3380H,4380H,5380H,6380H,7380H,7300H
.WORD 7280H,7200H,7180H,7080H,7008H,7008H,7010H,7010H,701CH
.WORD 701CH,601CH,501CH,409CH,309CH,209CH,219CH,029CH,039CH
.WORD 139CH,239CH,339CH,539CH,739CH,7390H,7380H,6380H,4380H
SPR_LIT1 SLEEP 3 ;SPEAR CYCLE
SPR_LIT ;SPEAR CYCLE
; MOVI FBIP,a0
MOVE A9,A0
;A0=SNKGP, OR SPL
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SPR_LIT1
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 36,A8 ; A8 = [PAL #,1]
MOVI COLTAB,A9
XZT MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 06H
ADDK 010H,A9
CMPI COLEND,A9 ; END OF TABLE ?
JRNE XZT
MOVI COLTAB,A9 ; YES --> BEGINNING OF TABLE
JRUC XZT
;FBI_LIT
; MOVI FBIP,a0
; CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
; JAEQ SUCIDE
;
; SRL 8,A0
; SLL 8,A0
; MOVE A0,A8 ; A8 = [PAL #,0]
; ADDI 1,A8 ; A8 = [PAL #,1]
; MOVI TITCLR,A9
; MOVI ARW_P,A9
;
;ZT MOVE A8,A1
; MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
; MOVI 1,A2 ; A2 = COLOR COUNT
; CALLA PALSET ; DO THE TRANSFER
; SLEEP 04H
; ADDK 010H,A9
; CMPI TITD,A9 ; END OF TABLE ?
; CMPI ARD,A9 ; END OF TABLE ?
; JRNE ZT
; MOVI ARW_P,A9
; MOVI TITCLR,A9 ; YES --> BEGINNING OF TABLE
; JRUC ZT
;BRAIN
;STATIC ONLY ON CORRECT ARENAS!
;BRN_LIT
; MOVE A10,A0
; CALLA PRCSLP
; MOVE A9,A0
; MOVI YBG,A0
; CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
; JAEQ SUCIDE
;
; SRL 8,A0
; SLL 8,A0
; MOVE A0,A8 ; A8 = [PAL #,0]
; ADDI 7,A8 ; A8 = [PAL #,1]
; MOVI BRAIN,A9
;
;CZZ MOVE A8,A1
; MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
; MOVI 5,A2 ; A2 = COLOR COUNT
; CALLA PALSET ; DO THE TRANSFER
; SLEEP 004H
; ADDK 010H,A9
; CMPI BRAIND,A9 ; END OF TABLE ?
; JRNE CZZ
; MOVI BRAIN,A9 ; YES --> BEGINNING OF TABLE
; JRUC CZZ
;STATIC
;STATIC ONLY ON CORRECT ARENAS!
STATIC_LIT
;A9=RBTP5 OR RBTP
MOVE A9,A0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 49,A8 ; A8 = [PAL #,1]
MOVI STATIC,A9
STCZZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 5,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 002H
ADDK 010H,A9
CMPI STATICD,A9 ; END OF TABLE ?
JRNE STCZZ
MOVI STATIC,A9 ; YES --> BEGINNING OF TABLE
JRUC STCZZ
;HOSPITAL MONITOR GREEN
;STATIC ONLY ON CORRECT ARENAS!
HOSPG_LIT
MOVE A9,A0
;A0=RBTP5 OR RBTP ETC
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 54,A8 ; A8 = [PAL #,1]
MOVI HOSPR,A9
STCZZZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 5,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 008H
ADDK 010H,A9
CMPI HOSPRD,A9 ; END OF TABLE ?
JRNE STCZZZ
MOVI HOSPR,A9 ; YES --> BEGINNING OF TABLE
JRUC STCZZZ
;HOSPITAL MONITOR RED
;STATIC ONLY ON CORRECT ARENAS!
HOSPR_LIT
MOVE A9,A0
;A0=RBTP5 OR RBTP ETC
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 59,A8 ; A8 = [PAL #,1]
MOVI HOSPG,A9
STCZZZZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 5,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 005H
ADDK 010H,A9
CMPI HOSPGD,A9 ; END OF TABLE ?
JRNE STCZZZZ
MOVI HOSPG,A9 ; YES --> BEGINNING OF TABLE
JRUC STCZZZZ
PRZ_LIT
;PRIZE LIGHTS AROUND TV SCREEN
MOVI PRZ,A0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
MOVI 350,A1
MOVB A1,@PZON
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 61,A8 ; A8 = [PAL #,1]
MOVI FLITE,A9
MOVI 50,A10
OTCZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 005H
ADDK 010H,A9
CMPI FD,A9 ; END OF TABLE ?
JRNE OTCZ
MOVI FLITE,A9 ; YES --> BEGINNING OF TABLE
MOVB @PZON,A0
DEC A0
JRNZ OTCZ
MOVB A0,@PZON
DIE
;FLOOR LIGHTS
FLR_LIT
MOVI SETCOL,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 58,A8 ; A8 = [PAL #,1]
MOVI FLITE,A9
STCZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 007H
ADDK 010H,A9
CMPI FD,A9 ; END OF TABLE ?
JRNE STCZ
MOVI FLITE,A9 ; YES --> BEGINNING OF TABLE
JRUC STCZ
;LAZER IN HZ WALKWAY
LAZ_LIT
MOVI SETCOL,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 58,A8 ; A8 = [PAL #,1]
MOVI FLITE,A9
LTCZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 2,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 002H
ADDK 010H,A9
CMPI FD,A9 ; END OF TABLE ?
JRNE LTCZ
MOVI FLITE,A9 ; YES --> BEGINNING OF TABLE
JRUC LTCZ
FLR2_LIT
;FLOOR LIGHTS
MOVI BONUSP,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 61,A8 ; A8 = [PAL #,1]
MOVI FLITE,A9
CZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 007H
ADDK 010H,A9
CMPI FD,A9 ; END OF TABLE ?
JRNE CZ
MOVI FLITE,A9 ; YES --> BEGINNING OF TABLE
JRUC CZ
P1_LIT
;P1 BONUS
SLEEP 5
MOVI BGPLYR1P,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 60,A8 ; A8 = [PAL #,1]
MOVI P1LIT,A9
XCZZ MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 4,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 008H
ADDK 010H,A9
CMPI P1D,A9 ; END OF TABLE ?
JRNE XCZZ
MOVI P1LIT,A9 ; YES --> BEGINNING OF TABLE
JRUC XCZZ
P2_LIT
;P2 BONUS
SLEEP 5
MOVI BGPLYR2P,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 60,A8 ; A8 = [PAL #,1]
MOVI P2LIT,A9
CZX MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 4,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 008H
ADDK 010H,A9
CMPI P2D,A9 ; END OF TABLE ?
JRNE CZX
MOVI P2LIT,A9 ; YES --> BEGINNING OF TABLE
JRUC CZX
;ORB COLOR CYCLE
ORB_LIT:
MOVI NUORB,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 22,A8 ; A8 = [PAL #,1]
MOVI OLITE,A9
STCO MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 002H
ADDK 010H,A9
CMPI OD,A9 ; END OF TABLE ?
JRNE STCO
MOVI OLITE,A9 ; YES --> BEGINNING OF TABLE
JRUC STCO
;ORB COLOR CYCLE
ARW_LIT:
MOVI nup1,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 39,A8 ; A8 = [PAL #,1]
MOVI ARW_P,A9
ATCO MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 008H
ADDK 010H,A9
CMPI ARD,A9 ; END OF TABLE ?
JRNE ATCO
MOVI ARW_P,A9 ; YES --> BEGINNING OF TABLE
JRUC ATCO
;APPLAUSE SIGN
AP_LIT:
MOVI MNTR,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 62,A8 ; A8 = [PAL #,1]
MOVI APLIT,A9
ASTCO MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 0012H
ADDK 010H,A9
CMPI APD,A9 ; END OF TABLE ?
JRNE ASTCO
MOVI APLIT,A9 ; YES --> BEGINNING OF TABLE
JRUC ASTCO
;X SIGN
STUD_LIT:
MOVI MAPP,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 63,A8 ; A8 = [PAL #,1]
MOVI ARW_P,A9
XO MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 007H
ADDK 010H,A9
CMPI ARD,A9 ; END OF TABLE ?
JRNE XO
MOVI ARW_P,A9 ; YES --> BEGINNING OF TABLE
JRUC XO
CMP_LIT
MOVI SETCOL,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 61,A8 ; A8 = [PAL #,1]
MOVI CLITE,A9
STCX MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 009H
ADDK 010H,A9
CMPI CLITED,A9 ; END OF TABLE ?
JRNE STCX
MOVI CLITE,A9 ; YES --> BEGINNING OF TABLE
JRUC STCX
MIN_LIT
MOVI BULLET,a0
CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 60,A8 ; A8 = [PAL #,1]
MOVI MLIT,A9
STCA MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 1,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 10
ADDK 010H,A9
CMPI MLITD,A9 ; END OF TABLE ?
JRNE STCA
MOVI MLIT,A9 ; YES --> BEGINNING OF TABLE
JRUC STCA
RNG_LIT2
MOVI nup2,a0
JRUC RT
RNG_LIT
MOVI nup1,a0
RT CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 27,A8 ; A8 = [PAL #,1]
MOVI RLIT,A9
STCR MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
SLEEP 7
ADDK 010H,A9
CMPI RLITD,A9 ; END OF TABLE ?
JRNE STCR
MOVI RLIT,A9 ; YES --> BEGINNING OF TABLE
JRUC STCR
RED2
MOVI nup2,a0
JRUC RTQ
RED1
MOVI nup1,a0
RTQ CALLA FINDPAL ; FIND PALLETE WE WANNA MESS WITH
JAEQ SUCIDE
SRL 8,A0
SLL 8,A0
MOVE A0,A8 ; A8 = [PAL #,0]
ADDI 27,A8 ; A8 = [PAL #,1]
MOVI RRED,A9
MOVE A8,A1
MOVE A9,A0 ; A0 = SOURCE = TABLE POSITION
MOVI 3,A2 ; A2 = COLOR COUNT
CALLA PALSET ; DO THE TRANSFER
DIE
TURNON
;TURN ON ALL OVERHEAD IMAGES
MOVI 0,A9
CREATE CYCPID,STAR_COLOR
CLR A0
MOVB A0,@TMP
TOP0
MOVB @TMP,A0
SLL 5,A0
ADDI IMAG,A0
MOVE *A0,A9,L
JRZ DONE
TOP
MOVE *A9+,A10,W
SUBI 89,A10
MOVE *A9+,A11,W
SUBI 800,A11
;A10=X FROM TABLE
;A11=Y
MOVB @TMP,A0
SLL 5,A0
ADDI IMAG2,A0
MOVE *A0,A14,L
CALLR DOIMG
MOVE *A9,A0
ANDI 0FFFFH,A0
CMPI 0FFFFH,A0
JRNE TOP
;NEXT LIST
MOVB @TMP,A0
INC A0
MOVB A0,@TMP
JRUC TOP0
DONE
RETS
IMAG .LONG HZG,HZGF,VTG,VTGF,CAP,CAPF,LITE,LITEF,PIN,PINF,WIRE,WIREF
.LONG LHZ,LHZG,LVT,LVTG,0
IMAG2 .LONG IMG3,IMG4,IMG1,IMG2,IMG11,IMG12,IMG5,IMG6,IMG7,IMG8,IMG9,IMG10
.LONG IMG13,IMG14,IMG15,IMG16
IMG1:
.LONG 0,0,VGRID
.WORD 07FEDH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG2:
.LONG 0,0,VGRID
.WORD 07FEDH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG3:
.LONG 0,0,HGRID
.WORD 07FEDH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG4:
.LONG 0,0,HGRID
.WORD 07FEDH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG5:
.LONG 0,0,LAMP
.WORD 07FEBH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG6:
.LONG 0,0,LAMP
.WORD 07FEBH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG7:
.LONG 0,0,LGHTBAR
.WORD 07FECH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG8:
.LONG 0,0,LGHTBAR
.WORD 07FECH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG9:
.LONG 0,0,LGHTWIRE
.WORD 07FECH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG10:
.LONG 0,0,LGHTWIRE
.WORD 07FECH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG11:
.LONG 0,0,ENDGRID
.WORD 07FEDH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG12:
.LONG 0,0,ENDGRID
.WORD 07FEDH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG13:
.LONG 0,0,BIGH
.WORD 07FEDH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG14:
.LONG 0,0,BIGH
.WORD 07FEDH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG15:
.LONG 0,0,BIGV
.WORD 07FEDH,DMAWNZ+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
IMG16:
.LONG 0,0,BIGV
.WORD 07FEDH,DMAWNZ+M_FLIPH+M_NOCOLL,CLSNEUT|TYPNEUT|SUBUP
.LONG 0,0
;IMAGES X/Y POSITION
HZG:
.WORD 569,1063
.WORD 606,1063
.WORD 746+10,1030-25
.WORD 817+10,1105-25
.WORD 0FFFFH
HZGF
.WORD 853+10,1105-25
.WORD 970+10,953-25
.WORD 0FFFFH
VTG
.WORD 397,1112
.WORD 0FFFFH
VTGF
.WORD 553,1073
.WORD 0FFFFH
CAP
.WORD 201,1005
.WORD 555,1024
.WORD 561,1104
.WORD 644,1063
.WORD 784+10,1030-25
.WORD 1005+10,953-25
.WORD 0FFFFH
CAPF
.WORD 312,1024
.WORD 553,1063
.WORD 692+10,1105-25
.WORD 731+10,1030-25
.WORD 957+10,953-25
.WORD 0FFFFH
LITE
.WORD 137,1022
.WORD 216,1022
.WORD 608,1086
.WORD 784+10,1051-25
.WORD 0FFFFH
LITEF
.WORD 287,1039
.WORD 387,1051
.WORD 937+10,975-25
.WORD 0FFFFH
PIN
.WORD 130,1016
.WORD 208,1017
.WORD 600,1081
.WORD 775+10,1046-25
.WORD 0FFFFH
PINF
.WORD 411,1044