1 /* One Shot One Kill & Maddonna
2    Driver by David Haywood and Paul Priest
3    Dip Switches and Inputs by Stephane Humbert
4 
5 Notes :
6   - The YM3812 is used only for timing. All sound is played with ADPCM samples.
7 
8   - It doesn't seem possible to make 2 consecutive shots at the same place !
9     Ingame bug or is there something missing in the emulation ?
10     * several gun games are like this, changed the driver so it doesn't try
11 
12   - Gun X range is 0x0000-0x01ff and gun Y range is 0x0000-0x00ff, so you
13     can shoot sometimes out of the "visible area" ... NOT A BUG !
14   - Player 1 and 2 guns do NOT use the same routine to determine the
15     coordonates of an impact on the screen : position both guns in the
16     "upper left" corner in the "gun test" to see what I mean.
17   - I've assumed that the shot was right at the place the shot was made,
18     but I don't have any more information about that
19     (what the hell is "Gun X Shift Left" REALLY used for ?)
20 
21 TO DO :
22 
23   - fix some priorities for some tiles
24   - verify the parameters for the guns (analog ports)
25   - figure out year and manufacturer
26     (NOTHING is displayed in "demo mode", nor when you complete ALL levels !)
27   - sound too fast in Maddonna?
28   - layer order register?
29 
30 */
31 
32 #include "driver.h"
33 data16_t *oneshot_sprites;
34 data16_t *oneshot_bg_videoram;
35 data16_t *oneshot_mid_videoram;
36 data16_t *oneshot_fg_videoram;
37 data16_t *oneshot_scroll;
38 
39 int gun_x_p1,gun_y_p1,gun_x_p2,gun_y_p2;
40 int gun_x_shift;
41 
42 WRITE16_HANDLER( oneshot_bg_videoram_w );
43 WRITE16_HANDLER( oneshot_mid_videoram_w );
44 WRITE16_HANDLER( oneshot_fg_videoram_w );
45 VIDEO_START( oneshot );
46 VIDEO_UPDATE( oneshot );
47 VIDEO_UPDATE( maddonna );
48 
49 
READ16_HANDLER(oneshot_in0_word_r)50 static READ16_HANDLER( oneshot_in0_word_r )
51 {
52 	int data = readinputport(0);
53 
54 	switch (data & 0x0c)
55 	{
56 		case 0x00 :
57 			gun_x_shift = 35;
58 			break;
59 		case 0x04 :
60 			gun_x_shift = 30;
61 			break;
62 		case 0x08 :
63 			gun_x_shift = 40;
64 			break;
65 		case 0x0c :
66 			gun_x_shift = 50;
67 			break;
68 	}
69 
70 	return data;
71 }
72 
READ16_HANDLER(oneshot_gun_x_p1_r)73 static READ16_HANDLER( oneshot_gun_x_p1_r )
74 {
75 	/* shots must be in a different location to register */
76 	static int wobble = 0;
77 	wobble ^= 1;
78 
79 	return gun_x_p1 ^ wobble;
80 }
81 
READ16_HANDLER(oneshot_gun_y_p1_r)82 static READ16_HANDLER( oneshot_gun_y_p1_r )
83 {
84 	return gun_y_p1;
85 }
86 
READ16_HANDLER(oneshot_gun_x_p2_r)87 static READ16_HANDLER( oneshot_gun_x_p2_r )
88 {
89 	/* shots must be in a different location to register */
90 	static int wobble = 0;
91 	wobble ^= 1;
92 
93 	return gun_x_p2 ^ wobble;
94 }
95 
READ16_HANDLER(oneshot_gun_y_p2_r)96 static READ16_HANDLER( oneshot_gun_y_p2_r )
97 {
98 	return gun_y_p2;
99 }
100 
WRITE16_HANDLER(soundbank_w)101 static WRITE16_HANDLER( soundbank_w )
102 {
103 	if (ACCESSING_LSB)
104 	{
105 		OKIM6295_set_bank_base(0, 0x40000 * ((data & 0x03) ^ 0x03));
106 	}
107 }
108 
109 
110 
MEMORY_READ16_START(oneshot_readmem)111 static MEMORY_READ16_START( oneshot_readmem )
112 	{ 0x000000, 0x03ffff, MRA16_ROM },
113 	{ 0x080000, 0x087fff, MRA16_RAM },
114 	{ 0x0c0000, 0x0c07ff, MRA16_RAM },
115 	{ 0x120000, 0x120fff, MRA16_RAM },
116 	{ 0x180000, 0x182fff, MRA16_RAM },
117 	{ 0x190002, 0x190003, soundlatch_word_r },
118 	{ 0x190026, 0x190027, oneshot_gun_x_p1_r },
119 	{ 0x19002e, 0x19002f, oneshot_gun_x_p2_r },
120 	{ 0x190036, 0x190037, oneshot_gun_y_p1_r },
121 	{ 0x19003e, 0x19003f, oneshot_gun_y_p2_r },
122 	{ 0x19c020, 0x19c021, oneshot_in0_word_r },
123 	{ 0x19c024, 0x19c025, input_port_1_word_r },
124 	{ 0x19c02c, 0x19c02d, input_port_2_word_r },
125 	{ 0x19c030, 0x19c031, input_port_3_word_r },
126 	{ 0x19c034, 0x19c035, input_port_4_word_r },
127 MEMORY_END
128 
129 static MEMORY_WRITE16_START( oneshot_writemem )
130 	{ 0x000000, 0x03ffff, MWA16_ROM },
131 	{ 0x080000, 0x087fff, MWA16_RAM },
132 	{ 0x0c0000, 0x0c07ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 },
133 	{ 0x120000, 0x120fff, MWA16_RAM, &oneshot_sprites },
134 	{ 0x180000, 0x180fff, oneshot_mid_videoram_w, &oneshot_mid_videoram }, /* some people , girl etc.*/
135 	{ 0x181000, 0x181fff, oneshot_fg_videoram_w, &oneshot_fg_videoram }, /* credits etc.*/
136 	{ 0x182000, 0x182fff, oneshot_bg_videoram_w, &oneshot_bg_videoram }, /* credits etc.*/
137 	{ 0x188000, 0x18800f, MWA16_RAM, &oneshot_scroll },	/* scroll registers???*/
138 	{ 0x190010, 0x190011, soundlatch_word_w },
139 	{ 0x190018, 0x190019, soundbank_w },
140 MEMORY_END
141 
142 static MEMORY_READ_START( snd_readmem )
143 	{ 0x0000, 0x7fff, MRA_ROM },
144 	{ 0x8000, 0x8000, soundlatch_r },
145 	{ 0x8001, 0x87ff, MRA_RAM },
146 	{ 0xe000, 0xe000, YM3812_status_port_0_r },
147 	{ 0xe010, 0xe010, OKIM6295_status_0_r },
148 MEMORY_END
149 
150 static MEMORY_WRITE_START( snd_writemem )
151 	{ 0x0000, 0x7fff, MWA_ROM },
152 	{ 0x8000, 0x8000, soundlatch_w },
153 	{ 0x8001, 0x87ff, MWA_RAM },
154 	{ 0xe000, 0xe000, YM3812_control_port_0_w },
155 	{ 0xe001, 0xe001, YM3812_write_port_0_w },
156 	{ 0xe010, 0xe010, OKIM6295_data_0_w },
157 MEMORY_END
158 
159 INPUT_PORTS_START( oneshot )
160 	PORT_START	/* DSW 1	(0x19c020.l -> 0x08006c.l) */
161 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )		/* 0x080084.l : credits (00-09)*/
162 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_1C ) )
163 	PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
164 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
165 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
166 	PORT_DIPNAME( 0x0c, 0x00, "Gun X Shift Left" )		/* 0x0824ec.l (not in "test mode")*/
167 	PORT_DIPSETTING(    0x04, "30" )
168 	PORT_DIPSETTING(    0x00, "35" )
169 	PORT_DIPSETTING(    0x08, "40" )
170 	PORT_DIPSETTING(    0x0c, "50" )
171 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )	/* 0x082706.l - to be confirmed*/
172 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
173 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
174 	PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )			/* 0x0824fe.l*/
175 	PORT_DIPNAME( 0x40, 0x00, "Start Round" )			/* 0x08224e.l*/
176 	PORT_DIPSETTING(    0x00, "Gun Trigger" )
177 	PORT_DIPSETTING(    0x40, "Start Button" )
178 	PORT_DIPNAME( 0x80, 0x00, "Gun Test" )			/* 0x082286.l*/
179 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
180 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
181 
182 	PORT_START	/* DSW 2	(0x19c024.l -> 0x08006e.l) */
183 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )		/* 0x082500.l*/
184 	PORT_DIPSETTING(    0x01, "1" )
185 	PORT_DIPSETTING(    0x02, "2" )
186 	PORT_DIPSETTING(    0x00, "3" )
187 	PORT_DIPSETTING(    0x03, "5" )
188 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) )
189 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
190 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
191 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) )
192 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
193 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
194 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Difficulty ) )	/* 0x082506.l*/
195 	PORT_DIPSETTING(    0x10, "Easy" )				/* 0*/
196 	PORT_DIPSETTING(    0x00, "Normal" )			/* 1*/
197 	PORT_DIPSETTING(    0x20, "Hard" )				/* 2*/
198 	PORT_DIPSETTING(    0x30, "Hardest" )			/* 3*/
199 	PORT_DIPNAME( 0x40, 0x00, "Round Select" )		/* 0x082f16.l - only after 1st stage*/
200 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )		/* "On"  in the "test mode"*/
201 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )			/* "Off" in the "test mode"*/
202 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Free_Play ) )	/* 0x0800ca.l*/
203 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
204 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
205 
206 	PORT_START	/* Credits	(0x19c02c.l -> 0x08007a.l) */
207 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
208 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
209 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
210 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
211 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
212 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
213 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
214 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
215 
216 	PORT_START	/* Player 1 Gun Trigger	(0x19c030.l) */
217 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
218 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
219 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
220 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
221 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
222 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
223 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
224 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
225 
226 	PORT_START	/* Player 2 Gun Trigger	(0x19c034.l) */
227 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
228 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
229 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
230 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
231 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
232 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
233 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
234 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
235 
236 	PORT_START	/* Player 1 Gun X		($190026.l) */
237 	PORT_ANALOG( 0xff, 0x80, IPT_LIGHTGUN_X | IPF_PLAYER1, 35, 15, 0, 0xff )
238 
239 	PORT_START	/* Player 1 Gun Y		($190036.l) */
240 	PORT_ANALOG( 0xff, 0x80, IPT_LIGHTGUN_Y | IPF_PLAYER1, 35, 15, 0, 0xff )
241 
242 	PORT_START	/* Player 2 Gun X		($19002e.l) */
243 	PORT_ANALOG( 0xff, 0x80, IPT_LIGHTGUN_X | IPF_PLAYER2, 35, 15, 0, 0xff )
244 
245 	PORT_START	/* Player 2 Gun Y		($19003e.l) */
246 	PORT_ANALOG( 0xff, 0x80, IPT_LIGHTGUN_Y | IPF_PLAYER2, 35, 15, 0, 0xff )
247 
248 INPUT_PORTS_END
249 
250 INPUT_PORTS_START( maddonna )
251 	PORT_START /* DSW A */
252 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
253 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_1C ) )
254 	PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
255 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_2C ) )
256 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
257 	PORT_DIPNAME( 0x04, 0x04, "Girl Pictures" )
258 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
259 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
260 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )		/* Not defined in the manual*/
261 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
262 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
263 	PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
264 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
265 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
266 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )		/* Not defined in the manual*/
267 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
268 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
269 	PORT_DIPNAME( 0x40, 0x00, "Invulnerability" )		/* This one was not defined in the manual*/
270 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
271 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
272 	PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
273 
274 	PORT_START /* DSW B */
275 	PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
276 	PORT_DIPSETTING(    0x00, "Easy" )				/* 2 Monsters at start, but "dumber"??*/
277 	PORT_DIPSETTING(    0x01, "Normal" )			/* 2 Monsters at start*/
278 	PORT_DIPSETTING(    0x02, "Hard" )				/* 3 Monsters at start*/
279 	PORT_DIPSETTING(    0x03, "Hardest" )			/* 4 Monsters at start*/
280 	PORT_DIPNAME( 0x0c, 0x08, "Time Per Round" )
281 	PORT_DIPSETTING(    0x08, "80 Seconds" )
282 	PORT_DIPSETTING(    0x04, "90 Seconds" )
283 	PORT_DIPSETTING(    0x00, "100 Seconds" )
284 /*	PORT_DIPSETTING(    0x0c, "?? Seconds" )		*/ /* Not Defined for On+On*/
285 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) )
286 	PORT_DIPSETTING(    0x10, "3" )
287 	PORT_DIPSETTING(    0x00, "5" )
288 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )		/* Not defined in the manual*/
289 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
290 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
291 	PORT_DIPNAME( 0xc0, 0x00, "Hurry Up!" )			/* Controls "Hurry Up!" banner & Vampire - Not defined the in manual*/
292 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )		/* No Hurry up*/
293 	PORT_DIPSETTING(    0x40, "On - 10" )			/* The rest show the banner but is there a difference in how the Vampire shows up???*/
294 	PORT_DIPSETTING(    0x80, "On - 01" )
295 	PORT_DIPSETTING(    0xc0, "On - 11" )
296 
297 	PORT_START	/* Credits */
298 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
299 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
300 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
301 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
302 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
303 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
304 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
305 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
306 
307 	PORT_START	/* Player 1 */
308 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
309 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
310 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
311 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
312 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
313 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1 )
314 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
315 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
316 
317 	PORT_START	/* Player 1 */
318 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
319 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
320 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
321 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
322 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
323 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
324 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
325 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
326 INPUT_PORTS_END
327 
328 
329 static struct GfxLayout oneshot16x16_layout =
330 {
331 	16,16,
332 	RGN_FRAC(1,8),
333 	8,
334 	{ RGN_FRAC(0,8),RGN_FRAC(1,8),RGN_FRAC(2,8),RGN_FRAC(3,8),RGN_FRAC(4,8),RGN_FRAC(5,8),RGN_FRAC(6,8),RGN_FRAC(7,8) },
335 	{ 0,1,2,3,4,5,6,7,
336 	 64+0,64+1,64+2,64+3,64+4,64+5,64+6,64+7 },
337 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
338 	 128+0*8, 128+1*8, 128+2*8, 128+3*8, 128+4*8, 128+5*8, 128+6*8, 128+7*8 },
339 	16*16
340 };
341 
342 static struct GfxLayout oneshot8x8_layout =
343 {
344 	8,8,
345 	RGN_FRAC(1,8),
346 	8,
347 	{ RGN_FRAC(0,8),RGN_FRAC(1,8),RGN_FRAC(2,8),RGN_FRAC(3,8),RGN_FRAC(4,8),RGN_FRAC(5,8),RGN_FRAC(6,8),RGN_FRAC(7,8) },
348 	{ 0,1,2,3,4,5,6,7 },
349 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
350 	8*8
351 };
352 
353 
354 static struct GfxDecodeInfo gfxdecodeinfo[] =
355 {
356 	{ REGION_GFX1, 0, &oneshot16x16_layout,   0x00, 4  }, /* sprites */
357 	{ REGION_GFX1, 0, &oneshot8x8_layout,     0x00, 4  }, /* sprites */
358 	{ -1 } /* end of array */
359 };
360 
irq_handler(int irq)361 static void irq_handler(int irq)
362 {
363 	cpu_set_irq_line(1, 0, irq ? ASSERT_LINE : CLEAR_LINE);
364 }
365 
366 static struct YM3812interface ym3812_interface =
367 {
368 	1,
369 	3500000,	/* ??? music tempo in maddonna */
370 	{ 100 },
371 	{ irq_handler }
372 };
373 
374 static struct OKIM6295interface okim6295_interface =
375 {
376 	1,
377 	{ 8000 },	/* ? */
378 	{ REGION_SOUND1 },
379 	{ 100 }
380 };
381 
382 static MACHINE_DRIVER_START( oneshot )
383 
384 	/* basic machine hardware */
385 	MDRV_CPU_ADD(M68000, 12000000)
386 	MDRV_CPU_MEMORY(oneshot_readmem,oneshot_writemem)
387 	MDRV_CPU_VBLANK_INT(irq4_line_hold,1)
388 
389 	MDRV_CPU_ADD(Z80, 5000000)
390 	MDRV_CPU_MEMORY(snd_readmem, snd_writemem)
391 
392 	MDRV_FRAMES_PER_SECOND(60)
393 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
394 
395 	MDRV_GFXDECODE(gfxdecodeinfo)
396 
397 	/* video hardware */
398 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
399 	MDRV_SCREEN_SIZE(32*16, 32*16)
400 	MDRV_VISIBLE_AREA(0*16, 20*16-1, 0*16, 15*16-1)
401 	MDRV_PALETTE_LENGTH(0x400)
402 
403 	MDRV_VIDEO_START(oneshot)
404 	MDRV_VIDEO_UPDATE(oneshot)
405 
406 	MDRV_SOUND_ADD(YM3812, ym3812_interface)
407 	MDRV_SOUND_ADD(OKIM6295, okim6295_interface)
408 MACHINE_DRIVER_END
409 
410 static MACHINE_DRIVER_START( maddonna )
411 
412 	/* basic machine hardware */
413 	MDRV_IMPORT_FROM(oneshot)
414 
415 	/* video hardware */
416 	MDRV_VIDEO_UPDATE(maddonna) /* no crosshair*/
417 MACHINE_DRIVER_END
418 
419 
420 ROM_START( oneshot )
421 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 Code */
422 	ROM_LOAD16_BYTE( "1shot-u.a24", 0x00000, 0x20000, CRC(0ecd33da) SHA1(d050e9a1900cd9f629818034b1445e034b6cf81c) )
423 	ROM_LOAD16_BYTE( "1shot-u.a22", 0x00001, 0x20000, CRC(26c3ae2d) SHA1(47e479abe06d508a9d9fe677d34d6a485bde5533) )
424 
425 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 Code */
426 	ROM_LOAD( "1shot.ua2", 0x00000, 0x010000, CRC(f655b80e) SHA1(2574a812c35801755c187a47f46ccdb0983c5feb) )
427 
428 	ROM_REGION( 0x400000, REGION_GFX1, 0 ) /* Sprites */
429 	ROM_LOAD( "1shot-ui.16a",0x000000, 0x080000, CRC(f765f9a2) SHA1(f6c386e0421fcb0e420585dd27d9dad951bb2556) )
430 	ROM_LOAD( "1shot-ui.13a",0x080000, 0x080000, CRC(3361b5d8) SHA1(f7db674d479765d4e58fb663aa5e13dde2abcce7) )
431 	ROM_LOAD( "1shot-ui.11a",0x100000, 0x080000, CRC(8f8bd027) SHA1(fbec952ab5604c8e20c5e7cfd2844f4fe5441186) )
432 	ROM_LOAD( "1shot-ui.08a",0x180000, 0x080000, CRC(254b1701) SHA1(163bfa70508fca20be70dd0af8b768ab6bf211b9) )
433 	ROM_LOAD( "1shot-ui.16", 0x200000, 0x080000, CRC(ff246b27) SHA1(fef6029030268174ef9648b8f437aeda68475346) )
434 	ROM_LOAD( "1shot-ui.13", 0x280000, 0x080000, CRC(80342e83) SHA1(2ac2b300382a607a539d2b0982ab596f05be3ad3) )
435 	ROM_LOAD( "1shot-ui.11", 0x300000, 0x080000, CRC(b8938345) SHA1(318cf0d070db786680a45811bbd765fa37caaf62) )
436 	ROM_LOAD( "1shot-ui.08", 0x380000, 0x080000, CRC(c9953bef) SHA1(21917a9dcc0afaeec20672ad863d0c9d583369e3) )
437 
438 	ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* Samples */
439 	ROM_LOAD( "1shot.u15", 0x000000, 0x080000, CRC(e3759a47) SHA1(1159335924a6d68a0a24bfbe0c9182107f3f05f8) )
440 	ROM_LOAD( "1shot.u14", 0x080000, 0x080000, CRC(222e33f8) SHA1(2665afdf4cb1a29325df62efc1843a4b2cf34a4e) )
441 
442 	ROM_REGION( 0x10000, REGION_USER1, 0 )
443 	ROM_LOAD( "1shot.mb", 0x00000, 0x10000, CRC(6b213183) SHA1(599c59d155d11edb151bfaed1d24ef964462a447) ) /* motherboard rom, zooming?*/
444 ROM_END
445 
446 ROM_START( maddonna )
447 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 Code */
448 	ROM_LOAD16_BYTE( "maddonna.b16", 0x00000, 0x20000, CRC(643f9054) SHA1(77907ecdb02a525f9beed7fee203431eda16c831) )
449 	ROM_LOAD16_BYTE( "maddonna.b15", 0x00001, 0x20000, CRC(e36c0e26) SHA1(f261b2c74eeca05df302aa4956f5d02121d42054) )
450 
451 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 Code */
452 	ROM_LOAD( "x13.ua2", 0x00000, 0x010000, CRC(f2080071) SHA1(68cbae9559879b2dc19c41a7efbd13ab4a569d3f) ) /* b13*/
453 
454 	ROM_REGION( 0x400000, REGION_GFX1, 0 ) /* Sprites */
455 	ROM_LOAD( "maddonna.b5",  0x000000, 0x080000, CRC(838d3244) SHA1(7339143481ec043219825f282450ff53bb718f8c) )
456 	ROM_LOAD( "maddonna.b7",  0x080000, 0x080000, CRC(4920d2ec) SHA1(e72a374bca81ffa4f925326455e007df7227ae08) )
457 	ROM_LOAD( "maddonna.b9",  0x100000, 0x080000, CRC(3a8a3feb) SHA1(832654902963c163644134431fd1221e1895cfec) )
458 	ROM_LOAD( "maddonna.b11", 0x180000, 0x080000, CRC(6f9b7fdf) SHA1(14ced1d43eae3b6db4a0a4c12fb26cbd13eb7428) )
459 	ROM_LOAD( "maddonna.b6",   0x200000, 0x080000, CRC(b02e9e0e) SHA1(6e527a2bfda0f4f420c10139c75dac2704e08d08) )
460 	ROM_LOAD( "maddonna.b8",   0x280000, 0x080000, CRC(03f1de40) SHA1(bb0c0525155404c0740ac5f048f71ae7651a5941) )
461 	ROM_LOAD( "maddonna.b10",  0x300000, 0x080000, CRC(87936423) SHA1(dda42f3685427edad7686d9712ff07d2fd9bf57e) )
462 	ROM_LOAD( "maddonna.b12",  0x380000, 0x080000, CRC(879ab23c) SHA1(5288016542a10e60ccb28a930d8dfe4db41c6fc6) )
463 
464 	ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* Samples */
465 	/* no samples for this game */
466 
467 	ROM_REGION( 0x10000, REGION_USER1, 0 )
468 	ROM_LOAD( "x1", 0x00000, 0x10000, CRC(6b213183) SHA1(599c59d155d11edb151bfaed1d24ef964462a447) ) /* motherboard rom, zooming?*/
469 ROM_END
470 
471 ROM_START( maddonnb )
472 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 Code */
473 	/* program roms missing in this dump, gfx don't seem 100% correct for other ones */
474 	ROM_LOAD16_BYTE( "maddonnb.b16", 0x00000, 0x20000, NO_DUMP )
475 	ROM_LOAD16_BYTE( "maddonnb.b15", 0x00001, 0x20000, NO_DUMP )
476 
477 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 Code */
478 	ROM_LOAD( "x13.ua2", 0x00000, 0x010000, CRC(f2080071) SHA1(68cbae9559879b2dc19c41a7efbd13ab4a569d3f) )
479 
480 	ROM_REGION( 0x400000, REGION_GFX1, 0 ) /* Sprites */
481 	ROM_LOAD( "x5.16a",  0x000000, 0x080000, CRC(1aae0ad3) SHA1(a5afe699c66dcc5e7928807ae1c8be7ffdda798c) )
482 	ROM_LOAD( "x7.13a",  0x080000, 0x080000, CRC(39d13e25) SHA1(bfe8b187c7fc9dc1ac2cc3f840a686a25ec55340) )
483 	ROM_LOAD( "x9.11a",  0x100000, 0x080000, CRC(2027faeb) SHA1(cb8c697705ac70ec3cf74901a2becf6abd8be63d) )
484 	ROM_LOAD( "x11.08a", 0x180000, 0x080000, CRC(4afcfba6) SHA1(b3fff9217db2770e703bf8317a718aeee1e5c44d) )
485 	ROM_LOAD( "x6.16",   0x200000, 0x080000, CRC(7b893e78) SHA1(d38c5b159031976e7864021e59cc4fff61ffb53f) )
486 	ROM_LOAD( "x8.13",   0x280000, 0x080000, CRC(fed90a1f) SHA1(e2cff7ce24697308c50dadb0c042d87f3e46abdb) )
487 	ROM_LOAD( "x10.11",  0x300000, 0x080000, CRC(479d718c) SHA1(4fbc2568744cf78b15c6e0f3caba4d7109743cdd) )
488 	ROM_LOAD( "x12.08",  0x380000, 0x080000, CRC(d56ca9f8) SHA1(49bca5dbc048e7b7efa34e1c08ee1b76767ffe38) )
489 
490 	ROM_REGION( 0x100000, REGION_SOUND1, 0 ) /* Samples */
491 	/* no samples for this game */
492 
493 	ROM_REGION( 0x10000, REGION_USER1, 0 )
494 	ROM_LOAD( "x1", 0x00000, 0x10000, CRC(6b213183) SHA1(599c59d155d11edb151bfaed1d24ef964462a447) ) /* motherboard rom, zooming?*/
495 ROM_END
496 
497 
498 
499 
500 
501 GAMEX(199?, oneshot,  0,        oneshot,  oneshot , 0, ROT0, "<unknown>", "One Shot One Kill", GAME_IMPERFECT_GRAPHICS )
502 GAME (1995, maddonna, 0,        maddonna, maddonna, 0, ROT0, "Tuning",  "Mad Donna (set 1)" )
503 GAMEX(1995, maddonnb, maddonna, maddonna, maddonna, 0, ROT0, "Tuning",  "Mad Donna (set 2)", GAME_NOT_WORKING )
504