/
taitosj.cpp
2927 lines (2555 loc) · 156 KB
/
taitosj.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
/***************************************************************************
Taito SJ system
Memory map
----------
MAIN CPU:
Address Dir Data Name Description
---------------- --- -------- ---------- -----------------------
000xxxxxxxxxxxxx R xxxxxxxx ROM5 program ROM
001xxxxxxxxxxxxx R xxxxxxxx ROM6 program ROM
010xxxxxxxxxxxxx R xxxxxxxx ROM7 program ROM
011xxxxxxxxxxxxx R xxxxxxxx ROM8/ROM9 program ROM (banked)
10000xxxxxxxxxxx R/W xxxxxxxx SRAMRQ work RAM
10001----------0 R xxxxxxxx 8800 68705 data read
10001----------1 R -------x 68ACCEPT the 68705 has read data from the Z80
10001----------1 R ------x- 68READY the 68705 has written data for the Z80
10001----------0 W xxxxxxxx 68705 data write [3]
10001----------1 W -------- ZINTRQ trigger IRQ on 68705 [3]
1001xxxxxxxxxxxx R/W xxxxxxxx CDR1-2 character generator RAM
101xxxxxxxxxxxxx R/W xxxxxxxx CDR3-6 character generator RAM
1100xxxxxxxxxxxx R/W xxxxxxxx CHARQ tilemap RAM [4]
11010000xxxxxxxx R/W xxxxxxxx SCRRQ tilemap column scroll
11010001xxxxxxxx R/W xxxxxxxx OBJRQ sprites RAM [1]
11010010-xxxxxx0 W -------x VCRRQ palette chip (93419)
11010010-xxxxxx1 W xxxxxxxx VCRRQ palette chip (93419)
11010011-------- W ---xxxxx PRY priority control [2]
11010100----0000 R xxxxxxxx H0-H7 sprite 0..7 collided with a previous one
11010100----0001 R xxxxxxxx H8-H15 sprite 8..15 collided with a previous one
11010100----0010 R xxxxxxxx H16-H23 sprite 16..23 collided with a previous one
11010100----0011 R -------x OB1 sprite/tilemap 1 collision
11010100----0011 R ------x- OB2 sprite/tilemap 2 collision
11010100----0011 R -----x-- OB3 sprite/tilemap 3 collision
11010100----0011 R ----x--- S12 tilemap 1/tilemap 2 collision
11010100----0011 R ---x---- S13 tilemap 1/tilemap 3 collision
11010100----0011 R --x----- S23 tilemap 2/tilemap 3 collision
11010100----0011 R 00------ always 0
11010100----01-- R xxxxxxxx EXRHR read contents of graphics ROMs (address selected by d509-d50a)
11010100----1000 R 11xxxxxx IN0 digital inputs
11010100----1001 R 11xxxxxx IN1 digital inputs
11010100----1010 R xxxxxxxx DP0 dip switch A
11010100----1011 R --xxxxxx IN3 come from a PAL (ROM6 @ 14)
11010100----1011 R xx------ IN3 digital inputs
11010100----1100 R xxxxxxxx IN4 digital inputs
11010100----1101 R ----xxxx IN5 digital inputs
11010100----1101 R xxxx---- IN5 from AY-3-8910 #2 port A (status from sound CPU)
11010100----111x R/W xxxxxxxx READIN AY-3-8910 #0
11010101----0000 W xxxxxxxx SPH1 tilemap 1 H scroll
11010101----0001 W xxxxxxxx SPV1 tilemap 1 V scroll
11010101----0010 W xxxxxxxx SPH2 tilemap 2 H scroll
11010101----0011 W xxxxxxxx SPV2 tilemap 2 V scroll
11010101----0100 W xxxxxxxx SPH3 tilemap 3 H scroll
11010101----0101 W xxxxxxxx SPV3 tilemap 3 V scroll
11010101----0110 W -----xxx MD1 tilemap 1 color code
11010101----0110 W ----x--- CCH1 tilemap 1 char bank
11010101----0110 W -xxx---- MD2 tilemap 2 color code
11010101----0110 W x------- CCH2 tilemap 2 char bank
11010101----0111 W -----xxx MD3 tilemap 3 color code
11010101----0111 W ----x--- CCH3 tilemap 3 char bank
11010101----0111 W --xx---- MD0 sprite color bank
11010101----0111 W xx------ n.c.
11010101----1000 W -------- HTCLR clear hardware collision detection registers
11010101----1001 W xxxxxxxx EXROM1 low 8 bits of address to read from graphics ROMs
11010101----1010 W xxxxxxxx EXROM2 high 8 bits of address to read from graphics ROMs
11010101----1011 W xxxxxxxx EPORT1 command to sound CPU
11010101----1100 W -------x EPORT2 single bit signal to audio CPU (used in jungle hunt to disable music in attract mode)
11010101----1101 W -------- TIME RESET watchdog reset
11010101----1110 W -------x COIN LOCK coin lockout
11010101----1110 W ------x- SOUND STOP mute sound (time tunnel bogus coin sample at POST needs this?)
11010101----1110 W -xxxxx-- n.c.
11010101----1110 W x------- BANK SEL program ROM bank select
11010101----1111 W ---xxxxx EXPORT to a PAL (ROM6 @ 14)
11010110-------- W -------x HINV horizontal screen flip
11010110-------- W ------x- VINV vertical screen flip
11010110-------- W -----x-- OBJEX sprite bank select [1]
11010110-------- W ----x--- n.c.
11010110-------- W ---x---- SN1OFF tilemap 1 enable
11010110-------- W --x----- SN2OFF tilemap 2 enable
11010110-------- W -x------ SN3OFF tilemap 3 enable
11010110-------- W x------- OBJOFF sprites enable
11010111-------- n.c.
111xxxxxxxxxxxxx R xxxxxxxx ROM10 program ROM
[1] There are 256 bytes of sprite RAM, but only 128 can be accessed by the
video hardware at a time. OBJEX selects the high or low bank. The CPU can
access all the memory linearly. This feature doesn't seem to be ever used
although bioatack and spaceskr do initialise the second bank.
[2] Priority is controlled by a 256x4 PROM.
Bits 0-3 of PRY go to A4-A7 of the PROM, bit 4 selects D0-D1 or D2-D3.
A0-A3 of the PROM is fed with a mask of the inactive planes in the order
OBJ-SCN1-SCN2-SCN3. The 2-bit code which comes out from the PROM selects
the plane to display.
[3] A jumper selects whether writing to 8800 should also automatically trigger
the interrupt, or it should be explicitly triggered by a write to 8801.
[4] The first page of tilemap RAM c000-c3ff is used by bioatack during sprite
collision detection. It is also initialised by wwestern and wwester1
although they don't appear to use it.
SOUND CPU:
Address Dir Data Name Description
---------------- --- -------- --------- -----------------------
0000xxxxxxxxxxxx R xxxxxxxx ROM1 program ROM
0001xxxxxxxxxxxx R xxxxxxxx ROM2 program ROM
0010xxxxxxxxxxxx R xxxxxxxx ROM3 program ROM
0011xxxxxxxxxxxx R xxxxxxxx ROM4 program ROM
010000xxxxxxxxxx R/W xxxxxxxx work RAM
01001--------00x R/W xxxxxxxx CS5 AY-3-8910 #1
01001--------01x R/W xxxxxxxx CS5 AY-3-8910 #2
01001--------1-x R/W xxxxxxxx CS5 AY-3-8910 #3
01010---------00 R xxxxxxxx RD5000 read command from main CPU
01010---------00 W -------- WR5000 clear bit 7 of command from main CPU
01010---------01 R ----x--- RD5001 command pending from main CPU
01010---------01 R -----x-- RD5001 secondary semaphore from main CPU
01010---------01 R ------11 RD5001 always 1
01010---------01 W -------- WR5001 clear secondary semaphore from main CPU
01010---------10 n.c.
01010---------11 n.c.
111xxxxxxxxxxxxx R xxxxxxxx space for diagnostics ROM? not shown in the schematics
8910 #0
port A: DSW B
port B: DSW C
8910 #1
port A: digital sound out
port B: digital sound volume?
8910 #2:
port A: bits 4-7 IN54-IN57 read by main CPU at d40d
port B: n.c.
8910 #3:
port A: bits 0-1 control RC filter on this chip's output
port B: bit 0 NMI enable
Notes:
------
- Alpine Sky uses the feature where write to d50e-d50f can be processed by a PAL and
answer read back from d40b.
Kickstart Wheelie King :
- additional ram @ $d800-$dfff (scroll ram + ??)
- color bank @ $d000-$d001
- taitosj_scroll @ $d002-$d007
- strange controls :
- 'revolve type' - 3 pos switch (gears) + button/pedal (accel)
- two buttons for gear change, auto acceleration
TODO:
-----
- RC filter on 8910 #3
***************************************************************************/
#include "emu.h"
#include "taitosj.h"
#include "cpu/z80/z80.h"
#include "machine/watchdog.h"
#include "speaker.h"
void taitosj_state::sndnmi_msk_w(uint8_t data)
{
// B0 is the sound nmi enable, active low
m_soundnmi[0]->in_w<0>((~data) & 1);
}
void taitosj_state::soundlatch_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_w_cb), this), data);
}
void taitosj_state::input_port_4_f0_w(uint8_t data)
{
m_input_port_4_f0 = data >> 4;
}
// EPORT2
void taitosj_state::sound_semaphore2_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_w_cb), this), data);
}
CUSTOM_INPUT_MEMBER(taitosj_state::input_port_4_f0_r)
{
return m_input_port_4_f0;
}
void taitosj_state::main_nomcu_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x7fff).bankr(m_mainbank);
map(0x8000, 0x87ff).ram();
map(0x8800, 0x8800).mirror(0x07fe).rw(FUNC(taitosj_state::fake_data_r), FUNC(taitosj_state::fake_data_w));
map(0x8801, 0x8801).mirror(0x07fe).r(FUNC(taitosj_state::fake_status_r));
map(0x9000, 0xbfff).w(FUNC(taitosj_state::characterram_w)).share(m_characterram);
map(0xc000, 0xc3ff).ram();
map(0xc400, 0xc7ff).ram().share(m_videoram[0]);
map(0xc800, 0xcbff).ram().share(m_videoram[1]);
map(0xcc00, 0xcfff).ram().share(m_videoram[2]);
map(0xd000, 0xd05f).ram().share(m_colscrolly);
map(0xd100, 0xd1ff).ram().share(m_spriteram);
map(0xd200, 0xd27f).mirror(0x0080).ram().share(m_paletteram);
map(0xd300, 0xd300).mirror(0x00ff).writeonly().share(m_video_priority);
map(0xd400, 0xd403).mirror(0x00f0).readonly().share(m_collision_reg);
map(0xd404, 0xd404).mirror(0x00f3).r(FUNC(taitosj_state::gfxrom_r));
map(0xd408, 0xd408).mirror(0x00f0).portr("IN0");
map(0xd409, 0xd409).mirror(0x00f0).portr("IN1");
map(0xd40a, 0xd40a).mirror(0x00f0).portr("DSW1");
map(0xd40b, 0xd40b).mirror(0x00f0).portr("IN2");
map(0xd40c, 0xd40c).mirror(0x00f0).portr("IN3"); // Service
map(0xd40d, 0xd40d).mirror(0x00f0).portr("IN4");
map(0xd40e, 0xd40f).mirror(0x00f0).w(m_ay[0], FUNC(ay8910_device::address_data_w));
map(0xd40f, 0xd40f).mirror(0x00f0).r(m_ay[0], FUNC(ay8910_device::data_r)); // DSW2 and DSW3
map(0xd500, 0xd505).mirror(0x00f0).writeonly().share(m_scroll);
map(0xd506, 0xd507).mirror(0x00f0).writeonly().share(m_colorbank);
map(0xd508, 0xd508).mirror(0x00f0).w(FUNC(taitosj_state::collision_reg_clear_w));
map(0xd509, 0xd50a).mirror(0x00f0).writeonly().share(m_gfxpointer);
map(0xd50b, 0xd50b).mirror(0x00f0).w(FUNC(taitosj_state::soundlatch_w));
map(0xd50c, 0xd50c).mirror(0x00f0).w(FUNC(taitosj_state::sound_semaphore2_w));
map(0xd50d, 0xd50d).mirror(0x00f0).w("watchdog", FUNC(watchdog_timer_device::reset_w));
map(0xd50e, 0xd50e).mirror(0x00f0).w(FUNC(taitosj_state::bankswitch_w));
map(0xd50f, 0xd50f).mirror(0x00f0).nopw();
map(0xd600, 0xd600).mirror(0x00ff).writeonly().share(m_video_mode);
map(0xd700, 0xdfff).noprw();
map(0xe000, 0xffff).rom();
}
// only difference is fake_ replaced with actual MCU
void taitosj_state::main_mcu_map(address_map &map)
{
main_nomcu_map(map);
map(0x8800, 0x8801).mirror(0x07fe).rw(m_mcu, FUNC(taito_sj_security_mcu_device::data_r), FUNC(taito_sj_security_mcu_device::data_w));
}
// seems the most logical way to do the gears
template <int Player>
CUSTOM_INPUT_MEMBER(taitosj_state::kikstart_gear_r)
{
// gear MUST be 1, 2 or 3
if (m_gear[Player]->read() & 0x01) m_kikstart_gears[Player] = 0x02;
if (m_gear[Player]->read() & 0x02) m_kikstart_gears[Player] = 0x03;
if (m_gear[Player]->read() & 0x04) m_kikstart_gears[Player] = 0x01;
return m_kikstart_gears[Player];
}
// TODO: merge with above
void taitosj_state::kikstart_main_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0x6000, 0x7fff).bankr(m_mainbank);
map(0x8000, 0x87ff).ram();
map(0x8800, 0x8801).rw(m_mcu, FUNC(taito_sj_security_mcu_device::data_r), FUNC(taito_sj_security_mcu_device::data_w));
map(0x8802, 0x8802).noprw();
map(0x8a00, 0x8a5f).writeonly().share(m_colscrolly);
map(0x9000, 0xbfff).w(FUNC(taitosj_state::characterram_w)).share(m_characterram);
map(0xc000, 0xc3ff).ram();
map(0xc400, 0xc7ff).ram().share(m_videoram[0]);
map(0xc800, 0xcbff).ram().share(m_videoram[1]);
map(0xcc00, 0xcfff).ram().share(m_videoram[2]);
map(0xd000, 0xd001).writeonly().share(m_colorbank);
map(0xd002, 0xd007).writeonly().share(m_scroll);
map(0xd100, 0xd1ff).ram().share(m_spriteram);
map(0xd200, 0xd27f).ram().share(m_paletteram);
map(0xd300, 0xd300).writeonly().share(m_video_priority);
map(0xd400, 0xd403).readonly().share(m_collision_reg);
map(0xd404, 0xd404).r(FUNC(taitosj_state::gfxrom_r));
map(0xd408, 0xd408).mirror(0x00f0).portr("IN0");
map(0xd409, 0xd409).mirror(0x00f0).portr("IN1");
map(0xd40a, 0xd40a).mirror(0x00f0).portr("DSW1");
map(0xd40b, 0xd40b).mirror(0x00f0).portr("IN2");
map(0xd40c, 0xd40c).mirror(0x00f0).portr("IN3"); // Service
map(0xd40d, 0xd40d).mirror(0x00f0).portr("IN4");
map(0xd40e, 0xd40f).w(m_ay[0], FUNC(ay8910_device::address_data_w));
map(0xd40f, 0xd40f).r(m_ay[0], FUNC(ay8910_device::data_r)); // DSW2 and DSW3
map(0xd508, 0xd508).w(FUNC(taitosj_state::collision_reg_clear_w));
map(0xd509, 0xd50a).writeonly().share(m_gfxpointer);
map(0xd50b, 0xd50b).w(FUNC(taitosj_state::soundlatch_w));
map(0xd50c, 0xd50c).w(FUNC(taitosj_state::sound_semaphore2_w));
map(0xd50d, 0xd50d).w("watchdog", FUNC(watchdog_timer_device::reset_w));
map(0xd50e, 0xd50e).w(FUNC(taitosj_state::bankswitch_w));
map(0xd600, 0xd600).writeonly().share(m_video_mode);
map(0xd800, 0xdfff).ram().share(m_kikstart_scrollram); // scroll ram + ???
map(0xe000, 0xefff).rom();
}
TIMER_CALLBACK_MEMBER(taitosj_state::soundlatch_w_cb)
{
if (m_soundlatch_flag && (m_soundlatch_data != param))
logerror("Warning: soundlatch written before being read. Previous: %02x, new: %02x\n", m_soundlatch_data, param);
m_soundlatch_data = param;
m_soundlatch_flag = true;
m_soundnmi[0]->in_w<1>(1);
}
TIMER_CALLBACK_MEMBER(taitosj_state::soundlatch_clear7_w_cb)
{
if (m_soundlatch_flag)
logerror("Warning: soundlatch bit 7 cleared before being read. Previous: %02x, new: %02x\n", m_soundlatch_data, m_soundlatch_data & 0x7f);
m_soundlatch_data &= 0x7f;
}
TIMER_CALLBACK_MEMBER(taitosj_state::sound_semaphore2_w_cb)
{
m_sound_semaphore2 = (param & 1);
m_soundnmi[1]->in_w<1>((param & 1));
}
TIMER_CALLBACK_MEMBER(taitosj_state::sound_semaphore2_clear_w_cb)
{
m_sound_semaphore2 = false;
m_soundnmi[1]->in_w<1>(0);
}
// RD5000
uint8_t taitosj_state::soundlatch_r()
{
if (!machine().side_effects_disabled())
{
m_soundlatch_flag = false;
m_soundnmi[0]->in_w<1>(0);
}
return m_soundlatch_data;
}
// RD5001
uint8_t taitosj_state::soundlatch_flags_r()
{
return (m_soundlatch_flag ? 8 : 0) | (m_sound_semaphore2 ? 4 : 0) | 3;
}
// WR5000
void taitosj_state::soundlatch_clear7_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_clear7_w_cb), this), data);
}
// WR5001
void taitosj_state::sound_semaphore2_clear_w(uint8_t data)
{
machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_clear_w_cb), this), data);
}
void taitosj_state::taitosj_audio_map(address_map &map)
{
map(0x0000, 0x3fff).rom();
map(0x4000, 0x43ff).ram();
map(0x4800, 0x4801).mirror(0x07f8).w(m_ay[1], FUNC(ay8910_device::address_data_w));
map(0x4801, 0x4801).mirror(0x07f8).r(m_ay[1], FUNC(ay8910_device::data_r));
map(0x4802, 0x4803).mirror(0x07f8).w(m_ay[2], FUNC(ay8910_device::address_data_w));
map(0x4803, 0x4803).mirror(0x07f8).r(m_ay[2], FUNC(ay8910_device::data_r));
map(0x4804, 0x4805).mirror(0x07fa).w(m_ay[3], FUNC(ay8910_device::address_data_w));
map(0x4805, 0x4805).mirror(0x07fa).r(m_ay[3], FUNC(ay8910_device::data_r));
map(0x5000, 0x5000).mirror(0x07fc).rw(FUNC(taitosj_state::soundlatch_r), FUNC(taitosj_state::soundlatch_clear7_w));
map(0x5001, 0x5001).mirror(0x07fc).rw(FUNC(taitosj_state::soundlatch_flags_r), FUNC(taitosj_state::sound_semaphore2_clear_w));
map(0xe000, 0xefff).rom(); // space for diagnostic ROM
}
#define DSW2_PORT \
PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWB:1,2,3,4") \
PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) ) \
PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) ) \
PORT_DIPSETTING( 0x0d, DEF_STR( 7C_1C ) ) \
PORT_DIPSETTING( 0x0c, DEF_STR( 6C_1C ) ) \
PORT_DIPSETTING( 0x0b, DEF_STR( 5C_1C ) ) \
PORT_DIPSETTING( 0x0a, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x09, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) ) \
PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) ) \
PORT_DIPSETTING( 0x06, DEF_STR( 1C_7C ) ) \
PORT_DIPSETTING( 0x07, DEF_STR( 1C_8C ) ) \
PORT_DIPNAME( 0xf0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:5,6,7,8") \
PORT_DIPSETTING( 0xf0, DEF_STR( 9C_1C ) ) \
PORT_DIPSETTING( 0xe0, DEF_STR( 8C_1C ) ) \
PORT_DIPSETTING( 0xd0, DEF_STR( 7C_1C ) ) \
PORT_DIPSETTING( 0xc0, DEF_STR( 6C_1C ) ) \
PORT_DIPSETTING( 0xb0, DEF_STR( 5C_1C ) ) \
PORT_DIPSETTING( 0xa0, DEF_STR( 4C_1C ) ) \
PORT_DIPSETTING( 0x90, DEF_STR( 3C_1C ) ) \
PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) \
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) \
PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) \
PORT_DIPSETTING( 0x20, DEF_STR( 1C_3C ) ) \
PORT_DIPSETTING( 0x30, DEF_STR( 1C_4C ) ) \
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) \
PORT_DIPSETTING( 0x50, DEF_STR( 1C_6C ) ) \
PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) ) \
PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) )
#define COMMON_IN0\
PORT_START("IN0")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY\
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
#define COMMON_IN1\
PORT_START("IN1")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
#define COMMON_IN2\
PORT_START("IN2")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
#define COMMON_IN3(coin3state)\
PORT_START("IN3") /* Service */\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x10, coin3state, IPT_COIN3 )\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
#define WWEST_INPUT1\
PORT_START("IN0")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY\
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_START("IN1")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
#define WWEST_INPUT2\
PORT_START("IN3") /* Service */\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY\
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 )\
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )\
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )\
PORT_START("IN4")\
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL\
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) // from sound CPU
static INPUT_PORTS_START( spaceskr )
COMMON_IN0
COMMON_IN1
COMMON_IN2
COMMON_IN3(IP_ACTIVE_HIGH)
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x18, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "4" )
PORT_DIPSETTING( 0x10, "5" )
PORT_DIPSETTING( 0x18, "6" )
PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SWA:6")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SWC:6")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Infinite Lives") PORT_DIPLOCATION("SWC:7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) PORT_DIPLOCATION("SWC:8")
PORT_DIPSETTING( 0x80, "A and B" )
PORT_DIPSETTING( 0x00, "A only" )
INPUT_PORTS_END
static INPUT_PORTS_START( spacecr )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Continue")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_NAME("P2 Continue")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
COMMON_IN2
COMMON_IN3(IP_ACTIVE_LOW)
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1") // according to the manual, dips 1, 2, 3 and 6 are unused but should be left off
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x18, "3" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3") // according to the manual, dips 1, 2, 3, 4 and 5 are unused but should be left off
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SWC:6")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Hit Detection") PORT_DIPLOCATION("SWC:7")
PORT_DIPSETTING( 0x40, "Normal Game" )
PORT_DIPSETTING( 0x00, "No Hit" )
PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) PORT_DIPLOCATION("SWC:8")
PORT_DIPSETTING( 0x80, "A and B" )
PORT_DIPSETTING( 0x00, "A only" )
INPUT_PORTS_END
static INPUT_PORTS_START( junglek )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
COMMON_IN2
COMMON_IN3(IP_ACTIVE_HIGH)
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Finish Bonus" ) PORT_DIPLOCATION("SWA:1,2")
PORT_DIPSETTING( 0x03, DEF_STR( None ) )
PORT_DIPSETTING( 0x02, "Timer x1" )
PORT_DIPSETTING( 0x01, "Timer x2" )
PORT_DIPSETTING( 0x00, "Timer x3" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x18, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x00, "6" )
PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SWA:6")
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWC:1,2")
PORT_DIPSETTING( 0x02, "10000" )
PORT_DIPSETTING( 0x01, "20000" )
PORT_DIPSETTING( 0x00, "30000" )
PORT_DIPSETTING( 0x03, DEF_STR( None ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWC:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SWC:6")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Infinite Lives") PORT_DIPLOCATION("SWC:7") // Displays 'free game' on screen. Timer disabled with infinite lives
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) PORT_DIPLOCATION("SWC:8")
PORT_DIPSETTING( 0x80, "A and B" )
PORT_DIPSETTING( 0x00, "A only" )
INPUT_PORTS_END
static INPUT_PORTS_START( piratpet )
PORT_INCLUDE( junglek )
/* These 'skip' bits actually work no matter how you set the Debug Dip!
If cabinet is upright -> only 1 set of controls -> only P1 Skip Next Level
If cabinet is cocktail -> 2 sets of controls -> both Skip Next Level bits work */
PORT_MODIFY("IN0")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("P1 Skip Next Level") // Button 2 skips levels when Debug dips is on
PORT_MODIFY("IN1")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("P2 Skip Next Level") // Button 2 skips levels when Debug dips is on
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x04, 0x04, "Debug Mode" ) PORT_DIPLOCATION("SWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_MODIFY("DSW3")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWC:1,2")
PORT_DIPSETTING( 0x02, "10000" )
PORT_DIPSETTING( 0x01, "20000" )
PORT_DIPSETTING( 0x00, "50000" )
PORT_DIPSETTING( 0x03, DEF_STR( None ) )
PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWC:3,4,5")
PORT_DIPSETTING( 0x1c, DEF_STR( Easiest ) )
PORT_DIPSETTING( 0x18, DEF_STR( Easier ) )
PORT_DIPSETTING( 0x14, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x10, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0c, DEF_STR( Medium ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x04, DEF_STR( Harder ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
INPUT_PORTS_END
static INPUT_PORTS_START( alpine )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // "Fast"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // "Fast"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x1e, 0x00, IPT_UNUSED ) // protection read
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
COMMON_IN3(IP_ACTIVE_LOW) //Tilt flips screen
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" ) PORT_DIPLOCATION("SWA:1,2")
PORT_DIPSETTING( 0x00, "500-1500" )
PORT_DIPSETTING( 0x01, "800-2000" )
PORT_DIPSETTING( 0x02, "1000-2500" )
PORT_DIPSETTING( 0x03, "2000-4000" )
PORT_DIPUNUSED_DIPLOC(0x04, IP_ACTIVE_LOW, "SWA:3")
PORT_DIPNAME( 0x18, 0x18, "Game Time" ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x00, "1:00" )
PORT_DIPSETTING( 0x08, "1:30" )
PORT_DIPSETTING( 0x10, "2:00" )
PORT_DIPSETTING( 0x18, "2:30" )
PORT_DIPNAME( 0x20, 0x20, "End of Race Time Bonus" ) PORT_DIPLOCATION("SWA:6")
PORT_DIPSETTING( 0x00, "0:10" )
PORT_DIPSETTING( 0x20, "0:20" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3")
PORT_DIPNAME( 0x03, 0x03, "1st Extended Time" ) PORT_DIPLOCATION("SWC:1,2")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x01, "15000" )
PORT_DIPSETTING( 0x02, "20000" )
PORT_DIPSETTING( 0x03, "25000" )
PORT_DIPNAME( 0x1c, 0x1c, "Extended Time Every" ) PORT_DIPLOCATION("SWC:3,4,5")
PORT_DIPSETTING( 0x00, "5000" )
PORT_DIPSETTING( 0x04, "6000" )
PORT_DIPSETTING( 0x08, "7000" )
PORT_DIPSETTING( 0x0c, "8000" )
PORT_DIPSETTING( 0x10, "9000" )
PORT_DIPSETTING( 0x14, "10000" )
PORT_DIPSETTING( 0x18, "11000" )
PORT_DIPSETTING( 0x1c, "12000" )
PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SWC:6")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Hit Detection") PORT_DIPLOCATION("SWC:7")
PORT_DIPSETTING( 0x40, "Normal Game" )
PORT_DIPSETTING( 0x00, "No Hit" )
PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) PORT_DIPLOCATION("SWC:8")
PORT_DIPSETTING( 0x80, "A and B" )
PORT_DIPSETTING( 0x00, "A only" )
INPUT_PORTS_END
static INPUT_PORTS_START( alpinea )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // "Fast"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // "Fast"
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
PORT_BIT( 0x0f, 0x00, IPT_UNUSED ) // protection read
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
COMMON_IN3(IP_ACTIVE_LOW) //Tilt flips screen
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" ) PORT_DIPLOCATION("SWA:1,2")
PORT_DIPSETTING( 0x00, "500-1500" )
PORT_DIPSETTING( 0x01, "800-2000" )
PORT_DIPSETTING( 0x02, "1000-2500" )
PORT_DIPSETTING( 0x03, "2000-4000" )
PORT_DIPUNUSED_DIPLOC(0x04, IP_ACTIVE_LOW, "SWA:3")
PORT_DIPNAME( 0x18, 0x18, "Game Time" ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x00, "1:00" )
PORT_DIPSETTING( 0x08, "1:30" )
PORT_DIPSETTING( 0x10, "2:00" )
PORT_DIPSETTING( 0x18, "2:30" )
PORT_SERVICE( 0x20, IP_ACTIVE_LOW ) PORT_DIPLOCATION("SWA:6") // Very strange... use player 2 left/right/button to move through playfield, but for what reason?
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3")
PORT_DIPNAME( 0x03, 0x03, "1st Extended Time" ) PORT_DIPLOCATION("SWC:1,2")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x01, "15000" )
PORT_DIPSETTING( 0x02, "20000" )
PORT_DIPSETTING( 0x03, "25000" )
PORT_DIPNAME( 0x1c, 0x1c, "Extended Time Every" ) PORT_DIPLOCATION("SWC:3,4,5")
PORT_DIPSETTING( 0x00, "5000" )
PORT_DIPSETTING( 0x04, "6000" )
PORT_DIPSETTING( 0x08, "7000" )
PORT_DIPSETTING( 0x0c, "8000" )
PORT_DIPSETTING( 0x10, "9000" )
PORT_DIPSETTING( 0x14, "10000" )
PORT_DIPSETTING( 0x18, "11000" )
PORT_DIPSETTING( 0x1c, "12000" )
PORT_DIPNAME( 0x20, 0x20, "Year Display" ) PORT_DIPLOCATION("SWC:6")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "Hit Detection") PORT_DIPLOCATION("SWC:7")
PORT_DIPSETTING( 0x40, "Normal Game" )
PORT_DIPSETTING( 0x00, "No Hit" )
PORT_DIPNAME( 0x80, 0x80, "Coin Slots" ) PORT_DIPLOCATION("SWC:8")
PORT_DIPSETTING( 0x80, "A and B" )
PORT_DIPSETTING( 0x00, "A only" )
INPUT_PORTS_END
static INPUT_PORTS_START( timetunl )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
COMMON_IN2
COMMON_IN3(IP_ACTIVE_LOW)
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SWA:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:4,5")
PORT_DIPSETTING( 0x18, "3" )
PORT_DIPSETTING( 0x10, "4" )
PORT_DIPSETTING( 0x08, "5" )
PORT_DIPSETTING( 0x00, "6" )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWA:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWA:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:8")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
PORT_START("DSW2") // Coinage
DSW2_PORT
PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWC:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )