/
mcr68.cpp
1683 lines (1385 loc) · 82.6 KB
/
mcr68.cpp
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
// license:BSD-3-Clause
// copyright-holders:Aaron Giles, Bryan McPhail
/***************************************************************************
Midway MCR-68k system
driver by Bryan McPhail, Aaron Giles
Games supported:
* Xenopohobe (Sounds Good)
* Spy Hunter II (Sounds Good/Turbo Cheap Squeak)
* Blasted (Sounds Good)
* Arch Rivals
* Tri-Sports
* Pigskin 621AD
Known bugs:
* none at this time
Clock Crystals:
* Xenophobe
- CPU/Video Board: XTAL 16.000MHz at 1D, XTAL 20.000MHz at 1F
- Sound Board: XTAL 16.000MHz
Spy Hunter II reads its extra analog inputs through the "Reflective
Sensor Control" board (A084-91854-B000), which is also used by Max RPM.
****************************************************************************
Memory map
****************************************************************************
========================================================================
CPU #1
========================================================================
000000-03FFFF R xxxxxxxx xxxxxxxx Program ROM
060000-063FFF R/W xxxxxxxx xxxxxxxx Program RAM
070000-070FFF R/W xxxxxxxx xxxxxxxx Background video RAM
071000-071FFF R/W xxxxxxxx xxxxxxxx Additional RAM
080000-080FFF R/W xxxxxxxx xxxxxxxx Sprite RAM
090000-0900FF W xxxxxxxx xxxxxxxx Palette RAM
0A0000-0A000F R/W xxxxxxxx -------- M6840 I/O
0B0000-0B0001 W -------- -------- Watchdog
0C0000-0C0001 W -------- xxxxxxxx Sound I/O
0D0000-0D0001 R xxxxxxxx xxxxxxxx External inputs
0E0000-0E0001 R xxxxxxxx xxxxxxxx External inputs
0F0000-0F0001 R xxxxxxxx xxxxxxxx External inputs
========================================================================
Interrupts:
NMI ???
INT generated by CTC
========================================================================
NOTE: Pigskin and Tri-Sports have similar memory maps; the addresses
are simply shuffled around
========================================================================
***************************************************************************/
#include "emu.h"
#include "mcr68.h"
#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
#include "emupal.h"
#include "speaker.h"
/*************************************
*
* Xenophobe-specific handlers
*
*************************************/
void mcr68_state::xenophobe_control_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_control_word);
// m_sounds_good->reset_write(~m_control_word & 0x0020);
m_sounds_good->write(((m_control_word & 0x000f) << 1) | ((m_control_word & 0x0010) >> 4));
}
/*************************************
*
* Blasted-specific handlers
*
*************************************/
void mcr68_state::blasted_control_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_control_word);
// m_sounds_good->reset_write(~m_control_word & 0x0020);
m_sounds_good->write((m_control_word >> 8) & 0x1f);
}
/*************************************
*
* Spy Hunter II-specific handlers
*
*************************************/
uint16_t mcr68_state::spyhunt2_port_0_r()
{
int result = ioport("IN0")->read();
int analog = m_adc->read();
return result | ((m_sounds_good->read() & 1) << 5) | (analog << 8);
}
uint16_t mcr68_state::spyhunt2_port_1_r()
{
int result = ioport("IN1")->read();
return result | ((m_turbo_cheap_squeak->read() & 1) << 7);
}
void mcr68_state::spyhunt2_control_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
COMBINE_DATA(&m_control_word);
// m_turbo_cheap_squeak->reset_write(~m_control_word & 0x0080);
m_turbo_cheap_squeak->write((m_control_word >> 8) & 0x001f);
m_sounds_good->reset_write(~m_control_word & 0x2000);
m_sounds_good->write((m_control_word >> 8) & 0x001f);
m_adc->write((m_control_word >> 3) & 0x0f);
}
/*************************************
*
* Arch Rivals-specific handlers
*
*************************************/
/*
* Williams 49-way joystick
*
* The joystick works on a 7x7 grid system:
*
* + + + | + + +
* + + + | + + +
* + + + | + + +
* ------+------
* + + + | + + +
* + + + | + + +
* + + + | + + +
*
* Each axis has 7 positions, reported as follows
* in 4 bits/axis:
*
* 0111 = left/up full
* 0011 = left/up 2/3
* 0001 = left/up 1/3
* 0000 = center
* 1100 = right/down 1/3
* 1110 = right/down 2/3
* 1111 = right/down full
*/
static const uint8_t translate49[7] = { 0x7, 0x3, 0x1, 0x0, 0xc, 0xe, 0xf };
uint16_t mcr68_state::archrivl_port_1_r()
{
return (translate49[ioport("49WAYY2")->read() >> 4] << 12) |
(translate49[ioport("49WAYX2")->read() >> 4] << 8) |
(translate49[ioport("49WAYY1")->read() >> 4] << 4) |
(translate49[ioport("49WAYX1")->read() >> 4] << 0);
}
void mcr68_state::archrivl_control_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
// the arch rivals schematics are terrible here, but some information can be gathered from pages 30 and 42
// the bits here seem to have the following functions:
// code: D0-D7 go to sound board pins 3-10
// code: D8 goes to sound board pin 13 (/STB)
// guess: D9 goes to sound board pin 12 (/STBR) ? (/STBR is usually an output, not an input?)
// code: D10 goes to sound board pin 18 (/RESET)
// guess: D11 is n/c (may control the SPARE pin on J3 pin 13)
// guess: D12 is n/c
// schems: D13 goes to coin meter 1 (second meter)
// schems: D14 is SCREENFLIP
// schems: D15 goes to coin meter 0 (first meter)
COMBINE_DATA(&m_control_word);
m_bg->resetq_w(BIT(m_control_word, 10));
m_bg->data_w(m_control_word & 0xff);
m_bg->ctrl_w(BIT(m_control_word, 8));
m_bg->extra_w(BIT(m_control_word, 9));
///TODO: coin meters; do the games even use these?
///TODO: flipscreen; this is actually quite complex, involving many PLDs/pals
}
/*************************************
*
* Pigskin-specific handlers
*
*************************************/
void mcr68_state::pigskin_protection_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
// ignore upper-byte only
if (ACCESSING_BITS_0_7)
{
// track the last 5 bytes
m_protection_data[0] = m_protection_data[1];
m_protection_data[1] = m_protection_data[2];
m_protection_data[2] = m_protection_data[3];
m_protection_data[3] = m_protection_data[4];
m_protection_data[4] = data & 0xff;
logerror("%06X:protection_w=%02X\n", m_maincpu->pcbase(), data & 0xff);
}
}
uint16_t mcr68_state::pigskin_protection_r()
{
// based on the last 5 bytes return a value
if (m_protection_data[4] == 0xe3 && m_protection_data[3] == 0x94)
return 0x00; // must be <= 1
if (m_protection_data[4] == 0xc7 && m_protection_data[3] == 0x7b && m_protection_data[2] == 0x36)
return 0x00; // must be <= 1
if (m_protection_data[4] == 0xc7 && m_protection_data[3] == 0x7b)
return 0x07; // must be > 5
if (m_protection_data[4] == 0xc7 && m_protection_data[3] == 0x1f && m_protection_data[2] == 0x03 &&
m_protection_data[1] == 0x25 && m_protection_data[0] == 0x36)
return 0x00; // must be < 3
logerror("Protection read after unrecognized sequence: %02X %02X %02X %02X %02X\n",
m_protection_data[0], m_protection_data[1], m_protection_data[2], m_protection_data[3], m_protection_data[4]);
return 0x00;
}
uint16_t mcr68_state::pigskin_port_1_r()
{
// See archrivl_port_1_r for 49-way joystick description
return ioport("IN1")->read() |
(translate49[ioport("49WAYX1")->read() >> 4] << 12) |
(translate49[ioport("49WAYY1")->read() >> 4] << 8);
}
uint16_t mcr68_state::pigskin_port_2_r()
{
// See archrivl_port_1_r for 49-way joystick description
return ioport("DSW")->read() |
(translate49[ioport("49WAYX2")->read() >> 4] << 12) |
(translate49[ioport("49WAYY2")->read() >> 4] << 8);
}
/*************************************
*
* Tri-Sports-specific handlers
*
*************************************/
uint16_t mcr68_state::trisport_port_1_r()
{
int xaxis = (int8_t)ioport("AN1")->read();
int yaxis = (int8_t)ioport("AN2")->read();
int result = ioport("IN1")->read();
result |= (xaxis & 0x3c) << 6;
result |= (yaxis & 0x3c) << 10;
return result;
}
/*************************************
*
* Main CPU memory handlers
*
*************************************/
void mcr68_state::mcr68_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0x1fffff);
map(0x000000, 0x03ffff).rom();
map(0x060000, 0x063fff).ram();
map(0x070000, 0x070fff).ram().w(FUNC(mcr68_state::mcr68_videoram_w)).share("videoram");
map(0x071000, 0x071fff).ram();
map(0x080000, 0x080fff).ram().share("spriteram");
map(0x090000, 0x09007f).w("palette", FUNC(palette_device::write16)).share("palette");
map(0x0a0000, 0x0a000f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0x00ff).cswidth(16);
map(0x0b0000, 0x0bffff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x0d0000, 0x0dffff).portr("IN0");
map(0x0e0000, 0x0effff).portr("IN1");
map(0x0f0000, 0x0fffff).portr("DSW");
}
/*************************************
*
* Pigskin CPU memory handlers
*
*************************************/
void mcr68_state::pigskin_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0x1fffff);
map(0x000000, 0x03ffff).rom();
map(0x080000, 0x08ffff).r(FUNC(mcr68_state::pigskin_port_1_r));
map(0x0a0000, 0x0affff).r(FUNC(mcr68_state::pigskin_port_2_r));
map(0x0c0000, 0x0c007f).w("palette", FUNC(palette_device::write16)).share("palette");
map(0x0e0000, 0x0effff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x100000, 0x100fff).ram().w(FUNC(mcr68_state::mcr68_videoram_w)).share("videoram");
map(0x120000, 0x120001).rw(FUNC(mcr68_state::pigskin_protection_r), FUNC(mcr68_state::pigskin_protection_w));
map(0x140000, 0x143fff).ram();
map(0x160000, 0x1607ff).ram().share("spriteram");
map(0x180000, 0x18000f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0xff00);
map(0x1a0000, 0x1affff).w(FUNC(mcr68_state::archrivl_control_w));
map(0x1e0000, 0x1effff).portr("IN0");
}
/*************************************
*
* Tri-Sports CPU memory handlers
*
*************************************/
void mcr68_state::trisport_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0x1fffff);
map(0x000000, 0x03ffff).rom();
map(0x080000, 0x08ffff).r(FUNC(mcr68_state::trisport_port_1_r));
map(0x0a0000, 0x0affff).portr("DSW");
map(0x100000, 0x103fff).ram().share("nvram");
map(0x120000, 0x12007f).w("palette", FUNC(palette_device::write16)).share("palette");
map(0x140000, 0x1407ff).ram().share("spriteram");
map(0x160000, 0x160fff).ram().w(FUNC(mcr68_state::mcr68_videoram_w)).share("videoram");
map(0x180000, 0x18000f).rw(m_ptm, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write)).umask16(0xff00);
map(0x1a0000, 0x1affff).w(FUNC(mcr68_state::archrivl_control_w));
map(0x1c0000, 0x1cffff).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
map(0x1e0000, 0x1effff).portr("IN0");
}
/*************************************
*
* Port definitions
*
*************************************/
static INPUT_PORTS_START( xenophob )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0018, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW") // There are actually 10 switches, but where do 9 & 10 map to?? (10=Freeze Screen)
PORT_DIPUNUSED_DIPLOC( 0x0001, IP_ACTIVE_LOW, "SW1:1" )
PORT_DIPUNUSED_DIPLOC( 0x0002, IP_ACTIVE_LOW, "SW1:2" )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0008, 0x0008, "Coins per Life Unit" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x0008, "1" )
PORT_DIPSETTING( 0x0000, "2" )
PORT_DIPNAME( 0x0010, 0x0010, "Life Unit" ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x0010, "1000" )
PORT_DIPSETTING( 0x0000, "2000" )
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
PORT_DIPNAME( 0x00c0, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:7,8")
PORT_DIPSETTING( 0x0040, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x0080, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00c0, "Medium (duplicate)" )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( spyhunt2 )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) // SG status
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // Oddly enough, if you assign this control to a key, it makes both player wheels go left to fifteen
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME ("P2 1st Gear") // 1st gear
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME ("P2 2nd Gear") // 2nd gear
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME ("P2 3rd Gear") // 3rd gear
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1) PORT_NAME ("P1 1st Gear") // 1st gear
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1) PORT_NAME ("P1 2nd Gear") // 2nd gear
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(1) PORT_NAME ("P1 3rd Gear") // 3rd gear
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) // TCS status
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME ("P2 L Trigger") // Left Trigger
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME ("P2 L Button") // Left Button
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME ("P2 R Trigger") // Right Trigger
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME ("P2 R Button") // Right Button
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME ("P1 L Trigger") // Left Trigger
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME ("P1 L Button") // Left Button
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME ("P1 R Trigger") // Right Trigger
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME ("P1 R Button") // Right Button
PORT_START("DSW") // Dipswitches
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0000, "1C/2C (duplicate)" )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0018, 0x0008, "Point Thresholds" ) PORT_DIPLOCATION("SW1:4,5")
PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0018, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x0010, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x0060, 0x0060, "Free Timer After" ) PORT_DIPLOCATION("SW1:6,7")
PORT_DIPSETTING( 0x0000, "30 sec" )
PORT_DIPSETTING( 0x0040, "45 sec" )
PORT_DIPSETTING( 0x0060, "60 sec" )
PORT_DIPSETTING( 0x0020, "90 sec" )
PORT_DIPNAME( 0x0080, 0x0080, "Rack Advance (Cheat)" ) PORT_CODE(KEYCODE_F1) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN1") // Analog ports for steering and pedals
PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(0x30,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2)
PORT_START("AN2")
PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(0x30,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
PORT_START("AN3")
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(80) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2)
PORT_START("AN4")
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(80) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(1)
INPUT_PORTS_END
static INPUT_PORTS_START( blasted )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED /* credit w/bill */ )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED /* credit 1 w/bill */ )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED /* credit 2 w/bill */ )
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0000, "1C/2C (duplicate)" )
PORT_DIPNAME( 0x000c, 0x0000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x0008, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x000c, "Medium (duplicate)" )
PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW1:5" )
PORT_DIPNAME( 0x0020, 0x0020, "Dollar Receptor" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Rack Advance (Cheat)" ) PORT_CODE(KEYCODE_F1) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( intlaser )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
PORT_START("DSW")
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0000, "1C/1C (duplicate)" )
PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" )
PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" )
PORT_DIPUNUSED_DIPLOC( 0x0010, IP_ACTIVE_LOW, "SW1:5" )
PORT_DIPUNUSED_DIPLOC( 0x0020, IP_ACTIVE_LOW, "SW1:6" )
PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW1:7" )
PORT_DIPNAME( 0x0080, 0x0080, "Rack Advance (Cheat)" ) PORT_CODE(KEYCODE_F1) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( archrivl )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_START("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED ) // Player 1/2 joysticks go here
PORT_START("DSW") // There are actually 10 switches; 9 is unconnected, 10 (freeze) connects to a PAL and disables the watchdog
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0003, "Preset Time" )
PORT_DIPSETTING( 0x0002, "Preset + 10sec" )
PORT_DIPSETTING( 0x0001, "Preset + 20sec" )
PORT_DIPSETTING( 0x0000, "Preset + 30sec" )
PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4,5")
PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0018, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x0020, 0x0020, "Team Names" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, "Default" )
PORT_DIPSETTING( 0x0000, "Hometown Heroes" )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("49WAYX1") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_PLAYER(1) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
PORT_START("49WAYY1") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_PLAYER(1) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
PORT_START("49WAYX2") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_PLAYER(2) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
PORT_START("49WAYY2") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_PLAYER(2) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
INPUT_PORTS_END
static INPUT_PORTS_START( archrivlb )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_START("IN1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_START("DSW") // There are actually 10 switches; 9 is unconnected, 10 (freeze) connects to a PAL and disables the watchdog on the non-bootleg hardware, unclear here
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0003, "Preset Time" )
PORT_DIPSETTING( 0x0002, "Preset + 10sec" )
PORT_DIPSETTING( 0x0001, "Preset + 20sec" )
PORT_DIPSETTING( 0x0000, "Preset + 30sec" )
PORT_DIPNAME( 0x001c, 0x001c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4,5")
PORT_DIPSETTING( 0x0014, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0018, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x001c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0008, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x0020, 0x0020, "Team Names" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, "Default" )
PORT_DIPSETTING( 0x0000, "Hometown Heroes" )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( pigskin )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x0020, IP_ACTIVE_LOW )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED ) // Player 1 joystick goes here
PORT_START("DSW") // There are actually 10 switches; 9 is unconnected, 10 (freeze) connects to a PAL and disables the watchdog
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Game_Time ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0000, "Shortest" )
PORT_DIPSETTING( 0x0002, "Short" )
PORT_DIPSETTING( 0x0003, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x0001, "Long" )
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x0008, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x000c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:3,4")
PORT_DIPSETTING( 0x0004, "Set Your Own" )
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5")
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0010, DEF_STR( On ) )
PORT_DIPNAME( 0x0020, 0x0020, "Test Switch" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, "Coin Chutes" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0000, "Individual" )
PORT_DIPSETTING( 0x0040, "Common" )
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Joystick ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Standard ) )
PORT_DIPSETTING( 0x0000, "Rotated" )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED ) // Player 2 joystick goes here
PORT_START("49WAYX1") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_PLAYER(1) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE
PORT_START("49WAYY1") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_PLAYER(1) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
PORT_START("49WAYX2") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_X ) PORT_PLAYER(2) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_REVERSE
PORT_START("49WAYY2") // Converted to standard 49-way inputs
PORT_BIT( 0xff, 0x38, IPT_AD_STICK_Y ) PORT_PLAYER(2) PORT_MINMAX(0x00,0x6f) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
INPUT_PORTS_END
static INPUT_PORTS_START( trisport )
PORT_START("IN0")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x0020, IP_ACTIVE_LOW )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED ) // Analog controls go here
PORT_START("DSW") // There are actually 10 switches; 9 is unconnected, 10 (freeze) connects to a PAL and disables the watchdog
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3")
PORT_DIPSETTING( 0x0002, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0003, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0005, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x0001, DEF_STR( Free_Play ) )
PORT_DIPSETTING( 0x0000, "Battery Options" )
PORT_DIPNAME( 0x0018, 0x0018, "Pool Turns" ) PORT_DIPLOCATION("SW1:4,5")
PORT_DIPSETTING( 0x0010, "5" )
PORT_DIPSETTING( 0x0008, "6" )
PORT_DIPSETTING( 0x0018, "7" )
PORT_DIPSETTING( 0x0000, "8" )
PORT_DIPNAME( 0x0020, 0x0020, "Bowling Difficulty" ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Standard ) )
PORT_DIPSETTING( 0x0000, "Advanced" )
PORT_DIPNAME( 0x0040, 0x0040, "Shot Timer" ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x0000, "Slower" )
PORT_DIPSETTING( 0x0040, DEF_STR( Standard ) )
PORT_DIPNAME( 0x0080, 0x0080, "Golf Holes" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x0080, "3" )
PORT_DIPSETTING( 0x0000, "4" )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN1")
PORT_BIT( 0xff, 0, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_PLAYER(1)
PORT_START("AN2")
PORT_BIT( 0xff, 0, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_REVERSE PORT_PLAYER(1)
INPUT_PORTS_END
/*************************************
*
* Graphics definitions
*
*************************************/
static const gfx_layout mcr68_bg_layout =
{
8,8,
RGN_FRAC(1,2),
4,
{ STEP2(RGN_FRAC(1,2),1), STEP2(RGN_FRAC(0,2),1) },
{ STEP8(0,2) },
{ STEP8(0,16) },
16*8
};
static const gfx_layout mcr68_sprite_layout =
{
32,32,
RGN_FRAC(1,4),
4,
{ STEP4(0,1) },
{ STEP2(RGN_FRAC(0,4)+0,4), STEP2(RGN_FRAC(1,4)+0,4), STEP2(RGN_FRAC(2,4)+0,4), STEP2(RGN_FRAC(3,4)+0,4),
STEP2(RGN_FRAC(0,4)+8,4), STEP2(RGN_FRAC(1,4)+8,4), STEP2(RGN_FRAC(2,4)+8,4), STEP2(RGN_FRAC(3,4)+8,4),
STEP2(RGN_FRAC(0,4)+16,4), STEP2(RGN_FRAC(1,4)+16,4), STEP2(RGN_FRAC(2,4)+16,4), STEP2(RGN_FRAC(3,4)+16,4),
STEP2(RGN_FRAC(0,4)+24,4), STEP2(RGN_FRAC(1,4)+24,4), STEP2(RGN_FRAC(2,4)+24,4), STEP2(RGN_FRAC(3,4)+24,4) },
{ STEP32(0,32) },
32*32
};
static GFXDECODE_START( gfx_mcr68 )
GFXDECODE_SCALE( "gfx1", 0, mcr68_bg_layout, 0, 4, 2, 2 )
GFXDECODE_ENTRY( "gfx2", 0, mcr68_sprite_layout, 0, 4 )
GFXDECODE_END
/*************************************
*
* Machine drivers
*
*************************************/
/*=================================================================
Timing for these games is crucial. They all use the 6840 timer
to preemptively multitask during each frame. The clock on the
6840 timer is taken from the 68000's E clock, which runs at
1/10th the speed of the 68000 itself.
All the games run in a sequence of six steps per frame, using
counter 1 on the 6840 to time each step. The sum total of the
6 programmed steps for each game determines how many E clocks
should be generated per frame, which in turn determines the
clock we should expect the CPU to have.
Ideal CPU timings, based on counter usage:
Xenophobe: 7723800
Spy Hunter II:7723800
Blasted: 7798800
Arch Rivals: 7799100
Pigskin: 9211200
Tri-Sports: 9211200
Currently, we are using the Xenophobe CPU for the first four
until we spot problems.
=================================================================*/
void mcr68_state::mcr68(machine_config &config)
{
// Basic machine hardware
M68000(config, m_maincpu, 7723800);
m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::mcr68_map);
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8);
PTM6840(config, m_ptm, 7723800 / 10);
m_ptm->irq_callback().set_inputline("maincpu", 2);
// Video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(30);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */ );
m_screen->set_size(32*16, 30*16);
m_screen->set_visarea(0, 32*16-1, 0, 30*16-1);
m_screen->set_screen_update(FUNC(mcr68_state::screen_update_mcr68));
m_screen->set_palette("palette");
TIMER(config, "scantimer").configure_scanline(FUNC(mcr68_state::scanline_cb), "screen", 0, 1);
GFXDECODE(config, m_gfxdecode, "palette", gfx_mcr68);
PALETTE(config, "palette").set_format(palette_device::xRBG_333, 64);
// Sound hardware -- determined by specific machine
SPEAKER(config, "speaker").front_center();
}
void mcr68_state::xenophob(machine_config &config)
{
mcr68(config);
// Basic machine hardware
MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 1.0);
}
void mcr68_state::intlaser(machine_config &config)
{
mcr68(config);
// Basic machine hardware
MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 1.0);
subdevice<watchdog_timer_device>("watchdog")->set_vblank_count("screen", 800);
}
void mcr68_state::spyhunt2(machine_config &config)
{
mcr68(config);
// Basic machine hardware
MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 0.5);
MIDWAY_TURBO_CHEAP_SQUEAK(config, m_turbo_cheap_squeak).add_route(ALL_OUTPUTS, "speaker", 0.5);
ADC0844(config, m_adc);
m_adc->ch1_callback().set_ioport("AN1");
m_adc->ch2_callback().set_ioport("AN2");
m_adc->ch3_callback().set_ioport("AN3");
m_adc->ch4_callback().set_ioport("AN4");
}
void mcr68_state::archrivl(machine_config &config)
{
mcr68(config);
// Basic machine hardware
S11_BG(config, m_bg).add_route(ALL_OUTPUTS, "speaker", 1.0); // uses a D-11581 w/o W10/W11 jumpers, older mix resistors
// The schematics actually imply on the parts list that this may use the even older mix resistors from the D-1129x board
// but the actual schematic shows the D-11581 resistors. This may be worth checking from an original board.
}
void mcr68_state::pigskin(machine_config &config)
{
mcr68(config);
// Basic machine hardware
S11C_BG(config, m_bg).add_route(ALL_OUTPUTS, "speaker", 1.0); // uses a D-11581-4xxx w/ W10/W11 jumpers, newer mix resistors
m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::pigskin_map);
}