/
coinmstr.cpp
1637 lines (1401 loc) · 64.2 KB
/
coinmstr.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:Pierpaolo Prazzoli, Roberto Fresca, David Haywood
/*==================================================================================
Coinmaster trivia and poker games.
Preliminary driver by Pierpaolo Prazzoli
Additional work by Roberto Fresca.
TODO:
- is there extra colour info in attr3 for suprnudge 2 and pokeroul?
- is there colour intensity control?
- finish inputs
- finish question roms reading
- hook up all the PIAs
====================================================================================
Technical notes....
There are at least 2 different boards.
A) Unknown, with 2x 6264 RAM, mapped $C000-$DFFF and $E000-$FFFF.
B) 'PCB-001-POK', with 3x 6116 RAM, mapped $E000-$E7FF, $E800-$EFFF, and $F000-$F7FF.
- All of them seems to have a connector for expansion (as Question Boards).
- The I/O ports are a mess. Devices could be mapped in different ways.
- Some trivia seems to accept 2 type of eproms for question roms:
0x4000 or 0x8000 bytes long. This check is done with the 1st read
from the rom (I think from offset 0) and if it's 0x10, it means a
0x4000 bytes eprom or if it's 0x20, it means a 0x8000 one.
Also supnudg2 only tests 0x20 as 1st byte, so accepting only
the 2nd type of eproms.
* Coinmaster Joker Poker (PCB-001-POK)
AY-3-8912
---------
- IO pins connected to DIP switches bank.
- Data pin connected to CPU data pin.
- BC1 goes to PAL IC12 pin 12
- BC2 +5V
- BDIR goes to PAL IC12 pin 13
- A8 +5V
PIAs
----
PIA0 (IC24) Port A --> Input.
PIA0 (IC24) Port B --> Output.
PB output
PB0 to PB6 go to ULN2003 (IC19) then on PCB connector.
PB7 goes to ULM2003 (IC40) pin 1 then on PCB connector.
PIA1 (IC39) Port A --> Output.
PIA1 (IC39) Port B --> Output.
PA0-PA7 go to 22 KOhm resistor, then a "pull up" capacitor, and then into the base of a transistor.
Collector connected to +5V, emitter is the output (1 KOhm pulldown), it goes into an ULN2803
and then to PCB connector. 3 of that transistors outputs (input of the ULN) are connected
together and connected to another circuit that generate 2 more outputs on PCB connector.
(them seem unused no solder on the pcb connector)
PB0 to PB6 goes to ULN2003 (IC34) then on PCB connector.
PB7 goes to ULM2003 (IC40) pin 2 then on PCB connector.
PIA2 (IC32) Port A --> Input.
PIA2 (IC32) Port B --> Output.
PB0 to PB6 go to ULN2003 (IC31) then on PCB connector.
PB7 goes to ULM2003 (IC40) pin 3 then on PCB connector.
====================================================================================
Notes by game....
* Coinmaster Joker Poker
- For Joker Poker (set 2), to start, pulse the KEY OUT (W) to wipe
the credits set at boot stage and reset the game. Otherwise you'll
get 116 credits due to input inconsistencies.
DIP switch #1 changes the minimal hand between "Jacks or Better" and
"Pair of Aces".
There are two bookkeeping modes. I think these are for different levels
like operator and manager/supervisor. With the DIP switch #4 you can
switch between them. Is possible that this input would be meant to be
routed to a real supervisor key.
Bookkeeping Types:
"Weekly Meters"
Just the operator bookkeeping mode. Only weekly credits in and out.
Erasable with CANCEL button. HOLD 5 shows the settings status.
"Meter Totals"
A complete bookkeeping, not erasable. Credits in/out, gamble in/out,
and complete statistics. In the principal bookkeeping screen, HOLD 1
brings up a sort of values, and HOLD 4 shows the current stake limit
(keep pressing HOLD 4, and press HIGH and LOW to set the stake limit
between 10-100).
Pressing DEAL/START, you can get the winning hands, occurrence of
spades, diamonds, clubs and hearts. also number of jokers dealt.
With DIP switch #8 ON, you can enter a sort of test mode, where you
can set the cards using the HOLD buttons, and test the winning hands.
DIP switch #7 is the 'Factory Install Switch'. It behaves like a PC
CMOS eraser jumper. Turning it ON and then OFF, you will erase the
'Meter Totals' (all permanent meters and statistics).
==================================================================================*/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/6821pia.h"
#include "video/mc6845.h"
#include "sound/ay8910.h"
#include "machine/nvram.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
namespace {
#define MASTER_CLOCK XTAL(14'000'000)
#define CPU_CLOCK (MASTER_CLOCK/4)
#define SND_CLOCK (MASTER_CLOCK/8)
class coinmstr_state : public driver_device
{
public:
coinmstr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_attr_ram1(*this, "attr_ram1"),
m_attr_ram2(*this, "attr_ram2"),
m_attr_ram3(*this, "attr_ram3"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
void coinmstr(machine_config &config);
void pokeroul(machine_config &config);
void supnudg2(machine_config &config);
void jpcoin(machine_config &config);
void jpjcoin(machine_config &config);
void quizmstr(machine_config &config);
void trailblz(machine_config &config);
void init_coinmstr();
protected:
virtual void video_start() override;
private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_attr_ram1;
required_shared_ptr<uint8_t> m_attr_ram2;
required_shared_ptr<uint8_t> m_attr_ram3;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
tilemap_t *m_bg_tilemap = nullptr;
uint8_t m_question_adr[4]{};
void quizmstr_bg_w(offs_t offset, uint8_t data);
void quizmstr_attr1_w(offs_t offset, uint8_t data);
void quizmstr_attr2_w(offs_t offset, uint8_t data);
void quizmstr_attr3_w(offs_t offset, uint8_t data);
uint8_t question_r();
void question_w(offs_t offset, uint8_t data);
uint8_t ff_r();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void coinmstr_map(address_map &map);
void jpcoin_io_map(address_map &map);
void jpcoin_map(address_map &map);
void jpjcoin_io_map(address_map &map);
void pokeroul_io_map(address_map &map);
void quizmstr_io_map(address_map &map);
void supnudg2_io_map(address_map &map);
void trailblz_io_map(address_map &map);
};
void coinmstr_state::quizmstr_bg_w(offs_t offset, uint8_t data)
{
m_videoram[offset] = data;
if(offset >= 0x0240)
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
}
static void coinmstr_set_pal(palette_device &palette, uint32_t paldat, int col)
{
col = col *4;
{
int r0, r1, r2, r3;
int g0, g1, g2, g3;
int b0, b1, b2, b3;
r0 = (paldat & 0x1000) >> 12 ;
g0 = (paldat & 0x0800) >> 11 ;
b0 = (paldat & 0x0400) >> 10 ;
r1 = (paldat & 0x0200) >> 9 ;
g1 = (paldat & 0x0100) >> 8 ;
b1 = (paldat & 0x0080) >> 7 ;
r2 = (paldat & 0x0020) >> 5 ;
g2 = (paldat & 0x0010) >> 4 ;
b2 = (paldat & 0x0008) >> 3 ;
r3 = (paldat & 0x0004) >> 2 ;
g3 = (paldat & 0x0002) >> 1 ;
b3 = (paldat & 0x0001) >> 0 ;
palette.set_pen_color(col+0, (b0 * 255) << 5, (g0 * 255) << 5, (r0 * 255) << 5);
palette.set_pen_color(col+2, (b1 * 255) << 5, (g1 * 255) << 5, (r1 * 255) << 5);
palette.set_pen_color(col+1, (b2 * 255) << 5, (g2 * 255) << 5, (r2 * 255) << 5);
palette.set_pen_color(col+3, (b3 * 255) << 5, (g3 * 255) << 5, (r3 * 255) << 5);
}
}
void coinmstr_state::quizmstr_attr1_w(offs_t offset, uint8_t data)
{
m_attr_ram1[offset] = data;
if(offset >= 0x0240)
{
// the later games also use attr3 for something..
uint32_t paldata = (m_attr_ram1[offset] & 0x7f) | ((m_attr_ram2[offset] & 0x7f) << 7);
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
coinmstr_set_pal(*m_palette, paldata, offset - 0x240);
}
}
void coinmstr_state::quizmstr_attr2_w(offs_t offset, uint8_t data)
{
m_attr_ram2[offset] = data;
if(offset >= 0x0240)
{
// the later games also use attr3 for something..
uint32_t paldata = (m_attr_ram1[offset] & 0x7f) | ((m_attr_ram2[offset] & 0x7f) << 7);
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
coinmstr_set_pal(*m_palette, paldata, offset - 0x240);
}
}
void coinmstr_state::quizmstr_attr3_w(offs_t offset, uint8_t data)
{
m_attr_ram3[offset] = data;
if(offset >= 0x0240)
m_bg_tilemap->mark_tile_dirty(offset - 0x0240);
}
uint8_t coinmstr_state::question_r()
{
int address;
uint8_t *questions = memregion("user1")->base();
switch(m_question_adr[2])
{
case 0x38: address = 0x00000; break; // m_question_adr[3] == 7
case 0x39: address = 0x08000; break; // m_question_adr[3] == 7
case 0x3a: address = 0x10000; break; // m_question_adr[3] == 7
case 0x3b: address = 0x18000; break; // m_question_adr[3] == 7
case 0x3c: address = 0x20000; break; // m_question_adr[3] == 7
case 0x3d: address = 0x28000; break; // m_question_adr[3] == 7
case 0x3e: address = 0x30000; break; // m_question_adr[3] == 7
case 0x07: address = 0x38000; break; // m_question_adr[3] == 7
case 0x0f: address = 0x40000; break; // m_question_adr[3] == 7
case 0x17: address = 0x48000; break; // m_question_adr[3] == 7
case 0x1f: address = 0x50000; break; // m_question_adr[3] == 7
case 0x27: address = 0x58000; break; // m_question_adr[3] == 7
case 0x2f: address = 0x60000; break; // m_question_adr[3] == 7
case 0x37: address = 0x68000; break; // m_question_adr[3] == 7
case 0x3f: address = 0x70000 + m_question_adr[3] * 0x8000; break;
default:
address = 0;
logerror("unknown question rom # = %02X\n",m_question_adr[2]);
}
if(m_question_adr[3] == 6 || m_question_adr[3] > 7)
logerror("question_adr[3] = %02X\n",m_question_adr[3]);
/*
in these offsets they set 0x80... why?
if( (m_question_adr[0] & 0x5f) == 0x00 ||
(m_question_adr[0] & 0x5f) == 0x01 ||
(m_question_adr[0] & 0x5f) == 0x0f ||
(m_question_adr[0] & 0x5f) == 0x56 )
*/
// don't know...
// address |= ((m_question_adr[0] & 0x7f) << 8) | m_question_adr[1];
address |= (m_question_adr[1] << 7) | (m_question_adr[0] & 0x7f);
return questions[address];
}
void coinmstr_state::question_w(offs_t offset, uint8_t data)
{
if(data != m_question_adr[offset])
{
logerror("offset = %d data = %02X\n",offset,data);
}
m_question_adr[offset] = data;
}
uint8_t coinmstr_state::ff_r()
{
return 0xff;
}
// Common memory map
void coinmstr_state::coinmstr_map(address_map &map)
{
map(0x0000, 0xbfff).rom();
map(0xc000, 0xdfff).ram();
map(0xe000, 0xe7ff).ram().w(FUNC(coinmstr_state::quizmstr_bg_w)).share("videoram");
map(0xe800, 0xefff).ram().w(FUNC(coinmstr_state::quizmstr_attr1_w)).share("attr_ram1");
map(0xf000, 0xf7ff).ram().w(FUNC(coinmstr_state::quizmstr_attr2_w)).share("attr_ram2");
map(0xf800, 0xffff).ram().w(FUNC(coinmstr_state::quizmstr_attr3_w)).share("attr_ram3");
}
/* 2x 6462 hardware C000-DFFF & E000-FFFF */
void coinmstr_state::jpcoin_map(address_map &map)
{
map(0x0000, 0xbfff).rom();
map(0xc000, 0xdfff).ram(); /* 2x 6462 hardware */
map(0xe000, 0xe7ff).ram().w(FUNC(coinmstr_state::quizmstr_bg_w)).share("videoram");
map(0xe800, 0xefff).ram().w(FUNC(coinmstr_state::quizmstr_attr1_w)).share("attr_ram1");
map(0xf000, 0xf7ff).ram().w(FUNC(coinmstr_state::quizmstr_attr2_w)).share("attr_ram2");
map(0xf800, 0xffff).ram().w(FUNC(coinmstr_state::quizmstr_attr3_w)).share("attr_ram3");
}
// Different I/O mappping for every game
void coinmstr_state::quizmstr_io_map(address_map &map)
{
map.unmap_value_high();
map.global_mask(0xff);
map(0x00, 0x00).r(FUNC(coinmstr_state::question_r));
map(0x00, 0x03).w(FUNC(coinmstr_state::question_w));
map(0x40, 0x41).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x41, 0x41).r("aysnd", FUNC(ay8910_device::data_r));
map(0x48, 0x4b).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x50, 0x53).nopr();
map(0x50, 0x53).nopw();
map(0x58, 0x5b).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x70, 0x70).w("crtc", FUNC(mc6845_device::address_w));
map(0x71, 0x71).w("crtc", FUNC(mc6845_device::register_w));
map(0xc0, 0xc3).nopr();
map(0xc0, 0xc3).nopw();
}
void coinmstr_state::trailblz_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x00).r(FUNC(coinmstr_state::question_r));
map(0x00, 0x03).w(FUNC(coinmstr_state::question_w));
map(0x40, 0x40).w("crtc", FUNC(mc6845_device::address_w));
map(0x41, 0x41).w("crtc", FUNC(mc6845_device::register_w));
map(0x48, 0x49).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x49, 0x49).r("aysnd", FUNC(ay8910_device::data_r));
map(0x50, 0x53).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); //?
map(0x60, 0x63).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x70, 0x73).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0xc1, 0xc3).nopw();
}
void coinmstr_state::supnudg2_io_map(address_map &map)
{
/*
out 40
in 40
in 43
out 43
out 42
out 48 CRTC
out 49 CRTC
in 53
out 53
out 52
out 50
in 69
out 69
out 68
in 6B
out 6B
out 6A
out C1
out C2
out C3
E0-E1 CRTC
*/
map.unmap_value_high();
map.global_mask(0xff);
map(0x00, 0x00).r(FUNC(coinmstr_state::question_r));
map(0x00, 0x03).w(FUNC(coinmstr_state::question_w));
map(0x48, 0x48).w("crtc", FUNC(mc6845_device::address_w));
map(0x49, 0x49).w("crtc", FUNC(mc6845_device::register_w));
map(0x40, 0x43).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x50, 0x53).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x68, 0x6b).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x78, 0x79).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x79, 0x79).r("aysnd", FUNC(ay8910_device::data_r));
map(0xc0, 0xc1).nopr();
map(0xc0, 0xc3).nopw();
}
void coinmstr_state::pokeroul_io_map(address_map &map)
{
/*
out 68
in 69
in 6B
out 6B
out 6A
in 59
out 59
out 58
out 5B
out 5A
in 7B
out 7B
out 7A
E0-E1 CRTC
*/
map.global_mask(0xff);
map(0x40, 0x40).w("crtc", FUNC(mc6845_device::address_w));
map(0x41, 0x41).w("crtc", FUNC(mc6845_device::register_w));
map(0x48, 0x49).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x49, 0x49).r("aysnd", FUNC(ay8910_device::data_r));
map(0x58, 0x5b).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); /* confirmed */
map(0x68, 0x6b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); /* confirmed */
map(0x78, 0x7b).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); /* confirmed */
map(0xc0, 0xc1).r(FUNC(coinmstr_state::ff_r)); /* needed to boot */
}
void coinmstr_state::jpcoin_io_map(address_map &map)
{
/*
out C0
in C1
in C8
out CA
in D0
out D1
out D2
in DA
out DA
E0-E1 CRTC
*/
map.global_mask(0xff);
map(0xe0, 0xe0).w("crtc", FUNC(mc6845_device::address_w)); /* confirmed */
map(0xe1, 0xe1).w("crtc", FUNC(mc6845_device::register_w)); /* confirmed */
map(0xc0, 0xc1).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0xc1, 0xc1).r("aysnd", FUNC(ay8910_device::data_r));
map(0xc8, 0xcb).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); /* confirmed */
map(0xd0, 0xd3).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0xd8, 0xdb).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); /* confirmed */
// map(0xc0, 0xc1).r(FUNC(coinmstr_state::ff_r)); /* needed to boot */
map(0xc4, 0xc4).r(FUNC(coinmstr_state::ff_r)); /* needed to boot */
}
void coinmstr_state::jpjcoin_io_map(address_map &map)
{
map.global_mask(0xff);
map(0x00, 0x03).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x10, 0x13).rw("pia2", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x20, 0x23).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write));
map(0x28, 0x28).w("crtc", FUNC(mc6845_device::address_w));
map(0x29, 0x29).w("crtc", FUNC(mc6845_device::register_w));
map(0x38, 0x39).w("aysnd", FUNC(ay8910_device::address_data_w));
map(0x39, 0x39).r("aysnd", FUNC(ay8910_device::data_r));
}
static INPUT_PORTS_START( quizmstr )
PORT_START("PIA0.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1) PORT_NAME("Bookkeeping") PORT_TOGGLE /* Button 2 for second page, Button 3 erases data */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE) PORT_TOGGLE
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_START("PIA0.B")
PORT_DIPNAME( 0x01, 0x01, "PIA0.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA1.A")
PORT_DIPNAME( 0x01, 0x01, "PIA1.A" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA1.B")
PORT_DIPNAME( 0x01, 0x01, "PIA1.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA2.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
/* If 0x40 is HIGH the DIP Test Mode does work but bookkeeping shows always 0's */
/* If 0x40 is LOW Bookkeeping does work, but the second page (selected categories) is missing */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("PIA2.B")
PORT_DIPNAME( 0x01, 0x01, "PIA2.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0x02, 0x02, "4-02" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Test Mode" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "NVRAM Reset?" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Self Test" )
PORT_DIPSETTING( 0x00, DEF_STR( No ))
PORT_DIPSETTING( 0x80, DEF_STR( Yes ))
INPUT_PORTS_END
static INPUT_PORTS_START( trailblz )
PORT_START("PIA0.A")
PORT_DIPNAME( 0x01, 0x01, "PIA0.A" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA0.B")
PORT_DIPNAME( 0x01, 0x01, "PIA0.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA1.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_DIPNAME( 0x02, 0x02, "1" )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Cont")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Pass")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Sel")
PORT_DIPNAME( 0x40, 0x40, "Show Refill" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Show Stats" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA1.B")
PORT_DIPNAME( 0x01, 0x01, "PIA1.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA2.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
PORT_START("PIA2.B")
PORT_DIPNAME( 0x01, 0x01, "PIA2.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "4" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Tests" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "NVRAM Reset?" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( supnudg2 ) /* need to find the button 'B' to be playable */
PORT_INCLUDE ( trailblz )
PORT_MODIFY("PIA0.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("1 Pound (5 credits)") // coin x 5
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("50 Pence (2.5 credits)") // coin x 2.5
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("20 Pence (1 credit)") // coin x 1
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("10 Pence (0.5 credit)") // coin x 0.5
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("PIA0.A_0x10")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("PIA0.A_0x20")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("PIA0.A_0x40")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("PIA0.A_0x80")
PORT_MODIFY("PIA1.A")
PORT_DIPNAME( 0x01, 0x01, "PIA1.A" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_MODIFY("PIA2.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_N) PORT_NAME("Pass")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("Button A")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("Button C")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_CODE(KEYCODE_1) PORT_NAME("Start")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_T) PORT_NAME("Test/Check Question Board")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Short Term Meters") PORT_TOGGLE
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Refill") PORT_TOGGLE
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("Remote Credits x5")
PORT_MODIFY("DSW1")
PORT_DIPNAME( 0x01, 0x01, "4" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Tests?" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "NVRAM Reset?" )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "First Install (DIL 8)" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( pokeroul )
PORT_START("PIA0.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Cancel / Collect") PORT_CODE(KEYCODE_N)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hold 1 & 5 (auto?)") PORT_CODE(KEYCODE_Z)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold 2 / Bet / Half Gamble / Previous Hand") PORT_CODE(KEYCODE_X)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Deal / Draw / Gamble") PORT_CODE(KEYCODE_1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Auto Hold") PORT_CODE(KEYCODE_M)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Short Term Meters") PORT_TOGGLE PORT_CODE(KEYCODE_0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Refill Mode") PORT_TOGGLE PORT_CODE(KEYCODE_9)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-8") PORT_CODE(KEYCODE_S)
PORT_START("PIA0.B")
PORT_DIPNAME( 0x01, 0x01, "PIA0.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA1.A")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE (2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE (2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_3") PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_4") PORT_CODE(KEYCODE_W)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_5") PORT_CODE(KEYCODE_E)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_6") PORT_CODE(KEYCODE_R)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_7") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PIA1.A_8") PORT_CODE(KEYCODE_Y)
PORT_START("PIA1.B")
PORT_DIPNAME( 0x01, 0x01, "PIA1.B" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("PIA2.A")