Previous 15994 Revisions Next

r3427 Saturday 11th October, 2008 at 01:31:44 UTC by Nathan Woods
Updated to MAME 0.127u7 core
[docs]messnew.txt
[src/emu]devintrf.c devintrf.h inptport.h inpttype.h mconfig.c memory.c memory.h render.c rendlay.c validity.c video.c
[src/emu/cpu/i8051]8051dasm.c i8051.c
[src/emu/cpu/nec]nec.c
[src/emu/cpu/z180]z180.c
[src/emu/cpu/z80]z80.c z80daisy.c z80daisy.h
[src/emu/machine]laserdsc.h ldcore.c ldcore.h ldpr8210.c ldv1000.c ldvp931.c z80ctc.c z80sio.c
[src/emu/video]resnet.c
[src/ldplayer]ldplayer.mak
[src/mame]mame.mak mamedriv.c
[src/mame/audio]exidy.c m72.c
[src/mame/drivers]8080bw.c ampoker2.c artmagic.c bwidow.c cischeat.c cps2.c egghunt.c fuukifg2.c fuukifg3.c gpworld.c gticlub.c itech8.c lucky74.c m72.c merit.c meritm.c metro.c midwunit.c model1.c model2.c model3.c neodrvr.c pbaction.c policetr.c segas24.c sengokmj.c snesb.c snk.c snookr10.c stv.c taito_h.c videopkr.c warpwarp.c zr107.c
[src/mame/includes]neogeo.h snes.h
[src/mame/layout]ampoker2.lay babydad.lay* babypkr.lay* blckjack.lay* lucky74.lay sigmapkr.lay snookr10.lay videocba.lay* videodad.lay* videopkr.lay*
[src/mame/machine]cps2crpt.c neoboot.c neocrypt.c s24fd.c snes.c snesdsp2.c snesobc1.c
[src/mame/video]m72.c namcos22.c neogeo.c pbaction.c segaic24.c segaic24.h st0016.c taito_f3.c taito_z.c taitoic.c tx1.c

src/mame/audio/m72.c
r3426r3427
9898   if (irqvector == 0)
9999      logerror("You didn't call m72_init_sound()\n");
100100
101   cpunum_set_input_line_vector(1,0,irqvector);
102101   if (irqvector == 0xff)   /* no IRQs pending */
103      cpunum_set_input_line(machine, 1,0,CLEAR_LINE);
102      cputag_set_input_line_and_vector(machine, "sound",0,CLEAR_LINE, irqvector);
104103   else   /* IRQ pending */
105      cpunum_set_input_line(machine, 1,0,ASSERT_LINE);
104      cputag_set_input_line_and_vector(machine, "sound",0,ASSERT_LINE, irqvector);
106105}
107106
108107MACHINE_RESET( m72_sound )
src/mame/audio/exidy.c
r3426r3427
505505
506506static READ8_HANDLER( exidy_sh6840_r )
507507{
508   fatalerror("exidy_sh6840_r - unexpected read");
509
508   logerror("%04X:exidy_sh6840_r - unexpected read", activecpu_get_pc());
510509   return 0;
511510}
512511
src/mame/machine/snesdsp2.c
r3426r3427
1/***************************************************************************
2
3  snesdsp2.c
4
5  File to handle emulation of the SNES "DSP-2" add-on chip.
6
7  Original C++ code by byuu, based on research by Overload
8
9  MAME/MESS C conversion by etabeta
10
11***************************************************************************/
12
13int DSP2_waiting_for_command = 0;
14int DSP2_command = 0;
15int DSP2_in_count = 0,  DSP2_in_index = 0;
16int DSP2_out_count = 0, DSP2_out_index = 0;
17
18UINT8 DSP2_parameters[512] = {0};
19UINT8 DSP2_output[512] = {0};
20
21UINT8 DSP2_op05transparent = 0;
22int DSP2_op05haslen = 0;
23int DSP2_op05len = 0;
24int DSP2_op06haslen = 0;
25int DSP2_op06len = 0;
26UINT16 DSP2_op09word1 = 0;
27UINT16 DSP2_op09word2 = 0;
28int DSP2_op0dhaslen = 0;
29int DSP2_op0doutlen = 0;
30int DSP2_op0dinlen = 0;
31
32
33//convert bitmap to bitplane tile
34void DSP2_op01( void )
35{
36//op01 size is always 32 bytes input and output
37//the hardware does strange things if you vary the size
38
39   unsigned char c0, c1, c2, c3;
40   unsigned char *p1  = DSP2_parameters;
41   unsigned char *p2a = DSP2_output;
42   unsigned char *p2b = DSP2_output + 16; //halfway
43   int j;
44
45//process 8 blocks of 4 bytes each
46   for (j = 0; j < 8; j++)
47   {
48      c0 = *p1++;
49      c1 = *p1++;
50      c2 = *p1++;
51      c3 = *p1++;
52
53      *p2a++ = (c0 & 0x10) << 3 |
54            (c0 & 0x01) << 6 |
55            (c1 & 0x10) << 1 |
56            (c1 & 0x01) << 4 |
57            (c2 & 0x10) >> 1 |
58            (c2 & 0x01) << 2 |
59            (c3 & 0x10) >> 3 |
60            (c3 & 0x01);
61
62      *p2a++ = (c0 & 0x20) << 2 |
63            (c0 & 0x02) << 5 |
64            (c1 & 0x20)      |
65            (c1 & 0x02) << 3 |
66            (c2 & 0x20) >> 2 |
67            (c2 & 0x02) << 1 |
68            (c3 & 0x20) >> 4 |
69            (c3 & 0x02) >> 1;
70
71      *p2b++ = (c0 & 0x40) << 1 |
72            (c0 & 0x04) << 4 |
73            (c1 & 0x40) >> 1 |
74            (c1 & 0x04) << 2 |
75            (c2 & 0x40) >> 3 |
76            (c2 & 0x04)      |
77            (c3 & 0x40) >> 5 |
78            (c3 & 0x04) >> 2;
79
80      *p2b++ = (c0 & 0x80)      |
81            (c0 & 0x08) << 3 |
82            (c1 & 0x80) >> 2 |
83            (c1 & 0x08) << 1 |
84            (c2 & 0x80) >> 4 |
85            (c2 & 0x08) >> 1 |
86            (c3 & 0x80) >> 6 |
87            (c3 & 0x08) >> 3;
88   }
89}
90
91//set transparent color
92void DSP2_op03( void )
93{
94   DSP2_op05transparent = DSP2_parameters[0];
95}
96
97//replace bitmap using transparent color
98void DSP2_op05( void )
99{
100   UINT8 color;
101// Overlay bitmap with transparency.
102// Input:
103//
104//   Bitmap 1:  i[0] <=> i[size-1]
105//   Bitmap 2:  i[size] <=> i[2*size-1]
106//
107// Output:
108//
109//   Bitmap 3:  o[0] <=> o[size-1]
110//
111// Processing:
112//
113//   Process all 4-bit pixels (nibbles) in the bitmap
114//
115//   if ( BM2_pixel == transparent_color )
116//      pixelout = BM1_pixel
117//   else
118//      pixelout = BM2_pixel
119
120// The max size bitmap is limited to 255 because the size parameter is a byte
121// I think size=0 is an error.  The behavior of the chip on size=0 is to
122// return the last value written to DR if you read DR on Op05 with
123// size = 0.  I don't think it's worth implementing this quirk unless it's
124// proven necessary.
125
126   unsigned char c1, c2;
127   unsigned char *p1 = DSP2_parameters;
128   unsigned char *p2 = DSP2_parameters + DSP2_op05len;
129   unsigned char *p3 = DSP2_output;
130   int n;
131
132   color = DSP2_op05transparent & 0x0f;
133
134   for (n = 0; n < DSP2_op05len; n++)
135   {
136      c1 = *p1++;
137      c2 = *p2++;
138      *p3++ = ( ((c2 >> 4)   == color ) ? c1 & 0xf0 : c2 & 0xf0 ) |
139            ( ((c2 & 0x0f) == color ) ? c1 & 0x0f : c2 & 0x0f );
140   }
141}
142
143//reverse bitmap
144void DSP2_op06( void )
145{
146// Input:
147//    size
148//    bitmap
149   int i, j;
150   for (i = 0, j = DSP2_op06len - 1; i < DSP2_op06len; i++, j--)
151   {
152      DSP2_output[j] = (DSP2_parameters[i] << 4) | (DSP2_parameters[i] >> 4);
153   }
154}
155
156//multiply
157void DSP2_op09( void )
158{
159   UINT32 r = 0;
160   DSP2_out_count = 4;
161
162   DSP2_op09word1 = DSP2_parameters[0] | (DSP2_parameters[1] << 8);
163   DSP2_op09word2 = DSP2_parameters[2] | (DSP2_parameters[3] << 8);
164
165   r = DSP2_op09word1 * DSP2_op09word2;
166   DSP2_output[0] = r;
167   DSP2_output[1] = r >> 8;
168   DSP2_output[2] = r >> 16;
169   DSP2_output[3] = r >> 24;
170}
171
172//scale bitmap
173void DSP2_op0d( void )
174{
175// Bit accurate hardware algorithm - uses fixed point math
176// This should match the DSP2 Op0D output exactly
177// I wouldn't recommend using this unless you're doing hardware debug.
178// In some situations it has small visual artifacts that
179// are not readily apparent on a TV screen but show up clearly
180// on a monitor.  Use Overload's scaling instead.
181// This is for hardware verification testing.
182//
183// One note:  the HW can do odd byte scaling but since we divide
184// by two to get the count of bytes this won't work well for
185// odd byte scaling (in any of the current algorithm implementations).
186// So far I haven't seen Dungeon Master use it.
187// If it does we can adjust the parameters and code to work with it
188
189   UINT32 multiplier; // Any size int >= 32-bits
190   UINT32 pixloc;     // match size of multiplier
191   int    i, j;
192   UINT8  pixelarray[512];
193   if (DSP2_op0dinlen <= DSP2_op0doutlen)
194   {
195      multiplier = 0x10000; // In our self defined fixed point 0x10000 == 1
196   }
197   else
198   {
199      multiplier = (DSP2_op0dinlen << 17) / ((DSP2_op0doutlen << 1) + 1);
200   }
201
202   pixloc = 0;
203   for (i = 0; i < DSP2_op0doutlen * 2; i++)
204   {
205      j = pixloc >> 16;
206
207      if (j & 1)
208         pixelarray[i] = (DSP2_parameters[j >> 1] & 0x0f);
209      else
210         pixelarray[i] = (DSP2_parameters[j >> 1] & 0xf0) >> 4;
211
212      pixloc += multiplier;
213   }
214
215   for (i = 0; i < DSP2_op0doutlen; i++)
216   {
217      DSP2_output[i] = (pixelarray[i << 1] << 4) | pixelarray[(i << 1) + 1];
218   }
219}
220
221
222void DSP2_reset( void )
223{
224   DSP2_waiting_for_command = 1;
225   DSP2_in_count  = 0;
226   DSP2_in_index  = 0;
227   DSP2_out_count = 0;
228   DSP2_out_index = 0;
229
230   DSP2_op05transparent = 0;
231   DSP2_op05haslen      = 0;
232   DSP2_op05len         = 0;
233   DSP2_op06haslen      = 0;
234   DSP2_op06len         = 0;
235   DSP2_op09word1       = 0;
236   DSP2_op09word2       = 0;
237   DSP2_op0dhaslen      = 0;
238   DSP2_op0doutlen      = 0;
239   DSP2_op0dinlen       = 0;
240}
241
242UINT8 DSP2_read( void )
243{
244   UINT8 r = 0xff;
245   if (DSP2_out_count)
246   {
247      r = DSP2_output[DSP2_out_index++];
248      DSP2_out_index &= 511;
249      if (DSP2_out_count == DSP2_out_index)
250         DSP2_out_count = 0;
251   }
252   return r;
253}
254
255void DSP2_write(UINT8 data)
256{
257   if(DSP2_waiting_for_command)
258   {
259      DSP2_command  = data;
260      DSP2_in_index = 0;
261      DSP2_waiting_for_command = 0;
262
263      switch (data)
264      {
265         case 0x01: DSP2_in_count = 32; break;
266         case 0x03: DSP2_in_count =  1; break;
267         case 0x05: DSP2_in_count =  1; break;
268         case 0x06: DSP2_in_count =  1; break;
269         case 0x07: break;
270         case 0x08: break;
271         case 0x09: DSP2_in_count =  4; break;
272         case 0x0d: DSP2_in_count =  2; break;
273         case 0x0f: DSP2_in_count =  0; break;
274      }
275   }
276   else
277   {
278      DSP2_parameters[DSP2_in_index++] = data;
279      DSP2_in_index &= 511;
280   }
281
282   if (DSP2_in_count == DSP2_in_index)
283   {
284      DSP2_waiting_for_command = 1;
285      DSP2_out_index = 0;
286      switch (DSP2_command)
287      {
288         case 0x01:
289            DSP2_out_count = 32;
290            DSP2_op01();
291            break;
292
293         case 0x03:
294            DSP2_op03();
295            break;
296
297         case 0x05:
298            if (DSP2_op05haslen)
299            {
300               DSP2_op05haslen = 0;
301               DSP2_out_count  = DSP2_op05len;
302               DSP2_op05();
303            }
304            else
305            {
306               DSP2_op05len    = DSP2_parameters[0];
307               DSP2_in_index   = 0;
308               DSP2_in_count   = DSP2_op05len * 2;
309               DSP2_op05haslen = 1;
310               if (data)
311                  DSP2_waiting_for_command = 0;
312            }
313            break;
314
315         case 0x06:
316            if (DSP2_op06haslen)
317            {
318               DSP2_op06haslen = 0;
319               DSP2_out_count  = DSP2_op06len;
320               DSP2_op06();
321            }
322            else
323            {
324               DSP2_op06len    = DSP2_parameters[0];
325               DSP2_in_index   = 0;
326               DSP2_in_count   = DSP2_op06len;
327               DSP2_op06haslen = 1;
328               if (data)
329                  DSP2_waiting_for_command = 0;
330            }
331            break;
332
333         case 0x07: break;
334         case 0x08: break;
335
336         case 0x09:
337            DSP2_op09();
338            break;
339
340         case 0x0d:
341            if (DSP2_op0dhaslen)
342            {
343               DSP2_op0dhaslen = 0;
344               DSP2_out_count  = DSP2_op0doutlen;
345               DSP2_op0d();
346            }
347            else
348            {
349               DSP2_op0dinlen  = DSP2_parameters[0];
350               DSP2_op0doutlen = DSP2_parameters[1];
351               DSP2_in_index   = 0;
352               DSP2_in_count   = (DSP2_op0dinlen + 1) >> 1;
353               DSP2_op0dhaslen = 1;
354               if(data)
355                  DSP2_waiting_for_command = 0;
356            }
357            break;
358
359         case 0x0f:
360            break;
361      }
362   }
363}
1/***************************************************************************
2 
3  snesdsp2.c
4 
5  File to handle emulation of the SNES "DSP-2" add-on chip.
6 
7  Original C++ code by byuu, based on research by Overload
8 
9  MAME/MESS C conversion by etabeta
10 
11***************************************************************************/
12 
13int DSP2_waiting_for_command = 0;
14int DSP2_command = 0;
15int DSP2_in_count = 0,  DSP2_in_index = 0;
16int DSP2_out_count = 0, DSP2_out_index = 0;
17 
18UINT8 DSP2_parameters[512] = {0};
19UINT8 DSP2_output[512] = {0};
20 
21UINT8 DSP2_op05transparent = 0;
22int DSP2_op05haslen = 0;
23int DSP2_op05len = 0;
24int DSP2_op06haslen = 0;
25int DSP2_op06len = 0;
26UINT16 DSP2_op09word1 = 0;
27UINT16 DSP2_op09word2 = 0;
28int DSP2_op0dhaslen = 0;
29int DSP2_op0doutlen = 0;
30int DSP2_op0dinlen = 0;
31 
32 
33//convert bitmap to bitplane tile
34void DSP2_op01( void )
35{
36//op01 size is always 32 bytes input and output
37//the hardware does strange things if you vary the size
38 
39   unsigned char c0, c1, c2, c3;
40   unsigned char *p1  = DSP2_parameters;
41   unsigned char *p2a = DSP2_output;
42   unsigned char *p2b = DSP2_output + 16; //halfway
43   int j;
44 
45//process 8 blocks of 4 bytes each
46   for (j = 0; j < 8; j++)
47   {
48      c0 = *p1++;
49      c1 = *p1++;
50      c2 = *p1++;
51      c3 = *p1++;
52 
53      *p2a++ = (c0 & 0x10) << 3 |
54            (c0 & 0x01) << 6 |
55            (c1 & 0x10) << 1 |
56            (c1 & 0x01) << 4 |
57            (c2 & 0x10) >> 1 |
58            (c2 & 0x01) << 2 |
59            (c3 & 0x10) >> 3 |
60            (c3 & 0x01);
61 
62      *p2a++ = (c0 & 0x20) << 2 |
63            (c0 & 0x02) << 5 |
64            (c1 & 0x20)      |
65            (c1 & 0x02) << 3 |
66            (c2 & 0x20) >> 2 |
67            (c2 & 0x02) << 1 |
68            (c3 & 0x20) >> 4 |
69            (c3 & 0x02) >> 1;
70 
71      *p2b++ = (c0 & 0x40) << 1 |
72            (c0 & 0x04) << 4 |
73            (c1 & 0x40) >> 1 |
74            (c1 & 0x04) << 2 |
75            (c2 & 0x40) >> 3 |
76            (c2 & 0x04)      |
77            (c3 & 0x40) >> 5 |
78            (c3 & 0x04) >> 2;
79 
80      *p2b++ = (c0 & 0x80)      |
81            (c0 & 0x08) << 3 |
82            (c1 & 0x80) >> 2 |
83            (c1 & 0x08) << 1 |
84            (c2 & 0x80) >> 4 |
85            (c2 & 0x08) >> 1 |
86            (c3 & 0x80) >> 6 |
87            (c3 & 0x08) >> 3;
88   }
89}
90 
91//set transparent color
92void DSP2_op03( void )
93{
94   DSP2_op05transparent = DSP2_parameters[0];
95}
96 
97//replace bitmap using transparent color
98void DSP2_op05( void )
99{
100   UINT8 color;
101// Overlay bitmap with transparency.
102// Input:
103//
104//   Bitmap 1:  i[0] <=> i[size-1]
105//   Bitmap 2:  i[size] <=> i[2*size-1]
106//
107// Output:
108//
109//   Bitmap 3:  o[0] <=> o[size-1]
110//
111// Processing:
112//
113//   Process all 4-bit pixels (nibbles) in the bitmap
114//
115//   if ( BM2_pixel == transparent_color )
116//      pixelout = BM1_pixel
117//   else
118//      pixelout = BM2_pixel
119 
120// The max size bitmap is limited to 255 because the size parameter is a byte
121// I think size=0 is an error.  The behavior of the chip on size=0 is to
122// return the last value written to DR if you read DR on Op05 with
123// size = 0.  I don't think it's worth implementing this quirk unless it's
124// proven necessary.
125 
126   unsigned char c1, c2;
127   unsigned char *p1 = DSP2_parameters;
128   unsigned char *p2 = DSP2_parameters + DSP2_op05len;
129   unsigned char *p3 = DSP2_output;
130   int n;
131 
132   color = DSP2_op05transparent & 0x0f;
133 
134   for (n = 0; n < DSP2_op05len; n++)
135   {
136      c1 = *p1++;
137      c2 = *p2++;
138      *p3++ = ( ((c2 >> 4)   == color ) ? c1 & 0xf0 : c2 & 0xf0 ) |
139            ( ((c2 & 0x0f) == color ) ? c1 & 0x0f : c2 & 0x0f );
140   }
141}
142 
143//reverse bitmap
144void DSP2_op06( void )
145{
146// Input:
147//    size
148//    bitmap
149   int i, j;
150   for (i = 0, j = DSP2_op06len - 1; i < DSP2_op06len; i++, j--)
151   {
152      DSP2_output[j] = (DSP2_parameters[i] << 4) | (DSP2_parameters[i] >> 4);
153   }
154}
155 
156//multiply
157void DSP2_op09( void )
158{
159   UINT32 r = 0;
160   DSP2_out_count = 4;
161 
162   DSP2_op09word1 = DSP2_parameters[0] | (DSP2_parameters[1] << 8);
163   DSP2_op09word2 = DSP2_parameters[2] | (DSP2_parameters[3] << 8);
164 
165   r = DSP2_op09word1 * DSP2_op09word2;
166   DSP2_output[0] = r;
167   DSP2_output[1] = r >> 8;
168   DSP2_output[2] = r >> 16;
169   DSP2_output[3] = r >> 24;
170}
171 
172//scale bitmap
173void DSP2_op0d( void )
174{
175// Bit accurate hardware algorithm - uses fixed point math
176// This should match the DSP2 Op0D output exactly
177// I wouldn't recommend using this unless you're doing hardware debug.
178// In some situations it has small visual artifacts that
179// are not readily apparent on a TV screen but show up clearly
180// on a monitor.  Use Overload's scaling instead.
181// This is for hardware verification testing.
182//
183// One note:  the HW can do odd byte scaling but since we divide
184// by two to get the count of bytes this won't work well for
185// odd byte scaling (in any of the current algorithm implementations).
186// So far I haven't seen Dungeon Master use it.
187// If it does we can adjust the parameters and code to work with it
188 
189   UINT32 multiplier; // Any size int >= 32-bits
190   UINT32 pixloc;     // match size of multiplier
191   int    i, j;
192   UINT8  pixelarray[512];
193   if (DSP2_op0dinlen <= DSP2_op0doutlen)
194   {
195      multiplier = 0x10000; // In our self defined fixed point 0x10000 == 1
196   }
197   else
198   {
199      multiplier = (DSP2_op0dinlen << 17) / ((DSP2_op0doutlen << 1) + 1);
200   }
201 
202   pixloc = 0;
203   for (i = 0; i < DSP2_op0doutlen * 2; i++)
204   {
205      j = pixloc >> 16;
206 
207      if (j & 1)
208         pixelarray[i] = (DSP2_parameters[j >> 1] & 0x0f);
209      else
210         pixelarray[i] = (DSP2_parameters[j >> 1] & 0xf0) >> 4;
211 
212      pixloc += multiplier;
213   }
214 
215   for (i = 0; i < DSP2_op0doutlen; i++)
216   {
217      DSP2_output[i] = (pixelarray[i << 1] << 4) | pixelarray[(i << 1) + 1];
218   }
219}
220 
221 
222void DSP2_reset( void )
223{
224   DSP2_waiting_for_command = 1;
225   DSP2_in_count  = 0;
226   DSP2_in_index  = 0;
227   DSP2_out_count = 0;
228   DSP2_out_index = 0;
229 
230   DSP2_op05transparent = 0;
231   DSP2_op05haslen      = 0;
232   DSP2_op05len         = 0;
233   DSP2_op06haslen      = 0;
234   DSP2_op06len         = 0;
235   DSP2_op09word1       = 0;
236   DSP2_op09word2       = 0;
237   DSP2_op0dhaslen      = 0;
238   DSP2_op0doutlen      = 0;
239   DSP2_op0dinlen       = 0;
240}
241 
242UINT8 DSP2_read( void )
243{
244   UINT8 r = 0xff;
245   if (DSP2_out_count)
246   {
247      r = DSP2_output[DSP2_out_index++];
248      DSP2_out_index &= 511;
249      if (DSP2_out_count == DSP2_out_index)
250         DSP2_out_count = 0;
251   }
252   return r;
253}
254 
255void DSP2_write(UINT8 data)
256{
257   if(DSP2_waiting_for_command)
258   {
259      DSP2_command  = data;
260      DSP2_in_index = 0;
261      DSP2_waiting_for_command = 0;
262 
263      switch (data)
264      {
265         case 0x01: DSP2_in_count = 32; break;
266         case 0x03: DSP2_in_count =  1; break;
267         case 0x05: DSP2_in_count =  1; break;
268         case 0x06: DSP2_in_count =  1; break;
269         case 0x07: break;
270         case 0x08: break;
271         case 0x09: DSP2_in_count =  4; break;
272         case 0x0d: DSP2_in_count =  2; break;
273         case 0x0f: DSP2_in_count =  0; break;
274      }
275   }
276   else
277   {
278      DSP2_parameters[DSP2_in_index++] = data;
279      DSP2_in_index &= 511;
280   }
281 
282   if (DSP2_in_count == DSP2_in_index)
283   {
284      DSP2_waiting_for_command = 1;
285      DSP2_out_index = 0;
286      switch (DSP2_command)
287      {
288         case 0x01:
289            DSP2_out_count = 32;
290            DSP2_op01();
291            break;
292 
293         case 0x03:
294            DSP2_op03();
295            break;
296 
297         case 0x05:
298            if (DSP2_op05haslen)
299            {
300               DSP2_op05haslen = 0;
301               DSP2_out_count  = DSP2_op05len;
302               DSP2_op05();
303            }
304            else
305            {
306               DSP2_op05len    = DSP2_parameters[0];
307               DSP2_in_index   = 0;
308               DSP2_in_count   = DSP2_op05len * 2;
309               DSP2_op05haslen = 1;
310               if (data)
311                  DSP2_waiting_for_command = 0;
312            }
313            break;
314 
315         case 0x06:
316            if (DSP2_op06haslen)
317            {
318               DSP2_op06haslen = 0;
319               DSP2_out_count  = DSP2_op06len;
320               DSP2_op06();
321            }
322            else
323            {
324               DSP2_op06len    = DSP2_parameters[0];
325               DSP2_in_index   = 0;
326               DSP2_in_count   = DSP2_op06len;
327               DSP2_op06haslen = 1;
328               if (data)
329                  DSP2_waiting_for_command = 0;
330            }
331            break;
332 
333         case 0x07: break;
334         case 0x08: break;
335 
336         case 0x09:
337            DSP2_op09();
338            break;
339 
340         case 0x0d:
341            if (DSP2_op0dhaslen)
342            {
343               DSP2_op0dhaslen = 0;
344               DSP2_out_count  = DSP2_op0doutlen;
345               DSP2_op0d();
346            }
347            else
348            {
349               DSP2_op0dinlen  = DSP2_parameters[0];
350               DSP2_op0doutlen = DSP2_parameters[1];
351               DSP2_in_index   = 0;
352               DSP2_in_count   = (DSP2_op0dinlen + 1) >> 1;
353               DSP2_op0dhaslen = 1;
354               if(data)
355                  DSP2_waiting_for_command = 0;
356            }
357            break;
358 
359         case 0x0f:
360            break;
361      }
362   }
363}
src/mame/machine/snesobc1.c
r3426r3427
1/***************************************************************************
2
3  snesobc1.c
4
5  File to handle emulation of the SNES "OBC-1" add-on chip.
6
7  Original C++ code by byuu
8
9  MAME/MESS C conversion by etabeta
10
11***************************************************************************/
12
13int obc1_address;
14int obc1_offset;
15int obc1_shift;
16
17READ8_HANDLER( obc1_read )
18{
19   UINT16 address = offset & 0x1fff;
20   UINT8 value;
21
22   switch (address)
23   {
24      case 0x1ff0:
25         value = snes_ram[obc1_offset + (obc1_address << 2) + 0];
26         break;
27
28      case 0x1ff1:
29         value = snes_ram[obc1_offset + (obc1_address << 2) + 1];
30         break;
31
32      case 0x1ff2:
33         value = snes_ram[obc1_offset + (obc1_address << 2) + 2];
34         break;
35
36      case 0x1ff3:
37         value = snes_ram[obc1_offset + (obc1_address << 2) + 3];
38         break;
39
40      case 0x1ff4:
41         value = snes_ram[obc1_offset + (obc1_address >> 2) + 0x200];
42         break;
43
44      default:
45         value = snes_ram[address];
46         break;
47   }
48
49   return value;
50}
51
52
53WRITE8_HANDLER( obc1_write )
54{
55   UINT16 address = offset & 0x1fff;
56   UINT8 temp;
57
58   switch(address)
59   {
60      case 0x1ff0:
61         snes_ram[obc1_offset + (obc1_address << 2) + 0] = data;
62         break;
63
64      case 0x1ff1:
65         snes_ram[obc1_offset + (obc1_address << 2) + 1] = data;
66         break;
67
68      case 0x1ff2:
69         snes_ram[obc1_offset + (obc1_address << 2) + 2] = data;
70         break;
71
72      case 0x1ff3:
73         snes_ram[obc1_offset + (obc1_address << 2) + 3] = data;
74         break;
75
76      case 0x1ff4:
77         temp = snes_ram[obc1_offset + (obc1_address >> 2) + 0x200];
78         temp = (temp & ~(3 << obc1_shift)) | ((data & 0x03) << obc1_shift);
79         snes_ram[obc1_offset + (obc1_address >> 2) + 0x200] = temp;
80         break;
81
82      case 0x1ff5:
83         obc1_offset = (data & 0x01) ? 0x1800 : 0x1c00;
84         snes_ram[address & 0x1fff] = data;
85         break;
86
87      case 0x1ff6:
88         obc1_address = data & 0x7f;
89         obc1_shift = (data & 0x03) << 1;
90         snes_ram[address & 0x1fff] = data;
91         break;
92
93      default:
94         snes_ram[address & 0x1fff] = data;
95         break;
96   }
97}
98
99void obc1_init( void )
100{
101   obc1_offset  = (snes_ram[0x1ff5] & 0x01) ? 0x1800 : 0x1c00;
102   obc1_address = (snes_ram[0x1ff6] & 0x7f);
103   obc1_shift   = (snes_ram[0x1ff6] & 0x03) << 1;
104}
1/***************************************************************************
2 
3  snesobc1.c
4 
5  File to handle emulation of the SNES "OBC-1" add-on chip.
6 
7  Original C++ code by byuu
8 
9  MAME/MESS C conversion by etabeta
10 
11***************************************************************************/
12 
13#include "includes/snes.h"
14 
15int obc1_address;
16int obc1_offset;
17int obc1_shift;
18 
19READ8_HANDLER( obc1_read )
20{
21   UINT16 address = offset & 0x1fff;
22   UINT8 value;
23 
24   switch (address)
25   {
26      case 0x1ff0:
27         value = snes_ram[obc1_offset + (obc1_address << 2) + 0];
28         break;
29 
30      case 0x1ff1:
31         value = snes_ram[obc1_offset + (obc1_address << 2) + 1];
32         break;
33 
34      case 0x1ff2:
35         value = snes_ram[obc1_offset + (obc1_address << 2) + 2];
36         break;
37 
38      case 0x1ff3:
39         value = snes_ram[obc1_offset + (obc1_address << 2) + 3];
40         break;
41 
42      case 0x1ff4:
43         value = snes_ram[obc1_offset + (obc1_address >> 2) + 0x200];
44         break;
45 
46      default:
47         value = snes_ram[address];
48         break;
49   }
50 
51   return value;
52}
53 
54 
55WRITE8_HANDLER( obc1_write )
56{
57   UINT16 address = offset & 0x1fff;
58   UINT8 temp;
59 
60   switch(address)
61   {
62      case 0x1ff0:
63         snes_ram[obc1_offset + (obc1_address << 2) + 0] = data;
64         break;
65 
66      case 0x1ff1:
67         snes_ram[obc1_offset + (obc1_address << 2) + 1] = data;
68         break;
69 
70      case 0x1ff2:
71         snes_ram[obc1_offset + (obc1_address << 2) + 2] = data;
72         break;
73 
74      case 0x1ff3:
75         snes_ram[obc1_offset + (obc1_address << 2) + 3] = data;
76         break;
77 
78      case 0x1ff4:
79         temp = snes_ram[obc1_offset + (obc1_address >> 2) + 0x200];
80         temp = (temp & ~(3 << obc1_shift)) | ((data & 0x03) << obc1_shift);
81         snes_ram[obc1_offset + (obc1_address >> 2) + 0x200] = temp;
82         break;
83 
84      case 0x1ff5:
85         obc1_offset = (data & 0x01) ? 0x1800 : 0x1c00;
86         snes_ram[address & 0x1fff] = data;
87         break;
88 
89      case 0x1ff6:
90         obc1_address = data & 0x7f;
91         obc1_shift = (data & 0x03) << 1;
92         snes_ram[address & 0x1fff] = data;
93         break;
94 
95      default:
96         snes_ram[address & 0x1fff] = data;
97         break;
98   }
99}
100 
101void obc1_init( void )
102{
103   obc1_offset  = (snes_ram[0x1ff5] & 0x01) ? 0x1800 : 0x1c00;
104   obc1_address = (snes_ram[0x1ff6] & 0x7f);
105   obc1_shift   = (snes_ram[0x1ff6] & 0x03) << 1;
106}
src/mame/machine/neoboot.c
r3426r3427
587587         free(dst);
588588}
589589
590/* Lans2004 (bootleg of Shock Troopers 2) */
591590
591/* Lansquenet 2004 (Shock Troopers - 2nd Squad bootleg) */
592
593
592594void lans2004_vx_decrypt( running_machine *machine )
593595{
594596   int i;
r3426r3427
970972    memory_install_readwrite16_handler(machine,  0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
971973}
972974
973/* samsho5bl */
974975
975void samsh5bl_px_decrypt( running_machine *machine )
976/* Samurai Shodown V / Samurai Spirits Zero (bootleg) */
977
978
979void samsho5b_px_decrypt( running_machine *machine )
976980{
977981   int px_size = memory_region_length( machine, "main" );
978982   UINT8 *rom = memory_region( machine, "main" );
r3426r3427
9981002   free( buf );
9991003}
10001004
1001void samsh5bl_vx_decrypt( running_machine *machine )
1005
1006void samsho5b_vx_decrypt( running_machine *machine )
10021007{
10031008   int vx_size = memory_region_length( machine, "ym" );
10041009   UINT8 *rom = memory_region( machine, "ym" );
src/mame/machine/snes.c
r3426r3427
158158   /* Start of VBlank */
159159   if( snes_ppu.beam.current_vert == snes_ppu.beam.last_visible_line )
160160   {
161      program_write_byte(OAMADDL, snes_ppu.oam.address_low ); /* Reset oam address */
162      program_write_byte(OAMADDH, snes_ppu.oam.address_high );
161      if(!(snes_ram[INIDISP]&0x80))
162      {
163         program_write_byte(OAMADDL, snes_ppu.oam.saved_address_low ); /* Reset oam address */
164         program_write_byte(OAMADDH, snes_ppu.oam.saved_address_high );
165      }
163166      snes_ram[HVBJOY] |= 0x81;      /* Set vblank bit to on & indicate controllers being read */
164167      snes_ram[RDNMI] |= 0x80;      /* Set NMI occured bit */
165168
r3426r3427
640643         break;
641644      case OAMADDL:   /* Address for accessing OAM (low) */
642645         snes_ppu.oam.address_low = data;
646         snes_ppu.oam.saved_address_low = data;
643647         snes_ppu.oam.address = ((snes_ppu.oam.address_high & 0x1) << 8) + data;
644648         snes_ram[OAMDATA] = 0;
645649         break;
646650      case OAMADDH:   /* Address for accessing OAM (high) */
647651         snes_ppu.oam.address_high = data & 0x1;
652         snes_ppu.oam.saved_address_high = data;
648653         snes_ppu.oam.address = ((data & 0x1) << 8) + snes_ppu.oam.address_low;
649654         snes_ppu.oam.priority_rotation = (data & 0x80) ? 1 : 0;
650655         snes_ram[OAMDATA] = 0;
r3426r3427
10981103/*
10991104There are at least 4 different kind of boards for SNES carts, which we denote with
11001105mode_20, mode_21, mode_22 and mode_25. Below is a layout of the memory for each of
1101them. Notice we mirror ROM at loading time where necessary (e.g. banks 0x80 to 0xff
1106them. Notice we mirror ROM at loading time where necessary (e.g. banks 0x80 to 0xff
11021107at address 0x8000 for mode_20).
11031108
11041109MODE_20
r3426r3427
11191124
11201125MODE_22 is the same, but banks 0x40 to 0x7e at address 0x000 to 0x7fff contain ROM (of
11211126course mirrored also at 0xc0 to 0xff). Mode 22 is quite similar to the board SHVC-2P3B.
1122It is used also in SDD-1 games (only for the first blocks of data). DSP data & status
1123can be either at banks 0x20 to 0x40 at address 0x8000 or at banks 0x60 to 0x6f at address
1127It is used also in SDD-1 games (only for the first blocks of data). DSP data & status
1128can be either at banks 0x20 to 0x40 at address 0x8000 or at banks 0x60 to 0x6f at address
112411290x0000.
11251130
11261131
r3426r3427
13991404      }
14001405      else
14011406         logerror("Attempt to write to reserved address: %X\n", offset + 0x300000);
1402   }   
1407   }
14031408   /* some dsp1 games use these banks 0x30 to 0x3f at address 0x8000 */
14041409   else if ((snes_cart.mode == SNES_MODE_20) && (has_addon_chip == HAS_DSP1))
14051410      DSP1_setDr(data);
r3426r3427
14581463      {
14591464         if (offset < 0x300000)
14601465            snes_w_bank1(machine, offset, data);
1461         else
1466         else
14621467            snes_w_bank2(machine, offset - 0x300000, data);
14631468      }
14641469      else   /* Mode 25 has SRAM not mirrored from lower banks */
r3426r3427
14671472         {
14681473            if (offset < 0x300000)
14691474               snes_w_bank1(machine, offset, data);
1470            else
1475            else
14711476               snes_w_bank2(machine, offset - 0x300000, data);
14721477         }
14731478         else if ((offset >= 0x300000) && (snes_cart.sram > 0))
r3426r3427
14771482            snes_ram[0xb06000 + (offset & mask)] = data;
14781483         }
14791484         else   /* Area in 0x6000-0x8000 && offset < 0x300000 is Reserved! */
1480            logerror("Attempt to write to reserved address: %X\n", offset + 0x800000);     
1485            logerror("Attempt to write to reserved address: %X\n", offset + 0x800000);
14811486      }
14821487   }
14831488   else if ((snes_cart.mode == SNES_MODE_20) && (has_addon_chip == HAS_DSP1) && (offset >= 0x200000))
r3426r3427
15151520
15161521/*************************************
15171522
1518   Driver Init
1523    Driver Init
15191524
15201525*************************************/
15211526
r3426r3427
15801585      case HAS_DSP2:
15811586         DSP2_reset();
15821587         break;
1583         
1588
15841589      case HAS_OBC1:
15851590         obc1_init();
15861591         break;
src/mame/machine/neocrypt.c
r3426r3427
3333          (see machine/neoprot.c)
3434      kof2002, matrim, samsho5, samsh5p
3535        - some basic block / bank swapping
36      svcchaos, kof2003, mslug5
36      svc, kof2003, mslug5
3737        - different scrambling with additional xor
3838
3939    NeoGeo 'V' Rom encryption
4040      NEO-PCM2 chip used on various games
4141      type1 used on pnyaa, rotd, mslug4
42      type2 used on kof2002, matrim, mslug5, svcchaos,
42      type2 used on kof2002, matrim, mslug5, svc,
4343                    samsho5, samsh5s, kof2003
4444
4545***************************************************************************/
r3426r3427
669669}
670670
671671
672/* svcchaos has an additional scramble on top of the standard CMC scrambling */
672/* svc has an additional scramble on top of the standard CMC scrambling */
673673void svcpcb_gfx_decrypt(running_machine *machine)
674674{
675675   static const UINT8 xor[ 4 ] = { 0x34, 0x21, 0xc4, 0xe9 };
r3426r3427
970970}
971971
972972
973/* kof2002, matrim, samsho5, samsh5p have some simple block swapping */
973/* kof2002, matrim, samsho5, samsh5sp have some simple block swapping */
974974void kof2002_decrypt_68k(running_machine *machine)
975975{
976976   int i;
r3426r3427
10171017}
10181018
10191019
1020void samsh5p_decrypt_68k(running_machine *machine)
1020void samsh5sp_decrypt_68k(running_machine *machine)
10211021{
10221022   int i;
10231023   static const int sec[]={0x000000,0x080000,0x500000,0x480000,0x600000,0x580000,0x700000,0x280000,0x100000,0x680000,0x400000,0x780000,0x200000,0x380000,0x300000,0x180000};
r3426r3427
10331033}
10341034
10351035
1036/* mslug5, svcchaos, kof2003 have updated P rom scramble */
1036/* mslug5, svc, kof2003 have updated P rom scramble */
10371037void mslug5_decrypt_68k(running_machine *machine)
10381038{
10391039   static const UINT8 xor1[ 0x20 ] = { 0xc2, 0x4b, 0x74, 0xfd, 0x0b, 0x34, 0xeb, 0xd7, 0x10, 0x6d, 0xf9, 0xce, 0x5d, 0xd5, 0x61, 0x29, 0xf5, 0xbe, 0x0d, 0x82, 0x72, 0x45, 0x0f, 0x24, 0xb3, 0x34, 0x1b, 0x99, 0xea, 0x09, 0xf3, 0x03 };
r3426r3427
10791079}
10801080
10811081
1082void svcchaos_px_decrypt(running_machine *machine)
1082void svc_px_decrypt(running_machine *machine)
10831083{
10841084   static const UINT8 xor1[ 0x20 ] = { 0x3b, 0x6a, 0xf7, 0xb7, 0xe8, 0xa9, 0x20, 0x99, 0x9f, 0x39, 0x34, 0x0c, 0xc3, 0x9a, 0xa5, 0xc8, 0xb8, 0x18, 0xce, 0x56, 0x94, 0x44, 0xe3, 0x7a, 0xf7, 0xdd, 0x42, 0xf0, 0x18, 0x60, 0x92, 0x9f };
10851085   static const UINT8 xor2[ 0x20 ] = { 0x69, 0x0b, 0x60, 0xd6, 0x4f, 0x01, 0x40, 0x1a, 0x9f, 0x0b, 0xf0, 0x75, 0x58, 0x0e, 0x60, 0xb4, 0x14, 0x04, 0x20, 0xe4, 0xb9, 0x0d, 0x10, 0x89, 0xeb, 0x07, 0x30, 0x90, 0x50, 0x0e, 0x20, 0x26 };
r3426r3427
15591559   }
15601560   #endif
15611561
1562   free( buffer );
15621563}
src/mame/machine/s24fd.c
r3426r3427
158158
159159   s24_fd1094_cpuregion = (UINT16*)s24_mainram1;
160160   s24_fd1094_cpuregionsize = 0x40000;
161   s24_fd1094_key = memory_region(Machine, "user3");
161   s24_fd1094_key = memory_region(machine, "fd1094key");
162162
163163   /* punt if no key; this allows us to be called even for non-s24_fd1094 games */
164164   if (!s24_fd1094_key)
src/mame/machine/cps2crpt.c
r3426r3427
789789   { "armwar",   { 0x9e9d4c0b,0x8a39081f }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
790790   { "armwarr1", { 0x9e9d4c0b,0x8a39081f }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
791791   { "armwaru",  { 0xd4c0b8a3,0x9081f9e9 }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
792   { "armwaru1", { 0xd4c0b8a3,0x9081f9e9 }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
792793   { "pgear",    { 0x9d4c0b8a,0x39081f9e }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
793794   { "pgearr1",  { 0x9d4c0b8a,0x39081f9e }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
794795   { "armwara",  { 0x1f9e9d4c,0x0b8a3908 }, 0x100000 },   // 3039 0080 4020  move.w  $00804020,D0
src/mame/mamedriv.c
r3426r3427
25752575   DRIVER( armwar )   /* 24/10/1994 (c) 1994 (Euro) */
25762576   DRIVER( armwarr1 )   /* 11/10/1994 (c) 1994 (Euro) */
25772577   DRIVER( armwaru )   /* 24/10/1994 (c) 1994 (US) */
2578   DRIVER( armwaru1 )   /* 20/09/1994 (c) 1994 (US) */
25782579   DRIVER( pgear )      /* 24/10/1994 (c) 1994 (Japan) */
25792580   DRIVER( pgearr1 )   /* 16/09/1994 (c) 1994 (Japan) */
25802581   DRIVER( armwara )   /* 20/09/1994 (c) 1994 (Asia) */
r3426r3427
37433744   DRIVER( cotton2 )   /* (c) 1997 Success */
37443745   DRIVER( cottonbm )   /* (c) 1998 Success */
37453746   DRIVER( decathlt )   /* (c) 1995 */
3747   DRIVER( decathlo )   /* (c) 1995 */
37463748   DRIVER( diehard )   /* (c) 1996 */
37473749   DRIVER( dnmtdeka )   /* (c) 1996 */
37483750   DRIVER( ejihon )   /* (c) 1995 */
r3426r3427
61436145   DRIVER( mk3 )      /* (c) 1994 Midway */
61446146   DRIVER( mk3r20 )   /* (c) 1994 Midway */
61456147   DRIVER( mk3r10 )   /* (c) 1994 Midway */
6148   DRIVER( mk3p40 )   /* (c) 1994 Midway */
61466149   DRIVER( umk3 )      /* (c) 1994 Midway */
61476150   DRIVER( umk3r11 )   /* (c) 1994 Midway */
61486151   DRIVER( umk3r10 )   /* (c) 1994 Midway */
r3426r3427
79667969   DRIVER( pitbossm )   /* (c) 1994 Merit */
79677970   DRIVER( megat3 )   /* (c) 1996 Merit */
79687971   DRIVER( megat3a )   /* (c) 1996 Merit */
7969   DRIVER( megat3b )   /* (c) 1995 Merit */
7972   DRIVER( megat3ca )   /* (c) 1996 Merit */
7973   DRIVER( megat3nj )   /* (c) 1995 Merit */
79707974   DRIVER( megat3te )   /* (c) 1996 Merit */
79717975   DRIVER( megat4 )   /* (c) 1996 Merit */
79727976   DRIVER( megat4a )   /* (c) 1996 Merit */
7977   DRIVER( megat4sn )   /* (c) 1996 Merit */
79737978   DRIVER( megat4te )   /* (c) 1996 Merit */
79747979   DRIVER( megat5 )   /* (c) 1997 Merit */
7980   DRIVER( megat5nj )   /* (c) 1997 Merit */
79757981   DRIVER( megat6 )   /* (c) 1998 Merit */
79767982   DRIVER( suprgolf )   /* (c) 19?? Nasco */
79777983   DRIVER( hotblock )   /* (c) 1993 Nics? / Nix? */
r3426r3427
82468252   DRIVER( lucky74 )   /* (c) 1988 Wing Co., Ltd */
82478253   DRIVER( lucky74a )   /* (c) 1988 Wing Co., Ltd */
82488254
8249   /* InterFlip */
8255   /* InterFlip / Recreativos Franco */
82508256   DRIVER( videopkr )   /* (c) 1984 InterFlip */
82518257   DRIVER( blckjack )   /* (c) 1984 InterFlip */
82528258   DRIVER( videodad )   /* (c) 1987 InterFlip */
82538259   DRIVER( videocba )   /* (c) 1987 InterFlip */
8260   DRIVER( babypkr )   /* (c) 1987 Recreativos Franco */
8261   DRIVER( babydad )   /* (c) 1987 Recreativos Franco */
82548262
82558263   /* H8/3048 italian gambling games */
82568264   DRIVER( laperla )   /* (c) 2002 Nazionale Elettronica */
src/mame/includes/neogeo.h
r3426r3427
5353void kof2002_decrypt_68k(running_machine *machine);
5454void matrim_decrypt_68k(running_machine *machine);
5555void mslug5_decrypt_68k(running_machine *machine);
56void svcchaos_px_decrypt(running_machine *machine);
56void svc_px_decrypt(running_machine *machine);
5757void svcpcb_gfx_decrypt(running_machine *machine);
5858void svcpcb_s1data_decrypt(running_machine *machine);
5959void samsho5_decrypt_68k(running_machine *machine);
r3426r3427
6363void kof2003_decrypt_68k(running_machine *machine);
6464void kof2003h_decrypt_68k(running_machine *machine);
6565void kof2003biosdecode(running_machine *machine);
66void samsh5p_decrypt_68k(running_machine *machine);
66void samsh5sp_decrypt_68k(running_machine *machine);
6767
6868void neo_pcm2_snk_1999(running_machine *machine, int value);
6969void neo_pcm2_swap(running_machine *machine, int value);
r3426r3427
117117void kof2k3up_px_decrypt(running_machine *machine);
118118void kof2k3up_install_protection(running_machine *machine);
119119void kf2k3pl_install_protection(running_machine *machine);
120void samsh5bl_px_decrypt(running_machine *machine);
121void samsh5bl_vx_decrypt(running_machine *machine);
120void samsho5b_px_decrypt(running_machine *machine);
121void samsho5b_vx_decrypt(running_machine *machine);
122122
123123
124124/*----------- defined in video/neogeo.c -----------*/
src/mame/includes/snes.h
r3426r3427
437437   {
438438      UINT8 address_low;
439439      UINT8 address_high;
440      UINT8 saved_address_low;
441      UINT8 saved_address_high;
440442      UINT16 address;
441443      UINT16 priority_rotation;
442444      UINT8 size[2];
src/mame/mame.mak
r3426r3427
17811781
17821782$(DRIVERS)/videopin.o:   $(LAYOUT)/videopin.lh
17831783
1784$(DRIVERS)/videopkr.o:   $(LAYOUT)/videopkr.lh \
1785                  $(LAYOUT)/blckjack.lh \
1786                  $(LAYOUT)/videodad.lh \
1787                  $(LAYOUT)/videocba.lh \
1788                  $(LAYOUT)/babypkr.lh \
1789                  $(LAYOUT)/babydad.lh
1790
17841791$(DRIVERS)/warpwarp.o:   $(LAYOUT)/geebee.lh \
17851792                  $(LAYOUT)/sos.lh
17861793
src/mame/video/taitoic.c
r3426r3427
17881788      int max_x = cliprect->max_x;
17891789      int min_y = cliprect->min_y;
17901790      int max_y = cliprect->max_y;
1791      int screen_width = max_x - min_x + 1;
1791      int screen_width = max_x + 1;
17921792      int width_mask=0x3ff;   /* underlying tilemap */
17931793
17941794
src/mame/video/segaic24.c
r3426r3427
4343}
4444
4545// 315-5242
46
47// qgh expects to be able to read the palette shared between CPUs
48READ16_HANDLER( system24temp_sys16_paletteram1_r )
49{
50   return paletteram16[offset];
51}
52
53
4654WRITE16_HANDLER (system24temp_sys16_paletteram1_w)
4755{
4856   int r, g, b;
src/mame/video/segaic24.h
r3426r3427
66   just made a copy & renamed them for now to avoid any conflicts
77*/
88
9READ16_HANDLER (system24temp_sys16_paletteram1_r);
910WRITE16_HANDLER (system24temp_sys16_paletteram1_w);
1011
1112// Tilemaps
src/mame/video/st0016.c
r3426r3427
1414
1515static INT32 st0016_spr_bank,st0016_spr2_bank,st0016_pal_bank,st0016_char_bank;
1616static int spr_dx,spr_dy;
17static UINT8 *chardirty;
1718
1819static UINT8 st0016_vregs[0xc0];
1920static int st0016_ramgfx;
r3426r3427
116117WRITE8_HANDLER(st0016_character_ram_w)
117118{
118119   st0016_charram[ST0016_CHAR_BANK_SIZE*st0016_char_bank+offset]=data;
119   decodechar(machine->gfx[st0016_ramgfx], st0016_char_bank,(UINT8 *) st0016_charram);
120   chardirty[st0016_char_bank] = 1;
120121}
121122
122123READ8_HANDLER(st0016_vregs_r)
r3426r3427
258259
259260    */
260261
262   gfx_element *gfx = machine->gfx[st0016_ramgfx];
261263   int i,j,lx,ly,x,y,code,offset,length,sx,sy,color,flipx,flipy,scrollx,scrolly,plx,ply;
262264
263265
r3426r3427
353355                     int yloop,xloop;
354356                     int ypos, xpos;
355357                     int tileno;
356                     const gfx_element *gfx = machine->gfx[0];
357358                     UINT8 *srcgfx;
358359                     int gfxoffs;
359360                     ypos = sy+y0*8+spr_dy;
360361                     xpos = sx+x0*8+spr_dx;
361362                     tileno = (code+i0++)&ST0016_CHAR_BANK_MASK ;
362363
364                     if (chardirty[tileno])
365                     {
366                        chardirty[tileno] = 0;
367                        decodechar(gfx, tileno, (UINT8 *) st0016_charram);
368                     }
369
363370                     gfxoffs = 0;
364371                     srcgfx= gfx->gfxdata+(64*tileno);
365372
r3426r3427
421428
422429static STATE_POSTLOAD( st0016_postload )
423430{
424   int i;
425431   st0016_rom_bank_w(machine,0,st0016_rom_bank);
426   for(i=0;i<ST0016_MAX_CHAR_BANK;i++)
427      decodechar(machine->gfx[st0016_ramgfx], i,(UINT8 *) st0016_charram);
432   memset(chardirty, 1, ST0016_MAX_CHAR_BANK);
428433}
429434
430435
r3426r3427
459464
460465   /* create the char set (gfx will then be updated dynamically from RAM) */
461466   machine->gfx[gfx_index] = allocgfx(&charlayout);
467   chardirty = auto_malloc(ST0016_MAX_CHAR_BANK);
468   memset(chardirty, 1, ST0016_MAX_CHAR_BANK);
462469
463470   /* set the color information */
464471   machine->gfx[gfx_index]->color_base = 0;
r3426r3427
506513
507514static void draw_bgmap(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect, int priority)
508515{
516   gfx_element *gfx = machine->gfx[st0016_ramgfx];
509517   int j;
510518   //for(j=0x40-8;j>=0;j-=8)
511519   for(j=0;j<0x40;j+=8)
r3426r3427
523531                flipx=st0016_spriteram[i+3]&0x80;
524532               flipy=st0016_spriteram[i+3]&0x40;
525533
534               if (chardirty[code])
535               {
536                  chardirty[code] = 0;
537                  decodechar(gfx, code, (UINT8 *) st0016_charram);
538               }
539
526540                if(priority)
527541                {
528                   drawgfx(bitmap,machine->gfx[0],
542                   drawgfx(bitmap,gfx,
529543                              code,
530544                              color,
531545                              flipx,flipy,
r3426r3427
537551                     UINT16 *destline;
538552                     int yloop,xloop;
539553                     int ypos, xpos;
540                     const gfx_element *gfx = machine->gfx[0];
541554                     UINT8 *srcgfx;
542555                     int gfxoffs;
543556                     ypos = y*8+spr_dy;//+((st0016_vregs[j+2]==0xaf)?0x50:0);//hack for mayjinsen title screen
544557                     xpos = x*8+spr_dx;
545558                     gfxoffs = 0;
546                     srcgfx= gfx->gfxdata+(64*code);
559                     srcgfx= gfx->gfxdata+(gfx->char_modulo*code);
547560
548561                     for (yloop=0; yloop<8; yloop++)
549562                     {
src/mame/video/namcos22.c
r3426r3427
627627         for( x=0; x<bitmap->width; x++ )
628628         {
629629            int rgb = dest[x];
630            int r = rlut[XORPAT^(rgb>>16)];
630            int r = rlut[XORPAT^((rgb>>16)&0xff)];
631631            int g = glut[XORPAT^((rgb>>8)&0xff)];
632632            int b = blut[XORPAT^(rgb&0xff)];
633633            dest[x] = (r<<16)|(g<<8)|b;
r3426r3427
645645         for( x=0; x<bitmap->width; x++ )
646646         {
647647            int rgb = dest[x];
648            int r = rlut[rgb>>16];
648            int r = rlut[(rgb>>16)&0xff];
649649            int g = glut[(rgb>>8)&0xff];
650650            int b = blut[rgb&0xff];
651651            dest[x] = (r<<16)|(g<<8)|b;
src/mame/video/tx1.c
r3426r3427
55****************************************************************************/
66
77#include "driver.h"
8#include "profiler.h"
98#include "render.h"
109#include "cpu/i86/i86.h"
1110#include "video/resnet.h"
r3426r3427
15131512   wave1    = BIT(vregs.flags, BB_RDFLAG_WAVE1);
15141513   rva_offs = BIT(vregs.flags, BB_RDFLAG_RVA7) ? 0x800 : 0xc00;
15151514
1516   profiler_mark(PROFILER_USER1);
1517
15181515   for (y = 0; y < 240; ++y)
15191516   {
15201517      UINT8   rva0_6;
src/mame/video/m72.c
r3426r3427
354354
355355      /* bit 4 resets sound CPU (active low) */
356356      if (data & 0x10)
357         cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
357         cputag_set_input_line(machine, "sound", INPUT_LINE_RESET, CLEAR_LINE);
358358      else
359         cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
359         cputag_set_input_line(machine, "sound", INPUT_LINE_RESET, ASSERT_LINE);
360360
361361      /* bit 5 = "bank"? */
362362   }
src/mame/video/pbaction.c
r3426r3427
5555{
5656   int attr = colorram[tile_index];
5757   int code = videoram[tile_index] + 0x10 * (attr & 0x70);
58   int color = attr & 0x0f;
58   int color = attr & 0x07;
5959   int flags = (attr & 0x80) ? TILE_FLIPY : 0;
6060
6161   SET_TILE_INFO(1, code, color, flags);
src/mame/video/taito_z.c
r3426r3427
2828
2929VIDEO_START( taitoz )
3030{
31   road_palbank = 3;
3132   taitoz_core_vh_start(machine, 0);
3233}
3334
src/mame/video/neogeo.c
r3426r3427
414414}
415415
416416
417static void draw_sprites(running_machine *machine, bitmap_t *bitmap, int scanline)
417static void draw_sprites(bitmap_t *bitmap, int scanline)
418418{
419419   int sprite_index;
420420   int max_sprite_index;
r3426r3427
650650   }
651651
652652   /* fill the rest of the sprite list with 0, including one extra entry */
653   for (; active_sprite_count <= MAX_SPRITES_PER_LINE ; active_sprite_count++)
654   {
655      *sprite_list = 0;
656
657      sprite_list++;
658   }
653   memset(sprite_list, 0,
654          sizeof(sprite_list[0]) * (MAX_SPRITES_PER_LINE - active_sprite_count + 1));
659655}
660656
661657
r3426r3427
934930   /* fill with background color first */
935931   fillbitmap(bitmap, pens[0x0fff], cliprect);
936932
937   draw_sprites(screen->machine, bitmap, cliprect->min_y);
933   draw_sprites(bitmap, cliprect->min_y);
938934
939935   draw_fixed_layer(screen->machine, bitmap, cliprect->min_y);
940936
src/mame/video/taito_f3.c
r3426r3427
366366static int twidth_mask_bit;
367367
368368static UINT8 *tile_opaque_sp;
369static UINT8 *tile_opaque_pf;
369static UINT8 *tile_opaque_pf[4];
370370
371371
372372static UINT8 add_sat[256][256];
r3426r3427
599599VIDEO_START( f3 )
600600{
601601   const struct F3config *pCFG=&f3_config_table[0];
602   int tile, width, height;
602   int tile, width, height, i;
603603
604604   f3_alpha_level_2as=127;
605605   f3_alpha_level_2ad=127;
r3426r3427
626626   pf_line_inf=0;
627627   pri_alp_bitmap=0;
628628   tile_opaque_sp=0;
629   tile_opaque_pf=0;
630629
631630   /* Setup individual game */
632631   do {
r3426r3427
682681   height = video_screen_get_height(machine->primary_screen);
683682   pri_alp_bitmap = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED8 );
684683   tile_opaque_sp = (UINT8 *)auto_malloc(machine->gfx[2]->total_elements);
685   tile_opaque_pf = (UINT8 *)auto_malloc(machine->gfx[1]->total_elements);
684   for (i=0; i<4; i++)
685      tile_opaque_pf[i] = (UINT8 *)auto_malloc(machine->gfx[1]->total_elements);
686686
687687   tilemap_set_transparent_pen(pf1_tilemap,0);
688688   tilemap_set_transparent_pen(pf2_tilemap,0);
r3426r3427
745745      for (c = 0;c < pf_gfx->total_elements;c++)
746746      {
747747         int x,y;
748         int chk_trans_or_opa=0;
749         UINT8 *dp = pf_gfx->gfxdata + c * pf_gfx->char_modulo;
750         for (y = 0;y < pf_gfx->height;y++)
748         int extra_planes; /* 0 = 4bpp, 1=5bpp, 2=?, 3=6bpp */
749
750         for (extra_planes=0; extra_planes<4; extra_planes++)
751751         {
752            for (x = 0;x < pf_gfx->width;x++)
752            int chk_trans_or_opa=0;
753            UINT8 extra_mask = ((extra_planes << 4) | 0x0f);
754            UINT8 *dp = pf_gfx->gfxdata + c * pf_gfx->char_modulo;
755
756            for (y = 0;y < pf_gfx->height;y++)
753757            {
754               if(!dp[x]) chk_trans_or_opa|=2;
755               else      chk_trans_or_opa|=1;
758               for (x = 0;x < pf_gfx->width;x++)
759               {
760                  if(!(dp[x] & extra_mask))
761                     chk_trans_or_opa|=2;
762                  else
763                     chk_trans_or_opa|=1;
764               }
765               dp += pf_gfx->line_modulo;
756766            }
757            dp += pf_gfx->line_modulo;
767            tile_opaque_pf[extra_planes][c]=chk_trans_or_opa;
758768         }
759         tile_opaque_pf[c]=chk_trans_or_opa;
760769      }
761770   }
762771}
r3426r3427
15921601   for(i=0;i<tile_num;i++)
15931602   {
15941603      UINT32 tile=pf_base[(tile_index)&twidth_mask];
1604      UINT8  extra_planes = (tile>>(16+10)) & 3;
15951605      if(tile&0xffff)
15961606      {
15971607         trans_all=0;
15981608         if(opaque_all)
15991609         {
1600            if(tile_opaque_pf[(tile&0xffff)%total_elements]!=1) opaque_all=0;
1610            if(tile_opaque_pf[extra_planes][(tile&0xffff)%total_elements]!=1) opaque_all=0;
16011611         }
16021612
16031613         if(alpha_mode==1)
src/mame/layout/blckjack.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="HIT" state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12
13   <element name="L1" defstate="1">
14      <rect>
15         <color red="0.70" green="0.00" blue="0.0" />
16      </rect>
17      <text string="STAND" state="1">
18         <color red="0.0" green="0.0" blue="0.0" />
19         <bounds x="0" y="0.25" width="1" height="0.5" />
20      </text>
21   </element>
22
23   <element name="L2" defstate="1">
24      <rect>
25         <color red="0.70" green="0.0" blue=".0" />
26      </rect>
27      <text string="DOUBLE" state="1">
28         <color red="0.0" green="0.0" blue="0.0" />
29         <bounds x="0" y="0.25" width="1" height="0.5" />
30      </text>
31   </element>
32   <element name="L7" defstate="1">
33      <rect>
34         <color red="0.70" green="0.70" blue="0.0" />
35      </rect>
36      <text string="DEAL" state="1">
37         <color red="0.0" green="0.0" blue="0.0" />
38         <bounds x="0" y="0.25" width="1" height="0.5" />
39      </text>
40   </element>
41   <element name="BX" defstate="1">
42      <rect>
43         <color red="0.00" green="0.00" blue="0.0" />
44      </rect>
45   </element>
46   <element name="Dig1" defstate="1">
47      <led7seg>
48         <color red=".75" green="0.0" blue="0.0" />
49      </led7seg>
50   </element>
51
52   <view name="Button Lamps">
53      <screen index="0">
54         <bounds left="0" top="0" right="4" bottom="3" />
55      </screen>
56      <bezel name="lamp1" element="L0">
57         <bounds x="0.5694" y="3.12" width="0.5" height="0.30" />
58      </bezel>
59      <bezel name="lamp2" element="L1">
60         <bounds x="1.508" y="3.12" width="0.35" height="0.30" />
61      </bezel>
62      <bezel name="lamp3" element="L2">
63         <bounds x="2.3" y="3.12" width="0.35" height="0.30" />
64      </bezel>
65      <bezel name="lamp0" element="L7">
66         <bounds x="3.093" y="3.12" width="0.5" height="0.30" />
67      </bezel>
68      <bezel name="" element="BX">
69         <bounds x="3.99" y="3.00" width="0.01" height="0.45" />
70      </bezel>
71      <bezel name="digit0" element="Dig1">
72         <bounds x="3.92" y="3.12" width="0.05" height="0.06" />
73      </bezel>
74      <bezel name="digit1" element="Dig1">
75         <bounds x="3.87" y="3.12" width="0.05" height="0.06" />
76      </bezel>
77      <bezel name="digit2" element="Dig1">
78         <bounds x="3.82" y="3.12" width="0.05" height="0.06" />
79      </bezel>
80      <bezel name="digit3" element="Dig1">
81         <bounds x="3.77" y="3.12" width="0.05" height="0.06" />
82      </bezel>
83      <bezel name="digit4" element="Dig1">
84         <bounds x="3.72" y="3.12" width="0.05" height="0.06" />
85      </bezel>
86      <bezel name="digit5" element="Dig1">
87         <bounds x="3.67" y="3.12" width="0.05" height="0.06" />
88      </bezel>
89      <bezel name="digit6" element="Dig1">
90         <bounds x="3.62" y="3.12" width="0.05" height="0.06" />
91      </bezel>
92
93      <bezel name="digit7" element="Dig1">
94         <bounds x="3.92" y="3.2" width="0.05" height="0.06" />
95      </bezel>
96      <bezel name="digit8" element="Dig1">
97         <bounds x="3.87" y="3.2" width="0.05" height="0.06" />
98      </bezel>
99      <bezel name="digit9" element="Dig1">
100         <bounds x="3.82" y="3.2" width="0.05" height="0.06" />
101      </bezel>
102      <bezel name="digit10" element="Dig1">
103         <bounds x="3.77" y="3.2" width="0.05" height="0.06" />
104      </bezel>
105      <bezel name="digit11" element="Dig1">
106         <bounds x="3.72" y="3.2" width="0.05" height="0.06" />
107      </bezel>
108      <bezel name="digit12" element="Dig1">
109         <bounds x="3.67" y="3.2" width="0.05" height="0.06" />
110      </bezel>
111      <bezel name="digit13" element="Dig1">
112         <bounds x="3.62" y="3.2" width="0.05" height="0.06" />
113      </bezel>
114
115      <bezel name="digit14" element="Dig1">
116         <bounds x="3.92" y="3.28" width="0.05" height="0.06" />
117      </bezel>
118      <bezel name="digit15" element="Dig1">
119         <bounds x="3.87" y="3.28" width="0.05" height="0.06" />
120      </bezel>
121      <bezel name="digit16" element="Dig1">
122         <bounds x="3.82" y="3.28" width="0.05" height="0.06" />
123      </bezel>
124      <bezel name="digit17" element="Dig1">
125         <bounds x="3.77" y="3.28" width="0.05" height="0.06" />
126      </bezel>
127      <bezel name="digit18" element="Dig1">
128         <bounds x="3.72" y="3.28" width="0.05" height="0.06" />
129      </bezel>
130      <bezel name="digit19" element="Dig1">
131         <bounds x="3.67" y="3.28" width="0.05" height="0.06" />
132      </bezel>
133      <bezel name="digit20" element="Dig1">
134         <bounds x="3.62" y="3.28" width="0.05" height="0.06" />
135      </bezel>
136   </view>
137</mamelayout>
src/mame/layout/snookr10.lay
r3426r3427
11<?xml version="1.0"?>
22<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
3   <element name="L0">
4      <rect state="0">
5         <color red="0.3" green="0.3" blue="0.3" />
6      </rect>
7      <rect state="1">
58         <color red="1.0" green="1.0" blue="1.0" />
69      </rect>
7      <text string="START" state="1">
10      <text string="START">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
13   <element name="L1" defstate="1">
14      <rect>
16   <element name="L1">
17      <rect state="0">
18         <color red="0.3" green="0.3" blue="0.3" />
19      </rect>
20      <rect state="1">
1521         <color red="1.0" green="1.0" blue="1.0" />
1622      </rect>
17      <text string="CANCEL" state="1">
23      <text string="PLAY">
1824         <color red="0.0" green="0.0" blue="0.0" />
19         <bounds x="0" y="0.1" width="1" height="0.8" />
25         <bounds x="0" y="0.1" width="1" height="0.4" />
2026      </text>
27      <text string="CANCELLA">
28         <color red="0.0" green="0.0" blue="0.0" />
29         <bounds x="0" y="0.5" width="1" height="0.4" />
30      </text>
2131   </element>
2232
23   <element name="L2" defstate="1">
24      <rect>
33   <element name="L2">
34      <rect state="0">
35         <color red="0.4" green="0.0" blue="0.0" />
36      </rect>
37      <rect state="1">
2538         <color red="1.0" green="0.0" blue="0.0" />
2639      </rect>
27      <text string="STOP1" state="1">
40      <text string="STOP1">
2841         <color red="0.0" green="0.0" blue="0.0" />
2942         <bounds x="0" y="0.1" width="1" height="0.8" />
3043      </text>
3144   </element>
3245
33   <element name="L3" defstate="1">
34      <rect>
46   <element name="L3">
47      <rect state="0">
48         <color red="0.4" green="0.0" blue="0.0" />
49      </rect>
50      <rect state="1">
3551         <color red="1.0" green="0.0" blue="0.0" />
3652      </rect>
37      <text string="STOP2" state="1">
53      <text string="STOP2">
3854         <color red="0.0" green="0.0" blue="0.0" />
3955         <bounds x="0" y="0.1" width="1" height="0.8" />
4056      </text>
4157   </element>
4258
43   <element name="L4" defstate="1">
44      <rect>
59   <element name="L4">
60      <rect state="0">
61         <color red="0.4" green="0.0" blue="0.0" />
62      </rect>
63      <rect state="1">
4564         <color red="1.0" green="0.0" blue="0.0" />
4665      </rect>
47      <text string="STOP3" state="1">
66      <text string="STOP3">
4867         <color red="0.0" green="0.0" blue="0.0" />
4968         <bounds x="0" y="0.1" width="1" height="0.8" />
5069      </text>
5170   </element>
5271
53   <element name="L5" defstate="1">
54      <rect>
72   <element name="L5">
73      <rect state="0">
74         <color red="0.4" green="0.0" blue="0.0" />
75      </rect>
76      <rect state="1">
5577         <color red="1.0" green="0.0" blue="0.0" />
5678      </rect>
57      <text string="STOP4" state="1">
79      <text string="STOP4">
5880         <color red="0.0" green="0.0" blue="0.0" />
5981         <bounds x="0" y="0.1" width="1" height="0.8" />
6082      </text>
6183   </element>
6284
63   <element name="L6" defstate="1">
64      <rect>
85   <element name="L6">
86      <rect state="0">
87         <color red="0.4" green="0.0" blue="0.0" />
88      </rect>
89      <rect state="1">
6590         <color red="1.0" green="0.0" blue="0.0" />
6691      </rect>
67      <text string="STOP5" state="1">
92      <text string="STOP5">
6893         <color red="0.0" green="0.0" blue="0.0" />
6994         <bounds x="0" y="0.1" width="1" height="0.8" />
7095      </text>
src/mame/layout/babypkr.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="DRAW/TAKE" state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12
13   <element name="L1" defstate="1">
14      <rect>
15         <color red="0.70" green="0.70" blue="0.0" />
16      </rect>
17      <text string="CANCEL/DOUBLE" state="1">
18         <color red="0.0" green="0.0" blue="0.0" />
19         <bounds x="0" y="0.25" width="1" height="0.5" />
20      </text>
21   </element>
22
23   <element name="L2" defstate="1">
24      <rect>
25         <color red="0.70" green="0.0" blue=".0" />
26      </rect>
27      <text string=" HOLD 1 " state="1">
28         <color red="0.0" green="0.0" blue="0.0" />
29         <bounds x="0" y="0.25" width="1" height="0.5" />
30      </text>
31   </element>
32
33   <element name="L3" defstate="1">
34      <rect>
35         <color red="0.70" green="0.0" blue="0.0" />
36      </rect>
37      <text string=" HOLD 2 " state="1">
38         <color red="0.0" green="0.0" blue="0.0" />
39         <bounds x="0" y="0.25" width="1" height="0.5" />
40      </text>
41   </element>
42
43   <element name="L4" defstate="1">
44      <rect>
45         <color red="0.70" green="0.0" blue="0.0" />
46      </rect>
47      <text string=" HOLD 3 " state="1">
48         <color red="0.0" green="0.0" blue="0.0" />
49         <bounds x="0" y="0.25" width="1" height="0.5" />
50      </text>
51   </element>
52
53   <element name="L5" defstate="1">
54      <rect>
55         <color red="0.70" green="0.0" blue="0.0" />
56      </rect>
57      <text string=" HOLD 4 " state="1">
58         <color red="0.0" green="0.0" blue="0.0" />
59         <bounds x="0" y="0.25" width="1" height="0.5" />
60      </text>
61   </element>
62
63   <element name="L6" defstate="1">
64      <rect>
65         <color red="0.70" green="0.0" blue="0.0" />
66      </rect>
67      <text string=" HOLD 5 " state="1">
68         <color red="0.0" green="0.0" blue="0.0" />
69         <bounds x="0" y="0.25" width="1" height="0.5" />
70      </text>
71   </element>
72
73   <element name="L7" defstate="1">
74      <rect>
75         <color red="0.70" green="0.70" blue="0.0" />
76      </rect>
77      <text string="  DEAL  " state="1">
78         <color red="0.0" green="0.0" blue="0.0" />
79         <bounds x="0" y="0.25" width="1" height="0.5" />
80      </text>
81   </element>
82
83   <element name="L8" defstate="1">
84      <disk>
85         <color red="0.70" green="0.0" blue="0.0" />
86      </disk>
87      <text string="BET" state="1">
88         <color red="0.0" green="0.0" blue="0.0" />
89         <bounds x="0" y="0.25" width="1" height="0.5" />
90      </text>
91   </element>
92
93   <element name="L9" defstate="0">
94      <rect state="1">
95         <color red="0.00" green="0.80" blue="0.0" />
96      </rect>
97   </element>
98
99   <element name="L10" defstate="0">
100      <rect state ="1">
101         <color red="0.80" green="0.00" blue="0.0" />
102      </rect>
103   </element>
104
105   <element name="L11" defstate="0">
106      <rect STATE="1">
107         <color red="0.80" green="0.80" blue="0.0" />
108      </rect>
109   </element>
110
111   <element name="LX" defstate="1">
112      <rect>
113         <color red="0.00" green="0.0" blue="0.0" />
114      </rect>
115   </element>
116
117   <element name="Dig1" defstate="1">
118      <led7seg>
119         <color red="1" green="1" blue="1" />
120      </led7seg>
121   </element>
122
123   <view name="Button Lamps">
124      <screen index="0">
125         <bounds left="0" top="0" right="4" bottom="3" />
126      </screen>
127      <bezel name="" element="LX">
128         <bounds x="0.0" y="3.00" width="0.01" height="0.50" />
129      </bezel>
130      <bezel name="lamp3" element="L8">
131         <bounds x="0.022" y="3.16" width="0.315" height="0.315" />
132      </bezel>
133      <bezel name="lamp2" element="L0">
134         <bounds x="0.382" y="3.16" width="0.449" height="0.315" />
135      </bezel>
136      <bezel name="lamp0" element="L1">
137         <bounds x="0.876" y="3.16" width="0.449" height="0.315" />
138      </bezel>
139      <bezel name="lamp1" element="L2">
140         <bounds x="1.371" y="3.16" width="0.315" height="0.315" />
141      </bezel>
142      <bezel name="lamp1" element="L3">
143         <bounds x="1.730" y="3.16" width="0.315" height="0.315" />
144      </bezel>
145      <bezel name="lamp1" element="L4">
146         <bounds x="2.090" y="3.16" width="0.315" height="0.315" />
147      </bezel>
148      <bezel name="lamp1" element="L5">
149         <bounds x="2.449" y="3.16" width="0.315" height="0.315" />
150      </bezel>
151      <bezel name="lamp1" element="L6">
152         <bounds x="2.809" y="3.16" width="0.315" height="0.315" />
153      </bezel>
154      <bezel name="lamp3" element="L7">
155         <bounds x="3.169" y="3.16" width="0.449" height="0.315" />
156      </bezel>
157
158      <backdrop name="TOP_1" element="L9">
159         <bounds x="1.75" y="3.01" width="0.5" height="0.04" />
160      </backdrop>
161      <backdrop name="TOP_2" element="L10">
162         <bounds x="1.75" y="3.06" width="0.5" height="0.04" />
163      </backdrop>
164      <backdrop name="TOP_3" element="L11">
165         <bounds x="1.75" y="3.11" width="0.5" height="0.04" />
166      </backdrop>
167
168
169
170      <bezel name="digit0" element="Dig1">
171         <bounds x="3.933" y="3.16" width="0.045" height="0.065625" />
172      </bezel>
173      <bezel name="digit1" element="Dig1">
174         <bounds x="3.888" y="3.16" width="0.045" height="0.065625" />
175      </bezel>
176      <bezel name="digit2" element="Dig1">
177         <bounds x="3.843" y="3.16" width="0.045" height="0.065625" />
178      </bezel>
179      <bezel name="digit3" element="Dig1">
180         <bounds x="3.798" y="3.16" width="0.045" height="0.065625" />
181      </bezel>
182      <bezel name="digit4" element="Dig1">
183         <bounds x="3.753" y="3.16" width="0.045" height="0.065625" />
184      </bezel>
185      <bezel name="digit5" element="Dig1">
186         <bounds x="3.708" y="3.16" width="0.045" height="0.065625" />
187      </bezel>
188      <bezel name="digit6" element="Dig1">
189         <bounds x="3.663" y="3.16" width="0.045" height="0.065625" />
190      </bezel>
191
192      <bezel name="digit7" element="Dig1">
193         <bounds x="3.933" y="3.239" width="0.045" height="0.065625" />
194      </bezel>
195      <bezel name="digit8" element="Dig1">
196         <bounds x="3.888" y="3.239" width="0.045" height="0.065625" />
197      </bezel>
198      <bezel name="digit9" element="Dig1">
199         <bounds x="3.843" y="3.239" width="0.045" height="0.065625" />
200      </bezel>
201      <bezel name="digit10" element="Dig1">
202         <bounds x="3.798" y="3.239" width="0.045" height="0.065625" />
203      </bezel>
204      <bezel name="digit11" element="Dig1">
205         <bounds x="3.753" y="3.239" width="0.045" height="0.065625" />
206      </bezel>
207      <bezel name="digit12" element="Dig1">
208         <bounds x="3.708" y="3.239" width="0.045" height="0.065625" />
209      </bezel>
210      <bezel name="digit13" element="Dig1">
211         <bounds x="3.663" y="3.239" width="0.045" height="0.065625" />
212      </bezel>
213
214      <bezel name="digit14" element="Dig1">
215         <bounds x="3.933" y="3.318" width="0.045" height="0.065625" />
216      </bezel>
217      <bezel name="digit15" element="Dig1">
218         <bounds x="3.888" y="3.318" width="0.045" height="0.065625" />
219      </bezel>
220      <bezel name="digit16" element="Dig1">
221         <bounds x="3.843" y="3.318" width="0.045" height="0.065625" />
222      </bezel>
223      <bezel name="digit17" element="Dig1">
224         <bounds x="3.798" y="3.318" width="0.045" height="0.065625" />
225      </bezel>
226      <bezel name="digit18" element="Dig1">
227         <bounds x="3.753" y="3.318" width="0.045" height="0.065625" />
228      </bezel>
229      <bezel name="digit19" element="Dig1">
230         <bounds x="3.708" y="3.318" width="0.045" height="0.065625" />
231      </bezel>
232      <bezel name="digit20" element="Dig1">
233         <bounds x="3.663" y="3.318" width="0.045" height="0.065625" />
234      </bezel>
235
236      <bezel name="digit21" element="Dig1">
237         <bounds x="3.933" y="3.396" width="0.045" height="0.065625" />
238      </bezel>
239      <bezel name="digit22" element="Dig1">
240         <bounds x="3.888" y="3.396" width="0.045" height="0.065625" />
241      </bezel>
242      <bezel name="digit23" element="Dig1">
243         <bounds x="3.843" y="3.396" width="0.045" height="0.065625" />
244      </bezel>
245      <bezel name="digit24" element="Dig1">
246         <bounds x="3.798" y="3.396" width="0.045" height="0.065625" />
247      </bezel>
248      <bezel name="digit25" element="Dig1">
249         <bounds x="3.753" y="3.396" width="0.045" height="0.065625" />
250      </bezel>
251      <bezel name="digit26" element="Dig1">
252         <bounds x="3.708" y="3.396" width="0.045" height="0.065625" />
253      </bezel>
254      <bezel name="digit27" element="Dig1">
255         <bounds x="3.663" y="3.396" width="0.045" height="0.065625" />
256      </bezel>
257   </view>
258</mamelayout>
src/mame/layout/videocba.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L7" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="START" state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12   <element name="BX" defstate="1">
13      <rect>
14         <color red="0.00" green="0.00" blue="0.0" />
15      </rect>
16   </element>
17   <element name="Dig1" defstate="1">
18      <led7seg>
19         <color red=".75" green="0.0" blue="0.0" />
20      </led7seg>
21   </element>
22   <view name="Button Lamps">
23      <screen index="0">
24         <bounds left="0" top="0" right="4" bottom="3" />
25      </screen>
26      <bezel name="lamp3" element="L7">
27         <bounds x="3.093" y="3.12" width="0.5" height="0.30" />
28      </bezel>
29      <bezel name="" element="BX">
30         <bounds x="3.99" y="3.00" width="0.01" height="0.45" />
31      </bezel>
32      <bezel name="digit0" element="Dig1">
33         <bounds x="3.92" y="3.12" width="0.05" height="0.06" />
34      </bezel>
35      <bezel name="digit1" element="Dig1">
36         <bounds x="3.87" y="3.12" width="0.05" height="0.06" />
37      </bezel>
38      <bezel name="digit2" element="Dig1">
39         <bounds x="3.82" y="3.12" width="0.05" height="0.06" />
40      </bezel>
41      <bezel name="digit3" element="Dig1">
42         <bounds x="3.77" y="3.12" width="0.05" height="0.06" />
43      </bezel>
44      <bezel name="digit4" element="Dig1">
45         <bounds x="3.72" y="3.12" width="0.05" height="0.06" />
46      </bezel>
47      <bezel name="digit5" element="Dig1">
48         <bounds x="3.67" y="3.12" width="0.05" height="0.06" />
49      </bezel>
50      <bezel name="digit6" element="Dig1">
51         <bounds x="3.62" y="3.12" width="0.05" height="0.06" />
52      </bezel>
53      <bezel name="digit7" element="Dig1">
54         <bounds x="3.92" y="3.2" width="0.05" height="0.06" />
55      </bezel>
56      <bezel name="digit8" element="Dig1">
57         <bounds x="3.87" y="3.2" width="0.05" height="0.06" />
58      </bezel>
59      <bezel name="digit9" element="Dig1">
60         <bounds x="3.82" y="3.2" width="0.05" height="0.06" />
61      </bezel>
62      <bezel name="digit10" element="Dig1">
63         <bounds x="3.77" y="3.2" width="0.05" height="0.06" />
64      </bezel>
65      <bezel name="digit11" element="Dig1">
66         <bounds x="3.72" y="3.2" width="0.05" height="0.06" />
67      </bezel>
68      <bezel name="digit12" element="Dig1">
69         <bounds x="3.67" y="3.2" width="0.05" height="0.06" />
70      </bezel>
71      <bezel name="digit13" element="Dig1">
72         <bounds x="3.62" y="3.2" width="0.05" height="0.06" />
73      </bezel>
74      <bezel name="digit14" element="Dig1">
75         <bounds x="3.92" y="3.28" width="0.05" height="0.06" />
76      </bezel>
77      <bezel name="digit15" element="Dig1">
78         <bounds x="3.87" y="3.28" width="0.05" height="0.06" />
79      </bezel>
80      <bezel name="digit16" element="Dig1">
81         <bounds x="3.82" y="3.28" width="0.05" height="0.06" />
82      </bezel>
83      <bezel name="digit17" element="Dig1">
84         <bounds x="3.77" y="3.28" width="0.05" height="0.06" />
85      </bezel>
86      <bezel name="digit18" element="Dig1">
87         <bounds x="3.72" y="3.28" width="0.05" height="0.06" />
88      </bezel>
89      <bezel name="digit19" element="Dig1">
90         <bounds x="3.67" y="3.28" width="0.05" height="0.06" />
91      </bezel>
92      <bezel name="digit20" element="Dig1">
93         <bounds x="3.62" y="3.28" width="0.05" height="0.06" />
94      </bezel>
95   </view>
96</mamelayout>
src/mame/layout/sigmapkr.lay
r3426r3427
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="L0" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="1.0" blue="1.0" />
66      </rect>
7      <text string="DEAL/TAKE" state="1">
7      <rect state="0">
8         <color red="0.3" green="0.3" blue="0.3" />
9      </rect>
10      <text string="DEAL/TAKE">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="L1" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="1.0" blue="1.0" />
1619      </rect>
17      <text string="BET" state="1">
20      <rect state="0">
21         <color red="0.3" green="0.3" blue="0.3" />
22      </rect>
23      <text string="BET">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="L2" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="1.0" blue="1.0" />
2632      </rect>
27      <text string="DOUBLE" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.3" blue="0.3" />
35      </rect>
36      <text string="DOUBLE">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="L3" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="0.0" blue="0.0" />
3645      </rect>
37      <text string="HOLD1" state="1">
46      <rect state="0">
47         <color red="0.3" green="0.0" blue="0.0" />
48      </rect>
49      <text string="HOLD1">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
4153   </element>
4254
4355   <element name="L4" defstate="1">
44      <rect>
56      <rect state="1">
4557         <color red="1.0" green="0.0" blue="0.0" />
4658      </rect>
47      <text string="HOLD2" state="1">
59      <rect state="0">
60         <color red="0.3" green="0.0" blue="0.0" />
61      </rect>
62      <text string="HOLD2">
4863         <color red="0.0" green="0.0" blue="0.0" />
4964         <bounds x="0" y="0.1" width="1" height="0.8" />
5065      </text>
5166   </element>
5267
5368   <element name="L5" defstate="1">
54      <rect>
69      <rect state="1">
5570         <color red="1.0" green="0.0" blue="0.0" />
5671      </rect>
57      <text string="HOLD3" state="1">
72      <rect state="0">
73         <color red="0.3" green="0.0" blue="0.0" />
74      </rect>
75      <text string="HOLD3">
5876         <color red="0.0" green="0.0" blue="0.0" />
5977         <bounds x="0" y="0.1" width="1" height="0.8" />
6078      </text>
6179   </element>
6280
6381   <element name="L6" defstate="1">
64      <rect>
82      <rect state="1">
6583         <color red="1.0" green="0.0" blue="0.0" />
6684      </rect>
67      <text string="HOLD4" state="1">
85      <rect state="0">
86         <color red="0.3" green="0.0" blue="0.0" />
87      </rect>
88      <text string="HOLD4">
6889         <color red="0.0" green="0.0" blue="0.0" />
6990         <bounds x="0" y="0.1" width="1" height="0.8" />
7091      </text>
7192   </element>
7293
7394   <element name="L7" defstate="1">
74      <rect>
95      <rect state="1">
7596         <color red="1.0" green="0.0" blue="0.0" />
7697      </rect>
77      <text string="HOLD5" state="1">
98      <rect state="0">
99         <color red="0.3" green="0.0" blue="0.0" />
100      </rect>
101      <text string="HOLD5">
78102         <color red="0.0" green="0.0" blue="0.0" />
79103         <bounds x="0" y="0.1" width="1" height="0.8" />
80104      </text>
src/mame/layout/ampoker2.lay
r3426r3427
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="L0" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="1.0" blue="1.0" />
66      </rect>
7      <text string="DEAL/TAKE" state="1">
7      <rect state="0">
8         <color red="0.3" green="0.3" blue="0.3" />
9      </rect>
10      <text string="DEAL/TAKE">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="L1" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="1.0" blue="1.0" />
1619      </rect>
17      <text string="BET/RED" state="1">
20      <rect state="0">
21         <color red="0.3" green="0.3" blue="0.3" />
22      </rect>
23      <text string="BET/RED">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="L2" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="1.0" blue="1.0" />
2632      </rect>
27      <text string="BLACK" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.3" blue="0.3" />
35      </rect>
36      <text string="BLACK">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="L3" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="0.0" blue="0.0" />
3645      </rect>
37      <text string="HOLD1" state="1">
46      <rect state="0">
47         <color red="0.3" green="0.0" blue="0.0" />
48      </rect>
49      <text string="HOLD1">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
4153   </element>
4254
4355   <element name="L4" defstate="1">
44      <rect>
56      <rect state="1">
4557         <color red="1.0" green="0.0" blue="0.0" />
4658      </rect>
47      <text string="HOLD2" state="1">
59      <rect state="0">
60         <color red="0.3" green="0.0" blue="0.0" />
61      </rect>
62      <text string="HOLD2">
4863         <color red="0.0" green="0.0" blue="0.0" />
4964         <bounds x="0" y="0.1" width="1" height="0.8" />
5065      </text>
5166   </element>
5267
5368   <element name="L5" defstate="1">
54      <rect>
69      <rect state="1">
5570         <color red="1.0" green="0.0" blue="0.0" />
5671      </rect>
57      <text string="HOLD3" state="1">
72      <rect state="0">
73         <color red="0.3" green="0.0" blue="0.0" />
74      </rect>
75      <text string="HOLD3">
5876         <color red="0.0" green="0.0" blue="0.0" />
5977         <bounds x="0" y="0.1" width="1" height="0.8" />
6078      </text>
6179   </element>
6280
6381   <element name="L6" defstate="1">
64      <rect>
82      <rect state="1">
6583         <color red="1.0" green="0.0" blue="0.0" />
6684      </rect>
67      <text string="HOLD4" state="1">
85      <rect state="0">
86         <color red="0.3" green="0.0" blue="0.0" />
87      </rect>
88      <text string="HOLD4">
6889         <color red="0.0" green="0.0" blue="0.0" />
6990         <bounds x="0" y="0.1" width="1" height="0.8" />
7091      </text>
7192   </element>
7293
7394   <element name="L7" defstate="1">
74      <rect>
95      <rect state="1">
7596         <color red="1.0" green="0.0" blue="0.0" />
7697      </rect>
77      <text string="HOLD5" state="1">
98      <rect state="0">
99         <color red="0.3" green="0.0" blue="0.0" />
100      </rect>
101      <text string="HOLD5">
78102         <color red="0.0" green="0.0" blue="0.0" />
79103         <bounds x="0" y="0.1" width="1" height="0.8" />
80104      </text>
src/mame/layout/videopkr.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="  DRAW  " state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12
13   <element name="L1" defstate="1">
14      <rect>
15         <color red="0.70" green="0.70" blue="0.0" />
16      </rect>
17      <text string=" CANCEL " state="1">
18         <color red="0.0" green="0.0" blue="0.0" />
19         <bounds x="0" y="0.25" width="1" height="0.5" />
20      </text>
21   </element>
22
23   <element name="L2" defstate="1">
24      <rect>
25         <color red="0.70" green="0.0" blue=".0" />
26      </rect>
27      <text string=" HOLD 1 " state="1">
28         <color red="0.0" green="0.0" blue="0.0" />
29         <bounds x="0" y="0.25" width="1" height="0.5" />
30      </text>
31   </element>
32
33   <element name="L3" defstate="1">
34      <rect>
35         <color red="0.70" green="0.0" blue="0.0" />
36      </rect>
37      <text string=" HOLD 2 " state="1">
38         <color red="0.0" green="0.0" blue="0.0" />
39         <bounds x="0" y="0.25" width="1" height="0.5" />
40      </text>
41   </element>
42
43   <element name="L4" defstate="1">
44      <rect>
45         <color red="0.70" green="0.0" blue="0.0" />
46      </rect>
47      <text string=" HOLD 3 " state="1">
48         <color red="0.0" green="0.0" blue="0.0" />
49         <bounds x="0" y="0.25" width="1" height="0.5" />
50      </text>
51   </element>
52
53   <element name="L5" defstate="1">
54      <rect>
55         <color red="0.70" green="0.0" blue="0.0" />
56      </rect>
57      <text string=" HOLD 4 " state="1">
58         <color red="0.0" green="0.0" blue="0.0" />
59         <bounds x="0" y="0.25" width="1" height="0.5" />
60      </text>
61   </element>
62
63   <element name="L6" defstate="1">
64      <rect>
65         <color red="0.70" green="0.0" blue="0.0" />
66      </rect>
67      <text string=" HOLD 5 " state="1">
68         <color red="0.0" green="0.0" blue="0.0" />
69         <bounds x="0" y="0.25" width="1" height="0.5" />
70      </text>
71   </element>
72
73   <element name="L7" defstate="1">
74      <rect>
75         <color red="0.70" green="0.70" blue="0.0" />
76      </rect>
77      <text string="  DEAL  " state="1">
78         <color red="0.0" green="0.0" blue="0.0" />
79         <bounds x="0" y="0.25" width="1" height="0.5" />
80      </text>
81   </element>
82
83   <element name="DSKR" defstate="1">
84      <rect>
85         <color red="0.70" green="0.00" blue="0.0" />
86      </rect>
87   </element>
88
89   <element name="DSKV" defstate="1">
90      <rect>
91         <color red="0.00" green="0.70" blue="0.0" />
92      </rect>
93   </element>
94
95   <element name="DSKA" defstate="1">
96      <rect>
97         <color red="0.7" green="0.70" blue="0.0" />
98      </rect>
99   </element>
100
101
102   <element name="BX" defstate="1">
103      <rect>
104         <color red="0.00" green="0.00" blue="0.0" />
105      </rect>
106   </element>
107
108   <element name="BZ" defstate="1">
109      <rect>
110         <color red="0.5" green="0.5" blue="0.5" />
111      </rect>
112   </element>
113
114   <element name="Dig1" defstate="1">
115      <led7seg>
116         <color red=".75" green="0.0" blue="0.0" />
117      </led7seg>
118   </element>
119
120   <view name="Button Lamps">
121      <screen index="0">
122         <bounds left="0" top="0" right="4" bottom="3" />
123      </screen>
124
125      <bezel name="lamp0" element="L0">
126         <bounds x="0.02313" y="3.12" width="0.5" height="0.30" />
127      </bezel>
128      <bezel name="lamp0" element="L1">
129         <bounds x="0.5694" y="3.12" width="0.5" height="0.30" />
130      </bezel>
131      <bezel name="lamp1" element="L2">
132         <bounds x="1.112" y="3.12" width="0.35" height="0.30" />
133      </bezel>
134      <bezel name="lamp1" element="L3">
135         <bounds x="1.508" y="3.12" width="0.35" height="0.30" />
136      </bezel>
137      <bezel name="lamp2" element="L4">
138         <bounds x="1.904" y="3.12" width="0.35" height="0.30" />
139      </bezel>
140      <bezel name="lamp2" element="L5">
141         <bounds x="2.3" y="3.12" width="0.35" height="0.30" />
142      </bezel>
143      <bezel name="lamp2" element="L6">
144         <bounds x="2.697" y="3.12" width="0.35" height="0.30" />
145      </bezel>
146      <bezel name="lamp3" element="L7">
147         <bounds x="3.093" y="3.12" width="0.5" height="0.30" />
148      </bezel>
149      <bezel name="" element="BX">
150         <bounds x="3.99" y="3.00" width="0.01" height="0.45" />
151      </bezel>
152
153      <bezel name="" element="BZ">
154         <bounds x="0.01" y="3.01" width="0.42" height="0.10" />
155      </bezel>
156
157      <bezel name="lamp7" element="DSKV">
158         <bounds x="0.02" y="3.02" width="0.08" height="0.08" />
159      </bezel>
160      <bezel name="lamp5" element="DSKR">
161         <bounds x="0.12" y="3.02" width="0.08" height="0.08" />
162      </bezel>
163      <bezel name="lamp6" element="DSKR">
164         <bounds x="0.22" y="3.02" width="0.08" height="0.08" />
165      </bezel>
166      <bezel name="lamp13" element="DSKA">
167         <bounds x="0.32" y="3.02" width="0.08" height="0.08" />
168      </bezel>
169
170      <bezel name="digit0" element="Dig1">
171         <bounds x="3.92" y="3.12" width="0.05" height="0.06" />
172      </bezel>
173      <bezel name="digit1" element="Dig1">
174         <bounds x="3.87" y="3.12" width="0.05" height="0.06" />
175      </bezel>
176      <bezel name="digit2" element="Dig1">
177         <bounds x="3.82" y="3.12" width="0.05" height="0.06" />
178      </bezel>
179      <bezel name="digit3" element="Dig1">
180         <bounds x="3.77" y="3.12" width="0.05" height="0.06" />
181      </bezel>
182      <bezel name="digit4" element="Dig1">
183         <bounds x="3.72" y="3.12" width="0.05" height="0.06" />
184      </bezel>
185      <bezel name="digit5" element="Dig1">
186         <bounds x="3.67" y="3.12" width="0.05" height="0.06" />
187      </bezel>
188      <bezel name="digit6" element="Dig1">
189         <bounds x="3.62" y="3.12" width="0.05" height="0.06" />
190      </bezel>
191
192      <bezel name="digit7" element="Dig1">
193         <bounds x="3.92" y="3.2" width="0.05" height="0.06" />
194      </bezel>
195      <bezel name="digit8" element="Dig1">
196         <bounds x="3.87" y="3.2" width="0.05" height="0.06" />
197      </bezel>
198      <bezel name="digit9" element="Dig1">
199         <bounds x="3.82" y="3.2" width="0.05" height="0.06" />
200      </bezel>
201      <bezel name="digit10" element="Dig1">
202         <bounds x="3.77" y="3.2" width="0.05" height="0.06" />
203      </bezel>
204      <bezel name="digit11" element="Dig1">
205         <bounds x="3.72" y="3.2" width="0.05" height="0.06" />
206      </bezel>
207      <bezel name="digit12" element="Dig1">
208         <bounds x="3.67" y="3.2" width="0.05" height="0.06" />
209      </bezel>
210      <bezel name="digit13" element="Dig1">
211         <bounds x="3.62" y="3.2" width="0.05" height="0.06" />
212      </bezel>
213
214      <bezel name="digit14" element="Dig1">
215         <bounds x="3.92" y="3.28" width="0.05" height="0.06" />
216      </bezel>
217      <bezel name="digit15" element="Dig1">
218         <bounds x="3.87" y="3.28" width="0.05" height="0.06" />
219      </bezel>
220      <bezel name="digit16" element="Dig1">
221         <bounds x="3.82" y="3.28" width="0.05" height="0.06" />
222      </bezel>
223      <bezel name="digit17" element="Dig1">
224         <bounds x="3.77" y="3.28" width="0.05" height="0.06" />
225      </bezel>
226      <bezel name="digit18" element="Dig1">
227         <bounds x="3.72" y="3.28" width="0.05" height="0.06" />
228      </bezel>
229      <bezel name="digit19" element="Dig1">
230         <bounds x="3.67" y="3.28" width="0.05" height="0.06" />
231      </bezel>
232      <bezel name="digit20" element="Dig1">
233         <bounds x="3.62" y="3.28" width="0.05" height="0.06" />
234      </bezel>
235   </view>
236</mamelayout>
src/mame/layout/babydad.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="CRAPS" state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12
13   <element name="L1" defstate="1">
14      <rect>
15         <color red="0.70" green="0.70" blue="0.0" />
16      </rect>
17      <text string="6 OR LESS" state="1">
18         <color red="0.0" green="0.0" blue="0.0" />
19         <bounds x="0" y="0.25" width="1" height="0.5" />
20      </text>
21   </element>
22
23   <element name="L2" defstate="1">
24      <rect>
25         <color red="0.70" green="0.0" blue=".0" />
26      </rect>
27      <text string="SEVEN" state="1">
28         <color red="0.0" green="0.0" blue="0.0" />
29         <bounds x="0" y="0.25" width="1" height="0.5" />
30      </text>
31   </element>
32
33   <element name="L3" defstate="1">
34      <rect>
35         <color red="0.70" green="0.0" blue="0.0" />
36      </rect>
37      <text string="8 OR MORE" state="1">
38         <color red="0.0" green="0.0" blue="0.0" />
39         <bounds x="0" y="0.25" width="1" height="0.5" />
40      </text>
41   </element>
42
43   <element name="L4" defstate="1">
44      <rect>
45         <color red="0.70" green="0.0" blue="0.0" />
46      </rect>
47      <text string="FIELD" state="1">
48         <color red="0.0" green="0.0" blue="0.0" />
49         <bounds x="0" y="0.25" width="1" height="0.5" />
50      </text>
51   </element>
52
53   <element name="L5" defstate="1">
54      <rect>
55         <color red="0.70" green="0.0" blue="0.0" />
56      </rect>
57      <text string="ELEVEN" state="1">
58         <color red="0.0" green="0.0" blue="0.0" />
59         <bounds x="0" y="0.25" width="1" height="0.5" />
60      </text>
61   </element>
62
63   <element name="L6" defstate="1">
64      <rect>
65         <color red="0.70" green="0.0" blue="0.0" />
66      </rect>
67      <text string="TWELVE" state="1">
68         <color red="0.0" green="0.0" blue="0.0" />
69         <bounds x="0" y="0.25" width="1" height="0.5" />
70      </text>
71   </element>
72
73   <element name="L7" defstate="1">
74      <rect>
75         <color red="0.70" green="0.70" blue="0.0" />
76      </rect>
77      <text string="TAKE" state="1">
78         <color red="0.0" green="0.0" blue="0.0" />
79         <bounds x="0" y="0.25" width="1" height="0.5" />
80      </text>
81   </element>
82
83   <element name="L8" defstate="1">
84      <disk>
85         <color red="0.70" green="0.0" blue="0.0" />
86      </disk>
87      <text string="BET" state="1">
88         <color red="0.0" green="0.0" blue="0.0" />
89         <bounds x="0" y="0.25" width="1" height="0.5" />
90      </text>
91   </element>
92
93   <element name="L9" defstate="0">
94      <rect state="1">
95         <color red="0.00" green="0.80" blue="0.0" />
96      </rect>
97   </element>
98
99   <element name="L10" defstate="0">
100      <rect state ="1">
101         <color red="0.80" green="0.00" blue="0.0" />
102      </rect>
103   </element>
104
105   <element name="L11" defstate="0">
106      <rect STATE="1">
107         <color red="0.80" green="0.80" blue="0.0" />
108      </rect>
109   </element>
110
111   <element name="LX" defstate="1">
112      <rect>
113         <color red="0.00" green="0.0" blue="0.0" />
114      </rect>
115   </element>
116
117   <element name="Dig1" defstate="1">
118      <led7seg>
119         <color red="1" green="1" blue="1" />
120      </led7seg>
121   </element>
122
123   <view name="Button Lamps">
124      <screen index="0">
125         <bounds left="0" top="0" right="4" bottom="3" />
126      </screen>
127      <bezel name="lamp3" element="L8">
128         <bounds x="0.0" y="3.00" width="0.01" height="0.50" />
129      </bezel>
130      <bezel name="lamp3" element="L8">
131         <bounds x="0.022" y="3.16" width="0.315" height="0.315" />
132      </bezel>
133      <bezel name="lamp2" element="L0">
134         <bounds x="0.382" y="3.16" width="0.449" height="0.315" />
135      </bezel>
136      <bezel name="lamp0" element="L1">
137         <bounds x="0.876" y="3.16" width="0.449" height="0.315" />
138      </bezel>
139      <bezel name="lamp1" element="L2">
140         <bounds x="1.371" y="3.16" width="0.315" height="0.315" />
141      </bezel>
142      <bezel name="lamp1" element="L3">
143         <bounds x="1.730" y="3.16" width="0.315" height="0.315" />
144      </bezel>
145      <bezel name="lamp1" element="L4">
146         <bounds x="2.090" y="3.16" width="0.315" height="0.315" />
147      </bezel>
148      <bezel name="lamp1" element="L5">
149         <bounds x="2.449" y="3.16" width="0.315" height="0.315" />
150      </bezel>
151      <bezel name="lamp1" element="L6">
152         <bounds x="2.809" y="3.16" width="0.315" height="0.315" />
153      </bezel>
154      <bezel name="lamp3" element="L7">
155         <bounds x="3.169" y="3.16" width="0.449" height="0.315" />
156      </bezel>
157
158      <backdrop name="TOP_1" element="L9">
159         <bounds x="1.75" y="3.01" width="0.5" height="0.04" />
160      </backdrop>
161      <backdrop name="TOP_2" element="L10">
162         <bounds x="1.75" y="3.06" width="0.5" height="0.04" />
163      </backdrop>
164      <backdrop name="TOP_3" element="L11">
165         <bounds x="1.75" y="3.11" width="0.5" height="0.04" />
166      </backdrop>
167
168      <bezel name="digit0" element="Dig1">
169         <bounds x="3.933" y="3.16" width="0.045" height="0.065625" />
170      </bezel>
171      <bezel name="digit1" element="Dig1">
172         <bounds x="3.888" y="3.16" width="0.045" height="0.065625" />
173      </bezel>
174      <bezel name="digit2" element="Dig1">
175         <bounds x="3.843" y="3.16" width="0.045" height="0.065625" />
176      </bezel>
177      <bezel name="digit3" element="Dig1">
178         <bounds x="3.798" y="3.16" width="0.045" height="0.065625" />
179      </bezel>
180      <bezel name="digit4" element="Dig1">
181         <bounds x="3.753" y="3.16" width="0.045" height="0.065625" />
182      </bezel>
183      <bezel name="digit5" element="Dig1">
184         <bounds x="3.708" y="3.16" width="0.045" height="0.065625" />
185      </bezel>
186      <bezel name="digit6" element="Dig1">
187         <bounds x="3.663" y="3.16" width="0.045" height="0.065625" />
188      </bezel>
189
190      <bezel name="digit7" element="Dig1">
191         <bounds x="3.933" y="3.239" width="0.045" height="0.065625" />
192      </bezel>
193      <bezel name="digit8" element="Dig1">
194         <bounds x="3.888" y="3.239" width="0.045" height="0.065625" />
195      </bezel>
196      <bezel name="digit9" element="Dig1">
197         <bounds x="3.843" y="3.239" width="0.045" height="0.065625" />
198      </bezel>
199      <bezel name="digit10" element="Dig1">
200         <bounds x="3.798" y="3.239" width="0.045" height="0.065625" />
201      </bezel>
202      <bezel name="digit11" element="Dig1">
203         <bounds x="3.753" y="3.239" width="0.045" height="0.065625" />
204      </bezel>
205      <bezel name="digit12" element="Dig1">
206         <bounds x="3.708" y="3.239" width="0.045" height="0.065625" />
207      </bezel>
208      <bezel name="digit13" element="Dig1">
209         <bounds x="3.663" y="3.239" width="0.045" height="0.065625" />
210      </bezel>
211
212      <bezel name="digit14" element="Dig1">
213         <bounds x="3.933" y="3.318" width="0.045" height="0.065625" />
214      </bezel>
215      <bezel name="digit15" element="Dig1">
216         <bounds x="3.888" y="3.318" width="0.045" height="0.065625" />
217      </bezel>
218      <bezel name="digit16" element="Dig1">
219         <bounds x="3.843" y="3.318" width="0.045" height="0.065625" />
220      </bezel>
221      <bezel name="digit17" element="Dig1">
222         <bounds x="3.798" y="3.318" width="0.045" height="0.065625" />
223      </bezel>
224      <bezel name="digit18" element="Dig1">
225         <bounds x="3.753" y="3.318" width="0.045" height="0.065625" />
226      </bezel>
227      <bezel name="digit19" element="Dig1">
228         <bounds x="3.708" y="3.318" width="0.045" height="0.065625" />
229      </bezel>
230      <bezel name="digit20" element="Dig1">
231         <bounds x="3.663" y="3.318" width="0.045" height="0.065625" />
232      </bezel>
233
234      <bezel name="digit21" element="Dig1">
235         <bounds x="3.933" y="3.396" width="0.045" height="0.065625" />
236      </bezel>
237      <bezel name="digit22" element="Dig1">
238         <bounds x="3.888" y="3.396" width="0.045" height="0.065625" />
239      </bezel>
240      <bezel name="digit23" element="Dig1">
241         <bounds x="3.843" y="3.396" width="0.045" height="0.065625" />
242      </bezel>
243      <bezel name="digit24" element="Dig1">
244         <bounds x="3.798" y="3.396" width="0.045" height="0.065625" />
245      </bezel>
246      <bezel name="digit25" element="Dig1">
247         <bounds x="3.753" y="3.396" width="0.045" height="0.065625" />
248      </bezel>
249      <bezel name="digit26" element="Dig1">
250         <bounds x="3.708" y="3.396" width="0.045" height="0.065625" />
251      </bezel>
252      <bezel name="digit27" element="Dig1">
253         <bounds x="3.663" y="3.396" width="0.045" height="0.065625" />
254      </bezel>
255   </view>
256</mamelayout>
src/mame/layout/lucky74.lay
r3426r3427
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="hold1" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="0.0" blue="0.0" />
66      </rect>
7      <text string="HOLD 1" state="1">
7      <rect state="0">
8         <color red="0.3" green="0.0" blue="0.0" />
9      </rect>
10      <text string="HOLD 1">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="hold2" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="0.0" blue="0.0" />
1619      </rect>
17      <text string="HOLD 2" state="1">
20      <rect state="0">
21         <color red="0.3" green="0.0" blue="0.0" />
22      </rect>
23      <text string="HOLD 2">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="hold3" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="0.0" blue="0.0" />
2632      </rect>
27      <text string="HOLD 3" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.0" blue="0.0" />
35      </rect>
36      <text string="HOLD 3">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="hold4" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="0.0" blue="0.0" />
3645      </rect>
37      <text string="HOLD 4" state="1">
46      <rect state="0">
47         <color red="0.3" green="0.0" blue="0.0" />
48      </rect>
49      <text string="HOLD 4">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
4153   </element>
4254
4355   <element name="hold5" defstate="1">
44      <rect>
56      <rect state="1">
4557         <color red="1.0" green="0.0" blue="0.0" />
4658      </rect>
47      <text string="HOLD 5" state="1">
59      <rect state="0">
60         <color red="0.3" green="0.0" blue="0.0" />
61      </rect>
62      <text string="HOLD 5">
4863         <color red="0.0" green="0.0" blue="0.0" />
4964         <bounds x="0" y="0.1" width="1" height="0.8" />
5065      </text>
5166   </element>
5267
5368   <element name="cancel" defstate="1">
54      <rect>
69      <rect state="1">
5570         <color red="1.0" green="0.0" blue="0.0" />
5671      </rect>
57      <text string="CANCEL" state="1">
72      <rect state="0">
73         <color red="0.3" green="0.0" blue="0.0" />
74      </rect>
75      <text string="CANCEL">
5876         <color red="0.0" green="0.0" blue="0.0" />
5977         <bounds x="0" y="0.1" width="1" height="0.8" />
6078      </text>
6179   </element>
6280
6381   <element name="dup" defstate="1">
64      <rect>
82      <rect state="1">
6583         <color red="1.0" green="0.0" blue="0.0" />
6684      </rect>
67      <text string="D-UP" state="1">
85      <rect state="0">
86         <color red="0.3" green="0.0" blue="0.0" />
87      </rect>
88      <text string="D-UP">
6889         <color red="0.0" green="0.0" blue="0.0" />
6990         <bounds x="0" y="0.1" width="1" height="0.8" />
7091      </text>
7192   </element>
7293
7394   <element name="take" defstate="1">
74      <rect>
95      <rect state="1">
7596         <color red="1.0" green="0.0" blue="0.0" />
7697      </rect>
77      <text string="TAKE" state="1">
98      <rect state="0">
99         <color red="0.3" green="0.0" blue="0.0" />
100      </rect>
101      <text string="TAKE">
78102         <color red="0.0" green="0.0" blue="0.0" />
79103         <bounds x="0" y="0.1" width="1" height="0.8" />
80104      </text>
81105   </element>
82106
83107   <element name="big" defstate="1">
84      <rect>
108      <rect state="1">
85109         <color red="1.0" green="0.0" blue="0.0" />
86110      </rect>
87      <text string="BIG" state="1">
111      <rect state="0">
112         <color red="0.3" green="0.0" blue="0.0" />
113      </rect>
114      <text string="BIG">
88115         <color red="0.0" green="0.0" blue="0.0" />
89116         <bounds x="0" y="0.1" width="1" height="0.8" />
90117      </text>
91118   </element>
92119
93120   <element name="small" defstate="1">
94      <rect>
121      <rect state="1">
95122         <color red="1.0" green="0.0" blue="0.0" />
96123      </rect>
97      <text string="SMALL" state="1">
124      <rect state="0">
125         <color red="0.3" green="0.0" blue="0.0" />
126      </rect>
127      <text string="SMALL">
98128         <color red="0.0" green="0.0" blue="0.0" />
99129         <bounds x="0" y="0.1" width="1" height="0.8" />
100130      </text>
101131   </element>
102132
103133   <element name="start" defstate="1">
104      <rect>
134      <rect state="1">
105135         <color red="1.0" green="0.5" blue="0.0" />
106136      </rect>
107      <text string="START" state="1">
137      <rect state="0">
138         <color red="0.3" green="0.1" blue="0.0" />
139      </rect>
140      <text string="START">
108141         <color red="0.0" green="0.0" blue="0.0" />
109142         <bounds x="0" y="0.1" width="1" height="0.8" />
110143      </text>
111144   </element>
112145
113146   <element name="bet" defstate="1">
114      <rect>
147      <rect state="1">
115148         <color red="1.0" green="0.5" blue="0.0" />
116149      </rect>
117      <text string="BET" state="1">
150      <rect state="0">
151         <color red="0.3" green="0.1" blue="0.0" />
152      </rect>
153      <text string="BET">
118154         <color red="0.0" green="0.0" blue="0.0" />
119155         <bounds x="0" y="0.1" width="1" height="0.8" />
120156      </text>
r3426r3427
168204      <bezel name="lamp6" element="start">
169205         <bounds x="3.45" y="3.02" width="0.55" height="0.24" />
170206      </bezel>
207
171208      <bezel name="lamp5" element="bet">
172209         <bounds x="3.45" y="3.28" width="0.55" height="0.24" />
173210      </bezel>
src/mame/layout/videodad.lay
r0r3427
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="L0" defstate="1">
4      <rect>
5         <color red="0.70" green="0.70" blue="0.0" />
6      </rect>
7      <text string="CRAPS" state="1">
8         <color red="0.0" green="0.0" blue="0.0" />
9         <bounds x="0" y="0.25" width="1" height="0.5" />
10      </text>
11   </element>
12   <element name="L1" defstate="1">
13      <rect>
14         <color red="0.70" green="0.70" blue="0.0" />
15      </rect>
16      <text string="6 OR LESS" state="1">
17         <color red="0.0" green="0.0" blue="0.0" />
18         <bounds x="0" y="0.25" width="1" height="0.5" />
19      </text>
20   </element>
21   <element name="L2" defstate="1">
22      <rect>
23         <color red="0.70" green="0.0" blue=".0" />
24      </rect>
25      <text string="SEVEN" state="1">
26         <color red="0.0" green="0.0" blue="0.0" />
27         <bounds x="0" y="0.25" width="1" height="0.5" />
28      </text>
29   </element>
30   <element name="L3" defstate="1">
31      <rect>
32         <color red="0.70" green="0.0" blue="0.0" />
33      </rect>
34      <text string="8 OR MORE" state="1">
35         <color red="0.0" green="0.0" blue="0.0" />
36         <bounds x="0" y="0.25" width="1" height="0.5" />
37      </text>
38   </element>
39   <element name="L4" defstate="1">
40      <rect>
41         <color red="0.70" green="0.0" blue="0.0" />
42      </rect>
43      <text string="FIELD" state="1">
44         <color red="0.0" green="0.0" blue="0.0" />
45         <bounds x="0" y="0.25" width="1" height="0.5" />
46      </text>
47   </element>
48   <element name="L5" defstate="1">
49      <rect>
50         <color red="0.70" green="0.0" blue="0.0" />
51      </rect>
52      <text string="ELEVEN" state="1">
53         <color red="0.0" green="0.0" blue="0.0" />
54         <bounds x="0" y="0.25" width="1" height="0.5" />
55      </text>
56   </element>
57   <element name="L6" defstate="1">
58      <rect>
59         <color red="0.70" green="0.0" blue="0.0" />
60      </rect>
61      <text string="TWELVE" state="1">
62         <color red="0.0" green="0.0" blue="0.0" />
63         <bounds x="0" y="0.25" width="1" height="0.5" />
64      </text>
65   </element>
66
67   <element name="L7" defstate="1">
68      <rect>
69         <color red="0.70" green="0.70" blue="0.0" />
70      </rect>
71      <text string="TAKE" state="1">
72         <color red="0.0" green="0.0" blue="0.0" />
73         <bounds x="0" y="0.25" width="1" height="0.5" />
74      </text>
75   </element>
76   <element name="BX" defstate="1">
77      <rect>
78         <color red="0.00" green="0.00" blue="0.0" />
79      </rect>
80   </element>
81   <element name="Dig1" defstate="1">
82      <led7seg>
83         <color red=".75" green="0.0" blue="0.0" />
84      </led7seg>
85   </element>
86   <view name="Button Lamps">
87      <screen index="0">
88         <bounds left="0" top="0" right="4" bottom="3" />
89      </screen>
90      <bezel name="" element="BX">
91         <bounds x="3.99" y="3.00" width="0.01" height="0.45" />
92      </bezel>
93      <bezel name="lamp0" element="L0">
94         <bounds x="0.02313" y="3.12" width="0.5" height="0.30" />
95      </bezel>
96      <bezel name="lamp0" element="L1">
97         <bounds x="0.5694" y="3.12" width="0.5" height="0.30" />
98      </bezel>
99      <bezel name="lamp1" element="L2">
100         <bounds x="1.112" y="3.12" width="0.35" height="0.30" />
101      </bezel>
102      <bezel name="lamp1" element="L3">
103         <bounds x="1.508" y="3.12" width="0.35" height="0.30" />
104      </bezel>
105      <bezel name="lamp2" element="L4">
106         <bounds x="1.904" y="3.12" width="0.35" height="0.30" />
107      </bezel>
108      <bezel name="lamp2" element="L5">
109         <bounds x="2.3" y="3.12" width="0.35" height="0.30" />
110      </bezel>
111      <bezel name="lamp2" element="L6">
112         <bounds x="2.697" y="3.12" width="0.35" height="0.30" />
113      </bezel>
114      <bezel name="lamp3" element="L7">
115         <bounds x="3.093" y="3.12" width="0.5" height="0.30" />
116      </bezel>
117      <bezel name="digit0" element="Dig1">
118         <bounds x="3.92" y="3.12" width="0.05" height="0.06" />
119      </bezel>
120      <bezel name="digit1" element="Dig1">
121         <bounds x="3.87" y="3.12" width="0.05" height="0.06" />
122      </bezel>
123      <bezel name="digit2" element="Dig1">
124         <bounds x="3.82" y="3.12" width="0.05" height="0.06" />
125      </bezel>
126      <bezel name="digit3" element="Dig1">
127         <bounds x="3.77" y="3.12" width="0.05" height="0.06" />
128      </bezel>
129      <bezel name="digit4" element="Dig1">
130         <bounds x="3.72" y="3.12" width="0.05" height="0.06" />
131      </bezel>
132      <bezel name="digit5" element="Dig1">
133         <bounds x="3.67" y="3.12" width="0.05" height="0.06" />
134      </bezel>
135      <bezel name="digit6" element="Dig1">
136         <bounds x="3.62" y="3.12" width="0.05" height="0.06" />
137      </bezel>
138      <bezel name="digit7" element="Dig1">
139         <bounds x="3.92" y="3.2" width="0.05" height="0.06" />
140      </bezel>
141      <bezel name="digit8" element="Dig1">
142          <bounds x="3.87" y="3.2" width="0.05" height="0.06" />
143      </bezel>
144      <bezel name="digit9" element="Dig1">
145         <bounds x="3.82" y="3.2" width="0.05" height="0.06" />
146      </bezel>
147      <bezel name="digit10" element="Dig1">
148         <bounds x="3.77" y="3.2" width="0.05" height="0.06" />
149      </bezel>
150      <bezel name="digit11" element="Dig1">
151         <bounds x="3.72" y="3.2" width="0.05" height="0.06" />
152      </bezel>
153      <bezel name="digit12" element="Dig1">
154         <bounds x="3.67" y="3.2" width="0.05" height="0.06" />
155      </bezel>
156      <bezel name="digit13" element="Dig1">
157         <bounds x="3.62" y="3.2" width="0.05" height="0.06" />
158      </bezel>
159      <bezel name="digit14" element="Dig1">
160         <bounds x="3.92" y="3.28" width="0.05" height="0.06" />
161      </bezel>
162      <bezel name="digit15" element="Dig1">
163         <bounds x="3.87" y="3.28" width="0.05" height="0.06" />
164      </bezel>
165      <bezel name="digit16" element="Dig1">
166         <bounds x="3.82" y="3.28" width="0.05" height="0.06" />
167      </bezel>
168      <bezel name="digit17" element="Dig1">
169         <bounds x="3.77" y="3.28" width="0.05" height="0.06" />
170      </bezel>
171      <bezel name="digit18" element="Dig1">
172         <bounds x="3.72" y="3.28" width="0.05" height="0.06" />
173      </bezel>
174      <bezel name="digit19" element="Dig1">
175         <bounds x="3.67" y="3.28" width="0.05" height="0.06" />
176      </bezel>
177      <bezel name="digit20" element="Dig1">
178         <bounds x="3.62" y="3.28" width="0.05" height="0.06" />
179      </bezel>
180   </view>
181</mamelayout>
src/mame/drivers/artmagic.c
r3426r3427
129129 *
130130 *************************************/
131131
132static TIMER_CALLBACK( irq_off )
133{
134   hack_irq = 0;
135   update_irq_state(machine);
136}
137
132138static READ16_HANDLER( ultennis_hack_r )
133139{
134140   /* IRQ5 points to: jsr (a5); rte */
r3426r3427
136142   {
137143      hack_irq = 1;
138144      update_irq_state(machine);
139      hack_irq = 0;
140      update_irq_state(machine);
145      timer_set(ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
141146   }
142147   return input_port_read(machine, "300000");
143148}
src/mame/drivers/policetr.c
r3426r3427
578578      U110  050C
579579      u111  F343
580580      U112  201D
581      U113  FB4x (x maybe 0, 6 or 8.  The picture wasn't clear for this last number)
581      U113  FB46
582582
583583      These are different then the current set and might have the checksum test corrected.
584584
src/mame/drivers/videopkr.c
r3426r3427
1414    * Video Dado,    1987, InterFlip.
1515    * Video Cordoba, 1987, InterFlip.
1616
17    * Baby Poker,    1989, Recreativos Franco.
18    * Baby Dado,     1989, Recreativos Franco.
1719
20
1821***************************************************************************
1922
2023
r3426r3427
175178    ----------------------------------------------------------------------------
176179    Fichas Jugadas       1 Ficha    2 Fichas    3 Fichas    4 Fichas    5 Fichas
177180    ----------------------------------------------------------------------------
178    TRIPLE BAR              250        250         250         250        2000
181    TRIPLE BAR             250         250         250         250        2000
179182    ............................................................................
180183    3 x Doble Bar        - 100            |    Olive-Olive-Any Bar        - 18
181184    3 x Single Bar       -  50            |    3 x Orange                 - 14
r3426r3427
211214**************************************************************************
212215
213216
217    [2008-10-08]
218
219    - Added Baby Poker Game.
220    - Added Baby Dado Game.
221    - Mapped "Hand Pay" button for Baby Games.
222    - Added decoder to Jackpot mechanical counter.
223    - Added sound support to Baby Poker Game.
224    - Added tower lamps to Baby Games layouts.
225    - Reworked layouts for Baby Games.
226    - Reworked the color routines.
227    - Added new color routines for Baby Games.
228    - Redumped the videocba color PROM.
229    - Added color switch. (It changes background color in some games).
230    - Added "hopper full" switch support (for diverter function).
231    - Added diverter function decoder.
232    - Added Button-lamps layout.
233    - Added full functional mechanical counters decoding.
234    - Added 7 Segment decoder and 7 Digit Counter functions.
235    - Added button-lamps layout & mechanical counters simulation on layout.
236      Mechanical counters to layout: Coin-In, Coin-Out and Coin to Drop.
237    - Added NVRAM support to mechanical counters.
238
214239    TO DO
215240    =====
216241
242    * Add Tech. Notes for Baby board, a reworked and improved version on Video Poker hardware.
243    * Fix some missing pulses on mechanical counters.
217244    * Fix the bug on bookeeping mode (videodad & videocba).
218245    * Figure out the undocumented jumper.
219    * Properly dump the videocba color PROM.
220    * Button-lamps layout.
221246    * Hopper simulation.
222    * Decode output ports for electromechanical counters.
247    * Switch to resnet system.
223248
224249
225250**************************************************************************/
r3426r3427
233258
234259#include "driver.h"
235260#include "cpu/mcs48/mcs48.h"
261#include "cpu/i8051/i8051.h"
262#include "sound/ay8910.h"
236263#include "sound/dac.h"
264#include "videopkr.lh"
265#include "blckjack.lh"
266#include "videocba.lh"
267#include "videodad.lh"
268#include "babypkr.lh"
269#include "babydad.lh"
237270
238271#define DATA_NVRAM_SIZE     0x100
239272
r3426r3427
248281static UINT8 vp_sound_p2;
249282static UINT8 p24_data;
250283static UINT8 sound_latch;
284static UINT8 baby_latch;
251285static UINT8 sound_ant;
252286static UINT8 dc_4020;
253287static UINT8 dc_40103;
254288static UINT8 te_40103;
255289static UINT8 ld_40103;
256290
257static UINT8 c_io, hp_1, hp_2, bell;
291UINT8 ant_jckp, jckp, ant_cio, c_io, hp_1, hp_2, bell, aux3, dvrt;
292unsigned long count0, count1, count2, count3, count4;
258293
294/* Baby vars */
295static UINT8 sbp0, sbp2, sbp3;
259296
297
260298/*************************
261299*     Video Hardware     *
262300*************************/
263301
264302static tilemap *bg_tilemap;
265303
304/* BCD to Seven Segment Decoder */
305UINT8 dec_7seg(int data)
306{
307   UINT8 segment;
308   switch (data)
309   {
310      case 0: segment = 0x3f; break;
311      case 1: segment = 0x06; break;
312      case 2: segment = 0x5b; break;
313      case 3: segment = 0x4f; break;
314      case 4: segment = 0x66; break;
315      case 5: segment = 0x6d; break;
316      case 6: segment = 0x7d; break;
317      case 7: segment = 0x07; break;
318      case 8: segment = 0x7f; break;
319      case 9: segment = 0x6f; break;
320      default: segment = 0x79;
321   }
266322
267static PALETTE_INIT( videopkr )
323   return segment;
324}
325
326/* Display a seven digit counter on layout - Index points to less significant digit*/
327void count_7dig(unsigned long data, UINT8 index)
268328{
269   int i;
329   UINT8 i;
330   char strn[7];
331   sprintf(strn,"%7lu",data);
270332
271   for (i = 0; i < machine->config->total_colors; i++)
333   for (i = 0; i < 7; i++)
272334   {
273      int r, g, b, j;
335      output_set_digit_value(index+i, dec_7seg((strn[6 - i] | 0x10) - 0x30));
336   }
337}
274338
275      j = 0x30 * ((color_prom[i] >> 3) & 0x01);
339PALETTE_INIT( videopkr )
340{
341   int j;
276342
343   for (j = 0; j < machine->config->total_colors; j++)
344   {
345      int r, g, b, tr, tg, tb, i;
346
347      i = (color_prom[j] >> 3) & 0x01;
348
277349      /* red component */
278      r = j + 0xbf - (0xbf * ((color_prom[i] >> 0) & 0x01));
350      tr = 0xf0 - (0xf0 * ((color_prom[j] >> 0) & 0x01));
351      r = tr - (i * (tr / 5));
279352
280353      /* green component */
281      g = j + 0xbf - (0xbf * ((color_prom[i] >> 1) & 0x01));
354      tg = 0xf0 - (0xf0 * ((color_prom[j] >> 1) & 0x01));
355      g = tg - (i * (tg / 5));
282356
283357      /* blue component */
284      b = j + 0xbf - (0xbf * ((color_prom[i] >> 2) & 0x01));
358      tb = 0xf0 - (0xf0 * ((color_prom[j] >> 2) & 0x01));
359      b = tb - (i * (tb / 5));
285360
286      palette_set_color(machine, i, MAKE_RGB(r, g, b));
361      palette_set_color(machine, j, MAKE_RGB(r, g, b));
287362   }
288363}
289364
365PALETTE_INIT( babypkr )
366{
367   int j;
290368
369   for (j = 0; j < machine->config->total_colors; j++)
370   {
371      int r, g, b, tr, tg, tb, i, top;
372
373      top = 0xff;
374
375      /* intense component */
376      i = 0x2f * ((color_prom[j] >> 3) & 0x01);
377      top = top - i;
378
379      /* red component */
380      tr =  0xdf * ((color_prom[j] >> 0) & 0x01);
381      r = top - ((tr * top) / 0x100 );
382
383      /* green component */
384      tg =  0xdf * ((color_prom[j] >> 1) & 0x01);
385      g = top - ((tg * top) / 0x100 );
386
387      /* blue component */
388      tb =  0xdf * ((color_prom[j] >> 2) & 0x01);
389      b = top - ((tb * top) / 0x100);
390
391      palette_set_color(machine, j, MAKE_RGB(r, g, b));
392   }
393}
394
291395static TILE_GET_INFO( get_bg_tile_info )
292396{
293397   int offs = tile_index;
294   int attr = color_ram[offs];
398   int attr = color_ram[offs] + input_port_read(machine, "IN2"); /* Color Switch Action */
295399   int code = video_ram[offs];
296400   int color = attr;
297
298401   SET_TILE_INFO(0, code, color, 0);
299402}
300403
301404
302static VIDEO_START( videopkr )
405VIDEO_START( videopkr )
303406{
304407   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
305408}
306409
307static VIDEO_START( vidadcba )
410VIDEO_START( vidadcba )
308411{
309412   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, 16, 8, 32, 32);
310413}
311414
312415
313static VIDEO_UPDATE( videopkr )
416VIDEO_UPDATE( videopkr )
314417{
315418   tilemap_mark_all_tiles_dirty(bg_tilemap);
316419   tilemap_draw(bitmap, cliprect, bg_tilemap, 0, 0);
317420   return 0;
318421}
319422
320
321423/********************
322424*   NVRAM Handler   *
323425********************/
r3426r3427
327429   if (read_or_write)
328430   {
329431      mame_fwrite(file, data_ram, DATA_NVRAM_SIZE);
432      mame_fwrite(file, &count1, 8);
433      mame_fwrite(file, &count2, 8);
434      mame_fwrite(file, &count3, 8);
435      mame_fwrite(file, &count4, 8);
436
330437   }
331438   else
332439   {
333440      if (file)
334441      {
335442         mame_fread(file, data_ram, DATA_NVRAM_SIZE);
443         mame_fread(file, &count1, 8);
444         mame_fread(file, &count2, 8);
445         mame_fread(file, &count3, 8);
446         mame_fread(file, &count4, 8);
336447      }
337448      else
338449      {
339450         memset(data_ram, 0, DATA_NVRAM_SIZE);
451         memset(data_ram, count0, 8);
452         memset(data_ram, count0, 8);
453         memset(data_ram, count0, 8);
454         memset(data_ram, count0, 8);
340455      }
341456   }
342457}
r3426r3427
348463
349464static READ8_HANDLER( videopkr_io_r )
350465{
351   UINT8 valor = 0xff;
352   UINT16 kbdin = 0x0000;
466   UINT8 valor = 0, hf, co;
353467
468   UINT16 kbdin;
469
354470   switch (p2)
355471   {
356472      case 0xef:   /* inputs are multiplexed through a diode matrix */
357473      {
358         kbdin = (input_port_read(machine, "IN1") << 8) + input_port_read(machine, "IN0");
474         hf = ((input_port_read(machine, "IN1") & 0x10 ) >> 4) & 1;          /* Hopper full detection */
475         co = 0x10 * ((input_port_read(machine, "IN1") & 0x20 ) >> 5);      /* Coin Out detection */
476         kbdin = ((input_port_read(machine, "IN1") & 0xaf ) << 8) + input_port_read(machine, "IN0");
359477
360478         switch (kbdin)
361479         {
362            case 0x0001: valor = 0x01; break;
363            case 0x0002: valor = 0x04; break;
364            case 0x0004: valor = 0x05; break;
365            case 0x0008: valor = 0x07; break;
366            case 0x0010: valor = 0x08; break;
367            case 0x0020: valor = 0x09; break;
368            case 0x0040: valor = 0x0a; break;
369            case 0x0080: valor = 0x0b; break;
370            case 0x0100: valor = 0x0c; break;
371            case 0x0200: valor = 0x0d; break;
372            case 0x0400: valor = 0x0e; break;
373            case 0x0800: valor = 0x0f; break;
374            case 0x1000: valor = 0x10; break;
480            case 0x0000: valor = 0x00; break;
481            case 0x0001: valor = 0x01; break;   /* Door */
482            case 0x4000: valor = 0x02; break;
483            case 0x8000: valor = 0x03; break;   /* Hand Pay */
484            case 0x0002: valor = 0x04; break;   /* Books */
485            case 0x0004: valor = 0x05; break;   /* Coin In */
486            case 0x0008: valor = 0x07; break;   /* Start */
487            case 0x0010: valor = 0x08; break;   /* Discard */
488            case 0x0020: valor = 0x09; break;   /* Cancel */
489            case 0x0040: valor = 0x0a; break;   /* Hold 1 */
490            case 0x0080: valor = 0x0b; break;   /* Hold 2 */
491            case 0x0100: valor = 0x0c; break;   /* Hold 3 */
492            case 0x0200: valor = 0x0d; break;   /* Hold 4 */
493            case 0x0400: valor = 0x0e; break;   /* Hold 5 */
494            case 0x0800: valor = 0x06; break;   /* Bet */
495         }
375496
376            default: valor = 0x00;
497         if ((valor == 0x00) & hf )
498         {
499            valor = 0x0f;
377500         }
501         
502         valor += co;
378503         break;
379504      }
380      case 0x5f:
505
381506      case 0xdf:
382507      {
508         n_offs = ((p1 & 0xc0) << 2 ) + offset;
383509         valor = data_ram[offset];
384510         break;
385511      }
512
513      case 0x5f:
514      {
515         n_offs = ((p1 & 0xc0) << 2 ) + offset;
516         valor = data_ram[offset];
517         break;
518      }
519
386520      case 0x7c:
387521      case 0x7d:
388522      case 0x7e:
389523      case 0x7f:
390524      {
391525         n_offs = ((p1 & 0xc0) << 2 ) + offset;
392         valor = color_ram[n_offs] & 0x0f;
526         valor = color_ram[n_offs];
393527         break;
394528      }
529
395530      case 0xbc:
396531      case 0xbd:
397532      case 0xbe:
r3426r3427
421556         tilemap_mark_tile_dirty(bg_tilemap, n_offs);
422557         break;
423558      }
559
424560      case 0xdf:
425561      {
426562         data_ram[offset] = (data & 0x0f) + 0xf0;
427563         break;
428564      }
565
429566      case 0x7c:
430567      case 0x7d:
431568      case 0x7e:
r3426r3427
436573         tilemap_mark_tile_dirty(bg_tilemap, n_offs);
437574         break;
438575      }
576
439577      case 0xbc:
440578      case 0xbd:
441579      case 0xbe:
r3426r3427
446584         tilemap_mark_tile_dirty(bg_tilemap, n_offs);
447585         break;
448586      }
587
449588      case 0xef:   /* Port 2.4 */
450589      {
451590         output_set_lamp_value(0, (data & 1));         /* L_1 */
r3426r3427
457596         output_set_lamp_value(6, ((data >> 6) & 1));   /* Hopper_2 */
458597         output_set_lamp_value(7, ((data >> 7) & 1));   /* Diverter */
459598         p24_data = data;
460
599         hp_1 = (~p24_data >> 6) & 1;
600         hp_2 = (~p24_data >> 5) & 1;
601         dvrt = (~p24_data >> 7) & 1;
461602         break;
462603      }
604
463605      case 0xff:
464606      {
465607         t0_latch = t0_latch ^ 0x01;      /* fix the bookkeeping mode */
r3426r3427
482624{
483625   p1 = data;
484626
485   output_set_lamp_value(8, (data & 1));         /* Aux_0 - */
627   output_set_lamp_value(8, (data & 1));         /* Aux_0 - Jackpot mech. counter (Baby Games)*/
486628   output_set_lamp_value(9, ((data >> 1) & 1));   /* Aux_1 - */
487629   output_set_lamp_value(10, ((data >> 2) & 1));   /* Aux_2 - */
488630   output_set_lamp_value(11, ((data >> 3) & 1));   /* Aux_3 - */
489631   output_set_lamp_value(12, ((data >> 4) & 1));   /* Aux_4 - Bell */
490632   output_set_lamp_value(13, ((data >> 5) & 1));   /* Aux_5 - /CIO */
633
634   jckp = p1 & 1;
635
636   if ((~c_io & 1) & ant_cio & hp_1 & hp_2)
637   {
638      ++count1;   /* Decoded Coin In Mech. Counter*/
639   }
640
641   if ((~c_io & 1) & ant_cio & (~hp_1 & 1) & (~hp_2 & 1))
642   {
643      ++count2;   /* Decoded Coind Out Mech. Counter */
644   }
645
646   if (~c_io & ant_cio & hp_1 & hp_2 & ~dvrt)
647   {
648      ++count3;   /* Decoded Coin to Drop Mech. Counter */
649   }
650
651   if (~jckp & ant_jckp)
652   {
653      ++count4;   /* Decoded Jackpot Mech. Counter */
654   }
655
656   count_7dig(count1, 0);
657   count_7dig(count2, 7);
658   count_7dig(count3, 14);
659   count_7dig(count4, 21);
660
661   ant_cio = c_io;
662   ant_jckp = jckp;
491663}
492664
493665static WRITE8_HANDLER( videopkr_p2_data_w )
r3426r3427
551723         hp_1 = (~p24_data >> 6) & 1;
552724         hp_2 = (~p24_data >> 5) & 1;
553725         bell = (p1 >> 4) & 1;
554
726         aux3 = (p1 >> 3) & 1;
727         dvrt = (~p24_data >> 7) & 1;
555728         sound_ant = sound_latch;
556729         sound_latch = c_io + (hp_1 << 1) + (hp_2 << 2) + (bell << 3) + 0xf0;
557730
r3426r3427
588761         ld_40103 = 0;   /* p2.5 LOW */
589762         break;
590763      }
764
591765      case 0x7f:
592766      {
593767         te_40103 = 0;
594768         ld_40103 = 1;
595769         break;
596770      }
771
597772      case 0xff:
598773      {
599774         te_40103 = 1;
r3426r3427
603778   }
604779}
605780
781
782/* Baby Sound Handlers */
783
784static READ8_HANDLER(baby_sound_p0_r)
785{
786   return sbp0;
787}
788
789static WRITE8_HANDLER(baby_sound_p0_w)
790{
791   sbp0 = data;
792}
793
794static READ8_HANDLER(baby_sound_p1_r)
795{
796   c_io = (p1 >> 5) & 1;
797   hp_1 = (~p24_data >> 6) & 1;
798   hp_2 = (~p24_data >> 5) & 1;
799   bell = (p1 >> 4) & 1;
800   aux3 = (p1 >> 3) & 1;
801   baby_latch = c_io + (hp_1 << 1) + (hp_2 << 2) + (bell << 3) + (aux3 << 4) + 0xe0;
802   return baby_latch;
803}
804
805static WRITE8_HANDLER(baby_sound_p1_w)
806{
807   baby_latch = baby_latch | data;
808}
809
810static READ8_HANDLER(baby_sound_p2_r)
811{
812   return sbp2;
813}
814
815static WRITE8_HANDLER(baby_sound_p2_w)
816{
817   sbp2 = data;
818   dac_0_data_w(machine, 0, data);
819}
820
821static READ8_HANDLER(baby_sound_p3_r)
822{
823   return sbp3;
824}
825
826static WRITE8_HANDLER(baby_sound_p3_w)
827{
828   UINT8 lmp_ports, ay_intf;
829   sbp3 = data;
830   lmp_ports = sbp3 >> 1 & 0x07;
831
832   output_set_value("TOP_1", (lmp_ports >> 0) & 1);
833   output_set_value("TOP_2", (lmp_ports >> 1) & 1);
834   output_set_value("TOP_3", (lmp_ports >> 2) & 1);
835   
836   if (!(sbp3 & 0x10))
837   {
838      ay8910_reset_ym(sndti_token(SOUND_AY8910, 0));
839      logerror("AY3-8910: Reset\n");
840   }
841
842   ay_intf = (sbp3 >> 5) & 0x07;
843
844   switch (ay_intf)
845   {
846      case 0x00:   break;
847      case 0x01:   break;
848      case 0x02:   break;
849      case 0x03:   ay8910_write_port_0_w(machine, 1, sbp0); break;
850      case 0x04:   break;
851      case 0x05:   sbp0 = ay8910_read_port_0_r(machine, sbp0); break;
852      case 0x06:   break;
853      case 0x07:   ay8910_control_port_0_w(machine, 0, sbp0); break;
854   }
855}
856
857
606858static TIMER_CALLBACK(sound_t1_callback)
607859{
608860   if (te_40103 == 1)
r3426r3427
625877ADDRESS_MAP_END
626878
627879static ADDRESS_MAP_START( i8039_io_port, ADDRESS_SPACE_IO, 8 )
628   AM_RANGE(0x00,          0xff         ) AM_READWRITE(videopkr_io_r, videopkr_io_w)
880   AM_RANGE(0x00         , 0xff         ) AM_READWRITE(videopkr_io_r, videopkr_io_w)
629881   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(videopkr_p1_data_r, videopkr_p1_data_w)
630882   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(videopkr_p2_data_r, videopkr_p2_data_w)
631883   AM_RANGE(MCS48_PORT_P4, MCS48_PORT_P4) AM_WRITE(p4_w)
r3426r3427
637889ADDRESS_MAP_END
638890
639891static ADDRESS_MAP_START( i8039_sound_port, ADDRESS_SPACE_IO, 8 )
640   AM_RANGE(0x00,          0xff         ) AM_READWRITE(sound_io_r, sound_io_w)
892   AM_RANGE(0x00         , 0xff         ) AM_READWRITE(sound_io_r, sound_io_w)
641893   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(dac_0_data_w)
642894   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(sound_p2_r, sound_p2_w)
643895ADDRESS_MAP_END
644896
645897
898static ADDRESS_MAP_START( i8051_sound_mem, ADDRESS_SPACE_PROGRAM, 8 )
899   AM_RANGE(0x0000, 0x0fff) AM_ROM
900ADDRESS_MAP_END
901
902static ADDRESS_MAP_START( i8051_sound_dat, ADDRESS_SPACE_DATA, 8 )
903   AM_RANGE(0x0000, 0x1ff) AM_RAM
904ADDRESS_MAP_END
905
906static ADDRESS_MAP_START( i8051_sound_port, ADDRESS_SPACE_IO, 8 )
907   AM_RANGE(0x00, 0x00) AM_READWRITE(baby_sound_p0_r, baby_sound_p0_w)
908   AM_RANGE(0x01, 0x01) AM_READWRITE(baby_sound_p1_r, baby_sound_p1_w)
909   AM_RANGE(0x02, 0x02) AM_READWRITE(baby_sound_p2_r, baby_sound_p2_w)
910   AM_RANGE(0x03, 0x03) AM_READWRITE(baby_sound_p3_r, baby_sound_p3_w)
911ADDRESS_MAP_END
912
913
646914/************************
647915*      Input Ports      *
648916************************/
r3426r3427
651919   PORT_START("IN0")
652920   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")    PORT_TOGGLE PORT_CODE(KEYCODE_0)
653921   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books")   PORT_CODE(KEYCODE_9)
654   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(4)
922   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
655923   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start")   PORT_CODE(KEYCODE_1)
656924   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Discard") PORT_CODE(KEYCODE_2)
657925   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cancel")  PORT_CODE(KEYCODE_N)
r3426r3427
662930   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Hold 3")  PORT_CODE(KEYCODE_C)
663931   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hold 4")  PORT_CODE(KEYCODE_V)
664932   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Hold 5")  PORT_CODE(KEYCODE_B)
665   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper")  PORT_TOGGLE PORT_CODE(KEYCODE_8)
666   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout")  PORT_CODE(KEYCODE_M)
667   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
933   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
934   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper")  PORT_TOGGLE PORT_CODE(KEYCODE_8)
935   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout")  PORT_CODE(KEYCODE_M)
668936   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
669937   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
670938
939   PORT_START("IN2")
940   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
941   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
942   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
943
671944INPUT_PORTS_END
672945
673946static INPUT_PORTS_START( blckjack )
674947   PORT_START("IN0")
675948   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")   PORT_TOGGLE PORT_CODE(KEYCODE_0)
676949   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books")  PORT_CODE(KEYCODE_9)
677   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(4)
950   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
678951   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start")  PORT_CODE(KEYCODE_1)
679952   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Hit")    PORT_CODE(KEYCODE_Z)
680953   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Stand")  PORT_CODE(KEYCODE_X)
r3426r3427
684957   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
685958   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
686959   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
687   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
688   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
689   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
960   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
961   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper")  PORT_TOGGLE PORT_CODE(KEYCODE_8)
962   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout")  PORT_CODE(KEYCODE_M)
690963   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
691964   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
965
966   PORT_START("IN2")
967   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
968   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
969   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
692970INPUT_PORTS_END
693971
694972static INPUT_PORTS_START( videodad )
695973   PORT_START("IN0")
696   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")  PORT_TOGGLE PORT_CODE(KEYCODE_0)
697   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9)
698   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(4)
699   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Get Credits") PORT_CODE(KEYCODE_Q)
700   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Crap")        PORT_CODE(KEYCODE_A)
701   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("6 or Less")   PORT_CODE(KEYCODE_Z)
702   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Seven")       PORT_CODE(KEYCODE_X)
703   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("8 or More")   PORT_CODE(KEYCODE_C)
974   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")      PORT_TOGGLE PORT_CODE(KEYCODE_0)
975   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books")     PORT_CODE(KEYCODE_9)
976   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
977   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Take")      PORT_CODE(KEYCODE_Q)
978   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Crap")      PORT_CODE(KEYCODE_A)
979   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("6 or Less") PORT_CODE(KEYCODE_Z)
980   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Seven")     PORT_CODE(KEYCODE_X)
981   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("8 or More") PORT_CODE(KEYCODE_C)
704982
705983   PORT_START("IN1")
706984   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Field")  PORT_CODE(KEYCODE_S)
707985   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Eleven") PORT_CODE(KEYCODE_V)
708986   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Twelve") PORT_CODE(KEYCODE_B)
709   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
710   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
711   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
987   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
988   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
989   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
712990   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
713991   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
992
993   PORT_START("IN2")
994   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
995   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
996   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
714997INPUT_PORTS_END
715998
716999static INPUT_PORTS_START( videocba )
7171000   PORT_START("IN0")
7181001   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")  PORT_TOGGLE PORT_CODE(KEYCODE_0)
7191002   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books") PORT_CODE(KEYCODE_9)
720   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(4)
1003   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
7211004   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start") PORT_CODE(KEYCODE_1)
7221005   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
7231006   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
r3426r3427
7281011   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
7291012   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
7301013   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
731   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
732   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
733   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
1014   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
1015   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
1016   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
7341017   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
7351018   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
1019
1020   PORT_START("IN2")
1021   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
1022   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1023   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
7361024INPUT_PORTS_END
7371025
7381026
1027static INPUT_PORTS_START( babypkr )
1028   PORT_START("IN0")
1029   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")           PORT_TOGGLE PORT_CODE(KEYCODE_0)
1030   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books")          PORT_CODE(KEYCODE_9)
1031   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
1032   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start")          PORT_CODE(KEYCODE_1)
1033   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Discard-Double") PORT_CODE(KEYCODE_2)
1034   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cancel-Take")    PORT_CODE(KEYCODE_N)
1035   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Hold 1")         PORT_CODE(KEYCODE_Z)
1036   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Hold 2")         PORT_CODE(KEYCODE_X)
1037
1038   PORT_START("IN1")
1039   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Hold 3") PORT_CODE(KEYCODE_C)
1040   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hold 4") PORT_CODE(KEYCODE_V)
1041   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Hold 5") PORT_CODE(KEYCODE_B)
1042   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Bet")    PORT_CODE(KEYCODE_3)
1043   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
1044   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
1045   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED  )
1046   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON12) PORT_NAME("Hand Pay")       PORT_CODE(KEYCODE_W)
1047
1048   PORT_START("IN2")
1049   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
1050   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1051   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
1052
1053INPUT_PORTS_END
1054
1055static INPUT_PORTS_START( babydad )
1056   PORT_START("IN0")
1057   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Door")    PORT_TOGGLE PORT_CODE(KEYCODE_0)
1058   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Books")   PORT_CODE(KEYCODE_9)
1059   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )   PORT_IMPULSE(2)
1060   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Take")    PORT_CODE(KEYCODE_1)
1061   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Crap")    PORT_CODE(KEYCODE_2)
1062   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("6 or Less")   PORT_CODE(KEYCODE_N)
1063   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Seven")    PORT_CODE(KEYCODE_Z)
1064   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("8 or More")   PORT_CODE(KEYCODE_X)
1065
1066   PORT_START("IN1")
1067   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Field")  PORT_CODE(KEYCODE_C)
1068   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Eleven") PORT_CODE(KEYCODE_V)
1069   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Twelve") PORT_CODE(KEYCODE_B)
1070   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Bet")    PORT_CODE(KEYCODE_3)
1071   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON10) PORT_NAME("Hopper") PORT_TOGGLE PORT_CODE(KEYCODE_8)
1072   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON11) PORT_NAME("Payout") PORT_CODE(KEYCODE_M)
1073   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED  )
1074    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON12) PORT_NAME("Hand Pay")    PORT_CODE(KEYCODE_W)
1075
1076   PORT_START("IN2")
1077   PORT_DIPNAME( 0x20, 0x00, "Color Sw." )      PORT_DIPLOCATION("SW1:1")
1078   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1079   PORT_DIPSETTING(    0x00, DEF_STR( On  ) )
1080
1081INPUT_PORTS_END
1082
1083
7391084/*************************
7401085*    Graphics Layouts    *
7411086*************************/
r3426r3427
7901135   sound_latch = 0xff;   /* default sound data latch value */
7911136   p24_data = 0xff;
7921137   p1 = 0xff;
1138   ant_cio = 0;
1139   count0 = 0;
7931140   t1_timer = timer_alloc(sound_t1_callback, NULL);
794   timer_adjust_periodic(t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50));   /* yep, 50Hz. */
1141   timer_adjust_periodic(t1_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50));   /* 50Hz. */
7951142}
7961143
1144static const ay8910_interface ay8910_config =
1145{
1146   AY8910_LEGACY_OUTPUT,
1147   AY8910_DEFAULT_LOADS,
1148   /* no ports used */
1149   NULL,
1150   NULL,
1151   NULL,
1152   NULL
1153};
7971154
7981155/************************
7991156*    Machine Drivers    *
r3426r3427
8111168   MDRV_CPU_ADD("sound", I8039, SOUND_CLOCK)
8121169   MDRV_CPU_PROGRAM_MAP(i8039_sound_mem, 0)
8131170   MDRV_CPU_IO_MAP(i8039_sound_port, 0)
814
8151171   MDRV_MACHINE_START(videopkr)
8161172   MDRV_NVRAM_HANDLER(videopkr)
8171173
r3426r3427
8321188
8331189   /* sound hardware */
8341190   MDRV_SPEAKER_STANDARD_MONO("mono")
835   MDRV_SOUND_ADD("sound",   DAC, 0)
1191   MDRV_SOUND_ADD("sound", DAC, 0)
8361192   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.55)
8371193MACHINE_DRIVER_END
8381194
r3426r3427
8651221MACHINE_DRIVER_END
8661222
8671223
1224static MACHINE_DRIVER_START( babypkr )
1225
1226   /* basic machine hardware */
1227   MDRV_IMPORT_FROM(videopkr)
1228   MDRV_CPU_REPLACE("main", I8039, CPU_CLOCK_ALT)
1229   MDRV_CPU_REPLACE("sound", I8051, CPU_CLOCK )
1230   MDRV_CPU_PROGRAM_MAP(i8051_sound_mem, 0)
1231   MDRV_CPU_DATA_MAP(i8051_sound_dat, 0)
1232   MDRV_CPU_IO_MAP(i8051_sound_port, 0)
1233
1234   /* video hardware */
1235   MDRV_SCREEN_MODIFY("main")
1236   MDRV_SCREEN_SIZE(32*16, 32*8)
1237   MDRV_SCREEN_VISIBLE_AREA(5*16, 31*16-1, 3*8, 29*8-1)
1238
1239   MDRV_PALETTE_INIT(babypkr)
1240   MDRV_GFXDECODE(videodad)
1241   MDRV_VIDEO_START(vidadcba)
1242
1243   MDRV_SOUND_ADD("ay", AY8910, CPU_CLOCK / 6)
1244   MDRV_SOUND_CONFIG(ay8910_config)
1245   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
1246MACHINE_DRIVER_END
1247
1248
8681249/*************************
8691250*        Rom Load        *
8701251*************************/
8711252
8721253ROM_START( videopkr )
8731254   ROM_REGION( 0x1000, "main", 0 )
874   ROM_LOAD( "vpoker.c5",   0x0000, 0x0800,   CRC(200d21e4) SHA1(d991c9f10a36a02491bb0aba32129675fed77a10) )
875   ROM_LOAD( "vpoker.c7",   0x0800, 0x0800,   CRC(f72c2a90) SHA1(e9c54d1f895cde0aaca4121a252da40594195a25) )
1255   ROM_LOAD( "vpoker.c5",      0x0000, 0x0800,   CRC(200d21e4) SHA1(d991c9f10a36a02491bb0aba32129675fed77a10) )
1256   ROM_LOAD( "vpoker.c7",      0x0800, 0x0800,   CRC(f72c2a90) SHA1(e9c54d1f895cde0aaca4121a252da40594195a25) )
8761257
8771258   ROM_REGION( 0x1000, "sound", 0 )   /* sound cpu program */
8781259   ROM_LOAD( "vpsona3.pbj",   0x0000, 0x0800,   CRC(a4f7bf7f) SHA1(a08287821f3471cb3e1ae0528811da930fd57387) )
8791260   ROM_LOAD( "vpsona2.pbj",   0x0800, 0x0800,   CRC(583a9b95) SHA1(a10e85452e285b2a63f885f4e39b7f76ee8b2407) )
8801261
8811262   ROM_REGION( 0x1000, "tiles", ROMREGION_DISPOSE )
882   ROM_LOAD( "vpbj_b15.org",   0x0000, 0x0800,   CRC(67468e3a) SHA1(761766f0fb92693d32179a914e11da517cc5747d) )
883   ROM_LOAD( "vpbj_b12.org",   0x0800, 0x0800,   CRC(4aba166e) SHA1(930cea2216a39b5d72021d1b449db018a121adce) )
1263    ROM_LOAD( "vpbj_b15.org",   0x0000, 0x0800,   CRC(67468e3a) SHA1(761766f0fb92693d32179a914e11da517cc5747d) )
1264    ROM_LOAD( "vpbj_b12.org",   0x0800, 0x0800,   CRC(4aba166e) SHA1(930cea2216a39b5d72021d1b449db018a121adce) )
8841265
8851266   ROM_REGION( 0x0100, "proms", 0 )
8861267   ROM_LOAD( "vpbjorg.col",   0x0000, 0x0100,   CRC(09abf5f1) SHA1(f2d6b4f2f08b47b93728dafb50576d5ca859255f) )
887ROM_END
1268   ROM_END
8881269
8891270ROM_START( blckjack )
8901271   ROM_REGION( 0x1000, "main", 0 )
r3426r3427
9241305
9251306ROM_START( videocba )
9261307   ROM_REGION( 0x1000, "main", 0 )
927   ROM_LOAD( "vcc5org.old",   0x0000, 0x0800,   CRC(e6a6a4e4) SHA1(ada1e241a2d39e5a9cf400559e825b0b7d88fca5) )
1308   ROM_LOAD( "vcc5org.old",   0x0000, 0x0800,   CRC(96d72283) SHA1(056197a9e2ad40d1d6610bbe8a1855b81c0a6715) )
9281309   ROM_LOAD( "vcc7org.old",   0x0800, 0x0800,   CRC(fdec55c1) SHA1(19b740f3b7f2acaa0fc09f4c0a2fe69721ebbcaf) )
9291310
9301311   ROM_REGION( 0x1000, "sound", 0 )   /* sound cpu program */
9311312   ROM_LOAD( "vcsona3.rod",   0x0000, 0x0800,   CRC(b0948d6c) SHA1(6c45d350288f69b4b2b5ac16ab2b418f14c6eded) )
9321313   ROM_LOAD( "vcsona2.rod",   0x0800, 0x0800,   CRC(44ff9e85) SHA1(5d7988d2d3bca932b77e014dc61f7a2347b01603) )
9331314
934   ROM_REGION( 0x2000, "tiles", ROMREGION_DISPOSE )
935   ROM_LOAD( "vcbab15.bin",   0x0000, 0x0800,   CRC(f31281cb) SHA1(bd4743c328f56334ac015c1f10de01ac25810756) )
1315   ROM_REGION( 0x2000, "tiles", 0 )
1316   ROM_LOAD( "vcbab15.bin",   0x0000, 0x0800,   CRC(fce8c772) SHA1(f9736b724b620d60a17d77f6b773f39b99b47190) )
9361317   ROM_LOAD( "vcbab14.bin",   0x0800, 0x0800,   CRC(6fd66330) SHA1(0ee3b3329b94ded81f028ebb687e580787c74ded) )
937   ROM_LOAD( "vcbab12.bin",   0x1000, 0x0800,   CRC(eace907a) SHA1(c81fb5eb838fea809729edc8ab2f637fffd0b2d1) )
1318   ROM_LOAD( "vcbab12.bin",   0x1000, 0x0800,   CRC(e534d6c3) SHA1(7a93c6c07b5a28558ee005fed2098dc2933c3252) )
9381319   ROM_LOAD( "vcbab11.bin",   0x1800, 0x0800,   CRC(e2069a6d) SHA1(2d4e71f2838451215e6f9629e2d1a35808510353) )
9391320
9401321   ROM_REGION( 0x0100, "proms", 0 )
941   ROM_LOAD( "vdcbaorg.col",   0x0000, 0x0100,   BAD_DUMP CRC(5b8e78b1) SHA1(ac5a1d7ab9dac7b4994d2f543801bf57e8573ba6) )
1322   ROM_LOAD( "vdcbaorg.col",   0x0000, 0x0100,   CRC(6cdca5ae) SHA1(f7430af1adfa24fdd68a026ee431ead7d47ba269) )
9421323ROM_END
9431324
1325ROM_START( babypkr )
1326   ROM_REGION( 0x4000, "main", 0 )
1327   ROM_LOAD( "pok8039.old",   0x0000, 0x4000,   CRC(c5400ef1) SHA1(1f27c92d2979319070a695f71ed494f6d47fe88f) )
9441328
1329   ROM_REGION( 0x1000, "sound", 0 )
1330   ROM_LOAD( "dadvpbj.son",   0x0000, 0x1000,   CRC(7b71cd30) SHA1(d782c50689a5aea632b6d274a1a7435a092ad20c) )
1331
1332   ROM_REGION( 0x20000, "tiles", ROMREGION_DISPOSE )
1333   ROM_LOAD( "vpbjep15.mme",   0x00000, 0x8000,CRC(cad0f7cf) SHA1(0721b8b30dbf2a5da2967b0cfce24b4cd62d3f9d) )
1334   ROM_LOAD( "vpbjep14.mme",   0x08000, 0x8000,CRC(96f512fa) SHA1(f5344aeb57f53c43156e923fb7f0d8d37c73dbe9) )
1335   ROM_LOAD( "vpbjep12.mme",   0x10000, 0x8000,CRC(cfdca530) SHA1(609a5ad6f34e6b5c1c35584ddc62d4ff87546415) )
1336   ROM_LOAD( "vpbjep11.mme",   0x18000, 0x8000,CRC(44e6c489) SHA1(ca211cb3807c476cd8c5ac98b0d18b4b2724df45) )
1337
1338   ROM_REGION( 0x0100, "proms", 0 )
1339   ROM_LOAD( "babypok.col",   0x0000, 0x0100,   CRC(2b98e88a) SHA1(bb22ef090e9e5dddc5c160d41a5f52df0db6feb6) )
1340ROM_END
1341
1342ROM_START( babydad )
1343   ROM_REGION( 0x4000, "main", 0 )
1344   ROM_LOAD( "da400org.old",   0x0000, 0x4000,   CRC(cbca3a0c) SHA1(5d9428f26edf2c5531398a6ae36b4e9169b2c1c1) )
1345
1346   ROM_REGION( 0x1000, "sound", 0 )
1347   ROM_LOAD( "dadvpbj.son",   0x0000, 0x1000,   CRC(7b71cd30) SHA1(d782c50689a5aea632b6d274a1a7435a092ad20c) )
1348
1349   ROM_REGION( 0x20000, "tiles", ROMREGION_DISPOSE )
1350   ROM_LOAD( "ep15dad.dad",   0x00000, 0x8000,CRC(21bd102d) SHA1(52788d09dbe38fa29b8ff044a1c5249cad3d45b4) )
1351   ROM_LOAD( "ep14dad.dad",   0x08000, 0x8000,CRC(b6e2c8a2) SHA1(352d88e1d764da5133de2be9987d4875f0c9237f) )
1352   ROM_LOAD( "ep12dad.dad",   0x10000, 0x8000,CRC(98702beb) SHA1(6d42ea48df7546932570da1e9b0be7a1f01f930c) )
1353   ROM_LOAD( "ep11dad.dad",   0x18000, 0x8000,CRC(90aac63b) SHA1(8b312f2313334b4b5b0344b786aa1a7a4979ea92) )
1354
1355   ROM_REGION( 0x0100, "proms", 0 )
1356   ROM_LOAD( "babydad.col",   0x0000, 0x0100,   CRC(b3358b3f) SHA1(d499a08fefaa3566de2e6fcddd237d6dfa840d8a) )
1357ROM_END
1358
1359
9451360/*************************
9461361*      Game Drivers      *
9471362*************************/
948
949/*    YEAR  NAME      PARENT    MACHINE   INPUT     INIT  ROT    COMPANY      FULLNAME        FLAGS  */
950GAME( 1984, videopkr, 0,        videopkr, videopkr, 0,    ROT0, "InterFlip", "Video Poker",   0 )
951GAME( 1984, blckjack, videopkr, blckjack, blckjack, 0,    ROT0, "InterFlip", "Black Jack",    0 )
952GAME( 1987, videodad, videopkr, videodad, videodad, 0,    ROT0, "InterFlip", "Video Dado",    0 )
953GAME( 1987, videocba, videopkr, videodad, videocba, 0,    ROT0, "InterFlip", "Video Cordoba", GAME_IMPERFECT_COLORS )
1363/*     YEAR  NAME      PARENT    MACHINE   INPUT     INIT  ROT    COMPANY               FULLNAME        FLAGS  LAYOUT      */
1364GAMEL( 1984, videopkr, 0,        videopkr, videopkr, 0,    ROT0, "InterFlip",          "Video Poker",   0,     layout_videopkr )
1365GAMEL( 1984, blckjack, videopkr, blckjack, blckjack, 0,    ROT0, "InterFlip",          "Black Jack",    0,     layout_blckjack )
1366GAMEL( 1987, videodad, videopkr, videodad, videodad, 0,    ROT0, "InterFlip",          "Video Dado",    0,     layout_videodad )
1367GAMEL( 1987, videocba, videopkr, videodad, videocba, 0,    ROT0, "InterFlip",          "Video Cordoba", 0,     layout_videocba )
1368GAMEL( 1987, babypkr , videopkr, babypkr , babypkr , 0,    ROT0, "Recreativos Franco", "Baby Poker",    0,     layout_babypkr  )
1369GAMEL( 1987, babydad , videopkr, babypkr , babydad , 0,    ROT0, "Recreativos Franco", "Baby Dado",     0,     layout_babydad  )
src/mame/drivers/gticlub.c
r3426r3427
11511151        ROM_LOAD32_WORD( "685a14.12w",   0x000000, 0x400000, CRC(87437739) SHA1(0d45637af40938a54d5efd29c125b0fafd55f9a4) )
11521152ROM_END
11531153
1154static TIMER_CALLBACK( irq_off )
1155{
1156   cpunum_set_input_line(machine, 1, param, CLEAR_LINE);
1157}
1158
11541159static void sound_irq_callback(running_machine *machine, int irq)
11551160{
1156   if (irq == 0)
1157      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ1, PULSE_LINE);
1158   else
1159      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE);
1161   int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
1162   cpunum_set_input_line(machine, 1, line, ASSERT_LINE);
1163   timer_set(ATTOTIME_IN_USEC(1), NULL, line, irq_off);
11601164}
11611165
11621166static DRIVER_INIT(gticlub)
src/mame/drivers/model1.c
r3426r3427
15141514   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK )
15151515
15161516   MDRV_SCREEN_ADD("main", RASTER)
1517   MDRV_SCREEN_REFRESH_RATE(60)
1518   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1517   MDRV_SCREEN_RAW_PARAMS(XTAL_16MHz, 656, 0/*+69*/, 496/*+69*/, 424, 0/*+25*/, 384/*+25*/)
15191518   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
1520   MDRV_SCREEN_SIZE(62*8, 48*8)
1521   MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
15221519
15231520   MDRV_PALETTE_LENGTH(8192)
15241521
r3426r3427
15601557   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK )
15611558
15621559   MDRV_SCREEN_ADD("main", RASTER)
1563   MDRV_SCREEN_REFRESH_RATE(60)
1564   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1560   MDRV_SCREEN_RAW_PARAMS(XTAL_16MHz, 656, 0/*+69*/, 496/*+69*/, 424, 0/*+25*/, 384/*+25*/)
15651561   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
1566   MDRV_SCREEN_SIZE(62*8, 48*8)
1567   MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
15681562
15691563   MDRV_PALETTE_LENGTH(8192)
15701564
src/mame/drivers/itech8.c
r3426r3427
567567 *
568568 *************************************/
569569
570static TIMER_CALLBACK( irq_off )
571{
572   itech8_update_interrupts(machine, 0, -1, -1);
573}
574
575
570576static INTERRUPT_GEN( generate_nmi )
571577{
572578   /* signal the NMI */
573579   itech8_update_interrupts(machine, 1, -1, -1);
574   itech8_update_interrupts(machine, 0, -1, -1);
580   timer_set(ATTOTIME_IN_USEC(1), NULL, 0, irq_off);
575581
576582   if (FULL_LOGGING) logerror("------------ VBLANK (%d) --------------\n", video_screen_get_vpos(machine->primary_screen));
577583}
src/mame/drivers/snk.c
r3426r3427
4545
4646Notes:
4747------
48
4849- How to enter test mode:
4950  1983 marvins: n/a
5051  1984 madcrash: keep F2 pressed during boot
r3426r3427
200201  (a continuous scale is played by the Y8950). Taking the YM3526 out appears to
201202  fix the problem since all game sounds are apparently played by the Y8950 alone.
202203
204- fsoccerb is based on fsoccerj : the only differences are joysticks hacks
205  (code patched at 0x00f1 + extra code at 0xb700 and after).
203206
207
204208TODO:
205209-----
206210
r3426r3427
18141818   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )          PORT_DIPLOCATION("DSW1:2")
18151819   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )          /* Single Controls */
18161820   PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
1817   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:3")
1821   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:3")
18181822   PORT_DIPSETTING(    0x04, "3" )
18191823   PORT_DIPSETTING(    0x00, "5" )
18201824   PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coinage ) )          PORT_DIPLOCATION("DSW1:4,5,6")
r3426r3427
20312035   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
20322036INPUT_PORTS_END
20332037
2034
20352038static INPUT_PORTS_START( alphamis )
20362039   PORT_START("IN0")
20372040   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
22912294static INPUT_PORTS_START( fitegolf )
22922295   PORT_START("IN0")
22932296   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2294   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )           /* uses "Coin A" settings - code at 0x045b */
2295   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )               /* reset */
2297   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x045b */
2298   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
22962299   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_SERVICE )           /* same as the dip switch */
22972300   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
22982301   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
23692372   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:7")
23702373   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
23712374   PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
2372   PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW2:8")
2375   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )                     PORT_DIPLOCATION("DSW2:8")
23732376INPUT_PORTS_END
23742377
23752378
23762379static INPUT_PORTS_START( countryc )
23772380   PORT_START("IN0")
23782381   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2379   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )           /* uses "Coin A" settings - code at 0x0450 */
2380   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )               /* reset */
2382   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x0450 */
2383   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
23812384   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_SERVICE )           /* same as the dip switch */
23822385   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
23832386   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
24352438   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:7")
24362439   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
24372440   PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
2438   PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW2:8")
2441   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )                     PORT_DIPLOCATION("DSW2:8")
24392442
24402443   PORT_START("TRACKBALLX1")
24412444   PORT_BIT( 0x7f, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1)
r3426r3427
24582461static INPUT_PORTS_START( ikari )
24592462   PORT_START("IN0")
24602463   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2461   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
2464   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* adds 1 credit - code at 0x0a15 */
24622465   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
24632466   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
24642467   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
r3426r3427
24672470   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
24682471
24692472   PORT_START("IN1")
2470   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2471   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2472   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2473   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2474   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2475   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
24732476   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
24742477   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
24752478
24762479   PORT_START("IN2")
2477   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2478   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2479   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2480   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2481   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2482   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
24802483   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
24812484   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
24822485
r3426r3427
24912494   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
24922495
24932496   PORT_START("DSW1")
2494   PORT_DIPNAME( 0x01, 0x01, "Allow killing each other" ) PORT_DIPLOCATION("DSW1:1")
2497   PORT_DIPNAME( 0x01, 0x01, "Allow killing each other" ) PORT_DIPLOCATION("DSW1:1")
24952498   PORT_DIPSETTING(    0x01, DEF_STR( No ) )
24962499   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
2497   PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2")
2500   PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" )      PORT_DIPLOCATION("DSW1:2")
24982501   PORT_DIPSETTING(    0x02, "Separate" )
24992502   PORT_DIPSETTING(    0x00, "Common" )
2500   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
2501   PORT_DIPSETTING(    0x04, "1st & every 2nd" )
2502   PORT_DIPSETTING(    0x00, "1st & 2nd only" )
2503   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
2503   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
2504   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
25042505   PORT_DIPSETTING(    0x08, "3" )
25052506   PORT_DIPSETTING(    0x00, "5" )
2506   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
2507   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
25072508   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
25082509   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
25092510   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
25102511   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2511   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
2512   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
25122513   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
25132514   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
25142515   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
25152516   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
25162517
25172518   PORT_START("DSW2")
2518   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
2519   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
25192520   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
25202521   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
25212522   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
25222523   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
2523   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
2524   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
25242525   PORT_DIPSETTING(    0x0c, "Demo Sounds Off" )
25252526   PORT_DIPSETTING(    0x08, "Demo Sounds On" )
25262527   PORT_DIPSETTING(    0x04, "Freeze" )
25272528   PORT_DIPSETTING(    0x00, "Infinite Lives (Cheat)")
2528   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2529   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
2530   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )           /* read at 0x07c4, but strange test at 0x07cc */
2531   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:8")
2532   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
2533   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
2534
2535   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
2536   PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2537   PORT_DIPSETTING(    0x34, "50k 100k 100k+" )
2538   PORT_DIPSETTING(    0x24, "60k 120k 120k+" )
2539   PORT_DIPSETTING(    0x14, "100k 200k 200k+" )
25292540   PORT_DIPSETTING(    0x30, "50k 100k" )
25302541   PORT_DIPSETTING(    0x20, "60k 120k" )
25312542   PORT_DIPSETTING(    0x10, "100k 200k" )
2543//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
25322544   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2533   PORT_DIPNAME( 0x40 ,0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW2:7")
2534   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2535   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2536   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8")
2537   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
2538   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
25392545INPUT_PORTS_END
25402546
2541
25422547static INPUT_PORTS_START( ikaria )
25432548   PORT_INCLUDE( ikari )
25442549
r3426r3427
25472552   PORT_MODIFY("IN0")
25482553   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 )
25492554   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN2 )
2550   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )
2555   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* adds 1 credit - code at 0x0a00 */
25512556   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_START1 )
25522557   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_START2 )
25532558   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
25542559   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
2555   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_TILT )  /* reset */
2560   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
25562561INPUT_PORTS_END
25572562
2558
25592563static INPUT_PORTS_START( ikarinc )
25602564   PORT_INCLUDE( ikaria )
25612565
25622566   // no continues in this version
25632567
25642568   PORT_MODIFY("DSW2")
2565   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8")
2566   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2567   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2569   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )
25682570INPUT_PORTS_END
25692571
2570
25712572static INPUT_PORTS_START( ikarijpb )
25722573   PORT_INCLUDE( ikarinc )
25732574
r3426r3427
25762577   // of course the code is patched to handle that.
25772578
25782579   PORT_MODIFY("IN1")
2579   PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2580   PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2581   PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2580   PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2581   PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2582   PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
25822583   PORT_BIT( 0x18, 0x08, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
25832584
25842585   PORT_MODIFY("IN2")
2585   PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2586   PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2587   PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2586   PORT_BIT( 0x21, 0x01, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2587   PORT_BIT( 0x42, 0x02, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2588   PORT_BIT( 0x84, 0x04, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
25882589   PORT_BIT( 0x18, 0x08, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
25892590INPUT_PORTS_END
25902591
r3426r3427
25922593static INPUT_PORTS_START( victroad )
25932594   PORT_START("IN0")
25942595   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2595   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
2596   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )  /* reset */
2596   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* adds 1 credit - code at 0x0a19 */
2597   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
25972598   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
25982599   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
25992600   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
26012602   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
26022603
26032604   PORT_START("IN1")
2604   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2605   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2606   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2605   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2606   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2607   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
26072608   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
26082609   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
26092610
26102611   PORT_START("IN2")
2611   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2612   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2613   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2612   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2613   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2614   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
26142615   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
26152616   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
26162617
r3426r3427
26282629   PORT_DIPNAME( 0x01, 0x01, "Kill friend & walk everywhere (Cheat)") PORT_DIPLOCATION("DSW1:1")
26292630   PORT_DIPSETTING(    0x01, DEF_STR( No ) )
26302631   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
2631   PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2")
2632   PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" )      PORT_DIPLOCATION("DSW1:2")
26322633   PORT_DIPSETTING(    0x02, "Separate" )
26332634   PORT_DIPSETTING(    0x00, "Common" )
2634   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
2635   PORT_DIPSETTING(    0x04, "1st & every 2nd" )
2636   PORT_DIPSETTING(    0x00, "1st & 2nd only" )
2637   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
2635   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
2636   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
26382637   PORT_DIPSETTING(    0x08, "3" )
26392638   PORT_DIPSETTING(    0x00, "5" )
2640   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
2639   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
26412640   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
26422641   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
26432642   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
26442643   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2645   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
2644   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
26462645   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
26472646   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
26482647   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
26492648   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
26502649
26512650   PORT_START("DSW2")
2652   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
2651   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
26532652   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
26542653   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
26552654   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
26562655   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
2657   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
2656   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
26582657   PORT_DIPSETTING(    0x0c, "Demo Sounds Off" )
26592658   PORT_DIPSETTING(    0x08, "Demo Sounds On" )
26602659   PORT_DIPSETTING(    0x00, "Freeze" )
26612660   PORT_DIPSETTING(    0x04, "Infinite Lives (Cheat)")
2662   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2663   PORT_DIPSETTING(    0x30, "50k 100k" )
2664   PORT_DIPSETTING(    0x20, "60k 120k" )
2665   PORT_DIPSETTING(    0x10, "100k 200k" )
2666   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2667   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
2661   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
2662   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:7")
26682663   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
26692664   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
26702665   PORT_DIPNAME( 0x80, 0x80, "Credits Buy Lives During Play" ) PORT_DIPLOCATION("DSW2:8")
26712666   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
26722667   PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
2668
2669   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
2670   PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2671   PORT_DIPSETTING(    0x34, "50k 100k 100k+" )
2672   PORT_DIPSETTING(    0x24, "60k 120k 120k+" )
2673   PORT_DIPSETTING(    0x14, "100k 200k 200k+" )
2674   PORT_DIPSETTING(    0x30, "50k 100k" )
2675   PORT_DIPSETTING(    0x20, "60k 120k" )
2676   PORT_DIPSETTING(    0x10, "100k 200k" )
2677//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
2678   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
26732679INPUT_PORTS_END
26742680
2675
26762681static INPUT_PORTS_START( dogosokb )
26772682   PORT_INCLUDE( victroad )
26782683
r3426r3427
26852690   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
26862691
26872692   PORT_MODIFY("DSW2")
2688   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8")
2689   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2690   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
2693   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )           /* patched code at 0x04ee */
26912694INPUT_PORTS_END
26922695
26932696
26942697static INPUT_PORTS_START( bermudat )
26952698   PORT_START("IN0")
26962699   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2697   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
2698   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT ) /* tilt? */
2700   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x0a0a */
2701   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
26992702   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
27002703   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
27012704   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
27032706   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
27042707
27052708   PORT_START("IN1")
2706   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2707   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2708   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2709   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2710   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2711   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
27092712   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
27102713   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
27112714
27122715   PORT_START("IN2")
2713   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2714   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2715   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2716   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2717   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2718   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
27162719   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
27172720   PORT_BIT( 0xf0, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
27182721
r3426r3427
27272730   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
27282731
27292732   PORT_START("DSW1")
2730   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1")
2731   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
2732   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2733   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
2733   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "DSW1:1" )
2734   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW1:2")
27342735   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
27352736   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2736   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
2737   PORT_DIPSETTING(    0x04, "1st & every 2nd" )
2738   PORT_DIPSETTING(    0x00, "1st & 2nd only" )
2739   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
2737   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
2738   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
27402739   PORT_DIPSETTING(    0x08, "3" )
27412740   PORT_DIPSETTING(    0x00, "5" )
2742   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
2741   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
27432742   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
27442743   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
27452744   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
27462745   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2747   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
2746   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
27482747   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
27492748   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
27502749   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
27512750   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
27522751
27532752   PORT_START("DSW2")
2754   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
2753   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
27552754   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
27562755   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
27572756   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
27582757   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
2759   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
2758   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
27602759   PORT_DIPSETTING(    0x0c, "Demo Sounds Off" )
27612760   PORT_DIPSETTING(    0x08, "Demo Sounds On" )
27622761   PORT_DIPSETTING(    0x00, "Freeze" )
27632762   PORT_DIPSETTING(    0x04, "Infinite Lives (Cheat)")
2764   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2763   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
2764   PORT_DIPNAME( 0xc0, 0x80, "Game Style" )                PORT_DIPLOCATION("DSW2:7,8")
2765   PORT_DIPSETTING(    0xc0, "Normal without continue" )
2766   PORT_DIPSETTING(    0x80, "Normal with continue" )
2767   PORT_DIPSETTING(    0x40, "Time attack 3 minutes" )
2768   PORT_DIPSETTING(    0x00, "Time attack 5 minutes" )
2769
2770   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
2771   PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2772   PORT_DIPSETTING(    0x34, "50k 100k 100k+" )
2773   PORT_DIPSETTING(    0x24, "60k 120k 120k+" )
2774   PORT_DIPSETTING(    0x14, "100k 200k 200k+" )
27652775   PORT_DIPSETTING(    0x30, "50k 100k" )
27662776   PORT_DIPSETTING(    0x20, "60k 120k" )
27672777   PORT_DIPSETTING(    0x10, "100k 200k" )
2778//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
27682779   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2769   PORT_DIPNAME( 0xc0, 0xc0, "Game Style" ) PORT_DIPLOCATION("DSW2:7,8")
2770   PORT_DIPSETTING(    0xc0, "Normal without continue" )
2771   PORT_DIPSETTING(    0x80, "Normal with continue" )
2772   PORT_DIPSETTING(    0x40, "Time attack 3 minutes" )
2773   PORT_DIPSETTING(    0x00, "Time attack 5 minutes" )
27742780INPUT_PORTS_END
27752781
27762782
r3426r3427
27812787   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )
27822788
27832789   PORT_MODIFY("DSW1")
2784   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1")
2790   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW1:1")
27852791   PORT_DIPSETTING(    0x01, DEF_STR( No ) )
27862792   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
27872793
27882794   PORT_MODIFY("DSW2")
2789   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2795   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )
2796   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )
2797
2798   PORT_MODIFY("BONUS") /* fake port to handle bonus lives settings via multiple input ports */
2799   PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2800   PORT_DIPSETTING(    0x34, "50k 100k 100k+" )
2801   PORT_DIPSETTING(    0x24, "80k 160k 160k+" )
2802   PORT_DIPSETTING(    0x14, "100k 200k 200k+" )
27902803   PORT_DIPSETTING(    0x30, "50k 100k" )
27912804   PORT_DIPSETTING(    0x20, "80k 160k" )
27922805   PORT_DIPSETTING(    0x10, "100k 200k" )
2806//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
27932807   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2794   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW2:7")
2795   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2796   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2797   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW2:8")
2798   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2799   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
28002808INPUT_PORTS_END
28012809
2802
28032810static INPUT_PORTS_START( bermudaa )
28042811   PORT_INCLUDE( worldwar )
28052812
2806   PORT_MODIFY("DSW2")
2807   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2813   PORT_MODIFY("BONUS") /* fake port to handle bonus lives settings via multiple input ports */
2814PORT_DIPNAME( 0x34, 0x34, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2815   PORT_DIPSETTING(    0x34, "25k 50k 50k+" )
2816   PORT_DIPSETTING(    0x24, "35k 70k 70k+" )
2817   PORT_DIPSETTING(    0x14, "50k 100k 100k+" )
28082818   PORT_DIPSETTING(    0x30, "25k 50k" )
28092819   PORT_DIPSETTING(    0x20, "35k 70k" )
2810   PORT_DIPSETTING(    0x10, "50K 100k" )
2820   PORT_DIPSETTING(    0x10, "50k 100k" )
2821//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
28112822   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
28122823INPUT_PORTS_END
28132824
28142825
2815static INPUT_PORTS_START( gwar )
2826static INPUT_PORTS_START( psychos )
28162827   PORT_START("IN0")
28172828   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2818   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
2819   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )   /* tilt? causes reset */
2820   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_SERVICE )
2829   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN )
2830   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
2831   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
28212832   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
28222833   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
28232834   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_START2 )
28242835   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
28252836
28262837   PORT_START("IN1")
2827   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2828   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2829   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2830   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
2831   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)0)
2838   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2839   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2840   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
2841   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
2842   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2843   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2844   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
2845   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
28322846
2833   PORT_START("P1ROT")
2834   PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
2835
28362847   PORT_START("IN2")
2837   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2838   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2839   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2840   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
2841   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)1)
2842
2843   PORT_START("P2ROT")
2844   PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
2845
2846   PORT_START("IN3")
28472848   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
28482849   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
28492850   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
r3426r3427
28532854   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
28542855   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
28552856
2857   PORT_START("IN3")
2858   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
2859
28562860   PORT_START("DSW1")
2857   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1")
2858   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
2859   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
2860   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
2861   PORT_SERVICE( 0x01, IP_ACTIVE_LOW )                     PORT_DIPLOCATION("DSW1:1")
2862   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW1:2")
28612863   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
28622864   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2863   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
2864   PORT_DIPSETTING(    0x04, "1st & 2nd only" )
2865   PORT_DIPSETTING(    0x00, "1st & every 2nd" )
2866   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
2865   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
2866   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
28672867   PORT_DIPSETTING(    0x08, "3" )
28682868   PORT_DIPSETTING(    0x00, "5" )
2869   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
2869   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
28702870   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
28712871   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
28722872   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
28732873   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2874   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
2874   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
28752875   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
28762876   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
28772877   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
28782878   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
28792879
28802880   PORT_START("DSW2")
2881   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
2882   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
2883   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
2881   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
2882   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
2883   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
28842884   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
28852885   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
2886   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
2887   PORT_DIPSETTING(    0x0c, "Demo Sounds Off" )
2888   PORT_DIPSETTING(    0x08, "Demo Sounds On" )
2889   PORT_DIPSETTING(    0x00, "Freeze" )
2890   PORT_DIPSETTING(    0x04, "Infinite Lives (Cheat)")
2891   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2892   PORT_DIPSETTING(    0x30, "30k 60k" )
2893   PORT_DIPSETTING(    0x20, "40k 80k" )
2894   PORT_DIPSETTING(    0x10, "50k 100k" )
2886   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )      PORT_DIPLOCATION("DSW2:3")
2887   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2888   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
2889   PORT_DIPNAME( 0x08, 0x08, "Freeze" )                    PORT_DIPLOCATION("DSW2:4")
2890   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2891   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2892   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
2893   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:7")
2894   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
2895   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
2896   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )
2897
2898   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
2899   PORT_DIPNAME( 0x34, 0x30, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2900   PORT_DIPSETTING(    0x30, "50k 100k 100k+" )
2901   PORT_DIPSETTING(    0x20, "60k 120k 120k+" )
2902   PORT_DIPSETTING(    0x10, "100k 200k 200k+" )
2903   PORT_DIPSETTING(    0x34, "50k" )
2904   PORT_DIPSETTING(    0x24, "60k" )
2905   PORT_DIPSETTING(    0x14, "100k" )
2906//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
28952907   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2896   PORT_DIPNAME( 0x40 ,0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7")
2897   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2898   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2899   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8")
2900   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2901   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
29022908INPUT_PORTS_END
29032909
2904static INPUT_PORTS_START( gwarb )
2905   PORT_INCLUDE( gwar )
29062910
2907   // This version is modified to work either with or without a rotary joystick
2908   // connected. If rotary is not connected, player fires in the direction he's facing.
2909
2910   PORT_MODIFY("IN1")
2911   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)0)
2912
2913   PORT_START("JOYSTICK_MODE")
2914   PORT_CONFNAME( 0x01, 0x00, "Joystick mode" )
2915   PORT_CONFSETTING( 0x00, "Normal Joystick" )
2916   PORT_CONFSETTING( 0x01, "Rotary Joystick" )
2917INPUT_PORTS_END
2918
2919static INPUT_PORTS_START( psychos )
2911static INPUT_PORTS_START( gwar )
29202912   PORT_START("IN0")
29212913   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
2922   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN )
2923   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )  /* reset */
2924   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
2914   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x08c8 */
2915   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
2916   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_SERVICE )
29252917   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
29262918   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
29272919   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_START2 )
29282920   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
29292921
29302922   PORT_START("IN1")
2931   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2932   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2933   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2923   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2924   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2925   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
2926   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
2927   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)0)
2928
2929   PORT_START("P1ROT")
2930   PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
2931
2932   PORT_START("IN2")
2933   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2934   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
2935   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
29342936   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
2935   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
2936   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
2937   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
2938   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
2937   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwar_rotary, (void*)1)
29392938
2940   PORT_START("IN2")
2939   PORT_START("P2ROT")
2940   PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
2941
2942   PORT_START("IN3")
29412943   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
29422944   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
29432945   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
r3426r3427
29472949   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
29482950   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
29492951
2950   PORT_START("IN3")
2951   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
2952
29532952   PORT_START("DSW1")
2954   PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW1:1")
2955   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
2953   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW1:1")
2954   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
2955   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
2956   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW1:2")
29562957   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
29572958   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2958   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
2959   PORT_DIPSETTING(    0x00, "1st & every 2nd" )
2960   PORT_DIPSETTING(    0x04, "1st & 2nd only" )
2961   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
2959   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
2960   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
29622961   PORT_DIPSETTING(    0x08, "3" )
29632962   PORT_DIPSETTING(    0x00, "5" )
2964   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
2963   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
29652964   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
29662965   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
29672966   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
29682967   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
2969   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
2968   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
29702969   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
29712970   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
29722971   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
29732972   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
29742973
29752974   PORT_START("DSW2")
2976   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
2977   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
2978   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
2975   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
2976   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
2977   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
29792978   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
29802979   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
2981   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW2:3")
2982   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2983   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
2984   PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4")
2985   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2986   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2987   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
2988   PORT_DIPSETTING(    0x30, "50K 100K" )
2989   PORT_DIPSETTING(    0x20, "60K 120K" )
2990   PORT_DIPSETTING(    0x10, "100K 200K" )
2980   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
2981   PORT_DIPSETTING(    0x0c, "Demo Sounds Off" )
2982   PORT_DIPSETTING(    0x08, "Demo Sounds On" )
2983   PORT_DIPSETTING(    0x00, "Freeze" )
2984   PORT_DIPSETTING(    0x04, "Infinite Lives (Cheat)")
2985   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
2986   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )
2987   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )
2988
2989   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
2990   PORT_DIPNAME( 0x34, 0x30, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
2991   PORT_DIPSETTING(    0x30, "30k 60k 60k+" )
2992   PORT_DIPSETTING(    0x20, "40k 80k 80k+" )
2993   PORT_DIPSETTING(    0x10, "50k 100k 100k+" )
2994   PORT_DIPSETTING(    0x34, "30k 60k" )
2995   PORT_DIPSETTING(    0x24, "40k 80k" )
2996   PORT_DIPSETTING(    0x14, "50k 100k" )
2997//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
29912998   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
2992   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
2993   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
2994   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
2995   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW2:8")
2996   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2997   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
29982999INPUT_PORTS_END
29993000
3001static INPUT_PORTS_START( gwarb )
3002   PORT_INCLUDE( gwar )
30003003
3004   // This version is modified to work either with or without a rotary joystick
3005   // connected. If rotary is not connected, player fires in the direction he's facing.
3006
3007   PORT_MODIFY("IN1")
3008   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)0)
3009
3010   PORT_MODIFY("IN2")
3011   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gwarb_rotary, (void*)1)
3012
3013   PORT_START("JOYSTICK_MODE")
3014   PORT_CONFNAME( 0x01, 0x00, "Joystick mode" )
3015   PORT_CONFSETTING( 0x00, "Normal Joystick" )
3016   PORT_CONFSETTING( 0x01, "Rotary Joystick" )
3017INPUT_PORTS_END
3018
3019
30013020static INPUT_PORTS_START( chopper )
30023021   PORT_START("IN0")
30033022   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
3004   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )
3005   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )  /* Reset */
3023   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x0849 */
3024   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_TILT )              /* reset */
30063025   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_SERVICE )
30073026   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN2 )
30083027   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN1 )
r3426r3427
30103029   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_START1 )
30113030
30123031   PORT_START("IN1")
3013   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
3014   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
3015   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
3032   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
3033   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
3034   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL
30163035   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
3017   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
3018   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
3019   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
3036   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
3037   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
3038   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY
30203039   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
30213040
30223041   PORT_START("IN2")
r3426r3427
30333052   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
30343053
30353054   PORT_START("DSW1")
3036   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:1")
3055   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW1:1")
30373056   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
30383057   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3039   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
3040   PORT_DIPSETTING(    0x02, DEF_STR( Upright ) )
3058   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )          PORT_DIPLOCATION("DSW1:2")
3059   PORT_DIPSETTING(    0x02, DEF_STR( Upright ) )          /* Single Controls */
30413060   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
3042   PORT_DIPNAME( 0x04, 0x04, "Bonus Occurrence" ) PORT_DIPLOCATION("DSW1:3")
3043   PORT_DIPSETTING(    0x00, "1st & every 2nd" )
3044   PORT_DIPSETTING(    0x04, "1st & 2nd only" )
3045   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
3061   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x04)
3062   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )            PORT_DIPLOCATION("DSW1:4")
30463063   PORT_DIPSETTING(    0x08, "3" )
30473064   PORT_DIPSETTING(    0x00, "5" )
3048   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
3065   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
30493066   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
30503067   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
30513068   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
30523069   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
3053   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
3070   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")
30543071   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
30553072   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
30563073   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
30573074   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
30583075
30593076   PORT_START("DSW2")
3060   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
3077   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
30613078   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
30623079   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
30633080   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
30643081   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
3065   PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
3082   PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
30663083   PORT_DIPSETTING(    0x08, "Demo Sounds Off" )
30673084   PORT_DIPSETTING(    0x0c, "Demo Sounds On" )
30683085   PORT_DIPSETTING(    0x00, "Freeze" )
30693086   PORT_DIPSETTING(    0x04, "Infinite Lives (Cheat)")
3070   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("DSW2:5,6")
3071   PORT_DIPSETTING(    0x30, "50k 100k" )
3072   PORT_DIPSETTING(    0x20, "75k 150k" )
3073   PORT_DIPSETTING(    0x10, "100k 200k" )
3074   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
3075   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
3087   PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_bonus_r, (void *)0x30)
3088   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:7")
30763089   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
30773090   PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
3078   PORT_DIPNAME( 0x80, 0x80, "Invulnerability (Cheat)") PORT_DIPLOCATION("DSW2:8")
3091   PORT_DIPNAME( 0x80, 0x80, "Invulnerability (Cheat)")    PORT_DIPLOCATION("DSW2:8")
30793092   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
30803093   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3094
3095   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
3096   PORT_DIPNAME( 0x34, 0x30, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("DSW1:3,DSW2:5,6")
3097   PORT_DIPSETTING(    0x30, "50k 100k 100k+" )
3098   PORT_DIPSETTING(    0x20, "75k 150k 150k+" )
3099   PORT_DIPSETTING(    0x10, "100k 200k 200k+" )
3100   PORT_DIPSETTING(    0x34, "50k 100k" )
3101   PORT_DIPSETTING(    0x24, "75k 150k" )
3102   PORT_DIPSETTING(    0x14, "100k 200k" )
3103//  PORT_DIPSETTING(    0x04, DEF_STR( None ) )             /* duplicated setting */
3104   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
30813105INPUT_PORTS_END
30823106
30833107static INPUT_PORTS_START( choppera )
r3426r3427
30863110   // P1 and P2 inputs are split in two ports
30873111
30883112   PORT_MODIFY("IN1")
3089   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
3090   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
3091   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
3113   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
3114   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
3115   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY
30923116   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
30933117   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
30943118
30953119   PORT_MODIFY("IN2")
3096   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
3097   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
3098   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
3120   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
3121   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
3122   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL
30993123   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
31003124   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
31013125
r3426r3427
31143138static INPUT_PORTS_START( tdfever )
31153139   PORT_START("IN0")
31163140   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_UNKNOWN )
3117   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE )
3118   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )
3141   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE )           /* also reset - code at 0x074a */
3142   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* adds 1 credit - code at 0x1065 */
31193143   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
31203144   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN1 )
31213145   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN2 )
r3426r3427
31383162   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
31393163   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
31403164   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
3141   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
3142   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
3143   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
3165   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
3166   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
3167   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
31443168
31453169   PORT_START("IN3")
31463170   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
r3426r3427
31483172   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
31493173   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
31503174   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
3151   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
3152   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
3153   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
3175   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
3176   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
3177   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
31543178
31553179   PORT_START("IN4")
31563180   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
r3426r3427
31583182   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
31593183   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START5 ) PORT_NAME("Start Game E")
31603184   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
3161   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
3162   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
3163   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
3185   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(3)
3186   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(3)
3187   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(3)
31643188
31653189   PORT_START("IN5")
31663190   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
r3426r3427
31683192   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
31693193   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
31703194   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
3171   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
3172   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
3173   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
3195   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(4)
3196   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(4)
3197   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(4)
31743198
31753199   PORT_START("IN6")
31763200   PORT_BIT( 0x7f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1)
r3426r3427
31893213   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
31903214
31913215   PORT_START("DSW1")
3192   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW1:1")
3216   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW1:1")
31933217   PORT_DIPSETTING(    0x01, DEF_STR( No ) )
31943218   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
3195   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
3219   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )          PORT_DIPLOCATION("DSW1:2")
31963220   PORT_DIPSETTING(    0x02, "2 Player Upright" )
31973221   PORT_DIPSETTING(    0x00, "4 Player Cocktail" )
3198   PORT_DIPNAME( 0x0c, 0x00, "1st Down Bonus Time" ) PORT_DIPLOCATION("DSW1:3,4")
3222   PORT_DIPNAME( 0x0c, 0x00, "1st Down Bonus Time" )       PORT_DIPLOCATION("DSW1:3,4")
31993223   PORT_DIPSETTING(    0x00, "Every 1st Down" )
32003224   PORT_DIPSETTING(    0x04, "Every 4 1st Downs" )
32013225   PORT_DIPSETTING(    0x08, "Every 6 1st Downs" )
32023226   PORT_DIPSETTING(    0x0c, "Every 8 1st Downs" )
3203   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
3227   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )           PORT_DIPLOCATION("DSW1:5,6")
32043228   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
32053229   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
32063230   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
32073231   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
3208   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")   /* Manual shows these two as blank */
3232   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )           PORT_DIPLOCATION("DSW1:7,8")  /* Manual shows these two as blank */
32093233   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
32103234   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
32113235   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
32123236   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
32133237
32143238   PORT_START("DSW2")
3215   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:1,2")
3239   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("DSW2:1,2")
32163240   PORT_DIPSETTING(    0x03, DEF_STR( Easy ) )
32173241   PORT_DIPSETTING(    0x02, DEF_STR( Normal ) )
32183242   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
32193243   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
3220   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
3244   PORT_DIPNAME( 0x0c, 0x08, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
32213245   PORT_DIPSETTING(    0x0c, "Demo Sound Off" )
32223246   PORT_DIPSETTING(    0x08, "Demo Sound On" )
32233247   PORT_DIPSETTING(    0x00, "Freeze" )
r3426r3427
32373261 OFF ON  ON      2:00    2:10      3:00   3:10   4:00
32383262 ON  ON  ON      2:10    2:20      3:10   3:20   4:10
32393263*/
3240   PORT_DIPNAME( 0x70, 0x70, "Play Time (Type A)" ) PORT_DIPLOCATION("DSW2:5,6,7")
3264   PORT_DIPNAME( 0x70, 0x70, "Play Time (Type A)" )        PORT_DIPLOCATION("DSW2:5,6,7")
32413265   PORT_DIPSETTING(    0x70, "1:00" )
32423266   PORT_DIPSETTING(    0x60, "1:10" )
32433267   PORT_DIPSETTING(    0x50, "1:20" )
r3426r3427
32463270   PORT_DIPSETTING(    0x20, "1:50" )
32473271   PORT_DIPSETTING(    0x10, "2:00" )
32483272   PORT_DIPSETTING(    0x00, "2:10" )
3249   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:8")
3273   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW2:8")
32503274   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
32513275   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
32523276INPUT_PORTS_END
r3426r3427
32553279static INPUT_PORTS_START( fsoccer )
32563280   PORT_START("IN0")
32573281   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_UNKNOWN )
3258   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE )   // same as the dip switch
3259   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )
3282   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_SERVICE )           /* same as the dip switch / also reset - code at 0x00cc */
3283   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_SERVICE1 )          /* uses "Coin A" settings - code at 0x677f */
32603284   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(snk_sound_busy, 0)
32613285   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_COIN1 )
32623286   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_COIN2 )
r3426r3427
32793303   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
32803304   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
32813305   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
3282   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
3283   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
3284   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
3306   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
3307   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
3308   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
32853309
32863310   PORT_START("IN3")
32873311   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
r3426r3427
32893313   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
32903314   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
32913315   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
3292   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
3293   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
3294   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
3316   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
3317   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
3318   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
32953319
32963320   PORT_START("IN4")
32973321   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
r3426r3427
32993323   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
33003324   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START5 ) PORT_NAME("Start Game E")
33013325   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
3302   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
3303   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
3304   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
3326   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(3)
3327   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(3)
3328   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(3)
33053329
33063330   PORT_START("IN5")
33073331   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
r3426r3427
33093333   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
33103334   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
33113335   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
3312   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
3313   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
3314   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
3336   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(4)
3337   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(4)
3338   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(4)
33153339
33163340   PORT_START("IN6")
33173341   PORT_BIT( 0x7f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1)
r3426r3427
33303354   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
33313355
33323356   PORT_START("DSW1")
3333   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:1,2")
3357   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) )         PORT_DIPLOCATION("DSW1:1,2")
33343358   PORT_DIPSETTING(    0x03, "Upright (With VS)" )
33353359   PORT_DIPSETTING(    0x02, "Upright (Without VS)" )
33363360   PORT_DIPSETTING(    0x00, "Cocktail (2 Players)" )
33373361   PORT_DIPSETTING(    0x01, "Cocktail (4 Players)" )
3338   PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Version ) ) PORT_DIPLOCATION("DSW1:3,4")
3362   PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Version ) )         PORT_DIPLOCATION("DSW1:3,4")
33393363   PORT_DIPSETTING(    0x04, DEF_STR( Europe ) )
33403364   PORT_DIPSETTING(    0x00, DEF_STR( USA ) )
33413365   PORT_DIPSETTING(    0x08, DEF_STR( Japan ) )
33423366//  PORT_DIPSETTING(    0x0c, DEF_STR( Europe ) )
3343   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("DSW1:5,6")
3367   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )          PORT_DIPLOCATION("DSW1:5,6")
33443368   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
33453369   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
33463370   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
33473371   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
3348   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("DSW1:7,8")
3372   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )          PORT_DIPLOCATION("DSW1:7,8")
33493373   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
33503374   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
33513375   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
33523376   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
33533377
33543378   PORT_START("DSW2")
3355   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:1")
3379   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) )   PORT_DIPLOCATION("DSW2:1")
33563380   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
33573381   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
3358   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW2:2")
3382   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )      PORT_DIPLOCATION("DSW2:2")
33593383   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
33603384   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3361   PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" ) PORT_DIPLOCATION("DSW2:3,4")
3385   PORT_DIPNAME( 0x0c, 0x0c, "Game Mode" )                 PORT_DIPLOCATION("DSW2:3,4")
33623386   PORT_DIPSETTING(    0x08, "Demo Sound Off" )
33633387   PORT_DIPSETTING(    0x0c, "Demo Sound On" )
33643388   PORT_DIPSETTING(    0x00, "Freeze" )
33653389   PORT_DIPSETTING(    0x04, "Win Match Against CPU (Cheat)")
33663390/*
3367Dip Switch settings are the time for match type A. Here is what you
3368have to add for games B to E :
3391Dip Switch settings are the time for match type A. Here is what you have to add for games B to E :
33693392
33703393Match Type       B        C        D        E
33713394Time to add    00:30    01:00    01:30    02:00
33723395*/
3373   PORT_DIPNAME( 0x70, 0x70, "Play Time (Type A)" ) PORT_DIPLOCATION("DSW2:5,6,7")
3396   PORT_DIPNAME( 0x70, 0x70, "Play Time (Type A)" )        PORT_DIPLOCATION("DSW2:5,6,7")
33743397   PORT_DIPSETTING(    0x10, "1:00" )
33753398   PORT_DIPSETTING(    0x60, "1:10" )
33763399   PORT_DIPSETTING(    0x50, "1:20" )
r3426r3427
33793402   PORT_DIPSETTING(    0x20, "1:50" )
33803403   PORT_DIPSETTING(    0x70, "2:00" )
33813404   PORT_DIPSETTING(    0x00, "2:10" )
3382   PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) PORT_DIPLOCATION("DSW2:8")
3405   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )                     PORT_DIPLOCATION("DSW2:8")
33833406INPUT_PORTS_END
33843407
33853408
r3426r3427
61626185GAME( 1986, ikari,    0,        ikari,    ikari,    0,        ROT270, "SNK", "Ikari Warriors (US JAMMA)", 0 )
61636186GAME( 1986, ikaria,   ikari,    ikari,    ikaria,   0,        ROT270, "SNK", "Ikari Warriors (US)", 0 )
61646187GAME( 1986, ikarinc,  ikari,    ikari,    ikarinc,  0,        ROT270, "SNK", "Ikari Warriors (US No Continues)", 0 )
6165GAME( 1986, ikarijp,  ikari,    ikari,    ikarinc,  0,        ROT270, "SNK", "Ikari (Japan)", 0 )
6188GAME( 1986, ikarijp,  ikari,    ikari,    ikarinc,  0,        ROT270, "SNK", "Ikari (Japan No Continues)", 0 )
61666189GAME( 1986, ikarijpb, ikari,    ikari,    ikarijpb, 0,        ROT270, "bootleg", "Ikari (Joystick hack bootleg)", 0 )
61676190GAME( 1986, victroad, 0,        victroad, victroad, 0,        ROT270, "SNK", "Victory Road", 0 )
61686191GAME( 1986, dogosoke, victroad, victroad, victroad, 0,        ROT270, "SNK", "Dogou Souken", 0 )
r3426r3427
61886211GAME( 1988, tdfever2, tdfever,  tdfever2, tdfever,  0,        ROT90,  "SNK", "TouchDown Fever 2", 0 ) /* upgrade kit for Touchdown Fever */
61896212GAME( 1988, fsoccer,  0,        tdfever2, fsoccer,  0,        ROT0,   "SNK", "Fighting Soccer (version 4)", 0 )
61906213GAME( 1988, fsoccerj, fsoccer,  tdfever2, fsoccer,  0,        ROT0,   "SNK", "Fighting Soccer (Japan)", 0 )
6191GAME( 1988, fsoccerb, fsoccer,  tdfever2, fsoccerb, 0,        ROT0,   "bootleg", "Fighting Soccer (joystick hack bootleg)", 0 )
6214GAME( 1988, fsoccerb, fsoccer,  tdfever2, fsoccerb, 0,        ROT0,   "bootleg", "Fighting Soccer (Joystick hack bootleg)", 0 )
src/mame/drivers/model2.c
r3426r3427
17281728   if (irq > 0)
17291729   {
17301730      scsp_last_line = irq;
1731      cpunum_set_input_line(machine, 1, irq, PULSE_LINE);
1731      cpunum_set_input_line(machine, 1, irq, ASSERT_LINE);
17321732   }
1733   else
1734      cpunum_set_input_line(machine, 1, -irq, CLEAR_LINE);
17331735}
17341736
17351737static const scsp_interface scsp_config =
src/mame/drivers/cps2.c
r3426r3427
15861586   ROM_LOAD16_WORD_SWAP( "pwg.12m",   0x200000, 0x200000, CRC(77438ed0) SHA1(733ca6c6a792e66e2aa12c5fc06dd459527afe4b) )
15871587ROM_END
15881588
1589ROM_START( armwaru1 )
1590   ROM_REGION( CODE_SIZE, "main", 0 )      /* 68000 code */
1591   ROM_LOAD16_WORD_SWAP( "pwgu.03a", 0x000000, 0x80000, CRC(73d397b1) SHA1(43c33f5268e98411fbbb27f8b59c2ff5dcaf3c34) )
1592   ROM_LOAD16_WORD_SWAP( "pwgu.04a", 0x080000, 0x80000, CRC(1f1de215) SHA1(b0a74a4effddd30fbc972d94e4bf3848c4893363) )
1593   ROM_LOAD16_WORD_SWAP( "pwgu.05a", 0x100000, 0x80000, CRC(835fbe73) SHA1(6218aa1b480105ffabded980c92679fafb19b824) )
1594   ROM_LOAD16_WORD_SWAP( "pwg.06",   0x180000, 0x80000, CRC(87a60ce8) SHA1(e2085c7c8c6792d055dbbb023c7f4e4aa38ae924) )
1595   ROM_LOAD16_WORD_SWAP( "pwg.07",   0x200000, 0x80000, CRC(f7b148df) SHA1(f369669713cf647222094c570a2eacd48a8637cf) )
1596   ROM_LOAD16_WORD_SWAP( "pwg.08",   0x280000, 0x80000, CRC(cc62823e) SHA1(edaf9bebdfc65ae5414090abd6844176eec39a00) )
1597   ROM_LOAD16_WORD_SWAP( "pwg.09",   0x300000, 0x80000, CRC(ddc85ca6) SHA1(e794c679531632e2142c6a5e3b858494389ce65e) )
1598   ROM_LOAD16_WORD_SWAP( "pwg.10",   0x380000, 0x80000, CRC(07c4fb28) SHA1(58a1ff3d105be7df833dd4f32973766649efcbcf) )
1599
1600   ROM_REGION( 0x1400000, "gfx", 0 )
1601   ROMX_LOAD( "pwg.13m",   0x0000000, 0x400000, CRC(ae8fe08e) SHA1(b6f09663dcda69b5d7ac13e4afaf1efd692fb61e) , ROM_GROUPWORD | ROM_SKIP(6) )
1602   ROMX_LOAD( "pwg.15m",   0x0000002, 0x400000, CRC(db560f58) SHA1(0c3716b32eb24544ff5d16b5dcadce195cd10d00) , ROM_GROUPWORD | ROM_SKIP(6) )
1603   ROMX_LOAD( "pwg.17m",   0x0000004, 0x400000, CRC(bc475b94) SHA1(a157664450895a146a532581dd6f4b63dff21c86) , ROM_GROUPWORD | ROM_SKIP(6) )
1604   ROMX_LOAD( "pwg.19m",   0x0000006, 0x400000, CRC(07439ff7) SHA1(f71e07c6d77c32828f5e319268b24b13a1a4b0c2) , ROM_GROUPWORD | ROM_SKIP(6) )
1605   ROMX_LOAD( "pwg.14m",   0x1000000, 0x100000, CRC(c3f9ba63) SHA1(66191a52c39daa89b17ede5804ee41c028036f14) , ROM_GROUPWORD | ROM_SKIP(6) )
1606   ROMX_LOAD( "pwg.16m",   0x1000002, 0x100000, CRC(815b0e7b) SHA1(549785daac3122253fb94f6541bc7016147f5306) , ROM_GROUPWORD | ROM_SKIP(6) )
1607   ROMX_LOAD( "pwg.18m",   0x1000004, 0x100000, CRC(0109c71b) SHA1(eb51284ee0c85ff8f605fe1d166b7aa202be1344) , ROM_GROUPWORD | ROM_SKIP(6) )
1608   ROMX_LOAD( "pwg.20m",   0x1000006, 0x100000, CRC(eb75ffbe) SHA1(e9d1deca60be696ac5bff2017fb5de3525e5239a) , ROM_GROUPWORD | ROM_SKIP(6) )
1609
1610   ROM_REGION( QSOUND_SIZE, "audio", 0 ) /* 64k for the audio CPU (+banks) */
1611   ROM_LOAD( "pwg.01",   0x00000, 0x08000, CRC(18a5c0e4) SHA1(bb1353dd74884aaeec9b5f1d0b284d9cad53c0ff) )
1612   ROM_CONTINUE(         0x10000, 0x18000 )
1613   ROM_LOAD( "pwg.02",   0x28000, 0x20000, CRC(c9dfffa6) SHA1(64e71028befe9a2514074be765dd020e1d2ea70b) )
1614
1615   ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
1616   ROM_LOAD16_WORD_SWAP( "pwg.11m",   0x000000, 0x200000, CRC(a78f7433) SHA1(e47ffba7b9dac9d0dda985c5d966194be18260f7) )
1617   ROM_LOAD16_WORD_SWAP( "pwg.12m",   0x200000, 0x200000, CRC(77438ed0) SHA1(733ca6c6a792e66e2aa12c5fc06dd459527afe4b) )
1618ROM_END
1619
15891620ROM_START( pgear )
15901621   ROM_REGION( CODE_SIZE, "main", 0 )      /* 68000 code */
15911622   ROM_LOAD16_WORD_SWAP( "pwgj.03a", 0x000000, 0x80000, CRC(c79c0c02) SHA1(4e24d34be255bb3886bd6b767779ee5fc81dca6e) )
r3426r3427
73377368GAME( 1994, armwar,   0,        cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Armored Warriors (Euro 941024)", 0 )
73387369GAME( 1994, armwarr1, armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Armored Warriors (Euro 941011)", 0 )
73397370GAME( 1994, armwaru,  armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Armored Warriors (USA 941024)", 0 )
7371GAME( 1994, armwaru1, armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Armored Warriors (USA 940920)", 0 )
73407372GAME( 1994, pgear,    armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 941024)", 0 )
73417373GAME( 1994, pgearr1,  armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Powered Gear: Strategic Variant Armor Equipment (Japan 940916)", 0 )
73427374GAME( 1994, armwara,  armwar,   cps2, cps2_3p3b, cps2,     ROT0,   "Capcom", "Armored Warriors (Asia 940920)", 0 )
src/mame/drivers/ampoker2.c
r3426r3427
277277    --- DRIVER UPDATES ---
278278
279279
280    [2008-10-07]
281    - Improved the button-lamps layout to all games. Now are more realistic.
282
283
280284    [2008-06-09]
281285    - Added Videomat (polish bootleg).
282286
src/mame/drivers/model3.c
r3426r3427
42694269    if (irq > 0)
42704270   {
42714271      scsp_last_line = irq;
4272      cpunum_set_input_line(machine, 1, irq, PULSE_LINE);
4272      cpunum_set_input_line(machine, 1, irq, ASSERT_LINE);
42734273   }
4274   else
4275      cpunum_set_input_line(machine, 1, -irq, CLEAR_LINE);
42744276}
42754277
42764278static const scsp_interface scsp_config =
src/mame/drivers/snesb.c
r3426r3427
77    Supported games:
88    - Killer Instinct
99    - Final Fight 2
10    - Sonic Blast Man 2  (not working)
10    - Sonic Blast Man 2
1111
1212    Not dumped:
1313    - Final Fight 3
r3426r3427
1515TODO:
1616
1717 - ffight2b -  dipswitches ($7eadd7 ?)
18 - sblast2b - decrypt (xor+swaps)
19 - kiinstb -  fix gfx glitches, missing texts
18 - sblast2b -  dipswicthes
19 - kiinstb -   fix gfx glitches, missing texts
2020
2121
2222
r3426r3427
126126   return ffight2b_coins;
127127}
128128
129/* Sonic blast man 2 turbo */
130
131static READ8_HANDLER(sb2b_75bd37_r)
132{
133   /* protection check */
134   static UINT8 cnt=0;
135    return ++cnt;
136}
137
138static READ8_HANDLER(sb2b_6a6xxx_r)
139{
140   /* protection checks */
141   switch(offset)
142   {
143      case 0x26f: return 0xb1;
144      case 0x3e0:   return 0x9e;
145      case 0x5c8: return 0xf4;
146      case 0x94b: return 0x3a;
147      case 0xd1a:   return 0xc5;
148      case 0xfb7:   return 0x47;
149   }
150
151   logerror("Unknown protection read read %x @ %x\n",offset, activecpu_get_pc());
152
153   return 0;
154}
155
156static READ8_HANDLER(sb2b_770071_r)
157{
158    return input_port_read(machine, "DSW");
159}
160
161static READ8_HANDLER(sb2b_770079_r)
162{
163    return input_port_read(machine, "COIN");
164}
165
166static READ8_HANDLER(sb2b_7xxx_r)
167{
168   return snes_ram[0xc07000 + offset];
169}
170
129171static ADDRESS_MAP_START( snesb_map, ADDRESS_SPACE_PROGRAM, 8)
130172   AM_RANGE(0x000000, 0x2fffff) AM_READWRITE(snes_r_bank1, snes_w_bank1)   /* I/O and ROM (repeats for each bank) */
131173   AM_RANGE(0x300000, 0x3fffff) AM_READWRITE(snes_r_bank2, snes_w_bank2)   /* I/O and ROM (repeats for each bank) */
r3426r3427
137179   AM_RANGE(0xc00000, 0xffffff) AM_READWRITE(snes_r_bank7, snes_w_bank7)   /* Mirror and ROM */
138180ADDRESS_MAP_END
139181
182
140183static READ8_HANDLER( spc_ram_100_r )
141184{
142185   return spc_ram_r(machine, offset + 0x100);
r3426r3427
384427
385428INPUT_PORTS_END
386429
430
431static INPUT_PORTS_START( sblast2b )
432   PORT_START("PAD1L")      /* IN 0 : Joypad 1 - L */
433   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Button A") PORT_PLAYER(1)
434   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 Button X") PORT_PLAYER(1)
435   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Button L") PORT_PLAYER(1)
436   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Button R") PORT_PLAYER(1)
437   PORT_START("PAD1H")      /* IN 1 : Joypad 1 - H */
438   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Button B") PORT_PLAYER(1)
439   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Button Y") PORT_PLAYER(1)
440   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("P1 Select")
441   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("P1 Start")
442   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
443   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
444   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
445   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
446
447   PORT_START("PAD2L")      /* IN 2 : Joypad 2 - L */
448   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 Button A") PORT_PLAYER(2)
449   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 Button X") PORT_PLAYER(2)
450   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P2 Button L") PORT_PLAYER(2)
451   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P2 Button R") PORT_PLAYER(2)
452   PORT_START("PAD2H")      /* IN 3 : Joypad 2 - H */
453   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 Button B") PORT_PLAYER(2)
454   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 Button Y") PORT_PLAYER(2)
455   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("P2 Select")
456   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("P2 Start")
457   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
458   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
459   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
460   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
461
462   PORT_START("PAD3L")      /* IN 4 : Joypad 3 - L */
463   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P3 Button A") PORT_PLAYER(3)
464   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P3 Button X") PORT_PLAYER(3)
465   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P3 Button L") PORT_PLAYER(3)
466   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P3 Button R") PORT_PLAYER(3)
467   PORT_START("PAD3H")      /* IN 5 : Joypad 3 - H */
468   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 Button B") PORT_PLAYER(3)
469   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 Button Y") PORT_PLAYER(3)
470   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("P3 Select")
471   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START3 ) PORT_NAME("P3 Start")
472   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
473   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
474   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
475   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
476
477   PORT_START("PAD4L")      /* IN 6 : Joypad 4 - L */
478   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P4 Button A") PORT_PLAYER(4)
479   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P4 Button X") PORT_PLAYER(4)
480   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P4 Button L") PORT_PLAYER(4)
481   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P4 Button R") PORT_PLAYER(4)
482   PORT_START("PAD4H")      /* IN 7 : Joypad 4 - H */
483   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 Button B") PORT_PLAYER(4)
484   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 Button Y") PORT_PLAYER(4)
485   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE4 ) PORT_NAME("P4 Select")
486   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START4 ) PORT_NAME("P4 Start")
487   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4)
488   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
489   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
490   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
491
492   PORT_START("INTERNAL")      /* IN 8 : Internal switches */
493   PORT_DIPNAME( 0x1, 0x1, "Enforce 32 sprites/line" )
494   PORT_DIPSETTING(   0x0, DEF_STR( No )  )
495   PORT_DIPSETTING(   0x1, DEF_STR( Yes ) )
496
497#ifdef MAME_DEBUG
498   PORT_START("DEBUG1")   /* IN 9 : debug switches */
499   PORT_DIPNAME( 0x3, 0x0, "Browse tiles" )
500   PORT_DIPSETTING(   0x0, DEF_STR( Off ) )
501   PORT_DIPSETTING(   0x1, "2bpl"  )
502   PORT_DIPSETTING(   0x2, "4bpl"  )
503   PORT_DIPSETTING(   0x3, "8bpl"  )
504   PORT_DIPNAME( 0xc, 0x0, "Browse maps" )
505   PORT_DIPSETTING(   0x0, DEF_STR( Off ) )
506   PORT_DIPSETTING(   0x4, "2bpl"  )
507   PORT_DIPSETTING(   0x8, "4bpl"  )
508   PORT_DIPSETTING(   0xc, "8bpl"  )
509
510   PORT_START("DEBUG2")   /* IN 10 : debug switches */
511   PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle BG 1") PORT_PLAYER(2)
512   PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Toggle BG 2") PORT_PLAYER(2)
513   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle BG 3") PORT_PLAYER(2)
514   PORT_BIT( 0x8, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Toggle BG 4") PORT_PLAYER(2)
515   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle Objects") PORT_PLAYER(3)
516   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Toggle Main/Sub") PORT_PLAYER(3)
517   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Toggle Back col") PORT_PLAYER(3)
518   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Toggle Windows") PORT_PLAYER(3)
519
520   PORT_START("DEBUG3")   /* IN 11 : debug input */
521   PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Pal prev")
522   PORT_BIT( 0x2, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("Pal next")
523   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Toggle Transparency") PORT_PLAYER(4)
524#endif
525
526   PORT_START("DSW")   /* IN 12 : dip-switches */
527   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" )
528   PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" )
529   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW1:3" )
530   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" )
531   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW1:5" )
532   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW1:6" )
533   PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW1:7" )
534   PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW1:8" )
535
536   PORT_START("COIN")   /* IN 13 : coins */
537   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
538   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
539
540INPUT_PORTS_END
541
387542static const custom_sound_interface snes_sound_interface =
388543{ snes_sh_start };
389544
r3426r3427
473628   ffight2b_coins=0;
474629   memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x7eadce, 0x7eadce, 0, 0, ffight2b_coin_r);
475630
631
476632   DRIVER_INIT_CALL(snes);
477633}
478634
635
636static const UINT8 data_substitution0[] = {0x88,0x02,0x2a,0x08,0x28,0xaa,0x8a,0x0a,0xa2,0x00,0x80,0xa0,0x22,0xa8,0x82,0x20,};
637static const UINT8 data_substitution1[] = {0x44,0x01,0x51,0x40,0x50,0x55,0x45,0x41,0x15,0x00,0x04,0x14,0x11,0x54,0x05,0x10,};
638static const UINT8 address_substitution_low[] =
639{
640   0x32,0x35,0x3a,0x28,0x2a,0x0c,0x36,0x38,0x29,0x39,0x04,0x2c,0x21,0x23,0x3d,0x2d,
641   0x3c,0x02,0x17,0x31,0x00,0x2e,0x0a,0x2f,0x25,0x26,0x27,0x30,0x33,0x01,0x18,0x19,
642   0x10,0x11,0x24,0x16,0x1b,0x0d,0x0e,0x12,0x13,0x05,0x22,0x34,0x1c,0x06,0x07,0x37,
643   0x08,0x3b,0x09,0x14,0x15,0x1d,0x0b,0x0f,0x1e,0x1f,0x2b,0x1a,0x03,0x20,0x3f,0x3e,
644};
645
646static const UINT8  address_substitution_high[] =
647{
648   0x1b,0x15,0x08,0x1f,0x06,0x02,0x13,0x0a,0x1d,0x04,0x0e,0x00,0x17,0x0c,0x11,0x19,
649   0x16,0x0d,0x1c,0x07,0x10,0x03,0x1a,0x0b,0x12,0x05,0x0f,0x18,0x1e,0x01,0x14,0x09,
650   0x2b,0x25,0x28,0x2f,0x26,0x22,0x23,0x2a,0x2d,0x24,0x2e,0x20,0x27,0x2c,0x21,0x29
651};
652
653DRIVER_INIT( sblast2b )
654{
655   int i, cipherText, plainText, newAddress;
656   UINT8 *src = memory_region(machine, "user7");
657   UINT8 *dst = memory_region(machine, "user3");
658   for (i=0; i<0x80000*3; i++)
659    {
660          cipherText = src[i];
661          plainText = data_substitution0[cipherText&0xf]|data_substitution1[cipherText>>4];
662         newAddress = (address_substitution_high[i>>15]<<15)|(i&0x7fc0)|(address_substitution_low[i&0x3f]);
663
664      if(newAddress<0x10000)
665       {
666          plainText = BITSWAP8(plainText, 6,3,5,4,2,0,7,1) ^ 0xff;
667       }
668      else
669       if(newAddress<0x20000)
670       {
671          plainText =   BITSWAP8(plainText, 4,0,7,6,3,1,2,5) ^ 0xff;
672       }
673       else
674       if(newAddress<0x30000)
675       {
676          plainText =   BITSWAP8(plainText, 5,7,6,1,4,3,0,2);
677       }
678       else
679       if(newAddress<0x40000)
680       {
681          plainText = BITSWAP8(plainText, 3,1,2,0,5,6,4,7) ^ 0xff;
682       }
683        dst[newAddress] = plainText;
684    }
685
686    /*  boot vector */
687    dst[0xfffc]=0xc0;
688    dst[0xfffd]=0x7a;
689
690      /*  protection checks */
691    memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x75bd37, 0x75bd37, 0, 0, sb2b_75bd37_r);
692     memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x6a6000, 0x6a6fff, 0, 0, sb2b_6a6xxx_r);
693
694     /* extra inputs */
695      memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x770071, 0x770071, 0, 0, sb2b_770071_r);
696    memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x770079, 0x770079, 0, 0, sb2b_770079_r);
697
698    /* handler to read boot code */
699    memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x007000, 0x007fff, 0, 0, sb2b_7xxx_r);
700
701   DRIVER_INIT_CALL(snes_hirom);
702}
703
479704ROM_START( kinstb )
480705   ROM_REGION( 0x400000, "user3", ROMREGION_DISPOSE )
481706   ROM_LOAD( "1.u14", 0x000000, 0x100000, CRC(70889919) SHA1(1451714cbdacb7f6ced2bc7afa478ad7264cf3b7) )
r3426r3427
535760
536761ROM_START( sblast2b )
537762   ROM_REGION( 0x180000, "user3", ROMREGION_DISPOSE )
538   ROM_LOAD( "1.bin", 0x000000, 0x080000, CRC(bea10c40) SHA1(d9cc65267b9b57145d714f2c17b436c1fb21513f) )
539   ROM_LOAD( "2.bin", 0x080000, 0x080000, CRC(57d2b6e9) SHA1(1a7b347101f67b254e2f86294d501b0669431644) )
540   ROM_LOAD( "3.bin", 0x100000, 0x080000, CRC(9e63a5ce) SHA1(1d18606fbb28b55a921fc37e1af1aff4caae9003) )
541763
542
543764   ROM_REGION(0x100,           "user5", 0)
544765   ROM_LOAD("spc700.rom", 0, 0x40, CRC(44bb3a40) SHA1(97e352553e94242ae823547cd853eecda55c20f0) )
545766
546767   ROM_REGION(0x800,           "user6", ROMREGION_ERASEFF)
547768
769   ROM_REGION( 0x180000, "user7", ROMREGION_DISPOSE )
770   ROM_LOAD( "1.bin", 0x000000, 0x0080000, CRC(bea10c40) SHA1(d9cc65267b9b57145d714f2c17b436c1fb21513f) )
771   ROM_LOAD( "2.bin", 0x080000, 0x0080000, CRC(57d2b6e9) SHA1(1a7b347101f67b254e2f86294d501b0669431644) )
772   ROM_LOAD( "3.bin", 0x100000, 0x0080000, CRC(9e63a5ce) SHA1(1d18606fbb28b55a921fc37e1af1aff4caae9003) )
773
548774ROM_END
549775
550776GAME( 199?, kinstb,       0,     kinstb,        kinstb,    kinstb,      ROT0, "bootleg",   "Killer Instinct (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
551GAME( 1996, ffight2b,     0,     kinstb,        ffight2b,  ffight2b,   ROT0, "bootleg",   "Final Fight 2 (SNES bootleg)", GAME_IMPERFECT_SOUND )
552GAME( 199?, sblast2b,     0,     kinstb,        kinstb,        snes,   ROT0, "bootleg",   "Sonic Blast Man TURBO 2 (SNES bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
777GAME( 1996, ffight2b,     0,     kinstb,        ffight2b,  ffight2b,   ROT0, "bootleg",   "Final Fight 2 (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
778GAME( 1997, sblast2b,     0,     kinstb,        sblast2b,  sblast2b,   ROT0, "bootleg",   "Sonic Blast Man 2 Special Turbo (SNES bootleg)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS)
src/mame/drivers/cischeat.c
r3426r3427
18961896{
18971897   switch ( cpu_getiloops() )
18981898   {
1899      case 0:      cpunum_set_input_line(machine, 0, 3, PULSE_LINE);   // update palette, layers etc. Not the sprites.
1900      case 14:   cpunum_set_input_line(machine, 0, 2, PULSE_LINE);   // "real" vblank. It just sets a flag that
1899      case 0:      cpunum_set_input_line(machine, 0, 3, HOLD_LINE);   // update palette, layers etc. Not the sprites.
1900      case 14:   cpunum_set_input_line(machine, 0, 2, HOLD_LINE);   // "real" vblank. It just sets a flag that
19011901                                          // the main loop polls before updating the sprites.
19021902   }
19031903}
r3426r3427
19491949{
19501950   switch ( cpu_getiloops() )
19511951   {
1952      case 0:      cpunum_set_input_line(machine, 0, 4, PULSE_LINE);
1953      case 14:   cpunum_set_input_line(machine, 0, 2, PULSE_LINE);
1952      case 0:      cpunum_set_input_line(machine, 0, 4, HOLD_LINE);
1953      case 14:   cpunum_set_input_line(machine, 0, 2, HOLD_LINE);
19541954   }
19551955}
19561956
src/mame/drivers/metro.c
r3426r3427
162162      /*  This is for games that supply an *IRQ Vector* on the data bus
163163            together with an IRQ level for each possible IRQ source */
164164
165      UINT8 irq_level[8] = { 0 };
165166      int i = 0;
166      while ( i < 8 )
167      {
167      for (i = 0; i < 8; i++)
168168         if (irq & (1 << i))
169         {
170            cpunum_set_input_line(machine, 0, metro_irq_levels[i]&7, ASSERT_LINE);
171            return;
172         }
173         i++;
174      }
175      cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
169            irq_level[metro_irq_levels[i]&7] = 1;
170      for (i = 0; i < 8; i++)
171         cpunum_set_input_line(machine, 0, i, irq_level[i] ? ASSERT_LINE : CLEAR_LINE);
176172   }
177173   else
178174   {
r3426r3427
49534949   ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE )   /* 053936 gfx data */
49544950   ROM_LOAD( "rom9.bin", 0x000000, 0x200000, CRC(37ca3570) SHA1(3374c586bf84583fa33f2793c4e8f2f61a0cab1c) )
49554951
4956   ROM_REGION( 0x080000, "ym", 0 )   /* Samples */
4952   ROM_REGION( 0x080000, "ym.deltat", 0 )   /* Samples */
49574953   ROM_LOAD( "rom8.bin", 0x000000, 0x080000, CRC(565a4086) SHA1(bd5780acfa5affa8705acbfccb0af16bac8ed298) )
49584954
4959   ROM_REGION( 0x400000, "ym.deltat", 0 )   /* ? YRW801-M ? */
4955   ROM_REGION( 0x400000, "ym", 0 )   /* ? YRW801-M ? */
49604956   ROM_LOAD( "rom6.bin", 0x000000, 0x200000, CRC(8b8819fc) SHA1(5fd9d2b5088cb676c11d32cac7ba8c5c18e31b64) )
49614957   ROM_LOAD( "rom7.bin", 0x200000, 0x200000, CRC(0089a52b) SHA1(d643ac122d62557de27f06ba1413ef757a45a927) )
49624958ROM_END
r3426r3427
50375033   ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE )   /* 053936 gfx data */
50385034   ROM_LOAD( "psacrom.60", 0x000000, 0x200000,  CRC(73f1f279) SHA1(1135b2b1eb4c52249bc12ee178340bbb202a94c8) )
50395035
5040   ROM_REGION( 0x200000, "ym", 0 )   /* Samples */
5036   ROM_REGION( 0x200000, "ym.deltat", 0 )   /* Samples */
50415037   ROM_LOAD( "sndpcm-b.22", 0x000000, 0x200000, CRC(a5d844d2) SHA1(18d644545f0844e66aa53775b67b0a29c7b7c31b) )
50425038
5043   ROM_REGION( 0x400000, "ym.deltat", 0 )   /* ? YRW801-M ? */
5039   ROM_REGION( 0x400000, "ym", 0 )   /* ? YRW801-M ? */
50445040   ROM_LOAD( "sndpcm-a.23", 0x000000, 0x200000, CRC(e6d32373) SHA1(8a79d4ea8b27d785fffd80e38d5ae73b7cea7304) )
50455041   /* ROM7.27 not populated?  */
50465042ROM_END
src/mame/drivers/warpwarp.c
r3426r3427
825825
826826   ROM_REGION( 0x800, "gfx1", 0 )
827827   ROM_LOAD( "geebee.3a",    0x0000, 0x0400, CRC(f257b21b) SHA1(c788fd923438f1bffbff9ff3cd4c5c8b547c0c14) )
828   ROM_RELOAD(               0x0400, 0x0400 )
828829ROM_END
829830
830831ROM_START( geebeeb )
r3426r3427
836837
837838   ROM_REGION( 0x800, "gfx1", 0 )
838839   ROM_LOAD( "geebee.3a",    0x0000, 0x0400, CRC(f257b21b) SHA1(c788fd923438f1bffbff9ff3cd4c5c8b547c0c14) )
840   ROM_RELOAD(               0x0400, 0x0400 )
839841ROM_END
840842
841843ROM_START( geebeeg )
r3426r3427
844846
845847   ROM_REGION( 0x800, "gfx1", 0 )
846848   ROM_LOAD( "geebeeg.3a",   0x0000, 0x0400, CRC(a45932ba) SHA1(48f70742c42a9377f31fac3a1e43123751e57656) )
849   ROM_RELOAD(               0x0400, 0x0400 )
847850ROM_END
848851
849852ROM_START( navarone )
src/mame/drivers/stv.c
r3426r3427
28052805   STV_BIOS
28062806
28072807   ROM_REGION32_BE( 0x3000000, "user1", 0 ) /* SH2 code */
2808   ROM_LOAD( "epr18967.a",               0x0000000, 0x0100000, CRC(c0446674) SHA1(4917089d95613c9d2a936ed9fe3ebd22f461aa4f) )
2809   ROM_RELOAD ( 0x0100000, 0x0100000 )
2810   ROM_RELOAD ( 0x0200000, 0x0100000 )
2811   ROM_RELOAD ( 0x0300000, 0x0100000 )
2812   ROM_LOAD16_WORD_SWAP( "mpr18968.2",    0x0400000, 0x0400000, CRC(11a891de) SHA1(1a4fa8d7e07e1d8fdc8122ef8a5b93723c007cda) ) // good (was .1)
2813   ROM_LOAD16_WORD_SWAP( "mpr18969.3",    0x0800000, 0x0400000, CRC(199cc47d) SHA1(d78f7c6be7e9b43e208244c5c8722245f4c653e1) ) // good (was .2)
2814   ROM_LOAD16_WORD_SWAP( "mpr18970.4",    0x0c00000, 0x0400000, CRC(8b7a509e) SHA1(8f4d36a858231764ed09b26a1141d1f055eee092) ) // good (was .3)
2815   ROM_LOAD16_WORD_SWAP( "mpr18971.5",    0x1000000, 0x0400000, CRC(c87c443b) SHA1(f2fedb35c80e5c4855c7aebff88186397f4d51bc) ) // good (was .4)
2816   ROM_LOAD16_WORD_SWAP( "mpr18972.6",    0x1400000, 0x0400000, CRC(45c64fca) SHA1(ae2f678b9885426ce99b615b7f62a451f9ef83f9) ) // good (was .5)
2817ROM_END
2818
2819ROM_START( decathlo )
2820   STV_BIOS
2821
2822   ROM_REGION32_BE( 0x3000000, "user1", 0 ) /* SH2 code */
28082823   ROM_LOAD( "epr18967.13",               0x0000000, 0x0100000, CRC(c0446674) SHA1(4917089d95613c9d2a936ed9fe3ebd22f461aa4f) )
28092824   ROM_RELOAD ( 0x0100000, 0x0100000 )
28102825   ROM_RELOAD ( 0x0200000, 0x0100000 )
r3426r3427
37733788GAME( 1998, elandore,  stvbios, stv, stv,  elandore,  ROT0,   "Sai-Mate",                 "Elan Doree - Legend of Dragon (JUET 980922 V1.006)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )//japanese name?
37743789GAME( 1995, vfremix,   stvbios, stv, stv,  vfremix,   ROT0,   "Sega",                    "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
37753790GAME( 1997, findlove,  stvbios, stv, stv,  ic13,      ROT0,   "Daiki / FCF",               "Find Love (J 971212 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
3776GAME( 1996, decathlt,  stvbios, stv, stv,  decathlt,  ROT0,   "Sega",                    "Decathlete (JUET 960424 V1.000)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
3791GAME( 1996, decathlt,  stvbios, stv, stv,  decathlt,  ROT0,   "Sega",                    "Decathlete (JUET 960709 V1.001)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
3792GAME( 1996, decathlo,  decathlt, stv, stv,  decathlt,  ROT0,   "Sega",                    "Decathlete (JUET 960424 V1.000)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
37773793
3794
37783795/* not working,black screen */
37793796GAME( 1999, ffreveng,  stvbios, stv, stv,  ffreveng,  ROT0,   "Capcom",                   "Final Fight Revenge (JUET 990714 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_NO_SOUND | GAME_NOT_WORKING )
37803797/* CD games */
src/mame/drivers/taito_h.c
r3426r3427
546546
547547
548548static GFXDECODE_START( syvalion )
549   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32*16 )
549   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32 )
550550GFXDECODE_END
551551
552552static GFXDECODE_START( recordbr )
553   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32*16 )
553   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32 )
554554GFXDECODE_END
555555
556556static GFXDECODE_START( dleague )
557   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32*16 )
557   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0,     32 )
558558   GFXDECODE_ENTRY( "gfx2", 0, charlayout, 32*16, 16    )   // seems to be bogus...?
559559GFXDECODE_END
560560
src/mame/drivers/8080bw.c
r3426r3427
295295
296296/*******************************************************/
297297/*                                                     */
298/* Astro Sidam?                                        */
299/*                                                     */
300/*******************************************************/
301
302static ADDRESS_MAP_START( astropal_io_map, ADDRESS_SPACE_IO, 8 )
303   ADDRESS_MAP_GLOBAL_MASK(0x7)
304   AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0")
305   AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1")
306   AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ_PORT("IN3")
307
308   AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w)
309   AM_RANGE(0x05, 0x05) AM_WRITE(invaders_audio_2_w)
310   AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w)
311ADDRESS_MAP_END
312
313static INPUT_PORTS_START( astropal )
314   PORT_START("IN0")
315   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
316   PORT_DIPSETTING(    0x00, "2" )
317   PORT_DIPSETTING(    0x01, "3" )
318   PORT_DIPSETTING(    0x02, "4" )
319   PORT_DIPSETTING(    0x03, "5" )
320   PORT_BIT( 0xfc, IP_ACTIVE_LOW,  IPT_UNUSED )      /* never read */
321
322   PORT_START("IN1")
323   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 )
324   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
325   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
326   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
327   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
328   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
329   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
330   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
331
332   /* PORT_START("IN2") - never read */
333
334   PORT_START("IN3")
335   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
336   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
337   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
338   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
339   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
340   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
341   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
342   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
343
344   /* Dummy port for cocktail mode (not used) */
345   INVADERS_CAB_TYPE_PORT
346   PORT_MODIFY(INVADERS_CAB_TYPE_PORT_TAG)
347   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
348
349INPUT_PORTS_END
350
351static MACHINE_DRIVER_START( astropal )
352
353    /* basic machine hardware */
354    MDRV_IMPORT_FROM(invaders)
355    MDRV_CPU_MODIFY("main")
356   MDRV_CPU_IO_MAP(astropal_io_map, 0)
357
358MACHINE_DRIVER_END
359
360/*******************************************************/
361/*                                                     */
298362/* Cosmo                                               */
299363/*                                                     */
300364/*******************************************************/
r3426r3427
24642528GAMEL(19??, alieninv, invaders, invaders, searthin, 0, ROT270, "bootleg", "Alien Invasion Part II", 0, layout_invaders )
24652529GAMEL(1978, spceking, invaders, invaders, sicv,     0, ROT270, "Leijac Corporation (Konami)","Space King", 0, layout_invaders )
24662530GAMEL(1978, spcewars, invaders, spcewars, spcewars, 0, ROT270, "Sanritsu", "Space War (Sanritsu)", 0, layout_invaders )
2467GAME (19??, astropal, 0,        invaders, spcewars, 0, ROT0,   "Sidam?", "Astropal", GAME_NOT_WORKING )
2531GAME (19??, astropal, 0,        astropal, astropal, 0, ROT0,   "Sidam?", "Astropal", GAME_IMPERFECT_SOUND )
24682532GAMEL(1978, spacewr3, invaders, spcewars, sicv,     0, ROT270, "bootleg", "Space War Part 3", 0, layout_invaders )
24692533GAMEL(1978, invaderl, invaders, invaders, sicv,     0, ROT270, "Logitec", "Space Invaders (Logitec)", 0, layout_invaders )
24702534GAMEL(1978, invader4, invaders, invaders, sicv,     0, ROT270, "bootleg", "Space Invaders Part Four", 0, layout_invaders )
src/mame/drivers/meritm.c
r3426r3427
3939  Megatouch III Tournament Edition (c)1996
4040  Megatouch IV (c)1996
4141  Megatouch IV Tournament Edition (c)1996
42  *Super Megatouch IV (c) 1996  (rom labels 9255-41-0x, see below)
42  Super Megatouch IV (c) 1996  (rom labels 9255-41-0x, see below)
4343  *Megatouch 5 (c)1997
4444  *Megatouch 5 Tournament Edition (c)1997
4545  Megatouch 6 (c)1998
r3426r3427
11701170
11711171ROM_START( megat3a ) /* Dallas DS1204V security key at U5 labeled 9255-20-01 U5-RO1 C1995 MII */
11721172   ROM_REGION( 0x400000, "main", 0 )
1173   ROM_LOAD( "9255-20-01_u32-r0d", 0x000000, 0x080000, CRC(ac969296) SHA1(7e09e9141637339b83c21f2488560cdf8a460069) ) /* Location U32 */
1174   ROM_RELOAD(                     0x080000, 0x080000)
1175   ROM_LOAD( "qs9255-01_u36-r0",   0x100000, 0x080000, CRC(96bb501e) SHA1(f48ef238e8543676c42e3b85464a25ac179dcdd1) ) /* Location U36 */
1176   ROM_RELOAD(                     0x180000, 0x080000)
1177   ROM_LOAD( "qs9255-01_u37-r0",   0x200000, 0x100000, CRC(273560bd) SHA1(5de8b9f5a7c4b676f131dd7d47ec71d35fa1755c) ) /* Location U37 */
1178   ROM_LOAD( "9255-20-01_u38-r0f", 0x300000, 0x080000, CRC(85f48b91) SHA1(7a38644ac7ee55a254c037122af919fb268744a1) ) /* Location U38, 10/27/1995 14:23:00 - Standard Version */
1179   ROM_RELOAD(                     0x380000, 0x080000)
1180
1181   ROM_REGION( 0x1000, "user2", 0 ) // PALs
1182   ROM_LOAD( "sc3943.u20",     0x000, 0x117, CRC(5a72fe78) SHA1(4b1a36904eb7048518507fe14bdade5c2589dbd7) )
1183   ROM_LOAD( "sc3944-0a.u19",  0x000, 0x2dd, CRC(4cc46c5e) SHA1(0bab970df1539ce905f43603ad13171b05449a01) )
1184   ROM_LOAD( "sc3980.u40",     0x000, 0x117, CRC(ee0cdab5) SHA1(216fef50a8a0f6a33b704d3501a4c5c3cbac2bad) )
1185   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
1186ROM_END
1187
1188ROM_START( megat3ca ) /* Dallas DS1204V security key at U5 labeled 9255-20-01 U5-RO1 C1995 MII */
1189   ROM_REGION( 0x400000, "main", 0 )
11731190   ROM_LOAD( "9255-20-01_u32-r0a", 0x000000, 0x080000, CRC(69110f8f) SHA1(253487f0b4a82072efb7c70bebf953ea1c41d0d8) ) /* Location U32 */
11741191   ROM_RELOAD(                     0x080000, 0x080000)
11751192   ROM_LOAD( "qs9255-01_u36-r0",   0x100000, 0x080000, CRC(96bb501e) SHA1(f48ef238e8543676c42e3b85464a25ac179dcdd1) ) /* Location U36 */
r3426r3427
11851202   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
11861203ROM_END
11871204
1188ROM_START( megat3b ) /* Dallas DS1204V security key at U5 labeled 9255-20-01 U5-RO1 C1995 MII */
1205ROM_START( megat3nj ) /* Dallas DS1204V security key at U5 labeled 9255-20-01 U5-RO1 C1995 MII */
11891206   ROM_REGION( 0x400000, "main", 0 )
11901207   ROM_LOAD( "9255-20-01_u32-r0d", 0x000000, 0x080000, CRC(ac969296) SHA1(7e09e9141637339b83c21f2488560cdf8a460069) ) /* Location U32 */
11911208   ROM_RELOAD(                     0x080000, 0x080000)
11921209   ROM_LOAD( "qs9255-01_u36-r0",   0x100000, 0x080000, CRC(96bb501e) SHA1(f48ef238e8543676c42e3b85464a25ac179dcdd1) ) /* Location U36 */
11931210   ROM_RELOAD(                     0x180000, 0x080000)
11941211   ROM_LOAD( "qs9255-01_u37-r0",   0x200000, 0x100000, CRC(273560bd) SHA1(5de8b9f5a7c4b676f131dd7d47ec71d35fa1755c) ) /* Location U37 */
1195   ROM_LOAD( "9255-20-01_u38-r0f", 0x300000, 0x080000, CRC(85f48b91) SHA1(7a38644ac7ee55a254c037122af919fb268744a1) ) /* Location U38, 10/27/1995 14:23:00 */
1212   ROM_LOAD( "9255-20-07_u38-r0g", 0x300000, 0x080000, CRC(0ac673e7) SHA1(6b014366fcc5cdaa3d6a7e40da580d14def80174) ) /* Location U38, 11/17/1995 09:43:15 - New Jersey version */
11961213   ROM_RELOAD(                     0x380000, 0x080000)
11971214
11981215   ROM_REGION( 0x1000, "user2", 0 ) // PALs
r3426r3427
12081225   ROM_LOAD( "qs9255-01_u36-r0",   0x100000, 0x080000, CRC(96bb501e) SHA1(f48ef238e8543676c42e3b85464a25ac179dcdd1) ) /* Location U36 */
12091226   ROM_RELOAD(                     0x180000, 0x080000)
12101227   ROM_LOAD( "qs9255-01_u37-r0",   0x200000, 0x100000, CRC(273560bd) SHA1(5de8b9f5a7c4b676f131dd7d47ec71d35fa1755c) ) /* Location U37 */
1211   ROM_LOAD( "9255-30-01_u38-r0e", 0x300000, 0x080000, CRC(52ca7dd8) SHA1(9f44f158d67d7443405b87a18fc89d9c88be1dea) ) /* Location U38, 02/15/1996 16:04:36 */
1228   ROM_LOAD( "9255-30-01_u38-r0e", 0x300000, 0x080000, CRC(52ca7dd8) SHA1(9f44f158d67d7443405b87a18fc89d9c88be1dea) ) /* Location U38, 02/15/1996 16:04:36 - Standard Version */
12121229   ROM_RELOAD(                     0x380000, 0x080000)
12131230
12141231   ROM_REGION( 0x1000, "user2", 0 ) // PALs
r3426r3427
12251242   ROM_RELOAD(                     0x180000, 0x80000)
12261243   ROM_LOAD( "qs9255-02_u37-r0",   0x200000, 0x80000,  CRC(f2e8bb4e) SHA1(5c5475b3c176a6aca9b2c6aa4aee422675d20bd1) ) /* Location U37 */
12271244   ROM_RELOAD(                     0x280000, 0x80000)
1228   ROM_LOAD( "9255-40-01_u38-r0e", 0x300000, 0x80000,  CRC(407c5e57) SHA1(c7c907b3fd6a8e64dcc6c71288505980862effce) ) /* Location U38, 07/22/1996 14:52:24 */
1245   ROM_LOAD( "9255-40-01_u38-r0e", 0x300000, 0x80000,  CRC(407c5e57) SHA1(c7c907b3fd6a8e64dcc6c71288505980862effce) ) /* Location U38, 07/22/1996 14:52:24 - Standard Version */
12291246   ROM_RELOAD(                     0x380000, 0x80000)
12301247
12311248   ROM_REGION( 0x1000, "user2", 0 ) // PALs
r3426r3427
12421259   ROM_RELOAD(                     0x180000, 0x80000)
12431260   ROM_LOAD( "qs9255-02_u37-r0",   0x200000, 0x80000,  CRC(f2e8bb4e) SHA1(5c5475b3c176a6aca9b2c6aa4aee422675d20bd1) ) /* Location U37 */
12441261   ROM_RELOAD(                     0x280000, 0x80000)
1245   ROM_LOAD( "9255-40-01_u38-r0d", 0x300000, 0x80000,  CRC(0d098424) SHA1(ef2810ccd636e69378fd353c8a95605274bb227f) ) /* Location U38, 07/08/1996 14:16:56 */
1262   ROM_LOAD( "9255-40-01_u38-r0d", 0x300000, 0x80000,  CRC(0d098424) SHA1(ef2810ccd636e69378fd353c8a95605274bb227f) ) /* Location U38, 07/08/1996 14:16:56 - Standard Version */
12461263   ROM_RELOAD(                     0x380000, 0x80000)
12471264
12481265   ROM_REGION( 0x1000, "user2", 0 ) // PALs
r3426r3427
12521269   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
12531270ROM_END
12541271
1272ROM_START( megat4sn ) /* Dallas DS1204V security key at U5 labeled 9255-40-01 U5-B-RO1 C1996 MII */
1273   ROM_REGION( 0x400000, "main", 0 )
1274   ROM_LOAD( "9255-40-01_u32-r0a", 0x000000, 0x100000, CRC(9ace8f52) SHA1(7c755c77cbfb234e1d6f531c90e4a8661275d464) ) /* Location U32 */
1275   ROM_LOAD( "qs9255-02_u36-r0",   0x100000, 0x80000,  CRC(57322328) SHA1(12bc604c9d34cde431ef7cd2aa33c7b12ac01833) ) /* Location U36 */
1276   ROM_RELOAD(                     0x180000, 0x80000)
1277   ROM_LOAD( "qs9255-02_u37-r0",   0x200000, 0x80000,  CRC(f2e8bb4e) SHA1(5c5475b3c176a6aca9b2c6aa4aee422675d20bd1) ) /* Location U37 */
1278   ROM_RELOAD(                     0x280000, 0x80000)
1279   ROM_LOAD( "9255-41-07_u38-r0g", 0x300000, 0x80000,  CRC(71eac4d4) SHA1(73b9ed876f0af94bbd88503921a2b4f26bcfd397) ) /* Location U38, 02/11/1997 11:59:41 - New Jersey version */
1280   ROM_RELOAD(                     0x380000, 0x80000)
1281
1282   ROM_REGION( 0x1000, "user2", 0 ) // PALs
1283   ROM_LOAD( "sc3943.u20",     0x000, 0x117, CRC(5a72fe78) SHA1(4b1a36904eb7048518507fe14bdade5c2589dbd7) )
1284   ROM_LOAD( "sc3944-0a.u19",  0x000, 0x2dd, CRC(4cc46c5e) SHA1(0bab970df1539ce905f43603ad13171b05449a01) )
1285   ROM_LOAD( "sc3980.u40",     0x000, 0x117, CRC(ee0cdab5) SHA1(216fef50a8a0f6a33b704d3501a4c5c3cbac2bad) )
1286   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
1287ROM_END
1288
12551289ROM_START( megat4te ) /* Dallas DS1204V security key at U5 labeled 9255-50-01 U5-B-RO1 C1996 MII */
12561290   ROM_REGION( 0x400000, "main", 0 )
12571291   ROM_LOAD( "9255-40-01_u32-r0",  0x000000, 0x100000, CRC(08b1b8fe) SHA1(c562f2e065d6d7f753f6fd1d0b8355b01cb089ec) ) /* Location U32 */
r3426r3427
12591293   ROM_RELOAD(                     0x180000, 0x80000)
12601294   ROM_LOAD( "qs9255-02_u37-r0",   0x200000, 0x80000,  CRC(f2e8bb4e) SHA1(5c5475b3c176a6aca9b2c6aa4aee422675d20bd1) ) /* Location U37 */
12611295   ROM_RELOAD(                     0x280000, 0x80000)
1262   ROM_LOAD( "9255-50-01_u38-r0d", 0x300000, 0x080000, CRC(124d5b84) SHA1(3c2117f56d0dc406bfb508989729e36781e215a4) ) /* Location U38, 07/02/1996 14:41:59 */
1296   ROM_LOAD( "9255-50-01_u38-r0d", 0x300000, 0x080000, CRC(124d5b84) SHA1(3c2117f56d0dc406bfb508989729e36781e215a4) ) /* Location U38, 07/02/1996 14:41:59 - Standard Version */
12631297   ROM_RELOAD(                     0x380000, 0x080000 )
12641298
12651299   ROM_REGION( 0x8000, "user1", 0 ) // DS1644 nv ram
r3426r3427
12741308
12751309ROM_START( megat5 ) /* Dallas DS1204V security key at U5 labeled 9255-60-01 U5-B-RO1 C1998 MII */
12761310   ROM_REGION( 0x400000, "main", 0 )
1277   ROM_LOAD( "9255-60-01_u32-r0",  0x000000, 0x80000, BAD_DUMP CRC(89932443) SHA1(68d2fbf2a5050fc5371595a105fe06f4276b0b67) ) /* U32 is a bad dump, the other 3 roms look to be ok */
1278   ROM_RELOAD(                     0x080000, 0x80000)
1279   ROM_LOAD( "qs9255-05_u36-r0",   0x100000, 0x80000, BAD_DUMP CRC(0bed9e27) SHA1(1414385ce562b127e1ddeccc20ea4ff2a7098b7e) )
1311   ROM_LOAD( "9255-60-01_u32-r0",  0x000000, 0x100000, CRC(f8f7f48e) SHA1(1bebe1f8898c60b795a0f794ca9b79e03d2744e4) )
1312   ROM_LOAD( "qs9255-05_u36-r0",   0x100000, 0x80000,  CRC(0bed9e27) SHA1(1414385ce562b127e1ddeccc20ea4ff2a7098b7e) )
12801313   ROM_RELOAD(                     0x180000, 0x80000)
1281   ROM_LOAD( "qs9255-05_u37-r0",   0x200000, 0x80000, BAD_DUMP CRC(b713a1c5) SHA1(d6ccba2ea90fd0e2ecf15249514231eed54000c1) )
1314   ROM_LOAD( "qs9255-05_u37-r0",   0x200000, 0x80000, CRC(b713a1c5) SHA1(d6ccba2ea90fd0e2ecf15249514231eed54000c1) )
12821315   ROM_RELOAD(                     0x280000, 0x80000)
1283   ROM_LOAD( "9255-60-01_u38-r0c", 0x300000, 0x80000, BAD_DUMP CRC(018e36c7) SHA1(8e9b457238a40b10d59887d13bac9c0a05c73614) ) /* Location U38, 07/10/1997 16:27:51 */
1316   ROM_LOAD( "9255-60-01_u38-r0c", 0x300000, 0x80000, BAD_DUMP CRC(018e36c7) SHA1(8e9b457238a40b10d59887d13bac9c0a05c73614) ) /* Location U38, 07/10/1997 16:27:51 Dumped at half size */
12841317   ROM_RELOAD(                     0x380000, 0x80000)
12851318
12861319   ROM_REGION( 0x1000, "user2", 0 ) // PALs
r3426r3427
12901323   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
12911324ROM_END
12921325
1326ROM_START( megat5nj ) /* Dallas DS1204V security key at U5 labeled 9255-60-01 U5-B-RO1 C1998 MII */
1327   ROM_REGION( 0x400000, "main", 0 )
1328   ROM_LOAD( "9255-60-01_u32-r0",  0x000000, 0x100000, CRC(f8f7f48e) SHA1(1bebe1f8898c60b795a0f794ca9b79e03d2744e4) )
1329   ROM_LOAD( "qs9255-05_u36-r0",   0x100000, 0x80000,  CRC(0bed9e27) SHA1(1414385ce562b127e1ddeccc20ea4ff2a7098b7e) )
1330   ROM_RELOAD(                     0x180000, 0x80000)
1331   ROM_LOAD( "qs9255-05_u37-r0",   0x200000, 0x80000,  CRC(b713a1c5) SHA1(d6ccba2ea90fd0e2ecf15249514231eed54000c1) )
1332   ROM_RELOAD(                     0x280000, 0x80000)
1333   ROM_LOAD( "9255-60-07_u38-r0n", 0x300000, 0x100000, CRC(c8163fe8) SHA1(94199b892ce9e5f543e10f3f59a9aeee4782923f) ) /* Location U38, 07/13/1998 15:19:55 - New Jersey version */
1334
1335   ROM_REGION( 0x1000, "user2", 0 ) // PALs
1336   ROM_LOAD( "sc3943.u20",     0x000, 0x117, CRC(5a72fe78) SHA1(4b1a36904eb7048518507fe14bdade5c2589dbd7) )
1337   ROM_LOAD( "sc3944-0a.u19",  0x000, 0x2dd, CRC(4cc46c5e) SHA1(0bab970df1539ce905f43603ad13171b05449a01) )
1338   ROM_LOAD( "sc3980.u40",     0x000, 0x117, CRC(ee0cdab5) SHA1(216fef50a8a0f6a33b704d3501a4c5c3cbac2bad) )
1339   ROM_LOAD( "sc3981-0a.u51",  0x000, 0x117, CRC(4fc750d0) SHA1(d09ff7a8c66aeb5c49e9fec84bd1521e3f5d8d0a) )
1340ROM_END
1341
12931342ROM_START( megat6 ) /* Dallas DS1204V security key at U5 labeled 9255-80 U5-B-RO1 C1998 MII */
12941343   ROM_REGION( 0x400000, "main", 0 )
12951344   ROM_LOAD( "9255-60-01_u32-r0",  0x000000, 0x100000, CRC(f8f7f48e) SHA1(1bebe1f8898c60b795a0f794ca9b79e03d2744e4) ) /* Location U32 */
12961345   ROM_LOAD( "qs9255-08_u36-r0",   0x100000, 0x080000, CRC(800f5a1f) SHA1(4d3ee6fb896d6452aab1f279a3ee878284bd1acc) ) /* Location U36 */
12971346   ROM_RELOAD(                     0x180000, 0x080000 )
12981347   ROM_LOAD( "qs9255-08_u37-r0",   0x200000, 0x100000, CRC(5ba01949) SHA1(1598949ea18d07bbc78af0ddd279a687173c1229) ) /* Location U37 */
1299   ROM_LOAD( "9255-80-01_u38-r0a", 0x300000, 0x100000, CRC(3df6b840) SHA1(31ba1ac04eed3e76cdf637507dedcc5f7e22c919) ) /* Location U38, 08/07/1998 15:54:23 */
1348   ROM_LOAD( "9255-80-01_u38-r0a", 0x300000, 0x100000, CRC(3df6b840) SHA1(31ba1ac04eed3e76cdf637507dedcc5f7e22c919) ) /* Location U38, 08/07/1998 15:54:23 - Standard Version */
13001349
13011350   ROM_REGION( 0x8000, "user1", 0 ) // DS1230 nv ram
13021351   ROM_LOAD( "ds1230y.u31",  0x00000, 0x8000, CRC(51b6da5c) SHA1(1d53af89d7867bb48b9d46feff6fc3b7e8e80ac8) )
r3426r3427
13531402
13541403};
13551404
1405static DRIVER_INIT(megat5)
1406{
1407   static const UINT8 megat5_ds1204_nvram[16] =
1408      { 0x06, 0x23, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
1409
1410   ds1204_init(0, megat5_ds1204_nvram);
1411
1412}
1413
13561414static DRIVER_INIT(megat6)
13571415{
13581416   static const UINT8 megat6_ds1204_nvram[16] =
r3426r3427
13711429GAME( 1994, pitbossm,  0,      meritm_crt250_questions, pitbossm, 0, ROT0, "Merit", "Pit Boss Megastar", GAME_IMPERFECT_GRAPHICS )
13721430
13731431/* CRT 260 */
1374GAME( 1996, megat3,    0,      meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-01 RON)", GAME_IMPERFECT_GRAPHICS ) /* Standard version   */
1375GAME( 1995, megat3a,   megat3, meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-06 RON)", GAME_IMPERFECT_GRAPHICS ) /* California version */
1376GAME( 1995, megat3b,   megat3, meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-01 ROF)", GAME_IMPERFECT_GRAPHICS )
1377GAME( 1996, megat3te,  megat3, meritm_crt260, meritm_crt260, megat3te, ROT0, "Merit", "Megatouch III Tournament Edition (9255-30-01 ROE)", GAME_IMPERFECT_GRAPHICS )
1378GAME( 1996, megat4,    0,      meritm_crt260, meritm_crt260, megat4,   ROT0, "Merit", "Megatouch IV (9255-40-01 ROE)", GAME_IMPERFECT_GRAPHICS )
1379GAME( 1996, megat4a,   megat4, meritm_crt260, meritm_crt260, megat4,   ROT0, "Merit", "Megatouch IV (9255-40-01 ROD)", GAME_IMPERFECT_GRAPHICS )
1380GAME( 1996, megat4te,  megat4, meritm_crt260, meritm_crt260, megat4te, ROT0, "Merit", "Megatouch IV Tournament Edition (9255-50-01 ROD)", GAME_IMPERFECT_GRAPHICS )
1381GAME( 1997, megat5,    0,      meritm_crt260, meritm_crt260, 0,          ROT0, "Merit", "Megatouch 5 (9255-60-01 ROC)", GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
1382GAME( 1998, megat6,    0,      meritm_crt260, meritm_crt260, megat6,   ROT0, "Merit", "Megatouch 6 (9255-80-01 ROA)", GAME_IMPERFECT_GRAPHICS )
1432GAME( 1996, megat3,    0,      meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-01 RON, Standard version)", GAME_IMPERFECT_GRAPHICS )
1433GAME( 1995, megat3a,   megat3, meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-01 ROF, Standard version)", GAME_IMPERFECT_GRAPHICS )
1434GAME( 1996, megat3ca,  megat3, meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-06 RON, California version)", GAME_IMPERFECT_GRAPHICS )
1435GAME( 1995, megat3nj,  megat3, meritm_crt260, meritm_crt260, megat3,   ROT0, "Merit", "Megatouch III (9255-20-07 ROG, New Jersey version)", GAME_IMPERFECT_GRAPHICS )
1436GAME( 1996, megat3te,  megat3, meritm_crt260, meritm_crt260, megat3te, ROT0, "Merit", "Megatouch III Tournament Edition (9255-30-01 ROE, Standard version)", GAME_IMPERFECT_GRAPHICS )
1437GAME( 1996, megat4,    0,      meritm_crt260, meritm_crt260, megat4,   ROT0, "Merit", "Megatouch IV (9255-40-01 ROE, Standard version)", GAME_IMPERFECT_GRAPHICS )
1438GAME( 1996, megat4a,   megat4, meritm_crt260, meritm_crt260, megat4,   ROT0, "Merit", "Megatouch IV (9255-40-01 ROD, Standard version)", GAME_IMPERFECT_GRAPHICS )
1439GAME( 1996, megat4sn,  megat4, meritm_crt260, meritm_crt260, megat4,   ROT0, "Merit", "Super Megatouch IV (9255-41-07 ROG, New Jersey version)", GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
1440GAME( 1996, megat4te,  megat4, meritm_crt260, meritm_crt260, megat4te, ROT0, "Merit", "Megatouch IV Tournament Edition (9255-50-01 ROD, Standard version)", GAME_IMPERFECT_GRAPHICS )
1441GAME( 1997, megat5,    0,      meritm_crt260, meritm_crt260, megat5,   ROT0, "Merit", "Megatouch 5 (9255-60-01 ROC, Standard version)", GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
1442GAME( 1998, megat5nj,  megat5, meritm_crt260, meritm_crt260, megat5,   ROT0, "Merit", "Megatouch 5 (9255-60-07 RON, New Jersey version)", GAME_IMPERFECT_GRAPHICS )
1443GAME( 1998, megat6,    0,      meritm_crt260, meritm_crt260, megat6,   ROT0, "Merit", "Megatouch 6 (9255-80-01 ROA, Standard version)", GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/lucky74.c
r3426r3427
557557    DRIVER UPDATES:
558558
559559
560    [2008-10-07]
561
562    - Improved the button-lamps layout to be more realistic.
563
564
560565    [2008-08-08]
561566
562567    - Reverse engineering of custom IC's 06B49P, 06B53P & 09R81P.
src/mame/drivers/midwunit.c
r3426r3427
779779ROM_END
780780
781781
782ROM_START( mk3p40 )
783   ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF )   /* sound data */
784   ROM_LOAD16_BYTE( "umk3-u2.bin",  0x000000, 0x100000, CRC(3838cfe5) SHA1(e3d2901f3bae1362742fc6ee0aa31c9f63b4dfa3) )
785   ROM_LOAD16_BYTE( "umk3-u3.bin",  0x200000, 0x100000, CRC(856fe411) SHA1(6165ebecfce7500e948d84492ffa19eed7f47091) )
786   ROM_LOAD16_BYTE( "umk3-u4.bin",  0x400000, 0x100000, CRC(428a406f) SHA1(e70ec83cd054de0da1e178720ed0035b8887f797) )
787   ROM_LOAD16_BYTE( "umk3-u5.bin",  0x600000, 0x100000, CRC(3b98a09f) SHA1(edf1d02a56dcf3349e6b4bb4097acfe7592305f4) )
788
789   ROM_REGION16_LE( 0x100000, "user1", 0 )   /* 34010 code */
790   ROM_LOAD16_BYTE( "mk3p40.u54",  0x00000, 0x80000, CRC(4dfb0748) SHA1(8c628a51642c940de8abb795be36123e4008ce15) )
791   ROM_LOAD16_BYTE( "mk3p40.u63",  0x00001, 0x80000, CRC(f25a8083) SHA1(ff11462d23d9e16f6ee0d77bf85caa996df32618) )
792
793   ROM_REGION( 0x2000000, "gfx1", 0 )
794   ROM_LOAD( "umk-u133.bin",  0x0000000, 0x100000, CRC(79b94667) SHA1(31bba640c351fdccc6685cadb74dd79a3f910ce8) )
795   ROM_LOAD( "umk-u132.bin",  0x0100000, 0x100000, CRC(13e95228) SHA1(405b05f5a5a55667c2be17d4b399129bdacefd90) )
796   ROM_LOAD( "umk-u131.bin",  0x0200000, 0x100000, CRC(41001e30) SHA1(2cec91116771951c0380cec5debf4cbb40c14c61) )
797   ROM_LOAD( "umk-u130.bin",  0x0300000, 0x100000, CRC(49379dd7) SHA1(e6dfab4e23d9cc38ae56c1bbf10ccd160e8fad5e) )
798
799   ROM_LOAD( "umk-u129.bin",  0x0400000, 0x100000, CRC(a8b41803) SHA1(9697e35e8bb51d6d36b1d7ae47377b446e57682f) )
800   ROM_LOAD( "umk-u128.bin",  0x0500000, 0x100000, CRC(b410d72f) SHA1(ac5c1c6f744186540f4ab100d9bd4ce6007e600b) )
801   ROM_LOAD( "umk-u127.bin",  0x0600000, 0x100000, CRC(bd985be7) SHA1(f5183abea2e5eb2c2c8cefa72c9ed321679f5128) )
802   ROM_LOAD( "umk-u126.bin",  0x0700000, 0x100000, CRC(e7c32cf4) SHA1(94ea7b2eed7dae66f5dd676c20d6b360140e3e0e) )
803
804   ROM_LOAD( "umk-u125.bin",  0x0800000, 0x100000, CRC(9a52227e) SHA1(0474a14fa8dbfea0b0889c1d1756b86391683558) )
805   ROM_LOAD( "umk-u124.bin",  0x0900000, 0x100000, CRC(5c750ebc) SHA1(45d68af1a56994376e086d840502453c8d6be700) )
806   ROM_LOAD( "umk-u123.bin",  0x0a00000, 0x100000, CRC(f0ab88a8) SHA1(cdc9dc12e162255845c6627b1e35182b7e8502d0) )
807   ROM_LOAD( "umk-u122.bin",  0x0b00000, 0x100000, CRC(9b87cdac) SHA1(a5f8db559293978f23e6f105543d8b2e170a2e0d) )
808
809   ROM_LOAD( "mk3-u121.bin",  0x0c00000, 0x100000, CRC(b6c6296a) SHA1(7b92a92d65493bb201daf5ece6f00140f017ac51) )
810   ROM_LOAD( "mk3-u120.bin",  0x0d00000, 0x100000, CRC(8d1ccc3b) SHA1(35d91c00113718a08a9d56eb04366f8cf4069ba6) )
811   ROM_LOAD( "mk3-u119.bin",  0x0e00000, 0x100000, CRC(63215b59) SHA1(709bce15fba1520bcba40f0a5cb614542f1b460f) )
812   ROM_LOAD( "mk3-u118.bin",  0x0f00000, 0x100000, CRC(8b681e34) SHA1(524104ba2eb2deb3cfae9760e6b2125ce6b6633e) )
813
814   ROM_LOAD( "mk3-u117.bin",  0x1000000, 0x080000, CRC(1ab20377) SHA1(0c0d14464d8b23a60e0693669af2ddb82655eff8) )
815   ROM_LOAD( "mk3-u116.bin",  0x1100000, 0x080000, CRC(ba246ad0) SHA1(ec6bdd4b9cd3007bb66bb8de36d148abb30e7f11) )
816   ROM_LOAD( "mk3-u115.bin",  0x1200000, 0x080000, CRC(3ee8b124) SHA1(1523d51e36d3c336b134a562da36a29ba137c0f6) )
817   ROM_LOAD( "mk3-u114.bin",  0x1300000, 0x080000, CRC(a8d99922) SHA1(04ff8d85448701070672f44dbf5bcfd744f1bc8a) )
818ROM_END
819
782820ROM_START( umk3 )
783821   ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF )   /* sound data */
784822   ROM_LOAD16_BYTE( "umk3-u2.bin",  0x000000, 0x100000, CRC(3838cfe5) SHA1(e3d2901f3bae1362742fc6ee0aa31c9f63b4dfa3) )
r3426r3427
11921230GAME( 1994, mk3,      0,         wunit, mk3,      mk3,      ROT0, "Midway", "Mortal Kombat 3 (rev 2.1)", GAME_SUPPORTS_SAVE )
11931231GAME( 1994, mk3r20,   mk3,       wunit, mk3,      mk3r20,   ROT0, "Midway", "Mortal Kombat 3 (rev 2.0)", GAME_SUPPORTS_SAVE )
11941232GAME( 1994, mk3r10,   mk3,       wunit, mk3,      mk3r10,   ROT0, "Midway", "Mortal Kombat 3 (rev 1.0)", GAME_SUPPORTS_SAVE )
1233GAME( 1994, mk3p40,   mk3,       wunit, mk3,      mk3r10,   ROT0, "Midway", "Mortal Kombat 3 (rev 1 chip label p4.0)", GAME_SUPPORTS_SAVE )
11951234GAME( 1994, umk3,     mk3,       wunit, mk3,      umk3,     ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.2)", GAME_SUPPORTS_SAVE )
11961235GAME( 1994, umk3r11,  mk3,       wunit, mk3,      umk3r11,  ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.1)", GAME_SUPPORTS_SAVE )
11971236GAME( 1994, umk3r10,  mk3,       wunit, mk3,      umk3r11,  ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.0)", GAME_SUPPORTS_SAVE )
src/mame/drivers/merit.c
r3426r3427
812812   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
813813   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
814814
815   PORT_START("IN3")
815   PORT_START("DSW")
816816   PORT_DIPNAME( 0x01, 0x01, "4" )
817817   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
818818   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r3426r3427
858858      NULL                  /* Port C write */
859859   },
860860   {
861      DEVICE8_PORT("IN3"),      /* Port A read */
861      DEVICE8_PORT("DSW"),      /* Port A read */
862862      NULL,                  /* Port B read */
863863      NULL,                  /* Port C read */
864864      NULL,                  /* Port A write */
src/mame/drivers/m72.c
r3426r3427
137137   if (scanline < 256 && scanline == m72_raster_irq_position - 128)
138138   {
139139      video_screen_update_partial(machine->primary_screen, scanline);
140      cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, m72_irq_base + 2);
140      cputag_set_input_line_and_vector(machine, "main", 0, HOLD_LINE, m72_irq_base + 2);
141141   }
142142
143143   /* VBLANK interrupt */
144144   else if (scanline == 256)
145145   {
146146      video_screen_update_partial(machine->primary_screen, scanline);
147      cpunum_set_input_line_and_vector(machine, 0, 0, HOLD_LINE, m72_irq_base + 0);
147      cputag_set_input_line_and_vector(machine, "main", 0, HOLD_LINE, m72_irq_base + 0);
148148   }
149149
150150   /* adjust for next scanline */
r3426r3427
541541   /* since we skip the startup tests, clear video RAM to prevent garbage on title screen */
542542   memset(m72_videoram2,0,0x4000);
543543}
544#if 0
545int stepping = 0;
544546
545static READ16_HANDLER( m72_main_mcu_r)
547static TIMER_CALLBACK( single_step )
546548{
547   return protection_ram[offset];
549   if (param>0)
550      timer_set( ATTOTIME_IN_NSEC(20), NULL, param-1, single_step);
551   else
552      stepping = 0;
548553}
554static TIMER_CALLBACK( delayed_ram16_w )
555{
556   UINT16 val = ((UINT32) param) & 0xffff;
557   UINT16 offset = (((UINT32) param) >> 16) & 0xffff;
558   UINT16 *ram = ptr;
549559
560   ram[offset] = val;
561
562   if (!stepping)
563   {
564      stepping = 1;
565      timer_call_after_resynch( NULL, 50, single_step);
566   }
567}
568#else
569static TIMER_CALLBACK( delayed_ram16_w )
570{
571   UINT16 val = ((UINT32) param) & 0xffff;
572   UINT16 offset = (((UINT32) param) >> 16) & 0xffff;
573   UINT16 *ram = ptr;
574
575   ram[offset] = val;
576}
577
578#endif
579
550580static WRITE16_HANDLER( m72_main_mcu_w)
551581{
552   COMBINE_DATA(&protection_ram[offset]);
582   UINT16 val = protection_ram[offset];
583
584   COMBINE_DATA(&val);
585
586   if (offset == 0x0fff/2 && ACCESSING_BITS_8_15)
587   {
588      protection_ram[offset] = val;
589      cputag_set_input_line(machine, "mcu", 0, PULSE_LINE);
590   }
591   else
592      timer_call_after_resynch( protection_ram, (offset<<16) | val, delayed_ram16_w);
553593}
554594
555595static DRIVER_INIT( loht_mcu )
556596{
597   int cpunum =  mame_find_cpu_index(machine, "main");
557598
558   protection_ram = auto_malloc(0x10000);
599   protection_ram = auto_malloc(0x1000);
600   memset(protection_ram, 0xff, 0x1000);
601   memory_install_read16_handler(machine, cpunum, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb0fff, 0, 0, SMH_BANK1);
602   memory_install_write16_handler(machine, cpunum, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb0fff, 0, 0, m72_main_mcu_w);
603   memory_set_bankptr(1, protection_ram);
559604
560   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb0fff, 0, 0, m72_main_mcu_r, m72_main_mcu_w);
605   memory_install_write16_handler(machine, cpunum, ADDRESS_SPACE_IO, 0xc0, 0xc1, 0, 0, loht_sample_trigger_w);
561606
562   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_IO, 0xc0, 0xc1, 0, 0, loht_sample_trigger_w);
563
564607}
565608
566
567609static DRIVER_INIT( xmultipl )
568610{
569611   install_protection_handler(machine, xmultipl_code,xmultipl_crc);
r3426r3427
741783   AM_RANGE(0xa0000, 0xa0bff) AM_READWRITE(m72_palette1_r, m72_palette1_w) AM_BASE(&paletteram16)
742784   AM_RANGE(0xa8000, 0xa8bff) AM_READWRITE(m72_palette2_r, m72_palette2_w) AM_BASE(&paletteram16_2)
743785   AM_RANGE(0xb0000, 0xb0001) AM_WRITE(m72_irq_line_w)
744AM_RANGE(0xb4000, 0xb4001) AM_WRITE(SMH_NOP)   /* ??? */
786   AM_RANGE(0xb4000, 0xb4001) AM_WRITE(SMH_NOP)   /* ??? */
745787   AM_RANGE(0xbc000, 0xbc001) AM_WRITE(m72_dmaon_w)
746788   AM_RANGE(0xc0000, 0xc03ff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
747789   AM_RANGE(0x80000, 0x83fff) AM_RAM_WRITE(m72_videoram1_w) AM_BASE(&m72_videoram1)
r3426r3427
16271669
16281670static WRITE8_HANDLER( m72_mcu_data_w )
16291671{
1630   if (offset&1) protection_ram[offset/2] = (protection_ram[offset/2] & 0x00ff) | (data << 8);
1631   else protection_ram[offset/2] = (protection_ram[offset/2] & 0xff00) | (data&0xff);
1672   UINT16 val;
1673   if (offset&1) val = (protection_ram[offset/2] & 0x00ff) | (data << 8);
1674   else val = (protection_ram[offset/2] & 0xff00) | (data&0xff);
1675
1676   if (offset == 6 && data == 0xfe)
1677      /* Hack - The v30 overshoots and will not see the unlock written to offset 6
1678         * We thus delay the lock, i.e. storing an unconditional branch to 6
1679         * here. This is highly time critical ... */
1680      timer_set(ATTOTIME_IN_USEC(10), protection_ram, ((offset >>1 ) << 16) | val, delayed_ram16_w);
1681   else
1682      timer_call_after_resynch( protection_ram, ((offset >>1 ) << 16) | val, delayed_ram16_w);
16321683}
16331684
16341685static READ8_HANDLER(m72_mcu_data_r )
r3426r3427
16361687   UINT8 ret;
16371688
16381689   if (offset&1) ret = (protection_ram[offset/2] & 0xff00)>>8;
1639   else ret =(protection_ram[offset/2] & 0x00ff);
1690   else ret = (protection_ram[offset/2] & 0x00ff);
16401691
1641//  printf("ret %02x\n",ret);
16421692   return ret;
16431693}
16441694
r3426r3427
16901740MACHINE_DRIVER_END
16911741
16921742static MACHINE_DRIVER_START( m72_8751 )
1743
16931744   MDRV_IMPORT_FROM(m72)
16941745
1695   MDRV_CPU_ADD("mcu",I8751, 8000000)
1746   MDRV_CPU_ADD("mcu",I8751, 16000000)
16961747   MDRV_CPU_PROGRAM_MAP(mcu_map,0)
16971748   MDRV_CPU_DATA_MAP(mcu_data_map,0)
1698   MDRV_CPU_VBLANK_INT("main", irq0_line_pulse)
1749   //MDRV_CPU_VBLANK_INT("main", irq0_line_pulse)
1750   MDRV_INTERLEAVE(1000)
1751
16991752MACHINE_DRIVER_END
17001753
17011754
src/mame/drivers/zr107.c
r3426r3427
830830
831831/*****************************************************************************/
832832
833static TIMER_CALLBACK( irq_off )
834{
835   cpunum_set_input_line(machine, 1, param, CLEAR_LINE);
836}
837
833838static void sound_irq_callback(running_machine *machine, int irq)
834839{
835   if (irq == 0)
836      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ1, PULSE_LINE);
837   else
838      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE);
840   int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
841   cpunum_set_input_line(machine, 1, line, ASSERT_LINE);
842   timer_set(ATTOTIME_IN_USEC(1), NULL, line, irq_off);
839843}
840844
841845static void init_zr107(running_machine *machine)
src/mame/drivers/bwidow.c
r3426r3427
232232#define IN_THRUST (1 << 4)
233233#define IN_P1 (1 << 5)
234234#define IN_P2 (1 << 6)
235#define OPTION_1_PLAYER_GAME_ONLY (1 << 2)
236#define OPTION_2_CREDIT_MINIMUM (1 << 1)
237#define OPTION_CHARGE_BY_ (1 << 0)
235238
236239
237240/*************************************
r3426r3427
253256   int res;
254257   int res1;
255258   int res2;
259   int res3;
256260
257261   res1 = input_port_read(machine, "IN3");
258262   res2 = input_port_read(machine, "IN4");
263   res3 = input_port_read(machine, "DSW2");
259264   res = 0x00;
260265
261266   switch (offset & 0x07)
r3426r3427
282287         break;
283288      case 5:  /* Player 2 */
284289         if (res2 & IN_THRUST) res |= 0x80;
290         if ((res3 & OPTION_CHARGE_BY_) == 0) res |= 0x40;
285291         break;
286292      case 6:
287293         if (res1 & IN_P2) res |= 0x80;
294         if ((res3 & OPTION_2_CREDIT_MINIMUM) == 0) res |= 0x40;
288295         break;
289296      case 7:
290297         res = (0x00 /* upright */ | (0 & 0x40));
298         if ((res3 & OPTION_1_PLAYER_GAME_ONLY) == 0) res |= 0x40;
291299         break;
292300   }
293301
r3426r3427
635643   PORT_DIPSETTING (  0x20, "1 each 2" )
636644   PORT_DIPSETTING (  0x00, DEF_STR( None ) )
637645
646   PORT_START("DSW2")
647   // Although a dip switch 1 setting is shown in the Space Duel - Operation, Maintenance, and Service Manual,
648   // this switch is not connected to anything on the PCB or in the schematics
649   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "P10/11:!1")
650   PORT_DIPNAME( 0x04, 0x04, "1-player game only" ) PORT_DIPLOCATION("P10/11:!2")
651   PORT_DIPSETTING (  0x04, DEF_STR( Off ) )
652   PORT_DIPSETTING (  0x00, DEF_STR( On ) )
653   PORT_DIPNAME( 0x02, 0x02, "2-credit minimum" ) PORT_DIPLOCATION("P10/11:!3")
654   PORT_DIPSETTING (  0x02, DEF_STR( Off ) )
655   PORT_DIPSETTING (  0x00, DEF_STR( On ) )
656   PORT_DIPNAME( 0x01, 0x01, "Charge by ..." ) PORT_DIPLOCATION("P10/11:!4")
657   PORT_DIPSETTING (  0x01, "player" )
658   PORT_DIPSETTING (  0x00, "game" )
659
638660   /* See machine/spacduel.c for more info on these 2 ports */
639661   PORT_START("IN3")   /* IN3 - Player 1 - spread over 8 memory locations */
640662   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
src/mame/drivers/pbaction.c
r3426r3427
199199
200200static const gfx_layout charlayout1 =
201201{
202   8,8,   /* 8*8 characters */
203   1024,   /* 1024 characters */
204   3,   /* 3 bits per pixel */
205   { 0, 1024*8*8, 2*1024*8*8 },   /* the bitplanes are separated */
206   { 0, 1, 2, 3, 4, 5, 6, 7 },   /* pretty straightforward layout */
207   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
208   8*8   /* every char takes 8 consecutive bytes */
202   8,8,
203   RGN_FRAC(1,3),
204   3,
205   { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
206   { STEP8(0,1) },
207   { STEP8(0,8) },
208   8*8
209209};
210210static const gfx_layout charlayout2 =
211211{
212   8,8,   /* 8*8 characters */
213   2048,   /* 2048 characters */
214   4,   /* 4 bits per pixel */
215   { 0, 2048*8*8, 2*2048*8*8, 3*2048*8*8 },   /* the bitplanes are separated */
216   { 0, 1, 2, 3, 4, 5, 6, 7 },   /* pretty straightforward layout */
217   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
218   8*8   /* every char takes 8 consecutive bytes */
212   8,8,
213   RGN_FRAC(1,4),
214   4,
215   { RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
216   { STEP8(0,1) },
217   { STEP8(0,8) },
218   8*8
219219};
220220static const gfx_layout spritelayout1 =
221221{
222   16,16,   /* 16*16 sprites */
223   128,   /* 128 sprites */
224   3,   /* 3 bits per pixel */
225   { 0, 256*16*16, 2*256*16*16 },   /* the bitplanes are separated */
226   { 0, 1, 2, 3, 4, 5, 6, 7,   /* pretty straightforward layout */
227         8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
228   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
229         16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
230   32*8   /* every sprite takes 32 consecutive bytes */
222   16,16,
223   RGN_FRAC(1,3),
224   3,
225   { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
226   { STEP8(0,1), STEP8(64,1) },
227   { STEP8(0,8), STEP8(128,8) },
228   32*8
231229};
232230static const gfx_layout spritelayout2 =
233231{
234   32,32,   /* 32*32 sprites */
235   32,   /* 32 sprites */
236   3,   /* 3 bits per pixel */
237   { 0*64*32*32, 1*64*32*32, 2*64*32*32 },   /* the bitplanes are separated */
238   { 0, 1, 2, 3, 4, 5, 6, 7,   /* pretty straightforward layout */
239         8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7,
240         32*8+0, 32*8+1, 32*8+2, 32*8+3, 32*8+4, 32*8+5, 32*8+6, 32*8+7,
241         40*8+0, 40*8+1, 40*8+2, 40*8+3, 40*8+4, 40*8+5, 40*8+6, 40*8+7 },
242   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
243         16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8,
244         64*8, 65*8, 66*8, 67*8, 68*8, 69*8, 70*8, 71*8,
245         80*8, 81*8, 82*8, 83*8, 84*8, 85*8, 86*8, 87*8 },
246   128*8   /* every sprite takes 128 consecutive bytes */
232   32,32,
233   RGN_FRAC(1,6),
234   3,
235   { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) },
236   { STEP8(0,1), STEP8(64,1), STEP8(256,1), STEP8(320,1) },
237   { STEP8(0,8), STEP8(128,8), STEP8(512,8), STEP8(640,8) },
238   128*8
247239};
248240
249241
250242
251243static GFXDECODE_START( pbaction )
252   GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout1,    0, 16 )   /*   0-127 characters */
253   GFXDECODE_ENTRY( "gfx2", 0x00000, charlayout2,  128,  8 )   /* 128-255 background */
254   GFXDECODE_ENTRY( "gfx3", 0x00000, spritelayout1,  0, 16 )   /*   0-127 normal sprites */
255   GFXDECODE_ENTRY( "gfx3", 0x01000, spritelayout2,  0, 16 )   /*   0-127 large sprites */
244   GFXDECODE_ENTRY( "fgchars", 0x00000, charlayout1,    0, 16 )   /*   0-127 characters */
245   GFXDECODE_ENTRY( "bgchars", 0x00000, charlayout2,  128,  8 )   /* 128-255 background */
246   GFXDECODE_ENTRY( "sprites", 0x00000, spritelayout1,  0, 16 )   /*   0-127 normal sprites */
247   GFXDECODE_ENTRY( "sprites", 0x01000, spritelayout2,  0, 16 )   /*   0-127 large sprites */
256248GFXDECODE_END
257249
258250
r3426r3427
319311   ROM_REGION( 0x10000, "audio", 0 )   /* 64k for sound board */
320312   ROM_LOAD( "a-e3.bin",     0x0000,  0x2000, CRC(0e53a91f) SHA1(df2827197cd55c3685e5ac8b26c20800623cb932) )
321313
322   ROM_REGION( 0x06000, "gfx1", ROMREGION_DISPOSE )
314   ROM_REGION( 0x06000, "fgchars", ROMREGION_DISPOSE )
323315   ROM_LOAD( "a-s6.bin",     0x00000, 0x2000, CRC(9a74a8e1) SHA1(bd27439b91f41db3fd7eedb44e828d61b793bda0) )
324316   ROM_LOAD( "a-s7.bin",     0x02000, 0x2000, CRC(5ca6ad3c) SHA1(7c8eff087f18cc2ff0572ea45e681a3a1ec94fad) )
325317   ROM_LOAD( "a-s8.bin",     0x04000, 0x2000, CRC(9f00b757) SHA1(74b6d926b8f456c8d0101f0232c5d3662423b396) )
326318
327   ROM_REGION( 0x10000, "gfx2", ROMREGION_DISPOSE )
319   ROM_REGION( 0x10000, "bgchars", ROMREGION_DISPOSE )
328320   ROM_LOAD( "a-j5.bin",     0x00000, 0x4000, CRC(21efe866) SHA1(0c0a05a26d793ba98b0f421d464ff4b1d301ff9e) )
329321   ROM_LOAD( "a-j6.bin",     0x04000, 0x4000, CRC(7f984c80) SHA1(18795ecbcd2da94f1cfcce5559d652388d1b8bc0) )
330322   ROM_LOAD( "a-j7.bin",     0x08000, 0x4000, CRC(df69e51b) SHA1(52ab15c63332f0fa98884fa9adc8d35b93c939c4) )
331323   ROM_LOAD( "a-j8.bin",     0x0c000, 0x4000, CRC(0094cb8b) SHA1(58f48d24903b797e8451bf231f9e8df621685d9f) )
332324
333   ROM_REGION( 0x06000, "gfx3", ROMREGION_DISPOSE )
325   ROM_REGION( 0x06000, "sprites", ROMREGION_DISPOSE )
334326   ROM_LOAD( "b-c7.bin",     0x00000, 0x2000, CRC(d1795ef5) SHA1(69ad8e419e340d2f548468ed7838102789b978da) )
335327   ROM_LOAD( "b-d7.bin",     0x02000, 0x2000, CRC(f28df203) SHA1(060f70ed6386c808303a488c97691257681bd8f3) )
336328   ROM_LOAD( "b-f7.bin",     0x04000, 0x2000, CRC(af6e9817) SHA1(56f47d25761b3850c49a3a81b5ea35f12bd77b14) )
r3426r3427
349341   ROM_REGION( 0x10000, "cpu2", 0 )   /* 64k for a third Z80 (not emulated) */
350342   ROM_LOAD( "pba17.bin",    0x0000,  0x4000, CRC(2734ae60) SHA1(4edcdfac1611c49c4f890609efbe8352b8161f8e) )
351343
352   ROM_REGION( 0x06000, "gfx1", ROMREGION_DISPOSE )
344   ROM_REGION( 0x06000, "fgchars", ROMREGION_DISPOSE )
353345   ROM_LOAD( "a-s6.bin",     0x00000, 0x2000, CRC(9a74a8e1) SHA1(bd27439b91f41db3fd7eedb44e828d61b793bda0) )
354346   ROM_LOAD( "a-s7.bin",     0x02000, 0x2000, CRC(5ca6ad3c) SHA1(7c8eff087f18cc2ff0572ea45e681a3a1ec94fad) )
355347   ROM_LOAD( "a-s8.bin",     0x04000, 0x2000, CRC(9f00b757) SHA1(74b6d926b8f456c8d0101f0232c5d3662423b396) )
356348
357   ROM_REGION( 0x10000, "gfx2", ROMREGION_DISPOSE )
349   ROM_REGION( 0x10000, "bgchars", ROMREGION_DISPOSE )
358350   ROM_LOAD( "a-j5.bin",     0x00000, 0x4000, CRC(21efe866) SHA1(0c0a05a26d793ba98b0f421d464ff4b1d301ff9e) )
359351   ROM_LOAD( "a-j6.bin",     0x04000, 0x4000, CRC(7f984c80) SHA1(18795ecbcd2da94f1cfcce5559d652388d1b8bc0) )
360352   ROM_LOAD( "a-j7.bin",     0x08000, 0x4000, CRC(df69e51b) SHA1(52ab15c63332f0fa98884fa9adc8d35b93c939c4) )
361353   ROM_LOAD( "a-j8.bin",     0x0c000, 0x4000, CRC(0094cb8b) SHA1(58f48d24903b797e8451bf231f9e8df621685d9f) )
362354
363   ROM_REGION( 0x06000, "gfx3", ROMREGION_DISPOSE )
355   ROM_REGION( 0x06000, "sprites", ROMREGION_DISPOSE )
364356   ROM_LOAD( "b-c7.bin",     0x00000, 0x2000, CRC(d1795ef5) SHA1(69ad8e419e340d2f548468ed7838102789b978da) )
365357   ROM_LOAD( "b-d7.bin",     0x02000, 0x2000, CRC(f28df203) SHA1(060f70ed6386c808303a488c97691257681bd8f3) )
366358   ROM_LOAD( "b-f7.bin",     0x04000, 0x2000, CRC(af6e9817) SHA1(56f47d25761b3850c49a3a81b5ea35f12bd77b14) )
r3426r3427
375367   ROM_REGION( 0x10000, "audio", 0 )   /* 64k for sound board */
376368   ROM_LOAD( "pba1.bin",     0x0000,  0x2000, CRC(8b69b933) SHA1(eb0762579d52ed9f5b1a002ffe7e517c59650e22) )
377369
378   ROM_REGION( 0x06000, "gfx1", ROMREGION_DISPOSE )
370   ROM_REGION( 0x06000, "fgchars", ROMREGION_DISPOSE )
379371   ROM_LOAD( "a-s6.bin",     0x00000, 0x2000, CRC(9a74a8e1) SHA1(bd27439b91f41db3fd7eedb44e828d61b793bda0) )
380372   ROM_LOAD( "a-s7.bin",     0x02000, 0x2000, CRC(5ca6ad3c) SHA1(7c8eff087f18cc2ff0572ea45e681a3a1ec94fad) )
381373   ROM_LOAD( "a-s8.bin",     0x04000, 0x2000, CRC(9f00b757) SHA1(74b6d926b8f456c8d0101f0232c5d3662423b396) )
382374
383   ROM_REGION( 0x10000, "gfx2", ROMREGION_DISPOSE )
375   ROM_REGION( 0x10000, "bgchars", ROMREGION_DISPOSE )
384376   ROM_LOAD( "a-j5.bin",     0x00000, 0x4000, CRC(21efe866) SHA1(0c0a05a26d793ba98b0f421d464ff4b1d301ff9e) )
385377   ROM_LOAD( "a-j6.bin",     0x04000, 0x4000, CRC(7f984c80) SHA1(18795ecbcd2da94f1cfcce5559d652388d1b8bc0) )
386378   ROM_LOAD( "a-j7.bin",     0x08000, 0x4000, CRC(df69e51b) SHA1(52ab15c63332f0fa98884fa9adc8d35b93c939c4) )
387379   ROM_LOAD( "a-j8.bin",     0x0c000, 0x4000, CRC(0094cb8b) SHA1(58f48d24903b797e8451bf231f9e8df621685d9f) )
388380
389   ROM_REGION( 0x06000, "gfx3", ROMREGION_DISPOSE )
381   ROM_REGION( 0x06000, "sprites", ROMREGION_DISPOSE )
390382   ROM_LOAD( "b-c7.bin",     0x00000, 0x2000, CRC(d1795ef5) SHA1(69ad8e419e340d2f548468ed7838102789b978da) )
391383   ROM_LOAD( "b-d7.bin",     0x02000, 0x2000, CRC(f28df203) SHA1(060f70ed6386c808303a488c97691257681bd8f3) )
392384   ROM_LOAD( "b-f7.bin",     0x04000, 0x2000, CRC(af6e9817) SHA1(56f47d25761b3850c49a3a81b5ea35f12bd77b14) )
src/mame/drivers/neodrvr.c
r3426r3427
632632
633633****************************************************************************/
634634
635
636   /* OEM sets */
637
638
639/*
640    Missing (undumped) sets:
641    . Rage of the Dragons (AES)
642    . Last Blade 2 (early revisions) ?
643    . Power Spikes II (early revisions) ?
644    . Metal Slug 3 (rev. Mar/17/2000 1:36)
645    . Metal Slug 4 (AES)
646    . Metal Slug 5 (PCB)
647    . 98 Best 44
648
649    Redump required:
650    . All set with BAD_DUMP roms
651    . Sets which have a p1h
652
653    All rom labels need to be reverified
654
655*/
656
635657ROM_START( nam1975 ) /* MVS AND AES VERSION */
636658   ROM_REGION( 0x100000, "main", 0 )
637659   ROM_LOAD16_WORD_SWAP( "001-p1.bin", 0x000000, 0x080000, CRC(cc9fc951) SHA1(92f4e6ddeeb825077d92dbb70b50afea985f15c0) )
r3426r3427
941963
942964ROM_START( superspy )
943965   ROM_REGION( 0x100000, "main", 0 )
944   ROM_LOAD16_WORD_SWAP( "011-p1.bin", 0x000000, 0x080000, CRC(c7f944b5) SHA1(da7560e09187c68f1d9f7656218497b4464c56c9) )
966   ROM_LOAD16_WORD_SWAP( "011-p1.bin", 0x000000, 0x080000, CRC(c7f944b5) SHA1(da7560e09187c68f1d9f7656218497b4464c56c9) )
945967   ROM_LOAD16_WORD_SWAP( "011-sp2.bin", 0x080000, 0x020000, CRC(811a4faf) SHA1(8169dfaf79f52d80ecec402ce1b1ab9cafb7ebdd) )
946968
947969   NEO_SFIX_128K( "011-s1.bin", CRC(ec5fdb96) SHA1(8003028025ac7bf531e568add6ba66c02d0b7e84) )
r3426r3427
11671189ROM_START( gpilotsh ) /* AES VERSION */
11681190   ROM_REGION( 0x100000, "main", 0 )
11691191   ROM_LOAD16_WORD_SWAP( "020-hp1.bin", 0x000000, 0x080000, CRC(7cdb01ce) SHA1(32cae2ddf5e26fb7e8a09132e600220db82df3b8) )
1170   ROM_LOAD16_WORD_SWAP( "020-p2.bin", 0x080000, 0x020000, CRC(edcb22ac) SHA1(505d2db38ae999b7d436e8f2ff56b81796d62b54) )
1192   ROM_LOAD16_WORD_SWAP( "020-p2.bin", 0x080000, 0x020000, CRC(edcb22ac) SHA1(505d2db38ae999b7d436e8f2ff56b81796d62b54) )
11711193
11721194   NEO_SFIX_128K( "020-s1.bin", CRC(a6d83d53) SHA1(9a8c092f89521cc0b27a385aa72e29cbaca926c5) )
11731195
r3426r3427
12141236
12151237   NEO_SFIX_128K( "022-s1.bin", CRC(843c3624) SHA1(dbdf86c193b7c1d795f8c21f2c103c1d3e18abbe) )
12161238
1217   NEO_BIOS_AUDIO_128K( "022-m1.bin", CRC(8e1d4ab6) SHA1(deabc11ab81e7e68a3e041c03a127ae28d0d7264) )
1239   NEO_BIOS_AUDIO_128K( "022-m1.bin", CRC(8e1d4ab6) SHA1(deabc11ab81e7e68a3e041c03a127ae28d0d7264) )
12181240
12191241   ROM_REGION( 0x200000, "ym", 0 )
12201242   ROM_LOAD( "022-v11.bin", 0x000000, 0x100000, CRC(2cb4ad91) SHA1(169ec7303c4275155a66a88cc08270c24132bb36) )
r3426r3427
13141336   ROM_REGION( 0x100000, "main", 0 )
13151337   ROM_LOAD16_WORD_SWAP( "029-p1.bin", 0x000000, 0x080000, CRC(9d563f19) SHA1(9bff7bf9fdcf81a0a6c4ce3e196097d4f05e67b6) )
13161338
1317   NEO_SFIX_128K( "029-s1.bin", CRC(bcd502f0) SHA1(a3400f52c037aa6a42e59e602cc24fa45fcbc951) )
1339   NEO_SFIX_128K( "029-s1.bin", CRC(bcd502f0) SHA1(a3400f52c037aa6a42e59e602cc24fa45fcbc951) )
13181340
13191341   NEO_BIOS_AUDIO_128K( "029-m1.bin", CRC(8ed64977) SHA1(c2f77213f05b4b2e1962a45e718a9e36cc398cbb) )
13201342
r3426r3427
15581580   NEO_BIOS_AUDIO_128K( "037-m1.bin", CRC(9c384263) SHA1(74b86284048669e316c5d241b4aaeb02d59d4dfa) )
15591581
15601582   ROM_REGION( 0x100000, "ym", 0 )
1561   ROM_LOAD( "037-v1.bin", 0x000000, 0x100000, CRC(61fedf65) SHA1(98f31d1e23bf7c1f7844e67f14707a704134042e) )
1583   ROM_LOAD( "037-v1.bin", 0x000000, 0x100000, CRC(61fedf65) SHA1(98f31d1e23bf7c1f7844e67f14707a704134042e) )
15621584
15631585   NO_DELTAT_REGION
15641586
r3426r3427
16081630
16091631   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
16101632   ROM_LOAD16_BYTE( "039-c1.bin", 0x000000, 0x100000, CRC(6d1c4aa9) SHA1(4fbc9d7cb37522ec298eefbe38c75a2d050fbb4a) ) /* Plane 0,1 */
1611   ROM_CONTINUE(                  0x400000, 0x100000 )
1633   ROM_CONTINUE( 0x400000, 0x100000 )
16121634   ROM_LOAD16_BYTE( "039-c2.bin", 0x000001, 0x100000, CRC(f7b75337) SHA1(4d85f85948c3e6ed38b0b0ccda79de3ce026e2d9) ) /* Plane 2,3 */
1613   ROM_CONTINUE(                  0x400001, 0x100000 )
1635   ROM_CONTINUE( 0x400001, 0x100000 )
16141636   ROM_LOAD16_BYTE( "039-c3.bin", 0x200000, 0x080000, CRC(bfc4f0b2) SHA1(f4abe2b52882b966412f3b503b8f2c8f49b57968) ) /* Plane 0,1 */
16151637   ROM_LOAD16_BYTE( "039-c4.bin", 0x200001, 0x080000, CRC(81c9c250) SHA1(e3a34ff69081a8681b5ca895915892dcdccfa7aa) ) /* Plane 2,3 */
16161638ROM_END
r3426r3427
16211643
16221644   NEO_SFIX_128K( "040-s1.bin", CRC(cd9802a3) SHA1(f685d4638f4f68e7e3f101c0c39128454536721b) )
16231645
1624//  NEO_BIOS_AUDIO_128K( "040-m1o.bin", CRC(9902dfa2) SHA1(af6284c5298328156726b76b968995ad25fdf4de) )  // old rom, bad?, diff rev?
16251646   NEO_BIOS_AUDIO_128K( "040-m1.bin", CRC(d4de4bca) SHA1(ecf604d06f01d40b04e285facef66a6ae2d35661) )
16261647
16271648   ROM_REGION( 0x300000, "ym", 0 )
r3426r3427
16321653
16331654   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
16341655   ROM_LOAD16_BYTE( "040-c1.bin", 0x000000, 0x100000, CRC(faa8ea99) SHA1(714575e57ea1990612f960ec42b38d2e157ad400) ) /* Plane 0,1 */
1635   ROM_CONTINUE(               0x400000, 0x100000 )
1656   ROM_CONTINUE( 0x400000, 0x100000 )
16361657   ROM_LOAD16_BYTE( "040-c2.bin", 0x000001, 0x100000, CRC(87d0ec65) SHA1(23645e0cf859fb4cec3745b3846ca0ef64c689fb) ) /* Plane 2,3 */
1637   ROM_CONTINUE(               0x400001, 0x100000 )
1658   ROM_CONTINUE( 0x400001, 0x100000 )
16381659   ROM_LOAD16_BYTE( "040-c3.bin", 0x200000, 0x080000, CRC(24b5ba80) SHA1(29d58a6b56bd24ee2046a8d45e023b4d7ab7685b) ) /* Plane 0,1 */
16391660   ROM_LOAD16_BYTE( "040-c4.bin", 0x200001, 0x080000, CRC(1c9e9930) SHA1(d017474873750a7602b7708c663d29b25ef7bb63) ) /* Plane 2,3 */
16401661ROM_END
r3426r3427
17011722
17021723   ROM_REGION( 0x0800000, "sprites", ROMREGION_DISPOSE )
17031724   ROM_LOAD16_BYTE( "043-c1.bin", 0x000000, 0x100000, CRC(bad2d67f) SHA1(04928e50ca75b7fbc52b64e816ec5701901f5893) ) /* Plane 0,1 */
1704   ROM_CONTINUE(                  0x400000, 0x100000 )
1725   ROM_CONTINUE( 0x400000, 0x100000 )
17051726   ROM_LOAD16_BYTE( "043-c2.bin", 0x000001, 0x100000, CRC(a7fbda95) SHA1(9da3c5faf22592a7eaf8df9fa6454f48c2a927ae) ) /* Plane 2,3 */
1706   ROM_CONTINUE(                  0x400001, 0x100000 )
1727   ROM_CONTINUE( 0x400001, 0x100000 )
17071728   ROM_LOAD16_BYTE( "043-c3.bin", 0x200000, 0x100000, CRC(f00be011) SHA1(2721cdba37a511a966a2a53b9bd6240f181d920c) ) /* Plane 0,1 */
1708   ROM_CONTINUE(                  0x600000, 0x100000 )
1729   ROM_CONTINUE( 0x600000, 0x100000 )
17091730   ROM_LOAD16_BYTE( "043-c4.bin", 0x200001, 0x100000, CRC(1887e5c0) SHA1(9b915359add7c10c78d8b281b4084eceea8f0499) ) /* Plane 2,3 */
1710   ROM_CONTINUE(                  0x600001, 0x100000 )
1731   ROM_CONTINUE( 0x600001, 0x100000 )
17111732ROM_END
17121733
17131734ROM_START( aof ) /* MVS AND AES VERSION */
r3426r3427
17271748
17281749   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
17291750   ROM_LOAD16_BYTE( "044-c1.bin", 0x000000, 0x100000, CRC(ddab98a7) SHA1(f20eb81ec431268798c142c482146c1545af1c24) ) /* Plane 0,1 */
1730   ROM_CONTINUE(                0x400000, 0x100000 )
1751   ROM_CONTINUE( 0x400000, 0x100000 )
17311752   ROM_LOAD16_BYTE( "044-c2.bin", 0x000001, 0x100000, CRC(d8ccd575) SHA1(f697263fe92164e274bf34c55327b3d4a158b332) ) /* Plane 2,3 */
1732   ROM_CONTINUE(                0x400001, 0x100000 )
1753   ROM_CONTINUE( 0x400001, 0x100000 )
17331754   ROM_LOAD16_BYTE( "044-c3.bin", 0x200000, 0x100000, CRC(403e898a) SHA1(dd5888f8b24a33b2c1f483316fe80c17849ccfc4) ) /* Plane 0,1 */
1734   ROM_CONTINUE(                0x600000, 0x100000 )
1755   ROM_CONTINUE( 0x600000, 0x100000 )
17351756   ROM_LOAD16_BYTE( "044-c4.bin", 0x200001, 0x100000, CRC(6235fbaa) SHA1(9090e337d7beed25ba81ae0708d0aeb57e6cf405) ) /* Plane 2,3 */
1736   ROM_CONTINUE(                0x600001, 0x100000 )
1757   ROM_CONTINUE( 0x600001, 0x100000 )
17371758ROM_END
17381759
17391760ROM_START( samsho ) /* MVS VERSION */
17401761   ROM_REGION( 0x200000, "main", 0 )
1741   ROM_LOAD16_WORD_SWAP( "045-p1.bin", 0x000000, 0x100000, CRC(dfe51bf0) SHA1(2243af3770a516ae698b69bcd9daf53632d9128d) )
1762   ROM_LOAD16_WORD_SWAP( "045-p1.bin", 0x000000, 0x100000, CRC(dfe51bf0) SHA1(2243af3770a516ae698b69bcd9daf53632d9128d) )
17421763   ROM_LOAD16_WORD_SWAP( "045-pg2.bin", 0x100000, 0x100000, CRC(46745b94) SHA1(d9e959fd1f88c9402915c1d0dcdb4a9e3d49cdcb) )
17431764
17441765   NEO_SFIX_128K( "045-s1.bin", CRC(9142a4d3) SHA1(54088e99fcfd75fd0f94852890a56350066a05a3) )
r3426r3427
18681889
18691890   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
18701891   ROM_LOAD16_BYTE( "047-c1.bin", 0x000000, 0x100000, CRC(f72a939e) SHA1(67fc398ec28061adca0d3be82bbe7297015800da) ) /* Plane 0,1 */
1871   ROM_CONTINUE(                  0x400000, 0x100000 )
1892   ROM_CONTINUE( 0x400000, 0x100000 )
18721893   ROM_LOAD16_BYTE( "047-c2.bin", 0x000001, 0x100000, CRC(05119a0d) SHA1(c2f100b73eb04f65b6ba6089d49aceb51b470ec6) ) /* Plane 2,3 */
1873   ROM_CONTINUE(                  0x400001, 0x100000 )
1894   ROM_CONTINUE( 0x400001, 0x100000 )
18741895   ROM_LOAD16_BYTE( "047-c3.bin", 0x200000, 0x100000, CRC(01e00738) SHA1(79654f24d777dd5eb68bafc3b8cb9db71d5822e2) ) /* Plane 0,1 */
1875   ROM_CONTINUE(                  0x600000, 0x100000 )
1896   ROM_CONTINUE( 0x600000, 0x100000 )
18761897   ROM_LOAD16_BYTE( "047-c4.bin", 0x200001, 0x100000, CRC(9fe27432) SHA1(89d22d77ba8bc6d1f6c974195c34ad61b9010de7) ) /* Plane 2,3 */
1877   ROM_CONTINUE(                  0x600001, 0x100000 )
1898   ROM_CONTINUE( 0x600001, 0x100000 )
18781899ROM_END
18791900
18801901ROM_START( janshin )
r3426r3427
19531974
19541975   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
19551976   ROM_LOAD16_BYTE( "051-c1.bin", 0x000000, 0x100000, CRC(d624c132) SHA1(49c7e9f020cba45d7083b45252bcc03397f8c286) ) /* Plane 0,1 */
1956   ROM_CONTINUE(                  0x400000, 0x100000 )
1977   ROM_CONTINUE( 0x400000, 0x100000 )
19571978   ROM_LOAD16_BYTE( "051-c2.bin", 0x000001, 0x100000, CRC(40d69f1e) SHA1(ec4a13582772594957f927622d50f54b0dfcd8d8) ) /* Plane 2,3 */
1958   ROM_CONTINUE(                  0x400001, 0x100000 )
1979   ROM_CONTINUE( 0x400001, 0x100000 )
19591980ROM_END
19601981
19611982ROM_START( ssideki )
r3426r3427
19731994
19741995   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
19751996   ROM_LOAD16_BYTE( "052-c1.bin", 0x000000, 0x100000, CRC(53e1c002) SHA1(2125b1be379ea7933893ffb1cd65d6c4bf8b03bd) ) /* Plane 0,1 */
1976   ROM_CONTINUE(                  0x400000, 0x100000 )
1997   ROM_CONTINUE( 0x400000, 0x100000 )
19771998   ROM_LOAD16_BYTE( "052-c2.bin", 0x000001, 0x100000, CRC(776a2d1f) SHA1(bca0bac87443e9e78c623d284f6cc96cc9c9098f) ) /* Plane 2,3 */
1978   ROM_CONTINUE(                  0x400001, 0x100000 )
1999   ROM_CONTINUE( 0x400001, 0x100000 )
19792000ROM_END
19802001
19812002ROM_START( wh1 ) /* MVS VERSION */
r3426r3427
19962017
19972018   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
19982019   ROM_LOAD16_BYTE( "053-c1.bin", 0x000000, 0x100000, CRC(85eb5bce) SHA1(3d03d29296ca6e6b5106aac4aaeec9d4b4ed1313) ) /* Plane 0,1 */
1999   ROM_CONTINUE(               0x400000, 0x100000 )
2020   ROM_CONTINUE( 0x400000, 0x100000 )
20002021   ROM_LOAD16_BYTE( "053-c2.bin", 0x000001, 0x100000, CRC(ec93b048) SHA1(d4159210df94e259f874a4671d271ec27be13451) ) /* Plane 2,3 */
2001   ROM_CONTINUE(               0x400001, 0x100000 )
2022   ROM_CONTINUE( 0x400001, 0x100000 )
20022023   ROM_LOAD16_BYTE( "053-c3.bin", 0x200000, 0x100000, CRC(0dd64965) SHA1(e97b3b8a461da5e8861b3dfdacb25e007ced37a1) ) /* Plane 0,1 */
20032024   ROM_LOAD16_BYTE( "053-c4.bin", 0x200001, 0x100000, CRC(9270d954) SHA1(a2ef909868f6b06cdcc22a63ddf6c96be12b999c) ) /* Plane 2,3 */
20042025ROM_END
r3426r3427
20202041
20212042   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
20222043   ROM_LOAD16_BYTE( "053-c1.bin", 0x000000, 0x100000, CRC(85eb5bce) SHA1(3d03d29296ca6e6b5106aac4aaeec9d4b4ed1313) ) /* Plane 0,1 */
2023   ROM_CONTINUE(               0x400000, 0x100000 )
2044   ROM_CONTINUE( 0x400000, 0x100000 )
20242045   ROM_LOAD16_BYTE( "053-c2.bin", 0x000001, 0x100000, CRC(ec93b048) SHA1(d4159210df94e259f874a4671d271ec27be13451) ) /* Plane 2,3 */
2025   ROM_CONTINUE(               0x400001, 0x100000 )
2046   ROM_CONTINUE( 0x400001, 0x100000 )
20262047   ROM_LOAD16_BYTE( "053-c3.bin", 0x200000, 0x100000, CRC(0dd64965) SHA1(e97b3b8a461da5e8861b3dfdacb25e007ced37a1) ) /* Plane 0,1 */
20272048   ROM_LOAD16_BYTE( "053-c4.bin", 0x200001, 0x100000, CRC(9270d954) SHA1(a2ef909868f6b06cdcc22a63ddf6c96be12b999c) ) /* Plane 2,3 */
20282049ROM_END
r3426r3427
20442065
20452066   ROM_REGION( 0x600000, "sprites", ROMREGION_DISPOSE )
20462067   ROM_LOAD16_BYTE( "053-c1.bin", 0x000000, 0x100000, CRC(85eb5bce) SHA1(3d03d29296ca6e6b5106aac4aaeec9d4b4ed1313) ) /* Plane 0,1 */
2047   ROM_CONTINUE(               0x400000, 0x100000 )
2068   ROM_CONTINUE( 0x400000, 0x100000 )
20482069   ROM_LOAD16_BYTE( "053-c2.bin", 0x000001, 0x100000, CRC(ec93b048) SHA1(d4159210df94e259f874a4671d271ec27be13451) ) /* Plane 2,3 */
2049   ROM_CONTINUE(               0x400001, 0x100000 )
2070   ROM_CONTINUE( 0x400001, 0x100000 )
20502071   ROM_LOAD16_BYTE( "053-c3.bin", 0x200000, 0x100000, CRC(0dd64965) SHA1(e97b3b8a461da5e8861b3dfdacb25e007ced37a1) ) /* Plane 0,1 */
20512072   ROM_LOAD16_BYTE( "053-c4.bin", 0x200001, 0x100000, CRC(9270d954) SHA1(a2ef909868f6b06cdcc22a63ddf6c96be12b999c) ) /* Plane 2,3 */
20522073ROM_END
r3426r3427
20542075ROM_START( kof94 )
20552076   ROM_REGION( 0x200000, "main", 0 )
20562077   ROM_LOAD16_WORD_SWAP( "055-p1.bin", 0x100000, 0x100000, CRC(f10a2042) SHA1(d08a3f3c28be4b1793de7d362456281329fe1828) )
2057   ROM_CONTINUE(                  0x000000, 0x100000 )
2078   ROM_CONTINUE( 0x000000, 0x100000 )
20582079
20592080   NEO_SFIX_128K( "055-s1.bin", CRC(825976c1) SHA1(cb6a70bdd95d449d25196ca269b621c362db6743) )
20602081
r3426r3427
21342155ROM_START( wh2 )
21352156   ROM_REGION( 0x200000, "main", 0 )
21362157   ROM_LOAD16_WORD_SWAP( "057-p1.bin", 0x100000, 0x100000, CRC(65a891d9) SHA1(ff8d5ccb0dd22c523902bb3db3c645583a335056) )
2137   ROM_CONTINUE(                  0x000000, 0x100000 )
2158   ROM_CONTINUE( 0x000000, 0x100000 )
21382159
21392160   NEO_SFIX_128K( "057-s1.bin", CRC(fcaeb3a4) SHA1(1f3f85e38b8552333261c04ae5af0d6e3b310622) )
21402161
r3426r3427
22102231ROM_START( savagere )
22112232   ROM_REGION( 0x200000, "main", 0 )
22122233   ROM_LOAD16_WORD_SWAP( "059-p1.bin", 0x100000, 0x100000, CRC(01d4e9c0) SHA1(3179d2be59bf2de6918d506117cff50acf7e09f3) )
2213   ROM_CONTINUE(                  0x000000, 0x100000 )
2234   ROM_CONTINUE( 0x000000, 0x100000 )
22142235
22152236   NEO_SFIX_128K( "059-s1.bin", CRC(e08978ca) SHA1(55152cb9bd0403ae8656b93a6b1522dba5db6d1a) )
22162237
r3426r3427
22432264
22442265   NEO_BIOS_AUDIO_128K( "060-m1.bin", CRC(0b7c4e65) SHA1(999a1e784de18db3f1332b30bc425836ea6970be) )
22452266
2246   ROM_REGION( 0x300000, "ym", 0 )
2267   ROM_REGION( 0x300000, "ym", 0 )
22472268   ROM_LOAD( "060-v1.bin", 0x000000, 0x200000, CRC(f417c215) SHA1(0f53b8dd056f43b5d880628e8b74c2b27881ffac) )
22482269   ROM_LOAD( "060-v2.bin", 0x200000, 0x100000, CRC(efcff7cf) SHA1(e8372303724284a750b706dc6bf7641e4c52bb95) )
22492270
r3426r3427
22672288
22682289   NEO_BIOS_AUDIO_128K( "060-m1.bin", CRC(0b7c4e65) SHA1(999a1e784de18db3f1332b30bc425836ea6970be) )
22692290
2270   ROM_REGION( 0x300000, "ym", 0 )
2291   ROM_REGION( 0x300000, "ym", 0 )
22712292   ROM_LOAD( "060-v1.bin", 0x000000, 0x200000, CRC(f417c215) SHA1(0f53b8dd056f43b5d880628e8b74c2b27881ffac) )
22722293   ROM_LOAD( "060-v2.bin", 0x200000, 0x100000, CRC(efcff7cf) SHA1(e8372303724284a750b706dc6bf7641e4c52bb95) )
22732294
r3426r3427
23292350ROM_START( samsho2 ) /* MVS AND AES VERSION */
23302351   ROM_REGION( 0x200000, "main", 0 )
23312352   ROM_LOAD16_WORD_SWAP( "063-p1.bin", 0x100000, 0x100000, CRC(22368892) SHA1(0997f8284aa0f57a333be8a0fdea777d0d01afd6) )
2332   ROM_CONTINUE(                  0x000000, 0x100000 )
2353   ROM_CONTINUE( 0x000000, 0x100000 )
23332354
23342355   NEO_SFIX_128K( "063-s1.bin", CRC(64a5cd66) SHA1(12cdfb27bf9ccd5a8df6ddd4628ef7cf2c6d4964) )
23352356
r3426r3427
23572378ROM_START( wh2j ) /* MVS VERSION */
23582379   ROM_REGION( 0x200000, "main", 0 )
23592380   ROM_LOAD16_WORD_SWAP( "064-p1.bin", 0x100000, 0x100000, CRC(385a2e86) SHA1(cfde4a1aeae038a3d6ca9946065624f097682d3d) )
2360   ROM_CONTINUE(                  0x000000, 0x100000 )
2381   ROM_CONTINUE( 0x000000, 0x100000 )
23612382
23622383   NEO_SFIX_128K( "064-s1.bin", CRC(2a03998a) SHA1(5e33f469982f12d4622a06d323a345f192bf88e6) )
23632384
r3426r3427
23792400ROM_START( wh2jh ) /* AES VERSION */
23802401   ROM_REGION( 0x200000, "main", 0 )
23812402   ROM_LOAD16_WORD_SWAP( "064-p1.bin", 0x100000, 0x100000, CRC(385a2e86) SHA1(cfde4a1aeae038a3d6ca9946065624f097682d3d) )
2382   ROM_CONTINUE(                  0x000000, 0x100000 )
2403   ROM_CONTINUE( 0x000000, 0x100000 )
23832404
23842405   NEO_SFIX_128K( "064-s1.bin", CRC(2a03998a) SHA1(5e33f469982f12d4622a06d323a345f192bf88e6) )
23852406
r3426r3427
25612582ROM_START( aodk )
25622583   ROM_REGION( 0x200000, "main", 0 )
25632584   ROM_LOAD16_WORD_SWAP( "074-p1.bin", 0x100000, 0x100000, CRC(62369553) SHA1(ca4d561ee08d16fe6804249d1ba49188eb3bd606) )
2564   ROM_CONTINUE(                  0x000000, 0x100000 )
2585   ROM_CONTINUE( 0x000000, 0x100000 )
25652586
25662587   NEO_SFIX_128K( "074-s1.bin", CRC(96148d2b) SHA1(47725a8059346ebe5639bbdbf62a2ac8028756a9) )
25672588
r3426r3427
25872608ROM_START( sonicwi2 )
25882609   ROM_REGION( 0x200000, "main", 0 )
25892610   ROM_LOAD16_WORD_SWAP( "075-p1.bin", 0x100000, 0x100000, CRC(92871738) SHA1(fed040a7c1ff9e495109813a702d09fb1d2ecf3a) )
2590   ROM_CONTINUE(                         0x000000, 0x100000 )
2611   ROM_CONTINUE( 0x000000, 0x100000 )
25912612
25922613   NEO_SFIX_128K( "075-s1.bin", CRC(c9eec367) SHA1(574e1afe7e0d54610c145131106e59ba2894eeb7) )
25932614
r3426r3427
26312652ROM_START( galaxyfg )
26322653   ROM_REGION( 0x200000, "main", 0 )
26332654   ROM_LOAD16_WORD_SWAP( "078-p1.bin", 0x100000, 0x100000, CRC(45906309) SHA1(cdcd96a564acf42e959193e139e149b29c103e25) )
2634   ROM_CONTINUE(                  0x000000, 0x100000 )
2655   ROM_CONTINUE( 0x000000, 0x100000 )
26352656
26362657   NEO_SFIX_128K( "078-s1.bin", CRC(72f8923e) SHA1(da908bffc2b5d8baa2002dbb5bfb3aa17d2472b7) )
26372658
r3426r3427
26922713   NO_DELTAT_REGION
26932714
26942715   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
2695   ROM_LOAD16_BYTE( "080-c1.bin",  0x000000, 0x200000, CRC(ea1d764a) SHA1(78cc1735624c37f90607baa92e110a3c5cc54c6f) ) /* Plane 0,1 */
2696   ROM_LOAD16_BYTE( "080-c2.bin",  0x000001, 0x200000, CRC(d331d4a4) SHA1(94228d13fb1e30973eb54058e697f17456ee16ea) ) /* Plane 2,3 */
2697   ROM_LOAD16_BYTE( "080-c3.bin",  0x400000, 0x200000, CRC(b4851bfe) SHA1(b8286c601de5755c1681ea46e177fc89006fc066) ) /* Plane 0,1 */
2698   ROM_LOAD16_BYTE( "080-c4.bin",  0x400001, 0x200000, CRC(ca6f5460) SHA1(ed36e244c9335f4c0a97c57b7b7f1b849dd3a90d) ) /* Plane 2,3 */
2716   ROM_LOAD16_BYTE( "080-c1.bin", 0x000000, 0x200000, CRC(ea1d764a) SHA1(78cc1735624c37f90607baa92e110a3c5cc54c6f) ) /* Plane 0,1 */
2717   ROM_LOAD16_BYTE( "080-c2.bin", 0x000001, 0x200000, CRC(d331d4a4) SHA1(94228d13fb1e30973eb54058e697f17456ee16ea) ) /* Plane 2,3 */
2718   ROM_LOAD16_BYTE( "080-c3.bin", 0x400000, 0x200000, CRC(b4851bfe) SHA1(b8286c601de5755c1681ea46e177fc89006fc066) ) /* Plane 0,1 */
2719   ROM_LOAD16_BYTE( "080-c4.bin", 0x400001, 0x200000, CRC(ca6f5460) SHA1(ed36e244c9335f4c0a97c57b7b7f1b849dd3a90d) ) /* Plane 2,3 */
26992720ROM_END
27002721
27012722ROM_START( ssideki3 )
27022723   ROM_REGION( 0x200000, "main", 0 )
27032724   ROM_LOAD16_WORD_SWAP( "081-p1.bin", 0x100000, 0x100000, CRC(6bc27a3d) SHA1(94692abe7343f9204a557acae4ab74d0af511ca3) )
2704   ROM_CONTINUE(                  0x000000, 0x100000 )
2725   ROM_CONTINUE( 0x000000, 0x100000 )
27052726
27062727   NEO_SFIX_128K( "081-s1.bin", CRC(7626da34) SHA1(30bad65633d0035fd578323c22cbddb8c9d549a6) )
27072728
r3426r3427
27262747ROM_START( doubledr )
27272748   ROM_REGION( 0x200000, "main", 0 )
27282749   ROM_LOAD16_WORD_SWAP( "082-p1.bin", 0x100000, 0x100000, CRC(34ab832a) SHA1(fbb1bd195f5653f7b9c89648649f838eaf83cbe4) )
2729   ROM_CONTINUE(                  0x000000, 0x100000 )
2750   ROM_CONTINUE( 0x000000, 0x100000 )
27302751
27312752   NEO_SFIX_128K( "082-s1.bin", CRC(bef995c5) SHA1(9c89adbdaa5c1f827632c701688563dac2e482a4) )
27322753
r3426r3427
28012822ROM_START( kof95 )
28022823   ROM_REGION( 0x200000, "main", 0 )
28032824   ROM_LOAD16_WORD_SWAP( "084-p1.bin",0x100000, 0x100000, CRC(2cba2716) SHA1(f6c2d0537c9c3e0938065c65b1797c47198fcff8) )
2804   ROM_CONTINUE(                  0x000000, 0x100000 )
2825   ROM_CONTINUE( 0x000000, 0x100000 )
28052826
28062827   NEO_SFIX_128K( "084-s1.bin", CRC(de716f8a) SHA1(f7386454a943ed5caf625f67ee1d0197b1c6fa13) )
28072828
r3426r3427
28312852   /* There also exists a MVS version with 4x eprom (EP1~EP4); board used is NEO-MVS PROGSM */
28322853   ROM_REGION( 0x200000, "main", 0 )
28332854   ROM_LOAD16_WORD_SWAP( "084-pg1.bin", 0x100000, 0x100000, CRC(5e54cf95) SHA1(41abe2042fdbb1526e92a0789976a9b1ac5e60f0) )
2834   ROM_CONTINUE(                  0x000000, 0x100000 )
2855   ROM_CONTINUE( 0x000000, 0x100000 )
28352856
28362857   NEO_SFIX_128K( "084-s1.bin", CRC(de716f8a) SHA1(f7386454a943ed5caf625f67ee1d0197b1c6fa13) )
28372858
r3426r3427
29612982
29622983ROM_START( stakwin )
29632984   ROM_REGION( 0x200000, "main", 0 )
2964   ROM_LOAD16_WORD_SWAP( "088-p1.bin",  0x100000, 0x100000, CRC(bd5814f6) SHA1(95179a4dee61ae88bb5d9fd74af0c56c8c29f5ea) )
2965   ROM_CONTINUE(                   0x000000, 0x100000)
2985   ROM_LOAD16_WORD_SWAP( "088-p1.bin", 0x100000, 0x100000, CRC(bd5814f6) SHA1(95179a4dee61ae88bb5d9fd74af0c56c8c29f5ea) )
2986   ROM_CONTINUE( 0x000000, 0x100000)
29662987
29672988   NEO_SFIX_128K( "088-s1.bin", CRC(073cb208) SHA1(c5b4697d767575884dd49ae416c1fe4a4a92d3f6) )
29682989
r3426r3427
30093030ROM_START( whp )
30103031   ROM_REGION( 0x200000, "main", 0 )
30113032   ROM_LOAD16_WORD_SWAP( "090-p1.bin", 0x100000, 0x100000, CRC(afaa4702) SHA1(83d122fddf17d4774353abf4a0655f3939f7b752) )
3012   ROM_CONTINUE(                0x000000, 0x100000 )
3033   ROM_CONTINUE( 0x000000, 0x100000 )
30133034
3014   NEO_SFIX_128K( "090-s1.bin", CRC(174a880f) SHA1(c35d315d728d119a6e9aa42e0593937c90897449) )
3035   NEO_SFIX_128K( "090-s1.bin", CRC(174a880f) SHA1(c35d315d728d119a6e9aa42e0593937c90897449) )
30153036
30163037   NEO_BIOS_AUDIO_128K( "090-m1.bin", CRC(28065668) SHA1(0c60d4afa1dccad0135e733104f056be73b54e4e) )
30173038
r3426r3427
30383059ROM_START( kabukikl )
30393060   ROM_REGION( 0x200000, "main", 0 )
30403061   ROM_LOAD16_WORD_SWAP( "092-p1.bin", 0x100000, 0x100000, CRC(28ec9b77) SHA1(7cdc789a99f8127f437d68cbc41278c926be9efd) )
3041   ROM_CONTINUE(                  0x000000, 0x100000 )
3062   ROM_CONTINUE( 0x000000, 0x100000 )
30423063
30433064   NEO_SFIX_128K( "092-s1.bin", CRC(a3d68ee2) SHA1(386f6110a16967a72fbf788f9d968fddcdcd2889) )
30443065
r3426r3427
30833104ROM_START( gowcaizr )
30843105   ROM_REGION( 0x200000, "main", 0 )
30853106   ROM_LOAD16_WORD_SWAP( "094-p1.bin", 0x100000, 0x100000, CRC(33019545) SHA1(213db6c0b7d24b74b809854f9c606dbea1d9ba00) )
3086   ROM_CONTINUE(                  0x000000, 0x100000 )
3107   ROM_CONTINUE( 0x000000, 0x100000 )
30873108
30883109   NEO_SFIX_128K( "094-s1.bin", CRC(2f8748a2) SHA1(5cc723c4284120473d63d8b0c1a3b3be74bdc324) )
30893110
r3426r3427
32233244ROM_START( sonicwi3 )
32243245   ROM_REGION( 0x200000, "main", 0 )
32253246   ROM_LOAD16_WORD_SWAP( "097-p1.bin", 0x100000, 0x100000, CRC(0547121d) SHA1(e0bb6c614f572b74ba9a9f0d3d5b69fbc91ebc52) )
3226   ROM_CONTINUE(                  0x000000, 0x100000 )
3247   ROM_CONTINUE( 0x000000, 0x100000 )
32273248
32283249   NEO_SFIX_128K( "097-s1.bin", CRC(8dd66743) SHA1(39214bb25a1d5b44a8524010be05bf5a0211981f) )
32293250
r3426r3427
32453266ROM_START( turfmast )
32463267   ROM_REGION( 0x200000, "main", 0 )
32473268   ROM_LOAD16_WORD_SWAP( "200-p1.bin",  0x100000, 0x100000, CRC(28c83048) SHA1(e7ef87e1de21d2bb17ef17bb08657e92363f0e9a) )
3248   ROM_CONTINUE(                  0x000000, 0x100000)
3269   ROM_CONTINUE( 0x000000, 0x100000)
32493270
32503271   NEO_SFIX_128K( "200-s1.bin", CRC(9a5402b2) SHA1(ae1a0b5450869d61b2bb23671c744d3dda8769c4) )
32513272
r3426r3427
32673288ROM_START( mslug )
32683289   ROM_REGION( 0x200000, "main", 0 )
32693290   ROM_LOAD16_WORD_SWAP( "201-p1.bin", 0x100000, 0x100000, CRC(08d8daa5) SHA1(b888993dbb7e9f0a28a01d7d2e1da00ef9cf6f38) )
3270   ROM_CONTINUE(                  0x000000, 0x100000 )
3291   ROM_CONTINUE( 0x000000, 0x100000 )
32713292
32723293   NEO_SFIX_128K( "201-s1.bin", CRC(2f55958d) SHA1(550b53628daec9f1e1e11a398854092d90f9505a) )
32733294
r3426r3427
33183339   NO_DELTAT_REGION
33193340
33203341   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
3321   ROM_LOAD16_BYTE( "203-c1.bin",  0x000000, 0x200000, CRC(bba9e8c0) SHA1(db89b7275a59ae6104a8308025c7e142a67b947b) ) /* Plane 0,1 */
3322   ROM_LOAD16_BYTE( "203-c2.bin",  0x000001, 0x200000, CRC(2574be03) SHA1(198cfd697c623022919ae4118928a7fe30cd6c46) ) /* Plane 2,3 */
3342   ROM_LOAD16_BYTE( "203-c1.bin", 0x000000, 0x200000, CRC(bba9e8c0) SHA1(db89b7275a59ae6104a8308025c7e142a67b947b) ) /* Plane 0,1 */
3343   ROM_LOAD16_BYTE( "203-c2.bin", 0x000001, 0x200000, CRC(2574be03) SHA1(198cfd697c623022919ae4118928a7fe30cd6c46) ) /* Plane 2,3 */
33233344ROM_END
33243345
33253346ROM_START( marukodq )
r3426r3427
33643385ROM_START( sdodgeb )
33653386   ROM_REGION( 0x200000, "main", 0 )
33663387   ROM_LOAD16_WORD_SWAP( "208-p1.bin", 0x100000, 0x100000, CRC(127f3d32) SHA1(18e77b79b1197a89371533ef9b1e4d682c44d875) )
3367   ROM_CONTINUE(                  0x000000, 0x100000 )
3388   ROM_CONTINUE( 0x000000, 0x100000 )
33683389
33693390   NEO_SFIX_128K( "208-s1.bin", CRC(64abd6b3) SHA1(0315d724e4d83a44ce84c531ff9b8c398363c039) )
33703391
r3426r3427
33863407ROM_START( goalx3 )
33873408   ROM_REGION( 0x200000, "main", 0 )
33883409   ROM_LOAD16_WORD_SWAP( "209-p1.bin", 0x100000, 0x100000, CRC(2a019a79) SHA1(422a639e74284fef2e53e1b49cf8803b0a7e80c6) )
3389   ROM_CONTINUE(                  0x000000, 0x100000 )
3410   ROM_CONTINUE( 0x000000, 0x100000 )
33903411
33913412   NEO_SFIX_128K( "209-s1.bin", CRC(c0eaad86) SHA1(99412093c9707d51817893971e73fb8469cdc9d0) )
33923413
r3426r3427
34313452ROM_START( overtop )
34323453   ROM_REGION( 0x200000, "main", 0 )
34333454   ROM_LOAD16_WORD_SWAP( "212-p1.bin", 0x100000, 0x100000, CRC(16c063a9) SHA1(5432869f830eed816ee5ed71c7fd39f749d15619) )
3434   ROM_CONTINUE(                0x000000, 0x100000 )
3455   ROM_CONTINUE( 0x000000, 0x100000 )
34353456
3436   NEO_SFIX_128K( "212-s1.bin", CRC(481d3ddc) SHA1(7b0df3fc5b19f282abfd0eb5a4c6ed836a536ece) )
3457   NEO_SFIX_128K( "212-s1.bin", CRC(481d3ddc) SHA1(7b0df3fc5b19f282abfd0eb5a4c6ed836a536ece) )
34373458
34383459   NEO_BIOS_AUDIO_128K( "212-m1.bin", CRC(fcab6191) SHA1(488b8310b0957f0012fe50f73641b606f6ac4a57) )
34393460
r3426r3427
34533474
34543475ROM_START( neodrift )
34553476   ROM_REGION( 0x200000, "main", 0 )
3456   ROM_LOAD16_WORD_SWAP( "213-p1.bin",  0x100000, 0x100000, CRC(e397d798) SHA1(10f459111db4bab7aaa63ca47e83304a84300812) )
3457   ROM_CONTINUE(                   0x000000, 0x100000)
3477   ROM_LOAD16_WORD_SWAP( "213-p1.bin", 0x100000, 0x100000, CRC(e397d798) SHA1(10f459111db4bab7aaa63ca47e83304a84300812) )
3478   ROM_CONTINUE( 0x000000, 0x100000)
34583479
34593480   NEO_SFIX_128K( "213-s1.bin", CRC(b76b61bc) SHA1(5fdb407d16ab9e33c4f26ee09ff70891ae1d2bd0) )
34603481
r3426r3427
35283549ROM_START( ssideki4 )
35293550   ROM_REGION( 0x200000, "main", 0 )
35303551   ROM_LOAD16_WORD_SWAP( "215-p1.bin", 0x100000, 0x100000, CRC(519b4ba3) SHA1(5aa59514b23aa663f2c4014ee94a31e9f59151de) )
3531   ROM_CONTINUE(                  0x000000, 0x100000 )
3552   ROM_CONTINUE( 0x000000, 0x100000 )
35323553
35333554   NEO_SFIX_128K( "215-s1.bin", CRC(f0fe5c36) SHA1(b7badd6d2ac3788ce5cace1fcf5cdad14734e4e6) )
35343555
r3426r3427
35523573ROM_START( kizuna )
35533574   ROM_REGION( 0x200000, "main", 0 )
35543575   ROM_LOAD16_WORD_SWAP( "216-p1.bin", 0x100000, 0x100000, CRC(75d2b3de) SHA1(ee778656c26828935ee2a2bfd0ce5a22aa681c10) )
3555   ROM_CONTINUE(                0x000000, 0x100000 )
3576   ROM_CONTINUE( 0x000000, 0x100000 )
35563577
3557   NEO_SFIX_128K( "216-s1.bin",   CRC(efdc72d7) SHA1(be37cbf1852e2e4c907cc799b754b538544b6703) )
3578   NEO_SFIX_128K( "216-s1.bin", CRC(efdc72d7) SHA1(be37cbf1852e2e4c907cc799b754b538544b6703) )
35583579
35593580   NEO_BIOS_AUDIO_128K( "216-m1.bin", CRC(1b096820) SHA1(72852e78c620038f8dafde5e54e02e418c31be9c) )
35603581
r3426r3427
36083629ROM_START( ragnagrd )
36093630   ROM_REGION( 0x200000, "main", 0 )
36103631   ROM_LOAD16_WORD_SWAP( "218-p1.bin", 0x100000, 0x100000, CRC(ca372303) SHA1(67991e4fef9b36bc7d909810eebb857ac2f906f1) )
3611   ROM_CONTINUE(                  0x000000, 0x100000 )
3632   ROM_CONTINUE( 0x000000, 0x100000 )
36123633
36133634   NEO_SFIX_128K( "218-s1.bin", CRC(7d402f9a) SHA1(59ec29d03e62e7a8bef689a124a9164f43b2ace1) )
36143635
r3426r3427
36343655ROM_START( pgoal )
36353656   ROM_REGION( 0x200000, "main", 0 )
36363657   ROM_LOAD16_WORD_SWAP( "219-p1.bin", 0x100000, 0x100000, CRC(6af0e574) SHA1(c3f0fed0d942e48c99c80b1713f271c033ce0f4f) )
3637   ROM_CONTINUE(                  0x000000, 0x100000 )
3658   ROM_CONTINUE( 0x000000, 0x100000 )
36383659
36393660   NEO_SFIX_128K( "219-s1.bin", CRC(002f3c88) SHA1(a8a5bbc5397c8ae9858e38997ebdc713b7b4f50a) )
36403661
r3426r3427
37273748   ROM_LOAD16_BYTE( "223-c8.bin", 0x1800001, 0x400000, CRC(5ad62102) SHA1(e28cc9840caed2a1a8bd65a03bef05231071040c) ) /* Plane 2,3 */
37283749ROM_END
37293750
3730
37313751ROM_START( twinspri )
37323752   ROM_REGION( 0x400000, "main", 0 )
37333753   ROM_LOAD16_WORD_SWAP( "224-p1.bin", 0x100000, 0x100000, CRC(7697e445) SHA1(5b55ca120f77a931d40719b14e0bfc8cac1d628c) )
3734   ROM_CONTINUE(                  0x000000, 0x100000 )
3754   ROM_CONTINUE( 0x000000, 0x100000 )
37353755
37363756   NEO_SFIX_128K( "224-s1.bin", CRC(eeed5758) SHA1(24e48f396716e145b692468762cf595fb7267873) )
37373757
r3426r3427
37773797ROM_START( stakwin2 )
37783798   ROM_REGION( 0x200000, "main", 0 )
37793799   ROM_LOAD16_WORD_SWAP( "227-p1.bin", 0x100000, 0x100000, CRC(daf101d2) SHA1(96b90f884bae2969ebd8c04aba509928464e2433) )
3780   ROM_CONTINUE(                0x000000, 0x100000 )
3800   ROM_CONTINUE( 0x000000, 0x100000 )
37813801
37823802   NEO_SFIX_128K( "227-s1.bin", CRC(2a8c4462) SHA1(9155fbb5fee6d46a68d17ea780a7a92565f9aa47) )
37833803
r3426r3427
37983818
37993819ROM_START( ghostlop )
38003820   ROM_REGION( 0x200000, "main", 0 )
3801   ROM_LOAD16_WORD_SWAP( "gl-p1.rom", 0x000000, 0x100000, CRC(6033172e) SHA1(f57fb706aa8dd9e5f9e992a5d35c1799578b59f8) )
3821   ROM_LOAD16_WORD_SWAP( "gl-p1.bin", 0x000000, 0x100000, CRC(6033172e) SHA1(f57fb706aa8dd9e5f9e992a5d35c1799578b59f8) )
38023822
3803   NEO_SFIX_128K( "gl-s1.rom", CRC(83c24e81) SHA1(585ef209d8bfc23bdccc1f37d8b764eeedfedc1c) )
3823   NEO_SFIX_128K( "gl-s1.bin", CRC(83c24e81) SHA1(585ef209d8bfc23bdccc1f37d8b764eeedfedc1c) )
38043824
3805   NEO_BIOS_AUDIO_128K( "gl-m1.rom", CRC(fd833b33) SHA1(ab6c218c42cba821654cbdae154efecb69f844f6) )
3825   NEO_BIOS_AUDIO_128K( "gl-m1.bin", CRC(fd833b33) SHA1(ab6c218c42cba821654cbdae154efecb69f844f6) )
38063826
38073827   ROM_REGION( 0x200000, "ym", 0 )
3808   ROM_LOAD( "gl-v1.rom", 0x000000, 0x200000, CRC(c603fce6) SHA1(5a866471d35895b2ae13cbd5d1cb41bf2e72e1b8) )
3828   ROM_LOAD( "gl-v1.bin", 0x000000, 0x200000, CRC(c603fce6) SHA1(5a866471d35895b2ae13cbd5d1cb41bf2e72e1b8) )
38093829
38103830   NO_DELTAT_REGION
38113831
38123832   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
3813   ROM_LOAD16_BYTE( "gl-c1.rom",  0x000000, 0x400000, CRC(bfc99efe) SHA1(5cd2545310142080b8286e787cf5b859f627b3db) ) /* Plane 0,1 */
3814   ROM_LOAD16_BYTE( "gl-c2.rom",  0x000001, 0x400000, CRC(69788082) SHA1(c3ecb42ddcbd9e16d0018a0c3adb56a911d813ca) ) /* Plane 2,3 */
3833   ROM_LOAD16_BYTE( "gl-c1.bin", 0x000000, 0x400000, CRC(bfc99efe) SHA1(5cd2545310142080b8286e787cf5b859f627b3db) ) /* Plane 0,1 */
3834   ROM_LOAD16_BYTE( "gl-c2.bin", 0x000001, 0x400000, CRC(69788082) SHA1(c3ecb42ddcbd9e16d0018a0c3adb56a911d813ca) ) /* Plane 2,3 */
38153835ROM_END
38163836
38173837ROM_START( breakers )
38183838   ROM_REGION( 0x200000, "main", 0 )
38193839   ROM_LOAD16_WORD_SWAP( "230-p1.bin", 0x100000, 0x100000, CRC(ed24a6e6) SHA1(3fb77ae696d92d2f9a5d589e08b708545c7cda0a) )
3820   ROM_CONTINUE(                  0x000000, 0x100000 )
3840   ROM_CONTINUE( 0x000000, 0x100000 )
38213841
38223842   NEO_SFIX_128K( "230-s1.bin", CRC(076fb64c) SHA1(c166038128d7004f69932141f83b320a35c2b4ca) )
38233843
r3426r3427
39063926   ROM_LOAD16_BYTE( "232-c6.bin", 0x2000001, 0x400000, CRC(4ff4d47b) SHA1(4d5689ede24a5fe4330bd85d4d3f4eb2795308bb) ) /* Plane 2,3 */
39073927ROM_END
39083928
3909ROM_START( kof97pls ) /* bootleg */
3910   ROM_REGION( 0x500000, "main", 0 )
3911   ROM_LOAD16_WORD_SWAP( "232-p1p.bin", 0x000000, 0x100000, CRC(c01fda46) SHA1(bc6402f5082efc80a8936364c657165f19b49415) )
3912   ROM_LOAD16_WORD_SWAP( "232-p2p.bin", 0x100000, 0x400000, CRC(5502b020) SHA1(37c48198d8b3798910a44075782cd1a20b687b4a) )
3913
3914   NEO_SFIX_128K( "232-s1p.bin", CRC(73254270) SHA1(8d06305f9d8890da1327356272b88bdd0dc089f5) )
3915
3916   NEO_BIOS_AUDIO_128K( "232-m1.bin", CRC(45348747) SHA1(ed77cbae2b208d1177a9f5f6e8cd57070e90b65b) )
3917
3918   ROM_REGION( 0xc00000, "ym", 0 )
3919   ROM_LOAD( "232-v1.bin", 0x000000, 0x400000, CRC(22a2b5b5) SHA1(ebdbc977332e6d93e266755000b43857e0082965) )
3920   ROM_LOAD( "232-v2.bin", 0x400000, 0x400000, CRC(2304e744) SHA1(98d283e2bcc9291a53f52afd35ef76dfb0828432) )
3921   ROM_LOAD( "232-v3.bin", 0x800000, 0x400000, CRC(759eb954) SHA1(54e77c4e9e6b89458e59824e478ddc33a9c72655) )
3922
3923   NO_DELTAT_REGION
3924
3925   ROM_REGION( 0x2800000, "sprites", ROMREGION_DISPOSE )
3926   ROM_LOAD16_BYTE( "232-c1.bin", 0x0000000, 0x800000, CRC(5f8bf0a1) SHA1(e8b63bbc814de171fd18c5864a7fc639970c1ecf) ) /* Plane 0,1 */
3927   ROM_LOAD16_BYTE( "232-c2.bin", 0x0000001, 0x800000, CRC(e4d45c81) SHA1(fdb2b9326362e27b1c7a5beb977e0bc537488186) ) /* Plane 2,3 */
3928   ROM_LOAD16_BYTE( "232-c3.bin", 0x1000000, 0x800000, CRC(581d6618) SHA1(14d3124a08ded59f86932c6b28e1a4e48c564ccd) ) /* Plane 0,1 */
3929   ROM_LOAD16_BYTE( "232-c4.bin", 0x1000001, 0x800000, CRC(49bb1e68) SHA1(f769c1bd1b019521111ff3f0d22c63cb1f2640ef) ) /* Plane 2,3 */
3930   ROM_LOAD16_BYTE( "232-c5.bin", 0x2000000, 0x400000, CRC(34fc4e51) SHA1(b39c65f27873f71a6f5a5d1d04e5435f874472ee) ) /* Plane 0,1 */
3931   ROM_LOAD16_BYTE( "232-c6.bin", 0x2000001, 0x400000, CRC(4ff4d47b) SHA1(4d5689ede24a5fe4330bd85d4d3f4eb2795308bb) ) /* Plane 2,3 */
3932ROM_END
3933
39343929ROM_START( magdrop3 )
39353930   ROM_REGION( 0x100000, "main", 0 )
39363931   ROM_LOAD16_WORD_SWAP( "233-p1.bin", 0x000000, 0x100000, CRC(931e17fa) SHA1(4a95c4b79d0878485ce272e9f4c4f647bec0e070) )
r3426r3427
42614256   ROM_LOAD16_WORD_SWAP( "241-p1.bin", 0x000000, 0x100000, CRC(2a53c5da) SHA1(5a6aba482cac588a6c2c51179c95b487c6e11899) )
42624257   ROM_LOAD16_WORD_SWAP( "241-p2.bin", 0x100000, 0x200000, CRC(38883f44) SHA1(fcf34b8c6e37774741542393b963635412484a27) )
42634258
4264   NEO_SFIX_128K( "241-s1.bin", CRC(f3d32f0f) SHA1(2dc38b7dfd3ff14f64d5c0733c510b6bb8c692d0) )
4259   NEO_SFIX_128K( "241-s1.bin", CRC(f3d32f0f) SHA1(2dc38b7dfd3ff14f64d5c0733c510b6bb8c692d0) )
42654260
42664261   NEO_BIOS_AUDIO_128K( "241-m1.bin", CRC(94520ebd) SHA1(f8a1551cebcb91e416f30f50581feed7f72899e9) )
42674262
r3426r3427
43834378   NO_DELTAT_REGION
43844379
43854380   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
4386   ROM_LOAD16_BYTE( "243-c1.bin",  0x0000000, 0x800000, CRC(5839444d) SHA1(0616921c4cce20422563578bd0e806d359508599) ) /* Plane 0,1 */
4387   ROM_LOAD16_BYTE( "243-c2.bin",  0x0000001, 0x800000, CRC(dd087428) SHA1(ca27fdb60425664956a18c021ea465f452fb1527) ) /* Plane 2,3 */
4388   ROM_LOAD16_BYTE( "243-c3.bin",  0x1000000, 0x800000, CRC(6054cbe0) SHA1(ec2f65e9c930250ee25fd064ee5ae76a7a9c61d9) ) /* Plane 0,1 */
4389   ROM_LOAD16_BYTE( "243-c4.bin",  0x1000001, 0x800000, CRC(8bd2a9d2) SHA1(0935df65cd2b0891a708bcc0f1c188148058d4b5) ) /* Plane 2,3 */
4390   ROM_LOAD16_BYTE( "243-c5.bin",  0x2000000, 0x800000, CRC(6a503dcf) SHA1(23241b16d7e20f923d41186b29487ab922c7f530) ) /* Plane 0,1 */
4391   ROM_LOAD16_BYTE( "243-c6.bin",  0x2000001, 0x800000, CRC(ec9c36d0) SHA1(e145e9e359000dda6e1dfe95a996bc6d29cfca21) ) /* Plane 2,3 */
4381   ROM_LOAD16_BYTE( "243-c1.bin", 0x0000000, 0x800000, CRC(5839444d) SHA1(0616921c4cce20422563578bd0e806d359508599) ) /* Plane 0,1 */
4382   ROM_LOAD16_BYTE( "243-c2.bin", 0x0000001, 0x800000, CRC(dd087428) SHA1(ca27fdb60425664956a18c021ea465f452fb1527) ) /* Plane 2,3 */
4383   ROM_LOAD16_BYTE( "243-c3.bin", 0x1000000, 0x800000, CRC(6054cbe0) SHA1(ec2f65e9c930250ee25fd064ee5ae76a7a9c61d9) ) /* Plane 0,1 */
4384   ROM_LOAD16_BYTE( "243-c4.bin", 0x1000001, 0x800000, CRC(8bd2a9d2) SHA1(0935df65cd2b0891a708bcc0f1c188148058d4b5) ) /* Plane 2,3 */
4385   ROM_LOAD16_BYTE( "243-c5.bin", 0x2000000, 0x800000, CRC(6a503dcf) SHA1(23241b16d7e20f923d41186b29487ab922c7f530) ) /* Plane 0,1 */
4386   ROM_LOAD16_BYTE( "243-c6.bin", 0x2000001, 0x800000, CRC(ec9c36d0) SHA1(e145e9e359000dda6e1dfe95a996bc6d29cfca21) ) /* Plane 2,3 */
43924387ROM_END
43934388
43944389ROM_START( neocup98 )
43954390   ROM_REGION( 0x200000, "main", 0 )
43964391   ROM_LOAD16_WORD_SWAP( "244-p1.bin", 0x100000, 0x100000, CRC(f8fdb7a5) SHA1(f34ee5d1c24e70427d05ef488f46906dbd9f9950) )
4397   ROM_CONTINUE(                  0x000000, 0x100000 )
4392   ROM_CONTINUE( 0x000000, 0x100000 )
43984393
43994394   NEO_SFIX_128K( "244-s1.bin", CRC(9bddb697) SHA1(2f479bcd5a433201168792a578de3057252d649f) )
44004395
r3426r3427
44144409ROM_START( breakrev )
44154410   ROM_REGION( 0x200000, "main", 0 )
44164411   ROM_LOAD16_WORD_SWAP( "245-p1.bin", 0x100000, 0x100000, CRC(c828876d) SHA1(1dcba850e5cf8219d0945612cfded6d20ca8682a) )
4417   ROM_CONTINUE(                  0x000000, 0x100000 )
4412   ROM_CONTINUE( 0x000000, 0x100000 )
44184413
44194414   NEO_SFIX_128K( "245-s1.bin", CRC(e7660a5d) SHA1(1cd54964ba60b245ea57d9daf0e27b572b815d21) )
44204415
44214416   NEO_BIOS_AUDIO_128K( "245-m1.bin", CRC(00f31c66) SHA1(8488598415c9b74bce00e05b31d96e3d1625c20d) )
44224417
4423   ROM_REGION( 0x800000, "ym", 0 )
4418   ROM_REGION( 0x800000, "ym", 0 )
44244419   ROM_LOAD( "245-v1.bin", 0x000000, 0x400000, CRC(e255446c) SHA1(b3933340d49d4ba581f3bf1af7ad69d786205790) )
44254420   ROM_LOAD( "245-v2.bin", 0x400000, 0x400000, CRC(9068198a) SHA1(71819b0475a5e173a2f9a6e4ff19a94655141c3c) )
44264421
r3426r3427
44314426   ROM_LOAD16_BYTE( "230-c2.bin", 0x0000001, 0x400000, CRC(fdee05cd) SHA1(efc4ffd790953ac7c25d5f045c64a9b49d24b096) ) /* Plane 2,3 */
44324427   ROM_LOAD16_BYTE( "230-c3.bin", 0x0800000, 0x400000, CRC(645077f3) SHA1(0ae74f3b4b3b88f128c6d8c0f35ffa53f5d67ef2) ) /* Plane 0,1 */
44334428   ROM_LOAD16_BYTE( "230-c4.bin", 0x0800001, 0x400000, CRC(63aeb74c) SHA1(9ff6930c0c3d79b46b86356e8565ce4fcd69ac38) ) /* Plane 2,3 */
4434   ROM_LOAD16_BYTE( "245-c5.bin",  0x1000000, 0x200000, CRC(28ff1792) SHA1(0cc5c16ac42f52cee74f88235aef0671bee33b4c) ) /* Plane 0,1 */
4435   ROM_LOAD16_BYTE( "245-c6.bin",  0x1000001, 0x200000, CRC(23c65644) SHA1(9dc74c3075cf0f738b6b41e5e8d89a74a6c9ef07) ) /* Plane 2,3 */
4429   ROM_LOAD16_BYTE( "245-c5.bin", 0x1000000, 0x200000, CRC(28ff1792) SHA1(0cc5c16ac42f52cee74f88235aef0671bee33b4c) ) /* Plane 0,1 */
4430   ROM_LOAD16_BYTE( "245-c6.bin", 0x1000001, 0x200000, CRC(23c65644) SHA1(9dc74c3075cf0f738b6b41e5e8d89a74a6c9ef07) ) /* Plane 2,3 */
44364431ROM_END
44374432
44384433ROM_START( shocktr2 )
r3426r3427
44604455   ROM_LOAD16_BYTE( "246-c6.bin", 0x2000001, 0x800000, CRC(7e2caae1) SHA1(d9de14e3e323664a8c5b7f1df1ba9ec7dd0e6a46) ) /* Plane 2,3 */
44614456ROM_END
44624457
4463ROM_START( lans2004 ) /* Bootleg / Hack of Shock Troopers - 2nd Squad */
4464   ROM_REGION( 0x600000, "main", 0 )
4465   ROM_LOAD16_WORD_SWAP( "lnsq-p1.bin",  0x000000, 0x200000, CRC(b40a879a) SHA1(379f3d44b0bae430b32157fd5f4018d77b243c58) )
4466   ROM_LOAD16_WORD_SWAP( "lnsq-p21.bin", 0x200000, 0x200000, CRC(ecdb2d42) SHA1(0d930cd369dfbcab7778b144355e5f70874aa324) )
4467   ROM_LOAD16_WORD_SWAP( "lnsq-p22.bin", 0x400000, 0x200000, CRC(fac5e2e7) SHA1(5cce7226c137da80c969df00e1cda41ef9c5082c) )
4468
4469   NEO_SFIX_128K( "lnsq-s1.bin", CRC(39e82897) SHA1(24a8c94dd7e70ecde8f90ea17f75b6b5d065704f) )
4470
4471   NEO_BIOS_AUDIO_128K( "246-m1.bin", CRC(d0604ad1) SHA1(fae3cd52a177eadd5f5775ace957cc0f8301e65d) )
4472
4473   ROM_REGION( 0xA00000, "ym", 0 )
4474   ROM_LOAD( "lnsq-v1.bin", 0x000000, 0x400000, CRC(4408ebc3) SHA1(e3f4d8a7e243a8cf48e97d91bbfec7829c0d9404) )
4475   ROM_LOAD( "lnsq-v2.bin", 0x400000, 0x400000, CRC(3d953975) SHA1(6a4ab02ab3d4416a65343cf16815007cb273f19b) )
4476   ROM_LOAD( "lnsq-v3.bin", 0x800000, 0x200000, CRC(437d1d8e) SHA1(95e015c21707b53ed7223eaa19f6cdcfb4d94f0c) )
4477
4478   NO_DELTAT_REGION
4479
4480   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
4481   ROM_LOAD16_BYTE( "lnsq-c1.bin", 0x0000000, 0x800000, CRC(b83de59f) SHA1(8cc060f9a57ab7d4238543b0bce5f5cd1d271d4f) ) /* Plane 0,1 */
4482   ROM_LOAD16_BYTE( "lnsq-c2.bin", 0x0000001, 0x800000, CRC(e08969fd) SHA1(c192639d023cdad64a8f53dbcda02aa8cfb4168e) ) /* Plane 2,3 */
4483   ROM_LOAD16_BYTE( "lnsq-c3.bin", 0x1000000, 0x800000, CRC(013f2cda) SHA1(6261111ce69dc23fbf97241131e5a6a49355d18c) ) /* Plane 0,1 */
4484   ROM_LOAD16_BYTE( "lnsq-c4.bin", 0x1000001, 0x800000, CRC(d8c3a758) SHA1(d19ca3be06f9fb0cb1933b1eb3da318524c3145d) ) /* Plane 2,3 */
4485   ROM_LOAD16_BYTE( "lnsq-c5.bin", 0x2000000, 0x800000, CRC(75500b82) SHA1(06d2afe94ea3eb3c4e523f593b8e709dd7c284a3) ) /* Plane 0,1 */
4486   ROM_LOAD16_BYTE( "lnsq-c6.bin", 0x2000001, 0x800000, CRC(670ac13b) SHA1(f448a144caae51b69ea19e1f43940db135d1164a) ) /* Plane 2,3 */
4487ROM_END
4488
44894458ROM_START( flipshot )
44904459   ROM_REGION( 0x100000, "main", 0 )
44914460   ROM_LOAD16_WORD_SWAP( "247-p1.bin", 0x000000, 0x080000, CRC(d2e7a7e3) SHA1(1ff4f070fcc658bbc7dc69e16c87f82d7392d100) )
r3426r3427
45004469   NO_DELTAT_REGION
45014470
45024471   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
4503   ROM_LOAD16_BYTE( "247-c1.bin",  0x000000, 0x200000, CRC(c9eedcb2) SHA1(7627f2810322c146511525eb70b573a6a5ede926) ) /* Plane 0,1 */
4504   ROM_LOAD16_BYTE( "247-c2.bin",  0x000001, 0x200000, CRC(7d6d6e87) SHA1(6475b58b9f91c20d1f465f3e892de0c68e12a92b) ) /* Plane 2,3 */
4472   ROM_LOAD16_BYTE( "247-c1.bin", 0x000000, 0x200000, CRC(c9eedcb2) SHA1(7627f2810322c146511525eb70b573a6a5ede926) ) /* Plane 0,1 */
4473   ROM_LOAD16_BYTE( "247-c2.bin", 0x000001, 0x200000, CRC(7d6d6e87) SHA1(6475b58b9f91c20d1f465f3e892de0c68e12a92b) ) /* Plane 2,3 */
45054474ROM_END
45064475
45074476ROM_START( pbobbl2n )
r3426r3427
45284497ROM_START( ctomaday )
45294498   ROM_REGION( 0x200000, "main", 0 )
45304499   ROM_LOAD16_WORD_SWAP( "249-p1.bin", 0x100000, 0x100000, CRC(c9386118) SHA1(5554662c7bc8605889cac4a67fee05bbb4eb786f) )
4531   ROM_CONTINUE(                  0x000000, 0x100000 )
4500   ROM_CONTINUE( 0x000000, 0x100000 )
45324501
45334502   NEO_SFIX_128K( "249-s1.bin", CRC(dc9eb372) SHA1(b8aa142243ba303799554479bfc88eb49260f3b1) )
45344503
r3426r3427
45414510   NO_DELTAT_REGION
45424511
45434512   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
4544   ROM_LOAD16_BYTE( "249-c1.bin",  0x000000, 0x400000, CRC(041fb8ee) SHA1(dacc84d713d76818d89a26358374afaa22fa82a2) ) /* Plane 0,1 */
4545   ROM_LOAD16_BYTE( "249-c2.bin",  0x000001, 0x400000, CRC(74f3cdf4) SHA1(55ddabaf77f4d575f4deb24fe63e4bdc2c6f31e1) ) /* Plane 2,3 */
4513   ROM_LOAD16_BYTE( "249-c1.bin", 0x000000, 0x400000, CRC(041fb8ee) SHA1(dacc84d713d76818d89a26358374afaa22fa82a2) ) /* Plane 0,1 */
4514   ROM_LOAD16_BYTE( "249-c2.bin", 0x000001, 0x400000, CRC(74f3cdf4) SHA1(55ddabaf77f4d575f4deb24fe63e4bdc2c6f31e1) ) /* Plane 2,3 */
45464515ROM_END
45474516
45484517ROM_START( mslugx )
r3426r3427
45504519   ROM_LOAD16_WORD_SWAP( "250-p1.bin", 0x000000, 0x100000, CRC(81f1f60b) SHA1(4c19f2e9824e606178ac1c9d4b0516fbaa625035) )
45514520   ROM_LOAD16_WORD_SWAP( "250-p2.bin", 0x100000, 0x400000, CRC(1fda2e12) SHA1(18aaa7a3ba8da99f78c430e9be69ccde04bc04d9) )
45524521
4553   NEO_SFIX_128K( "250-s1.bin", CRC(fb6f441d) SHA1(2cc392ecde5d5afb28ddbaa1030552b48571dcfb) )
4522   NEO_SFIX_128K( "250-s1.bin", CRC(fb6f441d) SHA1(2cc392ecde5d5afb28ddbaa1030552b48571dcfb) )
45544523
45554524   NEO_BIOS_AUDIO_128K( "250-m1.bin", CRC(fd42a842) SHA1(55769bad4860f64ef53a333e0da9e073db483d6a) )
45564525
r3426r3427
45964565
45974566   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
45984567   /* Encrypted */
4599   ROM_LOAD16_BYTE( "251-c1.bin",   0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4600   ROM_LOAD16_BYTE( "251-c2.bin",   0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4601   ROM_LOAD16_BYTE( "251-c3.bin",   0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4602   ROM_LOAD16_BYTE( "251-c4.bin",   0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4603   ROM_LOAD16_BYTE( "251-c5.bin",   0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4604   ROM_LOAD16_BYTE( "251-c6.bin",   0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4605   ROM_LOAD16_BYTE( "251-c7.bin",   0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4606   ROM_LOAD16_BYTE( "251-c8.bin",   0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
4568   ROM_LOAD16_BYTE( "251-c1.bin", 0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4569   ROM_LOAD16_BYTE( "251-c2.bin", 0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4570   ROM_LOAD16_BYTE( "251-c3.bin", 0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4571   ROM_LOAD16_BYTE( "251-c4.bin", 0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4572   ROM_LOAD16_BYTE( "251-c5.bin", 0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4573   ROM_LOAD16_BYTE( "251-c6.bin", 0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4574   ROM_LOAD16_BYTE( "251-c7.bin", 0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4575   ROM_LOAD16_BYTE( "251-c8.bin", 0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
46074576ROM_END
46084577
46094578ROM_START( kof99a ) /* Original Version - Encrypted Code & GFX */ /* MVS VERSION */
46104579   ROM_REGION( 0x900000, "main", 0 )
4611   ROM_LOAD16_WORD_SWAP( "251-sma.ka",  0x0c0000, 0x040000, CRC(7766d09e) SHA1(4e0a49d1ad669a62676cb30f527c6590cde80194) )   /* stored in the custom chip */
4612   ROM_LOAD16_WORD_SWAP( "251-p1.bin",  0x100000, 0x400000, CRC(006e4532) SHA1(47791ab4044ad55988b1d3412d95b65b91a163c8) )
4613   ROM_LOAD16_WORD_SWAP( "251-p2.bin",  0x500000, 0x400000, CRC(90175f15) SHA1(aa9e75810438a8b45808a8bf32cb04d91b5c0b3a) )
4580   ROM_LOAD16_WORD_SWAP( "251-sma.ka", 0x0c0000, 0x040000, CRC(7766d09e) SHA1(4e0a49d1ad669a62676cb30f527c6590cde80194) )   /* stored in the custom chip */
4581   ROM_LOAD16_WORD_SWAP( "251-p1.bin", 0x100000, 0x400000, CRC(006e4532) SHA1(47791ab4044ad55988b1d3412d95b65b91a163c8) )
4582   ROM_LOAD16_WORD_SWAP( "251-p2.bin", 0x500000, 0x400000, CRC(90175f15) SHA1(aa9e75810438a8b45808a8bf32cb04d91b5c0b3a) )
46144583
46154584   ROM_Y_ZOOM
46164585
r3426r3427
46324601
46334602   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
46344603   /* Encrypted */
4635   ROM_LOAD16_BYTE( "251-c1.bin",   0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4636   ROM_LOAD16_BYTE( "251-c2.bin",   0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4637   ROM_LOAD16_BYTE( "251-c3.bin",   0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4638   ROM_LOAD16_BYTE( "251-c4.bin",   0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4639   ROM_LOAD16_BYTE( "251-c5.bin",   0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4640   ROM_LOAD16_BYTE( "251-c6.bin",   0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4641   ROM_LOAD16_BYTE( "251-c7.bin",   0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4642   ROM_LOAD16_BYTE( "251-c8.bin",   0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
4604   ROM_LOAD16_BYTE( "251-c1.bin", 0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4605   ROM_LOAD16_BYTE( "251-c2.bin", 0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4606   ROM_LOAD16_BYTE( "251-c3.bin", 0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4607   ROM_LOAD16_BYTE( "251-c4.bin", 0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4608   ROM_LOAD16_BYTE( "251-c5.bin", 0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4609   ROM_LOAD16_BYTE( "251-c6.bin", 0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4610   ROM_LOAD16_BYTE( "251-c7.bin", 0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4611   ROM_LOAD16_BYTE( "251-c8.bin", 0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
46434612ROM_END
46444613
46454614ROM_START( kof99e ) /* Original Version - Encrypted Code & GFX */
46464615   ROM_REGION( 0x900000, "main", 0 )
4647   ROM_LOAD16_WORD_SWAP( "251-sma.ka",  0x0c0000, 0x040000, CRC(7766d09e) SHA1(4e0a49d1ad669a62676cb30f527c6590cde80194) )   /* stored in the custom chip */
4648   ROM_LOAD16_WORD_SWAP( "251-ep1.p1",  0x100000, 0x200000, CRC(1e8d692d) SHA1(eea1aa8c0a17f089ac14831889c36535e559072c) )
4649   ROM_LOAD16_WORD_SWAP( "251-ep2.p2",  0x300000, 0x200000, CRC(d6206e5a) SHA1(0e1100d03c40c6d5cfa899d009e319ae73fce6b8) )
4650   ROM_LOAD16_WORD_SWAP( "251-ep3.p3",  0x500000, 0x200000, CRC(d58c3ef8) SHA1(f927d90d55b49944f448d6286e0cb913cc70ade1) )
4651   ROM_LOAD16_WORD_SWAP( "251-ep4.p4",  0x700000, 0x200000, CRC(52de02ae) SHA1(f16924ff8eef92da7716236a6a055e22e090a02b) )
4616   ROM_LOAD16_WORD_SWAP( "251-sma.ka", 0x0c0000, 0x040000, CRC(7766d09e) SHA1(4e0a49d1ad669a62676cb30f527c6590cde80194) )   /* stored in the custom chip */
4617   ROM_LOAD16_WORD_SWAP( "251-ep1.p1", 0x100000, 0x200000, CRC(1e8d692d) SHA1(eea1aa8c0a17f089ac14831889c36535e559072c) )
4618   ROM_LOAD16_WORD_SWAP( "251-ep2.p2", 0x300000, 0x200000, CRC(d6206e5a) SHA1(0e1100d03c40c6d5cfa899d009e319ae73fce6b8) )
4619   ROM_LOAD16_WORD_SWAP( "251-ep3.p3", 0x500000, 0x200000, CRC(d58c3ef8) SHA1(f927d90d55b49944f448d6286e0cb913cc70ade1) )
4620   ROM_LOAD16_WORD_SWAP( "251-ep4.p4", 0x700000, 0x200000, CRC(52de02ae) SHA1(f16924ff8eef92da7716236a6a055e22e090a02b) )
46524621
46534622   ROM_Y_ZOOM
46544623
r3426r3427
46704639
46714640   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
46724641   /* Encrypted */
4673   ROM_LOAD16_BYTE( "251-c1.bin",   0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4674   ROM_LOAD16_BYTE( "251-c2.bin",   0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4675   ROM_LOAD16_BYTE( "251-c3.bin",   0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4676   ROM_LOAD16_BYTE( "251-c4.bin",   0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4677   ROM_LOAD16_BYTE( "251-c5.bin",   0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4678   ROM_LOAD16_BYTE( "251-c6.bin",   0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4679   ROM_LOAD16_BYTE( "251-c7.bin",   0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4680   ROM_LOAD16_BYTE( "251-c8.bin",   0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
4642   ROM_LOAD16_BYTE( "251-c1.bin", 0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4643   ROM_LOAD16_BYTE( "251-c2.bin", 0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4644   ROM_LOAD16_BYTE( "251-c3.bin", 0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4645   ROM_LOAD16_BYTE( "251-c4.bin", 0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4646   ROM_LOAD16_BYTE( "251-c5.bin", 0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4647   ROM_LOAD16_BYTE( "251-c6.bin", 0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4648   ROM_LOAD16_BYTE( "251-c7.bin", 0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4649   ROM_LOAD16_BYTE( "251-c8.bin", 0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
46814650ROM_END
46824651
46834652ROM_START( kof99n ) /* Original Version - Encrypted GFX */
r3426r3427
47064675
47074676   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
47084677   /* Encrypted */
4709   ROM_LOAD16_BYTE( "251-c1.bin",   0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4710   ROM_LOAD16_BYTE( "251-c2.bin",   0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4711   ROM_LOAD16_BYTE( "251-c3.bin",   0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4712   ROM_LOAD16_BYTE( "251-c4.bin",   0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4713   ROM_LOAD16_BYTE( "251-c5.bin",   0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4714   ROM_LOAD16_BYTE( "251-c6.bin",   0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4715   ROM_LOAD16_BYTE( "251-c7.bin",   0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4716   ROM_LOAD16_BYTE( "251-c8.bin",   0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
4678   ROM_LOAD16_BYTE( "251-c1.bin", 0x0000000, 0x800000, CRC(0f9e93fe) SHA1(c7d77f0833c6f526f632e4f2dce59e302f6b9a15) ) /* Plane 0,1 */
4679   ROM_LOAD16_BYTE( "251-c2.bin", 0x0000001, 0x800000, CRC(e71e2ea3) SHA1(39c7a326fddbcca3b29c68cdc96aad4d62295c0f) ) /* Plane 2,3 */
4680   ROM_LOAD16_BYTE( "251-c3.bin", 0x1000000, 0x800000, CRC(238755d2) SHA1(01125b5c7a28e350f091280b041954fd1ac7c98f) ) /* Plane 0,1 */
4681   ROM_LOAD16_BYTE( "251-c4.bin", 0x1000001, 0x800000, CRC(438c8b22) SHA1(ffbc643f5b27dd00f2f95d4ef4c5f29ee814722b) ) /* Plane 2,3 */
4682   ROM_LOAD16_BYTE( "251-c5.bin", 0x2000000, 0x800000, CRC(0b0abd0a) SHA1(d5ad324fe523bdc6f09209d236cc4932524a48f1) ) /* Plane 0,1 */
4683   ROM_LOAD16_BYTE( "251-c6.bin", 0x2000001, 0x800000, CRC(65bbf281) SHA1(79ae174667a23dabcfe865b6cd6133c86098452e) ) /* Plane 2,3 */
4684   ROM_LOAD16_BYTE( "251-c7.bin", 0x3000000, 0x800000, CRC(ff65f62e) SHA1(7cd335fede05b56e15db90ce407c1183a78da4e9) ) /* Plane 0,1 */
4685   ROM_LOAD16_BYTE( "251-c8.bin", 0x3000001, 0x800000, CRC(8d921c68) SHA1(42acf1d27d52a8e3b6262eb7df50693c0b135565) ) /* Plane 2,3 */
47174686ROM_END
47184687
47194688ROM_START( kof99p ) /* Prototype Version - Possibly Hacked */
r3426r3427
47504719ROM_START( ganryu ) /* Original Version - Encrypted GFX */
47514720   ROM_REGION( 0x200000, "main", 0 )
47524721   ROM_LOAD16_WORD_SWAP( "252-p1.bin", 0x100000, 0x100000, CRC(4b8ac4fb) SHA1(93d90271bff281862b03beba3809cf95a47a1e44) )
4753   ROM_CONTINUE(                  0x000000, 0x100000 )
4722   ROM_CONTINUE( 0x000000, 0x100000 )
47544723
47554724   ROM_Y_ZOOM
47564725
47574726   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
47584727   ROM_REGION( 0x20000, "fixed", 0 )
4759   ROM_FILL(                 0x000000, 0x20000, 0 )
4728   ROM_FILL( 0x000000, 0x20000, 0 )
47604729   ROM_REGION( 0x20000, "fixedbios", 0 )
47614730   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
47624731
r3426r3427
47854754
47864755   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
47874756   ROM_REGION( 0x80000, "fixed", 0 )   /* larger char set */
4788   ROM_FILL(                 0x000000, 0x20000, 0 )
4757   ROM_FILL( 0x000000, 0x20000, 0 )
47894758   ROM_REGION( 0x20000, "fixedbios", 0 )
47904759   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
47914760
r3426r3427
48214790
48224791   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
48234792   ROM_REGION( 0x80000, "fixed", 0 )   /* larger char set */
4824   ROM_FILL(                 0x000000, 0x20000, 0 )
4793   ROM_FILL( 0x000000, 0x20000, 0 )
48254794   ROM_REGION( 0x20000, "fixedbios", 0 )
48264795   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
48274796
r3426r3427
48754844   ROM_LOAD16_BYTE( "253-c8p.bin", 0x3000001, 0x800000, CRC(f778fe99) SHA1(c963f6ba90a36d02991728b44ffcf174ca18268a) ) /* Plane 2,3 */
48764845ROM_END
48774846
4878ROM_START( garoubl ) /* Bootleg of garoup */
4879   ROM_REGION( 0x500000, "main", 0 )
4880   ROM_LOAD16_WORD_SWAP( "253-p1bl.bin", 0x000000, 0x100000, CRC(fd446d59) SHA1(e37484673a935b2af76c84cd26977c751c0f8cff) )
4881   ROM_LOAD16_WORD_SWAP( "253-p2bl.bin", 0x100000, 0x400000, CRC(3fb10a84) SHA1(4e4a4f4cd7f0ad2520c938c64c8910e6f8805eaf) )
4882
4883   NEO_SFIX_128K( "253-s1bl.bin", CRC(df720e33) SHA1(58d05002d4851682bd626241fa7b70f78f6f3bc8) )
4884
4885   NEO_BIOS_AUDIO_512K( "253-m1bl.bin", CRC(7c51d002) SHA1(01ffba6cbc8da07804f7b21d8c71c39d64a1a4e2) )
4886
4887   ROM_REGION( 0x1000000, "ym", 0 )
4888   ROM_LOAD( "253-v1bl.bin", 0x000000, 0x400000, CRC(98d736e4) SHA1(3edda9a1d45b0e38a85156d24fc8ff2f0011239b) )
4889   ROM_LOAD( "253-v2bl.bin", 0x400000, 0x400000, CRC(eb43c03f) SHA1(83c9c168b154e60a64f1033004b2d33e218bbb8b) )
4890   ROM_LOAD( "253-v3bl.bin", 0x800000, 0x400000, CRC(10a0f814) SHA1(e86def80d6fb2a38ebc9f3338d22f28c15ce85da) )
4891   ROM_LOAD( "253-v4bl.bin", 0xc00000, 0x400000, CRC(8918fdd3) SHA1(60ea2104a0f993341124728d8fde0e8e937c55ef) )
4892
4893   NO_DELTAT_REGION
4894
4895   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
4896   ROM_LOAD16_BYTE( "253-c1bl.bin", 0x0000000, 0x1000000, CRC(e2ac83fa) SHA1(186f88a85d80efbb0371bd42cca152b6b59817fb) ) /* Plane 0,1 */
4897   ROM_LOAD16_BYTE( "253-c2bl.bin", 0x0000001, 0x1000000, CRC(7c344b24) SHA1(f8af62a917e0ce2bf8ae4f17736fdd84d55d0788) ) /* Plane 2,3 */
4898   ROM_LOAD16_BYTE( "253-c3bl.bin", 0x2000000, 0x1000000, CRC(d3aec5a6) SHA1(c1a584909a8a1519f676aa49351742b87c18276d) ) /* Plane 0,1 */
4899   ROM_LOAD16_BYTE( "253-c4bl.bin", 0x2000001, 0x1000000, CRC(e02a242d) SHA1(8a73826d14880303a7bea2a903e842c733178aca) ) /* Plane 2,3 */
4900ROM_END
4901
4902
49034847ROM_START( s1945p ) /* Original Version, Encrypted GFX Roms */
49044848   ROM_REGION( 0x500000, "main", 0 )
49054849   ROM_LOAD16_WORD_SWAP( "254-p1.bin", 0x000000, 0x100000, CRC(ff8efcff) SHA1(dcaeaca573385c172ecc43ee6bee355359091893) )
r3426r3427
49094853
49104854   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
49114855   ROM_REGION( 0x20000, "fixed", 0 )
4912   ROM_FILL(                 0x000000, 0x20000, 0 )
4856   ROM_FILL( 0x000000, 0x20000, 0 )
49134857   ROM_REGION( 0x20000, "fixedbios", 0 )
49144858   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
49154859
r3426r3427
49434887
49444888   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
49454889   ROM_REGION( 0x20000, "fixed", 0 )
4946   ROM_FILL(                 0x000000, 0x20000, 0 )
4890   ROM_FILL( 0x000000, 0x20000, 0 )
49474891   ROM_REGION( 0x20000, "fixedbios", 0 )
49484892   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
49494893
r3426r3427
49574901
49584902   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
49594903   /* Encrypted */
4960   ROM_LOAD16_BYTE( "255-c1.bin",   0x0000000, 0x800000, CRC(ea06000b) SHA1(1539b12e461fa48301190eb8171bbffff9d984b7) ) /* Plane 0,1 */
4961   ROM_LOAD16_BYTE( "255-c2.bin",   0x0000001, 0x800000, CRC(04e67d79) SHA1(aadb6ee750da2c14c6eededa2218db95e051a32c) ) /* Plane 2,3 */
4962   ROM_LOAD16_BYTE( "255-c3.bin",   0x1000000, 0x800000, CRC(60e31e08) SHA1(bd5b81ad9d04cdc4e0df31ac40eca305f98277eb) ) /* Plane 0,1 */
4963   ROM_LOAD16_BYTE( "255-c4.bin",   0x1000001, 0x800000, CRC(40371d69) SHA1(90011ccc5672ff1b90737cf50c963e71b6217ce3) ) /* Plane 2,3 */
4964   ROM_LOAD16_BYTE( "255-c5.bin",   0x2000000, 0x800000, CRC(0b2e6adf) SHA1(15c7d9aa8b1ad9a071e6fd0ef0de8a057c23b02e) ) /* Plane 0,1 */
4965   ROM_LOAD16_BYTE( "255-c6.bin",   0x2000001, 0x800000, CRC(b001bdd3) SHA1(394ba8004644844ee97a120cfda48aeac685af8a) ) /* Plane 2,3 */
4904   ROM_LOAD16_BYTE( "255-c1.bin", 0x0000000, 0x800000, CRC(ea06000b) SHA1(1539b12e461fa48301190eb8171bbffff9d984b7) ) /* Plane 0,1 */
4905   ROM_LOAD16_BYTE( "255-c2.bin", 0x0000001, 0x800000, CRC(04e67d79) SHA1(aadb6ee750da2c14c6eededa2218db95e051a32c) ) /* Plane 2,3 */
4906   ROM_LOAD16_BYTE( "255-c3.bin", 0x1000000, 0x800000, CRC(60e31e08) SHA1(bd5b81ad9d04cdc4e0df31ac40eca305f98277eb) ) /* Plane 0,1 */
4907   ROM_LOAD16_BYTE( "255-c4.bin", 0x1000001, 0x800000, CRC(40371d69) SHA1(90011ccc5672ff1b90737cf50c963e71b6217ce3) ) /* Plane 2,3 */
4908   ROM_LOAD16_BYTE( "255-c5.bin", 0x2000000, 0x800000, CRC(0b2e6adf) SHA1(15c7d9aa8b1ad9a071e6fd0ef0de8a057c23b02e) ) /* Plane 0,1 */
4909   ROM_LOAD16_BYTE( "255-c6.bin", 0x2000001, 0x800000, CRC(b001bdd3) SHA1(394ba8004644844ee97a120cfda48aeac685af8a) ) /* Plane 2,3 */
49664910ROM_END
49674911
49684912ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */
r3426r3427
49754919
49764920   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
49774921   ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
4978   ROM_FILL(                 0x000000, 0x20000, 0 )
4922   ROM_FILL( 0x000000, 0x20000, 0 )
49794923   ROM_REGION( 0x20000, "fixedbios", 0 )
49804924   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
49814925
r3426r3427
49914935
49924936   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
49934937   /* Encrypted */
4994   ROM_LOAD16_BYTE( "256-c1.bin",   0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
4995   ROM_LOAD16_BYTE( "256-c2.bin",   0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
4996   ROM_LOAD16_BYTE( "256-c3.bin",   0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
4997   ROM_LOAD16_BYTE( "256-c4.bin",   0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
4998   ROM_LOAD16_BYTE( "256-c5.bin",   0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
4999   ROM_LOAD16_BYTE( "256-c6.bin",   0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
5000   ROM_LOAD16_BYTE( "256-c7.bin",   0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
5001   ROM_LOAD16_BYTE( "256-c8.bin",   0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
4938   ROM_LOAD16_BYTE( "256-c1.bin", 0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
4939   ROM_LOAD16_BYTE( "256-c2.bin", 0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
4940   ROM_LOAD16_BYTE( "256-c3.bin", 0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
4941   ROM_LOAD16_BYTE( "256-c4.bin", 0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
4942   ROM_LOAD16_BYTE( "256-c5.bin", 0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
4943   ROM_LOAD16_BYTE( "256-c6.bin", 0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
4944   ROM_LOAD16_BYTE( "256-c7.bin", 0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
4945   ROM_LOAD16_BYTE( "256-c8.bin", 0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
50024946ROM_END
50034947
50044948ROM_START( mslug3h ) /* Original Version - Encrypted GFX */ /* AES VERSION */
50054949   ROM_REGION( 0x500000, "main", 0 )
5006   ROM_LOAD16_WORD_SWAP( "256-ph1.bin",  0x000000, 0x100000, CRC(9c42ca85) SHA1(7a8f77a89867b889295ae9b9dfd4ba28f02d234d) )
5007   ROM_LOAD16_WORD_SWAP( "256-ph2.bin",  0x100000, 0x400000, CRC(1f3d8ce8) SHA1(08b05a8abfb86ec09a5e758d6273acf1489961f9) )
4950   ROM_LOAD16_WORD_SWAP( "256-ph1.bin", 0x000000, 0x100000, CRC(9c42ca85) SHA1(7a8f77a89867b889295ae9b9dfd4ba28f02d234d) )
4951   ROM_LOAD16_WORD_SWAP( "256-ph2.bin", 0x100000, 0x400000, CRC(1f3d8ce8) SHA1(08b05a8abfb86ec09a5e758d6273acf1489961f9) )
50084952
50094953   ROM_Y_ZOOM
50104954
50114955   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
50124956   ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
5013   ROM_FILL(                 0x000000, 0x20000, 0 )
4957   ROM_FILL( 0x000000, 0x20000, 0 )
50144958   ROM_REGION( 0x20000, "fixedbios", 0 )
50154959   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
50164960
r3426r3427
50264970
50274971   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
50284972   /* Encrypted */
5029   ROM_LOAD16_BYTE( "256-c1.bin",   0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
5030   ROM_LOAD16_BYTE( "256-c2.bin",   0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
5031   ROM_LOAD16_BYTE( "256-c3.bin",   0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
5032   ROM_LOAD16_BYTE( "256-c4.bin",   0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
5033   ROM_LOAD16_BYTE( "256-c5.bin",   0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
5034   ROM_LOAD16_BYTE( "256-c6.bin",   0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
5035   ROM_LOAD16_BYTE( "256-c7.bin",   0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
5036   ROM_LOAD16_BYTE( "256-c8.bin",   0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
4973   ROM_LOAD16_BYTE( "256-c1.bin", 0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
4974   ROM_LOAD16_BYTE( "256-c2.bin", 0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
4975   ROM_LOAD16_BYTE( "256-c3.bin", 0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
4976   ROM_LOAD16_BYTE( "256-c4.bin", 0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
4977   ROM_LOAD16_BYTE( "256-c5.bin", 0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
4978   ROM_LOAD16_BYTE( "256-c6.bin", 0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
4979   ROM_LOAD16_BYTE( "256-c7.bin", 0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
4980   ROM_LOAD16_BYTE( "256-c8.bin", 0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
50374981ROM_END
50384982
5039
50404983ROM_START( kof2000 ) /* Original Version, Encrypted Code + Sound + GFX Roms */
50414984   ROM_REGION( 0x900000, "main", 0 )
50424985   ROM_LOAD16_WORD_SWAP( "257-sma.bin", 0x0c0000, 0x040000, CRC(71c6e6bb) SHA1(1bd29ded4c6b29780db8e8b772c452189699ca89) )   /* stored in the custom chip */
r3426r3427
50474990
50484991   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
50494992   ROM_REGION( 0x80000, "fixed", 0 )   /* larger char set */
5050   ROM_FILL(                 0x000000, 0x20000, 0 )
4993   ROM_FILL( 0x000000, 0x20000, 0 )
50514994   ROM_REGION( 0x20000, "fixedbios", 0 )
50524995   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
50534996
r3426r3427
50635006   NO_DELTAT_REGION
50645007
50655008   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5066   ROM_LOAD16_BYTE( "257-c1.bin",   0x0000000, 0x800000, CRC(cef1cdfa) SHA1(6135080f3a6b4712b76cc217edcc58e72b55c2b9) ) /* Plane 0,1 */
5067   ROM_LOAD16_BYTE( "257-c2.bin",   0x0000001, 0x800000, CRC(f7bf0003) SHA1(9f7b19a2100cf7d12867e742f440dd5277b4f895) ) /* Plane 2,3 */
5068   ROM_LOAD16_BYTE( "257-c3.bin",   0x1000000, 0x800000, CRC(101e6560) SHA1(8073ae1139e215d1167f8d32c14079a46ce3ee1c) ) /* Plane 0,1 */
5069   ROM_LOAD16_BYTE( "257-c4.bin",   0x1000001, 0x800000, CRC(bd2fc1b1) SHA1(da0006761923ad49b404a08d7a151193ee307a69) ) /* Plane 2,3 */
5070   ROM_LOAD16_BYTE( "257-c5.bin",   0x2000000, 0x800000, CRC(89775412) SHA1(b221b30224bc4239f1b3c2d2fd1cd4fa84e3523c) ) /* Plane 0,1 */
5071   ROM_LOAD16_BYTE( "257-c6.bin",   0x2000001, 0x800000, CRC(fa7200d5) SHA1(6f2b0d38af34e280d56a58955400e5c679906871) ) /* Plane 2,3 */
5072   ROM_LOAD16_BYTE( "257-c7.bin",   0x3000000, 0x800000, CRC(7da11fe4) SHA1(065336cf166807acb6c8569d59d3bf37a19b0a42) ) /* Plane 0,1 */
5073   ROM_LOAD16_BYTE( "257-c8.bin",   0x3000001, 0x800000, CRC(b1afa60b) SHA1(b916184f5cfe4121752270f4f65abf35d8eb0519) ) /* Plane 2,3 */
5009   ROM_LOAD16_BYTE( "257-c1.bin", 0x0000000, 0x800000, CRC(cef1cdfa) SHA1(6135080f3a6b4712b76cc217edcc58e72b55c2b9) ) /* Plane 0,1 */
5010   ROM_LOAD16_BYTE( "257-c2.bin", 0x0000001, 0x800000, CRC(f7bf0003) SHA1(9f7b19a2100cf7d12867e742f440dd5277b4f895) ) /* Plane 2,3 */
5011   ROM_LOAD16_BYTE( "257-c3.bin", 0x1000000, 0x800000, CRC(101e6560) SHA1(8073ae1139e215d1167f8d32c14079a46ce3ee1c) ) /* Plane 0,1 */
5012   ROM_LOAD16_BYTE( "257-c4.bin", 0x1000001, 0x800000, CRC(bd2fc1b1) SHA1(da0006761923ad49b404a08d7a151193ee307a69) ) /* Plane 2,3 */
5013   ROM_LOAD16_BYTE( "257-c5.bin", 0x2000000, 0x800000, CRC(89775412) SHA1(b221b30224bc4239f1b3c2d2fd1cd4fa84e3523c) ) /* Plane 0,1 */
5014   ROM_LOAD16_BYTE( "257-c6.bin", 0x2000001, 0x800000, CRC(fa7200d5) SHA1(6f2b0d38af34e280d56a58955400e5c679906871) ) /* Plane 2,3 */
5015   ROM_LOAD16_BYTE( "257-c7.bin", 0x3000000, 0x800000, CRC(7da11fe4) SHA1(065336cf166807acb6c8569d59d3bf37a19b0a42) ) /* Plane 0,1 */
5016   ROM_LOAD16_BYTE( "257-c8.bin", 0x3000001, 0x800000, CRC(b1afa60b) SHA1(b916184f5cfe4121752270f4f65abf35d8eb0519) ) /* Plane 2,3 */
50745017ROM_END
50755018
50765019ROM_START( kof2000n ) /* Original Version, Encrypted Sound + GFX Roms */
50775020   ROM_REGION( 0x500000, "main", 0 )
5078   ROM_LOAD16_WORD_SWAP( "257-p1n.bin",  0x000000, 0x100000, CRC(5f809dbe) SHA1(2bc233dcff5622de86d01e3b74b840c7caf12982) )
5079   ROM_LOAD16_WORD_SWAP( "257-p2n.bin",  0x100000, 0x400000, CRC(693c2c5e) SHA1(dc9121b7369ef46596343cac055a00aec81704d4) )
5021   ROM_LOAD16_WORD_SWAP( "257-p1n.bin", 0x000000, 0x100000, CRC(5f809dbe) SHA1(2bc233dcff5622de86d01e3b74b840c7caf12982) )
5022   ROM_LOAD16_WORD_SWAP( "257-p2n.bin", 0x100000, 0x400000, CRC(693c2c5e) SHA1(dc9121b7369ef46596343cac055a00aec81704d4) )
50805023
50815024   ROM_Y_ZOOM
50825025
50835026   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
50845027   ROM_REGION( 0x80000, "fixed", 0 )   /* larger char set */
5085   ROM_FILL(                 0x000000, 0x20000, 0 )
5028   ROM_FILL( 0x000000, 0x20000, 0 )
50865029   ROM_REGION( 0x20000, "fixedbios", 0 )
50875030   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
50885031
r3426r3427
50985041   NO_DELTAT_REGION
50995042
51005043   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5101   ROM_LOAD16_BYTE( "257-c1.bin",   0x0000000, 0x800000, CRC(cef1cdfa) SHA1(6135080f3a6b4712b76cc217edcc58e72b55c2b9) ) /* Plane 0,1 */
5102   ROM_LOAD16_BYTE( "257-c2.bin",   0x0000001, 0x800000, CRC(f7bf0003) SHA1(9f7b19a2100cf7d12867e742f440dd5277b4f895) ) /* Plane 2,3 */
5103   ROM_LOAD16_BYTE( "257-c3.bin",   0x1000000, 0x800000, CRC(101e6560) SHA1(8073ae1139e215d1167f8d32c14079a46ce3ee1c) ) /* Plane 0,1 */
5104   ROM_LOAD16_BYTE( "257-c4.bin",   0x1000001, 0x800000, CRC(bd2fc1b1) SHA1(da0006761923ad49b404a08d7a151193ee307a69) ) /* Plane 2,3 */
5105   ROM_LOAD16_BYTE( "257-c5.bin",   0x2000000, 0x800000, CRC(89775412) SHA1(b221b30224bc4239f1b3c2d2fd1cd4fa84e3523c) ) /* Plane 0,1 */
5106   ROM_LOAD16_BYTE( "257-c6.bin",   0x2000001, 0x800000, CRC(fa7200d5) SHA1(6f2b0d38af34e280d56a58955400e5c679906871) ) /* Plane 2,3 */
5107   ROM_LOAD16_BYTE( "257-c7.bin",   0x3000000, 0x800000, CRC(7da11fe4) SHA1(065336cf166807acb6c8569d59d3bf37a19b0a42) ) /* Plane 0,1 */
5108   ROM_LOAD16_BYTE( "257-c8.bin",   0x3000001, 0x800000, CRC(b1afa60b) SHA1(b916184f5cfe4121752270f4f65abf35d8eb0519) ) /* Plane 2,3 */
5044   ROM_LOAD16_BYTE( "257-c1.bin", 0x0000000, 0x800000, CRC(cef1cdfa) SHA1(6135080f3a6b4712b76cc217edcc58e72b55c2b9) ) /* Plane 0,1 */
5045   ROM_LOAD16_BYTE( "257-c2.bin", 0x0000001, 0x800000, CRC(f7bf0003) SHA1(9f7b19a2100cf7d12867e742f440dd5277b4f895) ) /* Plane 2,3 */
5046   ROM_LOAD16_BYTE( "257-c3.bin", 0x1000000, 0x800000, CRC(101e6560) SHA1(8073ae1139e215d1167f8d32c14079a46ce3ee1c) ) /* Plane 0,1 */
5047   ROM_LOAD16_BYTE( "257-c4.bin", 0x1000001, 0x800000, CRC(bd2fc1b1) SHA1(da0006761923ad49b404a08d7a151193ee307a69) ) /* Plane 2,3 */
5048   ROM_LOAD16_BYTE( "257-c5.bin", 0x2000000, 0x800000, CRC(89775412) SHA1(b221b30224bc4239f1b3c2d2fd1cd4fa84e3523c) ) /* Plane 0,1 */
5049   ROM_LOAD16_BYTE( "257-c6.bin", 0x2000001, 0x800000, CRC(fa7200d5) SHA1(6f2b0d38af34e280d56a58955400e5c679906871) ) /* Plane 2,3 */
5050   ROM_LOAD16_BYTE( "257-c7.bin", 0x3000000, 0x800000, CRC(7da11fe4) SHA1(065336cf166807acb6c8569d59d3bf37a19b0a42) ) /* Plane 0,1 */
5051   ROM_LOAD16_BYTE( "257-c8.bin", 0x3000001, 0x800000, CRC(b1afa60b) SHA1(b916184f5cfe4121752270f4f65abf35d8eb0519) ) /* Plane 2,3 */
51095052ROM_END
51105053
51115054ROM_START( bangbead ) /* Original Version - Encrypted GFX */
51125055   ROM_REGION( 0x200000, "main", 0 )
51135056   ROM_LOAD16_WORD_SWAP( "259-p1.bin", 0x100000, 0x100000, CRC(88a37f8b) SHA1(566db84850fad5e8fe822e8bba910a33e083b550) )
5114   ROM_CONTINUE(                       0x000000, 0x100000 )
5057   ROM_CONTINUE( 0x000000, 0x100000 )
51155058
51165059   ROM_Y_ZOOM
51175060
51185061   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
51195062   ROM_REGION( 0x20000, "fixed", 0 )
5120   ROM_FILL(                 0x000000, 0x20000, 0 )
5063   ROM_FILL( 0x000000, 0x20000, 0 )
51215064   ROM_REGION( 0x20000, "fixedbios", 0 )
51225065   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
51235066
r3426r3427
51415084ROM_START( bangbedp )
51425085   ROM_REGION( 0x200000, "main", 0 )
51435086   ROM_LOAD16_WORD_SWAP( "259-p1.bin", 0x100000, 0x100000, CRC(88a37f8b) SHA1(566db84850fad5e8fe822e8bba910a33e083b550) )
5144   ROM_CONTINUE(                       0x000000, 0x100000 )
5087   ROM_CONTINUE( 0x000000, 0x100000 )
51455088
51465089   NEO_SFIX_128K( "259-s1p.bin", CRC(bb50fb2d) SHA1(7372939f328fb5e7d09c16985e09ae8c34702b0c) )
51475090
r3426r3427
51875130   ROM_LOAD16_BYTE( "260-c2.bin", 0x0000001, 0x800000, CRC(d2b04b0d) SHA1(ce4322e6cfacb627fe997efe81018861e21d3c27) ) /* Plane 2,3 */
51885131ROM_END
51895132
5190ROM_START( nitdbl ) /* Bootleg of nitd */
5191   ROM_REGION( 0x100000, "main", 0 )
5192   ROM_LOAD16_WORD_SWAP( "260-p1bl.bin", 0x000000, 0x080000, CRC(1a05bd1b) SHA1(7bbddef842d50b0778711063af695b168a76ff61) )
5193
5194   NEO_SFIX_128K( "260-s1bl.bin", CRC(dd3bf47c) SHA1(881271caee6508b8be51bf1b59c8f1e58e08e551) )
5195
5196   /* Bootleg m1 is 128k, data is identical */
5197   NEO_BIOS_AUDIO_512K( "260-m1.bin", CRC(6407c5e5) SHA1(d273e154cc905b63205a17a1a6d419cac3485a92) )
5198
5199   ROM_REGION( 0x400000, "ym", 0 )
5200   ROM_LOAD( "260-v1bl.bin", 0x000000, 0x200000, CRC(79008868) SHA1(90bd6aaefd37341297ab1f4ae7246e52facd87d0) )
5201   ROM_LOAD( "260-v2bl.bin", 0x200000, 0x200000, CRC(728558F9) SHA1(309aa7c933c199b2e540a601b363e7af8744fe00) )
5202
5203   NO_DELTAT_REGION
5204
5205   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
5206   ROM_LOAD16_BYTE( "260-c1bl.bin", 0x000000, 0x200000, CRC(b4353190) SHA1(90d5352e243a05f5c2be4fa7475667bb56e78016) ) /* Plane 0,1 */
5207   ROM_LOAD16_BYTE( "260-c2bl.bin", 0x000001, 0x200000, CRC(6e27511f) SHA1(1fc5cf7786ad0f0bc7b1623acabe605ad04af3c1) ) /* Plane 2,3 */
5208   ROM_LOAD16_BYTE( "260-c3bl.bin", 0x400000, 0x200000, CRC(472cf075) SHA1(7cdd25019e37a3d127e68a4179c051881df19afa) ) /* Plane 0,1 */
5209   ROM_LOAD16_BYTE( "260-c4bl.bin", 0x400001, 0x200000, CRC(4c3926e6) SHA1(7fc54a9886dbef911f7b226e3cd20081c535e989) ) /* Plane 2,3 */
5210ROM_END
5211
52125133ROM_START( sengoku3 ) /* Original Version - Encrypted GFX */
52135134   ROM_REGION( 0x200000, "main", 0 )
52145135//  ROM_LOAD16_WORD_SWAP( "261-p1.bin", 0x100000, 0x100000, CRC(5b557201) SHA1(d01421d1dc80fe7d2a46b9f79c0f344b3c81c1e7) ) this one is almost certainly bad
52155136   ROM_LOAD16_WORD_SWAP( "261-p1.bin", 0x100000, 0x100000, CRC(e0d4bc0a) SHA1(8df366097f224771ca6d1aa5c1691cd46776cd12) )
5216   ROM_CONTINUE(                       0x000000, 0x100000 )
5137   ROM_CONTINUE( 0x000000, 0x100000 )
52175138
52185139   ROM_Y_ZOOM
52195140
52205141   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
52215142   ROM_REGION( 0x20000, "fixed", 0 )
5222   ROM_FILL(                 0x000000, 0x20000, 0 )
5143   ROM_FILL( 0x000000, 0x20000, 0 )
52235144   ROM_REGION( 0x20000, "fixedbios", 0 )
52245145   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
52255146
r3426r3427
59985919
59995920   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
60005921   ROM_LOAD16_BYTE( "ssv-c1.bin", 0x0000000, 0x1000000, CRC(9c564a01) SHA1(99dc8900fd8f56ae04fff72b34ddcaa8abe4c1be) ) /* Plane 0,1 */
6001   ROM_LOAD16_BYTE( "ssv-c2.bin", 0x0000001, 0x1000000, CRC(4b73b8da) SHA1(a8b626de74cf57bbd8c222e8e24c953c9e8680f4) ) /* Plane 0,1 */
6002   ROM_LOAD16_BYTE( "ssv-c3.bin", 0x2000000, 0x1000000, CRC(029f9bb5) SHA1(6296c879aa0bbd22383ceeeac0326805cbc8b4ec) ) /* Plane 2,3 */
5922   ROM_LOAD16_BYTE( "ssv-c2.bin", 0x0000001, 0x1000000, CRC(4b73b8da) SHA1(a8b626de74cf57bbd8c222e8e24c953c9e8680f4) ) /* Plane 2,3 */
5923   ROM_LOAD16_BYTE( "ssv-c3.bin", 0x2000000, 0x1000000, CRC(029f9bb5) SHA1(6296c879aa0bbd22383ceeeac0326805cbc8b4ec) ) /* Plane 0,1 */
60035924   ROM_LOAD16_BYTE( "ssv-c4.bin", 0x2000001, 0x1000000, CRC(75722430) SHA1(30594c30a167e75463670249df7744755e39e75b) ) /* Plane 2,3 */
60045925ROM_END
60055926
r3426r3427
63256246
63266247ROM_START( vliner )
63276248   ROM_REGION( 0x100000, "main", 0 )
6328   ROM_LOAD16_WORD_SWAP( "vl_p1.rom", 0x000000, 0x080000, CRC(72a2c043) SHA1(b34bcc10ff33e4465126a6865fe8bf6b6a3d6cee) )
6249   ROM_LOAD16_WORD_SWAP( "vl-p1.bin", 0x000000, 0x080000, CRC(72a2c043) SHA1(b34bcc10ff33e4465126a6865fe8bf6b6a3d6cee) )
63296250
6330   NEO_SFIX_128K( "vl_s1.rom", CRC(972d8c31) SHA1(41f09ef28a3791668ea304c74b8b06c117a50e9a) )
6251   NEO_SFIX_128K( "vl-s1.bin", CRC(972d8c31) SHA1(41f09ef28a3791668ea304c74b8b06c117a50e9a) )
63316252
6332   NEO_BIOS_AUDIO_64K( "vl_m1.rom", CRC(9b92b7d1) SHA1(2c9b777feb9a8e43fa1bd942aba5afe3b5427d94) )
6253   NEO_BIOS_AUDIO_64K( "vl-m1.bin", CRC(9b92b7d1) SHA1(2c9b777feb9a8e43fa1bd942aba5afe3b5427d94) )
63336254
63346255   ROM_REGION( 0x200000, "ym", ROMREGION_ERASE00 )
63356256
63366257   NO_DELTAT_REGION
63376258
63386259   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
6339   ROM_LOAD16_BYTE( "vl_c1.rom", 0x000000, 0x80000, CRC(5118f7c0) SHA1(b6fb6e9cbb660580d98e00780ebf248c0995145a) ) /* Plane 0,1 */
6340   ROM_LOAD16_BYTE( "vl_c2.rom", 0x000001, 0x80000, CRC(efe9b33e) SHA1(910c651aadce9bf59e51c338ceef62287756d2e8) ) /* Plane 2,3 */
6260   ROM_LOAD16_BYTE( "vl-c1.bin", 0x000000, 0x80000, CRC(5118f7c0) SHA1(b6fb6e9cbb660580d98e00780ebf248c0995145a) ) /* Plane 0,1 */
6261   ROM_LOAD16_BYTE( "vl-c2.bin", 0x000001, 0x80000, CRC(efe9b33e) SHA1(910c651aadce9bf59e51c338ceef62287756d2e8) ) /* Plane 2,3 */
63416262ROM_END
63426263
63436264ROM_START( vlinero )
63446265   ROM_REGION( 0x100000, "main", 0 )
6345   ROM_LOAD16_WORD_SWAP( "vl_p1_54.rom", 0x000000, 0x080000, CRC(172efc18) SHA1(8ca739f8780a9e6fa19ac2c3e931d75871603f58) )
6266   ROM_LOAD16_WORD_SWAP( "vl-p1_54.bin", 0x000000, 0x080000, CRC(172efc18) SHA1(8ca739f8780a9e6fa19ac2c3e931d75871603f58) )
63466267
6347   NEO_SFIX_128K( "vl_s1.rom", CRC(972d8c31) SHA1(41f09ef28a3791668ea304c74b8b06c117a50e9a) )
6268   NEO_SFIX_128K( "vl-s1.bin", CRC(972d8c31) SHA1(41f09ef28a3791668ea304c74b8b06c117a50e9a) )
63486269
6349   NEO_BIOS_AUDIO_64K( "vl_m1.rom", CRC(9b92b7d1) SHA1(2c9b777feb9a8e43fa1bd942aba5afe3b5427d94) )
6270   NEO_BIOS_AUDIO_64K( "vl-m1.bin", CRC(9b92b7d1) SHA1(2c9b777feb9a8e43fa1bd942aba5afe3b5427d94) )
63506271
63516272   ROM_REGION( 0x200000, "ym", ROMREGION_ERASE00 )
63526273
63536274   NO_DELTAT_REGION
63546275
63556276   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
6356   ROM_LOAD16_BYTE( "vl_c1.rom", 0x000000, 0x80000, CRC(5118f7c0) SHA1(b6fb6e9cbb660580d98e00780ebf248c0995145a) ) /* Plane 0,1 */
6357   ROM_LOAD16_BYTE( "vl_c2.rom", 0x000001, 0x80000, CRC(efe9b33e) SHA1(910c651aadce9bf59e51c338ceef62287756d2e8) ) /* Plane 2,3 */
6277   ROM_LOAD16_BYTE( "vl-c1.bin", 0x000000, 0x80000, CRC(5118f7c0) SHA1(b6fb6e9cbb660580d98e00780ebf248c0995145a) ) /* Plane 0,1 */
6278   ROM_LOAD16_BYTE( "vl-c2.bin", 0x000001, 0x80000, CRC(efe9b33e) SHA1(910c651aadce9bf59e51c338ceef62287756d2e8) ) /* Plane 2,3 */
63586279ROM_END
63596280
6360/* Jamma PCB sets */
63616281
6282   /* Jamma PCB sets */
6283
6284
63626285/******************************************************************************
63636286    The following Jamma PCB boards are known:
63646287
r3426r3427
63766299******************************************************************************/
63776300
63786301
6379/* comlete redump required */
6302/* complete redump required */
63806303ROM_START( ms5pcb ) /* Encrypted Set */
63816304   ROM_REGION( 0x800000, "main", 0 )
63826305   ROM_LOAD32_WORD_SWAP( "268-p1r.bin", 0x000000, 0x400000, NO_DUMP )
r3426r3427
65176440   ROM_LOAD32_WORD( "271-c6.bin", 0x4000002, 0x1000000, CRC(1c40de87) SHA1(8d6425aed43ff6a96c88194e203df6a783286373) ) /* Plane 2,3 */
65186441ROM_END
65196442
6520/* Various Bootlegs */
65216443
6444   /* Bootleg sets */
6445
6446
6447/*
6448    Most bootleg sets are incomplete (missing 'C', 'V' and 'M' roms).
6449    Verification required.
6450
6451*/
6452
6453/* The King of Fighters '97 bootlegs */
6454
6455ROM_START( kof97pls )
6456   ROM_REGION( 0x500000, "main", 0 )
6457   ROM_LOAD16_WORD_SWAP( "kf97-p1p.bin", 0x000000, 0x100000, CRC(c01fda46) SHA1(bc6402f5082efc80a8936364c657165f19b49415) )
6458   ROM_LOAD16_WORD_SWAP( "kf97-p2p.bin", 0x100000, 0x400000, CRC(5502b020) SHA1(37c48198d8b3798910a44075782cd1a20b687b4a) )
6459
6460   NEO_SFIX_128K( "kf97-s1p.bin", CRC(73254270) SHA1(8d06305f9d8890da1327356272b88bdd0dc089f5) )
6461
6462   NEO_BIOS_AUDIO_128K( "232-m1.bin", CRC(45348747) SHA1(ed77cbae2b208d1177a9f5f6e8cd57070e90b65b) )
6463
6464   ROM_REGION( 0xc00000, "ym", 0 )
6465   ROM_LOAD( "232-v1.bin", 0x000000, 0x400000, CRC(22a2b5b5) SHA1(ebdbc977332e6d93e266755000b43857e0082965) )
6466   ROM_LOAD( "232-v2.bin", 0x400000, 0x400000, CRC(2304e744) SHA1(98d283e2bcc9291a53f52afd35ef76dfb0828432) )
6467   ROM_LOAD( "232-v3.bin", 0x800000, 0x400000, CRC(759eb954) SHA1(54e77c4e9e6b89458e59824e478ddc33a9c72655) )
6468
6469   NO_DELTAT_REGION
6470
6471   ROM_REGION( 0x2800000, "sprites", ROMREGION_DISPOSE )
6472   ROM_LOAD16_BYTE( "232-c1.bin", 0x0000000, 0x800000, CRC(5f8bf0a1) SHA1(e8b63bbc814de171fd18c5864a7fc639970c1ecf) ) /* Plane 0,1 */
6473   ROM_LOAD16_BYTE( "232-c2.bin", 0x0000001, 0x800000, CRC(e4d45c81) SHA1(fdb2b9326362e27b1c7a5beb977e0bc537488186) ) /* Plane 2,3 */
6474   ROM_LOAD16_BYTE( "232-c3.bin", 0x1000000, 0x800000, CRC(581d6618) SHA1(14d3124a08ded59f86932c6b28e1a4e48c564ccd) ) /* Plane 0,1 */
6475   ROM_LOAD16_BYTE( "232-c4.bin", 0x1000001, 0x800000, CRC(49bb1e68) SHA1(f769c1bd1b019521111ff3f0d22c63cb1f2640ef) ) /* Plane 2,3 */
6476   ROM_LOAD16_BYTE( "232-c5.bin", 0x2000000, 0x400000, CRC(34fc4e51) SHA1(b39c65f27873f71a6f5a5d1d04e5435f874472ee) ) /* Plane 0,1 */
6477   ROM_LOAD16_BYTE( "232-c6.bin", 0x2000001, 0x400000, CRC(4ff4d47b) SHA1(4d5689ede24a5fe4330bd85d4d3f4eb2795308bb) ) /* Plane 2,3 */
6478ROM_END
6479
65226480ROM_START( kog )
65236481   ROM_REGION( 0x600000, "main", 0 )
65246482   ROM_LOAD16_WORD_SWAP( "5232-p1.bin", 0x000000, 0x200000, CRC(d2413ec6) SHA1(c0bf409d1e714cba5fdc6f79e4c2aec805316634) )
r3426r3427
65426500   ROM_LOAD16_BYTE( "5232-c4.bin",  0x2000001, 0x400000, CRC(d2bd967b) SHA1(c494e0a98e127d37ca360a28accc167fa50fb626) ) /* Plane 2,3 */
65436501ROM_END
65446502
6503/* Shock Troopers - 2nd Squad bootleg */
6504
6505ROM_START( lans2004 )
6506   ROM_REGION( 0x600000, "main", 0 )
6507   ROM_LOAD16_WORD_SWAP( "lnsq-p1.bin",  0x000000, 0x200000, CRC(b40a879a) SHA1(379f3d44b0bae430b32157fd5f4018d77b243c58) )
6508   ROM_LOAD16_WORD_SWAP( "lnsq-p21.bin", 0x200000, 0x200000, CRC(ecdb2d42) SHA1(0d930cd369dfbcab7778b144355e5f70874aa324) )
6509   ROM_LOAD16_WORD_SWAP( "lnsq-p22.bin", 0x400000, 0x200000, CRC(fac5e2e7) SHA1(5cce7226c137da80c969df00e1cda41ef9c5082c) )
6510
6511   NEO_SFIX_128K( "lnsq-s1.bin", CRC(39e82897) SHA1(24a8c94dd7e70ecde8f90ea17f75b6b5d065704f) )
6512
6513   NEO_BIOS_AUDIO_128K( "246-m1.bin", CRC(d0604ad1) SHA1(fae3cd52a177eadd5f5775ace957cc0f8301e65d) )
6514
6515   ROM_REGION( 0xA00000, "ym", 0 )
6516   ROM_LOAD( "lnsq-v1.bin", 0x000000, 0x400000, CRC(4408ebc3) SHA1(e3f4d8a7e243a8cf48e97d91bbfec7829c0d9404) )
6517   ROM_LOAD( "lnsq-v2.bin", 0x400000, 0x400000, CRC(3d953975) SHA1(6a4ab02ab3d4416a65343cf16815007cb273f19b) )
6518   ROM_LOAD( "lnsq-v3.bin", 0x800000, 0x200000, CRC(437d1d8e) SHA1(95e015c21707b53ed7223eaa19f6cdcfb4d94f0c) )
6519
6520   NO_DELTAT_REGION
6521
6522   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
6523   ROM_LOAD16_BYTE( "lnsq-c1.bin", 0x0000000, 0x800000, CRC(b83de59f) SHA1(8cc060f9a57ab7d4238543b0bce5f5cd1d271d4f) ) /* Plane 0,1 */
6524   ROM_LOAD16_BYTE( "lnsq-c2.bin", 0x0000001, 0x800000, CRC(e08969fd) SHA1(c192639d023cdad64a8f53dbcda02aa8cfb4168e) ) /* Plane 2,3 */
6525   ROM_LOAD16_BYTE( "lnsq-c3.bin", 0x1000000, 0x800000, CRC(013f2cda) SHA1(6261111ce69dc23fbf97241131e5a6a49355d18c) ) /* Plane 0,1 */
6526   ROM_LOAD16_BYTE( "lnsq-c4.bin", 0x1000001, 0x800000, CRC(d8c3a758) SHA1(d19ca3be06f9fb0cb1933b1eb3da318524c3145d) ) /* Plane 2,3 */
6527   ROM_LOAD16_BYTE( "lnsq-c5.bin", 0x2000000, 0x800000, CRC(75500b82) SHA1(06d2afe94ea3eb3c4e523f593b8e709dd7c284a3) ) /* Plane 0,1 */
6528   ROM_LOAD16_BYTE( "lnsq-c6.bin", 0x2000001, 0x800000, CRC(670ac13b) SHA1(f448a144caae51b69ea19e1f43940db135d1164a) ) /* Plane 2,3 */
6529ROM_END
6530
6531/* Garou - Mark of the Wolves bootleg */
6532
6533ROM_START( garoubl ) /* bootleg of garoup */
6534   ROM_REGION( 0x500000, "main", 0 )
6535   ROM_LOAD16_WORD_SWAP( "garou-p1.bin", 0x000000, 0x100000, CRC(fd446d59) SHA1(e37484673a935b2af76c84cd26977c751c0f8cff) )
6536   ROM_LOAD16_WORD_SWAP( "garou-p2.bin", 0x100000, 0x400000, CRC(3fb10a84) SHA1(4e4a4f4cd7f0ad2520c938c64c8910e6f8805eaf) )
6537
6538   NEO_SFIX_128K( "garou-s1.bin", CRC(df720e33) SHA1(58d05002d4851682bd626241fa7b70f78f6f3bc8) )
6539
6540   NEO_BIOS_AUDIO_512K( "garou-m1.bin", CRC(7c51d002) SHA1(01ffba6cbc8da07804f7b21d8c71c39d64a1a4e2) )
6541
6542   ROM_REGION( 0x1000000, "ym", 0 )
6543   ROM_LOAD( "garou-v1.bin", 0x000000, 0x400000, CRC(98d736e4) SHA1(3edda9a1d45b0e38a85156d24fc8ff2f0011239b) )
6544   ROM_LOAD( "garou-v2.bin", 0x400000, 0x400000, CRC(eb43c03f) SHA1(83c9c168b154e60a64f1033004b2d33e218bbb8b) )
6545   ROM_LOAD( "garou-v3.bin", 0x800000, 0x400000, CRC(10a0f814) SHA1(e86def80d6fb2a38ebc9f3338d22f28c15ce85da) )
6546   ROM_LOAD( "garou-v4.bin", 0xc00000, 0x400000, CRC(8918fdd3) SHA1(60ea2104a0f993341124728d8fde0e8e937c55ef) )
6547
6548   NO_DELTAT_REGION
6549
6550   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6551   ROM_LOAD16_BYTE( "garou-c1.bin", 0x0000000, 0x1000000, CRC(e2ac83fa) SHA1(186f88a85d80efbb0371bd42cca152b6b59817fb) ) /* Plane 0,1 */
6552   ROM_LOAD16_BYTE( "garou-c2.bin", 0x0000001, 0x1000000, CRC(7c344b24) SHA1(f8af62a917e0ce2bf8ae4f17736fdd84d55d0788) ) /* Plane 2,3 */
6553   ROM_LOAD16_BYTE( "garou-c3.bin", 0x2000000, 0x1000000, CRC(d3aec5a6) SHA1(c1a584909a8a1519f676aa49351742b87c18276d) ) /* Plane 0,1 */
6554   ROM_LOAD16_BYTE( "garou-c4.bin", 0x2000001, 0x1000000, CRC(e02a242d) SHA1(8a73826d14880303a7bea2a903e842c733178aca) ) /* Plane 2,3 */
6555ROM_END
6556
6557/* Metal Slug 3 bootleg */
6558
6559ROM_START( mslug3b6 ) /* This "Metal Slug 6" is a hack/bootleg of Metal Slug 3, the real Metal Slug 6 is on Atomiswave Hardware */
6560   ROM_REGION( 0x500000, "main", 0 )
6561   ROM_LOAD16_WORD_SWAP( "299-p1.bin", 0x000000, 0x200000, CRC(5f2fe228) SHA1(747775a2dfc0da87ad2ddd4f57ce5b2522f23fa5) )
6562   ROM_LOAD16_WORD_SWAP( "299-p2.bin", 0x100000, 0x400000, CRC(193fa835) SHA1(fb1f26db7998b0bb6b1c8b92500c1596ec5dfc71) )
6563
6564   NEO_SFIX_128K( "299-s1.bin", CRC(6f8b9635) SHA1(86b0c8c0ccac913c6192ed6a96c35d4e1a5e8061) )
6565
6566   NEO_BIOS_AUDIO_512K( "256-m1.bin", CRC(eaeec116) SHA1(54419dbb21edc8c4b37eaac2e7ad9496d2de037a) )
6567
6568   ROM_REGION( 0x1000000, "ym", 0 )
6569   ROM_LOAD( "256-v1.bin", 0x000000, 0x400000, CRC(f2690241) SHA1(fd56babc1934d10e0d27c32f032f9edda7ca8ce9) )
6570   ROM_LOAD( "256-v2.bin", 0x400000, 0x400000, CRC(7e2a10bd) SHA1(0d587fb9f64cba0315ce2d8a03e2b8fe34936dff) )
6571   ROM_LOAD( "256-v3.bin", 0x800000, 0x400000, CRC(0eaec17c) SHA1(c3ed613cc6993edd6fc0d62a90bcd85de8e21915) )
6572   ROM_LOAD( "256-v4.bin", 0xc00000, 0x400000, CRC(9b4b22d4) SHA1(9764fbf8453e52f80aa97a46fb9cf5937ef15a31) )
6573
6574   NO_DELTAT_REGION
6575
6576   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6577   /* Encrypted */
6578   ROM_LOAD16_BYTE( "256-c1.bin", 0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
6579   ROM_LOAD16_BYTE( "256-c2.bin", 0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
6580   ROM_LOAD16_BYTE( "256-c3.bin", 0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
6581   ROM_LOAD16_BYTE( "256-c4.bin", 0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
6582   ROM_LOAD16_BYTE( "256-c5.bin", 0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
6583   ROM_LOAD16_BYTE( "256-c6.bin", 0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
6584   ROM_LOAD16_BYTE( "256-c7.bin", 0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
6585   ROM_LOAD16_BYTE( "256-c8.bin", 0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
6586ROM_END
6587
6588/* Nightmare in the Dark bootleg */
6589
6590ROM_START( nitdbl ) /* Bootleg of nitd */
6591   ROM_REGION( 0x100000, "main", 0 )
6592   ROM_LOAD16_WORD_SWAP( "nitd-p1.bin", 0x000000, 0x080000, CRC(1a05bd1b) SHA1(7bbddef842d50b0778711063af695b168a76ff61) )
6593
6594   NEO_SFIX_128K( "nitd-s1.bin", CRC(dd3bf47c) SHA1(881271caee6508b8be51bf1b59c8f1e58e08e551) )
6595
6596   /* Bootleg m1 is 128k, data is identical */
6597   NEO_BIOS_AUDIO_512K( "260-m1.bin", CRC(6407c5e5) SHA1(d273e154cc905b63205a17a1a6d419cac3485a92) )
6598
6599   ROM_REGION( 0x400000, "ym", 0 )
6600   ROM_LOAD( "nitd-v1.bin", 0x000000, 0x200000, CRC(79008868) SHA1(90bd6aaefd37341297ab1f4ae7246e52facd87d0) )
6601   ROM_LOAD( "nitd-v2.bin", 0x200000, 0x200000, CRC(728558F9) SHA1(309aa7c933c199b2e540a601b363e7af8744fe00) )
6602
6603   NO_DELTAT_REGION
6604
6605   ROM_REGION( 0x800000, "sprites", ROMREGION_DISPOSE )
6606   ROM_LOAD16_BYTE( "nitd-c1.bin", 0x000000, 0x200000, CRC(b4353190) SHA1(90d5352e243a05f5c2be4fa7475667bb56e78016) ) /* Plane 0,1 */
6607   ROM_LOAD16_BYTE( "nitd-c2.bin", 0x000001, 0x200000, CRC(6e27511f) SHA1(1fc5cf7786ad0f0bc7b1623acabe605ad04af3c1) ) /* Plane 2,3 */
6608   ROM_LOAD16_BYTE( "nitd-c3.bin", 0x400000, 0x200000, CRC(472cf075) SHA1(7cdd25019e37a3d127e68a4179c051881df19afa) ) /* Plane 0,1 */
6609   ROM_LOAD16_BYTE( "nitd-c4.bin", 0x400001, 0x200000, CRC(4c3926e6) SHA1(7fc54a9886dbef911f7b226e3cd20081c535e989) ) /* Plane 2,3 */
6610ROM_END
6611
6612
65456613ROM_START( cthd2003 ) /* Protected hack/bootleg of kof2001 Phenixsoft */
65466614   ROM_REGION( 0x500000, "main", 0 )
65476615   ROM_LOAD16_WORD_SWAP( "5003-p1.bin", 0x000000, 0x100000, CRC(bb7602c1) SHA1(abf329a40f34c88f7325b255e3bc090db1edaca4) )
r3426r3427
67456813   ROM_LOAD16_WORD_SWAP( "5008-p2.rom", 0x100000, 0x400000, CRC(a649ec38) SHA1(5c63ed5e5c848940f587c966da4908d04cf1293c) )
67466814   ROM_LOAD16_WORD_SWAP( "5008-p3.rom", 0x500000, 0x200000, CRC(e629e13c) SHA1(6ebe080ce01c51064cb2f4d89315ba98a45ae727) )
67476815
6748   ROM_REGION( 0x200000, "audio", 0 )
6816   ROM_REGION( 0x200000, "audiocrypt", 0 )
67496817   ROM_LOAD( "5008-p1.rom", 0x000000, 0x200000, CRC(bf5469ba) SHA1(f05236d8fffab5836c0d27becdeeb80def32ee49) )
67506818
67516819   NEO_SFIX_128K( "5008-s1.rom", CRC(92410064) SHA1(1fb800b46341858207d3b6961a760289fbec7faa) )
67526820
6753   //NEO_BIOS_AUDIO_128K( "5008-m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
6821   NEO_BIOS_AUDIO_128K( "5008-m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
67546822   //NEO_BIOS_AUDIO_128K( "5004-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
67556823
67566824   ROM_REGION( 0x1000000, "ym", 0 )
r3426r3427
67796847ROM_END
67806848
67816849
6782ROM_START( mslug3b6 ) /* This "Metal Slug 6" is a hack/bootleg of Metal Slug 3, the real Metal Slug 6 is on Atomiswave Hardware */
6783   ROM_REGION( 0x500000, "main", 0 )
6784   ROM_LOAD16_WORD_SWAP( "299-p1.bin", 0x000000, 0x200000, CRC(5f2fe228) SHA1(747775a2dfc0da87ad2ddd4f57ce5b2522f23fa5) )
6785   ROM_LOAD16_WORD_SWAP( "299-p2.bin", 0x100000, 0x400000, CRC(193fa835) SHA1(fb1f26db7998b0bb6b1c8b92500c1596ec5dfc71) )
6786
6787   NEO_SFIX_128K( "299-s1.bin", CRC(6f8b9635) SHA1(86b0c8c0ccac913c6192ed6a96c35d4e1a5e8061) )
6788
6789   NEO_BIOS_AUDIO_512K( "256-m1.bin", CRC(eaeec116) SHA1(54419dbb21edc8c4b37eaac2e7ad9496d2de037a) )
6790
6791   ROM_REGION( 0x1000000, "ym", 0 )
6792   ROM_LOAD( "256-v1.bin", 0x000000, 0x400000, CRC(f2690241) SHA1(fd56babc1934d10e0d27c32f032f9edda7ca8ce9) )
6793   ROM_LOAD( "256-v2.bin", 0x400000, 0x400000, CRC(7e2a10bd) SHA1(0d587fb9f64cba0315ce2d8a03e2b8fe34936dff) )
6794   ROM_LOAD( "256-v3.bin", 0x800000, 0x400000, CRC(0eaec17c) SHA1(c3ed613cc6993edd6fc0d62a90bcd85de8e21915) )
6795   ROM_LOAD( "256-v4.bin", 0xc00000, 0x400000, CRC(9b4b22d4) SHA1(9764fbf8453e52f80aa97a46fb9cf5937ef15a31) )
6796
6797   NO_DELTAT_REGION
6798
6799   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6800   /* Encrypted */
6801   ROM_LOAD16_BYTE( "256-c1.bin",   0x0000000, 0x800000, CRC(5a79c34e) SHA1(b8aa51fa50935cae62ab3d125b723ab888691e60) ) /* Plane 0,1 */
6802   ROM_LOAD16_BYTE( "256-c2.bin",   0x0000001, 0x800000, CRC(944c362c) SHA1(3843ab300f956280475469caee70135658f67089) ) /* Plane 2,3 */
6803   ROM_LOAD16_BYTE( "256-c3.bin",   0x1000000, 0x800000, CRC(6e69d36f) SHA1(94e8cf42e999114b4bd8b30e0aa2f365578c4c9a) ) /* Plane 0,1 */
6804   ROM_LOAD16_BYTE( "256-c4.bin",   0x1000001, 0x800000, CRC(b755b4eb) SHA1(804700a0966a48f130c434ede3f970792ea74fa5) ) /* Plane 2,3 */
6805   ROM_LOAD16_BYTE( "256-c5.bin",   0x2000000, 0x800000, CRC(7aacab47) SHA1(312c1c9846175fe1a3cad51d5ae230cf674fc93d) ) /* Plane 0,1 */
6806   ROM_LOAD16_BYTE( "256-c6.bin",   0x2000001, 0x800000, CRC(c698fd5d) SHA1(16818883b06849ba2f8d61bdd5e21aaf99bd8408) ) /* Plane 2,3 */
6807   ROM_LOAD16_BYTE( "256-c7.bin",   0x3000000, 0x800000, CRC(cfceddd2) SHA1(7def666adf8bd1703f40c61f182fc040b6362dc9) ) /* Plane 0,1 */
6808   ROM_LOAD16_BYTE( "256-c8.bin",   0x3000001, 0x800000, CRC(4d9be34c) SHA1(a737bdfa2b815aea7067e7af2636e83a9409c414) ) /* Plane 2,3 */
6809ROM_END
6810
68116850ROM_START( diggerma ) /* Unlicensed Prototype, no official game ID # */
68126851   ROM_REGION( 0x100000, "main", 0 )
6813   ROM_LOAD16_WORD_SWAP( "dig_p1.rom", 0x000000, 0x080000, CRC(eda433d7) SHA1(abb14c66777ab0fe4ac76a402e253a49df7178d8) )
6852   ROM_LOAD16_WORD_SWAP( "dig-p1.bin", 0x000000, 0x080000, CRC(eda433d7) SHA1(abb14c66777ab0fe4ac76a402e253a49df7178d8) )
68146853
6815   NEO_SFIX_64K( "dig_s1.rom", CRC(75a88c1f) SHA1(295dd9225f1e3d2fc64a65b3c287c7f1765417b1) )
6854   NEO_SFIX_64K( "dig-s1.bin", CRC(75a88c1f) SHA1(295dd9225f1e3d2fc64a65b3c287c7f1765417b1) )
68166855
6817   NEO_BIOS_AUDIO_64K( "dig_m1.rom", CRC(833cdf1b) SHA1(3a92c79adbe0d37956ea46a4746d6f1cbf7d2c14) )
6856   NEO_BIOS_AUDIO_64K( "dig-m1.bin", CRC(833cdf1b) SHA1(3a92c79adbe0d37956ea46a4746d6f1cbf7d2c14) )
68186857
68196858   ROM_REGION( 0x200000, "ym", 0 )
6820   ROM_LOAD( "dig_v1.rom", 0x000000, 0x080000, CRC(ee15bda4) SHA1(fe2206728e6efd02d6302869a98b196eb19a17df) )
6859   ROM_LOAD( "dig-v1.bin", 0x000000, 0x080000, CRC(ee15bda4) SHA1(fe2206728e6efd02d6302869a98b196eb19a17df) )
68216860
68226861   NO_DELTAT_REGION
68236862
68246863   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
6825   ROM_LOAD16_BYTE( "dig_c1.rom", 0x000000, 0x080000, CRC(3db0a4ed) SHA1(6214faa883d97ea05809b6af7e0c85a236a18a28) ) /* Plane 0,1 */
6826   ROM_LOAD16_BYTE( "dig_c2.rom", 0x000001, 0x080000, CRC(3e632161) SHA1(83711c4286fb1d9f3f91414ac6e5fed36618033e) ) /* Plane 2,3 */
6864   ROM_LOAD16_BYTE( "dig-c1.bin", 0x000000, 0x080000, CRC(3db0a4ed) SHA1(6214faa883d97ea05809b6af7e0c85a236a18a28) ) /* Plane 0,1 */
6865   ROM_LOAD16_BYTE( "dig-c2.bin", 0x000001, 0x080000, CRC(3e632161) SHA1(83711c4286fb1d9f3f91414ac6e5fed36618033e) ) /* Plane 2,3 */
68276866ROM_END
68286867
68296868
r3426r3427
68566895ROM_END
68576896
68586897
6859
68606898static DRIVER_INIT( fatfury2 )
68616899{
68626900   DRIVER_INIT_CALL(neogeo);
r3426r3427
68646902   fatfury2_install_protection(machine);
68656903}
68666904
6905static DRIVER_INIT ( kof98 )
6906{
6907   kof98_decrypt_68k(machine);
6908   DRIVER_INIT_CALL(neogeo);
6909   install_kof98_protection(machine);
6910}
6911
68676912static DRIVER_INIT( mslugx )
68686913{
68696914   DRIVER_INIT_CALL(neogeo);
r3426r3427
68796924   kof99_install_protection(machine);
68806925}
68816926
6927static DRIVER_INIT( kof99n )
6928{
6929   neogeo_fixed_layer_bank_type = 1;
6930   kof99_neogeo_gfx_decrypt(machine, 0x00);
6931   DRIVER_INIT_CALL(neogeo);
6932}
6933
68826934static DRIVER_INIT( garou )
68836935{
68846936   garou_decrypt_68k(machine);
r3426r3427
69136965   mslug3_install_protection(machine);
69146966}
69156967
6968static DRIVER_INIT( mslug3h )
6969{
6970   neogeo_fixed_layer_bank_type = 1;
6971   kof99_neogeo_gfx_decrypt(machine, 0xad);
6972   DRIVER_INIT_CALL(neogeo);
6973}
6974
6975static DRIVER_INIT( mslug3b6 )
6976{
6977   neogeo_bootleg_sx_decrypt(machine, 2);
6978   cmc42_neogeo_gfx_decrypt(machine, 0xad);
6979   DRIVER_INIT_CALL(neogeo);
6980}
6981
69166982static DRIVER_INIT( kof2000 )
69176983{
69186984   kof2000_decrypt_68k(machine);
69196985   neogeo_fixed_layer_bank_type = 2;
69206986   neogeo_cmc50_m1_decrypt(machine);
69216987   kof2000_neogeo_gfx_decrypt(machine, 0x00);
6922
69236988   DRIVER_INIT_CALL(neogeo);
69246989   kof2000_install_protection(machine);
69256990}
69266991
6992static DRIVER_INIT( kof2000n )
6993{
6994   neogeo_fixed_layer_bank_type = 2;
6995   neogeo_cmc50_m1_decrypt(machine);
6996   kof2000_neogeo_gfx_decrypt(machine, 0x00);
6997   DRIVER_INIT_CALL(neogeo);
6998}
6999
69277000static DRIVER_INIT( kof2001 )
69287001{
7002   neogeo_fixed_layer_bank_type = 1;
7003   kof2000_neogeo_gfx_decrypt(machine, 0x1e);
69297004   neogeo_cmc50_m1_decrypt(machine);
6930   kof2000_neogeo_gfx_decrypt(machine, 0x1e);
7005   DRIVER_INIT_CALL(neogeo);
7006}
69317007
7008static DRIVER_INIT( cthd2003 )
7009{
7010   decrypt_cthd2003(machine);
7011    DRIVER_INIT_CALL(neogeo);
7012   patch_cthd2003(machine);
7013}
7014
7015static DRIVER_INIT ( ct2k3sp )
7016{
7017   decrypt_ct2k3sp(machine);
69327018   DRIVER_INIT_CALL(neogeo);
7019   patch_cthd2003(machine);
69337020}
69347021
7022static DRIVER_INIT ( ct2k3sa )
7023{
7024   decrypt_ct2k3sa(machine);
7025   DRIVER_INIT_CALL(neogeo);
7026   patch_ct2k3sa(machine);
7027}
7028
69357029static DRIVER_INIT( mslug4 )
69367030{
69377031   neogeo_fixed_layer_bank_type = 1; /* USA violent content screen is wrong -- not a bug, confirmed on real hardware! */
r3426r3427
69417035   neo_pcm2_snk_1999(machine, 8);
69427036}
69437037
6944static DRIVER_INIT( kof99n )
6945{
6946   neogeo_fixed_layer_bank_type = 1;
6947   kof99_neogeo_gfx_decrypt(machine, 0x00);
6948   DRIVER_INIT_CALL(neogeo);
6949}
6950
69517038static DRIVER_INIT( ganryu )
69527039{
69537040   neogeo_fixed_layer_bank_type = 1;
r3426r3427
69697056   DRIVER_INIT_CALL(neogeo);
69707057}
69717058
6972static DRIVER_INIT( mslug3h )
6973{
6974   neogeo_fixed_layer_bank_type = 1;
6975   kof99_neogeo_gfx_decrypt(machine, 0xad);
6976   DRIVER_INIT_CALL(neogeo);
6977}
6978
6979static DRIVER_INIT( kof2000n )
6980{
6981   neogeo_fixed_layer_bank_type = 2;
6982   neogeo_cmc50_m1_decrypt(machine);
6983   kof2000_neogeo_gfx_decrypt(machine, 0x00);
6984
6985   DRIVER_INIT_CALL(neogeo);
6986}
6987
69887059static DRIVER_INIT( bangbead )
69897060{
69907061   neogeo_fixed_layer_bank_type = 1;
r3426r3427
70137084   DRIVER_INIT_CALL(neogeo);
70147085}
70157086
7016static DRIVER_INIT ( kof98 )
7017{
7018   kof98_decrypt_68k(machine);
7019   DRIVER_INIT_CALL(neogeo);
7020   install_kof98_protection(machine);
7021}
7022
70237087static DRIVER_INIT( rotd )
70247088{
70257089   neo_pcm2_snk_1999(machine, 16);
r3426r3427
70297093   DRIVER_INIT_CALL(neogeo);
70307094}
70317095
7032
70337096static DRIVER_INIT( kof2002 )
70347097{
70357098   kof2002_decrypt_68k(machine);
r3426r3427
70657128   DRIVER_INIT_CALL(neogeo);
70667129}
70677130
7131static DRIVER_INIT( kof10th )
7132{
7133   decrypt_kof10th(machine);
7134   DRIVER_INIT_CALL(neogeo);
7135   install_kof10th_protection(machine);
7136}
7137
7138static DRIVER_INIT( kf10thep )
7139{
7140   decrypt_kf10thep(machine);
7141   DRIVER_INIT_CALL(neogeo);
7142}
7143
7144static DRIVER_INIT( kf2k5uni )
7145{
7146   decrypt_kf2k5uni(machine);
7147   DRIVER_INIT_CALL(neogeo);
7148}
7149
7150static DRIVER_INIT( kof2k4se )
7151{
7152   decrypt_kof2k4se_68k(machine);
7153   DRIVER_INIT_CALL(neogeo);
7154}
7155
70687156static DRIVER_INIT( matrim )
70697157{
70707158   matrim_decrypt_68k(machine);
r3426r3427
70727160   neogeo_fixed_layer_bank_type = 2;
70737161   neogeo_cmc50_m1_decrypt(machine);
70747162   kof2000_neogeo_gfx_decrypt(machine, 0x6a);
7075
70767163   DRIVER_INIT_CALL(neogeo);
70777164}
70787165
r3426r3427
70827169   neogeo_fixed_layer_bank_type = 1;
70837170   neogeo_cmc50_m1_decrypt(machine);
70847171   kof2000_neogeo_gfx_decrypt(machine, 0x2e);
7085
70867172   DRIVER_INIT_CALL(neogeo);
70877173}
70887174
r3426r3427
70937179   neogeo_fixed_layer_bank_type = 1;
70947180   neogeo_cmc50_m1_decrypt(machine);
70957181   kof2000_neogeo_gfx_decrypt(machine, 0x19);
7096
7097
70987182   DRIVER_INIT_CALL(neogeo);
70997183   install_pvc_protection(machine);
71007184}
r3426r3427
71157199   svcpcb_gfx_decrypt(machine);
71167200   neogeo_cmc50_m1_decrypt(machine);
71177201   kof2000_neogeo_gfx_decrypt(machine, 0x19);
7118
71197202   neogeo_fixed_layer_bank_type = 2;
71207203   svcpcb_s1data_decrypt(machine);
71217204   neo_pcm2_swap(machine, 2);
r3426r3427
71277210{
71287211   cmc50_neogeo_gfx_decrypt(machine, 0x19);
71297212   neo_pcm2_swap(machine, 2);
7130   //decrypt_ms5plus_s1();
71317213   neogeo_bootleg_sx_decrypt(machine, 1);
71327214   neogeo_fixed_layer_bank_type = 1;
71337215   DRIVER_INIT_CALL(neogeo);
71347216   install_ms5plus_protection(machine);
71357217}
71367218
7137
71387219static TIMER_CALLBACK( svcpcb_bios_timer_callback )
71397220{
71407221   int harddip3 = input_port_read(machine, "HARDDIP") & 1;
r3426r3427
71477228   timer_set(attotime_zero, NULL, 0, svcpcb_bios_timer_callback);
71487229   timer_pulse(ATTOTIME_IN_MSEC(1000), NULL, 0, svcpcb_bios_timer_callback);
71497230
7150   svcchaos_px_decrypt(machine);
7231   svc_px_decrypt(machine);
71517232   svcpcb_gfx_decrypt(machine);
71527233   neogeo_cmc50_m1_decrypt(machine);
71537234   kof2000_neogeo_gfx_decrypt(machine, 0x57);
7154
71557235   svcpcb_s1data_decrypt(machine);
71567236   neo_pcm2_swap(machine, 3);
71577237   neogeo_fixed_layer_bank_type = 2;
r3426r3427
71617241
71627242static DRIVER_INIT( svc )
71637243{
7164   svcchaos_px_decrypt(machine);
7244   svc_px_decrypt(machine);
71657245   neo_pcm2_swap(machine, 3);
71667246   neogeo_fixed_layer_bank_type = 2;
71677247   neogeo_cmc50_m1_decrypt(machine);
71687248   kof2000_neogeo_gfx_decrypt(machine, 0x57);
7169
7170
71717249   DRIVER_INIT_CALL(neogeo);
71727250   install_pvc_protection(machine);
71737251}
r3426r3427
71847262{
71857263   svcplus_px_decrypt(machine);
71867264   svcboot_cx_decrypt(machine);
7187   //svcplus_sx_decrypt(machine);
71887265   neogeo_bootleg_sx_decrypt(machine, 1);
71897266   svcplus_px_hack(machine);
71907267   DRIVER_INIT_CALL(neogeo);
r3426r3427
72017278static DRIVER_INIT( svcsplus )
72027279{
72037280   svcsplus_px_decrypt(machine);
7204   //svcsplus_sx_decrypt(machine);
72057281   neogeo_bootleg_sx_decrypt(machine, 2);
72067282   svcboot_cx_decrypt(machine);
72077283   svcsplus_px_hack(machine);
r3426r3427
72167292   neogeo_fixed_layer_bank_type = 1;
72177293   neogeo_cmc50_m1_decrypt(machine);
72187294   kof2000_neogeo_gfx_decrypt(machine, 0x0f);
7219
72207295   DRIVER_INIT_CALL(neogeo);
72217296}
72227297
72237298static DRIVER_INIT( samsho5b )
72247299{
7225   samsh5bl_px_decrypt(machine);
7226   samsh5bl_vx_decrypt(machine);
7300   samsho5b_px_decrypt(machine);
7301   samsho5b_vx_decrypt(machine);
72277302   neogeo_bootleg_sx_decrypt(machine, 1);
72287303   neogeo_bootleg_cx_decrypt(machine);
72297304   DRIVER_INIT_CALL(neogeo);
r3426r3427
72347309   kf2k3pcb_decrypt_68k(machine);
72357310   kf2k3pcb_gfx_decrypt(machine);
72367311   kof2003biosdecode(machine);
7237
72387312   neogeo_cmc50_m1_decrypt(machine);
72397313
72407314   /* extra little swap on the m1 - this must be performed AFTER the m1 decrypt
r3426r3427
72527326
72537327   kof2000_neogeo_gfx_decrypt(machine, 0x9d);
72547328   kf2k3pcb_decrypt_s1data(machine);
7255
72567329   neo_pcm2_swap(machine, 5);
72577330   neogeo_fixed_layer_bank_type = 2;
72587331   DRIVER_INIT_CALL(neogeo);
r3426r3427
72607333   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc00000, 0xc7ffff, 0, 0, SMH_BANK6 );  // 512k bios
72617334}
72627335
7263
72647336static DRIVER_INIT( kof2003 )
72657337{
72667338   kof2003_decrypt_68k(machine);
r3426r3427
73007372   kf2k3pl_install_protection(machine);
73017373}
73027374
7303
73047375static DRIVER_INIT( kof2k3up )
73057376{
73067377   kof2k3up_px_decrypt(machine);
r3426r3427
73107381   kof2k3up_install_protection(machine);
73117382}
73127383
7313
7314
73157384static DRIVER_INIT( samsh5sp )
73167385{
7317   samsh5p_decrypt_68k(machine);
7386   samsh5sp_decrypt_68k(machine);
73187387   neo_pcm2_swap(machine, 6);
73197388   neogeo_fixed_layer_bank_type = 1;
73207389   neogeo_cmc50_m1_decrypt(machine);
73217390   kof2000_neogeo_gfx_decrypt(machine, 0x0d);
7322
7323
73247391   DRIVER_INIT_CALL(neogeo);
73257392}
73267393
7327
73287394static DRIVER_INIT( jockeygp )
73297395{
73307396   UINT16* extra_ram;
r3426r3427
73637429   DRIVER_INIT_CALL(neogeo);
73647430}
73657431
7366
73677432static DRIVER_INIT( kog )
73687433{
73697434   /* overlay cartridge ROM */
r3426r3427
73757440   DRIVER_INIT_CALL(neogeo);
73767441}
73777442
7378
7379static DRIVER_INIT( kof10th )
7380{
7381   decrypt_kof10th(machine);
7382   DRIVER_INIT_CALL(neogeo);
7383   install_kof10th_protection(machine);
7384}
7385
7386static DRIVER_INIT( kf10thep )
7387{
7388   decrypt_kf10thep(machine);
7389   DRIVER_INIT_CALL(neogeo);
7390}
7391
7392
7393static DRIVER_INIT( kf2k5uni )
7394{
7395   decrypt_kf2k5uni(machine);
7396   DRIVER_INIT_CALL(neogeo);
7397}
7398
7399static DRIVER_INIT( cthd2003 )
7400{
7401   decrypt_cthd2003(machine);
7402    DRIVER_INIT_CALL(neogeo);
7403   patch_cthd2003(machine);
7404}
7405
7406static DRIVER_INIT ( ct2k3sp )
7407{
7408   decrypt_ct2k3sp(machine);
7409   DRIVER_INIT_CALL(neogeo);
7410   patch_cthd2003(machine);
7411}
7412
7413static DRIVER_INIT ( ct2k3sa )
7414{
7415   decrypt_ct2k3sa(machine);
7416   DRIVER_INIT_CALL(neogeo);
7417   patch_ct2k3sa(machine);
7418}
7419
7420static DRIVER_INIT( kof2k4se )
7421{
7422   decrypt_kof2k4se_68k(machine);
7423   DRIVER_INIT_CALL(neogeo);
7424}
7425
74267443static DRIVER_INIT( lans2004 )
74277444{
74287445   lans2004_decrypt_68k(machine);
r3426r3427
74327449   DRIVER_INIT_CALL(neogeo);
74337450}
74347451
7435static DRIVER_INIT( mslug3b6 )
7436{
7437   neogeo_bootleg_sx_decrypt(machine, 2);
7438   cmc42_neogeo_gfx_decrypt(machine, 0xad);
7439   DRIVER_INIT_CALL(neogeo);
7440}
74417452
74427453
7443
74447454/*    YEAR  NAME      PARENT    MACHINE   INPUT     INIT      MONITOR  */
74457455GAME( 1990, neogeo,   0,        neogeo,   neogeo,   neogeo,   ROT0, "SNK", "Neo-Geo", GAME_IS_BIOS_ROOT )
74467456
r3426r3427
75807590GAME( 2003, samsho5h, samsho5,  neogeo,   neogeo,   samsho5,  ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V / Samurai Spirits Zero (set 2)", 0 )
75817591GAME( 2003, samsho5b, samsho5,  neogeo,   neogeo,   samsho5b, ROT0, "bootleg", "Samurai Shodown V / Samurai Spirits Zero (bootleg)", 0 ) // different program scrambling
75827592GAME( 2003, kf2k3pcb, 0,        neogeo,   neogeo,   kf2k3pcb, ROT0, "SNK Playmore", "The King of Fighters 2003 (Japan, JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart.
7583GAME( 2003, kof2003,  neogeo,   neogeo,   neogeo,   kof2003,  ROT0, "SNK Playmore", "The King of Fighters 2003", 0 )
7593GAME( 2003, kof2003,  neogeo,   neogeo,   neogeo,   kof2003,  ROT0, "SNK Playmore", "The King of Fighters 2003 (set 1)", 0 )
75847594GAME( 2003, kof2003h, kof2003,  neogeo,   neogeo,   kof2003h,  ROT0, "SNK Playmore", "The King of Fighters 2003 (set 2)", 0 )
75857595GAME( 2003, kf2k3bl,  kof2003,  neogeo,   neogeo,   kof2003b, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 1)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?)
75867596GAME( 2003, kf2k3bla, kof2003,  neogeo,   neogeo,   kof2k3pl, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 2)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
src/mame/drivers/segas24.c
r3426r3427
341341#include "sound/dac.h"
342342#include "sound/2151intf.h"
343343
344#define MASTER_CLOCK      XTAL_20MHz
345#define VIDEO_CLOCK         XTAL_32MHz
346
347
344348UINT16* s24_mainram1;
345349
346350extern void s24_fd1094_machine_init(void);
r3426r3427
429433            break;
430434         case 0x9:
431435            logerror("Read multiple [%02x] %d..%d side %d track %d\n", data, fdc_sector, fdc_sector+fdc_data-1, data & 8 ? 1 : 0, fdc_phys_track);
432            fdc_pt = memory_region(machine, "user2") + track_size*(2*fdc_phys_track+(data & 8 ? 1 : 0));
436            fdc_pt = memory_region(machine, "floppy") + track_size*(2*fdc_phys_track+(data & 8 ? 1 : 0));
433437            fdc_span = track_size;
434438            fdc_status = 3;
435439            fdc_drq = 1;
r3426r3427
437441            break;
438442         case 0xb:
439443            logerror("Write multiple [%02x] %d..%d side %d track %d\n", data, fdc_sector, fdc_sector+fdc_data-1, data & 8 ? 1 : 0, fdc_phys_track);
440            fdc_pt = memory_region(machine, "user2") + track_size*(2*fdc_phys_track+(data & 8 ? 1 : 0));
444            fdc_pt = memory_region(machine, "floppy") + track_size*(2*fdc_phys_track+(data & 8 ? 1 : 0));
441445            fdc_span = track_size;
442446            fdc_status = 3;
443447            fdc_drq = 1;
r3426r3427
713717
714718static void reset_bank(running_machine *machine)
715719{
716   if (memory_region(machine, "user1"))
720   if (memory_region(machine, "romboard"))
717721   {
718722      memory_set_bank(1, curbank & 15);
719723      memory_set_bank(2, curbank & 15);
r3426r3427
758762
759763static const UINT8  mahmajn_mlt[8] = { 5, 1, 6, 2, 3, 7, 4, 0 };
760764static const UINT8 mahmajn2_mlt[8] = { 6, 0, 5, 3, 1, 4, 2, 7 };
761static const UINT8      gqh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
765static const UINT8      qgh_mlt[8] = { 3, 7, 4, 0, 2, 6, 5, 1 };
762766static const UINT8 bnzabros_mlt[8] = { 2, 4, 0, 5, 7, 3, 1, 6 };
763767static const UINT8   qrouka_mlt[8] = { 1, 6, 4, 7, 0, 5, 3, 2 };
764768static const UINT8 quizmeku_mlt[8] = { 0, 3, 2, 4, 6, 1, 7, 5 };
765static const UINT8   dcclub_mlt[8] = { 4, 3, 7, 0, 2, 6, 1, 5 };
769static const UINT8   dcclub_mlt[8] = { 4, 7, 3, 0, 2, 6, 5, 1 };
766770
767771static UINT8 mlatch;
768772static const UINT8 *mlatch_table;
r3426r3427
810814static UINT16 irq_timera;
811815static UINT8  irq_timerb;
812816static UINT8  irq_allow0, irq_allow1;
813static int    irq_timer_pend0, irq_timer_pend1, irq_yms;
814static emu_timer *irq_timer;
817static int    irq_timer_pend0, irq_timer_pend1, irq_yms, irq_vblank, irq_sprite;
818static emu_timer *irq_timer, *irq_timer_clear;
815819
816820static TIMER_CALLBACK( irq_timer_cb )
817821{
r3426r3427
822826      cpunum_set_input_line(machine, 1, IRQ_TIMER+1, ASSERT_LINE);
823827}
824828
829static TIMER_CALLBACK( irq_timer_clear_cb )
830{
831   irq_sprite = irq_vblank = 0;
832   cpunum_set_input_line(machine, 0, IRQ_VBLANK+1, CLEAR_LINE);
833   cpunum_set_input_line(machine, 0, IRQ_SPRITE+1, CLEAR_LINE);
834   cpunum_set_input_line(machine, 1, IRQ_VBLANK+1, CLEAR_LINE);
835   cpunum_set_input_line(machine, 1, IRQ_SPRITE+1, CLEAR_LINE);
836}
837
825838static void irq_init(void)
826839{
827840   irq_timera = 0;
r3426r3427
830843   irq_allow1 = 0;
831844   irq_timer_pend0 = 0;
832845   irq_timer_pend1 = 0;
846   irq_vblank = 0;
847   irq_sprite = 0;
833848   irq_timer = timer_alloc(irq_timer_cb, NULL);
849   irq_timer_clear = timer_alloc(irq_timer_clear_cb, NULL);
834850}
835851
836852static void irq_timer_reset(void)
r3426r3427
862878      break;
863879   case 2:
864880      irq_allow0 = data;
865      cpunum_set_input_line(machine, 0, IRQ_TIMER+1, irq_timer_pend0 && (irq_allow0 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
881      irq_timer_pend0 = 0;
882      cpunum_set_input_line(machine, 0, IRQ_TIMER+1, CLEAR_LINE);
866883      cpunum_set_input_line(machine, 0, IRQ_YM2151+1, irq_yms && (irq_allow0 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
884      cpunum_set_input_line(machine, 0, IRQ_VBLANK+1, irq_vblank && (irq_allow0 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
885      cpunum_set_input_line(machine, 0, IRQ_SPRITE+1, irq_sprite && (irq_allow0 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
867886      break;
868887   case 3:
869888      irq_allow1 = data;
870      cpunum_set_input_line(machine, 1, IRQ_TIMER+1, irq_timer_pend1 && (irq_allow1 & (1 << IRQ_TIMER)) ? ASSERT_LINE : CLEAR_LINE);
889      irq_timer_pend1 = 0;
890      cpunum_set_input_line(machine, 1, IRQ_TIMER+1, CLEAR_LINE);
871891      cpunum_set_input_line(machine, 1, IRQ_YM2151+1, irq_yms && (irq_allow1 & (1 << IRQ_YM2151)) ? ASSERT_LINE : CLEAR_LINE);
892      cpunum_set_input_line(machine, 1, IRQ_VBLANK+1, irq_vblank && (irq_allow1 & (1 << IRQ_VBLANK)) ? ASSERT_LINE : CLEAR_LINE);
893      cpunum_set_input_line(machine, 1, IRQ_SPRITE+1, irq_sprite && (irq_allow1 & (1 << IRQ_SPRITE)) ? ASSERT_LINE : CLEAR_LINE);
872894      break;
873895   }
874896}
875897
876
877static int ggground_kludge;
878/* This IRQ needs to be generated before the others or the GFX
879  don't get uploaded correctly and you see nothing */
880static TIMER_CALLBACK( gground_generate_kludge_irq )
881{
882      cpunum_set_input_line(machine, 1, 5, HOLD_LINE);
883}
884
885
886898static READ16_HANDLER(irq_r)
887899{
888   /* These hacks are for Gain Ground */
889   /* otherwise the interrupt occurs before the correct state has been
890       set and the game crashes before booting */
891   if (!strcmp(machine->gamedrv->name,"gground"))
892   {
893
894      if (activecpu_get_pc()==0x0084aa)
895      {
896         ggground_kludge = 1;
897         return mame_rand(machine);
898
899      }
900      if (activecpu_get_pc()==0x084ba)
901      {
902         /* Clear IRQ line so IRQ doesn't happen too early */
903         cpunum_set_input_line(machine, 1, 5, CLEAR_LINE);
904
905         /* set a timer to generate an irq at the needed point */
906         if (ggground_kludge == 1)
907         {
908            timer_set(ATTOTIME_IN_USEC(180000), NULL, 0, gground_generate_kludge_irq);
909            ggground_kludge = 0;
910         }
900   extern int activecpu;
901   switch(offset) {
902   case 0: {
903      int pc = activecpu_get_pc();
904      static int turns;
905      if(pc == 0x84a4 || pc == 0x84a6)
906         return 0;
907      if(pc == 0x84aa || pc == 0x84ac) {
908         // limit = 0x1b5f
909         turns = 0x0100;
911910         return 1;
912911      }
913   }
914
915   if (!strcmp(machine->gamedrv->name,"ggroundj"))
916   {
917
918      if (activecpu_get_pc()==0x0084ac)
919      {
920         ggground_kludge = 1;
921         return mame_rand(machine);
922
912      if(pc == 0x84ba || pc == 0x84bc) {
913         // 26 cycles/read
914         turns--;
915         return turns ? 1 : 0x200;
923916      }
924      if (activecpu_get_pc()==0x084bc)
925      {
926         /* Clear IRQ line so IRQ doesn't happen too early */
927         cpunum_set_input_line(machine, 1, 5, CLEAR_LINE);
928
929         /* set a timer to generate an irq at the needed point */
930         if (ggground_kludge == 1)
931         {
932            timer_set(ATTOTIME_IN_USEC(180000), NULL, 0, gground_generate_kludge_irq);
933            ggground_kludge = 0;
934         }
935         return 1;
936      }
917      // 84c8
918      // -> 85ac / 85bc?
919      break;
937920   }
938
939   switch(offset) {
940921   case 2:
941922      irq_timer_pend0 = 0;
942923      cpunum_set_input_line(machine, 0, IRQ_TIMER+1, CLEAR_LINE);
r3426r3427
951932
952933static INTERRUPT_GEN(irq_vbl)
953934{
954   int irq = cpu_getiloops() ? IRQ_SPRITE : IRQ_VBLANK;
955   int mask = 1 << irq;
935   int irq, mask;
956936
937   if(cpu_getiloops()) {
938      irq = IRQ_SPRITE;
939      irq_sprite = 1;
940   } else {
941      irq = IRQ_VBLANK;
942      irq_vblank = 1;
943   }
944
945   timer_adjust_oneshot(irq_timer_clear, ATTOTIME_IN_HZ(VIDEO_CLOCK/2/656.0), 0);
946
947   mask = 1 << irq;
948
957949   if(irq_allow0 & mask)
958      cpunum_set_input_line(machine, 0, 1+irq, HOLD_LINE);
950      cpunum_set_input_line(machine, 0, 1+irq, ASSERT_LINE);
959951
960952   if(irq_allow1 & mask)
961      cpunum_set_input_line(machine, 1, 1+irq, HOLD_LINE);
953      cpunum_set_input_line(machine, 1, 1+irq, ASSERT_LINE);
962954
963955   if(!cpu_getiloops()) {
964956      // Ensure one index pulse every 20 frames
r3426r3427
1004996 *
1005997 *************************************/
1006998
999/*
1000 Both CPUs have the same memory map, except for the first 512K where
1001 CPU A has ROM and CPU B has work RAM mapped there.
1002
1003 The memory map can be broken down into the following regions:
1004
1005 000000-07FFFF : BIOS ROM (for CPU A only)
1006                 CPU B work RAM (for CPU B only)
1007 080000-0FFFFF : CPU A work RAM
1008 100000-1FFFFF : BIOS ROM
1009 200000-3FFFFF : Tilemap generator
1010 400000-5FFFFF : Mixer chip
1011 600000-7FFFFF : Sprite generator
1012 800000-9FFFFF : I/O chip
1013 A00000-AFFFFF : Timer and interrupt controller chip
1014 B00000-EFFFFF : Extra chip selects for expansion
1015 F00000-F7FFFF : CPU B work RAM
1016 F80000-FFFFFF : CPU A work RAM
1017
1018 The BIOS ROM mirror at $100000 is common to both CPUs.
1019*/
1020
1021
10071022static ADDRESS_MAP_START( system24_cpu1_map, ADDRESS_SPACE_PROGRAM, 16 )
1008   AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x140000) AM_ROM AM_SHARE(1)
1009   AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_SHARE(2)
1010   AM_RANGE(0x200000, 0x20ffff) AM_READWRITE(sys24_tile_r, sys24_tile_w)
1011   AM_RANGE(0x220000, 0x220001) AM_WRITENOP      // Unknown, always 0
1012   AM_RANGE(0x240000, 0x240001) AM_WRITENOP      // Horizontal synchronization register
1013   AM_RANGE(0x260000, 0x260001) AM_WRITENOP      // Vertical synchronization register
1014   AM_RANGE(0x270000, 0x270001) AM_WRITENOP      // Video synchronization switch
1015   AM_RANGE(0x280000, 0x29ffff) AM_READWRITE(sys24_char_r, sys24_char_w)
1016   AM_RANGE(0x400000, 0x403fff) AM_RAM_WRITE(system24temp_sys16_paletteram1_w) AM_BASE(&paletteram16)
1017   AM_RANGE(0x404000, 0x40401f) AM_READWRITE(sys24_mixer_r, sys24_mixer_w)
1018   AM_RANGE(0x600000, 0x63ffff) AM_READWRITE(sys24_sprite_r, sys24_sprite_w)
1019   AM_RANGE(0x800000, 0x80007f) AM_READWRITE(system24temp_sys16_io_r, system24temp_sys16_io_w)
1020   AM_RANGE(0x800100, 0x800101) AM_WRITE(ym_register_w)
1021   AM_RANGE(0x800102, 0x800103) AM_READWRITE(ym_status_r, ym_data_w)
1022   AM_RANGE(0xa00000, 0xa00007) AM_READWRITE(irq_r, irq_w)
1023   AM_RANGE(0xb00000, 0xb00007) AM_READWRITE(fdc_r, fdc_w)
1024   AM_RANGE(0xb00008, 0xb0000f) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
1023   AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x040000) AM_ROM AM_REGION("main", 0)
1024   AM_RANGE(0x080000, 0x0bffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(1)
1025   AM_RANGE(0x100000, 0x13ffff) AM_MIRROR(0x0c0000) AM_ROM AM_REGION("main", 0)
1026   AM_RANGE(0x200000, 0x20ffff) AM_MIRROR(0x110000) AM_READWRITE(sys24_tile_r, sys24_tile_w)
1027   AM_RANGE(0x220000, 0x220001) AM_MIRROR(0x11fffe) AM_WRITENOP      /* Horizontal split position (ABSEL) */
1028   AM_RANGE(0x240000, 0x240001) AM_MIRROR(0x11fffe) AM_WRITENOP      /* Scanline trigger position (XHOUT) */
1029   AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x10fffe) AM_WRITENOP      /* Frame trigger position (XVOUT) */
1030   AM_RANGE(0x270000, 0x270001) AM_MIRROR(0x10fffe) AM_WRITENOP      /* Synchronization mode */
1031   AM_RANGE(0x280000, 0x29ffff) AM_MIRROR(0x160000) AM_READWRITE(sys24_char_r, sys24_char_w)
1032   AM_RANGE(0x400000, 0x403fff) AM_MIRROR(0x1f8000) AM_READWRITE(system24temp_sys16_paletteram1_r, system24temp_sys16_paletteram1_w) AM_BASE(&paletteram16)
1033   AM_RANGE(0x404000, 0x40401f) AM_MIRROR(0x1fbfe0) AM_READWRITE(sys24_mixer_r, sys24_mixer_w)
1034   AM_RANGE(0x600000, 0x63ffff) AM_MIRROR(0x180000) AM_READWRITE(sys24_sprite_r, sys24_sprite_w)
1035   AM_RANGE(0x800000, 0x80007f) AM_MIRROR(0x1ffe00) AM_READWRITE(system24temp_sys16_io_r, system24temp_sys16_io_w)
1036   AM_RANGE(0x800100, 0x800101) AM_MIRROR(0x1ffe00) AM_WRITE(ym_register_w)
1037   AM_RANGE(0x800102, 0x800103) AM_MIRROR(0x1ffe00) AM_READWRITE(ym_status_r, ym_data_w)
1038   AM_RANGE(0xa00000, 0xa00007) AM_MIRROR(0x0ffff8) AM_READWRITE(irq_r, irq_w)
1039   AM_RANGE(0xb00000, 0xb00007) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_r, fdc_w)
1040   AM_RANGE(0xb00008, 0xb0000f) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
10251041   AM_RANGE(0xb80000, 0xbbffff) AM_ROMBANK(1)
1026   AM_RANGE(0xbc0000, 0xbc0001) AM_READWRITE(curbank_r, curbank_w)
1027   AM_RANGE(0xbc0006, 0xbc0007) AM_READWRITE(mlatch_r, mlatch_w)
1028   AM_RANGE(0xc00000, 0xc00011) AM_READWRITE(hotrod3_ctrl_r, hotrod3_ctrl_w)
1042   AM_RANGE(0xbc0000, 0xbc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
1043   AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
1044   AM_RANGE(0xc00000, 0xc00011) AM_MIRROR(0x07ffe0) AM_READWRITE(hotrod3_ctrl_r, hotrod3_ctrl_w)
10291045   AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK(2)
1030   AM_RANGE(0xcc0000, 0xcc0001) AM_READWRITE(curbank_r, curbank_w)
1031   AM_RANGE(0xcc0006, 0xcc0007) AM_READWRITE(mlatch_r, mlatch_w)
1032AM_RANGE(0xd00300, 0xd00301) AM_WRITE(SMH_NOP)
1033   AM_RANGE(0xf00000, 0xf3ffff) AM_RAM AM_SHARE(3)
1034   AM_RANGE(0xf40000, 0xf7ffff) AM_ROM AM_SHARE(1)
1035   AM_RANGE(0xf80000, 0xffffff) AM_RAM AM_SHARE(2)
1046   AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
1047   AM_RANGE(0xcc0006, 0xcc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
1048   AM_RANGE(0xf00000, 0xf3ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(2)
1049   AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(1)
10361050ADDRESS_MAP_END
10371051
1052
1053
10381054/*************************************
10391055 *
10401056 *  CPU 2 memory handlers
r3426r3427
10421058 *************************************/
10431059
10441060static ADDRESS_MAP_START( system24_cpu2_map, ADDRESS_SPACE_PROGRAM, 16 )
1045   AM_RANGE(0x000000, 0x03ffff) AM_RAM AM_SHARE(3) AM_BASE(&s24_mainram1)         // RAM here overrides the ROM mirror
1046   AM_RANGE(0x040000, 0x07ffff) AM_ROM AM_SHARE(1)
1047   AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_SHARE(2)
1048   AM_RANGE(0x100000, 0x13ffff) AM_MIRROR(0x040000) AM_ROM AM_SHARE(1)
1049   AM_RANGE(0x200000, 0x20ffff) AM_READWRITE(sys24_tile_r, sys24_tile_w)
1050   AM_RANGE(0x220000, 0x220001) AM_WRITENOP      // Unknown, always 0
1051   AM_RANGE(0x240000, 0x240001) AM_WRITENOP      // Horizontal synchronization register
1052   AM_RANGE(0x260000, 0x260001) AM_WRITENOP      // Vertical synchronization register
1053   AM_RANGE(0x270000, 0x270001) AM_WRITENOP      // Video synchronization switch
1054   AM_RANGE(0x280000, 0x29ffff) AM_READWRITE(sys24_char_r, sys24_char_w)
1055   AM_RANGE(0x400000, 0x403fff) AM_RAM_WRITE(system24temp_sys16_paletteram1_w)
1056   AM_RANGE(0x404000, 0x40401f) AM_READWRITE(sys24_mixer_r, sys24_mixer_w)
1057   AM_RANGE(0x600000, 0x63ffff) AM_READWRITE(sys24_sprite_r, sys24_sprite_w)
1058   AM_RANGE(0x800000, 0x80007f) AM_READWRITE(system24temp_sys16_io_r, system24temp_sys16_io_w)
1059   AM_RANGE(0x800100, 0x800101) AM_WRITE(ym_register_w)
1060   AM_RANGE(0x800102, 0x800103) AM_READWRITE(ym_status_r, ym_data_w)
1061   AM_RANGE(0xa00000, 0xa00007) AM_READWRITE(irq_r, irq_w)
1062   AM_RANGE(0xb00000, 0xb00007) AM_READWRITE(fdc_r, fdc_w)
1063   AM_RANGE(0xb00008, 0xb0000f) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
1061   AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(2) AM_BASE(&s24_mainram1)
1062   AM_RANGE(0x080000, 0x0bffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(1)
1063   AM_RANGE(0x100000, 0x13ffff) AM_MIRROR(0x0c0000) AM_ROM AM_REGION("main", 0)
1064   AM_RANGE(0x200000, 0x20ffff) AM_MIRROR(0x110000) AM_READWRITE(sys24_tile_r, sys24_tile_w)
1065   AM_RANGE(0x220000, 0x220001) AM_MIRROR(0x11fffe) AM_WRITENOP      /* Horizontal split position (ABSEL) */
1066   AM_RANGE(0x240000, 0x240001) AM_MIRROR(0x11fffe) AM_WRITENOP      /* Scanline trigger position (XHOUT) */
1067   AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x10fffe) AM_WRITENOP      /* Frame trigger position (XVOUT) */
1068   AM_RANGE(0x270000, 0x270001) AM_MIRROR(0x10fffe) AM_WRITENOP      /* Synchronization mode */
1069   AM_RANGE(0x280000, 0x29ffff) AM_MIRROR(0x160000) AM_READWRITE(sys24_char_r, sys24_char_w)
1070   AM_RANGE(0x400000, 0x403fff) AM_MIRROR(0x1f8000) AM_READWRITE(system24temp_sys16_paletteram1_r, system24temp_sys16_paletteram1_w)
1071   AM_RANGE(0x404000, 0x40401f) AM_MIRROR(0x1fbfe0) AM_READWRITE(sys24_mixer_r, sys24_mixer_w)
1072   AM_RANGE(0x600000, 0x63ffff) AM_MIRROR(0x180000) AM_READWRITE(sys24_sprite_r, sys24_sprite_w)
1073   AM_RANGE(0x800000, 0x80007f) AM_MIRROR(0x1ffe00) AM_READWRITE(system24temp_sys16_io_r, system24temp_sys16_io_w)
1074   AM_RANGE(0x800100, 0x800101) AM_MIRROR(0x1ffe00) AM_WRITE(ym_register_w)
1075   AM_RANGE(0x800102, 0x800103) AM_MIRROR(0x1ffe00) AM_READWRITE(ym_status_r, ym_data_w)
1076   AM_RANGE(0xa00000, 0xa00007) AM_MIRROR(0x0ffff8) AM_READWRITE(irq_r, irq_w)
1077   AM_RANGE(0xb00000, 0xb00007) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_r, fdc_w)
1078   AM_RANGE(0xb00008, 0xb0000f) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
10641079   AM_RANGE(0xb80000, 0xbbffff) AM_ROMBANK(1)
1065   AM_RANGE(0xbc0000, 0xbc0001) AM_READWRITE(curbank_r, curbank_w)
1066   AM_RANGE(0xbc0006, 0xbc0007) AM_READWRITE(mlatch_r, mlatch_w)
1067   AM_RANGE(0xc00000, 0xc00011) AM_READWRITE(hotrod3_ctrl_r, hotrod3_ctrl_w)
1080   AM_RANGE(0xbc0000, 0xbc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
1081   AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
1082   AM_RANGE(0xc00000, 0xc00011) AM_MIRROR(0x07ffe0) AM_READWRITE(hotrod3_ctrl_r, hotrod3_ctrl_w)
10681083   AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK(2)
1069   AM_RANGE(0xcc0000, 0xcc0001) AM_READWRITE(curbank_r, curbank_w)
1070   AM_RANGE(0xcc0006, 0xcc0007) AM_READWRITE(mlatch_r, mlatch_w)
1071AM_RANGE(0xd00300, 0xd00301) AM_WRITE(SMH_NOP)
1072   AM_RANGE(0xf00000, 0xf3ffff) AM_RAM AM_SHARE(3)
1073   AM_RANGE(0xf40000, 0xf7ffff) AM_ROM AM_SHARE(1)
1074   AM_RANGE(0xf80000, 0xffffff) AM_RAM AM_SHARE(2)
1084   AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
1085   AM_RANGE(0xcc0006, 0xcc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
1086   AM_RANGE(0xf00000, 0xf3ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(2)
1087   AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE(1)
10751088ADDRESS_MAP_END
10761089
10771090
1078/*************************************
1079 *
1080 *  Game-specific driver inits
1081 *
1082 *************************************/
10831091
1084static DRIVER_INIT(qgh)
1085{
1086   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1087   mlatch_table = gqh_mlt;
1088   track_size = 0;
1089}
1090
1091static DRIVER_INIT(dcclub)
1092{
1093   system24temp_sys16_io_set_callbacks(dcclub_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1094   mlatch_table = dcclub_mlt;
1095   track_size = 0;
1096}
1097
1098static DRIVER_INIT(qrouka)
1099{
1100   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1101   mlatch_table = qrouka_mlt;
1102   track_size = 0;
1103}
1104
1105static DRIVER_INIT(quizmeku)
1106{
1107   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1108   mlatch_table = quizmeku_mlt;
1109   track_size = 0;
1110}
1111
1112static DRIVER_INIT(mahmajn)
1113{
1114
1115   system24temp_sys16_io_set_callbacks(mahmajn_io_r, mahmajn_io_w, resetcontrol_w, iod_r, iod_w);
1116   mlatch_table = mahmajn_mlt;
1117   track_size = 0;
1118   cur_input_line = 0;
1119}
1120
1121static DRIVER_INIT(mahmajn2)
1122{
1123
1124   system24temp_sys16_io_set_callbacks(mahmajn_io_r, mahmajn_io_w, resetcontrol_w, iod_r, iod_w);
1125   mlatch_table = mahmajn2_mlt;
1126   track_size = 0;
1127   cur_input_line = 0;
1128}
1129
1130static DRIVER_INIT(hotrod)
1131{
1132   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1133   mlatch_table = 0;
1134
1135   // Sector  Size
1136   // 1       8192
1137   // 2       1024
1138   // 3       1024
1139   // 4       1024
1140   // 5        512
1141   // 6        256
1142
1143   track_size = 0x2f00;
1144}
1145
1146static DRIVER_INIT(bnzabros)
1147{
1148   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1149   mlatch_table = bnzabros_mlt;
1150
1151   // Sector  Size
1152   // 1       2048
1153   // 2       2048
1154   // 3       2048
1155   // 4       2048
1156   // 5       2048
1157   // 6       1024
1158   // 7        256
1159
1160   track_size = 0x2d00;
1161}
1162
1163static DRIVER_INIT(sspirits)
1164{
1165   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1166   mlatch_table = 0;
1167   track_size = 0x2d00;
1168   s24_fd1094_driver_init(machine);
1169
1170}
1171
1172static DRIVER_INIT(sspiritj)
1173{
1174   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1175   mlatch_table = 0;
1176   track_size = 0x2f00;
1177   s24_fd1094_driver_init(machine);
1178
1179}
1180
1181static DRIVER_INIT(dcclubfd)
1182{
1183   system24temp_sys16_io_set_callbacks(dcclub_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1184   mlatch_table = dcclub_mlt;
1185   track_size = 0x2d00;
1186   s24_fd1094_driver_init(machine);
1187
1188}
1189
1190
1191static DRIVER_INIT(sgmast)
1192{
1193   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1194   mlatch_table = 0;
1195   track_size = 0x2d00;
1196   s24_fd1094_driver_init(machine);
1197
1198}
1199
1200static DRIVER_INIT(qsww)
1201{
1202   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1203   mlatch_table = 0;
1204   track_size = 0x2d00;
1205   s24_fd1094_driver_init(machine);
1206}
1207
1208static DRIVER_INIT(gground)
1209{
1210   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1211   mlatch_table = 0;
1212   track_size = 0x2d00;
1213   s24_fd1094_driver_init(machine);
1214}
1215
1216static DRIVER_INIT(crkdown)
1217{
1218   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1219   mlatch_table = 0;
1220   track_size = 0x2d00;
1221   s24_fd1094_driver_init(machine);
1222}
1223
1224static DRIVER_INIT(roughrac)
1225{
1226   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
1227   mlatch_table = 0;
1228   track_size = 0x2d00;
1229   s24_fd1094_driver_init(machine);
1230}
1231
12321092/*************************************
12331093 *
12341094 *  Generic driver initialization
r3426r3427
12401100   if(!track_size || !file)
12411101      return;
12421102   if(read_or_write)
1243      mame_fwrite(file, memory_region(machine, "user2"), 2*track_size);
1103      mame_fwrite(file, memory_region(machine, "floppy"), 2*track_size);
12441104   else
1245      mame_fread(file, memory_region(machine, "user2"), 2*track_size);
1105      mame_fread(file, memory_region(machine, "floppy"), 2*track_size);
12461106}
12471107
12481108static MACHINE_START( system24 )
12491109{
1250   UINT8 *usr1 = memory_region(machine, "user1");
1110   UINT8 *usr1 = memory_region(machine, "romboard");
12511111   if (usr1)
12521112   {
12531113      memory_configure_bank(1, 0, 16, usr1, 0x40000);
r3426r3427
12551115   }
12561116}
12571117
1258static MACHINE_RESET(system24)
1118static MACHINE_RESET( system24 )
12591119{
12601120   cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, ASSERT_LINE);
12611121   prev_resetcontrol = resetcontrol = 0x06;
r3426r3427
17481608INPUT_PORTS_END
17491609
17501610static INPUT_PORTS_START( qrouka )
1751   PORT_INCLUDE( quizmeku )
1611   PORT_INCLUDE( system24_P1_P2 )
17521612
1753   PORT_MODIFY("SERVICE")
1754   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 )
1755   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 )
1756   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
1757   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
1613   PORT_MODIFY("P1")
1614   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START3 )
1615   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1616   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
17581617
1618   PORT_MODIFY("P2")
1619   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START4 )
1620   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1621   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
1622
1623   PORT_START("P3")
1624   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
1625   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
1626   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
1627   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
1628   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
1629   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
1630   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
1631   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
1632
1633   PORT_START("SERVICE")
1634   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00)
1635   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00)
1636   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE )
1637   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
1638   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
1639   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
1640   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00)
1641   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x00)
1642   /* alt coin mode */
1643   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08)
1644   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08)
1645   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08)
1646   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW",0x08,PORTCOND_EQUALS,0x08)
1647
1648
1649   PORT_INCLUDE( system24_DSW )
1650
17591651   PORT_MODIFY("DSW")
1652   PORT_DIPNAME( 0x01, 0x00, "Play Mode" ) PORT_DIPLOCATION("SWB:1")
1653   PORT_DIPSETTING(    0x01, "2 Player" )
1654   PORT_DIPSETTING(    0x00, "4 Player" )
1655   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:2")
1656   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1657   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
17601658   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SWB:3")
17611659   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
17621660   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r3426r3427
17681666   PORT_DIPSETTING(    0x00, "3" )
17691667   PORT_DIPSETTING(    0x30, "4" )
17701668   PORT_DIPSETTING(    0x20, "5" )
1669   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:7,8")
1670   PORT_DIPSETTING(    0x80, DEF_STR( Easy ) )
1671   PORT_DIPSETTING(    0xc0, DEF_STR( Normal ) )
1672   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
1673   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
17711674INPUT_PORTS_END
17721675
17731676static INPUT_PORTS_START( mahmajn )
r3426r3427
18901793   irq_ym
18911794};
18921795
1796
1797
18931798/*************************************
18941799 *
18951800 *  Generic machine drivers
r3426r3427
18971802 *************************************/
18981803
18991804static MACHINE_DRIVER_START( system24 )
1900   MDRV_CPU_ADD("main", M68000, 10000000)
1805   MDRV_CPU_ADD("main", M68000, MASTER_CLOCK/2)
19011806   MDRV_CPU_PROGRAM_MAP(system24_cpu1_map, 0)
19021807   MDRV_CPU_VBLANK_INT_HACK(irq_vbl, 2)
19031808
1904   MDRV_CPU_ADD("sub", M68000, 10000000)
1809   MDRV_CPU_ADD("sub", M68000, MASTER_CLOCK/2)
19051810   MDRV_CPU_PROGRAM_MAP(system24_cpu2_map, 0)
19061811
1907   MDRV_INTERLEAVE(4)
1812   MDRV_INTERLEAVE(100)
19081813
19091814   MDRV_MACHINE_START(system24)
19101815   MDRV_MACHINE_RESET(system24)
r3426r3427
19131818   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
19141819
19151820   MDRV_SCREEN_ADD("main", RASTER)
1916   MDRV_SCREEN_REFRESH_RATE(58)
1917   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(100))
1821   MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 656, 0/*+69*/, 496/*+69*/, 424, 0/*+25*/, 384/*+25*/)
19181822   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1919   MDRV_SCREEN_SIZE(62*8, 48*8)
1920   MDRV_SCREEN_VISIBLE_AREA(0*8, 62*8-1, 0*8, 48*8-1)
19211823
19221824   MDRV_PALETTE_LENGTH(8192*2)
19231825
r3426r3427
19361838   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "right", 0.50)
19371839MACHINE_DRIVER_END
19381840
1841
1842
19391843/*************************************
19401844 *
19411845 *  ROM definition(s)
r3426r3427
19471851   ROM_LOAD16_BYTE( "epr-11339.ic2", 0x000000, 0x20000, CRC(75130e73) SHA1(e079739f4a3da3807aac570442c5afef1a7d7b0e) )
19481852   ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) )
19491853
1950   ROM_REGION( 0x1d6000, "user2", 0)
1854   ROM_REGION( 0x1d6000, "floppy", 0)
19511855   ROM_LOAD( "ds3-5000-01d_3p_turbo.img", 0x000000, 0x1d6000, CRC(627e8053) SHA1(d1a95f99078f5a29cccacfb1b30c3c9ead7b605c) )
19521856ROM_END
19531857
r3426r3427
19561860   ROM_LOAD16_BYTE( "epr-11339.ic2", 0x000000, 0x20000, CRC(75130e73) SHA1(e079739f4a3da3807aac570442c5afef1a7d7b0e) )
19571861   ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) )
19581862
1959   ROM_REGION( 0x1d6000, "user2", 0)
1863   ROM_REGION( 0x1d6000, "floppy", 0)
19601864   ROM_LOAD( "ds3-5000-01d.img", 0x000000, 0x1d6000, CRC(abf67b02) SHA1(f397435eaad691ff5a38d6d1d27840ed95a62df3) ) // World? 3 Player TURBO
19611865ROM_END
19621866
r3426r3427
19651869   ROM_LOAD16_BYTE( "epr-11339.ic2", 0x000000, 0x20000, CRC(75130e73) SHA1(e079739f4a3da3807aac570442c5afef1a7d7b0e) )
19661870   ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) )
19671871
1968   ROM_REGION( 0x1d6000, "user2", 0)
1872   ROM_REGION( 0x1d6000, "floppy", 0)
19691873   ROM_LOAD( "ds3-5000-01a-rev-b.img", 0x000000, 0x1d6000, CRC(a39a0c2d) SHA1(ea8104c2266c48f480837aa7679c0a6f0c5e5452) ) // Japanese 4 Player
19701874ROM_END
19711875
r3426r3427
19741878   ROM_LOAD16_BYTE( "16900b", 0x000000, 0x20000, CRC(20d7b7d1) SHA1(345b228c27e5f2fef9a2b8b5f619c59450a070f8) )
19751879   ROM_LOAD16_BYTE( "16899b", 0x000001, 0x20000, CRC(397b3ba9) SHA1(1773212cd87dcff840f3953ec368be7e2394faf0) )
19761880
1977   ROM_REGION16_BE( 0x400000, "user1", 0)
1881   ROM_REGION16_BE( 0x400000, "romboard", 0)
19781882   ROM_LOAD16_BYTE( "16902a", 0x000000, 0x80000, CRC(d35b7706) SHA1(341bca0af6b6d3f326328a88cdc69c7897b83a0d) )
19791883   ROM_LOAD16_BYTE( "16901a", 0x000001, 0x80000, CRC(ab4bcb33) SHA1(8acd73096eb485c6dc83da6adfcc47d5d0f5b7f3) )
19801884   ROM_LOAD16_BYTE( "16904",  0x100000, 0x80000, CRC(10987c88) SHA1(66f893690565aed613427421958ebe225a20ad0f) )
r3426r3427
19901894   ROM_LOAD16_BYTE( "14485", 0x000000, 0x20000, CRC(fc0085f9) SHA1(0250d1e17e19b541b85198ec4207e55bfbd5c32e) )
19911895   ROM_LOAD16_BYTE( "14484", 0x000001, 0x20000, CRC(f51c641c) SHA1(3f2fd0be7d58c75e88565393da5e810655413b53) )
19921896
1993   ROM_REGION16_BE( 0x400000, "user1", 0)
1897   ROM_REGION16_BE( 0x400000, "romboard", 0)
19941898   ROM_LOAD16_BYTE( "14482", 0x000000, 0x80000, CRC(7a13dd97) SHA1(bfe9950d2cd41f3f866520923c1ed7b8da1990ec) )
19951899   ROM_LOAD16_BYTE( "14483", 0x100000, 0x80000, CRC(f3eb51a0) SHA1(6904830ff5e7aa5f016e115572fb6da678896ede) )
19961900ROM_END
r3426r3427
20001904   ROM_LOAD16_BYTE( "epr14813.bin", 0x000000, 0x20000, CRC(ea38cf4b) SHA1(118ab2e0ae20a4db5e619945dfbb3f200de3979c) )
20011905   ROM_LOAD16_BYTE( "epr14812.bin", 0x000001, 0x20000, CRC(5a3cb4a7) SHA1(c0f21282140e8e6e927664f5f2b90525ae0207e9) )
20021906
2003   ROM_REGION16_BE( 0x400000, "user1", 0)
1907   ROM_REGION16_BE( 0x400000, "romboard", 0)
20041908   ROM_LOAD16_BYTE( "mpr14820.bin", 0x000000, 0x80000, CRC(8d2a03d3) SHA1(b3339bcd101bcfe042e2a1cfdc8baef0a86624df) )
20051909   ROM_LOAD16_BYTE( "mpr14819.bin", 0x000001, 0x80000, CRC(e84c4827) SHA1(54741295e1bdca7d0c78eb795a68b92212d43b2e) )
20061910   ROM_LOAD16_BYTE( "mpr14822.bin", 0x100000, 0x80000, CRC(7c3dcc51) SHA1(a199c2c71cda44a2c8755074c1007d83c8d45d2d) )
r3426r3427
20161920   ROM_LOAD16_BYTE( "epr16799.bin", 0x000000, 0x20000, CRC(3a34cf75) SHA1(d22bf6334668af29167cf4244d18f9cd2e7ff7d6) )
20171921   ROM_LOAD16_BYTE( "epr16798.bin", 0x000001, 0x20000, CRC(662923fa) SHA1(dcd3964d899d3f34dab22ffcd1a5af895804fae1) )
20181922
2019   ROM_REGION16_BE( 0x400000, "user1", 0)
1923   ROM_REGION16_BE( 0x400000, "romboard", 0)
20201924   ROM_LOAD16_BYTE( "mpr16801.bin", 0x000000, 0x80000, CRC(74855a17) SHA1(d2d8e7da7b261e7cb64605284d2c78fbd1465b69) )
20211925   ROM_LOAD16_BYTE( "mpr16800.bin", 0x000001, 0x80000, CRC(6dbc1e02) SHA1(cce5734243ff171759cecb5c05c12dc743a25c1d) )
20221926   ROM_LOAD16_BYTE( "mpr16803.bin", 0x100000, 0x80000, CRC(9b658dd6) SHA1(eaaae289a3555aa6a92f57eea964dbbf48c5c2a4) )
r3426r3427
20321936   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
20331937   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
20341938
2035   ROM_REGION16_BE( 0x400000, "user1", 0)
1939   ROM_REGION16_BE( 0x400000, "romboard", 0)
20361940   ROM_LOAD16_BYTE( "mpr-13188-h.2",  0x000000, 0x80000, CRC(d3802294) SHA1(7608e71e8ef398ac24dbf851994253bca5ace625) )
20371941   ROM_LOAD16_BYTE( "mpr-13187-h.1",  0x000001, 0x80000, CRC(e3d8c5f7) SHA1(5b1e8646debee2f2ef272ddd3320b0a17192fbbe) )
20381942   ROM_LOAD16_BYTE( "mpr-13190.4",    0x100000, 0x40000, CRC(0b4df388) SHA1(340478bba82069ab745d6d8703e6801411fd2fc4) )
r3426r3427
20401944   ROM_LOAD16_BYTE( "mpr-13189.3",    0x100001, 0x40000, CRC(5ea5a2f3) SHA1(514b5446303c50aeb1d6d10d0a3f210da2577e16) )
20411945   ROM_RELOAD ( 0x180001, 0x40000)
20421946
2043   ROM_REGION( 0x1c2000, "user2", 0)
1947   ROM_REGION( 0x1c2000, "floppy", 0)
20441948   ROM_LOAD( "ds3-5000-07d.img", 0x000000, 0x1c2000, CRC(ea7a3302) SHA1(5f92efb2e1135c1f3eeca38ba5789739a22dbd11) ) /* Region letter needs to be verfied */
20451949ROM_END
20461950
r3426r3427
20491953   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
20501954   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
20511955
2052   ROM_REGION16_BE( 0x400000, "user1", 0)
1956   ROM_REGION16_BE( 0x400000, "romboard", 0)
20531957   ROM_LOAD16_BYTE( "mpr-13188-h.2",  0x000000, 0x80000, CRC(d3802294) SHA1(7608e71e8ef398ac24dbf851994253bca5ace625) )
20541958   ROM_LOAD16_BYTE( "mpr-13187-h.1",  0x000001, 0x80000, CRC(e3d8c5f7) SHA1(5b1e8646debee2f2ef272ddd3320b0a17192fbbe) )
20551959   ROM_LOAD16_BYTE( "mpr-13190.4",    0x100000, 0x40000, CRC(0b4df388) SHA1(340478bba82069ab745d6d8703e6801411fd2fc4) )
r3426r3427
20571961   ROM_LOAD16_BYTE( "mpr-13189.3",    0x100001, 0x40000, CRC(5ea5a2f3) SHA1(514b5446303c50aeb1d6d10d0a3f210da2577e16) )
20581962   ROM_RELOAD ( 0x180001, 0x40000)
20591963
2060   ROM_REGION( 0x1c2000, "user2", 0)
1964   ROM_REGION( 0x1c2000, "floppy", 0)
20611965   ROM_LOAD( "ds3-5000-07b.img", 0x000000, 0x1c2000, CRC(efa7f2a7) SHA1(eb905bff88fa40324fb92b91ac8a5878648c26e5) )
20621966ROM_END
20631967
r3426r3427
20661970    ROM_LOAD16_BYTE( "epr15343.ic2", 0x000000, 0x20000, CRC(c72399a7) SHA1(bfbf0079ea63f89bca4ce9081aed5d5c1d9d169a) )
20671971    ROM_LOAD16_BYTE( "epr15342.ic1", 0x000001, 0x20000, CRC(0968ac84) SHA1(4e1170ac123adaec32819754b5075531ff1925fe) )
20681972
2069    ROM_REGION16_BE( 0x400000, "user1", 0)
1973    ROM_REGION16_BE( 0x400000, "romboard", 0)
20701974    ROM_LOAD16_BYTE( "epr15345.ic5", 0x000000, 0x80000, CRC(88030b5d) SHA1(d2feeedb9a64c3dc8dd25716209f945d12fa9b53) )
20711975    ROM_LOAD16_BYTE( "epr15344.ic4", 0x000001, 0x80000, CRC(dd11b382) SHA1(2b0f49fb307a9aba0f295de64782ee095c557170) )
20721976    ROM_LOAD16_BYTE( "mpr15347.ic7", 0x100000, 0x80000, CRC(0472677b) SHA1(93ae57a2817b6b54c99814fca28ef51f7ff5e559) )
r3426r3427
20801984   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
20811985   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
20821986
2083   ROM_REGION( 0x1c2000, "user2", 0)
1987   ROM_REGION( 0x1c2000, "floppy", 0)
20841988   ROM_LOAD( "ds3-5000-02-.img", 0x000000, 0x1c2000, CRC(cefbda69) SHA1(5b47ae0f1584ce1eb697246273ba761bd9e981c1)  )
20851989ROM_END
20861990
r3426r3427
20891993   ROM_LOAD16_BYTE( "epr-11339.ic2", 0x000000, 0x20000, CRC(75130e73) SHA1(e079739f4a3da3807aac570442c5afef1a7d7b0e) )
20901994   ROM_LOAD16_BYTE( "epr-11338.ic1", 0x000001, 0x20000, CRC(7d4a7ff3) SHA1(3d3af04d990d232ba0a8fe155de59bc632a0a461) )
20911995
2092   ROM_REGION( 0x1d6000, "user2", 0)
1996   ROM_REGION( 0x1d6000, "floppy", 0)
20931997   ROM_LOAD( "ds3-5000-02-rev-a.img", 0x000000, 0x1d6000, CRC(0385470f) SHA1(62c1bfe3a88b2dee44629809e08b4b8a5770eaab)  )
20941998ROM_END
20951999
r3426r3427
20982002   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
20992003   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21002004
2101   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2005   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21022006   ROM_LOAD( "317-0058-02c.key", 0x0000, 0x2000,  CRC(ebae170e) SHA1(b6d1e1b6943a35b96e98e426ecb39bb5a42fb643) )
21032007
2104   ROM_REGION( 0x1c2000, "user2", 0)
2008   ROM_REGION( 0x1c2000, "floppy", 0)
21052009   ROM_LOAD( "ds3-5000-02c.img", 0x000000, 0x1c2000, NO_DUMP )
21062010ROM_END
21072011
r3426r3427
21102014   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21112015   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21122016
2113   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2017   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21142018   ROM_LOAD( "317-0058-05d.key", 0x0000, 0x2000, NO_DUMP )
21152019
2116   ROM_REGION( 0x1c2000, "user2", 0)
2020   ROM_REGION( 0x1c2000, "floppy", 0)
21172021   /* not sure which of these images is best */
21182022   ROM_LOAD( "ds3-5000-05d.img",      0x000000, 0x1c2000, CRC(e9a69f93) SHA1(dc15e47ed78373688c1fab72a9605528068ad702) )
21192023   ROM_LOAD( "ds3-5000-05d_alt.img",  0x000000, 0x1c2000, CRC(e71a8ebf) SHA1(60feb0af1cfc0508c8d68c8572495eec1763dc93) )
r3426r3427
21262030   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21272031   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21282032
2129   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2033   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21302034   ROM_LOAD( "317-0058-05c.key", 0x0000, 0x2000, CRC(ae0eabe5) SHA1(692d7565bf9c5b32cc80bb4bd88c9193aa04cbb0) )
21312035
2132   ROM_REGION( 0x1c2000, "user2", 0)
2036   ROM_REGION( 0x1c2000, "floppy", 0)
21332037   ROM_LOAD( "ds3-5000-05c.img", 0x000000, 0x1c2000, CRC(06c4f834) SHA1(5e178ed0edff7721c93f76da2e03ae188dc5efa4) )
21342038ROM_END
21352039
r3426r3427
21382042   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21392043   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21402044
2141   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2045   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21422046   ROM_LOAD( "317-0058-05b.key", 0x0000, 0x2000, CRC(adc0c83b) SHA1(2328d82d5057062eeb0072fd57f0422218cf24fc) )
21432047
2144   ROM_REGION( 0x1c2000, "user2", 0)
2048   ROM_REGION( 0x1c2000, "floppy", 0)
21452049   ROM_LOAD( "ds3-5000-05b.img", 0x000000, 0x1c2000,  CRC(a136668c) SHA1(7203f9d11023605a0a4b52a4be330785c8f7b623) )
21462050ROM_END
21472051
r3426r3427
21502054   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21512055   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21522056
2153   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2057   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21542058   ROM_LOAD( "317-0058-08b.key", 0x0000, 0x2000,  CRC(fe0a336a) SHA1(f7a5b2c1a057d0bb8c1ae0453c58aa8f5fb731b9) )
21552059
2156   ROM_REGION( 0x1c2000, "user2", 0)
2060   ROM_REGION( 0x1c2000, "floppy", 0)
21572061   ROM_LOAD( "ds3-5000-08b.img", 0x000000, 0x1c2000, CRC(5a886d38) SHA1(2e974a9ffe3534da4fb117c579b8b0e61a63542c) )
21582062ROM_END
21592063
r3426r3427
21622066   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21632067   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21642068
2165   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2069   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21662070   ROM_LOAD( "317-0058-03d.key", 0x0000, 0x2000,  CRC(e1785bbd) SHA1(b4bebb2829299f1c0815d6a5f317a2526b322f63) ) /* Also labeled "rev-A" but is it different? */
21672071
2168   ROM_REGION( 0x1c2000, "user2", 0)
2072   ROM_REGION( 0x1c2000, "floppy", 0)
21692073   ROM_LOAD( "ds3-5000-03d-rev-a.img", 0x000000, 0x1c2000, CRC(5c5910f2) SHA1(9ed564a03c0d4ca4a207f3ecfb7336c6cbcaa70f) )
21702074ROM_END
21712075
r3426r3427
21742078   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21752079   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21762080
2177   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2081   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21782082   ROM_LOAD( "317-0058-03b.key", 0x0000, 0x2000,  CRC(84aecdba) SHA1(ceddf967359a6e76543fe1ab00be53d0a11fe1ab) )
21792083
2180   ROM_REGION( 0x1c2000, "user2", 0)
2084   ROM_REGION( 0x1c2000, "floppy", 0)
21812085   ROM_LOAD( "ds3-5000-03b.img", 0x000000, 0x1c2000, CRC(7200dac9) SHA1(07cf33bf2a0da36e3852de409959f30128cdbf77) )
21822086ROM_END
21832087
r3426r3427
21862090   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21872091   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
21882092
2189   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2093   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
21902094   ROM_LOAD( "317-0058-04c.key", 0x0000, 0x2000,  CRC(16e978cc) SHA1(0e1482b5efa93b732d4cf0990919cb3fc903dca7) )
21912095
2192   ROM_REGION( 0x1c2000, "user2", 0)
2096   ROM_REGION( 0x1c2000, "floppy", 0)
21932097   ROM_LOAD( "ds3-5000-04c.img", 0x000000, 0x1c2000, CRC(5edc01a5) SHA1(8eb1bf41f533d16c12930f5831f8bccd4d8de4f7) )
21942098ROM_END
21952099
r3426r3427
21982102   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
21992103   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
22002104
2201   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2105   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
22022106   ROM_LOAD( "317-0058-04d.key", 0x0000, 0x2000,  CRC(934ac358) SHA1(73418e22c9d201bc3fec5c63284858958c010e05) )
22032107
2204   ROM_REGION( 0x1c2000, "user2", 0)
2108   ROM_REGION( 0x1c2000, "floppy", 0)
22052109   ROM_LOAD( "ds3-5000-04d.img", 0x000000, 0x1c2000, CRC(8679032c) SHA1(887b245a70652897fbda736b60e81a123866ec12) )
22062110ROM_END
22072111
r3426r3427
22102114   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
22112115   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
22122116
2213   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2117   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
22142118   ROM_LOAD( "317-0058-04b.key", 0x0000, 0x2000,  CRC(4a99a202) SHA1(d7375f09e7246ecd60ba0e48f049e9e252af92a8) ) /* Also labeled "rev-A" but is it different? */
22152119
2216   ROM_REGION( 0x1c2000, "user2", 0)
2120   ROM_REGION( 0x1c2000, "floppy", 0)
22172121   ROM_LOAD( "ds3-5000-04b-rev-a.img", 0x000000, 0x1c2000, CRC(5daa1a9a) SHA1(ce2f07b83b607bbbdb70f1ae344c1d897d601809) )
22182122ROM_END
22192123
r3426r3427
22222126   ROM_LOAD16_BYTE( "epr13948.bin", 0x000000, 0x20000, CRC(d6a031c8) SHA1(45b7e3cd2c7412e24f547cd4185166199d3938d5) )
22232127   ROM_LOAD16_BYTE( "epr13947.bin", 0x000001, 0x20000, CRC(7e3cff5e) SHA1(ff8cb776d2491796feeb8892c7e644e590438945) )
22242128
2225   ROM_REGION16_BE( 0x400000, "user1", 0)
2129   ROM_REGION16_BE( 0x400000, "romboard", 0)
22262130   ROM_LOAD16_BYTE( "epr-15345.2",  0x000000, 0x80000, CRC(d9e120c2) SHA1(b18b76733078d8534c6f0d8950632ab51e6a10ab) )
22272131   ROM_LOAD16_BYTE( "epr-15344.1",  0x000001, 0x80000, CRC(8f8b9f74) SHA1(de6b923118bea60197547ad016cb5d5e1a8f372b) )
22282132   ROM_LOAD16_BYTE( "mpr-14097-t.4",0x100000, 0x80000, CRC(4bd74cae) SHA1(5aa90bd5d2b8e2338ef0fe41d1f794e8d51321e1) )
r3426r3427
22342138   ROM_LOAD16_BYTE( "epr13948.bin", 0x000000, 0x20000, CRC(d6a031c8) SHA1(45b7e3cd2c7412e24f547cd4185166199d3938d5) )
22352139   ROM_LOAD16_BYTE( "epr13947.bin", 0x000001, 0x20000, CRC(7e3cff5e) SHA1(ff8cb776d2491796feeb8892c7e644e590438945) )
22362140
2237   ROM_REGION16_BE( 0x400000, "user1", 0)
2141   ROM_REGION16_BE( 0x400000, "romboard", 0)
22382142   ROM_LOAD16_BYTE( "epr-14095a.2", 0x000000, 0x80000, CRC(88d184e9) SHA1(519F3A22E1619DE9D5F13A45B85EBD249EBFA979) )
22392143   ROM_LOAD16_BYTE( "epr-14094a.1", 0x000001, 0x80000, CRC(7dd2b7d4) SHA1(C7EAF9E2700E0C55F7E867F5CD3FFAA5AAE97956) )
22402144   ROM_LOAD16_BYTE( "mpr-14097-t.4",0x100000, 0x80000, CRC(4bd74cae) SHA1(5aa90bd5d2b8e2338ef0fe41d1f794e8d51321e1) )
r3426r3427
22462150   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
22472151   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
22482152
2249   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2153   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
22502154   ROM_LOAD( "317-0058-09d.key", 0x0000, 0x2000, CRC(a91ebffb) SHA1(70b8b4272ca456491f254d115b434bb4ce73f049) )
22512155
2252   ROM_REGION( 0x1c2000, "user2", 0)
2156   ROM_REGION( 0x1c2000, "floppy", 0)
22532157   ROM_LOAD( "ds3-5000-09d.img", 0x000000, 0x1c2000,  CRC(69870887) SHA1(e47a997c2c783bf6670ab213ebe2ee35492eba34) )
22542158ROM_END
22552159
r3426r3427
22582162   ROM_LOAD16_BYTE( "epr-12187.ic2", 0x000000, 0x20000, CRC(e83783f3) SHA1(4b3b32df7de85aef9cd77c8a4ffc17e10466b638) )
22592163   ROM_LOAD16_BYTE( "epr-12186.ic1", 0x000001, 0x20000, CRC(ce76319d) SHA1(0ede61f0700f9161285c768fa97636f0e42b96f8) )
22602164
2261   ROM_REGION( 0x2000, "user3", 0 )   /* decryption key */
2165   ROM_REGION( 0x2000, "fd1094key", 0 )   /* decryption key */
22622166   ROM_LOAD( "317-0058-06b.key",    0x000000, 0x2000, CRC(6a5bf536) SHA1(3fc3e93ce8a47d7ee86da889efad2e7eca6e2ee9) )
22632167
2264   ROM_REGION( 0x1c2000, "user2", 0)
2168   ROM_REGION( 0x1c2000, "floppy", 0)
22652169   ROM_LOAD( "ds3-5000-06b.img",    0x000000, 0x1c2000, CRC(a7fb2149) SHA1(c04266ae31700b085ab45606aed83019a563de70) )
22662170ROM_END
22672171
r3426r3427
22712175           'd' = US
22722176*/
22732177
2178
22742179/*************************************
22752180 *
2181 *  Game-specific driver inits
2182 *
2183 *************************************/
2184
2185static DRIVER_INIT( qgh )
2186{
2187   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2188   mlatch_table = qgh_mlt;
2189   track_size = 0;
2190}
2191
2192static DRIVER_INIT( dcclub )
2193{
2194   system24temp_sys16_io_set_callbacks(dcclub_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2195   mlatch_table = dcclub_mlt;
2196   track_size = 0;
2197}
2198
2199static DRIVER_INIT( qrouka )
2200{
2201   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2202   mlatch_table = qrouka_mlt;
2203   track_size = 0;
2204}
2205
2206static DRIVER_INIT( quizmeku )
2207{
2208   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2209   mlatch_table = quizmeku_mlt;
2210   track_size = 0;
2211}
2212
2213static DRIVER_INIT( mahmajn )
2214{
2215   system24temp_sys16_io_set_callbacks(mahmajn_io_r, mahmajn_io_w, resetcontrol_w, iod_r, iod_w);
2216   mlatch_table = mahmajn_mlt;
2217   track_size = 0;
2218   cur_input_line = 0;
2219}
2220
2221static DRIVER_INIT( mahmajn2 )
2222{
2223   system24temp_sys16_io_set_callbacks(mahmajn_io_r, mahmajn_io_w, resetcontrol_w, iod_r, iod_w);
2224   mlatch_table = mahmajn2_mlt;
2225   track_size = 0;
2226   cur_input_line = 0;
2227}
2228
2229static DRIVER_INIT( hotrod )
2230{
2231   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2232   mlatch_table = 0;
2233
2234   // Sector  Size
2235   // 1       8192
2236   // 2       1024
2237   // 3       1024
2238   // 4       1024
2239   // 5        512
2240   // 6        256
2241
2242   track_size = 0x2f00;
2243}
2244
2245static DRIVER_INIT( bnzabros )
2246{
2247   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2248   mlatch_table = bnzabros_mlt;
2249
2250   // Sector  Size
2251   // 1       2048
2252   // 2       2048
2253   // 3       2048
2254   // 4       2048
2255   // 5       2048
2256   // 6       1024
2257   // 7        256
2258
2259   track_size = 0x2d00;
2260}
2261
2262static DRIVER_INIT( sspirits )
2263{
2264   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2265   mlatch_table = 0;
2266   track_size = 0x2d00;
2267   s24_fd1094_driver_init(machine);
2268}
2269
2270static DRIVER_INIT( sspiritj )
2271{
2272   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2273   mlatch_table = 0;
2274   track_size = 0x2f00;
2275   s24_fd1094_driver_init(machine);
2276}
2277
2278static DRIVER_INIT( dcclubfd )
2279{
2280   system24temp_sys16_io_set_callbacks(dcclub_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2281   mlatch_table = dcclub_mlt;
2282   track_size = 0x2d00;
2283   s24_fd1094_driver_init(machine);
2284}
2285
2286
2287static DRIVER_INIT( sgmast )
2288{
2289   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2290   mlatch_table = 0;
2291   track_size = 0x2d00;
2292   s24_fd1094_driver_init(machine);
2293}
2294
2295static DRIVER_INIT( qsww )
2296{
2297   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2298   mlatch_table = 0;
2299   track_size = 0x2d00;
2300   s24_fd1094_driver_init(machine);
2301}
2302
2303static DRIVER_INIT( gground )
2304{
2305   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2306   mlatch_table = 0;
2307   track_size = 0x2d00;
2308   s24_fd1094_driver_init(machine);
2309}
2310
2311static DRIVER_INIT( crkdown )
2312{
2313   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2314   mlatch_table = 0;
2315   track_size = 0x2d00;
2316   s24_fd1094_driver_init(machine);
2317}
2318
2319static DRIVER_INIT( roughrac )
2320{
2321   system24temp_sys16_io_set_callbacks(hotrod_io_r, hotrod_io_w, resetcontrol_w, iod_r, iod_w);
2322   mlatch_table = 0;
2323   track_size = 0x2d00;
2324   s24_fd1094_driver_init(machine);
2325}
2326
2327
2328/*************************************
2329 *
22762330 *  Game driver(s)
22772331 *
22782332 *************************************/
src/mame/drivers/snookr10.c
r3426r3427
7777    To initialize NVRAM (for all games), keep pressed ESTATISTICA (key '9') + MANAGEMENT (key '0'),
7878    then press RESET (key F3), and finally release both (ESTATISTICA + MANAGEMENT) keys.
7979
80    Enter ESTATISTICA (key '9'), to enter the stats mode. Press CANCELLA/PLAY (key 'N')
80    Enter ESTATISTICA (key '9'), to enter the stats mode. Press PLAY/CANCELLA (key 'N')
8181    for 5 seconds to reset all values to zero. Press START (key '1') to exit the mode.
8282
83    Enter MANAGEMENT (key '0'), to enter the management mode. Press CANCELLA/PLAY (key 'N')
83    Enter MANAGEMENT (key '0'), to enter the management mode. Press PLAY/CANCELLA (key 'N')
8484    to access the PROGRAMAZZIONE (program mode), where you can change the game parameters.
8585    Press START (key '1') to exit both modes.
8686
r3426r3427
267267    $4001 - $4001   Input Port 1   ;R
268268    $4002 - $4002   Input Port 2   ;R
269269    $4003 - $4003   Input Port 3   ;R  , DIP switches.
270    $5000 - $5000   Output Port A  ;W  , lamps.
271    $5001 - $5001   Output Port B  ;W  , lamps.
270    $5000 - $5000   Output Port 0  ;W  , lamps & counters.
271    $5001 - $5001   Output Port 1  ;W  , lamps.
272272    $6000 - $6FFF   Video RAM
273273    $7000 - $7FFF   Color RAM
274274    $8000 - $FFFF   ROM Space
r3426r3427
283283    $3002 - $3002   Input Port 2   ;R
284284    $3003 - $3003   Input Port 3   ;R  , DIP switches.
285285    $3004 - $3004   Input Port 4   ;R  , bit 7 in parallel with DIP switch 1.
286    $5000 - $5000   Output Port A  ;W  , lamps.
287    $5001 - $5001   Output Port B  ;W  , lamps.
286    $5000 - $5000   Output Port 0  ;W  , lamps & counters.
287    $5001 - $5001   Output Port 1  ;W  , lamps.
288288    $6000 - $6FFF   Video RAM
289289    $7000 - $7FFF   Color RAM
290290    $8000 - $FFFF   ROM Space
r3426r3427
296296    *** Driver Updates ***
297297
298298
299    [2008/10/09]
300    - Reworked the button-lamps matrix system.
301    - Documented both output ports.
302    - Connected coin in, key in and payout counters.
303    - Improved the lamps layout to be more realistic.
304    - Updated technical notes.
305
299306    [2008/06/09]
300307    - Fixed the tilemap size.
301308    - Fixed the screen size.
r3426r3427
346353
347354    *** TO DO ***
348355
349    - Fix lamps.
356    - Nothing. :)
350357
351358
352359***********************************************************************************/
r3426r3427
368375VIDEO_START( apple10 );
369376VIDEO_UPDATE( snookr10 );
370377
378int outportl, outporth;
379int bit0, bit1, bit2, bit3, bit4, bit5;
371380
372381/**********************
373382* Read/Write Handlers *
r3426r3427
375384**********************/
376385
377386static READ8_HANDLER( dsw_port_1_r )
378/*-----------------------------------
387{
388/*
389   --------------------------------
379390    PORT 0x3004 ;INPUT PORT 4
380-------------------------------------
391   --------------------------------
381392    BIT 0 =
382393    BIT 1 =
383394    BIT 2 =
r3426r3427
386397    BIT 5 =
387398    BIT 6 =
388399    BIT 7 = Complement of DS1, bit 7
389------------------------------------*/
390{
400   ---------------------------------
401*/
391402return input_port_read(machine, "SW1");
392403}
393404
405
394406/**********************
395407* Read/Write Handlers *
396408*  - Output Ports -   *
397409**********************/
398410
399/*  Lamps are multiplexed using a 5 bit matrix.
411/*  Lamps are multiplexed using a 6 bit matrix.
400412    The first 4 bits are from Port A, and the
401    remaining one is from Port B.
413    remaining 2 are from Port B.
402414
403415    LAMPS components:
404416
405    START  = bit1 & bit3
406    CANCEL = bit0 & bit3
407    STOP1  = bit1 only
408    STOP2  = bit1 & bit2
409    STOP3  = bit1 only
410    STOP4  = bit1 & bit4
411    STOP5  = bit0 & bit4
417    START  = bit5
418    CANCEL = bit2
419    STOP1  = bit0
420    STOP2  = bit1
421    STOP3  = bit0
422    STOP4  = bit3
423    STOP5  = bit4
412424*/
413425
414426static WRITE8_HANDLER( output_port_0_w )
415/*-----------------------------
427{
428/*
429   ----------------------------
416430    PORT 0x5000 ;OUTPUT PORT A
417-------------------------------
418    BIT 0 =
419    BIT 1 = Lamps matrix, bit0
420    BIT 2 =
421    BIT 3 = Lamps matrix, bit1
422    BIT 4 =
423    BIT 5 = Lamps matrix, bit2
431   ----------------------------
432    BIT 0 = Coin counter.
433    BIT 1 = Lamps matrix, bit0.
434    BIT 2 = Payout x10.
435    BIT 3 = Lamps matrix, bit1.
436    BIT 4 = Key in.
437    BIT 5 = Lamps matrix, bit2.
424438    BIT 6 =
425    BIT 7 = Lamps matrix, bit3
426------------------------------*/
427{
428   int bit0, bit1, bit2, bit3, bit4;
439    BIT 7 = Lamps matrix, bit3.
440   ----------------------------
441*/
442   outportl = data;
429443
430444   bit0 = (data >> 1) & 1;
431445   bit1 = (data >> 3) & 1;
432446   bit2 = (data >> 5) & 1;
433447   bit3 = (data >> 7) & 1;
434   bit4 = (input_port_read_safe(machine, "IN5", 0) & 1); /* "IN5" has yet to be implemented! */
448   bit4 = outporth & 1;
449   bit5 = (outporth >> 1) & 1;
435450
436   output_set_lamp_value(1, (bit1 & bit3));   /* Lamp 1 - START  */
437   output_set_lamp_value(2, (bit0 & bit3));   /* Lamp 2 - CANCEL */
438   output_set_lamp_value(3, (bit1 | bit3));   /* Lamp 3 - STOP1  */
439   output_set_lamp_value(4, (bit1 & bit2));   /* Lamp 4 - STOP2  */
440   output_set_lamp_value(5, (bit1 | bit3));   /* Lamp 5 - STOP3  */
451   output_set_lamp_value(0, bit5);   /* Lamp 0 - START  */
452   output_set_lamp_value(1, bit2);   /* Lamp 1 - CANCEL */
453   output_set_lamp_value(2, bit0);   /* Lamp 2 - STOP1  */
454   output_set_lamp_value(3, bit1);   /* Lamp 3 - STOP2  */
455   output_set_lamp_value(4, bit0);   /* Lamp 4 - STOP3  */
456   output_set_lamp_value(5, bit3);   /* Lamp 5 - STOP4  */
457   output_set_lamp_value(6, bit4);   /* Lamp 6 - STOP5  */
458
459   coin_counter_w(0, data & 0x01);   /* Coin in */
460   coin_counter_w(1, data & 0x10);   /* Key in */
461   coin_counter_w(2, data & 0x04);   /* Payout x10 */
462
463//   logerror("high: %04x - low: %X \n", outporth, outportl);
464//   popmessage("written : %02X", data);
441465}
442466
443467static WRITE8_HANDLER( output_port_1_w )
444/*-----------------------------
468{
469/*
470   ----------------------------
445471    PORT 0x5001 ;OUTPUT PORT B
446-------------------------------
472   ----------------------------
447473    BIT 0 = Lamps matrix, bit4
448    BIT 1 =
474    BIT 1 = Lamps matrix, bit5
449475    BIT 2 =
450476    BIT 3 =
451477    BIT 4 =
452478    BIT 5 =
453479    BIT 6 =
454480    BIT 7 =
455------------------------------*/
456{
457   int bit0, bit1, bit4;
481   ----------------------------
482*/
483   outporth = data << 8;
458484
459   bit0 = (input_port_read_safe(machine, "IN4", 0) >> 1) & 1; /* "IN4" has yet to be implemented! */
460   bit1 = (input_port_read_safe(machine, "IN4", 0) >> 3) & 1; /* "IN4" has yet to be implemented! */
461   bit4 = (data & 1);
485   bit0 = (outportl >> 1) & 1;
486   bit1 = (outportl >> 3) & 1;
487   bit2 = (outportl >> 5) & 1;
488   bit3 = (outportl >> 7) & 1;
489   bit4 = data & 1;
490   bit5 = (data >> 1) & 1;
462491
463   output_set_lamp_value(6, (bit1 & bit4));   /* Lamp 6 - STOP4  */
464   output_set_lamp_value(7, (bit0 & bit4));   /* Lamp 7 - STOP5  */
492   output_set_lamp_value(0, bit5);   /* Lamp 0 - START  */
493   output_set_lamp_value(1, bit2);   /* Lamp 1 - CANCEL */
494   output_set_lamp_value(2, bit0);   /* Lamp 2 - STOP1  */
495   output_set_lamp_value(3, bit1);   /* Lamp 3 - STOP2  */
496   output_set_lamp_value(4, bit0);   /* Lamp 4 - STOP3  */
497   output_set_lamp_value(5, bit3);   /* Lamp 5 - STOP4  */
498   output_set_lamp_value(6, bit4);   /* Lamp 6 - STOP5  */
465499}
466500
467501
src/mame/drivers/egghunt.c
r3426r3427
9595static TILE_GET_INFO( get_bg_tile_info )
9696{
9797   int code = ((egghunt_bgram[tile_index*2+1] << 8) | egghunt_bgram[tile_index*2]) & 0x3fff;
98   int colour = egghunt_atram[tile_index];
98   int colour = egghunt_atram[tile_index] & 0x3f;
9999
100100   if(code & 0x2000)
101101   {
r3426r3427
396396   MDRV_SCREEN_VISIBLE_AREA(8*8, 56*8-1, 1*8, 31*8-1)
397397
398398   MDRV_GFXDECODE(egghunt)
399   MDRV_PALETTE_LENGTH(0x800)
399   MDRV_PALETTE_LENGTH(0x400)
400400
401401   MDRV_VIDEO_START(egghunt)
402402   MDRV_VIDEO_UPDATE(egghunt)
src/mame/drivers/gpworld.c
r3426r3427
4949static UINT8 start_lamp;
5050static UINT8 ldp_read_latch;
5151static UINT8 ldp_write_latch;
52static UINT8 brake_gas;
5253
5354static UINT8* tile_RAM;
5455static UINT8* sprite_RAM;
r3426r3427
225226   return ldp_read_latch;
226227}
227228
229static READ8_HANDLER( pedal_in )
230{
231   if (brake_gas)
232      return    input_port_read(machine, "INACCEL");
233
234   return    input_port_read(machine, "INBRAKE");
235
236}
237
228238/* WRITES */
229239static WRITE8_HANDLER( ldp_write )
230240{
r3426r3427
235245{
236246   start_lamp = (data & 0x04) >> 1;
237247   nmi_enable = (data & 0x40) >> 6;
238/*  dunno      = (data & 0x80) >> 7; */
248   /*  dunno      = (data & 0x80) >> 7; */ //coin counter???
239249
240250   logerror("NMI : %x (0x%x)\n", nmi_enable, data);
241251}
242252
253static WRITE8_HANDLER( brake_gas_write )
254{
255   brake_gas = data & 0x01;
256}
257
243258static WRITE8_HANDLER( palette_write )
244259{
245260   /* This is all just a (bad) guess */
r3426r3427
268283   AM_RANGE(0xd000,0xd7ff) AM_RAM AM_BASE(&tile_RAM)
269284   AM_RANGE(0xd800,0xd800) AM_READWRITE(ldp_read,ldp_write)
270285/*  AM_RANGE(0xd801,0xd801) AM_READ(???) */
271   AM_RANGE(0xda00,0xda00) AM_READ_PORT("INWHEEL")
286   AM_RANGE(0xda00,0xda00) AM_READ_PORT("INWHEEL")   //8255 here....
272287/*  AM_RANGE(0xda01,0xda01) AM_WRITE(???) */               /* These inputs are interesting - there are writes and reads all over these addr's */
273/*  AM_RANGE(0xda02,0xda02) AM_READ_PORT("???") */            /* Reads here during the input test. */
274   AM_RANGE(0xda20,0xda20) AM_READ_PORT("INACCEL")            /* Seems to control both the brake and accel at once - maybe tied to 0xda02? Or to the writes here... */
288   AM_RANGE(0xda02,0xda02) AM_WRITE(brake_gas_write)            /*bit 0 select gas/brake input */
289   AM_RANGE(0xda20,0xda20) AM_READ(pedal_in)
275290
276291   AM_RANGE(0xe000,0xffff) AM_RAM                        /* Potentially not all work RAM? */
277292ADDRESS_MAP_END
r3426r3427
320335   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "STRONG LEFT" ) PORT_CODE( KEYCODE_E )
321336   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "FIERCE LEFT" ) PORT_CODE( KEYCODE_W )
322337
323   PORT_START("INACCEL")   /* both accelerator & brake right now :P */
338   PORT_START("INACCEL")
324339   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
325340
341   PORT_START("INBRAKE")
342   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
343
326344   PORT_START("DSW1")
327345   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
328346   PORT_DIPSETTING(    0x70, DEF_STR( 4C_1C ) )
r3426r3427
490508{
491509   nmi_enable = 0;
492510   start_lamp = 0;
511   brake_gas = 0;
493512   ldp_write_latch = ldp_read_latch = 0;
494513}
495514
src/mame/drivers/fuukifg2.c
r3426r3427
425425            also used for water effects and titlescreen linescroll on gogomile
426426*/
427427
428static TIMER_CALLBACK( irq_off )
429{
430   cpunum_set_input_line(machine, 0, param, CLEAR_LINE);
431}
432
428433static TIMER_CALLBACK( level_1_interrupt_callback )
429434{
430   cpunum_set_input_line(machine, 0, 1, PULSE_LINE);
435   cpunum_set_input_line(machine, 0, 1, ASSERT_LINE);
436   timer_set(ATTOTIME_IN_USEC(1), NULL, 1, irq_off);
431437   timer_set(video_screen_get_time_until_pos(machine->primary_screen, 248, 0), NULL, 0, level_1_interrupt_callback);
432438}
433439
434440
435441static TIMER_CALLBACK( vblank_interrupt_callback )
436442{
437   cpunum_set_input_line(machine, 0, 3, PULSE_LINE);   // VBlank IRQ
443   cpunum_set_input_line(machine, 0, 3, ASSERT_LINE);   // VBlank IRQ
444   timer_set(ATTOTIME_IN_USEC(1), NULL, 3, irq_off);
438445   timer_set(video_screen_get_time_until_vblank_start(machine->primary_screen), NULL, 0, vblank_interrupt_callback);
439446}
440447
441448
442449static TIMER_CALLBACK( raster_interrupt_callback )
443450{
444   cpunum_set_input_line(machine, 0, 5, PULSE_LINE);   // Raster Line IRQ
451   cpunum_set_input_line(machine, 0, 5, ASSERT_LINE);   // Raster Line IRQ
452   timer_set(ATTOTIME_IN_USEC(1), NULL, 5, irq_off);
445453   video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
446454   timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(machine->primary_screen), 0);
447455}
src/mame/drivers/sengokmj.c
r3426r3427
6767{
6868   switch(sengokumj_mux_data)
6969   {
70      case 1:    return input_port_read(machine, "KEY0");
71      case 2:    return input_port_read(machine, "KEY1");
72      case 4:    return input_port_read(machine, "KEY2");
73      case 8:    return input_port_read(machine, "KEY3");
74      case 0x10: return input_port_read(machine, "KEY4");
75      case 0x20: return input_port_read(machine, "UNUSED");
70      case 0x0100: return input_port_read(machine, "KEY0");
71      case 0x0200: return input_port_read(machine, "KEY1");
72      case 0x0400: return input_port_read(machine, "KEY2");
73      case 0x0800: return input_port_read(machine, "KEY3");
74      case 0x1000: return input_port_read(machine, "KEY4");
75      case 0x2000: return input_port_read(machine, "UNUSED");
7676   }
7777
7878   return 0xffff;
r3426r3427
8080
8181static WRITE16_HANDLER( mahjong_panel_w )
8282{
83   if (ACCESSING_BITS_8_15)
84      sengokumj_mux_data = data >> 8;
83      sengokumj_mux_data = data;
8584}
8685
8786static WRITE16_HANDLER( sengokmj_out_w )
r3426r3427
167166   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
168167
169168   PORT_START("KEY0")
170   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
171   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )
172   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )
173   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )
174   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
175   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
176   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
177   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
169   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A )
170   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_E )
171   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_I )
172   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_M )
173   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
174   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START1 )
175   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
176   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
177   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
178178
179
179180   PORT_START("KEY1")
180   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )
181   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )
182   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )
183   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )
184   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
185   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
186   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
187   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
181   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_B )
182   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_F )
183   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J )
184   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_N )
185   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
186   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
187   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
188   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
189   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
188190
189191   PORT_START("KEY2")
190   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )
191   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )
192   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )
193   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
194   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
195   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
196   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
197   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
192   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_C )
193   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_G )
194   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_K )
195   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
196   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
197   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
198   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
199   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
200   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
198201
199202   PORT_START("KEY3")
200   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )
201   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )
202   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )
203   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
204   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
205   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
206   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
207   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
203   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_D )
204   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_H )
205   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_L )
206   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
207   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
208   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
209   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
210   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
211   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
208212
209213   PORT_START("KEY4")
210   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
211   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
212   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
213   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
214   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
215   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
216   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
217   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
214   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
215   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
216   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
217   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
218   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
219   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
220   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
221   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
222   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
218223
219224   PORT_START("UNUSED")
220   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
225   PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
221226
222227   PORT_START("DSW2")
223228   PORT_DIPNAME( 0x0001, 0x0001, "Door" )
src/mame/drivers/fuukifg3.c
r3426r3427
543543
544544***************************************************************************/
545545
546static TIMER_CALLBACK( irq_off )
547{
548   cpunum_set_input_line(machine, 0, param, CLEAR_LINE);
549}
550
546551static TIMER_CALLBACK( level_1_interrupt_callback )
547552{
548   cpunum_set_input_line(machine, 0, 1, PULSE_LINE);
553   cpunum_set_input_line(machine, 0, 1, ASSERT_LINE);
554   timer_set(ATTOTIME_IN_USEC(1), NULL, 1, irq_off);
549555   timer_set(video_screen_get_time_until_pos(machine->primary_screen, 248, 0), NULL, 0, level_1_interrupt_callback);
550556}
551557
552558
553559static TIMER_CALLBACK( vblank_interrupt_callback )
554560{
555   cpunum_set_input_line(machine, 0, 3, PULSE_LINE);   // VBlank IRQ
561   cpunum_set_input_line(machine, 0, 3, ASSERT_LINE);   // VBlank IRQ
562   timer_set(ATTOTIME_IN_USEC(1), NULL, 3, irq_off);
556563   timer_set(video_screen_get_time_until_vblank_start(machine->primary_screen), NULL, 0, vblank_interrupt_callback);
557564}
558565
559566
560567static TIMER_CALLBACK( raster_interrupt_callback )
561568{
562   cpunum_set_input_line(machine, 0, 5, PULSE_LINE);   // Raster Line IRQ
569   cpunum_set_input_line(machine, 0, 5, ASSERT_LINE);   // Raster Line IRQ
570   timer_set(ATTOTIME_IN_USEC(1), NULL, 5, irq_off);
563571   video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen));
564572   timer_adjust_oneshot(raster_interrupt_timer, video_screen_get_frame_period(machine->primary_screen), 0);
565573}
src/emu/cpu/z180/z180.c
r3426r3427
7878
7979#include "debugger.h"
8080#include "deprecat.h"
81#include "driver.h"
8182#include "z180.h"
8283#include "cpu/z80/z80daisy.h"
8384
r3426r3427
19001901{
19011902   Z180.daisy = NULL;
19021903   if (config)
1903      Z180.daisy = z80daisy_init(Machine, config);
1904      Z180.daisy = z80daisy_init(Machine, Machine->config->cpu[cpu_getactivecpu()].tag, config);
19041905   Z180.irq_callback = irqcallback;
19051906
19061907   state_save_register_item("z180", index, Z180.AF.w.l);
src/emu/cpu/nec/nec.c
r3426r3427
114114#include "nec.h"
115115#include "necintrf.h"
116116
117
118117/* default configuration */
119118static const nec_config default_config =
120119{
r3426r3427
865864OP( 0xe8, i_call_d16 ) { UINT32 tmp; FETCHWORD(tmp); PUSH(I.ip); I.ip = (WORD)(I.ip+(INT16)tmp); CHANGE_PC; nec_ICount-=24; }
866865OP( 0xe9, i_jmp_d16  ) { UINT32 tmp; FETCHWORD(tmp); I.ip = (WORD)(I.ip+(INT16)tmp); CHANGE_PC; nec_ICount-=15; }
867866OP( 0xea, i_jmp_far  ) { UINT32 tmp,tmp1; FETCHWORD(tmp); FETCHWORD(tmp1); I.sregs[PS] = (WORD)tmp1;    I.ip = (WORD)tmp; CHANGE_PC; nec_ICount-=27;  }
868OP( 0xeb, i_jmp_d8   ) { int tmp = (int)((INT8)FETCH); nec_ICount-=12;
869   if (tmp==-2 && I.no_interrupt==0 && (I.pending_irq==0) && nec_ICount>0) nec_ICount%=12; /* cycle skip */
870   I.ip = (WORD)(I.ip+tmp);
871}
867OP( 0xeb, i_jmp_d8   ) { int tmp = (int)((INT8)FETCH); nec_ICount-=12; I.ip = (WORD)(I.ip+tmp); }
872868OP( 0xec, i_inaldx   ) { I.regs.b[AL] = read_port_byte(I.regs.w[DW]); CLKS(8,8,5);}
873869OP( 0xed, i_inaxdx   ) { I.regs.w[AW] = read_port_word(I.regs.w[DW]); CLKW(12,12,7,12,8,5,I.regs.w[DW]); }
874870OP( 0xee, i_outdxal  ) { write_port_byte(I.regs.w[DW], I.regs.b[AL]); CLKS(8,8,3);   }
src/emu/cpu/i8051/8051dasm.c
r3426r3427
244244      case 0xc1:
245245      case 0xe1:
246246         addr = opram[PC++ - pc];
247         addr|= (PC++ & 0xf800) | ((op & 0xe0) << 3);
247         addr|= (PC & 0xf800) | ((op & 0xe0) << 3);
248248         sprintf(dst, "ajmp  $%04X", addr);
249249         break;
250250
src/emu/cpu/i8051/i8051.c
r3426r3427
402402
403403/* Any pending IRQ */
404404#define SERIALPORT_IRQ    ((R_SCON & 0x03) && GET_ES)
405#define TIMERS_IRQ        ((GET_TF0 && GET_ET0) || (GET_TF1 && GET_ET1))
406#define EXTERNAL_IRQ      ((GET_IE0 && GET_EX0) || (GET_IE1 && GET_EX1))
405407
406408#if (HAS_I8052 || HAS_I8752)
407#define NO_PENDING_IRQ  !(R_TCON & 0xaa) && !(SERIALPORT_IRQ) && !(GET_ET2 && (GET_TF2 || GET_EXF2))
409#define NO_PENDING_IRQ  !(TIMERS_IRQ) && !(EXTERNAL_IRQ) && !(SERIALPORT_IRQ) && !(GET_ET2 && (GET_TF2 || GET_EXF2))
408410#else
409#define NO_PENDING_IRQ  !(R_TCON & 0xaa) && !(SERIALPORT_IRQ)
411#define NO_PENDING_IRQ  !(TIMERS_IRQ) && !(EXTERNAL_IRQ) && !(SERIALPORT_IRQ)
410412#endif
411413
412414/* Clear Current IRQ  */
r3426r3427
606608      if(PC != PPC)   op = cpu_readop(PC);
607609
608610      //Update Timer (if any timers are running)
609      if((GET_TR0 && GET_ET0) || (GET_TR1 && GET_ET1))
611      if(GET_TR0 || GET_TR1)
610612         update_timer(i8051.prev_used_cycles);
611613
612614      //Update Serial (if serial port sending data)
src/emu/cpu/z80/z80daisy.h
r3426r3427
6060    FUNCTION PROTOTYPES
6161***************************************************************************/
6262
63z80_daisy_state *z80daisy_init(running_machine *machine, const z80_daisy_chain *daisy);
63z80_daisy_state *z80daisy_init(running_machine *machine, const char *cputag, const z80_daisy_chain *daisy);
6464
6565void z80daisy_reset(z80_daisy_state *daisy);
6666int z80daisy_update_irq_state(z80_daisy_state *chain);
src/emu/cpu/z80/z80.c
r3426r3427
9595
9696#include "debugger.h"
9797#include "deprecat.h"
98#include "driver.h"
9899#include "z80.h"
99100#include "z80daisy.h"
100101
r3426r3427
34993500   /* Reset registers to their initial values */
35003501   memset(&Z80, 0, sizeof(Z80));
35013502   if (config != NULL)
3502      Z80.daisy = z80daisy_init(Machine, config);
3503      Z80.daisy = z80daisy_init(Machine, Machine->config->cpu[cpu_getactivecpu()].tag, config);
35033504   Z80.irq_callback = irqcallback;
35043505   IX = IY = 0xffff; /* IX and IY are FFFF after a reset! */
35053506   F = ZF;         /* Zero flag is set */
src/emu/cpu/z80/z80daisy.c
r3426r3427
2020};
2121
2222
23z80_daisy_state *z80daisy_init(running_machine *machine, const z80_daisy_chain *daisy)
23z80_daisy_state *z80daisy_init(running_machine *machine, const char *cputag, const z80_daisy_chain *daisy)
2424{
25   astring *tempstring = astring_alloc();
2526   z80_daisy_state *head = NULL;
2627   z80_daisy_state **tailptr = &head;
2728
r3426r3427
3031   {
3132      *tailptr = auto_malloc(sizeof(**tailptr));
3233      (*tailptr)->next = NULL;
33      (*tailptr)->device = devtag_get_device(machine, daisy->devtype, daisy->devname);
34      (*tailptr)->device = devtag_get_device(machine, daisy->devtype, device_inherit_tag(tempstring, cputag, daisy->devname));
35      if ((*tailptr)->device == NULL)
36         fatalerror("Unable to locate device '%s'", daisy->devname);
3437      (*tailptr)->irq_state = (z80_daisy_irq_state)device_get_info_fct((*tailptr)->device, DEVINFO_FCT_IRQ_STATE);
3538      (*tailptr)->irq_ack = (z80_daisy_irq_ack)device_get_info_fct((*tailptr)->device, DEVINFO_FCT_IRQ_ACK);
3639      (*tailptr)->irq_reti = (z80_daisy_irq_reti)device_get_info_fct((*tailptr)->device, DEVINFO_FCT_IRQ_RETI);
3740      tailptr = &(*tailptr)->next;
3841   }
3942
43   astring_free(tempstring);
4044   return head;
4145}
4246
src/emu/video/resnet.c
r3426r3427
700700   int i,j,k;
701701   rgb_t *rgb;
702702
703   rgb = malloc_or_die((rdi->end - rdi->start + 1)*sizeof(rgb_t));
703   rgb = auto_malloc((rdi->end - rdi->start + 1)*sizeof(rgb_t));
704704   for (i=rdi->start; i<=rdi->end; i++)
705705   {
706706      UINT8 t[3] = {0,0,0};
src/emu/video.c
r3426r3427
20782078            if (screen->token != NULL)
20792079            {
20802080               screen_state *state = get_safe_token(screen);
2081               min_frame_period = MIN(min_frame_period, state->frame_period);
2081               if (state->frame_period != 0)
2082                  min_frame_period = MIN(min_frame_period, state->frame_period);
20822083            }
20832084
20842085         /* compute a target speed as an integral percentage */
src/emu/memory.c
r3426r3427
367367    FUNCTION PROTOTYPES
368368***************************************************************************/
369369
370static void address_map_detokenize(address_map *map, const game_driver *driver, const addrmap_token *tokens);
370static void address_map_detokenize(address_map *map, const game_driver *driver, const char *cputag, const addrmap_token *tokens);
371371
372372static void memory_init_cpudata(running_machine *machine);
373373static void memory_init_preflight(running_machine *machine);
r3426r3427
854854
855855address_map *address_map_alloc(const machine_config *config, const game_driver *driver, int cpunum, int spacenum)
856856{
857   const char *cputag = config->cpu[cpunum].tag;
857858   int cputype = config->cpu[cpunum].type;
858859   const addrmap_token *internal_map = (const addrmap_token *)cputype_get_info_ptr(cputype, CPUINFO_PTR_INTERNAL_MEMORY_MAP + spacenum);
859860   address_map *map;
r3426r3427
863864
864865   /* append the internal CPU map (first so it takes priority) */
865866   if (internal_map != NULL)
866      address_map_detokenize(map, driver, internal_map);
867      address_map_detokenize(map, driver, cputag, internal_map);
867868
868869   /* construct the standard map */
869870   if (config->cpu[cpunum].address_map[spacenum][0] != NULL)
870      address_map_detokenize(map, driver, config->cpu[cpunum].address_map[spacenum][0]);
871      address_map_detokenize(map, driver, cputag, config->cpu[cpunum].address_map[spacenum][0]);
871872   if (config->cpu[cpunum].address_map[spacenum][1] != NULL)
872      address_map_detokenize(map, driver, config->cpu[cpunum].address_map[spacenum][1]);
873      address_map_detokenize(map, driver, cputag, config->cpu[cpunum].address_map[spacenum][1]);
873874
874875   return map;
875876}
r3426r3427
887888   {
888889      address_map_entry *entry = map->entrylist;
889890      map->entrylist = entry->next;
891      if (entry->read_devtag_string != NULL)
892         astring_free(entry->read_devtag_string);
893      if (entry->write_devtag_string != NULL)
894         astring_free(entry->write_devtag_string);
895      if (entry->region_string != NULL)
896         astring_free(entry->region_string);
890897      free(entry);
891898   }
892899
r3426r3427
928935      fatalerror("%s: %s AM_RANGE(0x%x, 0x%x) setting %s already set!\n", driver->source_file, driver->name, entry->addrstart, entry->addrend, #field); \
929936   } while (0)
930937
931static void address_map_detokenize(address_map *map, const game_driver *driver, const addrmap_token *tokens)
938static void address_map_detokenize(address_map *map, const game_driver *driver, const char *cputag, const addrmap_token *tokens)
932939{
933940   address_map_entry **entryptr;
934941   address_map_entry *entry;
r3426r3427
967974
968975         /* including */
969976         case ADDRMAP_TOKEN_INCLUDE:
970            address_map_detokenize(map, driver, TOKEN_GET_PTR(tokens, tokenptr));
977            address_map_detokenize(map, driver, cputag, TOKEN_GET_PTR(tokens, tokenptr));
971978            for (entryptr = &map->entrylist; *entryptr != NULL; entryptr = &(*entryptr)->next) ;
972979            entry = NULL;
973980            break;
r3426r3427
10301037            entry->read = TOKEN_GET_PTR(tokens, read);
10311038            entry->read_name = TOKEN_GET_STRING(tokens);
10321039            entry->read_devtype = TOKEN_GET_PTR(tokens, devtype);
1033            entry->read_devtag = TOKEN_GET_STRING(tokens);
1040            if (entry->read_devtag_string == NULL)
1041               entry->read_devtag_string = astring_alloc();
1042            entry->read_devtag = device_inherit_tag(entry->read_devtag_string, cputag, TOKEN_GET_STRING(tokens));
10341043            break;
10351044
10361045         case ADDRMAP_TOKEN_DEVICE_WRITE:
r3426r3427
10401049            entry->write = TOKEN_GET_PTR(tokens, write);
10411050            entry->write_name = TOKEN_GET_STRING(tokens);
10421051            entry->write_devtype = TOKEN_GET_PTR(tokens, devtype);
1043            entry->write_devtag = TOKEN_GET_STRING(tokens);
1052            if (entry->write_devtag_string == NULL)
1053               entry->write_devtag_string = astring_alloc();
1054            entry->write_devtag = device_inherit_tag(entry->write_devtag_string, cputag, TOKEN_GET_STRING(tokens));
10441055            break;
10451056
10461057         case ADDRMAP_TOKEN_READ_PORT:
r3426r3427
10521063            check_entry_field(region);
10531064            TOKEN_UNGET_UINT32(tokens);
10541065            TOKEN_GET_UINT64_UNPACK2(tokens, entrytype, 8, entry->rgnoffs, 32);
1055            entry->region = TOKEN_GET_STRING(tokens);
1066            if (entry->region_string == NULL)
1067               entry->region_string = astring_alloc();
1068            entry->region = device_inherit_tag(entry->region_string, cputag, TOKEN_GET_STRING(tokens));
10561069            break;
10571070
10581071         case ADDRMAP_TOKEN_SHARE:
src/emu/memory.h
r3426r3427
202202struct _address_map_entry
203203{
204204   address_map_entry *      next;            /* pointer to the next entry */
205   astring *            read_devtag_string;   /* string used to hold derived names */
206   astring *            write_devtag_string;/* string used to hold derived names */
207   astring *            region_string;      /* string used to hold derived names */
205208
206209   offs_t               addrstart;         /* start address */
207210   offs_t               addrend;         /* end address */
src/emu/inpttype.h
r3426r3427
524524
525525   INPUT_PORT_DIGITAL_TYPE( 0, OTHER,   KEYBOARD,            "Keyboard",               SEQ_DEF_0 )
526526
527   INPUT_PORT_DIGITAL_TYPE( 0, UI,      UI_ON_SCREEN_DISPLAY,"On Screen Display",      SEQ_DEF_1(KEYCODE_TILDE) )
527528   INPUT_PORT_DIGITAL_TYPE( 0, UI,      UI_DEBUG_BREAK,      "Break in Debugger",      SEQ_DEF_1(KEYCODE_TILDE) )
528529   INPUT_PORT_DIGITAL_TYPE( 0, UI,      UI_CONFIGURE,        "Config Menu",            SEQ_DEF_1(KEYCODE_TAB) )
529530   INPUT_PORT_DIGITAL_TYPE( 0, UI,      UI_PAUSE,            "Pause",                  SEQ_DEF_1(KEYCODE_P) )
src/emu/devintrf.c
r3426r3427
175175}
176176
177177
178/*-------------------------------------------------
179    device_build_tag - build a tag that combines
180    the device's name and the given tag
181-------------------------------------------------*/
178182
183const char *device_build_tag(astring *dest, const char *devicetag, const char *tag)
184{
185   if (devicetag != NULL)
186   {
187      astring_cpyc(dest, devicetag);
188      astring_catc(dest, ":");
189      astring_catc(dest, tag);
190   }
191   else
192      astring_cpyc(dest, tag);
193   return astring_c(dest);
194}
195
196
197/*-------------------------------------------------
198    device_inherit_tag - build a tag with the same
199    device prefix as the source tag
200-------------------------------------------------*/
201
202const char *device_inherit_tag(astring *dest, const char *sourcetag, const char *tag)
203{
204   const char *divider = strrchr(sourcetag, ':');
205   if (divider != NULL)
206   {
207      astring_cpych(dest, sourcetag, divider + 1 - sourcetag);
208      astring_catc(dest, tag);
209   }
210   else
211      astring_cpyc(dest, tag);
212   return astring_c(dest);
213}
214
215
216
179217/***************************************************************************
180218    TYPE-BASED DEVICE ACCESS
181219***************************************************************************/
src/emu/machine/ldpr8210.c
r3426r3427
1111
1212    Still to do:
1313
14        * add overlay properly (need capture)
1514        * implement SLOW TRG
1615        * figure out Simutrek without jump hack
1716        * figure out serial protocol issues (current hack works nicely)
r3426r3427
3837    CONSTANTS
3938***************************************************************************/
4039
41/* Pioneer PR-8210 specific information */
42#define PR8210_SCAN_SPEED            (2000 / 30)         /* 2000 frames/second */
43#define PR8210_SEEK_FAST_SPEED         (4000 / 30)         /* 4000 frames/second */
40/* Overlay constants, related to 720-pixel wide capture */
41#define OVERLAY_GROUP0_X            (82.0f / 720.0f)
42#define OVERLAY_GROUP1_X            (162.0f / 720.0f)
43#define OVERLAY_GROUP2_X            (322.0f / 720.0f)
44#define OVERLAY_GROUP3_X            (483.0f / 720.0f)
45#define OVERLAY_Y                  (104/2)
46#define OVERLAY_PIXEL_WIDTH            (4.5f / 720.0f)
47#define OVERLAY_PIXEL_HEIGHT         2
48#define OVERLAY_X_PIXELS            5
49#define OVERLAY_Y_PIXELS            7
4450
51/* scanning speeds */
52#define SCAN_SPEED                  (2000 / 30)         /* 2000 frames/second */
53#define SEEK_FAST_SPEED               (4000 / 30)         /* 4000 frames/second */
54
4555/* serial timing, mostly from the service manual, derived from the XTAL */
46#define PR8210_SERIAL_CLOCK            XTAL_455kHz
47#define PR8210_0_BIT_TIME            ATTOTIME_IN_HZ(PR8210_SERIAL_CLOCK / 512)
48#define PR8210_1_BIT_TIME            ATTOTIME_IN_HZ(PR8210_SERIAL_CLOCK / 1024)
49#define PR8210_MIDPOINT_TIME         ATTOTIME_IN_HZ(PR8210_SERIAL_CLOCK / 600)
50#define PR8210_MAX_WORD_TIME         ATTOTIME_IN_HZ(PR8210_SERIAL_CLOCK / 11520)
51#define PR8210_REJECT_DUPLICATE_TIME   ATTOTIME_IN_HZ(PR8210_SERIAL_CLOCK / 11520 / 4)
56#define SERIAL_CLOCK               XTAL_455kHz
57#define SERIAL_0_BIT_TIME            ATTOTIME_IN_HZ(SERIAL_CLOCK / 512)
58#define SERIAL_1_BIT_TIME            ATTOTIME_IN_HZ(SERIAL_CLOCK / 1024)
59#define SERIAL_MIDPOINT_TIME         ATTOTIME_IN_HZ(SERIAL_CLOCK / 600)
60#define SERIAL_MAX_WORD_TIME         ATTOTIME_IN_HZ(SERIAL_CLOCK / 11520)
61#define SERIAL_REJECT_DUPLICATE_TIME   ATTOTIME_IN_HZ(SERIAL_CLOCK / 11520 / 4)
5262
5363
5464
r3426r3427
6171struct _pioneer_pia
6272{
6373   UINT8            frame[7];            /* (20-26) 7 characters for the chapter/frame */
64   UINT8            text[15];            /* (22-30) 15 characters for the display */
74   UINT8            text[17];            /* (20-30) 17 characters for the display */
6575   UINT8            control;            /* (40) control lines */
6676   UINT8            latchdisplay;         /*   flag: set if the display was latched */
6777   UINT8            portb;               /* (60) port B value (LEDs) */
r3426r3427
118128static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
119129static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap);
120130static void pr8210_control_w(laserdisc_state *ld, UINT8 prev, UINT8 data);
131
121132static TIMER_CALLBACK( vsync_off );
122133static TIMER_CALLBACK( vbi_data_fetch );
134
123135static READ8_HANDLER( pr8210_pia_r );
124136static WRITE8_HANDLER( pr8210_pia_w );
125137static READ8_HANDLER( pr8210_bus_r );
r3426r3427
128140static READ8_HANDLER( pr8210_t0_r );
129141static READ8_HANDLER( pr8210_t1_r );
130142
143static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart);
144static void overlay_erase(bitmap_t *bitmap, float xstart, float xend);
145static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart);
146
131147static void simutrek_init(laserdisc_state *ld);
132148static void simutrek_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
133149static INT32 simutrek_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
134150static UINT8 simutrek_ready_r(laserdisc_state *ld);
135151static UINT8 simutrek_status_r(laserdisc_state *ld);
136152static void simutrek_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data);
153
137154static TIMER_CALLBACK( simutrek_latched_data_w );
155
138156static READ8_HANDLER( simutrek_port2_r );
139157static WRITE8_HANDLER( simutrek_port2_w );
140158static READ8_HANDLER( simutrek_data_r );
r3426r3427
143161
144162
145163/***************************************************************************
164    GLOBAL VARIABLES
165***************************************************************************/
166
167/* bitmaps for the characters */
168static const UINT8 text_bitmap[0x40][7] =
169{
170   { 0 },                           /* @ */
171   { 0x20,0x50,0x88,0x88,0xf8,0x88,0x88 },   /* A */
172   { 0 },                           /* B */
173   { 0x70,0x88,0x80,0x80,0x80,0x88,0x70 },   /* C */
174   { 0 },                           /* D */
175   { 0xf8,0x80,0x80,0xf0,0x80,0x80,0xf8 },   /* E */
176   { 0xf8,0x80,0x80,0xf0,0x80,0x80,0x80 },   /* F */
177   { 0 },                           /* G */
178   { 0x88,0x88,0x88,0xf8,0x88,0x88,0x88 },   /* H */
179   { 0 },                           /* I */
180   { 0 },                           /* J */
181   { 0 },                           /* K */
182   { 0 },                           /* L */
183   { 0x88,0xd8,0xa8,0xa8,0xa8,0x88,0x88 },   /* M */
184   { 0 },                           /* N */
185   { 0 },                           /* O */
186   { 0xf0,0x88,0x88,0xf0,0x80,0x80,0x80 },   /* P */
187   { 0 },                           /* Q */
188   { 0xf0,0x88,0x88,0xf0,0xa0,0x90,0x88 },   /* R */
189   { 0x70,0x88,0x80,0x70,0x08,0x88,0x70 },   /* S */
190   { 0 },                           /* T */
191   { 0 },                           /* U */
192   { 0 },                           /* V */
193   { 0 },                           /* W */
194   { 0 },                           /* X */
195   { 0 },                           /* Y */
196   { 0 },                           /* Z */
197   { 0 },                           /* [ */
198   { 0 },                           /* \ */
199   { 0 },                           /* ] */
200   { 0 },                           /* ^ */
201   { 0 },                           /* _ */
202
203   { 0x00,0x00,0x00,0x00,0x00,0x00,0x00 },   /* <space> */
204   { 0 },                           /* ! */
205   { 0 },                           /* " */
206   { 0 },                           /* # */
207   { 0 },                           /* $ */
208   { 0 },                           /* % */
209   { 0 },                           /* & */
210   { 0 },                           /* ' */
211   { 0 },                           /* ( */
212   { 0 },                           /* ) */
213   { 0 },                           /* * */
214   { 0 },                           /* + */
215   { 0 },                           /* , */
216   { 0 },                           /* - */
217   { 0x00,0x00,0x00,0x00,0x00,0x00,0x40 },   /* . */
218   { 0 },                           /* / */
219   { 0x70,0x88,0x88,0x88,0x88,0x88,0x70 },   /* 0 */
220   { 0x20,0x60,0x20,0x20,0x20,0x20,0x70 },   /* 1 */
221   { 0x70,0x88,0x08,0x70,0x80,0x80,0xf8 },   /* 2 */
222   { 0xf8,0x08,0x10,0x30,0x08,0x88,0x70 },   /* 3 */
223   { 0x10,0x30,0x50,0x90,0xf8,0x10,0x10 },   /* 4 */
224   { 0xf8,0x80,0xf0,0x08,0x08,0x88,0x70 },   /* 5 */
225   { 0x78,0x80,0x80,0xf0,0x88,0x88,0x70 },   /* 6 */
226   { 0xf8,0x08,0x08,0x10,0x20,0x40,0x80 },   /* 7 */
227   { 0x70,0x88,0x88,0x70,0x88,0x88,0x70 },   /* 8 */
228   { 0x70,0x88,0x88,0x78,0x08,0x08,0xf0 },   /* 9 */
229   { 0 },                           /* : */
230   { 0 },                           /* ; */
231   { 0 },                           /* < */
232   { 0 },                           /* = */
233   { 0 },                           /* > */
234   { 0 }                           /* ? */
235};
236
237
238
239/***************************************************************************
146240    INLINE FUNCTIONS
147241***************************************************************************/
148242
r3426r3427
248342***************************************************************************/
249343
250344/*-------------------------------------------------
251    pr8210_init - Pioneer PR-8210-specific
252    initialization
345    pr8210_init - player-specific initialization
253346-------------------------------------------------*/
254347
255348static void pr8210_init(laserdisc_state *ld)
r3426r3427
258351   attotime curtime = timer_get_time();
259352   ldplayer_data *player = ld->player;
260353
261   /* find our CPU */
262   astring_printf(tempstring, "%s:%s", ld->device->tag, "pr8210");
263   player->cpunum = mame_find_cpu_index(ld->device->machine, astring_c(tempstring));
264   astring_free(tempstring);
265
266   /* do a soft reset */
267   player->lastcommand = 0;
268   player->accumulator = 0;
354   /* reset our state */
355   memset(player, 0, sizeof(*player));
269356   player->lastcommandtime = curtime;
270357   player->firstbittime = curtime;
271358   player->lastbittime = curtime;
272359   player->slowtrg = curtime;
273360
361   /* find our CPU */
362   player->cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "pr8210"));
363   astring_free(tempstring);
364
274365   /* we don't have the Simutrek player overrides */
275366   player->simutrek.cpunum = -1;
276367   player->simutrek.audio_squelch = FALSE;
r3426r3427
318409   if (LOG_VBLANK_VBI)
319410      printf("%3d:Update(%d)\n", video_screen_get_vpos(ld->screen), fieldnum);
320411
321   /* update overlay */
322   if (player->pia.display || player->pia.latchdisplay)
323   {
324      char buffer[16] = { 0 };
325      int i;
326      for (i = 0; i < 15; i++)
327      {
328         UINT8 c = player->pia.text[i];
329         if (c >= 0xf0 && c <= 0xf9)
330            c = '0' + (c - 0xf0);
331         else if (c < 0x20 || c > 0x7f)
332            c = '?';
333         buffer[i] = c;
334      }
335      popmessage("%s", buffer);
336   }
337   else
338      popmessage(NULL);
339   player->pia.latchdisplay = 0;
340
341412   /* if the spindle is on, we advance by 1 track after completing field #1 */
342413   return (spdl_on) ? fieldnum : 0;
343414}
r3426r3427
351422
352423static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap)
353424{
354//  ldplayer_data *player = ld->player;
425   ldplayer_data *player = ld->player;
426
427   /* custom display */
428   if (player->pia.display)
429   {
430      overlay_draw_group(bitmap, &player->pia.text[2], 5, OVERLAY_GROUP1_X);
431      overlay_draw_group(bitmap, &player->pia.text[7], 5, OVERLAY_GROUP2_X);
432      overlay_draw_group(bitmap, &player->pia.text[12], 5, OVERLAY_GROUP3_X);
433   }
434
435   /* chapter/frame display */
436   else
437   {
438      /* frame display */
439      if (player->pia.latchdisplay & 2)
440         overlay_draw_group(bitmap, &player->pia.text[2], 5, OVERLAY_GROUP1_X);
441
442      /* chapter overlay */
443      if (player->pia.latchdisplay & 1)
444         overlay_draw_group(bitmap, &player->pia.text[0], 2, OVERLAY_GROUP0_X);
445   }
446   player->pia.latchdisplay = 0;
355447}
356448
357449
r3426r3427
373465
374466      /* if we timed out since the first bit, reset the accumulator */
375467      delta = attotime_sub(curtime, player->firstbittime);
376      if (attotime_compare(delta, PR8210_MAX_WORD_TIME) > 0)
468      if (attotime_compare(delta, SERIAL_MAX_WORD_TIME) > 0)
377469      {
378470         player->firstbittime = curtime;
379471         player->accumulator = 0x5555;
r3426r3427
387479      player->lastbittime = curtime;
388480
389481      /* 0 bit delta is 1.05 msec, 1 bit delta is 2.11 msec */
390      longpulse = (attotime_compare(delta, PR8210_MIDPOINT_TIME) < 0) ? 0 : 1;
482      longpulse = (attotime_compare(delta, SERIAL_MIDPOINT_TIME) < 0) ? 0 : 1;
391483      player->accumulator = (player->accumulator << 1) | longpulse;
392484
393485      /* log the deltas for debugging */
r3426r3427
410502         /* the MCU logic requires a 0 to execute many commands; however, nobody
411503               consistently sends a 0, whereas they do tend to send duplicate commands...
412504               if we assume that each duplicate causes a 0, we get the correct results */
413         rejectuntil = attotime_add(player->lastcommandtime, PR8210_REJECT_DUPLICATE_TIME);
505         rejectuntil = attotime_add(player->lastcommandtime, SERIAL_REJECT_DUPLICATE_TIME);
414506         player->lastcommandtime = curtime;
415507         if (player->pia.porta == player->lastcommand && attotime_compare(curtime, rejectuntil) < 0)
416508            player->pia.porta = 0x00;
r3426r3427
426518         }
427519
428520         /* reset the first bit time so that the accumulator clears on the next write */
429         player->firstbittime = attotime_sub(curtime, PR8210_MAX_WORD_TIME);
521         player->firstbittime = attotime_sub(curtime, SERIAL_MAX_WORD_TIME);
430522      }
431523   }
432524}
r3426r3427
519611         result = player->pia.frame[offset - 0x20];
520612         break;
521613
614      /* (1D-1F,27) invalid read but normal */
615      case 0x1d:   case 0x1e:   case 0x1f:
616      case 0x27:
617         break;
618
522619      /* (A0) port A value (from serial decoder) */
523620      case 0xa0:
524621         result = player->pia.porta;
r3426r3427
559656
560657   switch (offset)
561658   {
562      /* (22-30) 15 characters for the display */
659      /* (20-30) 17 characters for the display */
660      case 0x20:   case 0x21:
563661      case 0x22:   case 0x23:   case 0x24:   case 0x25:   case 0x26:
564662      case 0x27:   case 0x28:   case 0x29:   case 0x2a:   case 0x2b:
565663      case 0x2c:   case 0x2d:   case 0x2e:   case 0x2f:   case 0x30:
566         player->pia.text[offset - 0x22] = data;
664         player->pia.text[offset - 0x20] = data;
567665         break;
568666
569667      /* (40) control lines */
r3426r3427
573671         if (!(data & 0x01) && (player->pia.control & 0x01))
574672         {
575673            memcpy(&player->pia.text[0], &player->pia.frame[0], 2);
576            memset(&player->pia.text[3], 0, 10);
577            player->pia.latchdisplay = 1;
674            player->pia.latchdisplay |= 1;
578675         }
579676
580677         /* toggle bit 1 to latch frame number into display area */
581678         if (!(data & 0x02) && (player->pia.control & 0x02))
582679         {
583            memcpy(&player->pia.text[0], &player->pia.frame[2], 5);
584            memset(&player->pia.text[5], 0, 10);
585            player->pia.latchdisplay = 1;
680            memcpy(&player->pia.text[2], &player->pia.frame[2], 5);
681            player->pia.latchdisplay |= 2;
586682         }
587683         player->pia.control = data;
588684         break;
r3426r3427
716812   if (!(data & 0x02))
717813   {
718814      /* bit 2 selects the speed */
719      int delta = (data & 0x04) ? PR8210_SCAN_SPEED : PR8210_SEEK_FAST_SPEED;
815      int delta = (data & 0x04) ? SCAN_SPEED : SEEK_FAST_SPEED;
720816      ldcore_set_slider_speed(ld, delta * direction);
721817   }
722818
r3426r3427
792888}
793889
794890
891/*-------------------------------------------------
892    overlay_draw_group - draw a single group of
893    characters
894-------------------------------------------------*/
795895
896static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart)
897{
898   int skip = TRUE;
899   int x;
900
901   /* rease the background */
902   overlay_erase(bitmap, xstart, xstart + ((OVERLAY_X_PIXELS + 1) * count + 1) * OVERLAY_PIXEL_WIDTH);
903
904   /* draw each character, suppressing leading 0's */
905   for (x = 0; x < count; x++)
906      if (!skip || x == count - 1 || (text[x] & 0x3f) != 0x30)
907      {
908         skip = FALSE;
909         overlay_draw_char(bitmap, text[x], xstart + ((OVERLAY_X_PIXELS + 1) * x + 1) * OVERLAY_PIXEL_WIDTH);
910      }
911}
912
913
914/*-------------------------------------------------
915    overlay_erase - erase the background area
916    where the text overlay will be displayed
917-------------------------------------------------*/
918
919static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
920{
921   UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap->width);
922   UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap->width);
923   UINT32 x, y;
924
925   for (y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++)
926   {
927      UINT16 *dest = BITMAP_ADDR16(bitmap, y, xmin >> 8);
928      UINT16 ymin, ymax, yres;
929
930      ymax = *dest >> 8;
931      ymin = ymax * 3 / 8;
932      yres = ymin + ((ymax - ymin) * (xmin & 0xff)) / 256;
933      *dest = (yres << 8) | (*dest & 0xff);
934      dest++;
935
936      for (x = (xmin | 0xff) + 1; x < xmax; x += 0x100)
937      {
938         yres = (*dest >> 8) * 3 / 8;
939         *dest = (yres << 8) | (*dest & 0xff);
940         dest++;
941      }
942
943      ymax = *dest >> 8;
944      ymin = ymax * 3 / 8;
945      yres = ymin + ((ymax - ymin) * (~xmax & 0xff)) / 256;
946      *dest = (yres << 8) | (*dest & 0xff);
947      dest++;
948   }
949}
950
951
952/*-------------------------------------------------
953    overlay_draw_char - draw a single character
954    of the text overlay
955-------------------------------------------------*/
956
957static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
958{
959   UINT32 xminbase = (UINT32)(xstart * 256.0f * (float)bitmap->width);
960   UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap->width);
961   const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0];
962   UINT32 x, y, xx, yy;
963
964   /* iterate over pixels */
965   for (y = 0; y < OVERLAY_Y_PIXELS; y++)
966   {
967      UINT8 chdata = *chdataptr++;
968
969      for (x = 0; x < OVERLAY_X_PIXELS; x++, chdata <<= 1)
970         if (chdata & 0x80)
971         {
972            UINT32 xmin = xminbase + x * xsize;
973            UINT32 xmax = xmin + xsize;
974            for (yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++)
975            {
976               UINT16 *dest = BITMAP_ADDR16(bitmap, OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
977               UINT16 ymin, ymax, yres;
978
979               ymax = 0xff;
980               ymin = *dest >> 8;
981               yres = ymin + ((ymax - ymin) * (~xmin & 0xff)) / 256;
982               *dest = (yres << 8) | (*dest & 0xff);
983               dest++;
984
985               for (xx = (xmin | 0xff) + 1; xx < xmax; xx += 0x100)
986                  *dest++ = 0xf080;
987
988               ymax = 0xff;
989               ymin = *dest >> 8;
990               yres = ymin + ((ymax - ymin) * (xmax & 0xff)) / 256;
991               *dest = (yres << 8) | (*dest & 0xff);
992               dest++;
993            }
994         }
995   }
996}
997
998
999
7961000/***************************************************************************
7971001    SIMUTREK ROM AND MACHINE INTERFACES
7981002***************************************************************************/
r3426r3427
8841088   pr8210_init(ld);
8851089
8861090   /* find the Simutrek CPU */
887   astring_printf(tempstring, "%s:%s", ld->device->tag, "simutrek");
888   ld->player->simutrek.cpunum = mame_find_cpu_index(ld->device->machine, astring_c(tempstring));
1091   ld->player->simutrek.cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "simutrek"));
8891092   astring_free(tempstring);
8901093}
8911094
src/emu/machine/ldvp931.c
r3426r3427
3434    CONSTANTS
3535***************************************************************************/
3636
37/* Philips 22VP931 specific information */
38#define VP931_SCAN_SPEED            (2000 / 30)         /* 2000 frames/second */
39#define VP931_SCAN_FAST_SPEED         (4000 / 30)         /* 4000 frames/second */
37/* scanning speeds */
38#define SCAN_SPEED                  (2000 / 30)         /* 2000 frames/second */
39#define SCAN_FAST_SPEED               (4000 / 30)         /* 4000 frames/second */
4040
4141
4242
r3426r3427
5050   /* low-level emulation data */
5151   int               cpunum;               /* CPU index of the 8049 */
5252   const device_config *tracktimer;         /* timer device */
53   int               lastframe;
53   vp931_data_ready_func data_ready_cb;       /* data ready callback */
54
55   /* I/O port states */
5456   UINT8            out0;               /* output 0 state */
5557   UINT8            out1;               /* output 1 state */
5658   UINT8            port1;               /* port 1 state */
59
60   /* DATIC circuit implementation */
5761   UINT8            daticval;            /* latched DATIC value */
5862   UINT8            daticerp;            /* /ERP value from DATIC */
5963   UINT8            datastrobe;            /* DATA STROBE line from DATIC */
64
65   /* communication status */
6066   UINT8            fromcontroller;         /* command byte from the controller */
6167   UINT8            fromcontroller_pending;   /* TRUE if data is pending */
6268   UINT8            tocontroller;         /* command byte to the controller */
6369   UINT8            tocontroller_pending;   /* TRUE if data is pending */
70
71   /* tracking */
6472   INT8            trackdir;            /* direction of tracking */
6573   UINT8            trackstate;            /* state of tracking */
74
75   /* debugging */
6676   UINT8            cmdbuf[3];            /* 3 bytes worth of commands */
6777   UINT8            cmdcount;            /* number of command bytes seen */
6878   INT16            advanced;            /* number of frames advanced */
69   void (*data_ready_cb)(const device_config *device, int state); /* data ready callback */
7079};
7180
7281
r3426r3427
8392static UINT8 vp931_ready(laserdisc_state *ld);
8493static UINT8 vp931_data_ready(laserdisc_state *ld);
8594
95static TIMER_CALLBACK( vbi_data_fetch );
96static TIMER_CALLBACK( deferred_data_w );
97static TIMER_CALLBACK( irq_off );
98static TIMER_CALLBACK( datastrobe_off );
99static TIMER_CALLBACK( erp_off );
100static TIMER_DEVICE_CALLBACK( track_timer );
101
86102static WRITE8_HANDLER( output0_w );
87103static WRITE8_HANDLER( output1_w );
88104static WRITE8_HANDLER( lcd_w );
r3426r3427
96112static WRITE8_HANDLER( port2_w );
97113static READ8_HANDLER( t0_r );
98114static READ8_HANDLER( t1_r );
99static TIMER_CALLBACK( vbi_data_fetch );
100static TIMER_CALLBACK( deferred_data_w );
101static TIMER_CALLBACK( irq_off );
102static TIMER_CALLBACK( datastrobe_off );
103static TIMER_CALLBACK( erp_off );
104static TIMER_DEVICE_CALLBACK( track_timer );
105115
106116
107117
r3426r3427
152162
153163
154164/***************************************************************************
155    PR-8210 PLAYER INTERFACE
165    22VP931 PLAYER INTERFACE
156166***************************************************************************/
157167
158168const ldplayer_interface vp931_interface =
r3426r3427
191201    ready callback
192202-------------------------------------------------*/
193203
194void vp931_set_data_ready_callback(const device_config *device, void (*callback)(const device_config *device, int state))
204void vp931_set_data_ready_callback(const device_config *device, vp931_data_ready_func callback)
195205{
196206   laserdisc_state *ld = ldcore_get_safe_token(device);
197207   ld->player->data_ready_cb = callback;
r3426r3427
204214***************************************************************************/
205215
206216/*-------------------------------------------------
207    vp931_init - Pioneer PR-8210-specific
208    initialization
217    vp931_init - player-specific initialization
209218-------------------------------------------------*/
210219
211220static void vp931_init(laserdisc_state *ld)
212221{
213222   astring *tempstring = astring_alloc();
214223   ldplayer_data *player = ld->player;
224   vp931_data_ready_func cbsave;
215225
216   /* find our CPU */
217   astring_printf(tempstring, "%s:%s", ld->device->tag, "vp931");
218   player->cpunum = mame_find_cpu_index(ld->device->machine, astring_c(tempstring));
226   /* reset our state */
227   cbsave = player->data_ready_cb;
228   memset(player, 0, sizeof(*player));
229   player->data_ready_cb = cbsave;
219230
220   /* find our timer */
221   astring_printf(tempstring, "%s:%s", ld->device->tag, "tracktimer");
222   player->tracktimer = device_list_find_by_tag(ld->device->machine->config->devicelist, TIMER, astring_c(tempstring));
231   /* find our devices */
232   player->cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "vp931"));
233   player->tracktimer = devtag_get_device(ld->device->machine, TIMER, device_build_tag(tempstring, ld->device->tag, "tracktimer"));
223234   timer_device_set_ptr(player->tracktimer, ld);
224
225235   astring_free(tempstring);
226236}
227237
r3426r3427
319329
320330
321331/*-------------------------------------------------
332    vbi_data_fetch - called 4 times per scanline
333    on lines 16, 17, and 18 to feed the VBI data
334    through one byte at a time
335-------------------------------------------------*/
336
337static TIMER_CALLBACK( vbi_data_fetch )
338{
339   laserdisc_state *ld = ptr;
340   ldplayer_data *player = ld->player;
341   int which = param & 3;
342   int line = param >> 2;
343   UINT32 code = 0;
344
345   /* fetch the code and compute the DATIC latched value */
346   if (line >= LASERDISC_CODE_LINE16 && line <= LASERDISC_CODE_LINE18)
347      code = laserdisc_get_field_code(ld->device, line);
348
349   /* at the start of each line, signal an interrupt and use a timer to turn it off */
350   if (which == 0)
351   {
352      cpunum_set_input_line(machine, player->cpunum, MCS48_INPUT_IRQ, ASSERT_LINE);
353      timer_set(ATTOTIME_IN_NSEC(5580), ld, 0, irq_off);
354   }
355
356   /* clock the data strobe on each subsequent callback */
357   else if (code != 0)
358   {
359      player->daticval = code >> (8 * (3 - which));
360      player->datastrobe = 1;
361      timer_set(ATTOTIME_IN_NSEC(5000), ld, 0, datastrobe_off);
362   }
363
364   /* determine the next bit to fetch and reprime ourself */
365   if (++which == 4)
366   {
367      which = 0;
368      line++;
369   }
370   if (line <= LASERDISC_CODE_LINE18 + 1)
371      timer_set(video_screen_get_time_until_pos(ld->screen, line*2, which * 2 * video_screen_get_width(ld->screen) / 4), ld, (line << 2) | which, vbi_data_fetch);
372}
373
374
375/*-------------------------------------------------
376    deferred_data_w - handle a write from the
377    external controller
378-------------------------------------------------*/
379
380static TIMER_CALLBACK( deferred_data_w )
381{
382   laserdisc_state *ld = ptr;
383   ldplayer_data *player = ld->player;
384
385   /* set the value and mark it pending */
386   player->fromcontroller = param;
387   player->fromcontroller_pending = TRUE;
388
389   /* track the commands for debugging purposes */
390   if (player->cmdcount < ARRAY_LENGTH(player->cmdbuf))
391   {
392      player->cmdbuf[player->cmdcount++] = param;
393      if (LOG_COMMANDS && player->cmdcount == 3)
394         printf("Cmd: %02X %02X %02X\n", player->cmdbuf[0], player->cmdbuf[1], player->cmdbuf[2]);
395   }
396}
397
398
399/*-------------------------------------------------
400    irq_off - turn off the 8048 IRQ signal
401-------------------------------------------------*/
402
403static TIMER_CALLBACK( irq_off )
404{
405   laserdisc_state *ld = ptr;
406   cpunum_set_input_line(machine, ld->player->cpunum, MCS48_INPUT_IRQ, CLEAR_LINE);
407}
408
409
410/*-------------------------------------------------
411    datastrobe_off - turn off the DATIC data
412    strobe signal
413-------------------------------------------------*/
414
415static TIMER_CALLBACK( datastrobe_off )
416{
417   laserdisc_state *ld = ptr;
418   ld->player->datastrobe = 0;
419}
420
421
422/*-------------------------------------------------
423    erp_off - turn off the DATIC ERP signal
424-------------------------------------------------*/
425
426static TIMER_CALLBACK( erp_off )
427{
428   laserdisc_state *ld = ptr;
429   ld->player->daticerp = 0;
430}
431
432
433/*-------------------------------------------------
434    track_timer - advance by one half-track
435-------------------------------------------------*/
436
437static TIMER_DEVICE_CALLBACK( track_timer )
438{
439   laserdisc_state *ld = ptr;
440   ldplayer_data *player = ld->player;
441
442   /* advance by the count and toggle the state */
443   player->trackstate ^= 1;
444   if ((player->trackdir < 0 && !player->trackstate) || (player->trackdir > 0 && player->trackstate))
445   {
446      ldcore_advance_slider(ld, player->trackdir);
447      player->advanced += player->trackdir;
448   }
449}
450
451
452/*-------------------------------------------------
322453    output0_w - controls audio/video squelch
323454    and other bits
324455-------------------------------------------------*/
r3426r3427
394525   if (!(data & 0x02))
395526   {
396527      /* fast/slow is based on bit 2 */
397      speed = (data & 0x04) ? VP931_SCAN_FAST_SPEED : VP931_SCAN_SPEED;
528      speed = (data & 0x04) ? SCAN_FAST_SPEED : SCAN_SPEED;
398529
399530      /* direction is based on bit 0 */
400531      if (data & 0x01)
r3426r3427
649780   laserdisc_state *ld = find_vp931(machine);
650781   return ld->player->trackstate;
651782}
652
653
654/*-------------------------------------------------
655    vbi_data_fetch - called 4 times per scanline
656    on lines 16, 17, and 18 to feed the VBI data
657    through one byte at a time
658-------------------------------------------------*/
659
660static TIMER_CALLBACK( vbi_data_fetch )
661{
662   laserdisc_state *ld = ptr;
663   ldplayer_data *player = ld->player;
664   int which = param & 3;
665   int line = param >> 2;
666   UINT32 code = 0;
667
668   /* fetch the code and compute the DATIC latched value */
669   if (line >= LASERDISC_CODE_LINE16 && line <= LASERDISC_CODE_LINE18)
670      code = laserdisc_get_field_code(ld->device, line);
671
672   /* at the start of each line, signal an interrupt and use a timer to turn it off */
673   if (which == 0)
674   {
675      cpunum_set_input_line(machine, player->cpunum, MCS48_INPUT_IRQ, ASSERT_LINE);
676      timer_set(ATTOTIME_IN_NSEC(5580), ld, 0, irq_off);
677   }
678
679   /* clock the data strobe on each subsequent callback */
680   else if (code != 0)
681   {
682      player->daticval = code >> (8 * (3 - which));
683      player->datastrobe = 1;
684      timer_set(ATTOTIME_IN_NSEC(5000), ld, 0, datastrobe_off);
685   }
686
687   /* determine the next bit to fetch and reprime ourself */
688   if (++which == 4)
689   {
690      which = 0;
691      line++;
692   }
693   if (line <= LASERDISC_CODE_LINE18 + 1)
694      timer_set(video_screen_get_time_until_pos(ld->screen, line*2, which * 2 * video_screen_get_width(ld->screen) / 4), ld, (line << 2) | which, vbi_data_fetch);
695}
696
697
698/*-------------------------------------------------
699    deferred_data_w - handle a write from the
700    external controller
701-------------------------------------------------*/
702
703static TIMER_CALLBACK( deferred_data_w )
704{
705   laserdisc_state *ld = ptr;
706   ldplayer_data *player = ld->player;
707
708   /* set the value and mark it pending */
709   player->fromcontroller = param;
710   player->fromcontroller_pending = TRUE;
711
712   /* track the commands for debugging purposes */
713   if (player->cmdcount < ARRAY_LENGTH(player->cmdbuf))
714   {
715      player->cmdbuf[player->cmdcount++] = param;
716      if (LOG_COMMANDS && player->cmdcount == 3)
717         printf("Cmd: %02X %02X %02X\n", player->cmdbuf[0], player->cmdbuf[1], player->cmdbuf[2]);
718   }
719}
720
721
722/*-------------------------------------------------
723    irq_off - turn off the 8048 IRQ signal
724-------------------------------------------------*/
725
726static TIMER_CALLBACK( irq_off )
727{
728   laserdisc_state *ld = ptr;
729   cpunum_set_input_line(machine, ld->player->cpunum, MCS48_INPUT_IRQ, CLEAR_LINE);
730}
731
732
733/*-------------------------------------------------
734    datastrobe_off - turn off the DATIC data
735    strobe signal
736-------------------------------------------------*/
737
738static TIMER_CALLBACK( datastrobe_off )
739{
740   laserdisc_state *ld = ptr;
741   ld->player->datastrobe = 0;
742}
743
744
745/*-------------------------------------------------
746    erp_off - turn off the DATIC ERP signal
747-------------------------------------------------*/
748
749static TIMER_CALLBACK( erp_off )
750{
751   laserdisc_state *ld = ptr;
752   ld->player->daticerp = 0;
753}
754
755
756/*-------------------------------------------------
757    track_timer - advance by one half-track
758-------------------------------------------------*/
759
760static TIMER_DEVICE_CALLBACK( track_timer )
761{
762   laserdisc_state *ld = ptr;
763   ldplayer_data *player = ld->player;
764
765   /* advance by the count and toggle the state */
766   player->trackstate ^= 1;
767   if ((player->trackdir < 0 && !player->trackstate) || (player->trackdir > 0 && player->trackstate))
768   {
769      ldcore_advance_slider(ld, player->trackdir);
770      player->advanced += player->trackdir;
771   }
772}
src/emu/machine/laserdsc.h
r3426r3427
6868
6969typedef void (*laserdisc_audio_func)(const device_config *device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1);
7070
71typedef void (*vp931_data_ready_func)(const device_config *device, int state);
72
7173typedef struct _laserdisc_config laserdisc_config;
7274struct _laserdisc_config
7375{
r3426r3427
188190void pr7820_set_slow_speed(const device_config *device, double frame_rate_scaler);
189191
190192/* set a callback for data ready on the Phillips 22VP931 */
191void vp931_set_data_ready_callback(const device_config *device, void (*callback)(const device_config *device, int state));
193void vp931_set_data_ready_callback(const device_config *device, vp931_data_ready_func callback);
192194
193195/* control the audio squelch of the Simutrek modified players */
194196void simutrek_set_audio_squelch(const device_config *device, int state);
src/emu/machine/ldcore.c
r3426r3427
3131    CONSTANTS
3232***************************************************************************/
3333
34/* these specs code from IEC 60857, for NTSC players */
35#define LEAD_IN_MIN_RADIUS_IN_UM   53500      /* 53.5 mm */
36#define PROGRAM_MIN_RADIUS_IN_UM   55000      /* 55 mm */
37#define PROGRAM_MAX_RADIUS_IN_UM   145000      /* 145 mm */
38#define LEAD_OUT_MIN_SIZE_IN_UM      2000      /* 2 mm */
39
40/* the track pitch is defined as a range; we pick a nominal pitch
41   that ensures we can fit 54,000 tracks */
42#define MIN_TRACK_PITCH_IN_NM      1400      /* 1.4 um */
43#define MAX_TRACK_PITCH_IN_NM      2000      /* 2 um */
44#define NOMINAL_TRACK_PITCH_IN_NM   ((PROGRAM_MAX_RADIUS_IN_UM - PROGRAM_MIN_RADIUS_IN_UM) * 1000 / 54000)
45
3446/* we simulate extra lead-in and lead-out tracks */
35#define VIRTUAL_LEAD_IN_TRACKS      200
47#define VIRTUAL_LEAD_IN_TRACKS      ((PROGRAM_MIN_RADIUS_IN_UM - LEAD_IN_MIN_RADIUS_IN_UM) * 1000 / NOMINAL_TRACK_PITCH_IN_NM)
3648#define MAX_TOTAL_TRACKS         54000
37#define VIRTUAL_LEAD_OUT_TRACKS      200
49#define VIRTUAL_LEAD_OUT_TRACKS      (LEAD_OUT_MIN_SIZE_IN_UM * 1000 / NOMINAL_TRACK_PITCH_IN_NM)
3850
3951
4052
r3426r3427
133145static TIMER_CALLBACK( perform_player_update );
134146static void read_track_data(laserdisc_state *ld);
135147static void process_track_data(const device_config *device);
136//static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, int frame);
137148static void *custom_start(int clock, const custom_sound_interface *config);
138149static void custom_stream_callback(void *param, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
139150static void configuration_load(running_machine *machine, int config_type, xml_data_node *parentnode);
r3426r3427
161172   custom_start
162173};
163174
164static const UINT8 numberfont[10][8] =
165{
166   {
167      0x30,   // ..xx....
168      0x48,   // .x..x...
169      0x84,   // x....x..
170      0x84,   // x....x..
171      0x84,   // x....x..
172      0x48,   // .x..x...
173      0x30   // ..xx....
174   },
175   {
176      0x10,   // ...x....
177      0x30,   // ..xx....
178      0x50,   // .x.x....
179      0x10,   // ...x....
180      0x10,   // ...x....
181      0x10,   // ...x....
182      0x7c   // .xxxxx..
183   },
184   {
185      0x78,   // .xxxx...
186      0x84,   // x....x..
187      0x04,   // .....x..
188      0x38,   // ..xxx...
189      0x40,   // .x......
190      0x80,   // x.......
191      0xfc   // xxxxxx..
192   },
193   {
194      0x78,   // .xxxx...
195      0x84,   // x....x..
196      0x04,   // .....x..
197      0x38,   // ..xxx...
198      0x04,   // .....x..
199      0x84,   // x....x..
200      0x78   // .xxxx...
201   },
202   {
203      0x08,   // ....x...
204      0x18,   // ...xx...
205      0x28,   // ..x.x...
206      0x48,   // .x..x...
207      0xfc,   // xxxxxx..
208      0x08,   // ....x...
209      0x08   // ....x...
210   },
211   {
212      0xfc,   // xxxxxx..
213      0x80,   // x.......
214      0x80,   // x.......
215      0xf8,   // xxxxx...
216      0x04,   // .....x..
217      0x84,   // x....x..
218      0x78   // .xxxx...
219   },
220   {
221      0x38,   // ..xxx...
222      0x40,   // .x......
223      0x80,   // x.......
224      0xf8,   // xxxxx...
225      0x84,   // x....x..
226      0x84,   // x....x..
227      0x78   // .xxxx...
228   },
229   {
230      0xfc,   // xxxxxx..
231      0x04,   // .....x..
232      0x08,   // ....x...
233      0x10,   // ...x....
234      0x20,   // ..x.....
235      0x20,   // ..x.....
236      0x20   // ..x.....
237   },
238   {
239      0x78,   // .xxxx...
240      0x84,   // x....x..
241      0x84,   // x....x..
242      0x78,   // .xxxx...
243      0x84,   // x....x..
244      0x84,   // x....x..
245      0x78   // .xxxx...
246   },
247   {
248      0x78,   // .xxxx..
249      0x84,   // x....x.
250      0x84,   // x....x.
251      0x7c,   // .xxxxx.
252      0x04,   // .....x.
253      0x08,   // ....x..
254      0x70,   // .xxx...
255   }
256};
257175
258176
259
260177/***************************************************************************
261178    INLINE FUNCTIONS
262179***************************************************************************/
r3426r3427
890807   ldcore_data *ldcore = ld->core;
891808   UINT32 tracknum = ldcore->curtrack;
892809   UINT32 fieldnum = ldcore->fieldnum;
893   vbi_metadata vbidata;
810   vbi_metadata vbidata = { 0 };
894811   frame_data *frame;
895812   UINT32 vbiframe;
896813   UINT32 readhunk;
r3426r3427
987904      ldcore->frame[ldcore->videoindex].numfields++;
988905
989906   /* render the display if present */
990//  if (ldcore->display && ldcore->avconfig.video != NULL)
991//      render_display((UINT16 *)ldcore->avconfig.video->base, ldcore->avconfig.video->rowpixels, ldcore->avconfig.video->width, ldcore->last_frame);
907   if (ldcore->avconfig.video != NULL && ldcore->intf.overlay != NULL)
908      (*ldcore->intf.overlay)(ld, ldcore->avconfig.video);
992909
993910   /* pass the audio to the callback */
994911   if (ldcore->config.audio != NULL)
r3426r3427
1022939
1023940
1024941/*-------------------------------------------------
1025    render_display - draw the frame display
1026-------------------------------------------------*/
1027
1028#ifdef UNUSED_FUNCTION
1029static void render_display(UINT16 *videodata, UINT32 rowpixels, UINT32 width, int frame)
1030{
1031   const int xscale = 4, yscale = 2;
1032   char buffer[10];
1033   int x = width / 10;
1034   int y = 50;
1035   int ch;
1036   int delta;
1037
1038   /* do nothing if no data */
1039   if (videodata == NULL)
1040      return;
1041
1042   /* convert to a character string and render */
1043   sprintf(buffer, "%5d", frame);
1044
1045   /* iterate over 5 positions: (-1,-1), (-1,1), (1,-1), (1,1) and (0,0) */
1046   /* render all in black except the last one */
1047   for (delta = 0; delta < 5; delta++)
1048   {
1049      int color = (delta < 4) ? 0x0080 : 0xff80;
1050      int dx = (delta < 4) ? ((delta & 1) ? -1 : 1) : 0;
1051      int dy = (delta < 4) ? ((delta & 2) ? -1 : 1) : 0;
1052
1053      /* iterate over 5 characters */
1054      for (ch = 0; ch < 5; ch++)
1055         if (buffer[ch] >= '0' && buffer[ch] <= '9')
1056         {
1057            const UINT8 *fontdata = &numberfont[buffer[ch] - '0'][0];
1058            int cy, cx;
1059
1060            /* iterate over the rows of the character */
1061            for (cy = 0; cy < 8; cy++)
1062            {
1063               UINT8 bits = *fontdata++;
1064
1065               /* and over the columns */
1066               for (cx = 0; cx < 8; cx++)
1067                  if (bits & (0x80 >> cx))
1068                  {
1069                     int ix, iy;
1070
1071                     /* fill in an xscale x yscale pixel */
1072                     for (iy = 0; iy < yscale; iy++)
1073                        for (ix = 0; ix < xscale; ix++)
1074                           videodata[(y + cy * yscale + iy + dy) * rowpixels + (x + (ch * 9 + cx) * xscale + ix + dx)] = color;
1075                  }
1076            }
1077         }
1078   }
1079}
1080#endif
1081
1082
1083/*-------------------------------------------------
1084942    custom_start - custom audio start
1085943    for laserdiscs
1086944-------------------------------------------------*/
src/emu/machine/ldcore.h
r3426r3427
225225   /* is it not known if the white flag or the presence of a frame code
226226       determines the start of frame; the former seems to be the "official"
227227       way, but the latter seems to be the practical implementation */
228   return (vbi->white || (vbi->line1718 & 0xf80000) == 0xf80000);
228   return (vbi->white || (vbi->line1718 & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE);
229229}
230230
231231
r3426r3427
255255
256256INLINE int chapter_from_metadata(const vbi_metadata *metadata)
257257{
258   if ((metadata->line1718 & 0xf00fff) == 0x800ddd)
258   if ((metadata->line1718 & VBI_MASK_CHAPTER) == VBI_CODE_CHAPTER)
259259      return VBI_CHAPTER(metadata->line1718);
260260   else if (metadata->line1718 == VBI_CODE_LEADIN)
261261      return CHAPTER_LEAD_IN;
src/emu/machine/z80sio.c
r3426r3427
785785static DEVICE_START( z80sio )
786786{
787787   const z80sio_interface *intf = device->static_config;
788   astring *tempstring = astring_alloc();
788789   z80sio *sio = get_safe_token(device);
789790   void *ptr = (void *)device;
790791   int cpunum = -1;
791792
792793   if (intf->cpu != NULL)
793      cpunum = mame_find_cpu_index(device->machine, intf->cpu);
794   {
795      cpunum = mame_find_cpu_index(device->machine, device_inherit_tag(tempstring, device->tag, intf->cpu));
796      if (cpunum == -1)
797         fatalerror("Z80SIO:Unable to find CPU %s\n", device_inherit_tag(tempstring, device->tag, intf->cpu));
798   }
794799   if (cpunum != -1)
795800      sio->clock = device->machine->config->cpu[cpunum].clock;
796801   else
r3426r3427
806811   sio->transmit_cb = intf->transmit_cb;
807812   sio->receive_poll_cb = intf->receive_poll_cb;
808813
814   astring_free(tempstring);
809815   return DEVICE_START_OK;
810816}
811817
src/emu/machine/z80ctc.c
r3426r3427
463463static DEVICE_START( z80ctc )
464464{
465465   const z80ctc_interface *intf = device->static_config;
466   astring *tempstring = astring_alloc();
466467   z80ctc *ctc = get_safe_token(device);
467468   char unique_tag[30];
468469   int cpunum = -1;
469470   int ch;
470471
471472   if (intf->cpu != NULL)
472      cpunum = mame_find_cpu_index(device->machine, intf->cpu);
473   {
474      cpunum = mame_find_cpu_index(device->machine, device_inherit_tag(tempstring, device->tag, intf->cpu));
475      if (cpunum == -1)
476         fatalerror("Z80CTC:Unable to find CPU %s\n", device_inherit_tag(tempstring, device->tag, intf->cpu));
477   }
473478   if (cpunum != -1)
474479      ctc->clock = device->machine->config->cpu[cpunum].clock;
475480   else
r3426r3427
503508       state_save_register_item(unique_tag, ch, channel->int_state);
504509   }
505510
511   astring_free(tempstring);
506512   return DEVICE_START_OK;
507513}
508514
src/emu/machine/ldv1000.c
r3426r3427
77    Copyright Nicola Salmoria and the MAME Team.
88    Visit http://mamedev.org for licensing and usage restrictions.
99
10**************************************************************************
11
12    Still to do:
13
14        * fix issues
15        * add OSD
16
1017*************************************************************************/
1118
1219#include "ldcore.h"
20#include "machine/8255ppi.h"
21#include "machine/z80ctc.h"
22#include "cpu/z80/z80daisy.h"
1323
1424
1525
r3426r3427
1727    DEBUGGING
1828***************************************************************************/
1929
20#define PRINTF_COMMANDS            1
21#define CMDPRINTF(x)            do { if (PRINTF_COMMANDS) mame_printf_debug x; } while (0)
30#define LOG_PORT_IO               0
31#define LOG_STATUS_CHANGES         0
32#define LOG_FRAMES_SEEN            0
33#define LOG_COMMANDS            0
2234
23#define EMULATE_ROM               0
2435
2536
26
2737/***************************************************************************
2838    CONSTANTS
2939***************************************************************************/
3040
31/* Player-specific states */
32enum
33{
34   LDSTATE_SKIPPING = LDSTATE_OTHER,
35   LDSTATE_WAITING
36};
41#define SCAN_SPEED                  (2000 / 30)         /* 2000 frames/second */
42#define SEEK_FAST_SPEED               (4000 / 30)         /* 4000 frames/second */
3743
38/* Pioneer LD-V1000 specific information */
39enum
40{
41   LDV1000_MODE_STATUS,
42   LDV1000_MODE_GET_FRAME,
43   LDV1000_MODE_GET_1ST,
44   LDV1000_MODE_GET_2ND,
45   LDV1000_MODE_GET_RAM
46};
44#define MULTIJUMP_TRACK_TIME         ATTOTIME_IN_USEC(50)
4745
48#define LDV1000_SCAN_SPEED         (2000 / 30)         /* 2000 frames/second */
49#define LDV1000_SCAN_DURATION      (4)               /* scan for 4 vsyncs each time */
5046
5147
52
5348/***************************************************************************
5449    TYPE DEFINITIONS
5550***************************************************************************/
r3426r3427
5752/* player-specific data */
5853struct _ldplayer_data
5954{
60   /* general modes and states */
61   UINT8            audio1disable;         /* explicit disable for audio 1 */
62   UINT8            audio2disable;         /* explicit disable for audio 2 */
63   UINT8            framedisplay;         /* frame display */
64   INT32            parameter;            /* parameter for numbers */
55   /* low-level emulation data */
56   int               cpunum;               /* CPU index of the Z80 */
57   const device_config *ctc;               /* CTC device */
58   const device_config *multitimer;         /* multi-jump timer device */
6559
66   UINT8            mode;               /* current mode */
67   UINT8            lastchapter;         /* last chapter seen */
68   UINT16            lastframe;            /* last frame seen */
69   UINT32            activereg;            /* active register index */
70   UINT8            ram[1024];            /* RAM */
71   UINT32            readpos;            /* current read position */
72   UINT32            readtotal;            /* current read position */
73   UINT8            readbuf[256];         /* temporary read buffer */
74   attotime         lastvsynctime;         /* time of last update/vsync */
60   /* communication status */
61   UINT8            command;            /* command byte to the player */
62   UINT8            status;               /* status byte from the player */
63   UINT8            vsync;               /* VSYNC state */
64
65   /* I/O port states */
66   UINT8            counter_start;         /* starting value for counter */
67   UINT8             counter;            /* current counter value */
68   UINT8            portc0;               /* port C on PPI 0 */
69   UINT8            portb1;               /* port B on PPI 1 */
70   UINT8            portc1;               /* port C on PPI 1 */
71
72   /* display/decode circuit emulation */
73   UINT8            portselect;            /* selection of which port to access */
74   UINT8            display[2][20];         /* display lines */
75   UINT8            dispindex;            /* index within the display line */
76   UINT8            vbi[7*3];            /* VBI data */
77   UINT8            vbiready;            /* VBI ready flag */
78   UINT8            vbiindex;            /* index within the VBI data */
7579};
7680
7781
r3426r3427
8185***************************************************************************/
8286
8387static void ldv1000_init(laserdisc_state *ld);
84static void ldv1000_soft_reset(laserdisc_state *ld);
85static void ldv1000_update_squelch(laserdisc_state *ld);
86static int ldv1000_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 stateparam);
88static void ldv1000_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
8789static INT32 ldv1000_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
8890static void ldv1000_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data);
8991static UINT8 ldv1000_status_strobe_r(laserdisc_state *ld);
9092static UINT8 ldv1000_command_strobe_r(laserdisc_state *ld);
9193static UINT8 ldv1000_status_r(laserdisc_state *ld);
9294
95static TIMER_CALLBACK( vsync_off );
96static TIMER_CALLBACK( vbi_data_fetch );
97static TIMER_DEVICE_CALLBACK( multijump_timer );
9398
99static void ctc_interrupt(const device_config *device, int state);
94100
101static WRITE8_HANDLER( decoder_display_port_w );
102static READ8_HANDLER( decoder_display_port_r );
103static READ8_HANDLER( controller_r );
104static WRITE8_HANDLER( controller_w );
105static WRITE8_DEVICE_HANDLER( ppi0_porta_w );
106static READ8_DEVICE_HANDLER( ppi0_portb_r );
107static READ8_DEVICE_HANDLER( ppi0_portc_r );
108static WRITE8_DEVICE_HANDLER( ppi0_portc_w );
109static READ8_DEVICE_HANDLER( ppi1_porta_r );
110static WRITE8_DEVICE_HANDLER( ppi1_portb_w );
111static WRITE8_DEVICE_HANDLER( ppi1_portc_w );
112
113
114
95115/***************************************************************************
96    22VP931 ROM AND MACHINE INTERFACES
116    INLINE FUNCTIONS
97117***************************************************************************/
98118
99#if EMULATE_ROM
100static WRITE8_HANDLER( ld_controls )
119/*-------------------------------------------------
120    find_ldv1000 - find our device; assumes there
121    is only one
122-------------------------------------------------*/
123
124INLINE laserdisc_state *find_ldv1000(running_machine *machine)
101125{
102   switch (offset)
103   {
104      case 0:
105         // write $00 at startup/reject
106         break;
126   return ldcore_get_safe_token(device_list_first(machine->config->devicelist, LASERDISC));
127}
107128
108      case 2:
109         // write $06 at startup/reject
110         break;
111129
112      case 3:
113         // write $8A at startup
114         break;
115130
116      case 5:
117         // write $9F at startup/reject
118         break;
131/***************************************************************************
132    LD-V1000 ROM AND MACHINE INTERFACES
133***************************************************************************/
119134
120      case 6:
121         // write $C3 at startup/reject
122         break;
135static ADDRESS_MAP_START( ldv1000_map, ADDRESS_SPACE_PROGRAM, 8 )
136   AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x6000) AM_ROM
137   AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x3800) AM_RAM
138   AM_RANGE(0xc000, 0xc003) AM_MIRROR(0x9ff0) AM_DEVREADWRITE(PPI8255, "ldvppi0", ppi8255_r, ppi8255_w)
139   AM_RANGE(0xc004, 0xc007) AM_MIRROR(0x9ff0) AM_DEVREADWRITE(PPI8255, "ldvppi1", ppi8255_r, ppi8255_w)
140ADDRESS_MAP_END
123141
124      case 7:
125         // write $90 at startup
126         break;
127   }
128}
129142
143static ADDRESS_MAP_START( ldv1000_portmap, ADDRESS_SPACE_IO, 8 )
144   ADDRESS_MAP_GLOBAL_MASK(0xff)
145   AM_RANGE(0x00, 0x07) AM_MIRROR(0x38) AM_READWRITE(decoder_display_port_r, decoder_display_port_w)
146   AM_RANGE(0x40, 0x40) AM_MIRROR(0x3f) AM_READ(controller_r)
147   AM_RANGE(0x80, 0x80) AM_MIRROR(0x3f) AM_WRITE(controller_w)
148   AM_RANGE(0xc0, 0xc3) AM_MIRROR(0x3c) AM_DEVREADWRITE(Z80CTC, "ldvctc", z80ctc_r, z80ctc_w)
149ADDRESS_MAP_END
130150
131static READ8_HANDLER( ld_controls )
151
152static const ppi8255_interface ppi0intf =
132153{
133   switch (offset)
134   {
135      case 4:
154   NULL,         ppi0_portb_r,   ppi0_portc_r,
155   ppi0_porta_w,   NULL,         ppi0_portc_w
156};
136157
137   }
138}
139158
140
141static WRITE8_HANDLER( unknown_port_w )
159static const ppi8255_interface ppi1intf =
142160{
143   // Writes to $00/$02/$00
144   // Values:
145   //  $04/$09/$0F
146   //  $04/$0E/$0F
147   //  $04/   /$0F
148}
161   ppi1_porta_r,   NULL,         NULL,
162   NULL,         ppi1_portb_w,   ppi1_portc_w
163};
149164
150165
151static ADDRESS_MAP_START( ldv1000_map, ADDRESS_SPACE_PROGRAM, 8 )
152   AM_RANGE(0x0000, 0x1fff) AM_ROM
153   AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x400) AM_RAM
154   AM_RANGE(0xc000, 0xc007) AM_READWRITE(ld_controls)
155ADDRESS_MAP_END
166static const z80ctc_interface ctcintf =
167{
168   "ldv1000",
169   0,
170   0,
171   ctc_interrupt
172};
156173
157174
158static ADDRESS_MAP_START( ldv1000_portmap, ADDRESS_SPACE_PROGRAM, 8 )
159   ADDRESS_MAP_GLOBAL_MASK(0xff)
160   AM_RANGE(0x00, 0x03) AM_WRITE(unknown_port_w)
161   AM_RANGE(0xc0, 0xc3) AM_DEVREADWRITE(Z80CTC, "ctc", z80ctc_r, z80ctc_w)
162ADDRESS_MAP_END
175static const z80_daisy_chain daisy_chain[] =
176{
177   { Z80CTC, "ldvctc" },
178   { NULL }
179};
163180
164181
165182static MACHINE_DRIVER_START( ldv1000 )
166   MDRV_CPU_ADD("ldv1000", Z80, 4000000)
183   MDRV_CPU_ADD("ldv1000", Z80, XTAL_5MHz/2)
184   MDRV_CPU_CONFIG(daisy_chain)
167185   MDRV_CPU_PROGRAM_MAP(ldv1000_map,0)
186   MDRV_CPU_IO_MAP(ldv1000_portmap,0)
187
188   MDRV_Z80CTC_ADD("ldvctc", ctcintf)
189   MDRV_PPI8255_ADD("ldvppi0", ppi0intf)
190   MDRV_PPI8255_ADD("ldvppi1", ppi1intf)
191   MDRV_TIMER_ADD("multitimer", multijump_timer)
168192MACHINE_DRIVER_END
169193
170194
r3426r3427
172196   ROM_REGION( 0x2000, "ldv1000", ROMREGION_LOADBYNAME )
173197   ROM_LOAD( "z03_1001_vyw-053_v1-0.bin", 0x0000, 0x2000, CRC(31ec4687) SHA1(52f91c304a878ba02b2fa1cda1a9489d6dd5a34f) )
174198ROM_END
175#endif
176199
177200
178201
r3426r3427
185208   LASERDISC_TYPE_PIONEER_LDV1000,            /* type of the player */
186209   sizeof(ldplayer_data),                  /* size of the state */
187210   "Pioneer LD-V1000",                     /* name of the player */
188#if EMULATE_ROM
189211   rom_ldv1000,                        /* pointer to ROM region information */
190212   machine_config_ldv1000,                  /* pointer to machine configuration */
191#else
192   NULL,
193   NULL,
194#endif
195213   ldv1000_init,                        /* initialization callback */
196   NULL,                              /* vsync callback */
214   ldv1000_vsync,                        /* vsync callback */
197215   ldv1000_update,                        /* update callback */
198216   NULL,                              /* overlay callback */
199217   ldv1000_data_w,                        /* parallel data write */
r3426r3427
213231
214232
215233/***************************************************************************
216    INLINE FUNCTIONS
234    PIONEER LD-V1000 IMPLEMENTATION
217235***************************************************************************/
218236
219237/*-------------------------------------------------
220    requires_state_save - returns TRUE if the
221    given state will return to the previous
222    state when done
238    ldv1000_init - player-specific initialization
223239-------------------------------------------------*/
224240
225INLINE int requires_state_save(UINT8 state)
241static void ldv1000_init(laserdisc_state *ld)
226242{
227   return (state == LDSTATE_SCANNING ||
228         state == LDSTATE_SKIPPING ||
229         state == LDSTATE_WAITING);
243   astring *tempstring = astring_alloc();
244   ldplayer_data *player = ld->player;
245
246   /* reset our state */
247   memset(player, 0, sizeof(*player));
248
249   /* find our devices */
250   player->cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "ldv1000"));
251   player->ctc = devtag_get_device(ld->device->machine, Z80CTC, device_build_tag(tempstring, ld->device->tag, "ldvctc"));
252   player->multitimer = devtag_get_device(ld->device->machine, TIMER, device_build_tag(tempstring, ld->device->tag, "multitimer"));
253   timer_device_set_ptr(player->multitimer, ld);
254   astring_free(tempstring);
230255}
231256
232257
233258/*-------------------------------------------------
234    read_16bits_from_ram_be - read 16 bits from
235    player RAM in big-endian format
259    ldv1000_vsync - VSYNC callback, called at the
260    start of the blanking period
236261-------------------------------------------------*/
237262
238INLINE UINT16 read_16bits_from_ram_be(UINT8 *ram, UINT32 offset)
263static void ldv1000_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime)
239264{
240   return (ram[offset + 0] << 8) | ram[offset + 1];
265   slider_position sliderpos = ldcore_get_slider_position(ld);
266   ldplayer_data *player = ld->player;
267
268   /* generate interrupts if we hit the edges */
269   z80ctc_trg1_w(player->ctc, 0, sliderpos == SLIDER_MINIMUM);
270   z80ctc_trg2_w(player->ctc, 0, sliderpos == SLIDER_MAXIMUM);
271
272   /* signal VSYNC and set a timer to turn it off */
273   player->vsync = TRUE;
274   timer_set(attotime_mul(video_screen_get_scan_period(ld->screen), 4), ld, 0, vsync_off);
275
276   /* also set a timer to fetch the VBI data when it is ready */
277   timer_set(video_screen_get_time_until_pos(ld->screen, 19*2, 0), ld, 0, vbi_data_fetch);
278
279   /* boost interleave for the first 1ms to improve communications */
280   cpu_boost_interleave(attotime_zero, ATTOTIME_IN_MSEC(1));
241281}
242282
243283
244284/*-------------------------------------------------
245    write_16bits_to_ram_be - write 16 bits to
246    player RAM in big endian format
285    ldv1000_update - update callback, called on
286    the first visible line of the frame
247287-------------------------------------------------*/
248288
249INLINE void write_16bits_to_ram_be(UINT8 *ram, UINT32 offset, UINT16 data)
289static INT32 ldv1000_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime)
250290{
251   ram[offset + 0] = data >> 8;
252   ram[offset + 1] = data >> 0;
291   if (LOG_FRAMES_SEEN)
292   {
293      int frame = frame_from_metadata(vbi);
294      if (frame != FRAME_NOT_PRESENT) printf("== %d\n", frame);
295   }
296   return fieldnum;
253297}
254298
255299
256
257/***************************************************************************
258    PIONEER LD-V1000 IMPLEMENTATION
259***************************************************************************/
260
261300/*-------------------------------------------------
262    ldv1000_init - Pioneer PR-8210-specific
263    initialization
301    ldv1000_data_w - handle a parallel data write
302    to the LD-V1000
264303-------------------------------------------------*/
265304
266static void ldv1000_init(laserdisc_state *ld)
305static void ldv1000_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data)
267306{
268   /* do a soft reset */
269   ldv1000_soft_reset(ld);
307   ld->player->command = data;
308   if (LOG_COMMANDS)
309      printf("-> COMMAND = %02X (%s)\n", data, (ld->player->portc1 & 0x10) ? "valid" : "invalid");
270310}
271311
272312
273313/*-------------------------------------------------
274    ldv1000_soft_reset - Pioneer LDV-1000-specific
275    soft reset
314    ldv1000_status_strobe_r - return state of the
315    status strobe
276316-------------------------------------------------*/
277317
278static void ldv1000_soft_reset(laserdisc_state *ld)
318static UINT8 ldv1000_status_strobe_r(laserdisc_state *ld)
279319{
280   ldplayer_data *player = ld->player;
281   attotime curtime = timer_get_time();
320   return (ld->player->portc1 & 0x20) ? ASSERT_LINE : CLEAR_LINE;
321}
282322
283   ld->state.state = LDSTATE_NONE;
284   ld->state.substate = 0;
285   ld->state.param = 0;
286   ld->state.endtime = curtime;
287323
288   player->audio1disable = 0;
289   player->audio2disable = 0;
290   player->parameter = 0;
324/*-------------------------------------------------
325    ldv1000_command_strobe_r - return state of the
326    command strobe
327-------------------------------------------------*/
291328
292   player->mode = 0;
293   player->activereg = 0;
294   memset(player->ram, 0, sizeof(player->ram));
295   player->readpos = 0;
296   player->readtotal = 0;
297   memset(player->readbuf, 0, sizeof(player->readbuf));
298   player->lastvsynctime = curtime;
299
300   ldv1000_switch_state(ld, LDSTATE_PARKED, 0);
329static UINT8 ldv1000_command_strobe_r(laserdisc_state *ld)
330{
331   return (ld->player->portc1 & 0x10) ? ASSERT_LINE : CLEAR_LINE;
301332}
302333
303334
304335/*-------------------------------------------------
305    ldv1000_update_squelch - update the squelch
306    settings based on the current state
336    ldv1000_status_r - handle a parallel data read
337    from the LD-V1000
307338-------------------------------------------------*/
308339
309static void ldv1000_update_squelch(laserdisc_state *ld)
340static UINT8 ldv1000_status_r(laserdisc_state *ld)
310341{
311   ldplayer_data *player = ld->player;
342   return ld->player->status;
343}
312344
313   switch (ld->state.state)
314   {
315      /* video on, audio on */
316      case LDSTATE_PLAYING:
317         ldcore_set_audio_squelch(ld, player->audio1disable, player->audio2disable);
318         ldcore_set_video_squelch(ld, FALSE);
319         break;
320345
321      /* video on, audio off */
322      case LDSTATE_PAUSING:
323      case LDSTATE_PAUSED:
324      case LDSTATE_PLAYING_SLOW_REVERSE:
325      case LDSTATE_PLAYING_SLOW_FORWARD:
326      case LDSTATE_PLAYING_FAST_REVERSE:
327      case LDSTATE_PLAYING_FAST_FORWARD:
328      case LDSTATE_STEPPING_REVERSE:
329      case LDSTATE_STEPPING_FORWARD:
330      case LDSTATE_SCANNING:
331      case LDSTATE_SKIPPING:
332      case LDSTATE_WAITING:
333         ldcore_set_audio_squelch(ld, TRUE, TRUE);
334         ldcore_set_video_squelch(ld, FALSE);
335         break;
346/*-------------------------------------------------
347    vsync_off - timer callback to clear the VSYNC
348    flag
349-------------------------------------------------*/
336350
337      /* video off, audio off */
338      case LDSTATE_NONE:
339      case LDSTATE_EJECTING:
340      case LDSTATE_EJECTED:
341      case LDSTATE_PARKED:
342      case LDSTATE_LOADING:
343      case LDSTATE_SPINUP:
344      case LDSTATE_SEEKING:
345         ldcore_set_audio_squelch(ld, TRUE, TRUE);
346         ldcore_set_video_squelch(ld, TRUE);
347         break;
348   }
351static TIMER_CALLBACK( vsync_off )
352{
353   laserdisc_state *ld = ptr;
354   ld->player->vsync = FALSE;
349355}
350356
351357
352358/*-------------------------------------------------
353    ldv1000_switch_state - attempt to switch states
354    if appropriate, and ensure the squelch values
355    are correct
359    vbi_data_fetch - timer callback to update the
360    VBI data in the PIA as soon as it is ready;
361    this must happy early in the frame because
362    the player logic relies on fetching it here
356363-------------------------------------------------*/
357364
358static int ldv1000_switch_state(laserdisc_state *ld, UINT8 newstate, INT32 parameter)
365static TIMER_CALLBACK( vbi_data_fetch )
359366{
360   attotime curtime = timer_get_time();
367   laserdisc_state *ld = ptr;
368   ldplayer_data *player = ld->player;
369   UINT8 focus_on = !(player->portb1 & 0x01);
370   UINT8 laser_on = (player->portb1 & 0x40);
371   UINT32 lines[3];
361372
362   /* if this is the same state, ignore */
363   if (ld->state.state == newstate)
364      return TRUE;
373   /* appears to return data in reverse order */
374   lines[0] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE1718);
375   lines[1] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE17);
376   lines[2] = laserdisc_get_field_code(ld->device, LASERDISC_CODE_LINE16);
365377
366   /* if we're in a timed state, we ignore changes until the time elapses */
367   if (attotime_compare(curtime, ld->state.endtime) < 0)
368      return FALSE;
369
370   /* if moving to a state that requires it, save the old state */
371   if (requires_state_save(newstate) && !requires_state_save(ld->state.state))
372      ld->savestate = ld->state;
373
374   /* set up appropriate squelch and timing */
375   ld->state.state = newstate;
376   ld->state.substate = 0;
377   ld->state.param = parameter;
378   ld->state.endtime = curtime;
379   ldv1000_update_squelch(ld);
380
381   /* if we're switching to a timed state, set the appropriate timer */
382   switch (ld->state.state)
378   /* fill in the details */
379   memset(player->vbi, 0, sizeof(player->vbi));
380   if (focus_on && laser_on)
383381   {
384      case LDSTATE_EJECTING:
385         ld->state.endtime = attotime_add(curtime, GENERIC_EJECT_TIME);
386         break;
382      int line;
387383
388      case LDSTATE_LOADING:
389         ld->state.endtime = attotime_add(curtime, GENERIC_LOAD_TIME);
390         break;
384      /* loop over lines */
385      for (line = 0; line < 3; line++)
386      {
387         UINT8 *dest = &player->vbi[line * 7];
388         UINT32 data = lines[line];
391389
392      case LDSTATE_SPINUP:
393         ld->state.endtime = attotime_add(curtime, GENERIC_SPINUP_TIME);
394         break;
395
396      case LDSTATE_WAITING:
397         ld->state.endtime = attotime_add(curtime, attotime_mul(ATTOTIME_IN_MSEC(100), ld->state.param));
398         break;
390         /* the logic only processes leadin/leadout/frame number codes */
391         if (data == VBI_CODE_LEADIN || data == VBI_CODE_LEADOUT || (data & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE)
392         {
393            *dest++ = 0x09 | (((data & VBI_MASK_CAV_PICTURE) == VBI_CODE_CAV_PICTURE) ? 0x02 : 0x00);
394            *dest++ = 0x08;
395            *dest++ = (data >> 16) & 0x0f;
396            *dest++ = (data >> 12) & 0x0f;
397            *dest++ = (data >>  8) & 0x0f;
398            *dest++ = (data >>  4) & 0x0f;
399            *dest++ = (data >>  0) & 0x0f;
400         }
401      }
399402   }
400   return TRUE;
403
404   /* signal that data is ready and reset the readback index */
405   player->vbiready = TRUE;
406   player->vbiindex = 0;
401407}
402408
403409
404410/*-------------------------------------------------
405    ldv1000_update - Pioneer PR-8210-specific
406    update callback
411    multijump_timer - called once for each track
412    in a multijump sequence; we decrement the
413    down counter and autostop when we hit 0
407414-------------------------------------------------*/
408415
409static INT32 ldv1000_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime)
416static TIMER_DEVICE_CALLBACK( multijump_timer )
410417{
418   laserdisc_state *ld = ptr;
411419   ldplayer_data *player = ld->player;
412   ldplayer_state newstate;
413   INT32 advanceby = 0;
414   int frame, chapter;
420   int direction;
415421
416   /* remember the last frame and chapter */
417   player->lastvsynctime = curtime;
418   frame = frame_from_metadata(vbi);
419   if (frame != FRAME_NOT_PRESENT)
420      player->lastframe = frame;
421   chapter = chapter_from_metadata(vbi);
422   if (chapter != CHAPTER_NOT_PRESENT)
423      player->lastchapter = chapter;
422   /* bit 5 of port B on PPI 1 selects the direction of slider movement */
423   direction = (player->portb1 & 0x20) ? 1 : -1;
424   ldcore_advance_slider(ld, direction);
424425
425   /* handle things based on the state */
426   switch (ld->state.state)
427   {
428      case LDSTATE_EJECTING:
429      case LDSTATE_EJECTED:
430      case LDSTATE_PARKED:
431      case LDSTATE_LOADING:
432      case LDSTATE_SPINUP:
433      case LDSTATE_PAUSING:
434      case LDSTATE_PAUSED:
435      case LDSTATE_PLAYING:
436      case LDSTATE_PLAYING_SLOW_REVERSE:
437      case LDSTATE_PLAYING_SLOW_FORWARD:
438      case LDSTATE_PLAYING_FAST_REVERSE:
439      case LDSTATE_PLAYING_FAST_FORWARD:
440      case LDSTATE_STEPPING_REVERSE:
441      case LDSTATE_STEPPING_FORWARD:
442      case LDSTATE_SCANNING:
443      case LDSTATE_SEEKING:
444         /* generic behaviors are appropriate for all of these commands */
445         advanceby = ldcore_generic_update(ld, vbi, fieldnum, curtime, &newstate);
446         ldv1000_switch_state(ld, newstate.state, newstate.param);
447         break;
426   /* update down counter and reschedule */
427   if (--player->counter != 0)
428      timer_device_adjust_oneshot(timer, MULTIJUMP_TRACK_TIME, 0);
429}
448430
449      case LDSTATE_SKIPPING:
450         /* just advance and return to previous state */
451         advanceby = ld->state.param;
452         ldv1000_switch_state(ld, ld->savestate.state, ld->savestate.param);
453         break;
454431
455      case LDSTATE_WAITING:
456         /* keep trying to switch to the previous state until we succeed */
457         ldv1000_switch_state(ld, ld->savestate.state, ld->savestate.param);
458         break;
459   }
432/*-------------------------------------------------
433    ctc_interrupt - called when the CTC triggers
434    an interrupt in the daisy chain
435-------------------------------------------------*/
460436
461   return advanceby;
437static void ctc_interrupt(const device_config *device, int state)
438{
439   laserdisc_state *ld = find_ldv1000(device->machine);
440   cpunum_set_input_line(device->machine, ld->player->cpunum, 0, state ? ASSERT_LINE : CLEAR_LINE);
462441}
463442
464443
465444/*-------------------------------------------------
466    ldv1000_data_w - write callback when the
467    ENTER state is written
445    decoder_display_port_w - handle writes to the
446    decoder/display chips
468447-------------------------------------------------*/
469448
470static void ldv1000_data_w(laserdisc_state *ld, UINT8 prev, UINT8 data)
449static WRITE8_HANDLER( decoder_display_port_w )
471450{
451   /*
452        TX/RX = /A0 (A0=0 -> TX, A0=1 -> RX)
453
454        Display is 6-bit
455        Decoder is 4-bit
456    */
457   laserdisc_state *ld = find_ldv1000(machine);
472458   ldplayer_data *player = ld->player;
473   int target;
474459
475   /* 0xff bytes are used for synchronization */
476   if (data == 0xff)
477      return;
460   /* writes to offset 0 select the target for reads/writes of actual data */
461   if (offset == 0)
462   {
463      player->portselect = data;
464      player->dispindex = 0;
465   }
478466
479   /* handle commands */
480   switch (data)
467   /* writes to offset 2 constitute actual writes targeted toward the display and decoder chips */
468   else if (offset == 2)
481469   {
482      case 0x3f:   CMDPRINTF(("ldv1000: 0\n"));
483         player->parameter = (player->parameter == -1) ? 0 : (player->parameter * 10 + 0);
484         return;
470      /* selections 0 and 1 represent the two display lines; only 6 bits are transferred */
471      if (player->portselect < 2)
472         player->display[player->portselect][player->dispindex++ % 20] = data & 0x3f;
473   }
474}
485475
486      case 0x0f:   CMDPRINTF(("ldv1000: 1\n"));
487         player->parameter = (player->parameter == -1) ? 1 : (player->parameter * 10 + 1);
488         return;
489476
490      case 0x8f:   CMDPRINTF(("ldv1000: 2\n"));
491         player->parameter = (player->parameter == -1) ? 2 : (player->parameter * 10 + 2);
492         return;
477/*-------------------------------------------------
478    decoder_display_port_r - handle reads from the
479    decoder/display chips
480-------------------------------------------------*/
493481
494      case 0x4f:   CMDPRINTF(("ldv1000: 3\n"));
495         player->parameter = (player->parameter == -1) ? 3 : (player->parameter * 10 + 3);
496         return;
482static READ8_HANDLER( decoder_display_port_r )
483{
484   laserdisc_state *ld = find_ldv1000(machine);
485   ldplayer_data *player = ld->player;
486   UINT8 result = 0;
497487
498      case 0x2f:   CMDPRINTF(("ldv1000: 4\n"));
499         player->parameter = (player->parameter == -1) ? 4 : (player->parameter * 10 + 4);
500         return;
488   /* reads from offset 3 constitute actual reads from the display and decoder chips */
489   if (offset == 3)
490   {
491      /* selection 4 represents the VBI data reading */
492      if (player->portselect == 4)
493      {
494         player->vbiready = FALSE;
495         result = player->vbi[player->vbiindex++ % ARRAY_LENGTH(player->vbi)];
496      }
497   }
498   return result;
499}
501500
502      case 0xaf:   CMDPRINTF(("ldv1000: 5\n"));
503         player->parameter = (player->parameter == -1) ? 5 : (player->parameter * 10 + 5);
504         return;
505501
506      case 0x6f:   CMDPRINTF(("ldv1000: 6\n"));
507         player->parameter = (player->parameter == -1) ? 6 : (player->parameter * 10 + 6);
508         return;
502/*-------------------------------------------------
503    controller_r - handle read of the data from
504    the controlling system
505-------------------------------------------------*/
509506
510      case 0x1f:   CMDPRINTF(("ldv1000: 7\n"));
511         player->parameter = (player->parameter == -1) ? 7 : (player->parameter * 10 + 7);
512         return;
507static READ8_HANDLER( controller_r )
508{
509   laserdisc_state *ld = find_ldv1000(machine);
513510
514      case 0x9f:   CMDPRINTF(("ldv1000: 8\n"));
515         player->parameter = (player->parameter == -1) ? 8 : (player->parameter * 10 + 8);
516         return;
511   /* note that this is a cheesy implementation; the real thing relies on exquisite timing */
512   UINT8 result = ld->player->command ^ 0xff;
513   ld->player->command = 0xff;
514   return result;
515}
517516
518      case 0x5f:   CMDPRINTF(("ldv1000: 9\n"));
519         player->parameter = (player->parameter == -1) ? 9 : (player->parameter * 10 + 9);
520         return;
521517
522      case 0x7f:  CMDPRINTF(("ldv1000: %d Recall\n", player->parameter));
523         /* set the active register */
524         player->activereg = player->parameter;
525         /* should also display the register value */
526         break;
518/*-------------------------------------------------
519    controller_w - handle status latch writes
520-------------------------------------------------*/
527521
528      case 0x20:  CMDPRINTF(("ldv1000: x0 reverse (stop) - Badlands special\n"));
529         ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_REVERSE, 0);
530         break;
522static WRITE8_HANDLER( controller_w )
523{
524   laserdisc_state *ld = find_ldv1000(machine);
525   if (LOG_STATUS_CHANGES && data != ld->player->status)
526      printf("%04X:CONTROLLER.W=%02X\n", activecpu_get_pc(), data);
527   ld->player->status = data;
528}
531529
532      case 0x21:  CMDPRINTF(("ldv1000: x1/4 reverse - Badlands special\n"));
533         ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_REVERSE, 4);
534         break;
535530
536      case 0x22:  CMDPRINTF(("ldv1000: x1/2 reverse - Badlands special\n"));
537         ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_REVERSE, 2);
538         break;
531/*-------------------------------------------------
532    ppi0_porta_w - handle writes to port A of
533    PPI #0
534-------------------------------------------------*/
539535
540      case 0x23:
541      case 0x24:
542      case 0x25:
543      case 0x26:
544      case 0x27:  CMDPRINTF(("ldv1000: x%d reverse - Badlands special\n", (data & 0x07) - 2));
545         ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_REVERSE, (data & 0x07) - 2);
546         break;
536static WRITE8_DEVICE_HANDLER( ppi0_porta_w )
537{
538   laserdisc_state *ld = find_ldv1000(device->machine);
539   ld->player->counter_start = data;
540   if (LOG_PORT_IO)
541      printf("%04X:PORTA.0=%02X\n", activecpu_get_pc(), data);
542}
547543
548      case 0xa0:  CMDPRINTF(("ldv1000: x0 forward (stop)\n"));
549         ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_FORWARD, 0);
550         break;
551544
552      case 0xa1:  CMDPRINTF(("ldv1000: x1/4 forward\n"));
553         ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_FORWARD, 4);
554         break;
545/*-------------------------------------------------
546    ppi0_portb_r - handle reads from port B of
547    PPI #0
548-------------------------------------------------*/
555549
556      case 0xa2:  CMDPRINTF(("ldv1000: x1/2 forward\n"));
557         ldv1000_switch_state(ld, LDSTATE_PLAYING_SLOW_FORWARD, 2);
558         break;
550static READ8_DEVICE_HANDLER( ppi0_portb_r )
551{
552   laserdisc_state *ld = find_ldv1000(device->machine);
553   return ld->player->counter;
554}
559555
560      case 0xa3:
561      case 0xa4:
562      case 0xa5:
563      case 0xa6:
564      case 0xa7:  CMDPRINTF(("ldv1000: x%d forward\n", (data & 0x07) - 2));
565         ldv1000_switch_state(ld, LDSTATE_PLAYING_FAST_FORWARD, (data & 0x07) - 2);
566         break;
567556
568      case 0xb1:
569      case 0xb2:
570      case 0xb3:
571      case 0xb4:
572      case 0xb5:
573      case 0xb6:
574      case 0xb7:
575      case 0xb8:
576      case 0xb9:
577      case 0xba:  CMDPRINTF(("ldv1000: Skip forward %d0\n", data & 0x0f));
578         /* note that this skips tracks, not frames */
579         ldv1000_switch_state(ld, LDSTATE_SKIPPING, 10 * (data & 0x0f));
580         break;
557/*-------------------------------------------------
558    ppi0_portc_r - handle reads from port C of
559    PPI #0
560-------------------------------------------------*/
581561
582      case 0x31:
583      case 0x32:
584      case 0x33:
585      case 0x34:
586      case 0x35:
587      case 0x36:
588      case 0x37:
589      case 0x38:
590      case 0x39:
591      case 0x3a:  CMDPRINTF(("ldv1000: Skip backwards %d0 - Badlands special\n", data & 0x0f));
592         /* note that this skips tracks, not frames */
593         ldv1000_switch_state(ld, LDSTATE_SKIPPING, -10 * (data & 0x0f));
594         break;
562static READ8_DEVICE_HANDLER( ppi0_portc_r )
563{
564   /*
565        $10 = /VSYNC
566        $20 = IRQ from decoder chip
567        $40 = TRKG LOOP (N24-1)
568        $80 = DUMP (N20-1) -- code reads the state and waits for it to change
569    */
570   laserdisc_state *ld = find_ldv1000(device->machine);
571   ldplayer_data *player = ld->player;
572   UINT8 result = 0x00;
595573
596      case 0xbf:   CMDPRINTF(("ldv1000: %d Clear\n", player->parameter));
597         /* clears register display and removes pending arguments */
598         player->parameter = -1;
599         break;
574   if (!player->vsync)
575      result |= 0x10;
576   if (!player->vbiready)
577      result |= 0x20;
600578
601      case 0xc2:   CMDPRINTF(("ldv1000: Get frame no.\n"));
602         /* returns the current frame number */
603         player->mode = LDV1000_MODE_GET_FRAME;
604         player->readpos = 0;
605         player->readtotal = 5;
606         sprintf((char *)player->readbuf, "%05d", player->lastframe);
607         break;
579   return result;
580}
608581
609      case 0xc3:   CMDPRINTF(("ldv1000: Get 2nd display\n"));
610         /* returns the data from the 2nd display line */
611         player->mode = LDV1000_MODE_GET_2ND;
612         player->readpos = 0;
613         player->readtotal = 8;
614         sprintf((char *)player->readbuf, "    \x1c\x1c\x1c");
615         break;
616582
617      case 0xc4:   CMDPRINTF(("ldv1000: Get 1st display\n"));
618         /* returns the data from the 1st display line */
619         player->mode = LDV1000_MODE_GET_1ST;
620         player->readpos = 0;
621         player->readtotal = 8;
622         sprintf((char *)player->readbuf, "    \x1c\x1c\x1c");
623         break;
583/*-------------------------------------------------
584    ppi0_portc_w - handle writes to port C of
585    PPI #0
586-------------------------------------------------*/
624587
625      case 0xc8:   CMDPRINTF(("ldv1000: Transfer memory\n"));
626         /* returns the data from RAM */
627         player->mode = LDV1000_MODE_GET_RAM;
628         player->readpos = 0;
629         player->readtotal = 1024;
630         break;
588static WRITE8_DEVICE_HANDLER( ppi0_portc_w )
589{
590   /*
591        $01 = preload on up/down counters
592        $02 = /MULTI JUMP TRIG
593        $04 = SCAN MODE
594        $08 = n/c
595    */
596   laserdisc_state *ld = find_ldv1000(device->machine);
597   ldplayer_data *player = ld->player;
598   UINT8 prev = player->portc0;
631599
632      case 0xcc:   CMDPRINTF(("ldv1000: Load\n"));
633         /* load program from disc -- not implemented */
634         break;
600   /* set the new value */
601   player->portc0 = data;
602   if (LOG_PORT_IO && ((data ^ prev) & 0x0f) != 0)
603   {
604      printf("%04X:PORTC.0=%02X", activecpu_get_pc(), data);
605      if (data & 0x01) printf(" PRELOAD");
606      if (!(data & 0x02)) printf(" /MULTIJUMP");
607      if (data & 0x04) printf(" SCANMODE");
608      printf("\n");
609   }
635610
636      case 0xcd:   CMDPRINTF(("ldv1000: Display disable\n"));
637         /* disables the display of current command -- not implemented */
638         break;
611   /* on the rising edge of bit 0, clock the down counter load */
612   if ((data & 0x01) && !(prev & 0x01))
613      player->counter = player->counter_start;
639614
640      case 0xce:   CMDPRINTF(("ldv1000: Display enable\n"));
641         /* enables the display of current command -- not implemented */
642         break;
615   /* on the falling edge of bit 1, start the multi-jump timer */
616   if (!(data & 0x02) && (prev & 0x02))
617      timer_device_adjust_oneshot(player->multitimer, MULTIJUMP_TRACK_TIME, 0);
618}
643619
644      case 0xf0:   CMDPRINTF(("ldv1000: Scan forward\n"));
645         if (ld->state.state != LDSTATE_SCANNING)
646            ldv1000_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(LDV1000_SCAN_SPEED, LDV1000_SCAN_DURATION));
647         else
648            ld->state.substate = 0;
649         break;
650620
651      case 0xf1:  CMDPRINTF(("ldv1000: %d Display\n", player->parameter));
652         player->framedisplay = (player->parameter == -1) ? !player->framedisplay : (player->parameter & 1);
653         break;
621/*-------------------------------------------------
622    ppi1_porta_r - handle reads from port A of
623    PPI #1
624-------------------------------------------------*/
654625
655      case 0xf3:  CMDPRINTF(("ldv1000: %d Autostop\n", player->parameter));
656         target = (player->parameter != -1) ? player->parameter : read_16bits_from_ram_be(player->ram, (player->activereg++ * 2) % 1024);
657         if (target > player->lastframe)
658            ldv1000_switch_state(ld, LDSTATE_PLAYING, target);
659         else
660            ldv1000_switch_state(ld, LDSTATE_SEEKING, target);
661         break;
626static READ8_DEVICE_HANDLER( ppi1_porta_r )
627{
628   /*
629        $01 = /FOCS LOCK
630        $02 = /SPDL LOCK
631        $04 = INSIDE
632        $08 = OUTSIDE
633        $10 = MOTOR STOP
634        $20 = +5V/test point
635        $40 = /INT LOCK
636        $80 = 8 INCH CHK
637    */
638   laserdisc_state *ld = find_ldv1000(device->machine);
639   ldplayer_data *player = ld->player;
640   slider_position sliderpos = ldcore_get_slider_position(ld);
641   UINT8 focus_on = !(player->portb1 & 0x01);
642   UINT8 spdl_on = !(player->portb1 & 0x02);
643   UINT8 result = 0x00;
662644
663      case 0xf4:  CMDPRINTF(("ldv1000: %d Audio track 1\n", player->parameter));
664         if (player->parameter == -1)
665            player->audio1disable ^= 1;
666         else
667            player->audio1disable = ~player->parameter & 1;
668         break;
645   /* bit 0: /FOCUS LOCK */
646   if (!focus_on)
647      result |= 0x01;
669648
670      case 0xf5:   CMDPRINTF(("ldv1000: %d Store\n", player->parameter));
671         /* store either the current frame number or an explicit value into the active register */
672         if (player->parameter == -1)
673            write_16bits_to_ram_be(player->ram, (player->activereg * 2) % 1024, player->lastframe);
674         else
675            write_16bits_to_ram_be(player->ram, (player->activereg * 2) % 1024, player->parameter);
676         player->activereg++;
677         break;
649   /* bit 1: /SPDL LOCK */
650   if (!spdl_on)
651      result |= 0x02;
678652
679      case 0xf6:   CMDPRINTF(("ldv1000: Step forward\n"));
680         ldv1000_switch_state(ld, LDSTATE_STEPPING_FORWARD, 0);
681         break;
653   /* bit 2: INSIDE signal */
654   if (sliderpos == SLIDER_MINIMUM)
655      result |= 0x04;
682656
683      case 0xf7:  CMDPRINTF(("ldv1000: %d Search\n", player->parameter));
684         target = (player->parameter != -1) ? player->parameter : read_16bits_from_ram_be(player->ram, (player->activereg * 2) % 1024);
685         player->activereg++;
686         ldv1000_switch_state(ld, LDSTATE_SEEKING, target);
687         break;
657   /* bit 3: OUTSIDE signal */
658   if (sliderpos == SLIDER_MAXIMUM)
659      result |= 0x08;
688660
689      case 0xf8:   CMDPRINTF(("ldv1000: Scan reverse\n"));
690         if (ld->state.state != LDSTATE_SCANNING)
691            ldv1000_switch_state(ld, LDSTATE_SCANNING, SCANNING_PARAM(-LDV1000_SCAN_SPEED, LDV1000_SCAN_DURATION));
692         else
693            ld->state.substate = 0;
694         break;
661   /* bit 4: MOTOR STOP */
695662
696      case 0xf9:   CMDPRINTF(("ldv1000: Reject\n"));
697         ldv1000_switch_state(ld, LDSTATE_EJECTING, 0);
698         break;
663   /* bit 5: +5V/test point */
664   result |= 0x20;
699665
700      case 0xfb:   CMDPRINTF(("ldv1000: %d Stop/Wait\n", player->parameter));
701         ldv1000_switch_state(ld, LDSTATE_WAITING, player->parameter);
702         break;
666   /* bit 6: /INT LOCK */
703667
704      case 0xfc:  CMDPRINTF(("ldv1000: %d Audio track 2\n", player->parameter));
705         if (player->parameter == -1)
706            player->audio2disable ^= 1;
707         else
708            player->audio2disable = ~player->parameter & 1;
709         break;
668   /* bit 7: 8 INCH CHK */
710669
711      case 0xfd:  CMDPRINTF(("ldv1000: Play\n"));
712         if (ld->state.state == LDSTATE_EJECTED)
713            ldv1000_switch_state(ld, LDSTATE_LOADING, 0);
714         else if (ld->state.state == LDSTATE_PARKED)
715            ldv1000_switch_state(ld, LDSTATE_SPINUP, 0);
716         else
717            ldv1000_switch_state(ld, LDSTATE_PLAYING, -1);
718         break;
719
720      case 0xfe:   CMDPRINTF(("ldv1000: Step reverse\n"));
721         ldv1000_switch_state(ld, LDSTATE_STEPPING_REVERSE, 0);
722         break;
723
724      default:   CMDPRINTF(("ldv1000: %d Unknown command %02X\n", player->parameter, data));
725         /* unknown command */
726         break;
727   }
728
729   /* reset the parameter after executing a command */
730   player->parameter = -1;
670   return result;
731671}
732672
733673
734674/*-------------------------------------------------
735    ldv1000_status_strobe_r - return state of the
736    status strobe
675    ppi1_portb_w - handle writes to port B of
676    PPI #1
737677-------------------------------------------------*/
738678
739static UINT8 ldv1000_status_strobe_r(laserdisc_state *ld)
679static WRITE8_DEVICE_HANDLER( ppi1_portb_w )
740680{
681   /*
682        $01 = /FOCS ON
683        $02 = /SPDL RUN
684        $04 = /JUMP TRIG
685        $08 = /SCAN A
686        $10 = SCAN B
687        $20 = SCAN C
688        $40 = /LASER ON
689        $80 = /SYNC ST0
690    */
691   laserdisc_state *ld = find_ldv1000(device->machine);
741692   ldplayer_data *player = ld->player;
693   UINT8 prev = player->portb1;
694   int direction;
742695
743   /* the status strobe is asserted (active low) 500-650usec after VSYNC */
744   /* for a duration of 26usec; we pick 600-626usec */
745   attotime delta = attotime_sub(timer_get_time(), player->lastvsynctime);
746   if (delta.attoseconds >= ATTOTIME_IN_USEC(600).attoseconds && delta.attoseconds < ATTOTIME_IN_USEC(626).attoseconds)
747      return ASSERT_LINE;
696   /* set the new value */
697   player->portb1 = data;
698   if (LOG_PORT_IO && ((data ^ prev) & 0xff) != 0)
699   {
700      printf("%04X:PORTB.1=%02X:", activecpu_get_pc(), data);
701      if (!(data & 0x01)) printf(" FOCSON");
702      if (!(data & 0x02)) printf(" SPDLRUN");
703      if (!(data & 0x04)) printf(" JUMPTRIG");
704      if (!(data & 0x08)) printf(" SCANA (%c %c)", (data & 0x10) ? 'L' : 'H', (data & 0x20) ? 'F' : 'R');
705      if ( (data & 0x40)) printf(" LASERON");
706      if (!(data & 0x80)) printf(" SYNCST0");
707      printf("\n");
708   }
748709
749   return CLEAR_LINE;
750}
710   /* bit 5 selects the direction of slider movement for JUMP TRG and scanning */
711   direction = (data & 0x20) ? 1 : -1;
751712
713   /* on the falling edge of bit 2, jump one track in either direction */
714   if (!(data & 0x04) && (prev & 0x04))
715      ldcore_advance_slider(ld, direction);
752716
753/*-------------------------------------------------
754    ldv1000_command_strobe_r - return state of the
755    command strobe
756-------------------------------------------------*/
717   /* bit 3 low enables scanning */
718   if (!(data & 0x08))
719   {
720      /* bit 4 selects the speed */
721      int delta = (data & 0x10) ? SCAN_SPEED : SEEK_FAST_SPEED;
722      ldcore_set_slider_speed(ld, delta * direction);
723   }
757724
758static UINT8 ldv1000_command_strobe_r(laserdisc_state *ld)
759{
760   ldplayer_data *player = ld->player;
761
762   /* the command strobe is asserted (active low) 54 or 84usec after the status */
763   /* strobe for a duration of 25usec; we pick 600+84 = 684-709usec */
764   /* for a duration of 26usec; we pick 600-626usec */
765   attotime delta = attotime_sub(timer_get_time(), player->lastvsynctime);
766   if (delta.attoseconds >= ATTOTIME_IN_USEC(684).attoseconds && delta.attoseconds < ATTOTIME_IN_USEC(709).attoseconds)
767      return ASSERT_LINE;
768
769   return CLEAR_LINE;
725   /* bit 3 high stops scanning */
726   else
727      ldcore_set_slider_speed(ld, 0);
770728}
771729
772730
773731/*-------------------------------------------------
774    ldv1000_status_r - return state of the ready
775    line
732    ppi1_portc_w - handle writes to port C of
733    PPI #1
776734-------------------------------------------------*/
777735
778static UINT8 ldv1000_status_r(laserdisc_state *ld)
736static WRITE8_DEVICE_HANDLER( ppi1_portc_w )
779737{
738   /*
739        $01 = AUD 1
740        $02 = AUD 2
741        $04 = AUDIO ENABLE
742        $08 = /VIDEO SQ
743        $10 = COMMAND
744        $20 = STATUS
745        $40 = SIZE 8/12
746        $80 = /LED CAV
747    */
748   laserdisc_state *ld = find_ldv1000(device->machine);
780749   ldplayer_data *player = ld->player;
781   UINT8 status = 0xff;
750   UINT8 prev = player->portc1;
782751
783   /* switch off the current mode */
784   switch (player->mode)
752   /* set the new value */
753   player->portc1 = data;
754   if (LOG_PORT_IO && ((data ^ prev) & 0xcf) != 0)
785755   {
786      /* reading frame number returns 5 characters */
787      /* reading display lines returns 8 characters */
788      case LDV1000_MODE_GET_FRAME:
789      case LDV1000_MODE_GET_1ST:
790      case LDV1000_MODE_GET_2ND:
791         assert(player->readpos < player->readtotal);
792         status = player->readbuf[player->readpos++];
793         if (player->readpos == player->readtotal)
794            player->mode = LDV1000_MODE_STATUS;
795         break;
796
797      /* reading RAM returns 1024 bytes */
798      case LDV1000_MODE_GET_RAM:
799         assert(player->readpos < player->readtotal);
800         status = player->ram[1023 - player->readpos++];
801         if (player->readpos == player->readtotal)
802            player->mode = LDV1000_MODE_STATUS;
803         break;
804
805      /* otherwise, we just compute a status code */
806      default:
807      case LDV1000_MODE_STATUS:
808         switch (ld->state.state)
809         {
810            case LDSTATE_EJECTING:            status = 0x60;      break;
811            case LDSTATE_EJECTED:            status = 0xe0;      break;
812            case LDSTATE_PARKED:            status = 0xfc;      break;
813            case LDSTATE_LOADING:            status = 0x48;      break;
814            case LDSTATE_SPINUP:            status = 0x48;      break;
815            case LDSTATE_PAUSING:            status = 0xe5;      break;
816            case LDSTATE_PAUSED:            status = 0xe5;      break;
817            case LDSTATE_PLAYING:            status = 0xe4;      break;
818            case LDSTATE_PLAYING_SLOW_REVERSE:   status = 0xae;      break;
819            case LDSTATE_PLAYING_SLOW_FORWARD:   status = 0xae;      break;
820            case LDSTATE_PLAYING_FAST_REVERSE:   status = 0xae;      break;
821            case LDSTATE_PLAYING_FAST_FORWARD:   status = 0xae;      break;
822            case LDSTATE_STEPPING_FORWARD:      status = 0xe5;      break;
823            case LDSTATE_STEPPING_REVERSE:      status = 0xe5;      break;
824            case LDSTATE_SCANNING:            status = 0x4c;      break;
825            case LDSTATE_SEEKING:            status = 0x50;      break;
826//              case LASERDISC_SEARCH_FINISHED:     status = 0xd0;      break;
827//              case LASERDISC_AUTOSTOPPED:         status = 0x54;      break;
828            default:
829               fatalerror("Unexpected disc state in ldv1000_status_r\n");
830               break;
831         }
832         break;
756      printf("%04X:PORTC.1=%02X", activecpu_get_pc(), data);
757      if (data & 0x01) printf(" AUD1");
758      if (data & 0x02) printf(" AUD2");
759      if (data & 0x04) printf(" AUDEN");
760      if (!(data & 0x08)) printf(" VIDEOSQ");
761      if (data & 0x10) printf(" COMMAND");
762      if (data & 0x20) printf(" STATUS");
763      if (data & 0x40) printf(" SIZE8");
764      if (!(data & 0x80)) printf(" CAV");
765      printf("\n");
833766   }
834767
835   /* bit 7 indicates our busy status */
836   return status;
768   /* video squelch is controlled by bit 3 */
769   ldcore_set_video_squelch(ld, (data & 0x08) == 0);
770
771   /* audio squelch is controlled by bits 0-2 */
772   ldcore_set_audio_squelch(ld, !(data & 0x04) || !(data & 0x01), !(data & 0x04) || !(data & 0x02));
837773}
src/emu/inptport.h
r3426r3427
286286   IPT_UI_PASTE,
287287   IPT_UI_SAVE_STATE,
288288   IPT_UI_LOAD_STATE,
289   IPT_UI_ADD_CHEAT,
290   IPT_UI_DELETE_CHEAT,
291   IPT_UI_SAVE_CHEAT,
292   IPT_UI_WATCH_VALUE,
293   IPT_UI_EDIT_CHEAT,
294   IPT_UI_RELOAD_CHEAT,
295289   IPT_UI_TOGGLE_CROSSHAIR,
296290
297291   /* additional OSD-specified UI port types (up to 16) */
src/emu/devintrf.h
r3426r3427
215215/* remove a device from a device list */
216216void device_list_remove(device_config **listheadptr, device_type type, const char *tag);
217217
218/* build a tag that combines the device's name and the given tag */
219const char *device_build_tag(astring *dest, const char *devicetag, const char *tag);
218220
221/* build a tag with the same device prefix as the source tag*/
222const char *device_inherit_tag(astring *dest, const char *sourcetag, const char *tag);
219223
224
225
220226/* ----- type-based device access ----- */
221227
222228/* return the number of items of a given type; DEVICE_TYPE_WILDCARD is allowed */
src/emu/rendlay.c
r3426r3427
293293   view->scraspect = (view->scrbounds.x1 - view->scrbounds.x0) / (view->scrbounds.y1 - view->scrbounds.y0);
294294
295295   /* if we're handling things normally, the target bounds are (0,0)-(1,1) */
296   if (!(layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN))
296   if (!(layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) || view->screens == 0)
297297   {
298298      target_bounds.x0 = target_bounds.y0 = 0.0f;
299299      target_bounds.x1 = target_bounds.y1 = 1.0f;
src/emu/render.c
r3426r3427
14111411   if (target_pixel_aspect != 0.0f)
14121412   {
14131413      /* start with the aspect ratio of the square pixel layout */
1414      width = (target->layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) ? target->curview->scraspect : target->curview->aspect;
1414      width = ((target->layerconfig & LAYER_CONFIG_ZOOM_TO_SCREEN) && target->curview->screens > 0) ? target->curview->scraspect : target->curview->aspect;
14151415      height = 1.0f;
14161416
14171417      /* first apply target orientation */
src/emu/mconfig.c
r3426r3427
2323
2424
2525/***************************************************************************
26    INLINE FUNCTIONS
27***************************************************************************/
28
29/*-------------------------------------------------
30    create_tag - create a combined tag,
31    allocating strings as necessary
32-------------------------------------------------*/
33
34INLINE const char *create_tag(astring *result, const char *prefix, const char *tag)
35{
36   if (prefix != NULL && prefix[0] != 0)
37      astring_printf(result, "%s:%s", prefix, tag);
38   else
39      astring_cpyc(result, tag);
40   return astring_c(result);
41}
42
43
44
45/***************************************************************************
4626    MACHINE CONFIGURATIONS
4727***************************************************************************/
4828
r3426r3427
6141   memset(config, 0, sizeof(*config));
6242
6343   /* parse tokens into the config */
64   machine_config_detokenize(config, tokens, "", 0);
44   machine_config_detokenize(config, tokens, NULL, 0);
6545   return config;
6646}
6747
r3426r3427
271251         case MCONFIG_TOKEN_DEVICE_ADD:
272252            devtype = TOKEN_GET_PTR(tokens, devtype);
273253            tag = TOKEN_GET_STRING(tokens);
274            device = device_list_add(&config->devicelist, devtype, create_tag(tempstring, tagprefix, tag));
254            device = device_list_add(&config->devicelist, devtype, device_build_tag(tempstring, tagprefix, tag));
275255            break;
276256
277257         case MCONFIG_TOKEN_DEVICE_REMOVE:
278258            devtype = TOKEN_GET_PTR(tokens, devtype);
279259            tag = TOKEN_GET_STRING(tokens);
280            device_list_remove(&config->devicelist, devtype, create_tag(tempstring, tagprefix, tag));
260            device_list_remove(&config->devicelist, devtype, device_build_tag(tempstring, tagprefix, tag));
281261            device = NULL;
282262            break;
283263
284264         case MCONFIG_TOKEN_DEVICE_MODIFY:
285265            devtype = TOKEN_GET_PTR(tokens, devtype);
286266            tag = TOKEN_GET_STRING(tokens);
287            device = (device_config *)device_list_find_by_tag(config->devicelist, devtype, create_tag(tempstring, tagprefix, tag));
267            device = (device_config *)device_list_find_by_tag(config->devicelist, devtype, device_build_tag(tempstring, tagprefix, tag));
288268            if (device == NULL)
289269               fatalerror("Unable to find device: type=%s tag=%s\n", devtype_name(devtype), astring_c(tempstring));
290270            break;
r3426r3427
351331            TOKEN_UNGET_UINT32(tokens);
352332            TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32);
353333            tag = TOKEN_GET_STRING(tokens);
354            cpu = cpu_add(config, create_tag(tempstring, tagprefix, tag), type, clock);
334            cpu = cpu_add(config, device_build_tag(tempstring, tagprefix, tag), type, clock);
355335            break;
356336
357337         case MCONFIG_TOKEN_CPU_MODIFY:
358338            tag = TOKEN_GET_STRING(tokens);
359            cpu = cpu_find(config, create_tag(tempstring, tagprefix, tag));
339            cpu = cpu_find(config, device_build_tag(tempstring, tagprefix, tag));
360340            break;
361341
362342         case MCONFIG_TOKEN_CPU_REMOVE:
363343            tag = TOKEN_GET_STRING(tokens);
364            cpu_remove(config, create_tag(tempstring, tagprefix, tag));
344            cpu_remove(config, device_build_tag(tempstring, tagprefix, tag));
365345            cpu = NULL;
366346            break;
367347
r3426r3427
369349            TOKEN_UNGET_UINT32(tokens);
370350            TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32);
371351            tag = TOKEN_GET_STRING(tokens);
372            cpu = cpu_find(config, create_tag(tempstring, tagprefix, tag));
352            cpu = cpu_find(config, device_build_tag(tempstring, tagprefix, tag));
373353            if (cpu == NULL)
374354               fatalerror("Unable to find CPU: tag=%s\n", astring_c(tempstring));
375355            cpu->type = type;
r3426r3427
522502            TOKEN_UNGET_UINT32(tokens);
523503            TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32);
524504            tag = TOKEN_GET_STRING(tokens);
525            sound = sound_add(config, create_tag(tempstring, tagprefix, tag), type, clock);
505            sound = sound_add(config, device_build_tag(tempstring, tagprefix, tag), type, clock);
526506            break;
527507
528508         case MCONFIG_TOKEN_SOUND_REMOVE:
r3426r3427
531511
532512         case MCONFIG_TOKEN_SOUND_MODIFY:
533513            tag = TOKEN_GET_STRING(tokens);
534            sound = sound_find(config, create_tag(tempstring, tagprefix, tag));
514            sound = sound_find(config, device_build_tag(tempstring, tagprefix, tag));
535515            if (sound == NULL)
536516               fatalerror("Unable to find sound: tag=%s\n", astring_c(tempstring));
537517            sound->routes = 0;
r3426r3427
546526            TOKEN_UNGET_UINT32(tokens);
547527            TOKEN_GET_UINT64_UNPACK3(tokens, entrytype, 8, type, 24, clock, 32);
548528            tag = TOKEN_GET_STRING(tokens);
549            sound = sound_find(config, create_tag(tempstring, tagprefix, tag));
529            sound = sound_find(config, device_build_tag(tempstring, tagprefix, tag));
550530            if (sound == NULL)
551531               fatalerror("Unable to find sound: tag=%s\n", astring_c(tempstring));
552532            sound->type = type;
r3426r3427
578558      {
579559         tokens = device_get_info_ptr(device, DEVINFO_PTR_MACHINE_CONFIG);
580560         if (tokens != NULL)
581            machine_config_detokenize(config, tokens, create_tag(tempstring, tagprefix, device->tag), depth + 1);
561            machine_config_detokenize(config, tokens, device->tag, depth + 1);
582562      }
583563
584564   astring_free(tempstring);
src/emu/validity.c
r3426r3427
807807         /* validate the global map parameters */
808808         if (map->spacenum != spacenum)
809809         {
810            mame_printf_error("%s: %s CPU #%d space %d has address space %d handlers!", driver->source_file, driver->name, cpunum, spacenum, map->spacenum);
810            mame_printf_error("%s: %s CPU #%d space %d has address space %d handlers!\n", driver->source_file, driver->name, cpunum, spacenum, map->spacenum);
811811            error = TRUE;
812812         }
813813         if (map->databits != databus_width)
src/ldplayer/ldplayer.mak
r3426r3427
2626#-------------------------------------------------
2727
2828CPUS += I8049
29CPUS += Z80
2930
3031
3132
docs/messnew.txt
r3426r3427
228228
229229Source Changes:
230230----------------
231- The core is based on MAME 0.127u6.  This incorporates all features of the
231- The core is based on MAME 0.127u7.  This incorporates all features of the
232232  update to this core.  [MAME team]
233233
234234- Refactored ZIP path code out of src/mess/image.c, made more testable.  [Nate

Previous 15994 Revisions Next


© 1998-2018 The MESS Team