summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/maygayv1.cpp
blob: cbe8b4a55edce103ee6af4f31dfb9b41a0af9615 (plain) (blame)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
// license:BSD-3-Clause
// copyright-holders:Philip Bennett
/***************************************************************************

    MAYGAY MV1 hardware

    preliminary driver by Phil Bennett

    Games supported:
        * Screen Play

    Other games on this hardware (incomplete dumps)
        * Believe it or not?
        * Caesar's Palace (reel to video)
        * Crossword Quiz
        * Give us a Clue
        * Special Effects (reel to video)
        * World Cup (reel to video)


Main MV1 board:

U1 ST 8901 TS68000CP12
U2 ST M74HC04B1 99135R
U3 ST 16S25HB1 9235 (think this is the gal chip)
U4 ST M74HC138B1 99131R
U5 P8948G MM74HC05N
U6 ST M74HC74B1 99144R
U7 ST M74HC08B1 99135R
U8 ST NE556N 99135
U9 ST M74HC259B1 99148R
U10 ST M74HC237B1 99148R
U11 ULN2803A 9135
U12 ST M74HC74B1 99144R
U13 ST M74HC32B1 99041R
U14 ST M74HCO4B1 99135R
U15 27C010 (Game Rom)
U16 27C010 (Game Rom)
U17 27C010 (Game Rom)
U18 27C010 (Game Rom)
U19 HYUNDAI HY6264ALP- 10 9147T
U20 HYUNDAI HY6264ALP- 10 9147T
U21 NEC IRELAND D8279C- 2 9135X8006]
U22 ULN2803A 9135
U23 ULN2803A 9135
U24 TEXAS INSTRUMENT F 9140 AN SN74HC148N
U25 ST 2 9148 EF68B21P
U26 Can't see one on the board!
U27 MOTOROLA MC68681P 14PT18715
U28 ST MC1488P 99136
U29 ST MC1489AP 99148
U30 ST HCF 4514 BE 2 9049
U31 MOTOROLA MC74F139N XXAA9145
U32 TEXAS INSTRUMENT TMS4464- 12NL IHE 9145
U33 TEXAS INSTRUMENT TMS4464- 12NL IHE 9114
U34 TEXAS INSTRUMENT TMS4464- 12NL IHE 9145
U35 TEXAS INSTRUMENT TMS4464- 12NL IHE 9114
U36 MHS S-82716-4 9210
U37 TEXAS INSTRUMENT TMS4464- 12NL IHE 9114
U38 TEXAS INSTRUMENT TMS4464- 12NL IHE 9145
U39 TEXAS INSTRUMENT TMS4464- 12NL IHE 9145
U40 TEXAS INSTRUMENT TMS4464- 12NL IHE 9114
U41 ST M74HC244B1 99131R
U42 ST M74HC244B1 99131R
U43 ST M74HC245B1 99136R
U44 ST M74HC245B1 99136R
U45 ST M74HC00B1 99135R
U46 ULN2803A 9135
U47 ULN2803A 9135
U48 YM2413 9127 HADG
U49 78L05 .194

The memory card that plugs in has 4 M27C010 game roms on.

The extra digital and reel board has the following:

U1 GS G06 KOREA GD74HC245
U2 SIEMENS SAB 8032B-P SINGAPORE BB INTEL 80 9148
U3 M27C512 (reels rom)
U4 ST M74HC373B1 99205R
U5 TEXAS INSTRUMENT 14530QT SN75155P
U6 ULN 2803A 9203
U7 ST M74HC374B1 99205R
U8 ST M74HC374B1 99205R
U9 ULN 2803A 9203
U10 ULN 2803A 9203
U11 ULN 2803A 9203
U12 M27C010 (Sound Rom)
U13 NEC JAPAN D7759C 9015KP009
U14 ST M74HC373B1 99205R
U15 Can't see one on the board!
U16 MOTOROLA MC74HC04AN FFA09202




upd7759 change:

* Only accept FIFO bytes when the chip is playing!!!

Port 1 is connected directly to the upd bus.
upd /CE is grounded
/WR bit is

Toggle reset pin
Write data on port 1
Toggle WR bit...

Then, it goes off to write.

INT1  Power failure?
INT2  -
INT3  V Sync
INT4  -
INT5  68681 DUART
INT6  -
INT7  -


DUART: 0 = Power failure

M68681 Output port drives slides

Todo:

Find lamps/reels after UPD changes.
***************************************************************************/

#include "emu.h"
#include "video/awpvid.h"

#include "cpu/m68000/m68000.h"
#include "cpu/mcs51/mcs51.h"
#include "machine/6821pia.h"
#include "machine/i8279.h"
#include "machine/mc68681.h"
#include "machine/nvram.h"
#include "sound/upd7759.h"
#include "sound/ym2413.h"

#include "screen.h"
#include "speaker.h"


/*************************************
 *
 *  Defines
 *
 *************************************/

#define DUART_CLOCK     XTAL(3'686'400)
#define PIXEL_CLOCK     0
#define MASTER_CLOCK    XTAL(16'000'000)
#define SOUND_CLOCK     XTAL(11'059'200)

/*************************************
 *
 *  Video hardware
 *
 *************************************/


#define VREG(a)     i82716.r[a]

enum
{
	VCR0 = 0,
	VCR1,
	RWBA,
	DWBA,
	DWSLM,
	DSBA,
	PAQ,
	ODTBA,
	ATBA,
	CTBA,
	CBASE,
	ATBAC,
	HVCONST0,
	HVCONST1,
	HVCONST2,
	HVCONST3
};

#define VCR0_UCF            0x0001
#define VCR0_DEI            0x0002
#define VCR0_SAB            0x0004
#define VCR0_DEN            0x0008
#define VCR0_HRS            0x0010
#define VCR0_DOF            0x0020

#define VCR0_DS_MASK        0x00c0
#define VCR0_DS_SHIFT       6
#define VCR0_BLINK_MASK     0x1f00
#define VCR0_BLINK_SHIFT    8
#define VCR0_DUTY_MASK      0xe000
#define VCR0_DUTY_SHIFT     13

static const uint32_t banks[4] = { 0, 0x40000/2, 0x20000/2, 0x60000/2 };

#define DRAM_BANK_SEL       (banks[(VREG(DSBA) >> 7) & 3])

struct i82716_t
{
	uint16_t  r[16];
	std::unique_ptr<uint16_t[]>  dram;

	std::unique_ptr<uint8_t[]>   line_buf;  // there's actually two
};


class maygayv1_state : public driver_device
{
public:
	maygayv1_state(const machine_config &mconfig, device_type type, const char *tag) :
		driver_device(mconfig, type, tag),
		m_maincpu(*this, "maincpu"),
		m_soundcpu(*this, "soundcpu"),
		m_upd7759(*this, "upd"),
		m_duart68681(*this, "duart68681"),
		m_palette(*this, "palette"),
		m_lamp(*this, "lamp%u", 0U)
	{ }

	DECLARE_WRITE16_MEMBER(i82716_w);
	DECLARE_READ16_MEMBER(i82716_r);
	DECLARE_WRITE16_MEMBER(write_odd);
	DECLARE_READ16_MEMBER(read_odd);
	DECLARE_WRITE16_MEMBER(vsync_int_ctrl);
	DECLARE_READ8_MEMBER(mcu_r);
	DECLARE_WRITE8_MEMBER(mcu_w);
	DECLARE_READ8_MEMBER(b_read);
	DECLARE_WRITE8_MEMBER(b_writ);
	DECLARE_WRITE8_MEMBER(strobe_w);
	DECLARE_WRITE8_MEMBER(lamp_data_w);
	DECLARE_READ8_MEMBER(kbd_r);
	void init_screenpl();
	uint32_t screen_update_maygayv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
	DECLARE_WRITE_LINE_MEMBER(screen_vblank_maygayv1);
	DECLARE_WRITE8_MEMBER(data_from_i8031);
	DECLARE_READ8_MEMBER(data_to_i8031);
	DECLARE_WRITE_LINE_MEMBER(duart_irq_handler);
	DECLARE_WRITE_LINE_MEMBER(duart_txa);
	void maygayv1(machine_config &config);
	void main_map(address_map &map);
	void sound_data(address_map &map);
	void sound_io(address_map &map);
	void sound_prg(address_map &map);

protected:
	virtual void machine_start() override;
	virtual void machine_reset() override;
	virtual void video_start() override;

private:
	required_device<cpu_device> m_maincpu;
	required_device<i8052_device> m_soundcpu;
	required_device<upd7759_device> m_upd7759;
	required_device<mc68681_device> m_duart68681;
	required_device<palette_device> m_palette;

	int m_lamp_strobe;
	int m_old_lamp_strobe;
	int m_vsync_latch_preset;
	uint8_t m_p1;
	uint8_t m_p3;
	int m_d68681_val;
	i82716_t m_i82716;
	output_finder<8 * 256> m_lamp;
};




WRITE16_MEMBER(maygayv1_state::i82716_w)
{
	i82716_t &i82716 = m_i82716;
	// Accessing register window?
	if ((VREG(RWBA) & 0xfff0) == (offset & 0xfff0))
	{
		// Register segment is fixed at start of DRAM
		COMBINE_DATA(&i82716.dram[offset & 0xf]);
	}

	// Accessing data window?
	// TODO: mask
	if (offset >= (VREG(DWBA) & 0xf800))
	{
		offset -= (VREG(DWBA) & 0xf800);
		COMBINE_DATA(&i82716.dram[DRAM_BANK_SEL + (VREG(DSBA) & 0xf800) + offset]);
	}
}

READ16_MEMBER(maygayv1_state::i82716_r)
{
	i82716_t &i82716 = m_i82716;
	// Accessing register window?
	if ((VREG(RWBA) & ~0xf) == (offset & ~0xf))
	{
		return(i82716.r[offset & 0xf]);
	}

	// Accessing data window? TODO: mask?
	if (VREG(VCR1) & 4)
	{
		if (offset >= (VREG(DWBA) & 0xf800))
		{
			offset -= (VREG(DWBA) & 0xf800);
			return i82716.dram[DRAM_BANK_SEL +(VREG(DSBA) & 0xf800) + (offset)];
		}
	}

	return 0;
}

void maygayv1_state::video_start()
{
}


uint32_t maygayv1_state::screen_update_maygayv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	i82716_t &i82716 = m_i82716;
	uint16_t *atable = &i82716.dram[VREG(ATBA)];
	uint16_t *otable = &i82716.dram[VREG(ODTBA) & 0xfc00];  // both must be bank 0

	int sl, sx;
	int slmask = 0xffff;     // TODO: Save if using scanline callbacks
	int xbound = (VREG(DWBA) & 0x3f8) | 7;

	/* Sign extend to 10 bits */
	xbound = (xbound & 0x3ff) - (xbound & 0x400);

	/* If screen output is disabled, fill with black */
	if (!(VREG(VCR0) & VCR0_DEN))
	{
		bitmap.fill(m_palette->black_pen(), cliprect);
		return 0;
	}

	/* For every scanline... */
	for (sl = cliprect.min_x; sl <= cliprect.max_y; ++sl)
	{
		int obj;
		uint16_t aflags = atable[sl];
		uint16_t slmask_old = slmask;

		uint16_t *bmp_ptr = &bitmap.pix16(sl);

		slmask = 0xffff ^ (slmask ^ aflags);

		/* Clear the frame buffer on each line to BG colour (palette entry 2) */
		/* 4bpp only ! */
		memset(i82716.line_buf.get(), 0x22, 512);

		/* Parse the list of 16 objects */
		for (obj = 0; obj < 16; ++obj)
		{
			int offs = obj * 4;

			// Draw on this line?
			if ( !BIT(slmask, obj) )
			{
				uint32_t  objbase, trans, width;
				int32_t   x, xpos;
				uint16_t  w0, w1, w2;
				uint16_t  *objptr;
				uint8_t *bmpptr; // ?

				/* Get object table entry words */
				w0 = otable[offs];
				w1 = otable[offs + 1];
				w2 = otable[offs + 2];

				/* Blanked */
				if ( BIT(w0, 4) )
					break;

//              if ( BIT(w0, 5) )
//                  printf("Blinking\n");

				/* Resolution: either 4bpp or 2bpp */
//              res = (w0 >> 9) & 3;


				/* Expand 2bpp to 3bpp */
				//cspec = (w0 & 3) << 2;

				if ( BIT(w0, 11) )
				{
					logerror("i82716: Characters not supported\n");
					break;
				}

				/* 10-bit signed - in terms of bytes */
				xpos = (w1 & 0x3ff);
				xpos = (xpos & 0x3ff) - (xpos & 0x400);

				/* Transparency detect enable */
				trans = BIT(w0, 2);

				/* Width is expressed in units of 64-bit words */
				width = (w1 >> 10) & 0x3f;

				/* First scanline? Clear current object entry address */
				if ( BIT(slmask_old, obj) )
					otable[offs + 3] = 0;

				/* Bitmap data pointer */
				objbase = ((w0 & 0x00c0) << 10) | w2;
				objptr = &i82716.dram[objbase + ((4 * width) * otable[offs + 3])];

				// endian alert
				bmpptr = (uint8_t*)objptr;

				// 4bpp
				for (x = xpos; x < std::min(xbound, int(xpos + width * 8)); ++x)
				{
					if (x >= 0)
					{
						uint8_t p1 = *bmpptr & 0xf;
						uint8_t p2 = *bmpptr >> 4;

						if (!trans || p1)
							i82716.line_buf[x] = p1;

						if (!trans || p2)
							i82716.line_buf[x] |= p2 << 4;
					}
					bmpptr++;
				}

				/* Update scanline pointer - WRONG */
				otable[offs + 3]++;
			}
		}

		// Write it out
		for (sx = cliprect.min_x; sx < cliprect.max_x; sx += 2)
		{
			uint8_t pix = i82716.line_buf[sx / 2];

			bmp_ptr[sx + 0] = pix & 0xf;
			bmp_ptr[sx + 1] = pix >> 4;
		}
	}

	return 0;
}

WRITE_LINE_MEMBER(maygayv1_state::screen_vblank_maygayv1)
{
	// rising edge
	if (state)
	{
		i82716_t &i82716 = m_i82716;
		// UCF
		if (VREG(VCR0) & VCR0_UCF)
		{
			int i;

			for (i = 0; i < 16; ++i)
				VREG(i) = i82716.dram[i];
		}
		else
		{
			VREG(VCR0) = i82716.dram[VCR0];
			VREG(ATBA) = i82716.dram[ATBA];
		}

		if (!(VREG(VCR0) & VCR0_DEI))
		{
			int i;
			uint16_t *palbase = &i82716.dram[VREG(CTBA)];

			for (i = 0; i < 16; ++i)
			{
				uint16_t entry = *palbase++;
				m_palette->set_pen_color(entry & 0xf, pal4bit(entry >> 12), pal4bit(entry >> 8), pal4bit(entry >> 4));
			}
		}

		if (m_vsync_latch_preset)
			m_maincpu->set_input_line(3, ASSERT_LINE);
	}
}



/*************************************
 *
 *  68000 CPU memory handlers
 *
 *************************************/

/*
    68681
    YM2413
    68B21
    8279C

    8a0008 0xe0
    8a000c 0x7
    8a000e 0x33
    8a000a 0x8
    8a001c 0xff R/W
*/



WRITE16_MEMBER(maygayv1_state::write_odd)
{
}

//;860008 is a latch of some sort
READ16_MEMBER(maygayv1_state::read_odd)
{
	return 0;
}

/*************************************
 *
 *  8279 display/keyboard driver
 *
 *************************************/

WRITE8_MEMBER( maygayv1_state::strobe_w )
{
	m_lamp_strobe = data;
}

WRITE8_MEMBER( maygayv1_state::lamp_data_w )
{
	//The two A/B ports are merged back into one, to make one row of 8 lamps.

	if (m_old_lamp_strobe != m_lamp_strobe)
	{
		// Because of the nature of the lamping circuit, there is an element of persistance
		// As a consequence, the lamp column data can change before the input strobe without
		// causing the relevant lamps to black out.

		for (int i = 0; i < 8; i++)
		{
			m_lamp[(8*m_lamp_strobe)+i] = BIT(data, i);
		}
		m_old_lamp_strobe = m_lamp_strobe;
	}

}

READ8_MEMBER( maygayv1_state::kbd_r )
{
	static const char *const portnames[] = { "STROBE1","STROBE2","STROBE3","STROBE4","STROBE5","STROBE6","STROBE7","STROBE8" };

	return ioport(portnames[m_lamp_strobe&0x07])->read();
}

WRITE16_MEMBER(maygayv1_state::vsync_int_ctrl)
{
	m_vsync_latch_preset = data & 0x0100;

	// Active low
	if (!(m_vsync_latch_preset))
		m_maincpu->set_input_line(3, CLEAR_LINE);
}

void maygayv1_state::main_map(address_map &map)
{
	map(0x000000, 0x07ffff).rom();
	map(0x080000, 0x083fff).ram().share("nvram");
	map(0x100000, 0x17ffff).rom().region("maincpu", 0x80000);
	map(0x820001, 0x820001).rw("i8279", FUNC(i8279_device::data_r), FUNC(i8279_device::data_w));
	map(0x820003, 0x820003).rw("i8279", FUNC(i8279_device::status_r), FUNC(i8279_device::cmd_w));
	map(0x800000, 0x800003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0xff00);
	map(0x860000, 0x86000d).rw(this, FUNC(maygayv1_state::read_odd), FUNC(maygayv1_state::write_odd));
	map(0x86000e, 0x86000f).w(this, FUNC(maygayv1_state::vsync_int_ctrl));
	map(0x880000, 0x89ffff).rw(this, FUNC(maygayv1_state::i82716_r), FUNC(maygayv1_state::i82716_w));
	map(0x8a0000, 0x8a001f).rw(m_duart68681, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff);
	map(0x8c0000, 0x8c000f).r("pia", FUNC(pia6821_device::read)).umask16(0x00ff);
	map(0x8c0000, 0x8c000f).w("pia", FUNC(pia6821_device::write)).umask16(0xff00);
}


/*************************************
 *
 *  8032 CPU memory handlers
 *
 *************************************/

/*
 74HC245 @ U1 read port
 (P3.4 = /ENABLE)
 P1.0 = Reel 1 optic (I)
 P1.1 = Reel 2 optic (I)
 P1.2 = Reel 3 optic (I)
 P1.3
 P1.4 = DIPSWITCH (GND/ON by default)
 P1.5 = DIPSWITCH (GND/ON by default)
 P1.6 = DIPSWITCH (GND/ON by default)
 P1.7 = DIPSWITCH (GND/ON by default)

 WRITE
 P1.0 - 7 => D7759C
          => 74HC374 @ U8 write port (CLK = 3.7)

 P3.0 = RXD
 P3.1 = TXD
 P3.2 = /UPD_RESET
 P3.3 = !(/UPD_BUSY)
 P3.4 = U1 /ENABLE
 P3.5 = Status LED (inverted twice)
 P3.6 = (WR) /UPD_START
 P3.7 = (RD) U8 CLK - for writing! P1



*/

READ8_MEMBER(maygayv1_state::mcu_r)
{
	switch (offset)
	{
		case 1:
		{
			if ( !BIT(m_p3, 4) )
				return (ioport("REEL")->read());    // Reels???
			else
				return 0;
		}

		case 3: return m_upd7759->busy_r() ? 0 : 0x08;
	}
	return 0;
}

WRITE8_MEMBER(maygayv1_state::mcu_w)
{
			logerror("O %x D %x",offset,data);

	switch (offset)
	{
		// Bottom nibble = UPD
		case 1:
			m_p1 = data;
//          m_upd7759->msg_w(data);//?
			break;
		case 3:
			m_upd7759->reset_w (BIT(data, 2));
			m_upd7759->start_w(BIT(data, 6));

//          if ( !BIT(m_p3, 7) && BIT(data, 7) )
				// P1 propagates to outputs

			m_p3 = data;
			break;
	}
}


void maygayv1_state::sound_prg(address_map &map)
{
	map(0x0000, 0xffff).rom();
}

void maygayv1_state::sound_data(address_map &map)
{
	map(0x0000, 0x1ff).ram(); // nothing?
}

void maygayv1_state::sound_io(address_map &map)
{
	map(0x00, 0xff).rw(this, FUNC(maygayv1_state::mcu_r), FUNC(maygayv1_state::mcu_w));
}


/*************************************
 *
 *  Port definitions
 *
 *************************************/

static INPUT_PORTS_START( screenpl )
	PORT_START("STROBE1")
	PORT_DIPNAME( 0x01, 0x01, "DSW01")
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x02, 0x02, "DSW02")
	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x04, 0x04, "DSW03")
	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x08, 0x08, "DSW04")
	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x10, 0x10, "Stake selection?")
	PORT_DIPSETTING(    0x10, "5p" )
	PORT_DIPSETTING(    0x00, "10p" )
	PORT_DIPNAME( 0x20, 0x20, "DSW06")
	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x40, 0x40, "DSW07")
	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x80, 0x80, "DSW08")
	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )

	PORT_START("STROBE2")
	PORT_DIPNAME( 0x01, 0x01, "Test")
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )

	PORT_START("STROBE3")
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Unknown 1")
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Nudge 1")
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Nudge 2")
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Nudge 3")
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Unknown 2")
	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Collect")
	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Unknown 3")
	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Spin")

	PORT_START("STROBE4")
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Red")
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow")
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Green")
	PORT_DIPNAME( 0x08, 0x08, "DSW34")
	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x10, 0x10, "DSW35")
	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x20, 0x20, "Jackpot Selection")
	PORT_DIPSETTING(    0x20, "600p" )
	PORT_DIPSETTING(    0x00, "300p" )
	PORT_DIPNAME( 0x40, 0x40, "Reset?")
	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x80, 0x00, "Cash door")
	PORT_DIPSETTING(    0x80, "Open"   )
	PORT_DIPSETTING(    0x00, "Closed" )

	PORT_START("STROBE5")
	PORT_DIPNAME( 0x01, 0x01, "DSW41")
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x02, 0x02, "Re-fill key")
	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x04, 0x04, "DSW43")
	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x08, 0x08, "DSW44")
	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x10, 0x10, "DSW45")
	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x20, 0x20, "DSW46")
	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x40, 0x40, "DSW47")
	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x80, 0x80, "DSW48")
	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )

	PORT_START("STROBE6")
	PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )

	PORT_START("STROBE7")
	PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )

	PORT_START("STROBE8")
	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_NAME("Token")
	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_NAME("100p")
	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("50p")
	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("20p")
	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("10p")
	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNKNOWN )

	PORT_START("REEL")
	PORT_DIPNAME( 0x01, 0x00, "REEL 1")
	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x02, 0x00, "REEL 2")
	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x04, 0x00, "REEL 3")
	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x08, 0x00, "REEL 4")
	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x10, 0x00, "MCU DIP1")
	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x20, 0x00, "MCU DIP2")
	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x40, 0x00, "MCU DIP3")
	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
	PORT_DIPNAME( 0x80, 0x00, "MCU DIP4")
	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
INPUT_PORTS_END


/*************************************
 *
 *  Machine driver
 *
 *************************************/

/***************************************************************************

    68681 DUART

***************************************************************************/

WRITE_LINE_MEMBER(maygayv1_state::duart_irq_handler)
{
	m_maincpu->set_input_line_and_vector(5, state, m_duart68681->get_irq_vector());
//  m_maincpu->set_input_line(5, state ? ASSERT_LINE : CLEAR_LINE);
}


WRITE_LINE_MEMBER(maygayv1_state::duart_txa)
{
	m_d68681_val = state;
	m_soundcpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);  // ?
}

READ8_MEMBER(maygayv1_state::data_to_i8031)
{
	return m_d68681_val;
}

WRITE8_MEMBER(maygayv1_state::data_from_i8031)
{
	m_duart68681->rx_a_w(data);
}

READ8_MEMBER(maygayv1_state::b_read)
{
	// Meters - upper nibble?
	return 0xff;
}

WRITE8_MEMBER(maygayv1_state::b_writ)
{
	logerror("B WRITE %x\n",data);
}


void maygayv1_state::machine_start()
{
	m_lamp.resolve();
	i82716_t &i82716 = m_i82716;
	i82716.dram = std::make_unique<uint16_t[]>(0x80000/2);   // ???
	i82716.line_buf = std::make_unique<uint8_t[]>(512);

	save_pointer(NAME(i82716.dram.get()), 0x40000);
}

void maygayv1_state::machine_reset()
{
	i82716_t &i82716 = m_i82716;
	// ?
	memset(i82716.dram.get(), 0, 0x40000);
	i82716.r[RWBA] = 0x0200;
}


MACHINE_CONFIG_START(maygayv1_state::maygayv1)
	MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK / 2)
	MCFG_DEVICE_PROGRAM_MAP(main_map)

	MCFG_DEVICE_ADD("soundcpu", I8052, SOUND_CLOCK)
	MCFG_DEVICE_PROGRAM_MAP(sound_prg)
	MCFG_DEVICE_DATA_MAP(sound_data)
	MCFG_DEVICE_IO_MAP(sound_io)
	MCFG_MCS51_SERIAL_TX_CB(WRITE8(*this, maygayv1_state, data_from_i8031))
	MCFG_MCS51_SERIAL_RX_CB(READ8(*this, maygayv1_state, data_to_i8031))

	/* U25 ST 2 9148 EF68B21P */
	MCFG_DEVICE_ADD("pia", PIA6821, 0)
	MCFG_PIA_READPA_HANDLER(READ8(*this, maygayv1_state, b_read))
	MCFG_PIA_READPB_HANDLER(READ8(*this, maygayv1_state, b_read))
	MCFG_PIA_WRITEPA_HANDLER(WRITE8(*this, maygayv1_state, b_writ))
	MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, maygayv1_state, b_writ))

	MCFG_NVRAM_ADD_0FILL("nvram")

	/* TODO: Use real video timings */
	MCFG_SCREEN_ADD("screen", RASTER)
	MCFG_SCREEN_REFRESH_RATE(60)
	MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
	MCFG_SCREEN_SIZE(640, 300)
	MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 300 - 1)
	MCFG_SCREEN_UPDATE_DRIVER(maygayv1_state, screen_update_maygayv1)
	MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, maygayv1_state, screen_vblank_maygayv1))
	MCFG_SCREEN_PALETTE("palette")

	MCFG_PALETTE_ADD("palette", 16)

	MCFG_DEVICE_ADD("duart68681", MC68681, DUART_CLOCK)
	MCFG_MC68681_IRQ_CALLBACK(WRITELINE(*this, maygayv1_state, duart_irq_handler))
	MCFG_MC68681_A_TX_CALLBACK(WRITELINE(*this, maygayv1_state, duart_txa))

	MCFG_DEVICE_ADD("i8279", I8279, MASTER_CLOCK/4)    // unknown clock
	MCFG_I8279_OUT_SL_CB(WRITE8(*this, maygayv1_state, strobe_w))      // scan SL lines
	MCFG_I8279_OUT_DISP_CB(WRITE8(*this, maygayv1_state, lamp_data_w)) // display A&B
	MCFG_I8279_IN_RL_CB(READ8(*this, maygayv1_state, kbd_r))                   // kbd RL lines

	SPEAKER(config, "mono").front_center();

	MCFG_DEVICE_ADD("ymsnd",YM2413, MASTER_CLOCK / 4)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)

	MCFG_DEVICE_ADD("upd",UPD7759)
	MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END


/*************************************
 *
 *  ROM definitions
 *
 *************************************/

ROM_START( screenpl )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "20p6pnd_u15.bin", 0x00000, 0x20000, CRC(4334453c) SHA1(5c18acf29c7b3f44589b92d74b79ac66730db810) )
	ROM_LOAD16_BYTE( "20p6pnd_u16.bin", 0x00001, 0x20000, CRC(90b3f67c) SHA1(a58a0bc4ccccf083fe3222f02eb06ee5fa6f386a) )
	ROM_LOAD16_BYTE( "20p6pnd_u17.bin", 0x40000, 0x20000, CRC(ba576b11) SHA1(3ba7bcaf4e3cc4eaeeece6e3f4957c3a8dfd5752) )
	ROM_LOAD16_BYTE( "20p6pnd_u18.bin", 0x40001, 0x20000, CRC(24dd1aff) SHA1(833c59e5b75130a8dc3a63027e09c0f5c7ed17f5) )

	ROM_LOAD16_BYTE( "20p6pnd_u2.bin",  0x80000, 0x20000, CRC(ee51ed98) SHA1(262e773cdb1465983a8f931698bc73de7c324088) )
	ROM_LOAD16_BYTE( "20p6pnd_u1.bin",  0x80001, 0x20000, CRC(d57bbe69) SHA1(b7cd93cef4828418328ca4ff16c496da7b2065e2) )
	ROM_LOAD16_BYTE( "20p6pnd_u4.bin",  0xc0000, 0x20000, CRC(01aafd7e) SHA1(d2161066655218468da8eae8aa9da8a80c07c489) )
	ROM_LOAD16_BYTE( "20p6pnd_u3.bin",  0xc0001, 0x20000, CRC(aa02dc54) SHA1(a05c8c26480f3bae671428380c7684b9c29b5a53) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x0000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "sound.bin", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp1 )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa4-379.u15", 0x00000, 0x20000, CRC(e21b120d) SHA1(bcdebf797381b0c585dbd3511b5e984f22de2206) )
	ROM_LOAD16_BYTE( "sa4-379.u16", 0x00001, 0x20000, CRC(b04588b7) SHA1(1f9b933e441969c95bbbabbfbe44349bd945c326) )
	ROM_LOAD16_BYTE( "sa4-379.u17", 0x40000, 0x20000, CRC(4b6cdc43) SHA1(1d6a4796ce67d0d00fe74a6bafd8b731450cdaab) )
	ROM_LOAD16_BYTE( "sa4-379.u18", 0x40001, 0x20000, CRC(d986355f) SHA1(86d3f1712cd1bcc90a54945a2baccae2596de691) )

	ROM_LOAD16_BYTE( "sq3-458.u2",  0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "sq3-458.u1",  0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "sq3-458.u4",  0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "sq3-458.u3",  0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "sr2-002", 0x0000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp1a ) // the same as screenp1 apart from the rom at u15
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa4-378.u15", 0x00000, 0x20000, CRC(a5c0e623) SHA1(cd3215db924bbee80f5b3fbbd391c7246ad88c69) )
	ROM_LOAD16_BYTE( "sa4-378.u16", 0x00001, 0x20000, CRC(b04588b7) SHA1(1f9b933e441969c95bbbabbfbe44349bd945c326) )
	ROM_LOAD16_BYTE( "sa4-378.u17", 0x40000, 0x20000, CRC(4b6cdc43) SHA1(1d6a4796ce67d0d00fe74a6bafd8b731450cdaab) )
	ROM_LOAD16_BYTE( "sa4-378.u18", 0x40001, 0x20000, CRC(d986355f) SHA1(86d3f1712cd1bcc90a54945a2baccae2596de691) )

	ROM_LOAD16_BYTE( "sq3-458.u2",  0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "sq3-458.u1",  0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "sq3-458.u4",  0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "sq3-458.u3",  0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "sr2-002", 0x0000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp2 ) // exactly the same set has been seen with code sa5-196
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa4-280.u15", 0x00000, 0x20000, CRC(d7206438) SHA1(70e7dc7d58bfa7dfe00250ab46fa71e951dbf901) )
	ROM_LOAD16_BYTE( "sa4-280.u16", 0x00001, 0x20000, CRC(f99e972f) SHA1(b01c8796967ff7f27269b31ef983b5fb26b03aab) )
	ROM_LOAD16_BYTE( "sa4-280.u17", 0x40000, 0x20000, CRC(cbde5343) SHA1(e341d642d8537bc221b3ca9803c221dc0cdf86c3) )
	ROM_LOAD16_BYTE( "sa4-280.u18", 0x40001, 0x20000, CRC(885b887b) SHA1(9cfb145c8cca49450fabbf4efab9c70f98ecd2af) )

	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp2a ) // the same as screenp2 apart from the rom at u15
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa5-197.u15", 0x00000, 0x20000, CRC(4c067b11) SHA1(2364421b2f92669c3c164a170017bdf255134004) )
	ROM_LOAD16_BYTE( "sa5-197.u16", 0x00001, 0x20000, CRC(f99e972f) SHA1(b01c8796967ff7f27269b31ef983b5fb26b03aab) )
	ROM_LOAD16_BYTE( "sa5-197.u17", 0x40000, 0x20000, CRC(cbde5343) SHA1(e341d642d8537bc221b3ca9803c221dc0cdf86c3) )
	ROM_LOAD16_BYTE( "sa5-197.u18", 0x40001, 0x20000, CRC(885b887b) SHA1(9cfb145c8cca49450fabbf4efab9c70f98ecd2af) )

	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp3 )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa5-082.u15", 0x00000, 0x20000, CRC(ef98977d) SHA1(1cbbd4024b2076adc672b2a53fc8696615ce6eac) )
	ROM_LOAD16_BYTE( "sa5-082.u16", 0x00001, 0x20000, CRC(214823be) SHA1(db98ff915f1956e275425b48c4d829c407c81ed6) )
	ROM_LOAD16_BYTE( "sa5-082.u17", 0x40000, 0x20000, CRC(6e3b5259) SHA1(fb0e42a995768dfc08549a75021306978740ff85) )
	ROM_LOAD16_BYTE( "sa5-082.u18", 0x40001, 0x20000, CRC(fb1af777) SHA1(afc4123bc61900d41bd321aa7eb7fb0f982a9501) )

	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp3a )
	ROM_REGION( 0x100000, "maincpu", 0 ) // only  u16 differs from above set
	ROM_LOAD16_BYTE( "sa5-083.u15", 0x00000, 0x20000, CRC(ef98977d) SHA1(1cbbd4024b2076adc672b2a53fc8696615ce6eac) )
	ROM_LOAD16_BYTE( "sa5-083.u16", 0x00001, 0x20000, CRC(84e17aa1) SHA1(cbc77315cb311a217d2b9092ffb3e3aee07a9633) )
	ROM_LOAD16_BYTE( "sa5-083.u17", 0x40000, 0x20000, CRC(6e3b5259) SHA1(fb0e42a995768dfc08549a75021306978740ff85) )
	ROM_LOAD16_BYTE( "sa5-083.u18", 0x40001, 0x20000, CRC(fb1af777) SHA1(afc4123bc61900d41bd321aa7eb7fb0f982a9501) )

	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

ROM_START( screenp4 )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sply5p15", 0x00000, 0x20000, CRC(c1e956d8) SHA1(364bfa7d3d90bcbb50720e02b3330503002e6fe3) )
	ROM_LOAD16_BYTE( "sply5p16", 0x00001, 0x20000, CRC(e23e7e33) SHA1(0c73a5da1e52ae74427222acdbe81c16f0ba334c) )
	// not sure which other roms these pair with.. but the ones below work
	ROM_LOAD16_BYTE( "sa4-280.u17", 0x40000, 0x20000, CRC(cbde5343) SHA1(e341d642d8537bc221b3ca9803c221dc0cdf86c3) )
	ROM_LOAD16_BYTE( "sa4-280.u18", 0x40001, 0x20000, CRC(885b887b) SHA1(9cfb145c8cca49450fabbf4efab9c70f98ecd2af) )

	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, CRC(7091dfcd) SHA1(d28abd70db5c49baa93f0488e443f29c27a7a559) )
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, CRC(1bb0efbf) SHA1(59d7e2e51928df149764502bc4bd5736463f40d7) )
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, CRC(0fb0fc84) SHA1(e7ef68130f9627a842849f41f67accf8593a0819) )
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, CRC(ef4617d8) SHA1(48231405a775585451bf970db5bb57ec2f238250) )

	ROM_REGION( 0x10000, "soundcpu", 0 )
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, CRC(1319cf82) SHA1(7a233072890361bcf384de4f90170c2ca713b1de) )

	ROM_REGION( 0x20000, "upd", 0 )
	ROM_LOAD( "dig2-001.u12", 0x00000, 0x20000, CRC(498dd74f) SHA1(80bb204b3e9cadcecbfa75c78c52fb9908566c5e) )
ROM_END

// are these actually missing from all the other sets, or not used by those games?
#define MV1_MISSING_ROMS \
	ROM_REGION( 0x10000, "soundcpu", 0 ) \
	ROM_LOAD( "reels.bin", 0x00000, 0x10000, NO_DUMP ) \
	ROM_REGION( 0x20000, "upd", 0 ) \
	ROM_LOAD( "upd.bin", 0x00000, 0x20000, NO_DUMP )
#define MV1_MISSING_ROMSU1U4 \
	ROM_LOAD16_BYTE( "u2.bin", 0x80000, 0x20000, NO_DUMP ) \
	ROM_LOAD16_BYTE( "u1.bin", 0x80001, 0x20000, NO_DUMP ) \
	ROM_LOAD16_BYTE( "u4.bin", 0xc0000, 0x20000, NO_DUMP ) \
	ROM_LOAD16_BYTE( "u3.bin", 0xc0001, 0x20000, NO_DUMP )

ROM_START( mv1bon )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sw3-418.u15", 0x00000, 0x020000, CRC(0716a47b) SHA1(acbe903c270d2bb20c408d378007136803f96805) )
	ROM_LOAD16_BYTE( "sw3-418.u16", 0x00001, 0x020000, CRC(0d02369b) SHA1(4acbffb31bf6e98156e0b581e4e81459b33a845e) )
	ROM_LOAD16_BYTE( "sw3-418.u17", 0x40000, 0x020000, CRC(f1ddf287) SHA1(c1f7e92188995e9dbf47d50947bb7941b523b916) )
	ROM_LOAD16_BYTE( "sw3-418.u18", 0x40001, 0x020000, CRC(b81dbac9) SHA1(9549596169cff9b2bbbe12db551122e4d874b274) )
	MV1_MISSING_ROMSU1U4 // complains U1 is bad, so missing.

	MV1_MISSING_ROMS
ROM_END


ROM_START( mv1cpc )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sc4-066.u15", 0x00000, 0x020000, CRC(05599f6c) SHA1(3e2d5bc12c61b23ffbce40fcb1612611241f6db3) )
	ROM_LOAD16_BYTE( "sc4-066.u16", 0x00001, 0x020000, CRC(6e485115) SHA1(1288b83df9cbf8813ff07f53dcf03d3637d42f0e) )
	ROM_LOAD16_BYTE( "sc4-066.u17", 0x40000, 0x020000, CRC(ee7894e6) SHA1(070e1fed8b1b0f2876dbb5ef70b439baf9bbd2d7) )
	ROM_LOAD16_BYTE( "sc4-066.u18", 0x40001, 0x020000, CRC(a2320921) SHA1(424d26368b9452af9aa1760a98474c5b45edf6dd) )
	ROM_LOAD16_BYTE( "sq3-432.u2", 0x80000, 0x020000, CRC(4918a9e1) SHA1(6599c5f0b2ce5dc78758917195c04ae4bb078e94) )
	ROM_LOAD16_BYTE( "sq3-432.u1", 0x80001, 0x020000, CRC(2ee77952) SHA1(8f17d28220a25ad232aab029166a7535d5b5618b) )
	ROM_LOAD16_BYTE( "sq3-432.u4", 0xc0000, 0x020000, CRC(abd2df4d) SHA1(16b3df060094bef0ac41cb3cc71e910323d687f2) )
	ROM_LOAD16_BYTE( "sq3-432.u3", 0xc0001, 0x020000, CRC(7eb80747) SHA1(23158c400497f01ac7eddecf259ed988b6683eb9) )

	MV1_MISSING_ROMS
ROM_END



ROM_START( mv1cpca )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sc4-067.u15", 0x00000, 0x020000, CRC(05599f6c) SHA1(3e2d5bc12c61b23ffbce40fcb1612611241f6db3) )
	ROM_LOAD16_BYTE( "sc4-067.u16", 0x00001, 0x020000, CRC(4068eac8) SHA1(8c9a762c827118b96ec6d257ab828436224a2123) )
	ROM_LOAD16_BYTE( "sc4-067.u17", 0x40000, 0x020000, CRC(ee7894e6) SHA1(070e1fed8b1b0f2876dbb5ef70b439baf9bbd2d7) )
	ROM_LOAD16_BYTE( "sc4-067.u18", 0x40001, 0x020000, CRC(a2320921) SHA1(424d26368b9452af9aa1760a98474c5b45edf6dd) )
	ROM_LOAD16_BYTE( "sq3-432.u2", 0x80000, 0x020000, CRC(4918a9e1) SHA1(6599c5f0b2ce5dc78758917195c04ae4bb078e94) )
	ROM_LOAD16_BYTE( "sq3-432.u1", 0x80001, 0x020000, CRC(2ee77952) SHA1(8f17d28220a25ad232aab029166a7535d5b5618b) )
	ROM_LOAD16_BYTE( "sq3-432.u4", 0xc0000, 0x020000, CRC(abd2df4d) SHA1(16b3df060094bef0ac41cb3cc71e910323d687f2) )
	ROM_LOAD16_BYTE( "sq3-432.u3", 0xc0001, 0x020000, CRC(7eb80747) SHA1(23158c400497f01ac7eddecf259ed988b6683eb9) )

	MV1_MISSING_ROMS
ROM_END



ROM_START( mv1cpcb )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sc5-007.u15", 0x00000, 0x020000, CRC(d7e969ff) SHA1(2cf7bd0b7ae55f5570b699ff1a3a325658409c5c) )
	ROM_LOAD16_BYTE( "sc5-007.u16", 0x00001, 0x020000, CRC(bbc579c7) SHA1(ef1edd28f7015819f470cdf6736377268eee617c) )
	ROM_LOAD16_BYTE( "sc5-007.u17", 0x40000, 0x020000, CRC(f69bbac9) SHA1(27c6d06673a349bd2d0cd44692e0a0482b37c29f) )
	ROM_LOAD16_BYTE( "sc5-007.u18", 0x40001, 0x020000, CRC(6f3979b2) SHA1(09e74d05fb564293e0314e5dcdfb8edde4f1f9ec) )
	ROM_LOAD16_BYTE( "sq3-432.u2", 0x80000, 0x020000, CRC(4918a9e1) SHA1(6599c5f0b2ce5dc78758917195c04ae4bb078e94) )
	ROM_LOAD16_BYTE( "sq3-432.u1", 0x80001, 0x020000, CRC(2ee77952) SHA1(8f17d28220a25ad232aab029166a7535d5b5618b) )
	ROM_LOAD16_BYTE( "sq3-432.u4", 0xc0000, 0x020000, CRC(abd2df4d) SHA1(16b3df060094bef0ac41cb3cc71e910323d687f2) )
	ROM_LOAD16_BYTE( "sq3-432.u3", 0xc0001, 0x020000, CRC(7eb80747) SHA1(23158c400497f01ac7eddecf259ed988b6683eb9) )

	MV1_MISSING_ROMS
ROM_END



ROM_START( mv1cwq )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sw2-319.u15", 0x00000, 0x020000, CRC(0a591eb7) SHA1(dad833711a5779300757e3e0fbe8f55073470724) )
	ROM_LOAD16_BYTE( "sw2-319.u16", 0x00001, 0x020000, CRC(8460cb55) SHA1(793c7e31619e5a30ad8bf851253c8cfcbddefbd7) )
	ROM_LOAD16_BYTE( "sw2-319.u17", 0x40000, 0x020000, CRC(f065c219) SHA1(b83a835a107740e2e846d31b4988237f1e60db78) )
	ROM_LOAD16_BYTE( "sw2-319.u18", 0x40001, 0x020000, CRC(0c291cb3) SHA1(aa7740a7a34e653e9b39a0ce64b344ace9d74e19) )
	MV1_MISSING_ROMSU1U4 // complains U1 is bad, so missing.

	MV1_MISSING_ROMS
ROM_END


ROM_START( mv1cwqa )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sw2-320.u15", 0x00000, 0x020000, CRC(02679239) SHA1(9c3f2ca7048a6ef716dbdd20f9a921e1d505638f) )
	ROM_LOAD16_BYTE( "sw2-320.u16", 0x00001, 0x020000, CRC(8460cb55) SHA1(793c7e31619e5a30ad8bf851253c8cfcbddefbd7) )
	ROM_LOAD16_BYTE( "sw2-320.u17", 0x40000, 0x020000, CRC(f065c219) SHA1(b83a835a107740e2e846d31b4988237f1e60db78) )
	ROM_LOAD16_BYTE( "sw2-320.u18", 0x40001, 0x020000, CRC(0c291cb3) SHA1(aa7740a7a34e653e9b39a0ce64b344ace9d74e19) )
	MV1_MISSING_ROMSU1U4 // complains U1 is bad, so missing.

	MV1_MISSING_ROMS
ROM_END


ROM_START( mv1guac )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sw3-146.u15", 0x00000, 0x020000, CRC(faa7ffa9) SHA1(db7e555727d126c266b6e973b61d1df205256c38) )
	ROM_LOAD16_BYTE( "sw3-146.u16", 0x00001, 0x020000, CRC(1f7209d9) SHA1(b512e28cef973c9b6e0a8b630500a5de08206f32) )
	ROM_LOAD16_BYTE( "sw3-146.u17", 0x40000, 0x020000, CRC(0ecdd43b) SHA1(f666281d4c2a67675d75fc07f7dfd6b53558468a) )
	ROM_LOAD16_BYTE( "sw3-146.u18", 0x40001, 0x020000, CRC(a107f3a9) SHA1(35de6636f2ca07e5db0fc7527b6d94940242e2a3) )
	MV1_MISSING_ROMSU1U4 // complains U1 is bad, so missing.

	MV1_MISSING_ROMS

ROM_END


ROM_START( mv1guaca )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sw3-147.u15", 0x00000, 0x020000, CRC(c2d420ad) SHA1(3fe046fbb5eb51e85926707662e6009732f2d588) )
	ROM_LOAD16_BYTE( "sw3-147.u16", 0x00001, 0x020000, CRC(1f7209d9) SHA1(b512e28cef973c9b6e0a8b630500a5de08206f32) )
	ROM_LOAD16_BYTE( "sw3-147.u17", 0x40000, 0x020000, CRC(0ecdd43b) SHA1(f666281d4c2a67675d75fc07f7dfd6b53558468a) )
	ROM_LOAD16_BYTE( "sw3-147.u18", 0x40001, 0x020000, CRC(a107f3a9) SHA1(35de6636f2ca07e5db0fc7527b6d94940242e2a3) )
	MV1_MISSING_ROMSU1U4 // complains U1 is bad, so missing.

	MV1_MISSING_ROMS
ROM_END

ROM_START( mv1sfx )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa4-005.u15", 0x00000, 0x020000, CRC(07d2cd6a) SHA1(97bf2384241cbd0df4a3a0878c6022bee392611b) )
	ROM_LOAD16_BYTE( "sa4-005.u16", 0x00001, 0x020000, CRC(11c8f456) SHA1(81c6aa0b60c256236416a65c1199afa30b05ff1b) )
	ROM_LOAD16_BYTE( "sa4-005.u17", 0x40000, 0x020000, CRC(f34a0d24) SHA1(377c067068f7a6a73d3c5c6cdb62409116246e71) )
	ROM_LOAD16_BYTE( "sa4-005.u18", 0x40001, 0x020000, CRC(e13c544a) SHA1(206151ad83af5cf939f917bcec6600ca6ffb4544) )

	MV1_MISSING_ROMS
ROM_END


ROM_START( mv1sfxa )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa4-006.u15", 0x00000, 0x020000, CRC(3fa1126e) SHA1(1f94aa796b065f4b63aac31df5f8368623a587ef) )
	ROM_LOAD16_BYTE( "sa4-006.u16", 0x00001, 0x020000, CRC(11c8f456) SHA1(81c6aa0b60c256236416a65c1199afa30b05ff1b) )
	ROM_LOAD16_BYTE( "sa4-006.u17", 0x40000, 0x020000, CRC(f34a0d24) SHA1(377c067068f7a6a73d3c5c6cdb62409116246e71) )
	ROM_LOAD16_BYTE( "sa4-006.u18", 0x40001, 0x020000, CRC(e13c544a) SHA1(206151ad83af5cf939f917bcec6600ca6ffb4544) )

	MV1_MISSING_ROMS
ROM_END

ROM_START( mv1sfx2 )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "fx28.u15", 0x00000, 0x020000, CRC(70e52fa5) SHA1(353bcc610c73ca3d4c14bd9802cf1f394ed702a8) )
	ROM_LOAD16_BYTE( "fx28.u16", 0x00001, 0x020000, CRC(9095fdce) SHA1(2c9db9cc613c6660dad5054f2bef04fec8d6bb17) )
	ROM_LOAD16_BYTE( "fx28.u17", 0x40000, 0x020000, CRC(0015cd0a) SHA1(788dbdbda8e28427f994527a2564ee2fffa38533) )
	ROM_LOAD16_BYTE( "fx28.u18", 0x40001, 0x020000, CRC(d9234071) SHA1(af45a2acc3d10df46a4e096777813fc70a099aee) )
	ROM_LOAD16_BYTE( "sq2-407.u2", 0x80000, 0x020000, CRC(d9f072e0) SHA1(175bee58255dc4b0f840d1bf0a246539fe8f9ba0) )
	ROM_LOAD16_BYTE( "sq2-407.u1", 0x80001, 0x020000, CRC(6a96a535) SHA1(fb1e7986f078f52a1db2707b150727a21c7877fc) )
	ROM_LOAD16_BYTE( "sq2-407.u4", 0xc0000, 0x020000, CRC(4670e71b) SHA1(742d0f0881e0b2e0e66c454c7a2c31da9f65cf08) )
	ROM_LOAD16_BYTE( "sq2-407.u3", 0xc0001, 0x020000, CRC(3e719d35) SHA1(4b6fe1e6a037102588162923fce87e0a67e5a109) )

	MV1_MISSING_ROMS //Looks like dump was complete otherwise
ROM_END

ROM_START( mv1wc )
	ROM_REGION( 0x100000, "maincpu", 0 )
	ROM_LOAD16_BYTE( "sa3-196.u15", 0x00000, 0x020000, CRC(ee78e8e6) SHA1(16cb3fb0ff23f054644d706583036dae44dac792) )
	ROM_LOAD16_BYTE( "sa3-196.u16", 0x00001, 0x020000, CRC(96beaa01) SHA1(b61487fbe470c776076cbdf7cd68063b56fde81d) )
	ROM_LOAD16_BYTE( "sa3-196.u17", 0x40000, 0x020000, CRC(d583ad06) SHA1(94d86d5481367624576bf489cd5347f1b4979646) )
	ROM_LOAD16_BYTE( "sa3-196.u18", 0x40001, 0x020000, CRC(84739f41) SHA1(a26d4df72fe723fceaf8471cdf89e4bd77585f0f) )
	MV1_MISSING_ROMSU1U4 // probably missing (no error, but hangs)

	MV1_MISSING_ROMS
ROM_END


/*************************************
 *
 *  Game driver(s)
 *
 *************************************/

void maygayv1_state::init_screenpl()
{
	m_p1 = m_p3 = 0xff;
}

#define GAME_FLAGS MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK

GAME( 1991, screenpl,  0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. 4.0)",               GAME_FLAGS )
GAME( 1991, screenp1,  screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. 1.9, set 1)",               GAME_FLAGS )
GAME( 1991, screenp1a, screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. 1.9, set 2)",               GAME_FLAGS )
GAME( 1991, screenp2,  screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. 1.9, Isle of Man, set 1)",  GAME_FLAGS )
GAME( 1991, screenp2a, screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. 1.9, Isle of Man, set 2)",  GAME_FLAGS )
GAME( 1991, screenp3,  screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, SA5-082)",  GAME_FLAGS )
GAME( 1991, screenp3a, screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, SA5-083)",  GAME_FLAGS )
GAME( 1991, screenp4,  screenpl,  maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Screen Play (Maygay, MV1 Video, ver. ?.?)",  GAME_FLAGS )

// incomplete sets
GAME( 199?, mv1bon,    0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Believe It Or Not (Maygay, MV1 Video)",  GAME_FLAGS )
GAME( 199?, mv1cpc,    0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Caesar's Palace Club (Maygay, MV1 Video, set 1)",  GAME_FLAGS )
GAME( 199?, mv1cpca,   mv1cpc,    maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Caesar's Palace Club (Maygay, MV1 Video, set 2)",  GAME_FLAGS )
GAME( 199?, mv1cpcb,   mv1cpc,    maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Caesar's Palace Club (Maygay, MV1 Video, set 3)",  GAME_FLAGS )
GAME( 199?, mv1cwq,    0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Crossword Quiz (Maygay, MV1 Video, set 1)",  GAME_FLAGS )
GAME( 199?, mv1cwqa,   mv1cwq,    maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Crossword Quiz (Maygay, MV1 Video, set 2)",  GAME_FLAGS )
GAME( 199?, mv1guac,   0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Give Us A Clue (Maygay, MV1 Video, set 1)",  GAME_FLAGS )
GAME( 199?, mv1guaca,  mv1guac,   maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "Give Us A Clue (Maygay, MV1 Video, set 2)",  GAME_FLAGS )
GAME( 199?, mv1sfx,    0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT90, "Maygay", "Special Effects (Maygay, MV1 Video, set 1)",  GAME_FLAGS )
GAME( 199?, mv1sfxa,   mv1sfx,    maygayv1, screenpl, maygayv1_state, init_screenpl, ROT90, "Maygay", "Special Effects (Maygay, MV1 Video, set 2)",  GAME_FLAGS )
GAME( 199?, mv1sfx2,   0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT90, "Maygay", "Special Effects V2 (Maygay, MV1 Video)",  GAME_FLAGS )
GAME( 199?, mv1wc,     0,         maygayv1, screenpl, maygayv1_state, init_screenpl, ROT0, "Maygay", "World Cup (Maygay, MV1 Video)",  GAME_FLAGS )