/
cclimber.cpp
2852 lines (2391 loc) · 146 KB
/
cclimber.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:Nicola Salmoria
/***************************************************************************
Crazy Climber memory map (preliminary)
as described by Lionel Theunissen (lionelth@ozemail.com.au)
Crazy Kong is very similar to Crazy Climber, there is an additional ROM at
5000-5fff and RAM is at 6000-6bff. Dip switches and input connections are
different as well.
Swimmer is similar but also different (e.g. it has two CPUs and two 8910,
graphics are 3bpp instead of 2)
0000h-4fffh ;20k program ROMs. ROM11=0000h
ROM10=1000h
ROM09=2000h
ROM08=3000h
ROM07=4000h
8000h-83ffh ;1k scratchpad RAM.
8800h-88ffh ;256 bytes Bigsprite RAM.
9000h-93ffh ;1k screen RAM.
9800h-981fh ;Column smooth scroll position. Corresponds to each char
column.
9880h-989fh ;Sprite controls. 8 groups of 4 bytes:
1st byte; code/attribute.
Bits 0-5: sprite code.
Bit 6: x invert.
Bit 7: y invert.
2nd byte ;color.
Bits 0-3: colour. (palette scheme 0-15)
Bit 4: 0=charset1, 1 =charset 2.
3rd byte ;y position
4th byte ;x position
98dc bit 0 big sprite priority over sprites? (1 = less priority)
98ddh ;Bigsprite colour/attribute.
Bit 0-2: Big sprite colour.
bit 3 ??
Bit 4: x invert.
Bit 5: y invert.
98deh ;Bigsprite y position.
98dfh ;Bigsprite x position.
9c00h-9fffh ;1/2k colour RAM: Bits 0-3: colour. (palette scheme 0-15)
Bit 4: 0=charset1, 1=charset2.
Bit 5: (not used by CC)
Bit 6: x invert.
Bit 7: y invert. (not used by CC)
a000h ;RD: Player 1 controls.
Bit 0: Left up
1: Left down
2: Left left
3: Left right
4: Right up
5: Right down
6: Right left
7: Right right
a000h ;WR: Non Maskable interrupt.
Bit 0: 0=NMI disable, 1=NMI enable.
a001h ;WR: Horizontal video direction (Crazy Kong sets it to 1).
Bit 0: 0=Normal, 1=invert.
a002h ;WR: Vertical video direction (Crazy Kong sets it to 1).
Bit 0: 0=Normal, 1=invert.
a004h ;WR: Sample trigger.
Bit 0: 0=Trigger.
a800h ;RD: Player 2 controls (table model only).
Bit 0: Left up
1: Left down
2: Left left
3: Left right
4: Right up
5: Right down
6: Right left
7: Right right
a800h ;WR: Sample rate speed.
Full byte value (0-255).
b000h ;RD: DIP switches.
Bit 1,0: Number of climbers.
00=3, 01=4, 10=5, 11=6.
Bit 2: Extra climber bonus.
0=30000, 1=50000.
Bit 3: 1=Test Pattern
Bit 5,4: Coins per credit.
00=1, 01=2, 10=3 11=4.
Bit 7,6: Plays per credit.
00=1, 01=2, 10=3, 11=Freeplay.
b000h ;WR: Sample volume.
Bits 0-5: Volume (0-31).
b800h ;RD: Machine switches.
Bit 0: Coin 1.
Bit 1: Coin 2.
Bit 2: 1 Player start.
Bit 3: 2 Player start.
Bit 4: Upright/table select.
0=table, 1=upright.
I/O 8 ;AY-3-8910 Control Reg.
I/O 9 ;AY-3-8910 Data Write Reg.
I/O C ;AY-3-8910 Data Read Reg.
Port A of the 8910 selects the digital sample to play
Changes:
25 Jan 98 LBO
* Added support for the real Swimmer bigsprite ROMs, courtesy of Gary Walton.
* Increased the IRQs for the Swimmer audio CPU to 4 to make it more "jaunty".
Not sure if this is accurate, but it should be closer.
3 Mar 98 LBO
* Added alternate version of Swimmer.
TODO:
* Verify timings of sound/music on Swimmer.
* Add tms5110 support to bagmanf
-------------------------------------------------------------------
T.S. 17.12.2005:
Yamato:
-------
Added temporary bg gradient (bad colors/offset).
Gradient table are stored in two(?) ROMs.
Each table is 256 bytes long: 128 for normal
and 128 bytes for flipped screen.
Color format is unknown - probably direct RGB
mapping of 8 or 16 (both roms) bits. Also table
selection source is unknown.
At the title screen, it's a solid dark-cyan.
During gameplay, the sky is a cyan gradient, and
the sea is a dark blue gradient. When the player
ship explodes, the sky and sea briefly turn to a
lighter cyan gradient, followed by cyan-pink for
the sky, and purple-red for the sea.
TODO:
- bg gradient color decode & table selection
- music is too fast?
Top Roller:
----------
It's made by the same developers as Yamato (apparently
Falcon) and probably uses the same encrypted SEGA cpu.
lives - $6155
TODO:
- COINB DSW is missing
-------------------------------------------------------------------
Top Roller
Jaleco 1983
PCB Layout
----------
8307-A
JALECO MADE IN JAPAN
|------------------------------------------------|
| 2114 ENCR_Z80 |
|DSW(8) 2114 6116 |-|
| | |
| 7.3D 1.5D | |
|2 8.3F 2.5F | |
|2 9.3H 3.5H 2114 |-|
|W 10.3K 4.5K 2114 |
|A 11.3L 5.5L 2114 |
|Y 6.5M 2114 |-|
| 12.3P 7603.9N| |
| 7603.9P| |
| DSW(4) | |
| LM3900 |-|
|HA1388 VOL AY-3-8910 7611.9S |
|------------------------------------------------|
Notes:
ENCR_Z80 - Encrypted Z80 CPU. Clock 3.00MHz [12/4]. No markings on
the chip but likely made by Sega (possibly 315-5018)
AY3-8910 - Clock 1.50MHz [12/8]
7603 - Harris M3-7603 32 bytes x8-bit (256 bits) bipolar PROM
7611 - Harris M3-7611 256 bytes x4-bit (1k) bipolar PROM
6116 - 2kx8 SRAM
2114 - 1kx4 SRAM
LM3900 - Texas Instruments LM3900 Quad Operational Amplifier
HA1388 - Hitachi HA1388 18W BTL Audio Power Amplifier
HSync - 15.13976kHz
VSync - 59.15182Hz
8307-B
JALECO MADE IN JAPAN
|------------------------------------------------|
|7603.1A 13.4A 2114 |
| 14.4C 2114 |-|
| 2114 | |
| 2114 2114 | |
| 2114 15.4H | |
| 16.4J |-|
| D2125 D2125 |
| D2125 D2125 |
| D2125 D2125 |-|
| | |
| | |
| | |
| 7603.2P |-|
| 7603.2R 12MHz |
|------------------------------------------------|
Notes:
2114 - 1kx4 SRAM
D2125 - 1kx1 SRAM
7603 - Harris M3-7603 32 bytes x8-bit bipolar PROM
----
2008-07
Dip location verified from manual for: cclimber, guzzler, swimmer
Cannon Ball
-----------
The Cannon Ball bootlegs on this Falcon (Crazy Kong) hardware don't correctly
handle the protection device found on the original pacman hardware conversion,
this causes them to crash after the a few rounds - confirmed on an original PCB.
They clearly weren't tested properly by the bootleggers.
***************************************************************************/
#include "emu.h"
#include "cclimber.h"
#include "cclimber_a.h"
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#include "sound/samples.h"
#include "screen.h"
#include "speaker.h"
void cclimber_state::machine_start()
{
save_item(NAME(m_nmi_mask));
}
void cclimber_state::swimmer_sh_soundlatch_w(uint8_t data)
{
m_soundlatch->write(data);
m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80
}
void cclimber_state::yamato_p0_w(uint8_t data)
{
m_yamato_p0 = data;
}
void cclimber_state::yamato_p1_w(uint8_t data)
{
m_yamato_p1 = data;
}
uint8_t cclimber_state::yamato_p0_r()
{
return m_yamato_p0;
}
uint8_t cclimber_state::yamato_p1_r()
{
return m_yamato_p1;
}
void cclimber_state::toprollr_rombank_w(int state)
{
m_toprollr_rombank = m_mainlatch->q5_r() | (m_mainlatch->q6_r() << 1);
if (m_toprollr_rombank < 3) {
membank("bank1")->set_entry(m_toprollr_rombank);
membank("bank1d")->set_entry(m_toprollr_rombank);
}
}
void cclimber_state::nmi_mask_w(int state)
{
m_nmi_mask = state;
}
uint8_t cclimber_state::bagmanf_a000_r()
{
// Should this actually use the same PAL16R6 as the parent set?
return 0x3f;
}
/* Note that River Patrol reads/writes to a000-a4f0. This is a bug in the code.
The instruction at 0x0593 should say LD DE,$8000 */
void cclimber_state::rpatrol_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6bff).ram(); /* Crazy Kong only */
map(0x8000, 0x83ff).ram();
map(0x8800, 0x88ff).ram().share("bigspriteram");
map(0x8900, 0x8bff).ram(); /* not used, but initialized */
map(0x9000, 0x93ff).mirror(0x0400).ram().share("videoram");
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
map(0x9800, 0x981f).ram().share("column_scroll");
map(0x9820, 0x987f).ram(); /* not used, but initialized */
map(0x9880, 0x989f).ram().share("spriteram");
map(0x98a0, 0x98db).ram(); /* not used, but initialized */
map(0x98dc, 0x98df).ram().share("bigspritectrl");
map(0x98e0, 0x9bff).ram(); /* not used, but initialized */
map(0x9c00, 0x9fff).ram().w(FUNC(cclimber_state::cclimber_colorram_w)).share("colorram");
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa000, 0xa000).portr("P1");
map(0xa800, 0xa800).portr("P2");
map(0xb000, 0xb000).portr("DSW");
map(0xb800, 0xb800).portr("SYSTEM");
}
void cclimber_state::cclimber_map(address_map &map)
{
rpatrol_map(map);
map(0xa800, 0xa800).portr("P2").w("cclimber_audio", FUNC(cclimber_audio_device::sample_rate_w));
map(0xb000, 0xb000).portr("DSW").w("cclimber_audio", FUNC(cclimber_audio_device::sample_volume_w));
}
void cclimber_state::decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x5fff).rom().share("decrypted_opcodes");
}
void cclimber_state::cannonb_map(address_map &map)
{
map(0x5045, 0x505f).nopw(); /* do not errorlog this */
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6bff).ram();
map(0x8000, 0x83ff).ram();
map(0x8800, 0x88ff).nopr().writeonly().share("bigspriteram"); /* must not return what's written (game will reset after coin insert if it returns 0xff)*/
// map(0x8900, 0x8bff).writeonly(); /* not used, but initialized */
map(0x9000, 0x93ff).mirror(0x0400).ram().share("videoram");
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
map(0x9800, 0x981f).ram().share("column_scroll");
map(0x9820, 0x987f).ram(); /* not used, but initialized */
map(0x9880, 0x989f).ram().share("spriteram");
map(0x98a0, 0x98db).ram(); /* not used, but initialized */
map(0x98dc, 0x98df).ram().share("bigspritectrl");
map(0x98e0, 0x9bff).ram(); /* not used, but initialized */
map(0x9c00, 0x9fff).ram().w(FUNC(cclimber_state::cclimber_colorram_w)).share("colorram");
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa000, 0xa000).portr("P1");
map(0xa800, 0xa800).portr("P2").w("cclimber_audio", FUNC(cclimber_audio_device::sample_rate_w));
map(0xb000, 0xb000).portr("DSW").w("cclimber_audio", FUNC(cclimber_audio_device::sample_volume_w));
map(0xb800, 0xb800).portr("SYSTEM");
}
void cclimber_state::swimmer_map(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0x8000, 0x87ff).ram();
map(0x8800, 0x88ff).mirror(0x0100).ram().share("bigspriteram");
map(0x9000, 0x93ff).mirror(0x0400).ram().share("videoram");
map(0x9800, 0x981f).writeonly().share("column_scroll");
map(0x9880, 0x989f).writeonly().share("spriteram");
map(0x98fc, 0x98ff).writeonly().share("bigspritectrl");
map(0x9c00, 0x9fff).ram().w(FUNC(cclimber_state::cclimber_colorram_w)).share("colorram");
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa000, 0xa000).portr("P2");
map(0xa800, 0xa800).portr("P1").w(FUNC(cclimber_state::swimmer_sh_soundlatch_w));
map(0xb000, 0xb000).portr("DSW1");
map(0xb800, 0xb800).portr("DSW2").writeonly().share("bgcolor");
map(0xb880, 0xb880).portr("SYSTEM");
}
void cclimber_state::guzzler_map(address_map &map)
{
swimmer_map(map);
map(0xc000, 0xc7ff).ram(); /* ??? used by Guzzler */
map(0xe000, 0xffff).rom(); /* Guzzler only */
}
void cclimber_state::yamato_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6fff).ram();
map(0x7000, 0x7fff).rom();
map(0x8800, 0x88ff).ram().share("bigspriteram");
map(0x8900, 0x8bff).ram(); /* not used, but initialized */
map(0x9000, 0x93ff).mirror(0x0400).ram().share("videoram");
/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
map(0x9800, 0x981f).ram().share("column_scroll");
map(0x9820, 0x987f).ram(); /* not used, but initialized */
map(0x9880, 0x989f).ram().share("spriteram");
map(0x98a0, 0x98db).ram(); /* not used, but initialized */
map(0x98dc, 0x98df).ram().share("bigspritectrl");
map(0x98e0, 0x9bff).ram(); /* not used, but initialized */
map(0x9c00, 0x9fff).ram().w(FUNC(cclimber_state::cclimber_colorram_w)).share("colorram");
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa000, 0xa000).portr("P1");
map(0xa800, 0xa800).portr("P2");
map(0xb000, 0xb000).portr("DSW");
map(0xb800, 0xb800).portr("COIN");
map(0xba00, 0xba00).portr("START"); /* maybe a mirror of b800 */
}
void cclimber_state::yamato_decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x7fff).rom().share("decrypted_opcodes");
}
void cclimber_state::toprollr_map(address_map &map)
{
map(0x0000, 0x5fff).bankr("bank1");
map(0x6000, 0x6bff).ram().share("ram");
map(0x8800, 0x88ff).ram().share("bigspriteram");
map(0x8c00, 0x8fff).ram().share("bg_videoram");
map(0x9000, 0x93ff).ram().share("videoram");
map(0x9400, 0x97ff).ram().share("bg_coloram");
map(0x9800, 0x987f).ram(); /* unused ? */
map(0x9880, 0x995f).ram().share("spriteram");
map(0x99dc, 0x99df).ram().share("bigspritectrl");
map(0x9c00, 0x9fff).ram().w(FUNC(cclimber_state::cclimber_colorram_w)).share("colorram");
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa000, 0xa000).portr("P1");
map(0xa800, 0xa800).portr("P2").w("cclimber_audio", FUNC(cclimber_audio_device::sample_rate_w));
map(0xb000, 0xb000).portr("DSW").w("cclimber_audio", FUNC(cclimber_audio_device::sample_volume_w));
map(0xb800, 0xb800).portr("SYSTEM");
map(0xc000, 0xffff).rom();
}
void cclimber_state::bagmanf_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x6bff).ram(); /* Crazy Kong only */
map(0x8000, 0x8000).portr("P1");
map(0x8800, 0x88ff).ram().share("bigspriteram"); // wrong
map(0x8800, 0x8800).portr("P2");
map(0x8900, 0x8bff).ram(); /* not used, but initialized */
map(0x9000, 0x93ff).ram().share("videoram");
map(0xffe0, 0xffff).ram().share("column_scroll"); // wrong, is this area even connected?
map(0x9800, 0x9bff).ram().share("colorram");
map(0x9800, 0x981f).ram().share("spriteram");
map(0x9800, 0x9800).portr("SYSTEM");
map(0x98dc, 0x98df).ram().share("bigspritectrl"); // wrong
map(0x9c00, 0x9fff).ram(); /* not used, but initialized */
map(0xa000, 0xa000).r(FUNC(cclimber_state::bagmanf_a000_r));
map(0xa000, 0xa007).w(m_mainlatch, FUNC(ls259_device::write_d0));
map(0xa800, 0xa800).nopr().w("cclimber_audio", FUNC(cclimber_audio_device::sample_rate_w));
map(0xb000, 0xb000).portr("DSW").w("cclimber_audio", FUNC(cclimber_audio_device::sample_volume_w));
map(0xb800, 0xb800).nopr();
}
void cclimber_state::toprollr_decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x5fff).bankr("bank1d");
map(0xc000, 0xffff).rom().region("maincpu", 0xc000);
}
void cclimber_state::cclimber_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x08, 0x09).w("cclimber_audio:aysnd", FUNC(ay8910_device::address_data_w));
map(0x0c, 0x0c).r("cclimber_audio:aysnd", FUNC(ay8910_device::data_r));
map(0x0d, 0x0d).nopw();
}
void cclimber_state::rpatrol_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x08, 0x09).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x0c, 0x0c).r("aysnd", FUNC(ay8910_device::data_r));
}
void cclimber_state::yamato_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).w(FUNC(cclimber_state::yamato_p0_w)); /* ??? */
map(0x01, 0x01).w(FUNC(cclimber_state::yamato_p1_w)); /* ??? */
}
void cclimber_state::swimmer_audio_map(address_map &map)
{
map(0x0000, 0x0fff).rom();
map(0x2000, 0x23ff).ram();
map(0x3000, 0x3000).r(m_soundlatch, FUNC(generic_latch_8_device::read));
map(0x4000, 0x4001).ram(); /* ??? */
}
void cclimber_state::yamato_audio_map(address_map &map)
{
map(0x0000, 0x07ff).rom();
map(0x5000, 0x53ff).ram();
}
void cclimber_state::swimmer_audio_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x01).w("ay1", FUNC(ay8910_device::data_address_w));
map(0x80, 0x81).w("ay2", FUNC(ay8910_device::data_address_w));
}
void cclimber_state::yamato_audio_portmap(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x01).w("ay1", FUNC(ay8910_device::address_data_w));
map(0x02, 0x03).w("ay2", FUNC(ay8910_device::address_data_w));
map(0x04, 0x04).r(FUNC(cclimber_state::yamato_p0_r)); /* ??? */
map(0x08, 0x08).r(FUNC(cclimber_state::yamato_p1_r)); /* ??? */
}
static INPUT_PORTS_START( cclimber )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW:!1,!2")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW:!3" ) // Look code at 0x03c4 : 0x8076 is never tested !
PORT_DIPNAME( 0x08, 0x00, "Rack Test (Cheat)" ) PORT_CODE(KEYCODE_F1) PORT_DIPLOCATION("SW:!4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:!5,!6")
PORT_DIPSETTING( 0x30, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW:!7,!8") // Also "Bonus Life" due to code at 0x03d4
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) // Bonus life : 30000 points
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) ) // Bonus life : 50000 points
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) ) // Bonus life : 30000 points
PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) // Bonus life : 50000 points
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
/* Same as 'cclimber' but correct "Bonus Life" Dip Switch */
static INPUT_PORTS_START( cclimberj )
PORT_INCLUDE( cclimber )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:!3")
PORT_DIPSETTING( 0x00, "30000" )
PORT_DIPSETTING( 0x04, "50000" )
INPUT_PORTS_END
static INPUT_PORTS_START( ckong )
PORT_START("P1")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_START("P2")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "7000" )
PORT_DIPSETTING( 0x04, "10000" )
PORT_DIPSETTING( 0x08, "15000" )
PORT_DIPSETTING( 0x0c, "20000" )
PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x70, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x60, DEF_STR( 1C_4C ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( bagmanf )
PORT_INCLUDE( ckong )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2")
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x00, "2C/1C 1C/1C 1C/3C 1C/7C" )
PORT_DIPSETTING( 0x04, "1C/1C 1C/2C 1C/6C 1C/14C" )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5")
PORT_DIPSETTING( 0x18, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x10, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Language ) ) PORT_DIPLOCATION("SW1:6")
PORT_DIPSETTING( 0x20, DEF_STR( English ) )
PORT_DIPSETTING( 0x00, DEF_STR( French ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:7")
PORT_DIPSETTING( 0x40, "30000" )
PORT_DIPSETTING( 0x00, "40000" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) /* Cabinet type set through edge connector, not dip switch (verified on real pcb) */
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
INPUT_PORTS_END
/* Similar to normal Crazy Kong except for the lives per game */
static INPUT_PORTS_START( ckongb )
PORT_INCLUDE( ckong )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPSETTING( 0x02, "3" )
PORT_DIPSETTING( 0x03, "4" )
INPUT_PORTS_END
static INPUT_PORTS_START( ckongb2 )
PORT_INCLUDE( ckong )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPSETTING( 0x01, "3" )
PORT_DIPSETTING( 0x02, "4" )
PORT_DIPSETTING( 0x03, "5" )
INPUT_PORTS_END
static INPUT_PORTS_START( cannonb )
PORT_INCLUDE( ckong )
PORT_MODIFY("P1")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_MODIFY("P2")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x03, "Display" )
PORT_DIPSETTING( 0x03, "Scores and Progession Bars" )
PORT_DIPSETTING( 0x01, "Scores only" )
PORT_DIPSETTING( 0x02, "Progession Bars only" )
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x10, "5" )
PORT_DIPSETTING( 0x18, "6" )
PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME( "Start" )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME( "Select" )
INPUT_PORTS_END
static INPUT_PORTS_START( rpatrol )
PORT_START("P1") /* P2 controls but we use cclimber tags */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x3e, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_START("P2") /* P1 controls but we use cclimber tags */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x3e, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x03, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x0c, "6" )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x20, 0x00, "Unknown 1" ) /* Probably unused */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, "Unknown 2" ) /* Probably unused */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Memory Test" )
PORT_DIPSETTING( 0x00, "Retry on Error" )
PORT_DIPSETTING( 0x80, "Stop on Error" )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( swimmer )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW A:!1,!2")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "Infinite (Cheat)")
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW A:!3,!4")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x04, "20000" )
PORT_DIPSETTING( 0x08, "30000" )
PORT_DIPSETTING( 0x0c, DEF_STR( None ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:!5,!6")
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW A:!7,!8")
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) )
PORT_START("DSW2")
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:!1")
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW B:!2")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:!3,!4")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) // labeled this way for similarities with 'swimmerb'
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) // labeled this way for similarities with 'swimmerb'
PORT_DIPSETTING( 0x80, DEF_STR( Harder ) )
PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
/* Same as 'swimmer' but different "Difficulty" Dip Switch */
static INPUT_PORTS_START( swimmerb )
PORT_INCLUDE( swimmer )
PORT_MODIFY("DSW2")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:!3")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // SW B:!4
INPUT_PORTS_END
static INPUT_PORTS_START( guzzler )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW A:!1,!2")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "Infinite (Cheat)")
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW A:!3,!4")
PORT_DIPSETTING( 0x04, "20K, every 50K" )
PORT_DIPSETTING( 0x00, "30K, every 100K" )
PORT_DIPSETTING( 0x08, "30K only" )
PORT_DIPSETTING( 0x0c, DEF_STR( None ) )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW A:!5,!6")
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW A:!7,!8")
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x80, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_6C ) )
PORT_START("DSW2")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW B:!1")
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x20, 0x00, "High Score Names" ) PORT_DIPLOCATION("SW B:!2")
PORT_DIPSETTING( 0x20, "3 Letters" )
PORT_DIPSETTING( 0x00, "10 Letters" )
PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW B:!3,!4")
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x40, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x80, DEF_STR( Hard ) )
PORT_DIPSETTING( 0xc0, DEF_STR( Hardest ) )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( yamato )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x18, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x14, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x1c, DEF_STR( Free_Play ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "Every 30000" )
PORT_DIPSETTING( 0x20, "Every 50000" )
PORT_DIPNAME( 0x40, 0x00, "Speed" )
PORT_DIPSETTING( 0x00, "Slow" )
PORT_DIPSETTING( 0x40, "Fast" )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) /* set 1 only */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 ) /* set 1 only */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("START")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( toprollr )
PORT_START("P1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_START("P2")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_START("DSW")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 4C_1C ) )