1 /***************************************************************************
2 
3 	Gaelco game hardware from 1991-1996
4 
5 	Driver by Manuel Abadia
6 
7 ***************************************************************************/
8 
9 #include "driver.h"
10 #include "vidhrdw/generic.h"
11 #include "cpu/m6809/m6809.h"
12 #include "cpu/m68000/m68000.h"
13 
14 extern data16_t *gaelco_vregs;
15 extern data16_t *gaelco_videoram;
16 extern data16_t *gaelco_spriteram;
17 data16_t *gaelco_screen;
18 
19 /* from vidhrdw/gaelco.c */
20 WRITE16_HANDLER( gaelco_vram_w );
21 extern void gaelco_mark_offset_dirty(unsigned int offset);
22 
decrypt(int const param1,int const param2,int const enc_prev_word,int const dec_prev_word,int const enc_word)23 static int decrypt(int const param1, int const param2, int const enc_prev_word, int const dec_prev_word, int const enc_word)
24 {
25 	int const swap = (BIT(dec_prev_word, 8) << 1) | BIT(dec_prev_word, 7);
26 	int const type = (BIT(dec_prev_word,12) << 1) | BIT(dec_prev_word, 2);
27 	int res=0;
28 	int k=0;
29 
30 	switch (swap)
31 	{
32 		case 0:	res = BITSWAP16(enc_word,  1, 2, 0,14,12,15, 4, 8,13, 7, 3, 6,11, 5,10, 9); break;
33 		case 1:	res = BITSWAP16(enc_word, 14,10, 4,15, 1, 6,12,11, 8, 0, 9,13, 7, 3, 5, 2); break;
34 		case 2:	res = BITSWAP16(enc_word,  2,13,15, 1,12, 8,14, 4, 6, 0, 9, 5,10, 7, 3,11); break;
35 		case 3:	res = BITSWAP16(enc_word,  3, 8, 1,13,14, 4,15, 0,10, 2, 7,12, 6,11, 9, 5); break;
36 	}
37 
38 	res ^= param2;
39 
40 	switch (type)
41 	{
42 		case 0:
43 			k =	(0 << 0) |
44 				(1 << 1) |
45 				(0 << 2) |
46 				(1 << 3) |
47 				(1 << 4) |
48 				(1 << 5);
49 			break;
50 
51 		case 1:
52 			k =	(BIT(dec_prev_word, 0) << 0) |
53 				(BIT(dec_prev_word, 1) << 1) |
54 				(BIT(dec_prev_word, 1) << 2) |
55 				(BIT(enc_prev_word, 3) << 3) |
56 				(BIT(enc_prev_word, 8) << 4) |
57 				(BIT(enc_prev_word,15) << 5);
58 			break;
59 
60 		case 2:
61 			k =	(BIT(enc_prev_word, 5) << 0) |
62 				(BIT(dec_prev_word, 5) << 1) |
63 				(BIT(enc_prev_word, 7) << 2) |
64 				(BIT(enc_prev_word, 3) << 3) |
65 				(BIT(enc_prev_word,13) << 4) |
66 				(BIT(enc_prev_word,14) << 5);
67 			break;
68 
69 		case 3:
70 			k =	(BIT(enc_prev_word, 0) << 0) |
71 				(BIT(enc_prev_word, 9) << 1) |
72 				(BIT(enc_prev_word, 6) << 2) |
73 				(BIT(dec_prev_word, 4) << 3) |
74 				(BIT(enc_prev_word, 2) << 4) |
75 				(BIT(dec_prev_word,11) << 5);
76 			break;
77 	}
78 
79 	k ^= param1;
80 
81 	res = (res & 0xffc0) | ((res + k) & 0x003f);
82 
83 	res ^= param1;
84 
85 	switch (type)
86 	{
87 		case 0:
88 			k =	(BIT(enc_word, 9) << 0) |
89 				(BIT(res,2)       << 1) |
90 				(BIT(enc_word, 5) << 2) |
91 				(BIT(res,5)       << 3) |
92 				(BIT(res,4)       << 4);
93 			break;
94 
95 		case 1:
96 			k =	(BIT(dec_prev_word, 2) << 0) |	/* always 1*/
97 				(BIT(enc_prev_word, 4) << 1) |
98 				(BIT(dec_prev_word,14) << 2) |
99 				(BIT(res, 1)           << 3) |
100 				(BIT(dec_prev_word,12) << 4);	/* always 0*/
101 			break;
102 
103 		case 2:
104 			k =	(BIT(enc_prev_word, 6) << 0) |
105 				(BIT(dec_prev_word, 6) << 1) |
106 				(BIT(dec_prev_word,15) << 2) |
107 				(BIT(res,0)            << 3) |
108 				(BIT(dec_prev_word, 7) << 4);
109 			break;
110 
111 		case 3:
112 			k =	(BIT(dec_prev_word, 2) << 0) |	/* always 1*/
113 				(BIT(dec_prev_word, 9) << 1) |
114 				(BIT(enc_prev_word, 5) << 2) |
115 				(BIT(dec_prev_word, 1) << 3) |
116 				(BIT(enc_prev_word,10) << 4);
117 
118 			break;
119 	}
120 
121 	k ^= param1;
122 
123 	res =	(res & 0x003f) |
124 			((res + (k <<  6)) & 0x07c0) |
125 			((res + (k << 11)) & 0xf800);
126 
127 	res ^= (param1 << 6) | (param1 << 11);
128 
129 	return BITSWAP16(res, 2,6,0,11,14,12,7,10,5,4,8,3,9,1,13,15);
130 }
131 
gaelco_decrypt(int offset,int data,int param1,int param2)132 UINT16 gaelco_decrypt(int offset, int data, int param1, int param2)
133 {
134 	static int lastpc, lastoffset, lastencword, lastdecword;
135 
136 	int thispc = activecpu_get_pc();
137 
138 	/* check if 2nd half of 32 bit */
139 	if(lastpc == thispc && offset == lastoffset + 1)
140 	{
141 		lastpc = 0;
142 		data = decrypt(param1, param2, lastencword, lastdecword, data);
143 	}
144 	else
145 	{
146 		/* code as 1st word */
147 
148 		lastpc = thispc;
149 		lastoffset = offset;
150 		lastencword = data;
151 
152 		/* high word returned */
153 		data = decrypt(param1, param2, 0, 0, data);
154 
155 		lastdecword = data;
156 	}
157 
158 	return data;
159 }
160 
161 
162 #define TILELAYOUT8(NUM) static struct GfxLayout tilelayout8_##NUM =	\
163 {																		\
164 	8,8,									/* 8x8 tiles */				\
165 	NUM/8,									/* number of tiles */		\
166 	4,										/* bitplanes */				\
167 	{ 0*NUM*8, 1*NUM*8, 2*NUM*8, 3*NUM*8 }, /* plane offsets */			\
168 	{ 0,1,2,3,4,5,6,7 },												\
169 	{ 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 },								\
170 	8*8																	\
171 }
172 
173 #define TILELAYOUT16(NUM) static struct GfxLayout tilelayout16_##NUM =				\
174 {																					\
175 	16,16,									/* 16x16 tiles */						\
176 	NUM/32,									/* number of tiles */					\
177 	4,										/* bitplanes */							\
178 	{ 0*NUM*8, 1*NUM*8, 2*NUM*8, 3*NUM*8 }, /* plane offsets */						\
179 	{ 0,1,2,3,4,5,6,7, 16*8+0,16*8+1,16*8+2,16*8+3,16*8+4,16*8+5,16*8+6,16*8+7 },	\
180 	{ 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8, 8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },		\
181 	32*8																			\
182 }
183 
184 #define GFXDECODEINFO(NUM,ENTRIES) static struct GfxDecodeInfo gfxdecodeinfo_##NUM[] =	\
185 {																						\
186 	{ REGION_GFX1, 0x000000, &tilelayout8_##NUM,0,	ENTRIES },							\
187 	{ REGION_GFX1, 0x000000, &tilelayout16_##NUM,0,	ENTRIES },							\
188 	{ -1 }																				\
189 }
190 
191 /*============================================================================
192 							BIG KARNAK
193   ============================================================================*/
194 
195 VIDEO_START( bigkarnk );
196 VIDEO_UPDATE( bigkarnk );
197 
198 
MEMORY_READ16_START(bigkarnk_readmem)199 static MEMORY_READ16_START( bigkarnk_readmem )
200 	{ 0x000000, 0x07ffff, MRA16_ROM },			/* ROM */
201 	{ 0x100000, 0x101fff, MRA16_RAM },			/* Video RAM */
202 	{ 0x102000, 0x103fff, MRA16_RAM },			/* Screen RAM */
203 	{ 0x200000, 0x2007ff, MRA16_RAM },			/* Palette */
204 	{ 0x440000, 0x440fff, MRA16_RAM },			/* Sprite RAM */
205 	{ 0x700000, 0x700001, input_port_0_word_r },/* DIPSW #1 */
206 	{ 0x700002, 0x700003, input_port_1_word_r },/* DIPSW #2 */
207 	{ 0x700004, 0x700005, input_port_2_word_r },/* INPUT #1 */
208 	{ 0x700006, 0x700007, input_port_3_word_r },/* INPUT #2 */
209 	{ 0x700008, 0x700009, input_port_4_word_r },/* Service + Test */
210 	{ 0xff8000, 0xffffff, MRA16_RAM },			/* Work RAM */
211 MEMORY_END
212 
213 WRITE16_HANDLER( bigkarnk_sound_command_w )
214 {
215 	if (ACCESSING_LSB){
216 		soundlatch_w(0,data & 0xff);
217 		cpu_set_irq_line(1,M6809_FIRQ_LINE,HOLD_LINE);
218 	}
219 }
220 
WRITE16_HANDLER(bigkarnk_coin_w)221 WRITE16_HANDLER( bigkarnk_coin_w )
222 {
223 	if (ACCESSING_LSB){
224 		switch ((offset >> 3)){
225 			case 0x00:	/* Coin Lockouts */
226 			case 0x01:
227 				coin_lockout_w( (offset >> 3) & 0x01, ~data & 0x01);
228 				break;
229 			case 0x02:	/* Coin Counters */
230 			case 0x03:
231 				coin_counter_w( (offset >> 3) & 0x01, data & 0x01);
232 				break;
233 		}
234 	}
235 }
236 
MEMORY_WRITE16_START(bigkarnk_writemem)237 static MEMORY_WRITE16_START( bigkarnk_writemem )
238 	{ 0x000000, 0x07ffff, MWA16_ROM },								/* ROM */
239 	{ 0x100000, 0x101fff, gaelco_vram_w, &gaelco_videoram },		/* Video RAM */
240 	{ 0x102000, 0x103fff, MWA16_RAM },								/* Screen RAM */
241 	{ 0x108000, 0x108007, MWA16_RAM, &gaelco_vregs },				/* Video Registers */
242 /*	{ 0x10800c, 0x10800d, watchdog_reset_w },						 // INT 6 ACK/Watchdog timer /*/
243 	{ 0x200000, 0x2007ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 },/* Palette */
244 	{ 0x440000, 0x440fff, MWA16_RAM, &gaelco_spriteram },			/* Sprite RAM */
245 	{ 0x70000e, 0x70000f, bigkarnk_sound_command_w },				/* Triggers a FIRQ on the sound CPU */
246 	{ 0x70000a, 0x70003b, bigkarnk_coin_w },						/* Coin Counters + Coin Lockout */
247 	{ 0xff8000, 0xffffff, MWA16_RAM },								/* Work RAM */
248 MEMORY_END
249 
250 
251 static MEMORY_READ_START( bigkarnk_readmem_snd )
252 	{ 0x0000, 0x07ff, MRA_RAM },				/* RAM */
253 	{ 0x0800, 0x0801, OKIM6295_status_0_r },	/* OKI6295 */
254 	{ 0x0a00, 0x0a00, YM3812_status_port_0_r },	/* YM3812 */
255 	{ 0x0b00, 0x0b00, soundlatch_r },			/* Sound latch */
256 	{ 0x0c00, 0xffff, MRA_ROM },				/* ROM */
257 MEMORY_END
258 
259 static MEMORY_WRITE_START( bigkarnk_writemem_snd )
260 	{ 0x0000, 0x07ff, MWA_RAM },				/* RAM */
261 	{ 0x0800, 0x0800, OKIM6295_data_0_w },		/* OKI6295 */
262 /*	{ 0x0900, 0x0900, MWA_NOP },				 // enable sound output? /*/
263 	{ 0x0a00, 0x0a00, YM3812_control_port_0_w },/* YM3812 */
264 	{ 0x0a01, 0x0a01, YM3812_write_port_0_w },	/* YM3812 */
265 	{ 0x0c00, 0xffff, MWA_ROM },				/* ROM */
266 MEMORY_END
267 
268 INPUT_PORTS_START( bigkarnk )
269 	PORT_START	/* DSW #1 */
270 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
271 	PORT_DIPSETTING(    0x07, DEF_STR( 4C_1C ) )
272 	PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
273 	PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
274 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
275 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) )
276 	PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
277 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
278 	PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
279 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
280 	PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
281 	PORT_DIPSETTING(    0x00, "Free Play (if Coin B too)" )
282 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
283 	PORT_DIPSETTING(    0x70, DEF_STR( 4C_1C ) )
284 	PORT_DIPSETTING(    0x80, DEF_STR( 3C_1C ) )
285 	PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
286 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
287 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) )
288 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
289 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
290 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
291 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
292 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
293 	PORT_DIPSETTING(    0x00, "Free Play (if Coin A too)" )
294 
295 	PORT_START	/* DSW #2 */
296 	PORT_DIPNAME( 0x07, 0x06, DEF_STR( Difficulty ) )
297 	PORT_DIPSETTING(    0x07, "0" )
298 	PORT_DIPSETTING(    0x06, "1" )
299 	PORT_DIPSETTING(    0x05, "2" )
300 	PORT_DIPSETTING(    0x04, "3" )
301 	PORT_DIPSETTING(    0x03, "4" )
302 	PORT_DIPSETTING(    0x02, "5" )
303 	PORT_DIPSETTING(    0x01, "6" )
304 	PORT_DIPSETTING(    0x00, "7" )
305 	PORT_DIPNAME( 0x18, 0x08, DEF_STR( Lives ) )
306 	PORT_DIPSETTING(    0x18, "1" )
307 	PORT_DIPSETTING(    0x10, "2" )
308 	PORT_DIPSETTING(    0x08, "3" )
309 	PORT_DIPSETTING(    0x00, "4" )
310 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
311 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
312 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
313 	PORT_DIPNAME( 0x40, 0x40, "Impact" )
314 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
315 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
316 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
317 
318 	PORT_START	/* 1P INPUTS & COINSW */
319 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
320 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
321 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
322 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
323 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
324 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
325 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
326 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
327 
328 	PORT_START	/* 2P INPUTS & STARTSW */
329 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
330 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
331 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
332 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
333 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
334 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
335 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
336 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
337 
338 	PORT_START	/* Service + Test */
339 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
340 	PORT_DIPNAME( 0x02, 0x02, "Go to test mode now" )
341 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
342 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
343 	PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
344 INPUT_PORTS_END
345 
346 
347 TILELAYOUT8(0x100000);
348 TILELAYOUT16(0x100000);
349 
350 GFXDECODEINFO(0x100000,64);
351 
352 
353 static struct YM3812interface bigkarnk_ym3812_interface =
354 {
355 	1,						/* 1 chip */
356 	3580000,				/* 3.58 MHz? */
357 	{ 100 },					/* volume */
358 	{ 0 }					/* IRQ handler */
359 };
360 
361 static struct OKIM6295interface bigkarnk_okim6295_interface =
362 {
363 	1,                  /* 1 chip */
364 	{ 8000 },			/* 8000 KHz? */
365 	{ REGION_SOUND1 },  /* memory region */
366 	{ 100 }				/* volume */
367 };
368 
369 
370 static MACHINE_DRIVER_START( bigkarnk )
371 
372 	/* basic machine hardware */
373 	MDRV_CPU_ADD(M68000, 10000000)	/* MC68000P10, 10 MHz */
374 	MDRV_CPU_MEMORY(bigkarnk_readmem,bigkarnk_writemem)
375 	MDRV_CPU_VBLANK_INT(irq6_line_hold,1)
376 
377 	MDRV_CPU_ADD(M6809, 8867000/4)	/* 68B09, 2.21675 MHz? */
378 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
379 	MDRV_CPU_MEMORY(bigkarnk_readmem_snd,bigkarnk_writemem_snd)
380 
381 	MDRV_FRAMES_PER_SECOND(60)
382 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
383 	MDRV_INTERLEAVE(10)
384 
385 	/* video hardware */
386 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
387 	MDRV_SCREEN_SIZE(32*16, 32*16)
388 	MDRV_VISIBLE_AREA(0, 320-1, 16, 256-1)
389 	MDRV_GFXDECODE(gfxdecodeinfo_0x100000)
390 	MDRV_PALETTE_LENGTH(1024)
391 
392 	MDRV_VIDEO_START(bigkarnk)
393 	MDRV_VIDEO_UPDATE(bigkarnk)
394 
395 	/* sound hardware */
396 	MDRV_SOUND_ADD(YM3812, bigkarnk_ym3812_interface)
397 	MDRV_SOUND_ADD(OKIM6295, bigkarnk_okim6295_interface)
398 MACHINE_DRIVER_END
399 
400 
401 ROM_START( bigkarnk )
402 	ROM_REGION( 0x080000, REGION_CPU1, 0 )	/* 68000 code */
403 	ROM_LOAD16_BYTE(	"d16",	0x000000, 0x040000, CRC(44fb9c73) SHA1(c33852b37afea15482f4a43cb045434660e7a056) )
404 	ROM_LOAD16_BYTE(	"d19",	0x000001, 0x040000, CRC(ff79dfdd) SHA1(2bfa440299317967ba2018d3a148291ae0c144ae) )
405 
406 	ROM_REGION( 0x01e000, REGION_CPU2, 0 )	/* 6809 code */
407 	ROM_LOAD(	"d5",	0x000000, 0x010000, CRC(3b73b9c5) SHA1(1b1c5545609a695dab87d611bd53e0c3dd91e6b7) )
408 
409 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
410 	ROM_LOAD( "h5",	0x000000, 0x080000, CRC(20e239ff) SHA1(685059340f0f3a8e3c98702bd760dae685a58ddb) )
411 	ROM_RELOAD(		0x080000, 0x080000 )
412 	ROM_LOAD( "h10",0x100000, 0x080000, CRC(ab442855) SHA1(bcd69d4908ff8dc1b2215d2c2d2e54b950e0c015) )
413 	ROM_RELOAD(		0x180000, 0x080000 )
414 	ROM_LOAD( "h8",	0x200000, 0x080000, CRC(83dce5a3) SHA1(b4f9473e93c96f4b86c446e89d13fd3ef2b03996) )
415 	ROM_RELOAD(		0x280000, 0x080000 )
416 	ROM_LOAD( "h6",	0x300000, 0x080000, CRC(24e84b24) SHA1(c0ad6ce1e4b8aa7b9c9a3db8bb0165e90f4b48ed) )
417 	ROM_RELOAD(		0x380000, 0x080000 )
418 
419 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* ADPCM samples - sound chip is OKIM6295 */
420 	ROM_LOAD( "d1",	0x000000, 0x040000, CRC(26444ad1) SHA1(804101b9bbb6e1b6d43a1e9d91737f9c3b27802a) )
421 ROM_END
422 
423 
424 /*============================================================================
425 					BIOMECHANICAL TOY & MANIAC SQUARE
426   ============================================================================*/
427 
428 VIDEO_START( maniacsq );
429 VIDEO_UPDATE( maniacsq );
430 
431 
MEMORY_READ16_START(maniacsq_readmem)432 static MEMORY_READ16_START( maniacsq_readmem )
433 	{ 0x000000, 0x0fffff, MRA16_ROM },			/* ROM */
434 	{ 0x100000, 0x101fff, MRA16_RAM },			/* Video RAM */
435 	{ 0x102000, 0x103fff, MRA16_RAM },			/* Screen RAM */
436 	{ 0x200000, 0x2007ff, MRA16_RAM },			/* Palette */
437 	{ 0x440000, 0x440fff, MRA16_RAM },			/* Sprite RAM */
438 	{ 0x700000, 0x700001, input_port_0_word_r },/* DIPSW #2 */
439 	{ 0x700002, 0x700003, input_port_1_word_r },/* DIPSW #1 */
440 	{ 0x700004, 0x700005, input_port_2_word_r },/* INPUT #1 */
441 	{ 0x700006, 0x700007, input_port_3_word_r },/* INPUT #2 */
442 	{ 0x70000e, 0x70000f, OKIM6295_status_0_lsb_r },/* OKI6295 status register */
443 	{ 0xff0000, 0xffffff, MRA16_RAM },			/* Work RAM */
444 MEMORY_END
445 
446 static WRITE16_HANDLER( OKIM6295_bankswitch_w )
447 {
448 	unsigned char *RAM = memory_region(REGION_SOUND1);
449 
450 	if (ACCESSING_LSB){
451 		memcpy(&RAM[0x30000], &RAM[0x40000 + (data & 0x0f)*0x10000], 0x10000);
452 	}
453 }
454 
MEMORY_WRITE16_START(maniacsq_writemem)455 static MEMORY_WRITE16_START( maniacsq_writemem )
456 	{ 0x000000, 0x0fffff, MWA16_ROM },								/* ROM */
457 	{ 0x100000, 0x101fff, gaelco_vram_w, &gaelco_videoram },		/* Video RAM */
458 	{ 0x102000, 0x103fff, MWA16_RAM },						        /* Screen RAM */
459 	{ 0x108000, 0x108007, MWA16_RAM, &gaelco_vregs },				/* Video Registers */
460 /*	{ 0x10800c, 0x10800d, watchdog_reset_w },						 // INT 6 ACK/Watchdog timer /*/
461 	{ 0x200000, 0x2007ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 },/* Palette */
462 	{ 0x440000, 0x440fff, MWA16_RAM, &gaelco_spriteram },			/* Sprite RAM */
463 	{ 0x70000c, 0x70000d, OKIM6295_bankswitch_w },					/* OKI6295 bankswitch */
464 	{ 0x70000e, 0x70000f, OKIM6295_data_0_lsb_w },					/* OKI6295 data register */
465 	{ 0xff0000, 0xffffff, MWA16_RAM },								/* Work RAM */
466 MEMORY_END
467 
468 
469 INPUT_PORTS_START( maniacsq )
470 
471 PORT_START	/* DSW #2 */
472 	PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
473 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
474 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
475 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
476 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
477 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
478 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
479 	PORT_DIPNAME( 0x08, 0x00, "Sound Type" )
480 	PORT_DIPSETTING(    0x00, "Stereo" )
481 	PORT_DIPSETTING(    0x08, "Mono" )
482 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
483 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
484 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
485 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
486 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
487 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
488 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
489 	PORT_DIPSETTING(    0x40, "Easy" )
490 	PORT_DIPSETTING(    0xc0, "Normal" )
491 	PORT_DIPSETTING(    0x80, "Hard" )
492 	PORT_DIPSETTING(    0x00, "Hardest" )
493 
494 PORT_START	/* DSW #1 */
495 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_B ) )
496 	PORT_DIPSETTING(    0x0e, DEF_STR( 4C_1C ) )
497 	PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
498 	PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
499 	PORT_DIPSETTING(    0x0a, DEF_STR( 3C_2C ) )
500 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
501 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) )
502 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
503 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
504 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
505 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_5C ) )
506 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
507 	PORT_DIPSETTING(    0x00, "1C/1C or Free Play (if Coin A too)" )
508 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) )
509 	PORT_DIPSETTING(    0xe0, DEF_STR( 4C_1C ) )
510 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
511 	PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
512 	PORT_DIPSETTING(    0xa0, DEF_STR( 3C_2C ) )
513 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
514 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) )
515 	PORT_DIPSETTING(    0x70, DEF_STR( 1C_2C ) )
516 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_3C ) )
517 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_4C ) )
518 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_5C ) )
519 	PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
520 	PORT_DIPSETTING(    0x00, "1C/1C or Free Play (if Coin B too)" )
521 
522 PORT_START	/* 1P INPUTS & COINSW */
523 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
524 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
525 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
526 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
527 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
528 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
529 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
530 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
531 
532 PORT_START	/* 2P INPUTS & STARTSW */
533 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
534 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
535 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
536 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
537 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
538 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
539 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
540 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
541 INPUT_PORTS_END
542 
543 
544 INPUT_PORTS_START( biomtoy )
545 	PORT_START	/* DSW #2 */
546 	PORT_SERVICE( 0x01, IP_ACTIVE_LOW )
547 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
548 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
549 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
550 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
551 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
552 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
553 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
554 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
555 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
556 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Lives ) )
557 	PORT_DIPSETTING(    0x20, "0" )
558 	PORT_DIPSETTING(    0x10, "1" )
559 	PORT_DIPSETTING(    0x30, "2" )
560 	PORT_DIPSETTING(    0x00, "3" )
561 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
562 	PORT_DIPSETTING(    0x40, "Easy" )
563 	PORT_DIPSETTING(    0xc0, "Normal" )
564 	PORT_DIPSETTING(    0x80, "Hard" )
565 	PORT_DIPSETTING(    0x00, "Hardest" )
566 
567 	PORT_START	/* DSW #1 */
568 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_B ) )
569 	PORT_DIPSETTING(    0x0e, DEF_STR( 4C_1C ) )
570 	PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
571 	PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
572 	PORT_DIPSETTING(    0x0a, DEF_STR( 3C_2C ) )
573 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
574 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) )
575 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
576 	PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
577 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
578 	PORT_DIPSETTING(    0x0d, DEF_STR( 1C_5C ) )
579 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
580 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
581 	PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) )
582 	PORT_DIPSETTING(    0xe0, DEF_STR( 4C_1C ) )
583 	PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
584 	PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
585 	PORT_DIPSETTING(    0xa0, DEF_STR( 3C_2C ) )
586 	PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
587 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) )
588 	PORT_DIPSETTING(    0x70, DEF_STR( 1C_2C ) )
589 	PORT_DIPSETTING(    0xb0, DEF_STR( 1C_3C ) )
590 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_4C ) )
591 	PORT_DIPSETTING(    0xd0, DEF_STR( 1C_5C ) )
592 	PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
593 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
594 
595 	PORT_START	/* 1P INPUTS & COINSW */
596 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
597 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
598 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
599 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
600 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
601 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
602 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
603 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
604 
605 	PORT_START	/* 2P INPUTS & STARTSW */
606 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
607 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
608 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
609 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
610 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
611 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
612 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
613 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
614 INPUT_PORTS_END
615 
616 /*============================================================================
617 							SQUASH
618   ============================================================================*/
619 
620 static WRITE16_HANDLER( gaelco_vram_encrypted_w )
621 {
622 	data = gaelco_decrypt(offset, data, 0x0f, 0x4228);
623 	COMBINE_DATA(&gaelco_videoram[offset]);
624 
625 	gaelco_mark_offset_dirty(offset);
626 }
627 
WRITE16_HANDLER(gaelco_encrypted_w)628 static WRITE16_HANDLER(gaelco_encrypted_w)
629 {
630 	data = gaelco_decrypt(offset, data, 0x0f, 0x4228);
631 	COMBINE_DATA(&gaelco_screen[offset]);
632 }
633 
MEMORY_READ16_START(squash_readmem)634 static MEMORY_READ16_START( squash_readmem )
635     { 0x000000, 0x0fffff, MRA16_ROM },			        /* ROM */
636 	{ 0x100000, 0x101fff, MRA16_RAM },			        /* Video RAM */
637     { 0x102000, 0x103fff, MRA16_RAM },			        /* Screen RAM */
638     { 0x200000, 0x2007ff, MRA16_RAM },			        /* Palette */
639 	{ 0x440000, 0x440fff, MRA16_RAM },			        /* Sprite RAM */
640 	{ 0x700000, 0x700001, input_port_0_word_r },        /* DIPSW #2 */
641 	{ 0x700002, 0x700003, input_port_1_word_r },        /* DIPSW #1 */
642 	{ 0x700004, 0x700005, input_port_2_word_r },        /* INPUT #1 */
643 	{ 0x700006, 0x700007, input_port_3_word_r },        /* INPUT #2 */
644 	{ 0x70000e, 0x70000f, OKIM6295_status_0_lsb_r },    /* OKI6295 status register */
645 	{ 0xff0000, 0xffffff, MRA16_RAM },			        /* Work RAM */
646 MEMORY_END
647 
648 
649 static MEMORY_WRITE16_START( squash_writemem )
650     { 0x000000, 0x0fffff, MWA16_ROM },								     /* ROM */
651 	{ 0x100000, 0x101fff, gaelco_vram_encrypted_w, &gaelco_videoram },	 /* Video RAM */
652 	{ 0x102000, 0x103fff, gaelco_encrypted_w, &gaelco_screen },			 /* Screen RAM */
653 	{ 0x108000, 0x108007, MWA16_RAM, &gaelco_vregs },			         /* Video Registers */
654 /*	{ 0x10800c, 0x10800d, watchdog_reset_w },					         // INT 6 ACK/Watchdog timer /*/
655     { 0x200000, 0x2007ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 }, /* Palette */
656 	{ 0x440000, 0x440fff, MWA16_RAM, &gaelco_spriteram },			     /* Sprite RAM */
657 	{ 0x70000c, 0x70000d, OKIM6295_bankswitch_w },					     /* OKI6295 bankswitch */
658 	{ 0x70000e, 0x70000f, OKIM6295_data_0_lsb_w },					     /* OKI6295 data register */
659 	{ 0xff0000, 0xffffff, MWA16_RAM },								     /* Work RAM */
660 MEMORY_END
661 
662 
663 /*============================================================================
664 					THUNDER HOOP
665 ============================================================================*/
666 
667 static MEMORY_READ16_START( thoop_readmem )
668     { 0x000000, 0x0fffff, MRA16_ROM },			/* ROM */
669 	{ 0x100000, 0x101fff, MRA16_RAM },			/* Video RAM */
670 	{ 0x102000, 0x103fff, MRA16_RAM },			/* Screen RAM */
671 	{ 0x200000, 0x2007ff, MRA16_RAM },			/* Palette */
672 	{ 0x440000, 0x440fff, MRA16_RAM },		/* Sprite RAM */
673 	{ 0x700000, 0x700001, input_port_0_word_r },/* DIPSW #2 */
674 	{ 0x700002, 0x700003, input_port_1_word_r },/* DIPSW #1 */
675 	{ 0x700004, 0x700005, input_port_2_word_r },/* INPUT #1 */
676 	{ 0x700006, 0x700007, input_port_3_word_r },/* INPUT #2 */
677 	{ 0x70000e, 0x70000f, OKIM6295_status_0_lsb_r },/* OKI6295 status register */
678 	{ 0xff0000, 0xffffff, MRA16_RAM },		/* Work RAM */
679 MEMORY_END
680 
681 static WRITE16_HANDLER( thoop_vram_encrypted_w )
682 {
683 	data = gaelco_decrypt(offset, data, 0x0e, 0x4228);
684 	COMBINE_DATA(&gaelco_videoram[offset]);
685 
686 	gaelco_mark_offset_dirty(offset);
687 }
688 
WRITE16_HANDLER(thoop_encrypted_w)689 static WRITE16_HANDLER(thoop_encrypted_w)
690 {
691 	data = gaelco_decrypt(offset, data, 0x0e, 0x4228);
692 	COMBINE_DATA(&gaelco_screen[offset]);
693 }
694 
MEMORY_WRITE16_START(thoop_writemem)695 static MEMORY_WRITE16_START( thoop_writemem )
696     { 0x000000, 0x0fffff, MWA16_ROM },							/* ROM */
697 	{ 0x100000, 0x101fff, thoop_vram_encrypted_w, &gaelco_videoram },	/* Video RAM */
698 	{ 0x102000, 0x103fff, thoop_encrypted_w, &gaelco_screen },								/* Screen RAM */
699 	{ 0x108000, 0x108007, MWA16_RAM, &gaelco_vregs },		/* Video Registers */
700 /*	{ 0x10800c, 0x10800d, watchdog_reset_w },					 // INT 6 ACK/Watchdog timer /*/
701 	{ 0x200000, 0x2007ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 },/* Palette */
702 	{ 0x440000, 0x440fff, MWA16_RAM, &gaelco_spriteram },		/* Sprite RAM */
703 	{ 0x70000c, 0x70000d, OKIM6295_bankswitch_w },					/* OKI6295 bankswitch */
704     { 0x70000e, 0x70000f, OKIM6295_data_0_lsb_w },					/* OKI6295 data register */
705 	{ 0xff0000, 0xffffff, MWA16_RAM },							/* Work RAM */
706 MEMORY_END
707 
708 INPUT_PORTS_START( squash )
709 	PORT_START /* dip 0 */
710 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
711 	PORT_DIPSETTING(    0x02, DEF_STR( 6C_1C ) )
712 	PORT_DIPSETTING(    0x03, DEF_STR( 5C_1C ) )
713 	PORT_DIPSETTING(    0x04, DEF_STR( 4C_1C ) )
714 	PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
715 	PORT_DIPSETTING(    0x06, DEF_STR( 2C_1C ) )
716 	PORT_DIPSETTING(    0x01, DEF_STR( 3C_2C ) )
717 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_3C ) )
718 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
719 	PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
720 	PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
721 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_4C ) )
722 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_3C ) )
723 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
724 	PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
725 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
726 	PORT_DIPSETTING(    0x18, DEF_STR( 1C_5C ) )
727 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_6C ) )
728 	PORT_DIPNAME( 0x40, 0x40, "2 Player Continue" )
729 	PORT_DIPSETTING(    0x40, "2 Credits / 5 Games" )
730 	PORT_DIPSETTING(    0x00, "1 Credit / 3 Games" )
731 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) )
732 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
733 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
734 
735 	PORT_START /* dip 1 */
736 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
737 	PORT_DIPSETTING(    0x02, "Easy" )
738 	PORT_DIPSETTING(    0x03, "Normal" )
739 	PORT_DIPSETTING(    0x01, "Hard" )
740 	PORT_DIPSETTING(    0x00, "Hardest" )
741 	PORT_DIPNAME( 0x0c, 0x0c, "Number of Faults" )
742 	PORT_DIPSETTING(    0x08, "4" )
743 	PORT_DIPSETTING(    0x0c, "5" )
744 	PORT_DIPSETTING(    0x04, "6" )
745 	PORT_DIPSETTING(    0x00, "7" )
746 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )/* Not Listed/shown in test mode */
747 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
748 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
749 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
750 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
751 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
752 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) /* Listed as "Unused" in test mode */
753 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
754 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
755 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
756 
757 	PORT_START	/* 1P INPUTS & COINSW */
758 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
759 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
760 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
761 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
762 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
763 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
764 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
765 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
766 
767 	PORT_START	/* 2P INPUTS & STARTSW */
768 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
769 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
770 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
771 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
772 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
773 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
774 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
775 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
776 INPUT_PORTS_END
777 
778 INPUT_PORTS_START( thoop )
779 	PORT_START	/* DSW2 8bit */
780 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
781 	PORT_DIPSETTING(    0x03, "Easy" )
782 	PORT_DIPSETTING(    0x02, "Normal" )
783 	PORT_DIPSETTING(    0x01, "Hard" )
784 	PORT_DIPSETTING(    0x00, "Hardest" )
785 	PORT_DIPNAME( 0x04, 0x04, "Player Controls" )
786 	PORT_DIPSETTING(    0x04, "2 Joysticks" )
787 	PORT_DIPSETTING(    0x00, "1 Joystick" )
788 	PORT_DIPNAME( 0x18, 0x08, DEF_STR( Lives ) )
789 	PORT_DIPSETTING(    0x00, "4" )
790 	PORT_DIPSETTING(    0x08, "3" )
791 	PORT_DIPSETTING(    0x10, "2" )
792 	PORT_DIPSETTING(    0x18, "1" )
793 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
794 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
795 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
796 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Cabinet ) )
797 	PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
798 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
799 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
800 
801 	PORT_START	/* DSW1 8bit */
802 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
803 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
804 	PORT_DIPSETTING(    0x00, DEF_STR( 3C_4C ) )
805 	PORT_DIPSETTING(    0x01, DEF_STR( 2C_3C ) )
806 	PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
807 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
808 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
809 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_5C ) )
810 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_6C ) )
811 	PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
812 	PORT_DIPSETTING(    0x10, DEF_STR( 6C_1C ) )
813 	PORT_DIPSETTING(    0x18, DEF_STR( 5C_1C ) )
814 	PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
815 	PORT_DIPSETTING(    0x28, DEF_STR( 3C_1C ) )
816 	PORT_DIPSETTING(    0x30, DEF_STR( 2C_1C ) )
817 	PORT_DIPSETTING(    0x08, DEF_STR( 3C_2C ) )
818 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_3C ) )
819 	PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
820 	PORT_DIPNAME( 0x40, 0x40, "2 Credits to Start, 1 to Continue" )
821 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
822 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
823 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) )
824 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
825 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
826 
827 	PORT_START	/* 1P INPUTS & COINSW */
828 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
829 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
830 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
831 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
832 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
833 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
834 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
835 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
836 
837 	PORT_START	/* 2P INPUTS & STARTSW */
838 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
839 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
840 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
841 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
842 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
843 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
844 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
845 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
846 
847 	PORT_START	/* 8bit */
848 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
849 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
850 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
851 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
852 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
853 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
854 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
855 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
856 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
857 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
858 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
859 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
860 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
861 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
862 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
863 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
864 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
865 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
866 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
867 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
868 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
869 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
870 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
871 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
872 INPUT_PORTS_END
873 
874 static struct OKIM6295interface maniacsq_okim6295_interface =
875 {
876 	1,                  /* 1 chip */
877 	{ 8000 },			/* 8000 KHz? */
878 	{ REGION_SOUND1 },  /* memory region */
879 	{ 100 }				/* volume */
880 };
881 
882 static MACHINE_DRIVER_START( maniacsq )
883 
884 	/* basic machine hardware */
885 	MDRV_CPU_ADD(M68000,24000000/2)			/* 12 MHz */
886 	MDRV_CPU_MEMORY(maniacsq_readmem,maniacsq_writemem)
887 	MDRV_CPU_VBLANK_INT(irq6_line_hold,1)
888 
889 	MDRV_FRAMES_PER_SECOND(60)
890 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
891 
892 	/* video hardware */
893 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
894 	MDRV_SCREEN_SIZE(32*16, 32*16)
895 	MDRV_VISIBLE_AREA(0, 320-1, 16, 256-1)
896 	MDRV_GFXDECODE(gfxdecodeinfo_0x100000)
897 	MDRV_PALETTE_LENGTH(1024)
898 
899 	MDRV_VIDEO_START(maniacsq)
900 	MDRV_VIDEO_UPDATE(maniacsq)
901 
902 	/* sound hardware */
903 	MDRV_SOUND_ADD(OKIM6295, maniacsq_okim6295_interface)
904 MACHINE_DRIVER_END
905 
906 static MACHINE_DRIVER_START( squash )
907 
908 	/* basic machine hardware */
909 	MDRV_CPU_ADD(M68000, 12000000)	/* MC68000P12, 12 MHz */
910 	MDRV_CPU_MEMORY(squash_readmem,squash_writemem)
911 	MDRV_CPU_VBLANK_INT(irq6_line_hold,1)
912 
913 	MDRV_FRAMES_PER_SECOND(60)
914 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
915 	MDRV_INTERLEAVE(10)
916 
917 	/* video hardware */
918 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
919 	MDRV_SCREEN_SIZE(32*16, 32*16)
920 	MDRV_VISIBLE_AREA(0, 320-1, 16, 256-1)
921 	MDRV_GFXDECODE(gfxdecodeinfo_0x100000)
922 	MDRV_PALETTE_LENGTH(1024)
923 
924 	MDRV_VIDEO_START(bigkarnk)
925 	MDRV_VIDEO_UPDATE(bigkarnk)
926 
927 	/* sound hardware */
928 	MDRV_SOUND_ADD(OKIM6295, bigkarnk_okim6295_interface)
929 MACHINE_DRIVER_END
930 
931 static MACHINE_DRIVER_START( thoop )
932 
933 	/* basic machine hardware */
934 	MDRV_CPU_ADD(M68000, 12000000)	/* MC68000P12, 12 MHz */
935 	MDRV_CPU_MEMORY(thoop_readmem,thoop_writemem)
936 	MDRV_CPU_VBLANK_INT(irq6_line_hold,1)
937 
938 	MDRV_FRAMES_PER_SECOND(60)
939 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
940 	MDRV_INTERLEAVE(10)
941 
942 	/* video hardware */
943 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
944 	MDRV_SCREEN_SIZE(32*16, 32*16)
945 	MDRV_VISIBLE_AREA(0, 320-1, 16, 256-1)
946 	MDRV_GFXDECODE(gfxdecodeinfo_0x100000)
947 	MDRV_PALETTE_LENGTH(1024)
948 
949 	MDRV_VIDEO_START(maniacsq)
950 	MDRV_VIDEO_UPDATE(maniacsq)
951 
952 	/* sound hardware */
953 	MDRV_SOUND_ADD(OKIM6295, bigkarnk_okim6295_interface)
954 MACHINE_DRIVER_END
955 
956 ROM_START( maniacsp )
957 	ROM_REGION( 0x100000, REGION_CPU1, 0 )	/* 68000 code */
958 	ROM_LOAD16_BYTE(	"d18",	0x000000, 0x020000, CRC(740ecab2) SHA1(8d8583364cc6aeea58ea2b9cb9a2aab2a43a44df) )
959 	ROM_LOAD16_BYTE(	"d16",	0x000001, 0x020000, CRC(c6c42729) SHA1(1aac9f93d47a4eb57e06e206e9f50e349b1817da) )
960 
961 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
962 	ROM_LOAD( "f3",	0x000000, 0x040000, CRC(e7f6582b) SHA1(9e352edf2f71d0edecb54a11ab3fd0e3ec867d42) )
963 	ROM_RELOAD(		0x080000, 0x040000 )
964 	/* 0x040000-0x07ffff and 0x0c0000-0x0fffff empty */
965 	ROM_LOAD( "f2",	0x100000, 0x040000, CRC(ca43a5ae) SHA1(8d2ed537be1dee60096a58b68b735fb50cab3285) )
966 	ROM_RELOAD(		0x180000, 0x040000 )
967 	/* 0x140000-0x17ffff and 0x1c0000-0x1fffff empty */
968 	ROM_LOAD( "f1",	0x200000, 0x040000, CRC(fca112e8) SHA1(2a1412f8f1c856b18b6cc7794191d327a415266f) )
969 	ROM_RELOAD(		0x280000, 0x040000 )
970 	/* 0x240000-0x27ffff and 0x2c0000-0x2fffff empty */
971 	ROM_LOAD( "f0",	0x300000, 0x040000, CRC(6e829ee8) SHA1(b602da8d987c1bafa41baf5d5e5d753e29ff5403) )
972 	ROM_RELOAD(		0x380000, 0x040000 )
973 	/* 0x340000-0x37ffff and 0x3c0000-0x3fffff empty */
974 
975 	ROM_REGION( 0x140000, REGION_SOUND1, 0 )	/* ADPCM samples - sound chip is OKIM6295 */
976 	ROM_LOAD( "c1",	0x000000, 0x080000, CRC(2557f2d6) SHA1(3a99388f2d845281f73a427d6dc797dce87b2f82) )
977 	/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
978 	ROM_RELOAD(		0x040000, 0x080000 )
979 	ROM_RELOAD(		0x0c0000, 0x080000 )
980 ROM_END
981 
982 
983 ROM_START( biomtoy )
984 	ROM_REGION( 0x100000, REGION_CPU1, 0 )	/* 68000 code */
985 	ROM_LOAD16_BYTE(	"d18",	0x000000, 0x080000, CRC(4569ce64) SHA1(96557aca55779c23f7c2c11fddc618823c04ead0) )
986 	ROM_LOAD16_BYTE(	"d16",	0x000001, 0x080000, CRC(739449bd) SHA1(711a8ea5081f15dea6067577516c9296239c4145) )
987 
988 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
989 	/* weird gfx ordering */
990 	ROM_LOAD( "h6",		0x040000, 0x040000, CRC(9416a729) SHA1(425149b3041554579791fc23c09fda6be054e89d) )
991 	ROM_CONTINUE(		0x0c0000, 0x040000 )
992 	ROM_LOAD( "j6",		0x000000, 0x040000, CRC(e923728b) SHA1(113eac1de73c74ef7c9d3e2e72599a1ff775176d) )
993 	ROM_CONTINUE(		0x080000, 0x040000 )
994 	ROM_LOAD( "h7",		0x140000, 0x040000, CRC(9c984d7b) SHA1(98d43a9c3fa93c9ea55f41475ecab6ca25713087) )
995 	ROM_CONTINUE(		0x1c0000, 0x040000 )
996 	ROM_LOAD( "j7",		0x100000, 0x040000, CRC(0e18fac2) SHA1(acb0a3699395a6c68cacdeadda42a785aa4020f5) )
997 	ROM_CONTINUE(		0x180000, 0x040000 )
998 	ROM_LOAD( "h9",		0x240000, 0x040000, CRC(8c1f6718) SHA1(9377e838ebb1e16d24072b9b4ed278408d7a808f) )
999 	ROM_CONTINUE(		0x2c0000, 0x040000 )
1000 	ROM_LOAD( "j9",		0x200000, 0x040000, CRC(1c93f050) SHA1(fabeffa05dae7a83a199a57022bd318d6ad02c4d) )
1001 	ROM_CONTINUE(		0x280000, 0x040000 )
1002 	ROM_LOAD( "h10",	0x340000, 0x040000, CRC(aca1702b) SHA1(6b36b230722270dbfc2f69bd7eb07b9e718db089) )
1003 	ROM_CONTINUE(		0x3c0000, 0x040000 )
1004 	ROM_LOAD( "j10",	0x300000, 0x040000, CRC(8e3e96cc) SHA1(761009f3f32b18139e98f20a22c433b6a49d9168) )
1005 	ROM_CONTINUE(		0x380000, 0x040000 )
1006 
1007 	ROM_REGION( 0x140000, REGION_SOUND1, 0 )	/* ADPCM samples - sound chip is OKIM6295 */
1008 	ROM_LOAD( "c1",	0x000000, 0x080000, CRC(0f02de7e) SHA1(a8779370cc36290616794ff11eb3eebfdea5b1a9) )
1009 	/* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */
1010 	ROM_RELOAD(		0x040000, 0x080000 )
1011 	ROM_LOAD( "c3",	0x0c0000, 0x080000, CRC(914e4bbc) SHA1(ca82b7481621a119f05992ed093b963da70d748a) )
1012 ROM_END
1013 
1014 /* encrypted video ram */
1015 ROM_START( squash )
1016 	ROM_REGION( 0x100000, REGION_CPU1, 0 )	/* 68000 code */
1017 	ROM_LOAD16_BYTE( "squash.d18", 0x000000, 0x20000, CRC(ce7aae96) SHA1(4fe8666ae571bffc5a08fa68346c0623282989eb) )
1018 	ROM_LOAD16_BYTE( "squash.d16", 0x000001, 0x20000, CRC(8ffaedd7) SHA1(f4aada17ba67dd8b6c5a395e832bcbba2764c59d) )
1019 
1020 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
1021 	ROM_LOAD( "squash.c09", 0x300000, 0x80000, CRC(0bb91c69) SHA1(8be945049ab411a4d49bd64bd3937542ec9ef9fb) )
1022 	ROM_RELOAD(		0x380000, 0x80000 )
1023 	ROM_LOAD( "squash.c10", 0x200000, 0x80000, CRC(892a035c) SHA1(d0156ceb9aa6639a1124c17fb12389be319bb51f) )
1024 	ROM_RELOAD(		0x280000, 0x80000 )
1025 	ROM_LOAD( "squash.c11", 0x100000, 0x80000, CRC(9e19694d) SHA1(1df4646f3147719fef516a37aa361ae26d9b23a2) )
1026 	ROM_RELOAD(		0x180000, 0x80000 )
1027 	ROM_LOAD( "squash.c12", 0x000000, 0x80000, CRC(5c440645) SHA1(4f2fc1647ffc549fa079f2dc0aaaceb447afdf44) )
1028 	ROM_RELOAD(		0x080000, 0x80000 )
1029 
1030 	ROM_REGION( 0x140000, REGION_SOUND1, 0 )	/* ADPCM samples - sound chip is OKIM6295 */
1031 	ROM_LOAD( "squash.d01",   0x000000, 0x80000, CRC(a1b9651b) SHA1(a396ba94889f70ea06d6330e3606b0f2497ff6ce) )
1032 	ROM_RELOAD(		0x040000, 0x080000 )
1033 	ROM_RELOAD(		0x0c0000, 0x080000 )
1034 ROM_END
1035 
1036 /* encrypted video ram */
1037 ROM_START( thoop )
1038 	ROM_REGION( 0x100000, REGION_CPU1, 0 )	/* 68000 code */
1039 	ROM_LOAD16_BYTE( "th18dea1.040", 0x000000, 0x80000, CRC(59bad625) SHA1(28e058b2290bc5f7130b801014d026432f9e7fd5) )
1040 	ROM_LOAD16_BYTE( "th161eb4.020", 0x000001, 0x40000, CRC(6add61ed) SHA1(0e789d9a0ac19b6143044fbc04ab2227735b2a8f) )
1041 
1042 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
1043 	ROM_LOAD( "c09", 0x300000, 0x040000, CRC(06f0edbf) SHA1(3cf2e5c29cd00b43d49a106084076f2ac0dbad98) )
1044 	ROM_CONTINUE(    0x380000, 0x040000 )
1045 	ROM_CONTINUE(    0x340000, 0x040000 )
1046 	ROM_CONTINUE(    0x3c0000, 0x040000 )
1047 	ROM_LOAD( "c10", 0x200000, 0x040000, CRC(2d227085) SHA1(b224efd59ec83bb786fa92a23ef2d27ed36cab6c) )
1048 	ROM_CONTINUE(    0x280000, 0x040000 )
1049 	ROM_CONTINUE(    0x240000, 0x040000 )
1050 	ROM_CONTINUE(    0x2c0000, 0x040000 )
1051 	ROM_LOAD( "c11", 0x100000, 0x040000, CRC(7403ef7e) SHA1(52a737816e25a07ada070ed3a5f40bbbd22ac8e0) )
1052 	ROM_CONTINUE(    0x180000, 0x040000 )
1053 	ROM_CONTINUE(    0x140000, 0x040000 )
1054 	ROM_CONTINUE(    0x1c0000, 0x040000 )
1055 	ROM_LOAD( "c12", 0x000000, 0x040000, CRC(29a5ca36) SHA1(fdcfdefb3b02bfe34781fdd0295640caabe2a5fb) )
1056 	ROM_CONTINUE(    0x080000, 0x040000 )
1057 	ROM_CONTINUE(    0x040000, 0x040000 )
1058 	ROM_CONTINUE(    0x0c0000, 0x040000 )
1059 
1060 	ROM_REGION( 0x140000, REGION_SOUND1, 0 )	/* ADPCM samples - sound chip is OKIM6295 */
1061 	ROM_LOAD( "sound", 0x000000, 0x100000, CRC(99f80961) SHA1(de3a514a8f46dffd5f762e52aac1f4c3b08e2e18) )
1062 	ROM_RELOAD(		   0x040000, 0x100000 )
1063 ROM_END
1064 
1065 
1066 GAME(1991, bigkarnk, 0,        bigkarnk, bigkarnk, 0, ROT0, "Gaelco", "Big Karnak" )
1067 GAME(1995, biomtoy,  0,        maniacsq, biomtoy,  0, ROT0, "Gaelco", "Biomechanical Toy (unprotected)" )
1068 GAME(1996, maniacsp, maniacsq, maniacsq, maniacsq, 0, ROT0, "Gaelco", "Maniac Square (prototype)" )
1069 GAME(1992, squash,   0,	       squash,   squash,   0, ROT0, "Gaelco", "Squash" )
1070 GAME(1992, thoop,    0,	       thoop,    thoop,    0, ROT0, "Gaelco", "Thunder Hoop" )
1071