/
namcos1.cpp
2922 lines (2424 loc) · 170 KB
/
namcos1.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:Ernesto Corvi
/***********************************************************************
Namco System 1
Shadow Land / Youkai Douchuuki (c) 1987 Namco
Dragon Spirit (c) 1987 Namco
Blazer (c) 1987 Namco
Quester (c) 1987 Namco
Pac-Mania (c) 1987 Namco
Galaga '88 (c) 1987 Namco
Pro Yakyuu World Stadium (c) 1988 Namco
Chou Zetsurinjin Berabowman (c) 1988 Namco
Alice In Wonderland / Marchen Maze (c) 1988 Namco
Bakutotsu Kijuutei (c) 1988 Namco
Pro Tennis World Court (c) 1988 Namco
Splatter House (c) 1988 Namco
Face Off (c) 1988 Namco
Rompers (c) 1989 Namco
Blast Off (c) 1989 Namco
Pro Yakyuu World Stadium '89 (c) 1989 Namco
Dangerous Seed (c) 1989 Namco
Pro Yakyuu World Stadium '90 (c) 1990 Namco
Pistol Daimyo no Bouken (c) 1990 Namco
Boxy Boy / Souko Ban Deluxe (c) 1990 Namco
Puzzle Club (c) 1990 Namco (prototype)
Tank Force (c) 1991 Namco
We are missing some alternate versions:
- Alice In Wonderland (English version of Marchen Maze)
- Face Off (6 sticks)
An important thing to note about the custom chips is that the sprite generator
is the same as System 86.
From Pac-Mania schematics (but they show the Dragon Spirit key custom, and the
Galaga '88 schematics are the same again, so these three should be identical)
Custom ICs:
----------
CUS27 ULA clock divider
CUS30 sound control
CUS39 ULA sprite generator
CUS48 ULA sprite address generator
CUS64 MCU (63701)
CUS95(x5) I/O interface
CUS99(x2) sound volume
CUS116 display output generator
CUS117 main/sub CPU MMU
CUS120 sprite/tilemap mixer and palette address interface
CUS121 sound CPU address decoder
CUS123 scrolling tilemap address generator
CUS133 tilemap generator
CUS151 protection [1]
[1] Changes from game to game
Memory map
----------
Main, Sub CPU:
Address decoding is entirely handled by CUS117; see machine/c117.c.
Main & sub CPU memory map:
Address Dir Data Name Description
---------------- --- -------- --------- -----------------------
000xxxxxxxxxxxxx R/W xxxxxxxx bank #0
001xxxxxxxxxxxxx R/W xxxxxxxx bank #1
010xxxxxxxxxxxxx R/W xxxxxxxx bank #2
011xxxxxxxxxxxxx R/W xxxxxxxx bank #3
100xxxxxxxxxxxxx R/W xxxxxxxx bank #4
101xxxxxxxxxxxxx R/W xxxxxxxx bank #5
110xxxxxxxxxxxxx R/W xxxxxxxx bank #6
111xxxxxxxxxxxxx R xxxxxxxx bank #7
1110bbb--------0 W xxxxxxxx set bits 14-21 of bank #bbb
1110bbb--------1 W ------xx set bits 22-23 of bank #bbb
1111000--------- W -------x SUBRES sub CPUs reset (SRES)
1111001--------- W -------- watchdog reset (MRES, SRES)
1111010--------- W -------- ???
1111011--------- W -------- IRQ acknowledge (MIRQ, SIRQ)
1111100--------- -------- FIRQ acknowledge (MFIRQ, MSIRQ)
1111101--------- W -------- trigger FIRQ on sub CPU (SFIRQ) (bakutotu)
1111110--------- W xxxxxxxx select bank #7 (ROM) for sub CPU
1111111--------- -------- not used?
virtual memory map:
Address Dir Data Name Description
----------------------- --- -------- --------- -----------------------
010110----------------x W -------- 3DCS side select for 3D glasses
01011100xxxxxxxxxxxxxxx R/W xxxxxxxx COLCS palette + video window (CUS116 & CUS120)
01011110xxxxxxxxxxxxxxx R/W xxxxxxxx CHAR tilemap RAM (CUS133)
0101111100---xxxxxxxxxx R/W xxxxxxxx KEY protection key custom [1]
01011111100xxxxxxxxxxxx R/W xxxxxxxx OBJECT work RAM (CUS48)
010111111001xxxxxxxxxxx R/W xxxxxxxx portion holding sprite registers
01011111101-------xxxxx R/W xxxxxxxx SCRDT tilemap control (CUS123 & CUS133)
01011111110--xxxxxxxxxx R/W xxxxxxxx SOUND sound RAM (through CUS30) [2]
01011111111-xxxxxxxxxxx R/W xxxxxxxx IOEN TRIRAM (shared with all other CPUs)
01100000xxxxxxxxxxxxxxx R/W xxxxxxxx RAM work RAM
1000xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM H10 program ROM
1001xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM K10 program ROM
1010xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM L10 program ROM
1011xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM M10 program ROM
1100xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM N10 program ROM
1101xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM P10 program ROM
1110xxxxxxxxxxxxxxxxxxx R xxxxxxxx ROM S10 program ROM
1111--xxxxxxxxxxxxxxxxx R xxxxxxxx ROM T10 program ROM [3]
[1] different in every game
[2] from the schematics, it would seem that only 000-0FF is shared, but shadowld
proves that the whole 000-3FF is shared
[3] address bit 16 is inverted
sound CPU memory map:
address deconding is done for the most part by CUS121, and partially by CUS30
Address Dir Data Name Description
---------------- --- -------- --------- -----------------------
00xxxxxxxxxxxxxx R xxxxxxxx ROM A10/B10 program ROM (banked)
0100-----------x R/W xxxxxxxx YCS YM2151
0101--xxxxxxxxxx R/W xxxxxxxx RAM 3F sound RAM (through CUS30, shared with main & sub CPU) [1]
0101--00xxxxxxxx R/W xxxxxxxx portion holding the sound wave data
0101--0100xxxxxx R/W xxxxxxxx portion holding the sound registers
0111-xxxxxxxxxxx R/W xxxxxxxx VOICEG TRIRAM (shared with the other CPUs)
100xxxxxxxxxxxxx R/W xxxxxxxx RAMC work RAM
11xxxxxxxxxxxxxx R xxxxxxxx ROM A10 program ROM
1100------------ W xxxx---- ROM bank select
1101------------ W -------- watchdog (RESOUT?)
1110------------ W -------- IRQ acknowledge (SNDIRQ)
[1] from the schematics, it would seem that only 000-0FF is shared, but e.g. shadowld
proves that the whole 000-3FF RAM is shared
MCU memory map:
address decoding is done by a 16L8 PAL @ K3 which hasn't been read, so memory
map is inferred by program behaviour
Address Dir Data Name Description
---------------- --- -------- --------- -----------------------
00000000xxxxxxxx MCU internal registers, timers, ports and RAM
000100--------x- R xxxxxxxx DIPSW dip switches
000101---------x R xxxxxxxx CONTROL switch inputs
000110---------- n.c.
000111---------- n.c.
01xxxxxxxxxxxxxx R xxxxxxxx ROM A4/B4/E4/F4/H4/K4 (lower half) (banked, see below)
10xxxxxxxxxxxxxx R xxxxxxxx ROM A4/B4/E4/F4/H4/K4 (upper half) (banked, see below)
11000xxxxxxxxxxx R/W xxxxxxxx TRIRAM work RAM (shared with the other CPUs)
11001xxxxxxxxxxx R/W xxxxxxxx EEROM non volatile memory
110100---------- W xxxxxxxx LT0 DAC #0
110101---------- W xxxxxxxx LT1 DAC #1
110110---------- W x------- \select ROM K4
110110---------- W -x------ \select ROM H4
110110---------- W --x----- \select ROM F4
110110---------- W ---x---- \select ROM E4
110110---------- W ----x--- \select ROM B4
110110---------- W -----x-- \select ROM A4
110110---------- W ------x- to A16 of active ROM (inverted for ROM A4)
110110---------- W -------x to A15 of active ROM
110111---------- n.c.
1110------------ n.c.
1111xxxxxxxxxxxx R xxxxxxxx MCU internal ROM
1111------------ W IRQ acknowledge
Preliminary driver by:
Ernesto Corvi
ernesto@imagina.com
Updates by:
Vernon C. Brooks, Acho A. Tang, Nicola Salmoria, Alex W. Jackson
Notes:
- The ROM/RAM test is NOT performed by default. It is only done if the test mode
switch is on when the game powers up (setting it and resetting is not enough).
You can manage to make it work if you press F2 quickly enough after the MAME
startup screen, without having to exit MAME and restarting [or just use hard
reset].
- There are three watchdogs, one per CPU. Handling them separately is necessary
to allow entering service mode without manually resetting: only one of the CPUs
stops writing to the watchdog.
- berabohm and bakutotu have a strange demo play on startup, the player doesn't
move. This seems to be by design, because after you play a game a few seconds
from the last game are replayed. It is weird that they didn't provide some
default, though. And in bakutotu you can fire during the demo.
If you play and then reset, the demo still does nothing. This should prove that
RAM is cleared on purpose during boot and there is no default.
- bakutotu:
The main and sub processors work closely together and the game
quickly runs into trouble when one of them lacks behind. Heavy
sync and overclocking will help but there's a particularly nasty
loop appearing in more than 40 places of the code:
1) kick the watchdog
2) raise a flag
3) do some dummy tasks
4) check whether the flag has been reset by the sub CPU
5) go back to step 1 if not
- berabohm has special pressure sensitive button, with two switches. The harder
you push the button, the faster the two switches are closed one after the other.
The speed is measured by an external board and reported to the game.
Due to MAME's limited input sample rate (once per frame) it is difficult
to reproduce that. Instead, I've hooked 6 fake buttons: weak, medium and strong
punch, and weak, medium and strong jump.
TODO:
- There is still a big mystery about the first location of tri port ram, which is
shared among all four CPUs. See mcu_patch_w() for the kludge: essentially,
this location has to be 0xA6 for the games to work. However, the MCU first sets it
to 0xA6, then zeroes it - and there doesn't seem to be any code anywhere for any CPU
that would set it back to 0xA6. Se, we ignore the zeroing write.
- Blast Off fails the ROM test (IO ERROR 64). This is caused by concurrent access
to the same memory during the RAM tests: CPU #2 writes to $7101 before the MCU
has read it back ($c101).
- Most of the dip switches are undocumented debug controls. There might be still
more marked as "unknown" that have a function.
Namco System 1 hardware
=======================
Processors:
6809 - Main CPU
6809 - Sub CPU
6809 - Sound CPU (PSG,FM)
63701 - MCU (input,EEPROM,DAC)
Inter-processor communication is done via a 2K shared memory area.
Bankswitching:
Main/Sub - a 10-bit value is written to location Ex00 to select the 8K
bank (RAM or PRG0-PRG7) which is accessed at offset x000. (x is even)
Sound - a 3-bit value is written to location C000 or C001, bits 4-6 to
select the 16K bank (SND0-SND1) which is accessed at offset 0000.
MCU - a 8-bit value is written to location D800 to select the 32K bank
(VOI0-VOI5) which is accessed at offset 4000. Bits 2-7 are a bitmask
which specify the ROM to access and bits 0-1 specify the ROM offset.
Graphics:
Visible screen resolution: 288x244 pixels (36x28 tiles)
3 scrolling 64x64 tilemapped playfields
1 scrolling 64x32 tilemapped playfield
2 fixed 36x28 tilemapped playfields
Each playfield uses one of 8 color palettes, can be enabled or disabled,
and has programmable priorities.
Each tile is a 8x8, 8 bit-per-pixel character from a selection of up to
16384 characters (CHR0-CHR7). A separate 1 bit-per-pixel character mask
(CHR8) defines the character shape.
127 displayable 32x32, 4 bit-per-pixel sprites from a selection of up to
2048 sprites (OBJ0-OBJ7). Each sprite uses one of 127 color palettes or
a special shadow/highlight effect and has programmable priorities and
x-y flipping. Sprites may also be displayed as a smaller portion of a
32x32 object with a programmable size and position. The height and width
are programmed separately and may be 4,8,16,or 32 pixels.
3 24-bit programmable RGB palette tables, 8 bits per color as follows:
127 16-color entries for the sprites
8 256-color entries for the playfields
8 256-color entries for the playfields shadow/highlight effects
Sound:
Namco custom 8 channel 16-bit stereo PSG for sound effects
resistor array based 2 channel 8-bit DAC for voice
Yamaha YM2151+YM3012 FM chip for background music
Controls:
The standard hardware supports one or two 8-way joysticks with up to
three buttons for each player, two start buttons, a service switch, two
coin slots, and one dipswitch block. Game settings are accessed via
service mode and are saved in EEPROM.
Games:
Date Name Key Screen
----- ------------------------------------- ---- ------
4/87 Youkai Douchuuki / Shadowland NONE H
6/87 Dragon Spirit (old version) 136 V
??/87 Dragon Spirit (new version) 136 V
7/87 Blazer 144 V
9/87 Quester A V
??/87 Quester (special edition) A V
11/87 Pac-Mania 151 V-FLIP
11/87 Pac-Mania (Japanese version) 151 V
12/87 Galaga '88 153 V-FLIP
12/87 Galaga '88 (Japanese version) 153 V
3/88 Pro Yakyuu World Stadium 154 H
5/88 Chou Zetsurinjin Berabowman B H
??/88 Chou Zetsurinjin Berabowman NONE H
(standard NS1 hardware)
7/88 Marchen Maze / Alice In Wonderland 152 H
8/88 Bakutotsu Kijuutei / Baraduke 2 155 H
10/88 Pro Tennis World Court 143 H
11/88 Splatter House 181 H
12/88 Face Off C H
2/89 Rompers 182 V
3/89 Blast Off 183 V
7/89 Pro Yakyuu World Stadium '89 184 H
12/89 Dangerous Seed 308 V
7/90 Pro Yakyuu World Stadium '90 310 H
10/90 Pistol Daimyo no Bouken 309 H-FLIP
11/90 Souko Ban Deluxe 311 H-FLIP
??/90 Puzzle Club (prototype) ? V
12/91 Tank Force 185 H-FLIP
A - uses sub board with paddle control(s)
B - uses sub board with pressure sensitive controls
C - uses sub board with support for player 3 and 4 controls
***********************************************************************/
#include "emu.h"
#include "namcos1.h"
#include "machine/nvram.h"
#include "sound/ymopm.h"
#include "screen.h"
#include "speaker.h"
/**********************************************************************/
void namcos1_state::audiocpu_irq_ack_w(u8 data)
{
m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
void namcos1_state::mcu_irq_ack_w(u8 data)
{
m_mcu->set_input_line(HD6301_IRQ1_LINE, CLEAR_LINE);
}
u8 namcos1_state::dsw_r(offs_t offset)
{
// 7654---- not used
// ----3--- ls257 dsw selector 1y
// -----2-- ls257 dsw selector 2y
// ------1- ls257 dsw selector 3y
// -------0 ls257 dsw selector 4y
m_dsw_sel->ba_w(m_io_dipsw->read());
m_dsw_sel->select_w(BIT(offset, 1));
return 0xf0 | bitswap<4>(m_dsw_sel->output_r(), 0, 1, 2, 3);
}
void namcos1_state::coin_w(offs_t offset, u8 data, u8 mem_mask)
{
data &= mem_mask;
machine().bookkeeping().coin_lockout_global_w(BIT(~data, 0));
machine().bookkeeping().coin_counter_w(0, BIT(data, 1));
machine().bookkeeping().coin_counter_w(1, BIT(data, 2));
}
void namcos1_state::dac_gain_w(u8 data)
{
/* DAC0 (GAIN0 = bit0, GAIN1 = bit2) */
int dac0_gain = (BIT(data, 2) << 1) | BIT(data, 0);
m_dac[0]->set_output_gain(ALL_OUTPUTS, (dac0_gain + 1) / 4.0f);
/* DAC1 (GAIN2 = bit3, GAIN3 = bit4) */
int dac1_gain = (BIT(data, 4) << 1) | BIT(data, 3);
m_dac[1]->set_output_gain(ALL_OUTPUTS, (dac1_gain + 1) / 4.0f);
}
void namcos1_state::main_map(address_map &map)
{
map(0x0000, 0xffff).rw(m_c117, FUNC(namco_c117_device::main_r), FUNC(namco_c117_device::main_w));
}
void namcos1_state::sub_map(address_map &map)
{
map(0x0000, 0xffff).rw(m_c117, FUNC(namco_c117_device::sub_r), FUNC(namco_c117_device::sub_w));
}
void namcos1_state::virtual_map(address_map &map)
{
map(0x2c0000, 0x2c1fff).w(FUNC(namcos1_state::_3dcs_w));
map(0x2e0000, 0x2e7fff).rw(m_c116, FUNC(namco_c116_device::read), FUNC(namco_c116_device::write));
map(0x2f0000, 0x2f7fff).rw(m_c123tmap, FUNC(namco_c123tmap_device::videoram8_r), FUNC(namco_c123tmap_device::videoram8_w));
map(0x2f8000, 0x2f9fff).rw(FUNC(namcos1_state::no_key_r), FUNC(namcos1_state::no_key_w));
map(0x2fc000, 0x2fcfff).ram().w(FUNC(namcos1_state::spriteram_w)).share("spriteram");
map(0x2fd000, 0x2fd01f).rw(m_c123tmap, FUNC(namco_c123tmap_device::control8_r), FUNC(namco_c123tmap_device::control8_w)).mirror(0xfe0);
map(0x2fe000, 0x2fe3ff).rw("namco", FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)).mirror(0xc00); /* PSG ( Shared ) */
map(0x2ff000, 0x2ff7ff).ram().share("triram").mirror(0x800);
map(0x300000, 0x307fff).ram();
map(0x400000, 0x7fffff).rom().region("user1", 0);
}
void namcos1_state::sound_map(address_map &map)
{
map(0x0000, 0x3fff).bankr("soundbank"); /* Banked ROMs */
map(0x4000, 0x4001).rw("ymsnd", FUNC(ym2151_device::status_r), FUNC(ym2151_device::write));
map(0x5000, 0x53ff).rw("namco", FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)).mirror(0x400); /* PSG ( Shared ) */
map(0x7000, 0x77ff).ram().share("triram");
map(0x8000, 0x9fff).ram(); /* Sound RAM 3 */
map(0xc000, 0xc001).w(FUNC(namcos1_state::sound_bankswitch_w)); /* ROM bank selector */
map(0xd001, 0xd001).w(m_c117, FUNC(namco_c117_device::sound_watchdog_w));
map(0xe000, 0xe000).w(FUNC(namcos1_state::audiocpu_irq_ack_w));
map(0xc000, 0xffff).rom().region("audiocpu", 0);
}
void namcos1_state::mcu_map(address_map &map)
{
map(0x1000, 0x1003).r(FUNC(namcos1_state::dsw_r));
map(0x1400, 0x1400).portr("CONTROL0");
map(0x1401, 0x1401).portr("CONTROL1");
map(0x4000, 0xbfff).bankr("mcubank"); /* banked external ROM */
map(0xc000, 0xc7ff).ram().share("triram");
map(0xc800, 0xcfff).ram().share("nvram"); /* EEPROM */
map(0xd000, 0xd000).w(m_dac[0], FUNC(dac_byte_interface::data_w));
map(0xd400, 0xd400).w(m_dac[1], FUNC(dac_byte_interface::data_w));
map(0xd800, 0xd800).w(FUNC(namcos1_state::mcu_bankswitch_w)); /* ROM bank selector */
map(0xf000, 0xf000).w(FUNC(namcos1_state::mcu_irq_ack_w));
}
// #define PRIORITY_EASINESS_TO_PLAY
/* Standard Namco System 1 input port definition */
static INPUT_PORTS_START( ns1 )
PORT_START( "CONTROL0" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START( "CONTROL1" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START( "DIPSW" )
PORT_SERVICE_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x02, IP_ACTIVE_LOW, "SW:2" )
PORT_DIPUNKNOWN_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW:6" )
PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW:7" )
PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW:8" )
PORT_START( "COIN" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* OUT:coin lockout */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* OUT:coin counter 1 */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* OUT:coin counter 2 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_F1) // service switch from the edge connector
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( shadowld )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Alternate sound effects" ) PORT_DIPLOCATION("SW:3") // e.g. the red bird
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( dspirit )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
#ifdef PRIORITY_EASINESS_TO_PLAY
PORT_DIPNAME( 0xfe, 0xfe, "Life" ) PORT_DIPLOCATION("SW:2,3,4,5,6,7,8")
PORT_DIPSETTING( 0xfe, "2" )
PORT_DIPSETTING( 0x68, "3" )
#else
PORT_DIPNAME( 0x02, 0x02, "Open 3rd Life (step1of7)" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
PORT_DIPNAME( 0x04, 0x04, "Open 3rd Life (step2of7)" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
PORT_DIPNAME( 0x08, 0x08, "Open 3rd Life (step3of7)" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x10, 0x10, "Open 3rd Life (step4of7)" ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
PORT_DIPNAME( 0x20, 0x20, "Open 3rd Life (step5of7)" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x40, 0x40, "Open 3rd Life (step6of7)" ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x80, 0x80, "Open 3rd Life (step7of7)" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
// Allow "Open 3rd Life" = _ooxoxxo
// 12345678
#endif
INPUT_PORTS_END
static INPUT_PORTS_START( quester )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "CONTROL0" )
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle strobe */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle strobe */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_MODIFY( "CONTROL1" )
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle strobe */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) /* paddle strobe */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Unk 1" ) PORT_DIPLOCATION("SW:2") // read @ fac7
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x00, "Brightness" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, DEF_STR( Low ) )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15)
PORT_START( "PADDLE1" ) /* fake input port for player 2 paddle */
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( tankfrc4 )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "CONTROL0" )
PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* multiplexed inputs */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_MODIFY( "CONTROL1" )
PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* multiplexed inputs */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_START( "IN0" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // and start1
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN1" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) // and start3
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN2" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // and start2
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN3" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4) // and start4
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( pacmania )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* this doesn't seem to have much use... */
PORT_DIPNAME( 0x04, 0x04, "Kick Watchdog in IRQ" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
/* to enter the A.D.S. menu, set the dip switch and reset with service coin pressed */
PORT_DIPNAME( 0x10, 0x10, "Auto Data Sampling" ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( galaga88 )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
#ifdef PRIORITY_EASINESS_TO_PLAY
PORT_DIPNAME( 0x28, 0x28, "Auto Data Sampling" ) PORT_DIPLOCATION("SW:5,3")
PORT_DIPSETTING( 0x28, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
#else
PORT_DIPNAME( 0x04, 0x04, "Auto Data Sampling (step1of2)" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Auto Data Sampling (step2of2)" ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
// Allow "Auto Data Sampling" = __o_o___
// 12345678
#endif
INPUT_PORTS_END
static INPUT_PORTS_START( berabohm )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "CONTROL0" )
PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM )
PORT_MODIFY( "CONTROL1" )
PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) /* timing from the buttons interface */
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x04, 0x04, "Invulnerability" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
#ifdef PRESSURE_SENSITIVE
/*
buttons (pressure sensitive)
each button has two switches: the first is closed as soon as the button is
pressed, the second a little later, depending on how hard the button is
pressed.
bits 0-5 control strength (0x00 = max 0x3f = min)
bit 6 indicates the button is pressed
bit 7 is not actually read by the game but I use it to simulate the second
switch
*/
PORT_START( "IN0" )
PORT_BIT( 0x3f, 0x00, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 )
PORT_START( "IN1" )
PORT_BIT( 0x3f, 0x00, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_START( "IN2" )
PORT_BIT( 0x3f, 0x00, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_START( "IN3" )
PORT_BIT( 0x3f, 0x00, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
#else
PORT_START( "IN0" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 )
PORT_START( "IN1" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_START( "IN2" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(2)
PORT_START( "IN3" )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
#endif
INPUT_PORTS_END
static INPUT_PORTS_START( mmaze )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Level_Select ) ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( bakutotu )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Invincibility (Cheat)") PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "Show Coordinates" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Level Selection" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, "Sprite Viewer" ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( wldcourt )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
#ifdef PRIORITY_EASINESS_TO_PLAY
/* see code @ e331. The lines this draws can't even be seen because they are erased afterwards */
PORT_DIPNAME( 0x7e, 0x7e, "Draw Debug Lines" ) PORT_DIPLOCATION("SW:2,3,4,5,6,7")
PORT_DIPSETTING( 0x7e, DEF_STR( Off ) )
PORT_DIPSETTING( 0x3a, DEF_STR( On ) )
#else
PORT_DIPNAME( 0x02, 0x02, "Draw Debug Lines (step1of6)" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x04, 0x04, "Draw Debug Lines (step2of6)" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
PORT_DIPNAME( 0x08, 0x08, "Draw Debug Lines (step3of6)" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x10, 0x10, "Draw Debug Lines (step4of6)" ) PORT_DIPLOCATION("SW:5")
PORT_DIPSETTING( 0x10, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x20, 0x20, "Draw Debug Lines (step5of6)" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, "Yes (off)" )
PORT_DIPSETTING( 0x00, "No (on)" )
PORT_DIPNAME( 0x40, 0x40, "Draw Debug Lines (step6of6)" ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, "No (off)" )
PORT_DIPSETTING( 0x00, "Yes (on)" )
// Allow "Draw Debug Lines" = _xxoxxo_
// 12345678
#endif
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( splatter )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
/* these two don't seem to have much use... */
#ifdef PRIORITY_EASINESS_TO_PLAY
PORT_DIPNAME( 0x88, 0x88, "CPU #0 Kick Watchdog in IRQ" ) PORT_DIPLOCATION("SW:4,8")
PORT_DIPSETTING( 0x88, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
#else
PORT_DIPNAME( 0x08, 0x08, "CPU #0 Kick Watchdog in IRQ (step1of2)" ) PORT_DIPLOCATION("SW:4")
PORT_DIPSETTING( 0x08, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x80, 0x80, "CPU #0 Kick Watchdog in IRQ (step2of2)" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
// Allow "CPU #0 Kick Watchdog in IRQ" = ___o___o
// 12345678
#endif
#ifdef PRIORITY_EASINESS_TO_PLAY
PORT_DIPNAME( 0x60, 0x60, "CPU #0&1 Kick Watchdog in IRQ" ) PORT_DIPLOCATION("SW:6,7")
PORT_DIPSETTING( 0x60, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
#else
PORT_DIPNAME( 0x20, 0x20, "CPU #0&1 Kick Watchdog in IRQ (step1of2)" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x40, "CPU #0&1 Kick Watchdog in IRQ (step2of2)" ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
// Allow "CPU #0&1 Kick Watchdog in IRQ" = _____oo_
// 12345678
#endif
INPUT_PORTS_END
static INPUT_PORTS_START( splatter3 )
PORT_INCLUDE( splatter )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x04, 0x04, "Stage Select" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( faceoff )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "CONTROL0" )
PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* multiplexed inputs */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_MODIFY( "CONTROL1" )
PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_CUSTOM ) /* multiplexed inputs */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START( "IN0" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN1" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN2" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START( "IN3" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( ws89 )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
/* see code @ e90c. The lines this draws can't even be seen because they are erased afterwards */
PORT_DIPNAME( 0x40, 0x40, "Draw Debug Lines" ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( dangseed )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
/* this doesn't seem to have much use... */
PORT_DIPNAME( 0x04, 0x04, "Kick Watchdog in IRQ" ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
/* to enter the A.D.S. menu, set the dip switch, keep 1p start pressed and press service coin */
PORT_DIPNAME( 0x20, 0x20, "Auto Data Sampling" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( ws90 )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
/* see code @ e8ff. The lines this draws can't even be seen because they are erased afterwards */
PORT_DIPNAME( 0x40, 0x40, "Draw Debug Lines" ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( boxyboy )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Freeze" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( puzlclub )
PORT_INCLUDE( ns1 )
PORT_MODIFY( "DIPSW" )
PORT_DIPNAME( 0x02, 0x02, "Auto Data Sampling" ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static const gfx_layout spritelayout =
{
32,32,
RGN_FRAC(1,1),
4,
{ STEP4(0,1) },
{ STEP16(0,4), STEP16(4*16*16,4)},
{ STEP16(0,4*16), STEP16(4*16*16*2,4*16) },
32*32*4
};
static GFXDECODE_START( gfx_namcos1 )
GFXDECODE_ENTRY( "sprite", 0, spritelayout, 0x0000, 128 ) /* sprites 32/16/8/4 dots */
GFXDECODE_END
/*
namcos1 has two 8bit dac channel. But They are mixed before pre-amp.
And,they are connected with pre-amp through active LPF.
LPF info : Fco = 3.3KHz , g = -12dB/oct