-
Notifications
You must be signed in to change notification settings - Fork 5
/
ATTRACT.ASM
2698 lines (2279 loc) · 52 KB
/
ATTRACT.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
****************************************************************
*
* Software: ?
* Initiated: ?
*
* Modified: Shawn Liptak 8/6/91 - Hiscore display and entry
* Shawn Liptak 11/9/91 - Title screen
*
* COPYRIGHT (C) 1991 WILLIAMS ELECTRONICS GAMES, INC.
*
*.Last mod - 1/7/92 13:50
****************************************************************
.FILE 'ATTRACT.ASM'
.TITLE "ATTRACT MODE"
.WIDTH 132
.OPTION B,D,L,T
.MNOLIST
.INCLUDE "MPROC.EQU" ;MPROC EQUATES
.INCLUDE "DISP.EQU" ;DISPLAY PROC. EQUATES
.INCLUDE "\VIDEO\SYS\SYS.INC" ;Z UNIT SYSTEM EQUATES
.INCLUDE "\VIDEO\SYS\GSP.INC"
.INCLUDE "MAC2.ASM" ;MACRO 2 DEFINITIONS
.INCLUDE "IMGTBL.GLO"
.INCLUDE "BGNDTBL.GLO" ;BACKGROUND EQUATES
.INCLUDE "GAME.EQU"
.include "audit.equ"
.include "shawn.hdr" ;Macros
.include "title.tbl"
;SOUNDS
.REF TOTCARN,BEEP1,BEEP2,CNTDOWN,RESTUFF_AUTOERASE
.REF PLYRONE,PLYRTWO,MUSICOFF
.ref WRPSND
;yousuck .word >f9a0,10,>80c5,0 ;You suck at this game!
;logosnd .word >f420,1,>804f,0 ;Logo spins
logosnd .word >f420,1,>8047,0 ;Logo spins
;exp1snd .word >fc80,10,>803e,0 ;Explosion
exp1snd .word >fc80,10,>803f,0 ;Explosion
;ttlgun .word >fca0,4,>8030,0 ;Title guy shoots gun
ttlgun .word >fca0,4,>8031,0 ;Title guy shoots gun
; SYMBOLS DEFINED IN THIS FILE
.DEF SYSINITL,WIPEOUT,STATUS,ATSTRT,P1START,P2START,ENTERON
.DEF NO_START,THIS_PLYR,RUNIN,ATSTRT2
.def hisclong
; SYMBOLS DEFINED EXTERNALLY
.ref timerp1,timerp1sd,timerp2,timerp2sd,TNT_TYPE,DELAYALL
.ref TAUNTOUT,TWAS1,KP_TAUNT,PLYRPRCS,FRANIMQ,AFTR_WRP
.ref GAMERASE,GAMSTATE,P1DATA,P2DATA,COLRPRC,HALT,CLRBPAL,KILBGND
.ref BAKMODS,BGND_UD1,BLAKOUT,KILL_CRD,CLR_SCRN,MAPOUT,MAPDN
.ref CR_CONTP,P_CONT,CR_STRTP,P_START,SOUNDSUP,WSPEED,WFLG,BOX_OUT
.ref WNDWON,CRD_SCRN,IRQSKYE,CLRPAL,PLYROBJS,AUTOEON,KPARWP,WORDS
.ref GETFPAL,AUTOEOFF,DMAQWAIT,CLRSWPRC,MYOINIT,AUD1,INFO_BOX
.ref CLRWORLD,SYNCFULL,SYSCOPY,GET_ADJ,CYCLE_TABLE,INIT_GAME
.ref P1CTRL,P2CTRL,GET_OUT,SCORETYP,BCDADD,SCORETYP,TBOMB
.ref DRAW_PLYR_TORSO,CNTDIG1,CNTDIG2,KILLP1,KILLP2,SCRIPTPLAY
.ref WARPOUT,INEXP,CYCLIFE,SHK_ON,INAWARP
.ref HISCBMOD,COLTAB,GETHIGH,PALSET,FPALRAM
.ref SYNCHALF,NOSHOOT
.ref FADE_DOWN,FADE_UP,FADEIN,FADEOUT,FB_FADEIN
.ref anim_script,anim_killall
.ref RNDRNGS
.ref WAVE
.ref WATR1,WATR2,WATR3
;RAM AREA FOR THIS FILE
.BSS RUNIN,16
.BSS STATUS,16 ;PLAYERS 0,1,2,3
.BSS ENTERON,16 ;INITIALS BEING ENTERD FLAG
.BSS NO_START,16 ;FLAG 0=OKAY, 1=NOT RIGHT NOW.
.BSS THIS_PLYR,16 ;FLAG = 1/2 FOR PLYR WHO BOUGHT IN
.bss palram ,11*15*16 ;Palette mem
.bss hisclong,16 ;!0=Show hiscore table longer
.BSS SEC_FLAG,16
OWSPD .SET 21 ;31 ;OPEN WINDOW SPEED (HIGHER THE SLOWER)
.TEXT
**************************************************************************
* *
* WIPEOUT - WIPES THE SYSTEM CLEAR OF ALL OTHER PROCESSES, OBJECTS *
* AND COORDINATES. IT RETURNS WITH AUTO-ERASE SHUT OFF, *
* DISPLAY PROCESSOR DISABLED
* COLOR RAM CLEARED, AND THE BIT MAP WIPED CLEAN. *
* THIS IS NICE TO USE WHEN SWITCHING BETWEEN STUFF. *
**************************************************************************
WIPEOUT
MMTM SP,A0,A1
CLR A0
; MOVE A0,@SCORE_FLAG,W ;INSURE SCORE DMA IS NOT PERFORMED
MOVE A0,@WFLG
MOVE A0,@P1CTRL
MOVE A0,@P2CTRL ;CLEAR PLAYER CPU CONTROLS
MOVE A0,@P1DATA+POBJ,L
MOVE A0,@P2DATA+POBJ,L
movi PLYRPRCS,a1
move a0,*a1+,L ;These must be cleared!
move a0,*a1+,L
movi PLYROBJS,a1
move a0,*a1+,L
move a0,*a1+,L
move a0,@TAUNTOUT
move a0,@INEXP
move a0,@NOSHOOT
move a0,@SHK_ON
move a0,@INAWARP
move a0,@CYCLIFE
move a0,@AFTR_WRP
move a0,@WARPOUT
MOVI PLIST_ID,A1
CLR A0
CALLA KILALL ;KILL ALL PROCS, EXCEPT FOR COINS
CALLA KILBGND ;WIPEOUT BACKGROUND BLOCKS
CLR A0
MOVE A0,@SOUNDSUP,W ;MAKE SURE SOUNDS ARE ALLOWED
MOVE A0,@GAMERASE,W
MOVE A0,@IRQSKYE,W
CALLA AUTOEOFF
; CLR A0
; MOVE A0,@DISPLAYON,W ;TURN THE DISPLAY PROCESSOR OFF
CALLA DMAQWAIT
PUSHST
DINT
CALLA CLRSWPRC
CALLA MYOINIT ;RE-INIT THE OBJECT LIST
CALLA CLRWORLD ;RESET THE WORLD
CALLA SYSINITL
CALLA CLR_SCRN
POPST
CALLA SYNCFULL ;NOW WAIT FOR VBLANK TO ZAP COLOR MAP
MOVI -4,A0
MOVE A0,@DPYSTRT ;RESET DISPLAY START POINT
MOVI OWSPD,A0
MOVE A0,@WSPEED
MMFM SP,A0,A1
RETS
**************************************************************************
* *
* SYSINITL - INITIALIZE LOW BYTE OF SYSTEM CONTROL REGISTER *
* *
**************************************************************************
SYSINITL
MMTM SP,A0,A1
MOVE @SYSCOPY,A0,W
MOVI SYSCINIT,A1
SLL 24,A1
SRL 24,A1
OR A1,A0
MOVE A0,@SYSCOPY,W ;RE-INITIALIZE SYSTEM CONTROL REG
MOVE A0,@SYSCTRL,W
MMFM SP,A0,A1
RETS
;ATTRACT MODE START UP ROUTINE
ATSTRT2
MOVK 1,A0
MOVE A0,@GAMERASE
MOVE @GAMSTATE,A0
CMPI INDIAG,A0
JREQ ATSTRTX
MOVI INAMODE,A0
MOVE A0,@GAMSTATE,W
CALLA COLRPRC
CREATE AMDEPID,AMODE ;CREATE THE ATTRACT MODE
ATS3
CLR A0
MOVE A0,@HALT
MOVE A0,@ENTERON
.REF START
MOVE A0,@START
ATSTRTX
RETS
ATSTRT
MOVK 1,A0
MOVE A0,@GAMERASE
MOVE @GAMSTATE,A0
CMPI INDIAG,A0
JREQ ATSTRTX
MOVI INAMODE,A0
MOVE A0,@GAMSTATE,W
CALLA COLRPRC
CREATE AMDEPID,amode2 ;CREATE THE ATTRACT MODE
JRUC ATS3
; CYCLE BETWEEN MODES
AMODE
JSRP HSTDTABQ ;Show high scores with quick blindin
amode2
JSRP DO_CRD_SCRN ;DISPLAY INSERT COIN SCREEN
JSRP titlescreen
CALLA CLRBPAL
JSRP ATTPLAY2 ;DO ROAD ATTRACT MODE PLAY
JSRP DO_CRD_SCRN ;DISPLAY INSERT COIN SCREEN
CALLA CLRBPAL
JSRP HSTDTAB ;Show high scores
JSRP SHOWDOME ;SHOW PLEASURE DOME ENTRANCE!
JSRP ATTPLAY ;DO ORCUS ATTRACT MODE PLAY
JSRP DO_CRD_SCRN ;CREDIT INFO SCREEN
CALLA CLRBPAL
JSRP titlescreen
CALLA CLRBPAL
JSRP ATTPLAY3 ;DO REPORTER ATTRACT MODE
; JSRP SNK_PRVW
JSRP DO_CRD_SCRN ;CREDIT INFO SCREEN
CALLA CLRBPAL
JSRP HSTDTAB ;Show high scores
MOVI AMDEPID,A0
MOVE A0,*A13(PROCID)
jruc amode2
SHOWDOME
JSRP WNDWON
CALLA KILBGND ;KILL OLD BACKGROUND IF ANY EXISTED
CALLA CLNPAL
MOVI CLSNEUT|TYPTEXT|SUBWNDW,A0
CLR A1
NOT A1
CALLA KILOBJ
CLR A0
MOVE A0,@WFLG
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
MOVI 0D4H,a0
move a0,@WORLDTLX+16
movi 694H,a0
move a0,@WORLDTLY+16
SLEEPK 2
MOVI DMOD,A0
MOVE A0,@BAKMODS,L
CLR A1
MOVE A1,@DISPLAYON
CALLA BGND_UD1
MOVI PALCNO,A0
MOVK 2,A1
CALLA FADEIN
CLR A0
CALLA FB_FADEIN
SLEEPK 2
MOVK 1,A1
MOVE A1,@DISPLAYON
;START FOUNTAINS
.REF WATR1,WATR2,WATR3
SLEEP 30
********************************
* Start the pleasure dome fountain anims
movi fount_t,a8
fsalp CREATE0 fountain_ani
addi 80,a8
move *a8,a0,L
jrnz fsalp
SLEEP 5*60
JSRP WNDWON
CALLA KILBGND ;KILL OLD BACKGROUND IF ANY EXISTED
CALLA CLNPAL
MOVI CLSNEUT|TYPTEXT|SUBWNDW,A0
CLR A1
NOT A1
CALLA KILOBJ
CLR A0
MOVE A0,@WFLG
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
RETP
fount_t LWWW watr_l,66H,0B8H,DMAWNZ|M_NOCOLL
LWWW watr_l,127H,0B8H,DMAWNZ|M_NOCOLL|M_FLIPH
.long 0
watr_l LW WATR1,5
LW WATR2,5
LWL0 WATR3,5
SUBRP fountain_ani
move *a8+,a9,L
move *a8+,a0 ;X
move *a8+,a1 ;Y
sll 16,a0
sll 16,a1
move *a9,a2,L
movi 170,a3 ;Z
move *a8+,a4
movi CLSDEAD,a5
clr a6
clr a7
calla BEGINOBJ
move a9,a11
falp JSRP FRANIMQ
move a11,a9
jruc falp
PALCNO .LONG 5*32*32+5*32+5,0
DMOD
.long DOMEBMOD
.word 200,200
.long -1
;
; ATTPLAY - ATTRACT MODE GAME PLAY
; NOTE: CALL WITH JSRP
;
.BSS AWAVE,16
ATTPLAY3:
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
CREATE0 AMODWAVE3 ;START WAVE #1-3
SLEEP 18*60
JRUC ATTFIX
ATTPLAY2:
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
CREATE0 AMODWAVE2 ;START WAVE #1-3
SLEEP 30
MOVI P1DATA,A11 ;MARK PLAYER 1 FOR DEMO
MOVI AWAV2MOV,A9
JRUC ATTNEXT
ATTPLAY:
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
MOVE @AWAVE,A0,W
INC A0
CMPI 3,A0
JRLS ATTWGO
CLR A0
ATTWGO:
MOVE A0,@AWAVE,W
SLL 4,A0
ADDI WV_TBL,A0
MOVE *A0,A0 ;GET REAL GAME WAVE #
MOVE A0,@WAVE,W
CALLA CLNPAL
.REF AMODWAVE2,AMODWAVE,CLNPAL,FADE_STRT,AMODWAVE3
DROPBMB .EQU 01000H
CREATE0 AMODWAVE ;START WAVE #1-3
MOVI P1DATA,A11 ;MARK PLAYER 1 FOR DEMO
MOVI AWAV1MOV,A9
ATTNEXT:
MOVE *A9+,A0,W ;GET SOME JOYSTICK BITS
CMPI DROPBMB,A0
JRNZ ATTNB
;DROP A BMB
MOVE @P1DATA+BMB_CNT,A0
INC A0
MOVE A0,@P1DATA+BMB_CNT
PUSH A9
MOVK 1,A9
CREATE BMBPID,TBOMB
PULL A9
JRUC ATTNB1
ATTNB
CMPI -1,A0
JREQ ATTWXXX
MOVE A0,@P1CTRL,W
ATTNB1 MOVE *A9+,A10,W
JSRP ATTSLP ;PROCESS SLEEP TIME
JRUC ATTNEXT
WV_TBL .WORD 1,2,3,4
ATTWXXX:
CALLA INIT_SCORE
ATTFIX
CLR A1
NOT A1
MOVI CHNKPID,A0
CALLA KILALL
.REF INIT_SCORE,SCORE_FLAG
SLEEPK 2
CLR A0
MOVE A0,@SCORE_FLAG
JSRP WNDWON
MOVI ICONPID,A0
CLR A1
NOT A1
CALLA KILALL
SLEEP 2
CLR A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
CALLA WIPEOUT
CALLA RESTUFF_AUTOERASE
RETP
;
; ATTSLP - PROCESS ATTRACT MODE PLAYER SLEEP
; A10 = # TICKS TO SLEEP
; RETURNS:
; CARRY CLEAR = SLEEP COMPLETED
; CARRY SET = STILL SNOZZIN'
;
; NOTE: CALL WITH JSRP
;
ATTSLP:
PUSHP A10
ATTSLPL:
SLEEP 1
SETC
DSJS A10,ATTSLPL ;PROCESS SLEEP LOOP
CLRC
PULLP A10
RETP
AWAV1MOV:
;PLACE SCRIPT FOR WAVE ORCUS
.WORD 0,60*5
.WORD PUP|PLEFT,35H
.WORD PRYTE,35H
.WORD DROPBMB,1H
.WORD PFUP|PDOWN,40H
.WORD PFUP,20H
.WORD DROPBMB,1H
.WORD 0,5H
.WORD PFLEFT|PFUP,20H
.WORD DROPBMB,1H
.WORD PLEFT,20H
.WORD PFRYTE|PFUP|PUP,50H
.WORD DROPBMB,1H
.WORD DROPBMB,11H
.WORD PFUP|PFRYTE|PDOWN,20H
.WORD DROPBMB,1H
.WORD PFRYTE|PUP,20H
.WORD PFUP|PFRYTE|PDOWN,40H
.WORD PUP,26H
.WORD DROPBMB,1H
.WORD 0,20H
.WORD PFLEFT|PRYTE,25H
.WORD PUP,10H
.WORD PRYTE|PFDOWN,55H
.WORD DROPBMB,1H
.WORD PFUP|PDOWN,20H
.WORD PFRYTE|PLEFT,20H
.WORD PFRYTE|PUP,20H
.WORD DROPBMB,1H
.WORD PFRYTE|PDOWN,30H
.WORD PFRYTE|PFUP,20H
.WORD PLEFT,20H
.WORD DROPBMB,1H
.WORD PFDOWN|PFLEFT|PRYTE,15H
.WORD DROPBMB,1H
.WORD PUP,26H
.WORD PRYTE|PFDOWN,22H
.WORD PFUP|PDOWN,20H
.WORD PFRYTE|PFUP|PLEFT,30H
.WORD DROPBMB,11H
.WORD DROPBMB,1H
.WORD PFRYTE|PUP,20H
.WORD PFRYTE|PFUP|PDOWN,35H
.WORD DROPBMB,1H
.WORD PFLEFT|PFUP|PUP,20H
.WORD DROPBMB,1H
.WORD PFLEFT|PFUP|PDOWN,35H
.WORD PFRYTE|PDOWN,30H
.WORD PFRYTE,20H
.WORD DROPBMB,11H
.WORD DROPBMB,1H
.WORD PRYTE|PUP|PFDOWN,30H
.WORD PLEFT,20H
.WORD DROPBMB,1H
.WORD PFDOWN|PRYTE,15H
.WORD PUP,26H
.WORD PRYTE|PFDOWN,22H
.WORD PFUP|PDOWN,20H
.WORD PFRYTE|PLEFT,30H
.WORD PFLEFT|PFUP|PUP,20H
.WORD DROPBMB,1H
.WORD PFRYTE|PDOWN,35H
.WORD PFLEFT|PUP,20H
.WORD PFLEFT|PFUP|PDOWN,35H
.WORD 0FFFFH
AWAV2MOV:
;PLACE SCRIPT FOR ROAD
.WORD 0,60*2
.WORD PUP|PRYTE|PFRYTE,50H
.WORD PRYTE|PFRYTE,55H
.WORD PFUP|PDOWN,40H
.WORD PFRYTE,20H
.WORD DROPBMB,1H
.WORD 0,5H
.WORD PFRYTE,20H
.WORD DROPBMB,1H
.WORD PFRYTE|PUP,50H
.WORD DROPBMB,1H
.WORD PFUP|PFRYTE|PDOWN,20H
.WORD PFRYTE|PUP|PRYTE,20H
.WORD PFUP|PFRYTE|PDOWN,40H
.WORD PUP,26H
.WORD 0,20H
.WORD PFRYTE|PRYTE,35H
.WORD DROPBMB,1H
.WORD PUP,10H
.WORD PRYTE|PFDOWN,45H
.WORD PFUP|PDOWN,20H
.WORD PFRYTE|PUP,20H
.WORD DROPBMB,1H
.WORD DROPBMB,11H
.WORD PFRYTE|PDOWN,30H
.WORD PFRYTE|PFUP,20H
.WORD DROPBMB,1H
.WORD PLEFT,20H
.WORD PFDOWN|PFLEFT|PRYTE,15H
.WORD PUP,26H
.WORD DROPBMB,1H
.WORD PRYTE|PFDOWN,22H
.WORD PFUP|PDOWN,20H
.WORD PFRYTE|PLEFT,30H
.WORD PFRYTE|PUP|PRYTE,20H
.WORD PFRYTE|PDOWN|PRYTE,35H
.WORD DROPBMB,1H
.WORD PFLEFT|PFUP|PUP|PRYTE,20H
.WORD PFLEFT|PFUP|PDOWN|PRYTE,35H
.WORD DROPBMB,1H
.WORD PFRYTE|PDOWN,30H
.WORD PFRYTE,20H
.WORD PRYTE|PUP|PFDOWN,30H
.WORD PFDOWN|PRYTE,15H
.WORD PUP,26H
.WORD PRYTE|PFDOWN,22H
.WORD DROPBMB,11H
.WORD PFUP|PDOWN,20H
.WORD PFLEFT|PFUP|PUP,20H
.WORD PFRYTE|PDOWN,35H
.WORD DROPBMB,1H
.WORD PFLEFT|PUP,20H
.WORD PFLEFT|PFUP|PDOWN,35H
.WORD 0FFFFH
;DISSND .WORD >F3EE,>18,>80B0,0 ;KEY MELODY TYPE SND
;
; .REF CYCSPECT
;SNK_PRVW
; CREATE COLRPID,CYCSPECT ;START COLOR CYCLE PROCESS
; calla KILBGND ;Kill old background if any existed
;
; ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
; MOVE A0,A0
; JRNZ NONO
; CLR A0
; MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
; movi DISSND,a0 ;DO DISARM SOUND IF NOT BLOWING
; calla ONESND
; MOVK 1,A0
; MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
;NONO
; MOVI RD15FONT,A11 ;FONT TABLE
; CLR A0
; MOVE A0,@WRLD
; MOVK 2,A10 ;Y,X SPACING BETWEEN CHARCTERS
; CLR A0
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [25-5,0200],A9 ;SCRN Y/X
; MOVI LINE1,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [45-5,0200],A9 ;SCRN Y/X
; MOVI LINE2,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [70-5,0200],A9 ;SCRN Y/X
; MOVI LINE3,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [90-5,0200],A9 ;SCRN Y/X
; MOVI LINE4,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [110-5,0200],A9 ;SCRN Y/X
; MOVI LINE5,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [130-5,0200],A9 ;SCRN Y/X
; MOVI LINE6,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [150-5,0200],A9 ;SCRN Y/X
; MOVI LINE7,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [170-5,0200],A9 ;SCRN Y/X
; MOVI LINE8,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [190-5,0200],A9 ;SCRN Y/X
; MOVI LINE9,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [210-5,0200],A9 ;SCRN Y/X
; MOVI LINE10,A8
; JSRP STRCNRMO
;
; MOVI 3E3EH,A6 ;COLOR CYCLE DIGITS
; MOVI [235-5,0200],A9 ;SCRN Y/X
; MOVI LINE11,A8
; JSRP STRCNRMO
;
; SLEEP 12*60
;
; MOVI CLSNEUT|TYPTEXT|SUBTXT,A0
; CLR A1
; NOT A1
; CALLA KILOBJ
; RETP
;
;LINE1 .BYTE "GAME PLAYERS:",0
;LINE2 .BYTE "THIS IS A TEST GAME!",0
;LINE3 .BYTE "TOTAL CARNAGE IS HERE!",0
;
;LINE4 .BYTE "GET A SNEAK PEEK AND BE",0
;LINE5 .BYTE "THE FIRST TO PLAY!",0
;LINE6 .BYTE "THE CARNAGE CAN ONLY BE",0
;LINE7 .BYTE "FOUND HERE IN CHICAGO.",0
;LINE8 .BYTE "PLAYING WITH A PARTNER",0
;LINE9 .BYTE "WILL HELP YOU SURVIVE",0
;LINE10 .BYTE "THE CARNAGE! GOOD LUCK!",0
;LINE11 .BYTE "YOU'LL NEED IT!",0
; .EVEN
TOTCARN2 .WORD >F9F0,120,>80F0,0 ;"TOTAL CARNAGE"
********************************
* Title page
SUBRP titlescreen
calla KILBGND ;Kill old background if any existed
movi title_as,a8
CREATE ANIMPID,anim_script ;P1
; SLEEP 30 ;DEBUG
SLEEP 1020
calla anim_killall
RETP
title_as
; ASSNDD yousuck
ASLAB 49
ASNEW titlemdnew_t ;>Midway logo
ASDSJ
ASASM
move @OBJLST,a0,L ;>Set up logo lines
move *a0(OSAG),a2,L
move *a0(OYPOS),a3
t40 movk 1,a1
move a1,*a0(OSIZEY)
move a2,*a0(OSAG),L
move a3,*a0(OYPOS)
addi 200*8,a2
addk 1,a3
btst 0,a3
jrz t50
move *a0(OXPOS),a1 ;Move to rgt
addi 400+200,a1
move a1,*a0(OXPOS)
move *a0(OID),a1
addk 1,a1
move a1,*a0(OID)
t50 move *a0,a0,L
jrnz t40
ASENDASM
ASLAB 75 ;>Slide in logo
ASXY 8,0,4,0
ASXY 9,0,-4,0
ASDSJS1
ASTXT tpresents_st
ASSLP 50
ASASM
CALLA logo_setflpv
SLEEP 96
CALLA logo_negyv
SLEEP 48
CALLA logo_negyv
SLEEPK 24
CALLA logo_negyv
SLEEPK 12
CALLA logo_negyv
SLEEPK 6
CALLA logo_setxv
; ASENDASM
; ASSNDD exp1snd
ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
MOVE A0,A0
JRNZ NONO1
CLR A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
movi exp1snd,a0
calla ONESND
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
NONO1
ASENDASM
ASTXTK
ASSLP 20
ASASM
ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
MOVE A0,A0
JRNZ NONO2
CLR A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
movi TOTCARN2,a0
calla ONESND
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
NONO2
ASENDASM
; ASSNDD TOTCARN
ASNEW titlenew_t
ASHIDE >54
ASLAB 67
ASXY >10,0,-6,0
ASXY >40,>1f,6,0
ASDSJS1
ASDELM 8,1
ASRUN ttlshoot_as
ASLAB 136
ASXY >40,>1f,3,0
ASDSJS1
ASSLP 60*7
ASLAB 43
ASXY >10,0,0,6
ASXY >40,>f,0,8
ASXY >50,>f,0,7
ASDSJS1
ASEND
titlemdnew_t
ASITEMN -199,100,MIDWAY,50,DMAWNZ,8
.word -1000
TX .set -808
TY .set 0+1
TGY .set 50 ;93
titlenew_t
ASITEMN 418,6+1,TITPC1,50,DMAWNZ,>10
ASITEMN 630,6+1,TITPC2,50,DMAWNZ,>10
ASITEMN TX,TY,BLOCKSIZE,30,DMAWNZ,>40
ASITEMN TX+200,TY,BLOCKSIZE,30,DMAWNZ,>40
ASITEMN TX+400,TY,BLOCKSIZE,30,DMAWNZ,>40
ASITEMN TX+600,TY,BLOCKSIZE,30,DMAWNZ,>40
ASITEMN TX,TY+255,BLOCKSIZE,30,DMAWNZ+M_FLIPV,>40
ASITEMN TX+200,TY+255,BLOCKSIZE,30,DMAWNZ+M_FLIPV,>40
ASITEMN TX+400,TY+255,BLOCKSIZE,30,DMAWNZ+M_FLIPV,>40
ASITEMN TX+600,TY+255,BLOCKSIZE,30,DMAWNZ+M_FLIPV,>40
ASITEMN TX+54,TY+238,COPYR,100,DMAWNZ,>40
ASITEMN TX+68,TY+TGY,TTLHED1,70,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC1,70,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC2,70,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC3,40,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC4,40,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC5,40,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC6,40,DMAWNZ,>50
ASITEMN TX+68,TY+TGY,TTLPC7,40,DMAWNZ,>50
ASITEMN TX+67,TY+TGY,TTLPC8,40,DMAWNZ,>50
ASITEMN TX+66,TY+TGY,TTLPC9,40,DMAWNZ,>50
ASITEMN TX+67,TY+TGY,TTLPC10,40,DMAWNZ,>50
ASITEMN TX+68+330,TY+TGY+105,TTLBLAST,44,DMAWNZ,>54
ASITEMN TX+68+330,TY+TGY+104,TTLBLAST,44,DMAWNZ+M_FLIPV,>54
.word -1000
tpresents_st
XYTXT 0,200,160,37,"PRESENTS"
.word -1
ttlshoot_as
; ASSLP 40
; ASLAB 5
; ASLAB 8 ;>Pop up
; ASXY >50,>f,1,-5
; ASDSJS1
; ASXY >50,>f,1,-3
; ASSLP1
ASLAB 12*4 ;>Fire
ASXY >50,>f,-2,0
ASSVL FLASH
ASPAL >50
ASPAL >54
ASSHOW >54
ASSLP1
ASASM
ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
MOVE A0,A0
JRNZ NONO3
CLR A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
movi ttlgun,a0
calla ONESND
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
NONO3
ASENDASM
; ASSNDD ttlgun
ASXY >50,>f,-2,0
ASSVL BLASTP
ASPAL >54
ASSLP1
ASXY >50,>f,2,0
ASSVL FLASH
ASPAL >54
ASSLP1
ASXY >50,>f,2,0
ASHIDE >54
ASSVL TTLCOLR
ASPAL >50
ASDSJS1
; ASLAB 8 ;>Duck
; ASXY >50,>f,-1,5
; ASDSJS1
; ASXY >50,>f,-1,2
; ASSLP1
; ASXY >50,>f,0,1
; ASSLP1
; ASSLPR 60,90
; ASDSJ
ASEND
SUBRP logo_setflpv
move @OBJLST,a2,L ;>Flip logo lines
movi >8000,a3
lsfvlp movb *a2(OID),a0
subk 1,a0
jreq lsfv50 ;Txt?
move a3,*a2(OYVEL),L
subi >555,a3
lsfv50 move *a2,a2,L
jrnz lsfvlp
rets
SUBRP logo_negyv
; ASENDASM
; ASSNDD logosnd
; ASASM
ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
MOVE A0,A0
JRNZ NONO4
CLR A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS ON
movi logosnd,a0
calla ONESND
MOVK 1,A0
MOVE A0,@SOUNDSUP,W ;TURN ALL SOUNDS OFF
NONO4
move @OBJLST,a2,L ;>Flip logo lines
lnyvlp movb *a2(OID),a0
subk 1,a0
jreq lnyv50 ;Txt?
move *a2(OYVEL),a0,L
neg a0
sll 1,a0 ;*2
move a0,*a2(OYVEL),L
lnyv50 move *a2,a2,L
jrnz lnyvlp
rets
SUBRP logo_setxv
move @OBJLST,a2,L ;>Flip logo lines
lsxvlp movk 7,a0
sll 16,a0
move *a2(OID),a1
btst 0,a1
jrz lsxv50
neg a0
lsxv50 move a0,*a2(OXVEL),L
move *a2,a2,L
jrnz lsxvlp
rets
********************************
DO_CRD_SCRN
JSRP CRD_SCRN ;SHOW CREDITS SCREEN SUPERIMPOSED
; SLEEP 1*60
SLEEP 6*60
CALLA KILL_CRD
CALLA CLR_SCRN
RETP
**************************************************************************
* *
* PxSTART - PLAYER START SWITCH PROCESSES *
* *
**************************************************************************
*PLAYER 1 START
P1START:
MOVE @TAUNTOUT,A1
JRZ P1TAG0
IN2
;CHECK TO SEE IF TAUNT IN RACKUP
MOVE @TNT_TYPE,A0
JANZ SUCIDE
MOVE @KP_TAUNT,A0,L
CMPI 1,A1
JRNZ TNT1
MOVI TWAS1,A7
CLR A1
CALLA XFERPROC
DIE
TNT1 MOVK 3,A0 ;GET OUT OF TAUNT!
MOVE A0,@TAUNTOUT
DIE
P1TAG0 MOVE @INFO_BOX,A0,L
JRZ P1TAG
P2IN2
;INFO BOX IS OUT, TAKE IT OFF, IGNORE THIS START!
MOVI BOX_OUT,A7
CLR A1