forked from historicalsource/smashtv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MENU.ASM
4264 lines (3847 loc) · 149 KB
/
MENU.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 "MENU.ASM"
.TITLE "ROBO TEST MENUS"
.WIDTH 132
.OPTION B,D,L,T
.MNOLIST
;
; SOFTWARE:
;
; 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 "LINK.EQU"
.INCLUDE "MENU.EQU" ;MENU EQUATES
.TEXT
;
; IN THIS MODULE
;
.DEF FACCHECK
.DEF MEN_MAIN,CSELCT,GET_CSPT,CS_POINT
.DEF MESS_FAC
.DEF ANY_BUT,MEN_YN
.DEF STR_OBJ
.DEF STR_FREE
.DEF CKPROMPT
.DEF GO_DIAG ;ROUTINE FOR DIAGNOSTIC MENU
.DEF RTR_LEV,ROM_LEV
.DEF MESS_MM
.DEF CS_ENTS ;NUMBER OF HIGHEST IN COIN TABLE
.DEF TWO_TS,TWO_TP
.DEF FAC_STUF
.DEF BUILD_ST
.DEF SCODE ;SYNTH CODE CURRENTLY BEING MADE
.DEF DCODE ;DIG CODE CURRENTLY BEING MADE
.DEF HID_P
.DEF SNDTST
;
; IN TEST.ASM
;
.REF WDOGDIS
.REF GEN_MENU,B_MENU
.REF L_MESS,TOP_BOX
;,WT_ADV,WW_ADV
.REF GET_AUD
.REF LM_FINIS
.REF LM_SETUP
.REF BAD_AUD
.REF MAIN_RET
.REF AREUSURE
.REF F_TITLE
.REF ST_STICK
.REF GETSTICK
.REF FAC_SET
.REF SUR_MESS
.REF SURE_BOX
.REF RT_RET
.REF GET_FAC
.REF WAIT_BUT
.REF DIGSRT
.REF DIAG_EX
; .REF GET_ADV
.REF STD_BORD
.REF SND_MADE
.REF NO_CLEAR
.REF LAST_BUT
.REF G_BORDER
;
; IN AUDIT.ASM
;
.REF ROM_NAME
.REF GET_ADJ
.REF STRCAT
; .REF CLR_SUBS
.REF NO_CREDS
.REF CLR_AUDR
.REF CLR_AUD
.REF ADD_DUMP
.REF DISPDUMP
.REF CAT_A0
.REF CK_MAX
.REF DUMP_FS
.REF ADJ_PAGE
.REF F_ADC_S
.REF WC_BYTEI
.REF RC_WORD
.REF DEF_PAGE
.REF WAIT_MUT
.REF STORE_AUDIT
;
; IN HSTD.ASM
;
.REF ALL_TAB,INIT_TB,FORM_ADC,WC_WORD,CMOS_VAL
.REF P_FORK,GET_HSC,INIT_HSR
;
; IN ADJUST.ASM
;
.REF GO_ADJ
;
; IN UTIL.ASM
;
.REF FILLAREA
.REF CLR_SCRN
;
; IN ROBOATT.ASM
;
.REF COLRSTRT
.REF GAMERASE
.REF ATSTRT
;
;DIAG STUFF
;
.REF CPU_CHK,SW_CHK,COL_BARS,CROSS_H,BURN_IN,STRNEW1
;
.REF RD15FONT,SCRCLR,MYOINIT,STRCNRM,GAMSTATE
.REF STRNGRAM,BLNKAREA,STRLNRM,RD7FONT,HEXTOASC
.REF CLR_SCRN,STRRNRM
.REF WARMSET,QSNDRST
*
.BSS FAC_FLAG,16 ;FLAG SAYS CLEAR AUDITS AND HSTABLE
* ;IF FACTORY SETTINGS SUCCEED.
.BSS SCODE,16 ;SYNTH CODE LAST MADE!
.BSS DCODE,16 ;DIG CODE LAST MADE!
.BSS TMPOBJ,32 ;TEMPORARY OBJECT FROM STR_OBJ
.TEXT
INDIAG .EQU 40H
**************************************************************************
* *
* COIN TABLE *
* *
**************************************************************************
* *
* The coin table is made up of the normal entries from *
* the pinball system, as well as some new ones that *
* determine start and buy-in cost, and others that *
* aid in the determination of a "total collection". *
* *
* Left Slot Multiplier word *
* Center Slot Multiplier word *
* Right Slot Multiplier word *
* Units for Credit word *
* Units for Bonus word *
* Minimum Units word *
* Credits to start word *
* Credits to Continue word *
* Divisor in money calculation word 0 means "OFF" *
* *
* -------------------------------------------------------------- *
* The above value get copied as adjustments (and are adjustable). *
* In addition, the coin table contains help on how to arrive at *
* the "Total Collection" for the coin audits. *
* -------------------------------------------------------------- *
* *
* Count for each Left coin word *
* Count for each Center coin word *
* Count for each Right coin word *
* Pointer to Leading text string long *
* Pointer to Following text string long *
* *
**************************************************************************
* *
* GET_CSPT *
* *
* THIS IS CALLED TO RETURN IN A6 THE CURRENT *
* CSELCT LINE AS STORED IN THE ADJUSTMENT TABLE. *
* *
**************************************************************************
GET_CSPT:
MMTM SP,A0
MOVI ADJPRICE,A0
CALLA GET_ADJ ;GET THE COIN SELECT NUMBER BEING USED.
CALLR CS_POINT
MMFM SP,A0
RETS
**************************************************************************
* *
* CS_POINT *
* *
* THIS IS CALLED TO POINT AT AN ENTRY IN THE COINAGE *
* SELECT TABLE. *
* *
* IT TAKES OFFSET IN A0. *
* IT RETURNS POINTER IN A6. *
* *
**************************************************************************
CS_POINT:
MMTM SP,A0,A1
MOVE A0,A0 ;ZERO?
JRZ CS1 ;YEP...RETURN FIRST LINE
CMPI CS_ENTS,A0 ;IN RANGE?
JRLS CS2 ;YEP...CONTINUE
MOVI 1,A0 ;TOO LARGE.......USE 1ST LINE.
CS2:
DEC A0 ;INDEX INTO TABLE
CS1:
MOVI CS_SIZE,A1 ;SIZE PER ENTRY
MPYU A0,A1 ;OFFSET INTO TABLE
ADDI CSELCT,A1
MOVE A1,A6 ;RETURN THE POINTER
MMFM SP,A0,A1
RETS
**************************************************************************
* *
* CKPROMPT *
* *
* IS THERE A PROMPT STRING FOR THE CREDITS PAGE. *
* *
* *
* A0 RETURNS: *
* *
* YES.....RETURN POINTER TO SOMETHING *
* NO......RETURN ZERO *
* *
* IF A0 HAS A POINTER THEN.... *
* *
* IF A1 = 0 THEN A0 IS AN L_MESS STRING THAT SHOULD *
* JUST BE SENT OUT. *
* *
* IF A1 .NE. 0 THEN A0 IS A POINTER LIST OF UP TO 2 MESSAGES. *
* THAT GIVE PRICING INFO *
* *
* A1 = 0 PLOT THE A0 STRING OUTRIGHT USING L_MESS *
* (IT CONTAINS ALL DATA) *
* *
* A1 = 1 PLOT ONLY THE STRING LIST (1 OR 2 POINTERS *
* CENTERED APPROPRIATELY *
* *
* A1 = 2 PLOT THE 1ST LINE OF THE STRING LIST ALONG *
* WITH THE 2 CREDITS TO START...1 TO CONTINUE *
* *
* A1 = 3 PLOT THE 2ND LINE OF THE STRING LIST ALONG *
* WITH THE 2 CREDITS TO START...1 TO CONTINUE *
* *
* A1 = 4 PLOT THE 3RD LINE OF THE STRING LIST ALONG *
* WITH THE 2 CREDITS TO START...1 TO CONTINUE *
* *
* A1 = 5 PLOT THE 1ST LINE OF THE STRING LIST ALONG *
* ALONG WITH 2 COINS PER PLAYER *
* *
* A1 = 6 PLOT THE 2ND LINE OF THE STRING LIST ALONG *
* ALONG WITH 2 COINS PER PLAYER *
* *
* A1 = 7 PLOT THE 3RD LINE OF THE STRING LIST ALONG *
* ALONG WITH 2 COINS PER PLAYER *
* *
* A1 = 8 CUSTOM MESSAGE *
* *
**************************************************************************
CKPROMPT:
MMTM SP,A6
MOVI ADJFREPL,A0 ;FREE PLAY NEEDS NO PROMPT
CALLA GET_ADJ
JRZ CKP1 ;NOT FREE PLAY
RET_NO:
CLR A0 ;IT IS FREE PLAY.
JRUC CKEXIT ;RETURN NO TOP PROMPT
CKP1:
CALLA CK_MAX ;ARE WE AT MAX CREDITS?
JRHS RET_MAX
*
* ARE WE ADJUSTED TO NOT BE SPECIFIC?
*
MOVI ADJNOCPAG,A0
CALLA GET_ADJ ;CHECK THE ADJUSTMENT
JRNZ CKSPCASE ;WE'RE SET TO SHUT UP...JUST START/CONT
MOVI ADJ1ST6,A0 ;HAS OPERATOR MESSED AROUND?
CALLA GET_ADJ
JRZ CKSPCASE ;YEP...GO FOR GENERIC "2 TO START"
*
* OPERATOR IS USING CANNED COINAGE....WE NEED TO USE THE
* CHECK IF ITS 2/1 OR 2/2
*
CALLR CK_2_CRED ;IS IT A 2 CREDIT MODE?
JRZ NOT_2_MODE ;NOPE...PRINT STOCK STUFF
MOVE A0,A1 ;COPY 2/1 2/2 CODE
CALLA GET_CSPT ;POINT A6 AT CSEL FOR US NOW.
MOVE *A6(CS_PICK),A0,W ;GET INDICATION OF WHICH LINE
JRZ CKSPCASE ;IT SAYS JUST ENUMERATE THE MODE!
*
* NOW....IF ITS 2/1, A0 HAS THE CORRECT RETURN CODE
* IF ITS 2/2 WE NEED TO ADD 2
*
CMPI 1,A1 ;IS IT 2/1?
JRZ RET_A0_VAL ;A0 IS SET (ITS 2/1)
ADDI 3,A0
JRUC RET_A0_VAL ;RETURN THIS!
NOT_2_MODE:
CALLA GET_CSPT ;POINT A6 AT CSEL FOR US NOW.
MOVE *A6(CS_PROMPT),A0,L ;FETCH POINTER TO MESSAGE (IF ANY)
JRZ CKSPCASE
*
* WE HAVE SOMETHING STORED AT THE PROMPT.
*
CMPI CSM_LAST,A0 ;IS IT LITTLE?
JRHI CKEXIT ;NOPE....ITS A POINTER....RETURN L_MESS STATUE
RET_A0_VAL:
MOVE A0,A1 ;ITS LITTLE...RETURN IT AS A CODE
MOVE *A6(CS_LIST),A0,L ;PASS BACK MESSAGE LIST FOR THIS MODE
JRUC CK_BYE
CKEXIT:
CLR A1 ;NO FANCIES YET
CK_BYE:
MOVE A0,A0 ;FLAG PARM
MMFM SP,A6
RETS
*
* CONTROL COMES HERE IF IT LOOKS LIKE NO MESSAGE IS
* APPROPRIATE....CHECK FOR 2 TO START 1 TO CONTINUE
* GENERIC NEEDED.
*
CKSPCASE:
CALLR CK_2_CRED ;CHECK IF THERE ARE 2 CREDIT MODES.
JRZ RET_NO ;NOT A 2 CREDIT MODE.
CMPI 1,A0
JRZ TWO_ONE ;YEP...RETURN 2/1
*
* MUST BE 2/2
*
MOVI TWO_CRED_PER_PLAYER,A0
JRUC CKEXIT ;RETURN IT!
TWO_ONE:
MOVI TWO_TO_START,A0
JRUC CKEXIT
RET_MAX:
MOVI MAX_C_M,A0
JRUC CKEXIT
**************************************************************************
* *
* CK_2_CRED *
* *
* THIS IS CALLED TO SEE IF WE'RE IN A 2-CREDIT TO *
* START MODE. *
* *
* A0 = 0 NOT 2/1 OR 2/2 CREDIT MODE *
* A0 = 1 2 TO START 1 TO CONTINUE *
* A0 = 2 2 TO START 2 TO CONTINUE *
* *
* .EQ. NOT 2/1 OR 2/2 CREDIT MODE *
* .NE. IS 2/1 OR 2/2 CREDIT MODE. *
* *
**************************************************************************
CK_2_CRED:
MOVI ADJCSTRT,A0
CALLA GET_ADJ ;HOW MANY TO START
CMPI 2,A0
JRNZ NOT_2 ;NOT 2....RETURN NO MESSAGE.
MOVI ADJCCONT,A0
CALLA GET_ADJ ;GET CONTINUE NUMBER
CMPI 2,A0 ;1 OR 2 THIS IS WHAT WE RETURN
JRHI NOT_2 ;NOT .....CLEAR IT OUT
MOVE A0,A0 ;RETURN .NE. (UNLESS ITS 2/0)
JRUC IS_2
NOT_2:
CLR A0 ;RETURN WRONG MODE
IS_2:
RETS
**************************************************************************
* *
* MENU HANDLING SOFTWARE *
* *
**************************************************************************
**************************************************************************
* *
* FORCE_MAIN *
* *
* THIS IS CALLED TO GET TO MAIN MENU FROM LEVEL FURTHER *
* THAN 1 DOWN. IT SETS THE GLOBAL FLAG "MAIN_RET" *
* NON ZERO. GEN_MENU WILL KEEP RETURNING UNTIL *
* IT GETS BACK TO THE MAIN MENU. *
* *
**************************************************************************
FORCE_MAIN:
MOVK 1,A0 ;POSITIVE NUMBER FORCES MAIN MENU.
MOVE A0,@MAIN_RET,W
RETP ;NOW "RETURN TO THE MENU"
**************************************************************************
* *
* DIAGNOSTIC TESTS SELECTED......SHOW DIAGNOSTIC TEST MENU *
* *
**************************************************************************
GO_DIAG:
MOVI MEN_DIAG,A8 ;PUT UP THE MENU AND GO!
JAUC GEN_MENU ;THIS WILL RETURN TO LEVEL ABOVE US!
**************************************************************************
* *
* COIN BOOKKEEPING SELECTED *
* *
**************************************************************************
GO_BOOK:
CALLA CLR_SCRN
MOVI MES_BOOK,A2
MOVI ROBO_WHITE,A3
JSRP TOP_BOX ;PRINT TITLE BOX.
MOVI COIN_AUDS,A0 ;PUT TABLE UP.
JSRP PRNT_AUD
MOVI AUDLCOIN,A8 ;NOW PRINT MONEY FOR 1ST 3
JSRP PRINT_COL
MOVI COIN1_AUDS,A0 ;PUT TABLE UP.
JSRP PRNT_AUD
; MOVI COIN_A2,A0 ;PUT PART 2 OF THE TABLE THERE.
; JSRP PRNT_AUD
MOVI MEN_DETAIL,A8
MOVI 1,A9 ;CURSOR ON 1ST ENTRY
JSRP B_MENU ;SEE IF THEY WANT PAGE 2.
RETP
; CMPI 1,A8 ;DID WE GET 1'ST ENTRY?
; JRNZ NO_DETAIL ;NOPE...RETURN TO OUR CALLER
;DETAIL_SCREEN:
; CALLA CLR_SCRN ;CLEAR OUT FOR ACTION!
;
; MOVI DT_Y1,A0 ;HEIGHT OF TOP TITLE
; MOVI ROBO_YELLOW,A9 ;COLOR
; CALLA F_TITLE ;FRAME IT
;
; MOVI DT_Y2,A0 ;HEIGHT OF 2ND TITLE
; CALLA F_TITLE ;FRAME IT
;
; MOVI DETAIL_TITLES,A8 ;NO ROOM FOR PRETTY TOP BOX...DO TITLES
; JSRP L_MESS ;ESTABLISH THE TITLES.
;
; MOVI COIN_D1,A0 ;DETAILED AUDIT 1
; JSRP PRNT_AUD ;PRINT IT
;
; MOVI AUDLCOIN,A8 ;NOW PRINT MONEY FOR 1ST 3
; JSRP PRINT_COL
;
; MOVI AUDLCSUB,A8 ;SUB-TOTAL OF TOTAL MONEY
; JSRP PRINT_SUBTOTAL ;PRINT IT.
;
; MOVI COIN_D2,A0 ;DETAILED AUDIT 2
; JSRP PRNT_AUD
;
; MOVI AUDLCDC,A8 ;NOW PRINT MONEY FOR DOOR CLOSED SET
; JSRP PRINT_COL
;
; MOVI AUDLCDCS,A8 ;NOW PRINT SUB-TOTAL FOR DOOR CLOSED
; JSRP PRINT_SUBTOTAL ;THATS IT!
;
; MOVI MEN_CLR_SUB,A8 ;CLEAR SUBTOTAL OR RETURN TO MAIN MENU
; MOVI 2,A9 ;CURSOR ON 2ND ENTRY
; JSRP B_MENU
;
; CMPI 1,A8 ;CHOICE 1 IS CLEAR.....
; JRNZ NO_CLEAR_SUB ;NOPE...RETURN TO CALLER!
;
; MOVI MESS_CLEAR_SUBS,A8 ;CLEAR COIN SUB-TOTALS...ARE YOU SURE
; MOVI CLR_SUBS,A9 ;ROUTINE TO DO IT
; MOVI MESS_SUBS_CLEAR,A10 ;CONFIRMATION.
; JSRP AREUSURE ;ASK EM.
; JRUC DETAIL_SCREEN ;NOW PUT THIS SCREEN BACK UP.
;
;NO_CLEAR_SUB:
;NO_DETAIL:
; RETP ;AND RETURN TO OUR CALLER.
;
;PRINT_SUBTOTAL:
; CALLR ADD_AUDIT_DY ;PUSH THE Y 1 LEVEL
; MOVI T_SUB,A9 ;USE "SUB-TOTAL" MESSAGE
; JAUC PRINT_MONEY ;AND NOW PRINT THE REQUESTED SUM.
**************************************************************************
* *
* GAME AUDITS SELECTED *
* *
**************************************************************************
**************************************************************************
* *
* AUDITS TO BE SHOWN ON GAME AUDITS PAGE: *
* *
* EXTRA MEN *
* GAMES COMPLETED *
* 1 PLAYER MINUTES *
* 2 PLAYER MINUTES *
* TOTAL HOURS PLAYED *
* AVG "PLAYER" GAME TIME *
* AVG. ELAPSED TIME / PLAY *
* *
**************************************************************************
GO_AUD:
CALLA CLR_SCRN
MOVI MES_AUD,A2
MOVI ROBO_CYAN,A3
JSRP TOP_BOX ;PRINT TITLE BOX.
MOVI GAME_AUDS,A0 ;PUT TABLE UP.
JSRP PRNT_AUD
MOVI MEN_AP1,A8 ;AUDIT PAGE 1 MENU
MOVI 1,A9 ;CURSOR ON 1ST ENTRY
JSRP B_MENU ;SEE IF THEY WANT PAGE 2.
CMPI 1,A8 ;DID WE GET 1'ST ENTRY?
JRNZ NO_AP2 ;NOPE...RETURN TO OUR CALLER
CALLA CLR_SCRN
MOVI MES_AUD,A2
MOVI ROBO_CYAN,A3
JSRP TOP_BOX ;PRINT TITLE BOX.
MOVI GAME_AUD2,A0 ;PUT TABLE UP.
JSRP PRNT_AUD
MOVI MEN_AP2,A8
MOVI 2,A9 ;CURSOR ON 2ND ENTRY
JSRP B_MENU ;SEE IF THEY WANT PAGE 2.
CMPI 1,A8 ;DID WE GET 1'ST ENTRY (RETURN TO PAGE 1)
JRZ GO_AUD ;YEP...PUT IT UP!
NO_AP2:
RETP
GO_UTIL:
MOVI MEN_UTIL,A8
JAUC GEN_MENU ;PROCESS THE UTILITY MENU!
*
* INDIVIDUAL UTILITY PROGRAMS
*
DO_CLCRED:
MOVI MESS_CLCRED,A8 ;CLEAR COIN SUB-TOTALS...ARE YOU SURE
MOVI CLR_CREDITS,A9 ;ROUTINE TO DO IT
MOVI MESS_CCCONF,A10 ;CONFIRMATION.
JAUC AREUSURE ;ASK EM......THEN RETURN!
**************************************************************************
* *
* CLR_CREDITS *
* *
* ROUTINE TO CLEAR OUT THE CREDITS POSTED ON THE GAME. *
* *
**************************************************************************
CLR_CREDITS:
CALLA NO_CREDS ;CALL THE ROUTINE THAT DOES IT
RETP
DO_CLCOIN:
MOVI MESS_CLCOIN,A8 ;CLEAR COIN SUB-TOTALS...ARE YOU SURE
MOVI CLR_COINS,A9 ;ROUTINE TO DO IT
MOVI MESS_CCNCONF,A10 ;CONFIRMATION.
JAUC AREUSURE ;ASK EM......THEN RETURN!
CLR_COINS:
MOVI FRST_C,A0
MOVI LAST_C,A1
CALLA CLR_AUDR
RETP
DO_CLAUD:
MOVI MESS_CLAUD,A8 ;CLEAR COIN SUB-TOTALS...ARE YOU SURE
MOVI CLR_AUDITS,A9 ;ROUTINE TO DO IT
MOVI MESS_CAUDCONF,A10 ;CONFIRMATION.
JAUC AREUSURE ;ASK EM......THEN RETURN!
CLR_AUDITS:
MOVI FRSTGAUD,A0
MOVI LASTGAUD,A1
CALLA CLR_AUDR
CALLA DUMP_FS ;AND START THE "DUMP" RECORDS OVER
RETP
DO_HSRES:
MOVI MESS_HSRESET,A8
MOVI HSSOFT,A9
MOVI MESS_HSRCONF,A10
JAUC AREUSURE
HSSOFT:
CALLR RES_ALL
RETP ;PROGRAM TO DO THE JOB!
**************************************************************************
* *
* RES_ALL *
* *
* RESET ALL TIME HIGH SCORE TABLE AND THE *
* HIGH SCORE RESET COUNTER. *
* *
**************************************************************************
RES_ALL:
MOVI ALL_TAB,A8 ;ALWAYS CLEAR OUT TODAYS TABLE
CALLA INIT_TB
CALLA INIT_HSR ;RE-SET THE HIGH SCORE RESET COUNTER
RETS
DO_FACSET:
MOVI MESS_FACSET,A8
MOVK 1,A0
JRUC DEF_ADJ_PART
**************************************************************************
* *
* DO_DEF_ADJ THIS IS CALLED FROM UTILITY MENU TO *
* DO THE DEFAULT ADJUSTMENTS. *
* *
* DEF_ADJ_PART THIS IS CALLED OUT OF THE FULL *
* FACTORY SETTING TO HANDLE THE *
* ADJUSTMENT PART. *
* *
* A8 MUST HAVE THE MESSAGE FOR "ARE YOU SURE" *
* A0 .NE. 0 FOR FULL FACTORY SETTINGS (ON *
* SUCCESS OF ADJUSTMENT PART *
* *
**************************************************************************
DO_DEF_ADJ:
MOVI MESS_DEF_ADJ,A8
CLR A0
DEF_ADJ_PART:
MOVE A0,@FAC_FLAG,W ;INDICATE THIS IS ADJUSTMENTS ONLY
MOVI DEFADJSOFT,A9
MOVI NULL_ST,A10 ;DON'T PRINT ANYTHING....ROUTINE WILL.
JSRP AREUSURE
RETP
DEFADJSOFT:
*
* NOW SMASH THE CHECKSUM
*
CALLA FORM_ADC ;FORM THE CKSUM
MOVE A1,A0 ;PUT IN CMOS WRITING REGGIE
MOVI ADJ_CKSUM,A7
INC A0 ;THIS SMASHES ADJUSTMENTS
CALLA WC_WORD ;AND STORE IT
*
* NOW MAKE SURE ITS SMASHED
*
CALLA CMOS_VAL
JRZ AD_FAIL ;WE CAN'T DO IT.....PRINT FAILURE.
*
* NOW SET THE ADJUSTMENTS TO THE FACTORY VALUE.
*
CALLA FAC_SET ;THIS DOES THE DEED!
CALLA CMOS_VAL ;IS IT OK NOW?
JRNZ AD_FAIL ;NOPE...PRINT FAILURE
MOVI MESS_DEFCONF,A8 ;THIS IS SINGLE MESSAGE
MOVE @FAC_FLAG,A0,W ;DO WE NEED TO CLEAR THE TABLES?
JRZ DAX ;NOPE...POST SINGLE MESSAGE
CALLA CLR_SCRN ;CLEAR THE SCREEN FOR OUR MESSAGES.
CALLR FAC_STUF ;DO AUDITS AND HIGH SCORE TABLE
MOVI MESS_FFSCONF,A8 ;PRINT THE REST OF THE MESSAGES
JSRP L_MESS ;THAT DOES IT!
NOTABS:
RETP
*
* ON A FULL FACTORY SETTING (EITHER REQUESTED OR
* ADJUSTMENT FAILURE) THIS CLEARS THE AUDITS AND
* HIGH SCORE TABLE.
*
FAC_STUF:
CALLA CLR_AUD ;CLEAR AUDITS TOO
CALLR RES_ALL ;ALL TIME TABLE
RETS
AD_FAIL
MOVI MESS_FACFAIL,A8
JRUC DAX
DEF_CAN:
MOVI MESS_CANCELLED,A8
DAX:
CALLA CLR_SCRN
JSRP SUR_MESS
RETP
**************************************************************************
* *
* EXIST_LET *
* *
* IS THE E_INITS PROCESS RUNNING? *
* *
**************************************************************************
EXIST_LET:
MOVI OPMES_PID,A0 ;SETUP FOR THE EXISTP
MOVI 0FFFFH,A1
JAUC EXISTP
**************************************************************************
* *
* BUILD_ST *
* *
* THIS IS CALLED TO TAKE THE STRING POINTED TO *
* BY -A10- AND REMOVE LEADING AND TRAILING BLANKS *
* AND MOVE THE STRING TO "STRNGRAM". *
* *
* RETURN THE NUMBER OF TRAILING BLANKS IN A2. *
* RETURN .EQ. IF ALL BLANK! *
* *
**************************************************************************
BUILD_ST:
MMTM SP,A0,A1,A3,A4,A5,A10
CLR A4 ;A4 = ZERO UNTIL 1ST NON-BLANK
MOVI STRNGRAM-BYTE_SIZE,A5 ;LAST NON-SPACE CHAR
MOVI STRNGRAM,A1 ;DESTINATION POINTER
MOVI CMESS_CHARS,A2 ;CHAR COUNT
BSLOOP:
MOVB *A10,A3 ;FETCH A BYTE
ANDI BYTE_MASK,A3 ;KILL SIGN EXTEND.
JRNZ BS1 ;NOT ZERO
MOVI SPACE,A3 ;REPLACE ZERO WITH SPACE.
BS1:
CMPI SPACE,A3 ;IS IT A SPACE?
JRZ BS2 ;IT IS...
*
* NON-SPACE CHARACTER
*
OR A3,A4 ;INDICATE 1ST NON-BLANK SEEN
MOVE A1,A5 ;INDICATE THIS IS CURRENT TERMINATOR.
JRUC BS3
BS2:
MOVE A4,A4 ;HAS 1ST SPACE BEEN SEEN?
JRZ BS4 ;NOT YET...DON'T STORE
BS3:
MOVB A3,*A1 ;STORE IT IN MEMORY
ADDI BYTE_SIZE,A1 ;PUSH DESTINATION POINTER
BS4:
ADDI BYTE_SIZE,A10 ;PUSH SOURCE POINTER
DSJS A2,BSLOOP ;AND FINISH PARSE
*
* A5 NOW POINTS AT LAST NON-BLANK CHARACTER
*
ADDI BYTE_SIZE,A5 ;THIS IS 1 BEYOND
CLR A2
MOVB A2,*A5 ;TERMINATE WITH A ZERO.
*
* FOR OUR RETURN, WE NEED TO COMPUTE THE NUMBER OF
* TRAILING SPACES IGNORED.
*
MOVE A4,A4 ;ALL BLANK?
JRNZ NOT_BLNK
MOVI CMESS_CHARS,A2 ;ALL CHARS ARE TRAILING BLANKS
JRUC BL_EX ;RETURN THIS
NOT_BLNK:
MOVE A1,A2 ;THIS IS LAST CHAR WE WROTE
SUB A5,A2 ;THIS IS NUMBER OF TRAILING SPACES (TIMES 8)
SRL 3,A2 ;DIVIDE BY 8 TO GET SPACES
BL_EX:
MOVE A4,A4 ;FLAG ZERO FOR ALL BLANK!
MMFM SP,A0,A1,A3,A4,A5,A10
RETS
* A1 = <COLOR><PALETTE>
* A3 = DAG OF AREA [YPOS,XPOS]
* A4 = [Y,X] SIZE OF AREA
GO_RED:
MOVI ROBO_RED,A1
JAUC SC_COL
GO_GREEN:
MOVI ROBO_GREEN,A1
JAUC SC_COL
GO_BLUE:
MOVI ROBO_BLUE,A1
SC_COL:
SLL 16,A1 ;PALETTE 0....COLOR UP HIGH
CLR A3 ;UPPER LEFT
MOVI 19001FFH,A4
CALLA FILLAREA ;THIS DOES THE SCREEN
JAUC WAIT_BUT ;NOW WAIT FOR ANY BUTTON!
GO_CPUTEST:
JAUC CPU_CHK
GO_CROSS:
CALLA SCRCLR
CALLA CROSS_H
JAUC WAIT_BUT ;NOW WAIT FOR ANY BUTTON!
; JSRP WAIT_BUT
; CALLA SCRCLR
; CALLA MYOINIT
; RETP
GO_SWTEST:
CALLA SCRCLR
JSRP SW_CHK
; CALLA SCRCLR
; CALLA MYOINIT
RETP
;GO_ROMTEST:
; JAUC ROM_CHK
GO_BARS:
; MOVI 8000H,A1
; CLR A0
; CALLA KILALL
CALLA SCRCLR
MMTM SP,A12,A13
CALLA COL_BARS
MMFM SP,A12,A13
JAUC WAIT_BUT ;NOW WAIT FOR ANY BUTTON!
; JSRP WAIT_BUT
; CALLA SCRCLR
; CALLA MYOINIT
; CALLA COLRSTRT
; RETP
DO_BURN:
MOVI MESS_BURN,A8 ;CLEAR COIN SUB-TOTALS...ARE YOU SURE
MOVI BURN_IN,A9 ;ENTRY POINT
MOVI MESS_BURN,A10 ;THIS WILL NEVER BE SEEN!
JAUC AREUSURE ;ASK EM.
ANY_BUT:
MOVI ANY_MENU,A8 ;ANY BUTTON TO CONTINUE
MOVI 1,A9 ;CURSOR ON ENTRY 1
JAUC B_MENU ;DO IT....RETURN WHEN PRESSED.
*
* DIAGNOSTIC TESTS
*
*
*SOUND TEST STUFF
*
NCHAN EQU 4 ;DECLARE NUMBER OF ALLOWED CHANNELS
MUSICHAN EQU 3 ;THIS CHANNEL IS FOR THE TUNES
*THESE STROBE EQUATES ARE FOR THE PINBALL SOUND CARD
RESETBIT EQU 0FE00H ;THIS IS THE ^RESET BIT
MUSICBIT EQU 0FD00H ;THIS IS THE YAMAHA SIDE STROBE
SOUNDBIT EQU 0FD00H ;THIS IS THE SOUND SIDE STROBE
GO_STEST:
SNDTST
MOVI SNDMES,A8 ;MESSAGE POINTER
SNDTLP
CALLA SCRCLR
MOVI M_STEST,A0 ;SOUND TEST MESSAGE
MOVI 06080H,A1
CLR A2
MOVI ROBO_WHITE,A3
CALLA STRNEW1
MOVI 0B080H,A1 ;SCREEN ADDRESS
MOVE A8,A0
CALLA STRNEW1
ADDK 8,A0
MOVB *A0,A5
ADDK 8,A0
MOVB *A0,A3
ADDK 8,A0
CALLA SNDSND
MOVE A0,A8
MOVE A13,A13 ;AUTO-CYCLE?
JRNE SNDSLP ;NO
CALLA WDOGDIS
MOVI 3000000,A13
SNDAUTO DSJS A13,SNDAUTO
JRUC SNDSLP1
SNDSLP
SLEEP 120
SNDSLP1
MOVB *A8,A5
JRNE SNDTLP
MOVE A13,A13 ;AUTO CYCLE EXIT
JREQ SNDX1
RETP
SNDX1
RETS
*
*SOUND TABLE
*MESSAGE,CHANNEL,SOUNDCODE
*
SNDMES
.STRING "TUNE 1 SOUND 01",0
.BYTE MUSICHAN,001H
.STRING "NO WAY SOUND 3F",0
.BYTE 0,03FH
.STRING "ELECTROSHOCK SOUND CF",0
.BYTE 0,0CFH
.STRING "TUNE 2 SOUND 09",0
.BYTE MUSICHAN,009H
.STRING "MUSIC OFF SOUND 00",0
.BYTE MUSICHAN,000H
.BYTE 0 ;THE END OF TABLE
.EVEN
**************************************************************************
* *
* MONITOR PATTERNS *
* *
**************************************************************************
GO_PATTERNS:
MOVI MEN_PATTERNS,A8 ;PUT UP THE MENU AND GO!
JAUC GEN_MENU ;THIS WILL RETURN TO LEVEL ABOVE US!
*******************************************************************************
*******************************************************************************
*******************************************************************************
*
* A U D I T D I S P L A Y S
*
*******************************************************************************
*******************************************************************************
*******************************************************************************
**************************************************************************
* *
* AUDIT TABLE STRUCTURE *
* *
**************************************************************************
AUD_MESS EQU 0 ;LONG-PTR TO TEXT
AUD_ROUTINE EQU AUD_MESS+LONG_SIZE ;LONG - NON ZERO MEANS CALL FOR NUMBER
AUD_NUMBER EQU AUD_ROUTINE+LONG_SIZE ;WORD - IF ABOVE ZERO, THEN AUDIT NUMBER
AUD_T_SIZE EQU AUD_NUMBER+WORD_SIZE
AMAC $MACRO MESS,ROUT,AUDIT
.LONG :MESS:
.LONG :ROUT:
.WORD :AUDIT:
$ENDM
AUD_LM EQU TIT_ULX ;SQUARE OFF AUDITS W/ HEADER.
AUD_RM EQU TIT_LRX
AUD_Y_START EQU 39H
AUD_DY EQU 11H
CP2_Y EQU 142 ;PART 2 OF COIN AUDIT PAGE.
*
* TOP HALF OF COIN AUDIT PAGE 1 TABLE
*
COIN_AUDS:
.WORD AUD_Y_START ;Y START
.WORD AUD_DY ;Y BETWEEN ENTRIES
.WORD AUD_LM ;LEFT MARGIN X
.WORD AUD_RM ;RIGHT MARGIN X
AMAC M_LCOIN,0,AUDLCOIN
AMAC M_RCOIN,0,AUDRCOIN
AMAC M_CCOIN,0,AUDCCOIN
AMAC M_XCOIN,0,AUDXCOIN
AMAC M_PAIDC,0,AUDPAIDC
.LONG 0
COIN1_AUDS
.WORD CP2_Y+AUD_DY ;Y START
.WORD AUD_DY ;Y BETWEEN ENTRIES
.WORD AUD_LM ;LEFT MARGIN X
.WORD AUD_RM ;RIGHT MARGIN X
AMAC M_SERV,0,AUDSERV
AMAC M_PLAYS,DOPLAYS,0
AMAC M_HSLEFT,DOHSLEFT,0
.LONG 0
;*
;* BOTTOM HALF OF COIN AUDIT PAGE 1 TABLE
;*
;COIN_A2 .WORD CP2_Y ;Y START
; .WORD AUD_DY ;Y BETWEEN ENTRIES
; .WORD AUD_LM ;LEFT MARGIN X