1 #include "../vidhrdw/galivan.c"
2 
3 /***************************************************************************
4 
5 TODO:
6 - Find out how layers are enabled\disabled
7 - sprite/char priority
8 - dangar input ports
9 - wrong title screen in ninjemak
10 - bit 3 of ninjemak_gfxbank_w, there currently is a kludge to clear text RAM
11   but it should really copy stuff from the extra ROM.
12 
13 
14 Galivan
15 (C) 1985 Nihon Bussan
16 
17 driver by
18 
19 Luca Elia (eliavit@unina.it)
20 Olivier Galibert
21 
22 
23 Ninja Emaki (US)
24 (c)1986 NihonBussan Co.,Ltd.
25 
26 Youma Ninpou Chou (Japan)
27 (c)1986 NihonBussan Co.,Ltd.
28 
29 Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/12/17 -
30 
31 ***************************************************************************/
32 
33 #include "driver.h"
34 #include "vidhrdw/generic.h"
35 
36 WRITE_HANDLER( galivan_scrollx_w );
37 WRITE_HANDLER( galivan_scrolly_w );
38 WRITE_HANDLER( galivan_videoram_w );
39 WRITE_HANDLER( galivan_colorram_w );
40 WRITE_HANDLER( galivan_gfxbank_w );
41 void galivan_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
42 int galivan_vh_start(void);
43 void galivan_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
44 
45 WRITE_HANDLER( ninjemak_scrollx_w );
46 WRITE_HANDLER( ninjemak_scrolly_w );
47 WRITE_HANDLER( ninjemak_gfxbank_w );
48 int ninjemak_vh_start(void);
49 void ninjemak_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
50 
51 
52 
galivan_init_machine(void)53 static void galivan_init_machine(void)
54 {
55 	unsigned char *RAM = memory_region(REGION_CPU1);
56 
57 	cpu_setbank(1,&RAM[0x10000]);
58 //	layers = 0x60;
59 }
60 
WRITE_HANDLER(galivan_sound_command_w)61 static WRITE_HANDLER( galivan_sound_command_w )
62 {
63 	soundlatch_w(offset,(data << 1) | 1);
64 }
65 
READ_HANDLER(galivan_sound_command_r)66 static READ_HANDLER( galivan_sound_command_r )
67 {
68 	int data;
69 
70 	data = soundlatch_r(offset);
71 	soundlatch_clear_w(0,0);
72 	return data;
73 }
74 
READ_HANDLER(IO_port_c0_r)75 static READ_HANDLER( IO_port_c0_r )
76 {
77   return (0x58); /* To Avoid Reset on Ufo Robot dangar */
78 }
79 
80 
81 /* the scroll registers are memory mapped in ninjemak, I/O ports in the others */
WRITE_HANDLER(ninjemak_videoreg_w)82 static WRITE_HANDLER( ninjemak_videoreg_w )
83 {
84 	switch (offset)
85 	{
86 		case	0x0b:
87 			ninjemak_scrolly_w(0, data);
88 			break;
89 		case	0x0c:
90 			ninjemak_scrolly_w(1, data);
91 			break;
92 		case	0x0d:
93 			ninjemak_scrollx_w(0, data);
94 			break;
95 		case	0x0e:
96 			ninjemak_scrollx_w(1, data);
97 			break;
98 		default:
99 			break;
100 	}
101 }
102 
103 
104 
105 static struct MemoryReadAddress readmem[] =
106 {
107 	{ 0x0000, 0xbfff, MRA_ROM },
108 	{ 0xc000, 0xdfff, MRA_BANK1 },
109 	{ 0xe000, 0xffff, MRA_RAM },
110 	{ -1 }	/* end of table */
111 };
112 
113 static struct MemoryWriteAddress writemem[] =
114 {
115 	{ 0x0000, 0xbfff, MWA_ROM },
116 	{ 0xd800, 0xdbff, galivan_videoram_w, &videoram, &videoram_size },
117 	{ 0xdc00, 0xdfff, galivan_colorram_w, &colorram },
118 	{ 0xe000, 0xe0ff, MWA_RAM, &spriteram, &spriteram_size },
119 	{ 0xe100, 0xffff, MWA_RAM },
120 	{ -1 }	/* end of table */
121 };
122 
123 static struct MemoryWriteAddress ninjemak_writemem[] =
124 {
125 	{ 0x0000, 0xbfff, MWA_ROM },
126 	{ 0xd800, 0xd81f, ninjemak_videoreg_w },
127 	{ 0xd800, 0xdbff, galivan_videoram_w, &videoram, &videoram_size },
128 	{ 0xdc00, 0xdfff, galivan_colorram_w, &colorram },
129 	{ 0xe000, 0xe1ff, MWA_RAM, &spriteram, &spriteram_size },
130 	{ 0xe200, 0xffff, MWA_RAM },
131 	{ -1 }	/* end of table */
132 };
133 
134 
135 static struct IOReadPort readport[] =
136 {
137 	{ 0x00, 0x00, input_port_0_r },
138 	{ 0x01, 0x01, input_port_1_r },
139 	{ 0x02, 0x02, input_port_2_r },
140 	{ 0x03, 0x03, input_port_3_r },
141 	{ 0x04, 0x04, input_port_4_r },
142 	{ 0xc0, 0xc0, IO_port_c0_r }, /* dangar needs to return 0x58 */
143 	{ -1 }	/* end of table */
144 };
145 
146 static struct IOWritePort writeport[] =
147 {
148 	{ 0x40, 0x40, galivan_gfxbank_w },
149 	{ 0x41, 0x42, galivan_scrollx_w },
150 	{ 0x43, 0x44, galivan_scrolly_w },
151 	{ 0x45, 0x45, galivan_sound_command_w },
152 /*	{ 0x46, 0x46, IOWP_NOP }, */
153 /*	{ 0x47, 0x47, IOWP_NOP }, */
154 	{ -1 }	/* end of table */
155 };
156 
157 static struct IOReadPort ninjemak_readport[] =
158 {
159 	{ 0x80, 0x80, input_port_0_r },
160 	{ 0x81, 0x81, input_port_1_r },
161 	{ 0x82, 0x82, input_port_2_r },
162 	{ 0x83, 0x83, input_port_3_r },
163 	{ 0x84, 0x84, input_port_4_r },
164 	{ 0x85, 0x85, input_port_5_r },
165 	{ -1 }	/* end of table */
166 };
167 
168 static struct IOWritePort ninjemak_writeport[] =
169 {
170 	{ 0x80, 0x80, ninjemak_gfxbank_w },
171 	{ 0x85, 0x85, galivan_sound_command_w },
172 //	{ 0x86, 0x86, IOWP_NOP },			// ??
173 //	{ 0x87, 0x87, IOWP_NOP },			// ??
174 	{ -1 }	/* end of table */
175 };
176 
177 
178 static struct MemoryReadAddress sound_readmem[] =
179 {
180 	{ 0x0000, 0xbfff, MRA_ROM },
181 	{ 0xc000, 0xc7ff, MRA_RAM },
182 	{ -1 }	/* end of table */
183 };
184 
185 static struct MemoryWriteAddress sound_writemem[] =
186 {
187 	{ 0x0000, 0xbfff, MWA_ROM },
188 	{ 0xc000, 0xc7ff, MWA_RAM },
189 	{ -1 }	/* end of table */
190 };
191 
192 
193 static struct IOReadPort sound_readport[] =
194 {
195 /*	{ 0x04, 0x04, IORP_NOP },    value read and *discarded*    */
196 	{ 0x06, 0x06, galivan_sound_command_r },
197 	{ -1 }	/* end of table */
198 };
199 
200 static struct IOWritePort sound_writeport[] =
201 {
202 	{ 0x00, 0x00, YM3526_control_port_0_w },
203 	{ 0x01, 0x01, YM3526_write_port_0_w },
204 	{ 0x02, 0x02, DAC_0_data_w },
205 	{ 0x03, 0x03, DAC_1_data_w },
206 	{ -1 }	/* end of table */
207 };
208 
209 
210 
211 INPUT_PORTS_START( galivan )
212 	PORT_START      /* IN0 */
213 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
214 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
215 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
216 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
217 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
218 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
219 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
220 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
221 
222 	PORT_START      /* IN1 */
223 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
224 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
225 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
226 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
227 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
228 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
229 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
230 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
231 
232 	PORT_START  /* IN2 - TEST, COIN, START */
233 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
234 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
235 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
236 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
237 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
238 	PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
239 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
240 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
241 
242 	PORT_START	/* IN3 - DSW1 */
243 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
244 	PORT_DIPSETTING(    0x03, "3" )
245 	PORT_DIPSETTING(    0x02, "4" )
246 	PORT_DIPSETTING(    0x01, "5" )
247 	PORT_DIPSETTING(    0x00, "6" )
248 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
249 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
250 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
251 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
252 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
253 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
254 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
255 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
256 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
257 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
258 	PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
259 	PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
260 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
261 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
262 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
263 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
264 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
265 
266 	PORT_START	/* IN4 - DSW2 */
267 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
268 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
269 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
270 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
271 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
272 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
273 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
274 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_3C ) )
275 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_3C ) )
276 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )
277 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
278 	PORT_DIPSETTING(    0x10, "Easy" )
279 	PORT_DIPSETTING(    0x00, "Hard" )
280 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
281 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
282 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
283 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
284 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
285 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
286 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
287 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
288 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
289 INPUT_PORTS_END
290 
291 /* the last two dip switches are different in each version */
292 INPUT_PORTS_START( dangar )
293 	PORT_START      /* IN0 */
294 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
295 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
296 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
297 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
298 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
299 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
300 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
301 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
302 
303 	PORT_START      /* IN1 */
304 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
305 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
306 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
307 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
308 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
309 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
310 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
311 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
312 
313 	PORT_START  /* IN2 - TEST, COIN, START */
314 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
315 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
316 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
317 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
318 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
319 	PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
320 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
321 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
322 
323 	PORT_START	/* IN3 - DSW1 */
324 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
325 	PORT_DIPSETTING(    0x03, "3" )
326 	PORT_DIPSETTING(    0x02, "4" )
327 	PORT_DIPSETTING(    0x01, "5" )
328 	PORT_DIPSETTING(    0x00, "6" )
329 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
330 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
331 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
332 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
333 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
334 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
335 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
336 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
337 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
338 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
339 	PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
340 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
341 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
342 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
343 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
344 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
345 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
346 
347 	PORT_START	/* IN4 - DSW2 */
348 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
349 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
350 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
351 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
352 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
353 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
354 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
355 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
356 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
357 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
358 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
359 	PORT_DIPSETTING(    0x10, "Easy" )
360 	PORT_DIPSETTING(    0x00, "Hard" )
361 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
362 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
363 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
364 	/* two switches to allow continue... both work */
365     	PORT_DIPNAME( 0xc0, 0x00, "Continue" )
366     	PORT_DIPSETTING(    0xc0, DEF_STR( No ) )
367     	PORT_DIPSETTING(    0x80, "3 Times" )
368     	PORT_DIPSETTING(    0x40, "5 Times" )
369     	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
370 INPUT_PORTS_END
371 
372 /* the last two dip switches are different in each version */
373 INPUT_PORTS_START( dangar2 )
374 	PORT_START      /* IN0 */
375 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
376 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
377 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
378 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
379 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
380 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
381 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
382 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
383 
384 	PORT_START      /* IN1 */
385 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
386 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
387 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
388 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
389 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
390 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
391 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
392 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
393 
394 	PORT_START  /* IN2 - TEST, COIN, START */
395 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
396 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
397 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
398 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
399 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
400 	PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
401 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
402 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
403 
404 	PORT_START	/* IN3 - DSW1 */
405 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
406 	PORT_DIPSETTING(    0x00, "2" )
407 	PORT_DIPSETTING(    0x03, "3" )
408 	PORT_DIPSETTING(    0x02, "4" )
409 	PORT_DIPSETTING(    0x01, "5" )
410 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
411 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
412 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
413 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
414 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
415 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
416 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
417 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
418 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
419 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
420 	PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
421 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
422 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
423 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
424 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown) )
425 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
426 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
427 
428 	PORT_START	/* IN4 - DSW2 */
429 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
430 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
431 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
432 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
433 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
434 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
435 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
436 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
437 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
438 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
439 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
440 	PORT_DIPSETTING(    0x10, "Easy" )
441 	PORT_DIPSETTING(    0x00, "Hard" )
442 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
443 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
444 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
445 	PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Complete Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
446 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
447 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
448 	PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Base Ship Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
449 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
450 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
451 INPUT_PORTS_END
452 
453 /* the last two dip switches are different in each version */
454 INPUT_PORTS_START( dangarb )
455 	PORT_START      /* IN0 */
456 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
457 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
458 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
459 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
460 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
461 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
462 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
463 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
464 
465 	PORT_START      /* IN1 */
466 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
467 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
468 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
469 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
470 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
471 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
472 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
473 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
474 
475 	PORT_START  /* IN2 - TEST, COIN, START */
476 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
477 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
478 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
479 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
480 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
481 	PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
482 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
483 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
484 
485 	PORT_START	/* IN3 - DSW1 */
486 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
487 	PORT_DIPSETTING(    0x03, "3" )
488 	PORT_DIPSETTING(    0x02, "4" )
489 	PORT_DIPSETTING(    0x01, "5" )
490 	PORT_DIPSETTING(    0x00, "6" )
491 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
492 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
493 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
494 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
495 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
496 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
497 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
498 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
499 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
500 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
501 	PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
502 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
503 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
504 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
505 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown) )
506 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
507 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
508 
509 	PORT_START	/* IN4 - DSW2 */
510 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
511 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
512 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
513 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
514 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
515 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
516 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
517 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
518 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
519 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
520 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
521 	PORT_DIPSETTING(    0x10, "Easy" )
522 	PORT_DIPSETTING(    0x00, "Hard" )
523 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
524 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
525 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
526 	PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Complete Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
527 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
528 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
529 	PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Base Ship Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
530 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
531 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
532 INPUT_PORTS_END
533 
534 INPUT_PORTS_START( ninjemak )
535 	PORT_START	/* IN0 */
536 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
537 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
538 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
539 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
540 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
541 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
542 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
543 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
544 
545 	PORT_START	/* IN1 */
546 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
547 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
548 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
549 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
550 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
551 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
552 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
553 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
554 
555 	PORT_START	/* IN2 - TEST, COIN, START */
556 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
557 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
558 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
559 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
560 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
561 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
562 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
563 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
564 
565 	PORT_START	/* IN3 - TEST */
566 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
567 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
568 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
569 	PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
570 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
571 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
572 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
573 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
574 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
575 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
576 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
577 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
578 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
579 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
580 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
581 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
582 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
583 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
584 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
585 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
586 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
587 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
588 
589 	PORT_START	/* IN4 - TEST */
590 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
591 	PORT_DIPSETTING(    0x03, "3" )
592 	PORT_DIPSETTING(    0x02, "4" )
593 	PORT_DIPSETTING(    0x01, "5" )
594 	PORT_DIPSETTING(    0x00, "6" )
595 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
596 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
597 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
598 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
599 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
600 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
601 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
602 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
603 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
604 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
605 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
606 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
607 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
608 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
609 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
610 
611 	PORT_START	/* IN5 - TEST */
612 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
613 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
614 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
615 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
616 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
617 	PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
618 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
619 	PORT_DIPSETTING(    0x04, "Easy" )
620 	PORT_DIPSETTING(    0x00, "Hard" )
621 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
622 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
623 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
624 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
625 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
626 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
627 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
628 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
629 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
630 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
631 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
632 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
633 	PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )
634 	PORT_DIPSETTING(    0x80, DEF_STR( No ) )
635 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
636 INPUT_PORTS_END
637 
638 INPUT_PORTS_START( youma )
639 	PORT_START	/* IN0 */
640 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
641 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
642 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
643 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
644 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
645 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
646 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
647 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
648 
649 	PORT_START	/* IN1 */
650 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
651 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
652 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
653 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
654 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
655 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
656 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
657 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
658 
659 	PORT_START	/* IN2 - TEST, COIN, START */
660 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
661 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
662 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
663 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
664 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
665 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
666 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
667 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
668 
669 	PORT_START	/* IN3 - TEST */
670 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
671 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
672 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
673 	PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
674 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
675 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
676 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
677 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
678 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
679 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
680 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
681 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
682 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
683 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
684 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
685 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
686 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
687 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
688 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
689 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
690 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
691 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
692 
693 	PORT_START	/* IN4 - TEST */
694 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
695 	PORT_DIPSETTING(    0x03, "3" )
696 	PORT_DIPSETTING(    0x02, "4" )
697 	PORT_DIPSETTING(    0x01, "5" )
698 	PORT_DIPSETTING(    0x00, "6" )
699 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
700 	PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
701 	PORT_DIPSETTING(    0x08, "50000 and every 60000" )
702 	PORT_DIPSETTING(    0x04, "20000 and every 90000" )
703 	PORT_DIPSETTING(    0x00, "50000 and every 90000" )
704 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
705 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
706 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
707 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
708 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
709 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
710 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
711 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
712 	PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
713 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
714 
715 	PORT_START	/* IN5 - TEST */
716 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
717 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
718 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
719 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
720 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
721 	PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
722 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
723 	PORT_DIPSETTING(    0x04, "Easy" )
724 	PORT_DIPSETTING(    0x00, "Hard" )
725 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
726 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
727 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
728 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
729 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
730 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
731 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
732 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
733 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
734 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
735 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
736 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
737 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
738 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
739 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
740 INPUT_PORTS_END
741 
742 
743 
744 #define CHARLAYOUT(NUM) static struct GfxLayout charlayout_##NUM =  \
745 {																	\
746 	8,8,	/* 8*8 characters */									\
747 	NUM,	/* NUM characters */									\
748 	4,	/* 4 bits per pixel */										\
749 	{ 0, 1, 2, 3 },													\
750 	{ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4 },						\
751 	{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },				\
752 	32*8	/* every char takes 32 consecutive bytes */				\
753 }
754 
755 CHARLAYOUT(512);
756 CHARLAYOUT(1024);
757 
758 static struct GfxLayout tilelayout =
759 {
760 	16,16,
761 	1024,
762 	4,
763 	{ 0, 1, 2, 3 },
764 	{ 4,0,12,8,20,16,28,24,36,32,44,40,52,48,60,56 },
765 	{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
766 	  8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
767 	16*16*4
768 };
769 
770 #define SPRITELAYOUT(NUM) static struct GfxLayout spritelayout_##NUM =  \
771 {																		\
772 	16,16,	/* 16*16 sprites */											\
773 	NUM,	/* NUM sprites */											\
774 	4,	/* 4 bits per pixel */											\
775 	{ 0, 1, 2, 3 },														\
776 	{ 1*4, 0*4, 1*4+NUM*64*8, 0*4+NUM*64*8, 3*4, 2*4, 3*4+NUM*64*8, 2*4+NUM*64*8,			\
777 			5*4, 4*4, 5*4+NUM*64*8, 4*4+NUM*64*8, 7*4, 6*4, 7*4+NUM*64*8, 6*4+NUM*64*8 },	\
778 	{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,					\
779 			8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },		\
780 	64*8	/* every sprite takes 64 consecutive bytes */				\
781 }
782 
783 SPRITELAYOUT(512);
784 SPRITELAYOUT(1024);
785 
786 
787 static struct GfxDecodeInfo gfxdecodeinfo[] =
788 {
789 	{ REGION_GFX1, 0, &charlayout_512,            0,   8 },
790 	{ REGION_GFX2, 0, &tilelayout,             8*16,  16 },
791 	{ REGION_GFX3, 0, &spritelayout_512, 8*16+16*16, 256 },
792 	{ -1 } /* end of array */
793 };
794 
795 static struct GfxDecodeInfo ninjemak_gfxdecodeinfo[] =
796 {
797 	{ REGION_GFX1, 0, &charlayout_1024,            0,   8 },
798 	{ REGION_GFX2, 0, &tilelayout,              8*16,  16 },
799 	{ REGION_GFX3, 0, &spritelayout_1024, 8*16+16*16, 256 },
800 	{ -1 } /* end of array */
801 };
802 
803 
804 
805 static struct YM3526interface YM3526_interface =
806 {
807 	1,
808 	8000000/2,	/* 4 MHz? */
809 	{ 60 }
810 };
811 
812 static struct DACinterface dac_interface =
813 {
814 	2,
815 	{ 60, 60 }
816 };
817 
818 
819 static struct MachineDriver machine_driver_galivan =
820 {
821 	/* basic machine hardware */
822 	{
823 		{
824 			CPU_Z80,
825 			12000000/2,		/* 6 MHz? */
826 			readmem,writemem,readport,writeport,
827 			interrupt,1
828 		},
829 		{
830 			CPU_Z80 | CPU_AUDIO_CPU,
831 			8000000/2,		/* 4 MHz? */
832 			sound_readmem,sound_writemem,sound_readport,sound_writeport,
833 			ignore_interrupt,0,
834 			interrupt,7250  /* timed interrupt, ?? Hz */
835 		},
836 	},
837 	60,DEFAULT_60HZ_VBLANK_DURATION,
838 	1,
839 	galivan_init_machine,
840 
841 	/* video hardware */
842 	32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
843 	gfxdecodeinfo,
844 	256, 8*16+16*16+256*16,
845 	galivan_vh_convert_color_prom,
846 
847 	VIDEO_TYPE_RASTER,
848 	0,
849 	galivan_vh_start,
850 	0,
851 	galivan_vh_screenrefresh,
852 
853 	/* sound hardware */
854 	0,0,0,0,
855 	{
856 		{
857 			SOUND_YM3526,
858 			&YM3526_interface
859 		},
860 		{
861 			SOUND_DAC,
862 			&dac_interface
863 		}
864 	}
865 };
866 
867 static struct MachineDriver machine_driver_ninjemak =
868 {
869 	/* basic machine hardware */
870 	{
871 		{
872 			CPU_Z80,
873 			12000000/2,		/* 6 MHz? */
874 			readmem,ninjemak_writemem,ninjemak_readport,ninjemak_writeport,
875 			interrupt,1
876 		},
877 		{
878 			CPU_Z80 | CPU_AUDIO_CPU,
879 			8000000/2,		/* 4 MHz? */
880 			sound_readmem,sound_writemem,sound_readport,sound_writeport,
881 			ignore_interrupt,0,
882 			interrupt,7250	/* timed interrupt, ?? Hz */
883 		},
884 	},
885 	60,DEFAULT_60HZ_VBLANK_DURATION,
886 	1,
887 	galivan_init_machine,
888 
889 	/* video hardware */
890 	32*8, 32*8, { 1*8, 31*8-1, 2*8, 30*8-1 },
891 	ninjemak_gfxdecodeinfo,
892 	256, 8*16+16*16+256*16,
893 	galivan_vh_convert_color_prom,
894 
895 	VIDEO_TYPE_RASTER,
896 	0,
897 	ninjemak_vh_start,
898 	0,
899 	ninjemak_vh_screenrefresh,
900 
901 	/* sound hardware */
902 	0,0,0,0,
903 	{
904 		{
905 			SOUND_YM3526,
906 			&YM3526_interface
907 		},
908 		{
909 			SOUND_DAC,
910 			&dac_interface
911 		}
912 	}
913 };
914 
915 
916 
917 /***************************************************************************
918 
919   Game driver(s)
920 
921 ***************************************************************************/
922 
923 ROM_START( galivan )
924 	ROM_REGION( 0x14000, REGION_CPU1 )	/* main cpu code */
925 	ROM_LOAD( "gv1.1b",       0x00000, 0x8000, 0x5e480bfc )
926 	ROM_LOAD( "gv2.3b",       0x08000, 0x4000, 0x0d1b3538 )
927 	ROM_LOAD( "gv3.4b",       0x10000, 0x4000, 0x82f0c5e6 ) /* 2 banks at c000 */
928 
929 	ROM_REGION( 0x10000, REGION_CPU2 )		/* sound cpu code */
930 	ROM_LOAD( "gv11.14b",     0x0000, 0x4000, 0x05f1a0e3 )
931 	ROM_LOAD( "gv12.15b",     0x4000, 0x8000, 0x5b7a0d6d )
932 
933 	ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
934 	ROM_LOAD( "gv4.13d",      0x00000, 0x4000, 0x162490b4 ) /* chars */
935 
936 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
937 	ROM_LOAD( "gv7.14f",      0x00000, 0x8000, 0xeaa1a0db ) /* tiles */
938 	ROM_LOAD( "gv8.15f",      0x08000, 0x8000, 0xf174a41e )
939 	ROM_LOAD( "gv9.17f",      0x10000, 0x8000, 0xedc60f5d )
940 	ROM_LOAD( "gv10.19f",     0x18000, 0x8000, 0x41f27fca )
941 
942 	ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
943 	ROM_LOAD( "gv14.4f",      0x00000, 0x8000, 0x03e2229f ) /* sprites */
944 	ROM_LOAD( "gv13.1f",      0x08000, 0x8000, 0xbca9e66b )
945 
946 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
947 	ROM_LOAD( "gv6.19d",      0x0000, 0x4000, 0xda38168b )
948 	ROM_LOAD( "gv5.17d",      0x4000, 0x4000, 0x22492d2a )
949 
950 	ROM_REGION( 0x0500, REGION_PROMS )
951 	ROM_LOAD( "mb7114e.9f",   0x0000, 0x0100, 0xde782b3e )	/* red */
952 	ROM_LOAD( "mb7114e.10f",  0x0100, 0x0100, 0x0ae2a857 )	/* green */
953 	ROM_LOAD( "mb7114e.11f",  0x0200, 0x0100, 0x7ba8b9d1 )	/* blue */
954 	ROM_LOAD( "mb7114e.2d",   0x0300, 0x0100, 0x75466109 )	/* sprite lookup table */
955 	ROM_LOAD( "mb7114e.7f",   0x0400, 0x0100, 0x06538736 )	/* sprite palette bank */
956 ROM_END
957 
958 ROM_START( galivan2 )
959 	ROM_REGION( 0x14000, REGION_CPU1 )		/* main cpu code */
960 	ROM_LOAD( "e-1",          0x00000, 0x8000, 0xd8cc72b8 )
961 	ROM_LOAD( "e-2",          0x08000, 0x4000, 0x9e5b3157 )
962 	ROM_LOAD( "gv3.4b",       0x10000, 0x4000, 0x82f0c5e6 ) /* 2 banks at c000 */
963 
964 	ROM_REGION( 0x10000, REGION_CPU2 )		/* sound cpu code */
965 	ROM_LOAD( "gv11.14b",     0x0000, 0x4000, 0x05f1a0e3 )
966 	ROM_LOAD( "gv12.15b",     0x4000, 0x8000, 0x5b7a0d6d )
967 
968 	ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
969 	ROM_LOAD( "gv4.13d",      0x00000, 0x4000, 0x162490b4 ) /* chars */
970 
971 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
972 	ROM_LOAD( "gv7.14f",      0x00000, 0x8000, 0xeaa1a0db ) /* tiles */
973 	ROM_LOAD( "gv8.15f",      0x08000, 0x8000, 0xf174a41e )
974 	ROM_LOAD( "gv9.17f",      0x10000, 0x8000, 0xedc60f5d )
975 	ROM_LOAD( "gv10.19f",     0x18000, 0x8000, 0x41f27fca )
976 
977 	ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
978 	ROM_LOAD( "gv14.4f",      0x00000, 0x8000, 0x03e2229f ) /* sprites */
979 	ROM_LOAD( "gv13.1f",      0x08000, 0x8000, 0xbca9e66b )
980 
981 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
982 	ROM_LOAD( "gv6.19d",      0x0000, 0x4000, 0xda38168b )
983 	ROM_LOAD( "gv5.17d",      0x4000, 0x4000, 0x22492d2a )
984 
985 	ROM_REGION( 0x0500, REGION_PROMS )
986 	ROM_LOAD( "mb7114e.9f",   0x0000, 0x0100, 0xde782b3e )	/* red */
987 	ROM_LOAD( "mb7114e.10f",  0x0100, 0x0100, 0x0ae2a857 )	/* green */
988 	ROM_LOAD( "mb7114e.11f",  0x0200, 0x0100, 0x7ba8b9d1 )	/* blue */
989 	ROM_LOAD( "mb7114e.2d",   0x0300, 0x0100, 0x75466109 )	/* sprite lookup table */
990 	ROM_LOAD( "mb7114e.7f",   0x0400, 0x0100, 0x06538736 )	/* sprite palette bank */
991 ROM_END
992 
993 ROM_START( dangar )
994 	ROM_REGION( 0x14000, REGION_CPU1 )		/* main cpu code */
995 	ROM_LOAD( "dangar08.1b",  0x00000, 0x8000, 0xe52638f2 )
996 	ROM_LOAD( "dangar09.3b",  0x08000, 0x4000, 0x809d280f )
997 	ROM_LOAD( "dangar10.5b",  0x10000, 0x4000, 0x99a3591b )
998 
999 	ROM_REGION( 0x10000, REGION_CPU2 )		/* sound cpu code */
1000 	ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
1001 	ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
1002 
1003 	ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
1004 	ROM_LOAD( "dangar05.13d", 0x00000, 0x4000, 0x40cb378a )	/* chars */
1005 
1006 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
1007 	ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
1008 	ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
1009 	ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
1010 	ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
1011 
1012 	ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
1013 	ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
1014 	ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
1015 
1016 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
1017 	ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
1018 	ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
1019 
1020 	ROM_REGION( 0x0500, REGION_PROMS )
1021 	ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )	/* red */
1022 	ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )	/* green */
1023 	ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )	/* blue */
1024 	ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )	/* sprite lookup table */
1025 	ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )	/* sprite palette bank */
1026 ROM_END
1027 
1028 ROM_START( dangar2 )
1029 	ROM_REGION( 0x14000, REGION_CPU1 )		/* main cpu code */
1030 	ROM_LOAD( "dangar2.016",  0x00000, 0x8000, 0x743fa2d4 )
1031 	ROM_LOAD( "dangar2.017",  0x08000, 0x4000, 0x1cdc60a5 )
1032 	ROM_LOAD( "dangar2.018",  0x10000, 0x4000, 0xdb7f6613 )
1033 
1034 	ROM_REGION( 0x10000, REGION_CPU2 )		/* sound cpu code */
1035 	ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
1036 	ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
1037 
1038 	ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
1039 	ROM_LOAD( "dangar2.011",  0x00000, 0x4000, 0xe804ffe1 )	/* chars */
1040 
1041 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
1042 	ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
1043 	ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
1044 	ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
1045 	ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
1046 
1047 	ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
1048 	ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
1049 	ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
1050 
1051 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
1052 	ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
1053 	ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
1054 
1055 	ROM_REGION( 0x0500, REGION_PROMS )
1056 	ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )	/* red */
1057 	ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )	/* green */
1058 	ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )	/* blue */
1059 	ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )	/* sprite lookup table */
1060 	ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )	/* sprite palette bank */
1061 ROM_END
1062 
1063 ROM_START( dangarb )
1064 	ROM_REGION( 0x14000, REGION_CPU1 )		/* main cpu code */
1065 	ROM_LOAD( "8",            0x00000, 0x8000, 0x8136fd10 )
1066 	ROM_LOAD( "9",            0x08000, 0x4000, 0x3ce5ec11 )
1067 	ROM_LOAD( "dangar2.018",  0x10000, 0x4000, 0xdb7f6613 )
1068 
1069 	ROM_REGION( 0x10000, REGION_CPU2 )		/* sound cpu code */
1070 	ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
1071 	ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
1072 
1073 	ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
1074 	ROM_LOAD( "dangar2.011",  0x00000, 0x4000, 0xe804ffe1 )	/* chars */
1075 
1076 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
1077 	ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
1078 	ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
1079 	ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
1080 	ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
1081 
1082 	ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
1083 	ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
1084 	ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
1085 
1086 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
1087 	ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
1088 	ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
1089 
1090 	ROM_REGION( 0x0500, REGION_PROMS )
1091 	ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )	/* red */
1092 	ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )	/* green */
1093 	ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )	/* blue */
1094 	ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )	/* sprite lookup table */
1095 	ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )	/* sprite palette bank */
1096 ROM_END
1097 
1098 ROM_START( ninjemak )
1099 	ROM_REGION( 0x18000, REGION_CPU1 )	/* main cpu code */
1100 	ROM_LOAD( "ninjemak.1",   0x00000, 0x8000, 0x12b0a619 )
1101 	ROM_LOAD( "ninjemak.2",   0x08000, 0x4000, 0xd5b505d1 )
1102 	ROM_LOAD( "ninjemak.3",   0x10000, 0x8000, 0x68c92bf6 )
1103 
1104 	ROM_REGION( 0x10000, REGION_CPU2 )	/* sound cpu code */
1105 	ROM_LOAD( "ninjemak.12",  0x0000, 0x4000, 0x3d1cd329 )
1106 	ROM_LOAD( "ninjemak.13",  0x4000, 0x8000, 0xac3a0b81 )
1107 
1108 	ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
1109 	ROM_LOAD( "ninjemak.4",   0x00000, 0x8000, 0x83702c37 )	/* chars */
1110 
1111 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
1112 	ROM_LOAD( "ninjemak.8",   0x00000, 0x8000, 0x655f0a58 ) /* tiles */
1113 	ROM_LOAD( "ninjemak.9",   0x08000, 0x8000, 0x934e1703 )
1114 	ROM_LOAD( "ninjemak.10",  0x10000, 0x8000, 0x955b5c45 )
1115 	ROM_LOAD( "ninjemak.11",  0x18000, 0x8000, 0xbbd2e51c )
1116 
1117 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
1118 	ROM_LOAD( "ninjemak.16",  0x00000, 0x8000, 0x8df93fed )  /* sprites */
1119 	ROM_LOAD( "ninjemak.17",  0x08000, 0x8000, 0xa3efd0fc )
1120 	ROM_LOAD( "ninjemak.14",  0x10000, 0x8000, 0xbff332d3 )
1121 	ROM_LOAD( "ninjemak.15",  0x18000, 0x8000, 0x56430ed4 )
1122 
1123 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
1124 	ROM_LOAD( "ninjemak.7",   0x0000, 0x4000, 0x80c20d36 )
1125 	ROM_LOAD( "ninjemak.6",   0x4000, 0x4000, 0x1da7a651 )
1126 
1127 	ROM_REGION( 0x4000, REGION_GFX5 )	/* data for mcu/blitter? */
1128 	ROM_LOAD( "ninjemak.5",   0x0000, 0x4000, 0x5f91dd30 )	/* text layer data */
1129 
1130 	ROM_REGION( 0x0500, REGION_PROMS )	/* Region 3 - color data */
1131 	ROM_LOAD( "ninjemak.pr1", 0x0000, 0x0100, 0x8a62d4e4 )	/* red */
1132 	ROM_LOAD( "ninjemak.pr2", 0x0100, 0x0100, 0x2ccf976f )	/* green */
1133 	ROM_LOAD( "ninjemak.pr3", 0x0200, 0x0100, 0x16b2a7a4 )	/* blue */
1134 	ROM_LOAD( "yncp-2d.bin",  0x0300, 0x0100, BADCRC( 0x23bade78 ) )	/* sprite lookup table */
1135 	ROM_LOAD( "yncp-7f.bin",  0x0400, 0x0100, BADCRC( 0x262d0809 ) )	/* sprite palette bank */
1136 ROM_END
1137 
1138 ROM_START( youma )
1139 	ROM_REGION( 0x18000, REGION_CPU1 )	/* main cpu code */
1140 	ROM_LOAD( "ync-1.bin",    0x00000, 0x8000, 0x0552adab )
1141 	ROM_LOAD( "ync-2.bin",    0x08000, 0x4000, 0xf961e5e6 )
1142 	ROM_LOAD( "ync-3.bin",    0x10000, 0x8000, 0x9ad50a5e )
1143 
1144 	ROM_REGION( 0x10000, REGION_CPU2 )	/* sound cpu code */
1145 	ROM_LOAD( "ninjemak.12",  0x0000, 0x4000, 0x3d1cd329 )
1146 	ROM_LOAD( "ninjemak.13",  0x4000, 0x8000, 0xac3a0b81 )
1147 
1148 	ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
1149 	ROM_LOAD( "ync-4.bin",    0x00000, 0x8000, 0xa1954f44 )	/* chars */
1150 
1151 	ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
1152 	ROM_LOAD( "ninjemak.8",   0x00000, 0x8000, 0x655f0a58 ) /* tiles */
1153 	ROM_LOAD( "ninjemak.9",   0x08000, 0x8000, 0x934e1703 )
1154 	ROM_LOAD( "ninjemak.10",  0x10000, 0x8000, 0x955b5c45 )
1155 	ROM_LOAD( "ninjemak.11",  0x18000, 0x8000, 0xbbd2e51c )
1156 
1157 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
1158 	ROM_LOAD( "ninjemak.16",  0x00000, 0x8000, 0x8df93fed )  /* sprites */
1159 	ROM_LOAD( "ninjemak.17",  0x08000, 0x8000, 0xa3efd0fc )
1160 	ROM_LOAD( "ninjemak.14",  0x10000, 0x8000, 0xbff332d3 )
1161 	ROM_LOAD( "ninjemak.15",  0x18000, 0x8000, 0x56430ed4 )
1162 
1163 	ROM_REGION( 0x8000, REGION_GFX4 )	/* background tilemaps */
1164 	ROM_LOAD( "ninjemak.7",   0x0000, 0x4000, 0x80c20d36 )
1165 	ROM_LOAD( "ninjemak.6",   0x4000, 0x4000, 0x1da7a651 )
1166 
1167 	ROM_REGION( 0x4000, REGION_GFX5 )	/* data for mcu/blitter? */
1168 	ROM_LOAD( "ync-5.bin",    0x0000, 0x4000, 0x993e4ab2 )	/* text layer data */
1169 
1170 	ROM_REGION( 0x0500, REGION_PROMS )	/* Region 3 - color data */
1171 	ROM_LOAD( "yncp-6e.bin",  0x0000, 0x0100, 0xea47b91a )	/* red */
1172 	ROM_LOAD( "yncp-7e.bin",  0x0100, 0x0100, 0xe94c0fed )	/* green */
1173 	ROM_LOAD( "yncp-8e.bin",  0x0200, 0x0100, 0xffb4b287 )	/* blue */
1174 	ROM_LOAD( "yncp-2d.bin",  0x0300, 0x0100, 0x23bade78 )	/* sprite lookup table */
1175 	ROM_LOAD( "yncp-7f.bin",  0x0400, 0x0100, 0x262d0809 )	/* sprite palette bank */
1176 ROM_END
1177 
1178 
1179 
1180 GAME( 1985, galivan,  0,        galivan,  galivan,  0, ROT270, "Nichibutsu", "Galivan - Cosmo Police (12/16/1985)" )
1181 GAME( 1985, galivan2, galivan,  galivan,  galivan,  0, ROT270, "Nichibutsu", "Galivan - Cosmo Police (12/11/1985)" )
1182 GAME( 1986, dangar,   0,        galivan,  dangar,   0, ROT270, "Nichibutsu", "Dangar - Ufo Robo (12/1/1986)" )
1183 GAME( 1986, dangar2,  dangar,   galivan,  dangar2,  0, ROT270, "Nichibutsu", "Dangar - Ufo Robo (9/26/1986)" )
1184 GAME( 1986, dangarb,  dangar,   galivan,  dangarb,  0, ROT270, "bootleg", "Dangar - Ufo Robo (bootleg)" )
1185 GAME( 1986, ninjemak, 0,        ninjemak, ninjemak, 0, ROT270, "Nichibutsu", "Ninja Emaki (US)" )
1186 GAME( 1986, youma,    ninjemak, ninjemak, youma,    0, ROT270, "Nichibutsu", "Youma Ninpou Chou (Japan)" )
1187 
1188