1 #include "../machine/twincobr.c"
2 #include "../vidhrdw/twincobr.c"
3 
4 /****************************************************************************
5 
6 		ToaPlan game hardware from 1987
7 		-------------------------------
8 		Driver by: Quench
9 		Flying Shark details: Carl-Henrik Sk�rstedt  &  Magnus Danielsson
10 		Flying Shark bootleg info: Ruben Panossian
11 
12 
13 Supported games:
14 
15 	Toaplan Board Number:	TP-007
16 	Taito game number:		B02
17 		Flying Shark (World)
18 		Sky Shark (USA Romstar license)
19 		Hishou Zame (Flying Shark Japan license)
20 		Flying Shark bootleg (USA Romstar license)
21 
22 	Toaplan Board Number:	TP-011
23 	Taito game number:		B30
24 		Twin Cobra (World)
25 		Twin Cobra (USA license)
26 		Kyukyoku Tiger (Japan license)
27 
28 Difference between Twin Cobra and Kyukyoko Tiger:
29 	T.C. supports two simultaneous players.
30 	K.T. supports two players, but only one at a time.
31 		 for this reason, it also supports Table Top cabinets.
32 	T.C. stores 3 characters for high scores.
33 	K.T. stores 6 characters for high scores.
34 	T.C. heros are Red and Blue for player 1 and 2 respectively.
35 	K.T. heros are grey for both players.
36 	T.C. dead remains of ground tanks are circular.
37 	K.T. dead remains of ground tanks always vary in shape.
38 	T.C. does not use DSW1-1 and DSW2-8.
39 	K.T. uses DSW1-1 for cabinet type, and DSW2-8 for allow game continue.
40 	T.C. continues new hero and continued game at current position.
41 	K.T. continues new hero and continued game at predefined positions.
42 		 After dying, and your new hero appears, if you do not travel more
43 		 than your helicopter length forward, you are penalised and moved
44 		 back further when your next hero appears.
45 	K.T. Due to this difference in continue sequence, Kyukyoko Tiger is MUCH
46 		 harder, challenging, and nearly impossible to complete !
47 
48 **************************** Memory & I/O Maps *****************************
49 68000: Main CPU
50 
51 00000-1ffff ROM for Flying Shark
52 00000-2ffff ROM for Twin Cobra
53 30000-33fff RAM shared with TMS320C10NL-14 protection microcontroller
54 40000-40fff RAM sprite display properties (co-ordinates, character, color - etc)
55 50000-50dff Palette RAM
56 7a000-7abff RAM shared with Z80; 16-bit on this side, 8-bit on Z80 side
57 
58 read:
59 78001		DSW1 (Flying Shark)
60 78003		DSW2 (Flying Shark)
61 
62 78005		Player 1 Joystick and Buttons input port
63 78007		Player 2 Joystick and Buttons input port
64 78009		bit 7 vblank, coin and control/service inputs (Flying shark)
65 				Flying Shark implements Tilt as 'freeze system' and also has
66 				a reset button, but its not implelemted here (not needed)
67 
68 7e000-7e005 read data from video RAM (see below)
69 
70 write:
71 60000-60003 CRT 6845 controller. 0 = register offset , 2 = register data
72 70000-70001 scroll   y   for character page (centre normally 0x01c9)
73 70002-70003 scroll < x > for character page (centre normally 0x00e2)
74 70004-70005 offset in character page to write character (7e000)
75 
76 72000-72001 scroll   y   for foreground page (starts from     0x03c9)
77 72002-72003 scroll < x > for foreground page (centre normally 0x002a)
78 72004-72005 offset in character page to write character (7e002)
79 
80 74000-74001 scroll   y   for background page (starts from     0x03c9)
81 74002-74003 scroll < x > for background page (centre normally 0x002a)
82 74004-74005 offset in character page to write character (7e004)
83 
84 76000-76003 as above but for another layer maybe ??? (Not used here)
85 7800a		This activates INT line for Flying shark. (Not via 7800C)
86 			00		Activate INTerrupt line to the TMS320C10 DSP.
87 			01		Inhibit  INTerrupt line to the TMS320C10 DSP.
88 
89 7800c		Control register (Byte write access).
90 			bits 7-4 always 0
91 			bits 3-1 select the control signal to drive.
92 			bit   0  is the value passed to the control signal.
93 
94 			Value (hex):
95 			00-03	????
96 			04		Clear IPL2 line to 68000 inactive hi (Interrupt priority 4)
97 			05		Set   IPL2 line to 68000 active  low (Interrupt priority 4)
98 			06		Dont flip display
99 			07		Flip display
100 			08		Switch to background layer ram bank 0
101 			09		Switch to background layer ram bank 1
102 			0A		Switch to foreground layer rom bank 0
103 			0B		Switch to foreground layer rom bank 1
104 			0C		Activate INTerrupt line to the TMS320C10 DSP  (Twin Cobra)
105 			0D		Inhibit  INTerrupt line to the TMS320C10 DSP  (Twin Cobra)
106 			0E		Turn screen off
107 			0F		Turn screen on
108 
109 7e000-7e001 data to write in text video RAM (70000)
110 7e002-7e003 data to write in bg video RAM (72004)
111 7e004-7e005 data to write in fg video RAM (74004)
112 
113 Z80: Sound CPU
114 0000-7fff ROM
115 8000-87ff shared with 68000; 8-bit on this side, 16-bit on 68000 side
116 
117 in:
118 00		  YM3812 status
119 10		  Coin inputs and control/service inputs (Twin Cobra)
120 40		  DSW1 (Twin Cobra)
121 50		  DSW2 (Twin Cobra)
122 
123 out:
124 00		  YM3812 control
125 01		  YM3812 data
126 20		  Coin counters / Coin lockouts
127 
128 TMS320C10 DSP: Harvard type architecture. RAM and ROM on seperate data buses.
129 0000-07ff ROM (words)
130 0000-0090 Internal RAM (words).	Moved to 8000-8120 for MAME compatibility.
131 								View this memory in the debugger at 4000h
132 
133 in:
134 01		  data read from addressed 68K address space (Main RAM/Sprite RAM)
135 
136 out:
137 00		  address of 68K to read/write to
138 01		  data to write to addressed 68K address space (Main RAM/Sprite RAM)
139 03		  bit 15 goes to BIO line of TMS320C10. BIO is a polled input line.
140 
141 
142 MCUs used with this hardware: (TMS320C10 in custom Toaplan/Taito disguise)
143 
144 Twin Cobra					Sky Shark					Wardner
145 D70016U						D70012U  					D70012U
146 GXC-04						GXC-02						GXC-02
147 MCU (delta) 74000			MCU 71400					MCU (delta) 71900
148 
149 
150 
151 68K writes the following to $30000 to tell DSP to do the following:
152 Twin  Kyukyoku
153 Cobra Tiger
154 00		00	 do nothing
155 01		0C	 run self test, and report DSP ROM checksum		from 68K PC:23CA6
156 02		07	 control all enemy shots						from 68K PC:23BFA
157 04		0B	 start the enemy helicopters					from 68K PC:23C66
158 05		08	 check for colision with enemy fire ???			from 68K PC:23C20
159 06		09	 check for colision with enemy ???				from 68K PC:23C44
160 07		01	 control enemy helicopter shots					from 68K PC:23AB2
161 08		02	 control all ground enemy shots
162 0A		04	 read hero position and send enemy to it ?		from 68K PC:23B58
163 
164 03		0A	\
165 09		03	 \ These functions within the DSP never seem to be called ????
166 0B		05	 /
167 0C		06	/
168 
169 68K writes the following to $30004 to tell DSP to do the following:
170 Flying	Hishou
171 Shark	Zame
172 00		00	 do nothing
173 03		0B	 Write sprite to sprite RAM
174 05		01	 Get angle
175 06		02	 Rotate towards direction
176 09		05	 Check collision between 2 spheres!??
177 0A		06	 Polar coordinates add
178 0B		07	 run self test, and report DSP ROM checksum
179 
180 01		09	\
181 02		0A	 \
182 04		08	  > These functions within the DSP never seem to be called ????
183 07		03	 /
184 08		04	/
185 *****************************************************************************/
186 
187 
188 
189 #include "driver.h"
190 #include "vidhrdw/generic.h"
191 #include "cpu/m68000/m68000.h"
192 
193 /**************** Machine stuff ******************/
194 void fsharkbt_reset_8741_mcu(void);
195 READ_HANDLER( fsharkbt_dsp_r );
196 WRITE_HANDLER( fshark_coin_dsp_w );
197 READ_HANDLER( twincobr_dsp_r );
198 WRITE_HANDLER( twincobr_dsp_w );
199 READ_HANDLER( twincobr_68k_dsp_r );
200 WRITE_HANDLER( twincobr_68k_dsp_w );
201 READ_HANDLER( twincobr_7800c_r );
202 WRITE_HANDLER( twincobr_7800c_w );
203 READ_HANDLER( twincobr_sharedram_r );
204 WRITE_HANDLER( twincobr_sharedram_w );
205 
206 extern unsigned char *twincobr_68k_dsp_ram;
207 extern unsigned char *twincobr_sharedram;
208 extern int twincobr_intenable;
209 
210 
211 /**************** Video stuff ******************/
212 READ_HANDLER( twincobr_crtc_r );
213 WRITE_HANDLER( twincobr_crtc_w );
214 
215 WRITE_HANDLER( twincobr_txscroll_w );
216 WRITE_HANDLER( twincobr_bgscroll_w );
217 WRITE_HANDLER( twincobr_fgscroll_w );
218 WRITE_HANDLER( twincobr_exscroll_w );
219 int  twincobr_txoffs_r(void);
220 WRITE_HANDLER( twincobr_txoffs_w );
221 WRITE_HANDLER( twincobr_bgoffs_w );
222 WRITE_HANDLER( twincobr_fgoffs_w );
223 READ_HANDLER( twincobr_txram_r );
224 READ_HANDLER( twincobr_bgram_r );
225 READ_HANDLER( twincobr_fgram_r );
226 WRITE_HANDLER( twincobr_txram_w );
227 WRITE_HANDLER( twincobr_bgram_w );
228 WRITE_HANDLER( twincobr_fgram_w );
229 
230 int  twincobr_vh_start(void);
231 void twincobr_vh_stop(void);
232 void twincobr_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
233 void twincobr_eof_callback(void);
234 
235 
236 
twincobr_interrupt(void)237 static int twincobr_interrupt(void)
238 {
239 	if (twincobr_intenable) {
240 		twincobr_intenable = 0;
241 		return MC68000_IRQ_4;
242 	}
243 	else return MC68000_INT_NONE;
244 }
245 
246 static struct MemoryReadAddress readmem[] =
247 {
248 	{ 0x000000, 0x02ffff, MRA_ROM },
249 	{ 0x030000, 0x033fff, twincobr_68k_dsp_r },		/* 68K and DSP shared RAM */
250 	{ 0x040000, 0x040fff, MRA_BANK1 },				/* sprite ram data */
251 	{ 0x050000, 0x050dff, paletteram_word_r },
252 	{ 0x078000, 0x078001, input_port_3_r },			/* Flying Shark - DSW A */
253 	{ 0x078002, 0x078003, input_port_4_r },			/* Flying Shark - DSW B */
254 	{ 0x078004, 0x078005, input_port_1_r },			/* Player 1 inputs */
255 	{ 0x078006, 0x078007, input_port_2_r },			/* Player 2 inputs */
256 	{ 0x078008, 0x078009, input_port_0_r },			/* V-Blank & FShark Coin/Start */
257 	{ 0x07a000, 0x07abff, twincobr_sharedram_r },	/* 16-bit on 68000 side, 8-bit on Z80 side */
258 	{ 0x07e000, 0x07e001, twincobr_txram_r },		/* data from text video RAM */
259 	{ 0x07e002, 0x07e003, twincobr_bgram_r },		/* data from bg video RAM */
260 	{ 0x07e004, 0x07e005, twincobr_fgram_r },		/* data from fg video RAM */
261 	{ -1 }  /* end of table */
262 };
263 
264 static struct MemoryWriteAddress writemem[] =
265 {
266 	{ 0x000000, 0x02ffff, MWA_ROM },
267 	{ 0x030000, 0x033fff, twincobr_68k_dsp_w, &twincobr_68k_dsp_ram },	/* 68K and DSP shared RAM */
268 	{ 0x040000, 0x040fff, MWA_BANK1, &spriteram, &spriteram_size },		/* sprite ram data */
269 	{ 0x050000, 0x050dff, paletteram_xBBBBBGGGGGRRRRR_word_w, &paletteram },
270 	{ 0x060000, 0x060003, twincobr_crtc_w },		/* 6845 CRT controller */
271 	{ 0x070000, 0x070003, twincobr_txscroll_w },	/* text layer scroll */
272 	{ 0x070004, 0x070005, twincobr_txoffs_w },		/* offset in text video RAM */
273 	{ 0x072000, 0x072003, twincobr_bgscroll_w },	/* bg layer scroll */
274 	{ 0x072004, 0x072005, twincobr_bgoffs_w },		/* offset in bg video RAM */
275 	{ 0x074000, 0x074003, twincobr_fgscroll_w },	/* fg layer scroll */
276 	{ 0x074004, 0x074005, twincobr_fgoffs_w },		/* offset in fg video RAM */
277 	{ 0x076000, 0x076003, twincobr_exscroll_w },	/* Spare layer scroll */
278 	{ 0x07800a, 0x07800b, fshark_coin_dsp_w },		/* Flying Shark DSP Comms & coin stuff */
279 	{ 0x07800c, 0x07800d, twincobr_7800c_w },		/* Twin Cobra DSP Comms & system control */
280 	{ 0x07a000, 0x07afff, twincobr_sharedram_w },	/* 16-bit on 68000 side, 8-bit on Z80 side */
281 	{ 0x07e000, 0x07e001, twincobr_txram_w },		/* data for text video RAM */
282 	{ 0x07e002, 0x07e003, twincobr_bgram_w },		/* data for bg video RAM */
283 	{ 0x07e004, 0x07e005, twincobr_fgram_w },		/* data for fg video RAM */
284 	{ -1 }	/* end of table */
285 };
286 
287 static struct MemoryReadAddress sound_readmem[] =
288 {
289 	{ 0x0000, 0x7fff, MRA_ROM },
290 	{ 0x8000, 0x87ff, MRA_RAM },
291 	{ -1 }	/* end of table */
292 };
293 
294 static struct MemoryWriteAddress sound_writemem[] =
295 {
296 	{ 0x0000, 0x7fff, MWA_ROM },
297 	{ 0x8000, 0x87ff, MWA_RAM, &twincobr_sharedram },
298 	{ -1 }	/* end of table */
299 };
300 
301 static struct IOReadPort sound_readport[] =
302 {
303 	{ 0x00, 0x00, YM3812_status_port_0_r },
304 	{ 0x10, 0x10, input_port_5_r },		/* Twin Cobra - Coin/Start */
305 	{ 0x40, 0x40, input_port_3_r },		/* Twin Cobra - DSW A */
306 	{ 0x50, 0x50, input_port_4_r },		/* Twin Cobra - DSW B */
307 	{ -1 }	/* end of table */
308 };
309 
310 static struct IOWritePort sound_writeport[] =
311 {
312 	{ 0x00, 0x00, YM3812_control_port_0_w },
313 	{ 0x01, 0x01, YM3812_write_port_0_w },
314 	{ 0x20, 0x20, fshark_coin_dsp_w },		/* Twin Cobra coin count-lockout */
315 	{ -1 }	/* end of table */
316 };
317 
318 static struct MemoryReadAddress DSP_readmem[] =
319 {
320 	{ 0x0000, 0x0fff, MRA_ROM },	/* 0x800 words */
321 	{ 0x8000, 0x811f, MRA_RAM },	/* The real DSP has this at address 0 */
322 									/* View this at 4000h in the debugger */
323 	{ -1 }	/* end of table */
324 };
325 
326 static struct MemoryWriteAddress DSP_writemem[] =
327 {
328 	{ 0x0000, 0x0fff, MWA_ROM },	/* 0x800 words */
329 	{ 0x8000, 0x811f, MWA_RAM },	/* The real DSP has this at address 0 */
330 									/* View this at 4000h in the debugger */
331 	{ -1 }	/* end of table */
332 };
333 
334 static struct IOReadPort DSP_readport[] =
335 {
336 	{ 0x01, 0x01, twincobr_dsp_r },
337 	{ 0x02, 0x02, fsharkbt_dsp_r },
338 	{ -1 }	/* end of table */
339 };
340 
341 static struct IOWritePort DSP_writeport[] =
342 {
343 	{ 0x00, 0x03, twincobr_dsp_w },
344 	{ -1 }	/* end of table */
345 };
346 
347 
348 /*****************************************************************************
349 	Input Port definitions
350 *****************************************************************************/
351 
352 #define  TOAPLAN_PLAYER_INPUT( player )										 \
353 	PORT_START 																 \
354 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | player ) \
355 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | player ) \
356 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | player ) \
357 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | player ) \
358 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | player)					 \
359 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | player)					 \
360 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )							 \
361 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
362 
363 #define  TOAPLAN_JAPAN_DSW_A							\
364 	PORT_START		/* DSW A */							\
365 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )		\
366 	PORT_DIPSETTING(	0x01, DEF_STR( Upright ) )		\
367 	PORT_DIPSETTING(	0x00, DEF_STR( Cocktail ) )		\
368 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )	\
369 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )			\
370 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )			\
371 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )	\
372 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )			\
373 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )			\
374 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )	\
375 	PORT_DIPSETTING(	0x08, DEF_STR( Off ) )			\
376 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )			\
377 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )		\
378 	PORT_DIPSETTING(	0x20, DEF_STR( 2C_1C ) )		\
379 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )		\
380 	PORT_DIPSETTING(	0x30, DEF_STR( 2C_3C ) )		\
381 	PORT_DIPSETTING(	0x10, DEF_STR( 1C_2C ) )		\
382 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )		\
383 	PORT_DIPSETTING(	0x80, DEF_STR( 2C_1C ) )		\
384 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )		\
385 	PORT_DIPSETTING(	0xc0, DEF_STR( 2C_3C ) )		\
386 	PORT_DIPSETTING(	0x40, DEF_STR( 1C_2C ) )
387 
388 #define  TWINCOBR_VBLANK_INPUT						\
389 	PORT_START										\
390 	PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNKNOWN )	\
391 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
392 
393 #define  TWINCOBR_SYSTEM_INPUTS							\
394 	PORT_START											\
395 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )			\
396 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )			\
397 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )	\
398 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )			\
399 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )			\
400 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )			\
401 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )			\
402 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )		\
403 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )		\
404 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
405 
406 #define TWINCOBR_DSW_B		/* not KTIGER */			\
407 	PORT_START		/* DSW B */							\
408 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )	\
409 	PORT_DIPSETTING(	0x01, "Easy" )					\
410 	PORT_DIPSETTING(	0x00, "Normal" )				\
411 	PORT_DIPSETTING(	0x02, "Hard" )					\
412 	PORT_DIPSETTING(	0x03, "Hardest" )				\
413 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )	\
414 	PORT_DIPSETTING(	0x00, "50K, then every 150K" )	\
415 	PORT_DIPSETTING(	0x04, "70K, then every 200K" )	\
416 	PORT_DIPSETTING(	0x08, "50000" )					\
417 	PORT_DIPSETTING(	0x0c, "100000" )				\
418 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )		\
419 	PORT_DIPSETTING(	0x30, "2" )						\
420 	PORT_DIPSETTING(	0x00, "3" )						\
421 	PORT_DIPSETTING(	0x20, "4" )						\
422 	PORT_DIPSETTING(	0x10, "5" )						\
423 	PORT_DIPNAME( 0x40, 0x00, "Show DIP SW Settings" )	\
424 	PORT_DIPSETTING(	0x00, DEF_STR( No ) )			\
425 	PORT_DIPSETTING(	0x40, DEF_STR( Yes ) )			\
426 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )		\
427 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )			\
428 	PORT_DIPSETTING(	0x80, DEF_STR( On ) )
429 
430 #define  FSHARK_SYSTEM_INPUTS		/* V-Blank is also here */				 \
431 	PORT_START																 \
432 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )								 \
433 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )		/* tilt causes freeze */ \
434 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )	/* reset button */		 \
435 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )								 \
436 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )								 \
437 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )							 \
438 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )							 \
439 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
440 
441 #define FSHARK_DSW_B									\
442 	PORT_START		/* DSW B */							\
443 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )	\
444 	PORT_DIPSETTING(	0x01, "Easy" )					\
445 	PORT_DIPSETTING(	0x00, "Normal" )				\
446 	PORT_DIPSETTING(	0x02, "Hard" )					\
447 	PORT_DIPSETTING(	0x03, "Hardest" )				\
448 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )	\
449 	PORT_DIPSETTING(	0x00, "50K, then every 150K" )	\
450 	PORT_DIPSETTING(	0x04, "70K, then every 200K" )	\
451 	PORT_DIPSETTING(	0x08, "50000" )					\
452 	PORT_DIPSETTING(	0x0c, "100000" )				\
453 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )		\
454 	PORT_DIPSETTING(	0x20, "1" )						\
455 	PORT_DIPSETTING(	0x30, "2" )						\
456 	PORT_DIPSETTING(	0x00, "3" )						\
457 	PORT_DIPSETTING(	0x10, "5" )						\
458 	PORT_DIPNAME( 0x40, 0x00, "Show DIP SW Settings" )	\
459 	PORT_DIPSETTING(	0x00, DEF_STR( No ) )			\
460 	PORT_DIPSETTING(	0x40, DEF_STR( Yes ) )			\
461 	PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )		\
462 	PORT_DIPSETTING(	0x00, DEF_STR( No ) )			\
463 	PORT_DIPSETTING(	0x80, DEF_STR( Yes ) )
464 
465 
466 
467 
468 INPUT_PORTS_START( twincobr )
469 	TWINCOBR_VBLANK_INPUT
470 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
471 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
472 
473 	PORT_START		/* DSW A */
474 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
475 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
476 	PORT_DIPSETTING(	0x01, DEF_STR( On ) )
477 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
478 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
479 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )
480 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )
481 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
482 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )
483 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
484 	PORT_DIPSETTING(	0x08, DEF_STR( Off ) )
485 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
486 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
487 	PORT_DIPSETTING(	0x30, DEF_STR( 4C_1C ) )
488 	PORT_DIPSETTING(	0x20, DEF_STR( 3C_1C ) )
489 	PORT_DIPSETTING(	0x10, DEF_STR( 2C_1C ) )
490 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
491 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
492 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_2C ) )
493 	PORT_DIPSETTING(	0x40, DEF_STR( 1C_3C ) )
494 	PORT_DIPSETTING(	0x80, DEF_STR( 1C_4C ) )
495 	PORT_DIPSETTING(	0xc0, DEF_STR( 1C_6C ) )
496 
497 	TWINCOBR_DSW_B
498 	TWINCOBR_SYSTEM_INPUTS
499 INPUT_PORTS_END
500 
501 INPUT_PORTS_START( twincobu )
502 	TWINCOBR_VBLANK_INPUT
503 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
504 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
505 
506 	PORT_START		/* DSW A */
507 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
508 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
509 	PORT_DIPSETTING(	0x01, DEF_STR( On ) )
510 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
511 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
512 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )
513 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )
514 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
515 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )
516 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
517 	PORT_DIPSETTING(	0x08, DEF_STR( Off ) )
518 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
519 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
520 	PORT_DIPSETTING(	0x20, DEF_STR( 2C_1C ) )
521 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
522 	PORT_DIPSETTING(	0x30, DEF_STR( 2C_3C ) )
523 	PORT_DIPSETTING(	0x10, DEF_STR( 1C_2C ) )
524 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
525 	PORT_DIPSETTING(	0x80, DEF_STR( 2C_1C ) )
526 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
527 	PORT_DIPSETTING(	0xc0, DEF_STR( 2C_3C ) )
528 	PORT_DIPSETTING(	0x40, DEF_STR( 1C_2C ) )
529 
530 	TWINCOBR_DSW_B
531 	TWINCOBR_SYSTEM_INPUTS
532 INPUT_PORTS_END
533 
534 INPUT_PORTS_START( ktiger )
535 	TWINCOBR_VBLANK_INPUT
536 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
537 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
538 	TOAPLAN_JAPAN_DSW_A
539 
540 	PORT_START		/* DSW B */
541 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
542 	PORT_DIPSETTING(	0x01, "Easy" )
543 	PORT_DIPSETTING(	0x00, "Normal" )
544 	PORT_DIPSETTING(	0x02, "Hard" )
545 	PORT_DIPSETTING(	0x03, "Hardest" )
546 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
547 	PORT_DIPSETTING(	0x00, "70K, then every 200K" )
548 	PORT_DIPSETTING(	0x04, "50K, then every 150K" )
549 	PORT_DIPSETTING(	0x08, "100000" )
550 	PORT_DIPSETTING(	0x0c, "No Extend" )
551 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
552 	PORT_DIPSETTING(	0x30, "2" )
553 	PORT_DIPSETTING(	0x00, "3" )
554 	PORT_DIPSETTING(	0x20, "4" )
555 	PORT_DIPSETTING(	0x10, "5" )
556 	PORT_DIPNAME( 0x40, 0x00, "Show DIP SW Settings" )
557 	PORT_DIPSETTING(	0x00, DEF_STR( No ) )
558 	PORT_DIPSETTING(	0x40, DEF_STR( Yes ) )
559 	PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )
560 	PORT_DIPSETTING(	0x00, DEF_STR( No ) )
561 	PORT_DIPSETTING(	0x80, DEF_STR( Yes ) )
562 
563 	TWINCOBR_SYSTEM_INPUTS
564 INPUT_PORTS_END
565 
566 INPUT_PORTS_START( fshark )
567 	FSHARK_SYSTEM_INPUTS
568 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
569 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
570 
571 	PORT_START		/* DSW A */
572 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
573 	PORT_DIPSETTING(	0x01, DEF_STR( Upright ) )
574 	PORT_DIPSETTING(	0x00, DEF_STR( Cocktail ) )
575 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
576 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
577 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )
578 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )
579 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
580 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )
581 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
582 	PORT_DIPSETTING(	0x08, DEF_STR( Off ) )
583 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
584 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
585 	PORT_DIPSETTING(	0x30, DEF_STR( 4C_1C ) )
586 	PORT_DIPSETTING(	0x20, DEF_STR( 3C_1C ) )
587 	PORT_DIPSETTING(	0x10, DEF_STR( 2C_1C ) )
588 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
589 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
590 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_2C ) )
591 	PORT_DIPSETTING(	0x40, DEF_STR( 1C_3C ) )
592 	PORT_DIPSETTING(	0x80, DEF_STR( 1C_4C ) )
593 	PORT_DIPSETTING(	0xc0, DEF_STR( 1C_6C ) )
594 
595 	FSHARK_DSW_B
596 INPUT_PORTS_END
597 
598 INPUT_PORTS_START( skyshark )
599 	FSHARK_SYSTEM_INPUTS
600 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
601 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
602 
603 	PORT_START		/* DSW A */
604 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
605 	PORT_DIPSETTING(	0x01, DEF_STR( Upright ) )
606 	PORT_DIPSETTING(	0x00, DEF_STR( Cocktail ) )
607 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Flip_Screen ) )
608 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
609 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )
610 	PORT_DIPNAME( 0x04, 0x00, "Cross Hatch Pattern" )
611 	PORT_DIPSETTING(	0x00, DEF_STR( Off ) )
612 	PORT_DIPSETTING(	0x04, DEF_STR( On ) )
613 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
614 	PORT_DIPSETTING(	0x08, DEF_STR( Off ) )
615 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
616 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
617 	PORT_DIPSETTING(	0x10, DEF_STR( 2C_1C ) )
618 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
619 	PORT_DIPSETTING(	0x20, DEF_STR( 1C_2C ) )
620 /*	PORT_DIPSETTING(	0x30, DEF_STR( 1C_2C ) )	Same as previous */
621 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
622 	PORT_DIPSETTING(	0x40, DEF_STR( 2C_1C ) )
623 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_1C ) )
624 	PORT_DIPSETTING(	0x80, DEF_STR( 1C_2C ) )
625 /*	PORT_DIPSETTING(	0xc0, DEF_STR( 1C_2C ) )	Same as previous */
626 
627 	FSHARK_DSW_B
628 INPUT_PORTS_END
629 
630 INPUT_PORTS_START( hishouza )
631 	FSHARK_SYSTEM_INPUTS
632 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER1 )
633 	TOAPLAN_PLAYER_INPUT( IPF_PLAYER2 )
634 	TOAPLAN_JAPAN_DSW_A
635 	FSHARK_DSW_B
636 INPUT_PORTS_END
637 
638 
639 static struct GfxLayout charlayout =
640 {
641 	8,8,	/* 8*8 characters */
642 	2048,	/* 2048 characters */
643 	3,		/* 3 bits per pixel */
644 	{ 0*2048*8*8, 1*2048*8*8, 2*2048*8*8 },
645 	{ 0, 1, 2, 3, 4, 5, 6, 7 },
646 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
647 	8*8		/* every char takes 8 consecutive bytes */
648 };
649 
650 #define TILELAYOUT(NUM) static struct GfxLayout tilelayout_##NUM =  \
651 {																	\
652 	8,8,	/* 8*8 tiles */											\
653 	NUM,	/* NUM (4096/8192) tiles */								\
654 	4,		/* 4 bits per pixel */									\
655 	{ 0*NUM*8*8, 1*NUM*8*8, 2*NUM*8*8, 3*NUM*8*8 },					\
656 	{ 0, 1, 2, 3, 4, 5, 6, 7 },										\
657 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },						\
658 	8*8		/* every tile takes 8 consecutive bytes */				\
659 }
660 
661 TILELAYOUT(4096);
662 TILELAYOUT(8192);
663 
664 
665 static struct GfxLayout spritelayout =
666 {
667 	16,16,	/* 16*16 sprites */
668 	2048,	/* 2048 sprites */
669 	4,		/* 4 bits per pixel */
670 	{ 0*2048*32*8, 1*2048*32*8, 2*2048*32*8, 3*2048*32*8 },
671 	{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
672 	{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
673 			8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
674 	32*8	/* every sprite takes 32 consecutive bytes */
675 };
676 
677 static struct GfxDecodeInfo gfxdecodeinfo[] =
678 {
679 	{ REGION_GFX1, 0x00000, &charlayout,	  1536, 32 },	/* colors 1536-1791 */
680 	{ REGION_GFX2, 0x00000, &tilelayout_8192, 1280, 16 },	/* colors 1280-1535 */
681 	{ REGION_GFX3, 0x00000, &tilelayout_4096, 1024, 16 },	/* colors 1024-1079 */
682 	{ REGION_GFX4, 0x00000, &spritelayout,	 	 0, 64 },	/* colors    0-1023 */
683 	{ -1 } /* end of array */
684 };
685 
686 
687 
688 /* handler called by the 3812 emulator when the internal timers cause an IRQ */
irqhandler(int linestate)689 static void irqhandler(int linestate)
690 {
691 	cpu_set_irq_line(1,0,linestate);
692 }
693 
694 static struct YM3812interface ym3812_interface =
695 {
696 	1,				/* 1 chip  */
697 	28000000/8,		/* 3.5 MHz */
698 	{ 100 },		/* volume */
699 	{ irqhandler },
700 };
701 
702 
703 static struct MachineDriver machine_driver_twincobr =
704 {
705 	/* basic machine hardware */
706 	{
707 		{
708 			CPU_M68000,
709 			28000000/4,			/* 7.0 MHz - Main board Crystal is 28Mhz */
710 			readmem,writemem,0,0,
711 			twincobr_interrupt,1
712 		},
713 		{
714 			CPU_Z80,
715 			28000000/8,			/* 3.5 MHz */
716 			sound_readmem,sound_writemem,sound_readport,sound_writeport,
717 			ignore_interrupt,0	/* IRQs are caused by the YM3812 */
718 		},
719 		{
720 			CPU_TMS320C10,
721 			28000000/8,			/* 3.5 MHz */
722 			DSP_readmem,DSP_writemem,DSP_readport,DSP_writeport,
723 			ignore_interrupt,0	/* IRQs are caused by 68000 */
724 		},
725 	},
726 	56, DEFAULT_REAL_60HZ_VBLANK_DURATION,  /* frames per second, vblank duration */
727 	100,									/* 100 CPU slices per frame */
728 	fsharkbt_reset_8741_mcu,		/* Reset fshark bootleg 8741 MCU data */
729 
730 	/* video hardware */
731 	64*8, 32*8, { 0*8, 40*8-1, 0*8, 30*8-1 },
732 	gfxdecodeinfo,
733 	1792, 1792,
734 	0,	/* No color PROM decode */
735 
736 	VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_BUFFERS_SPRITERAM,
737 	twincobr_eof_callback,
738 	twincobr_vh_start,
739 	twincobr_vh_stop,
740 	twincobr_vh_screenrefresh,
741 
742 	/* sound hardware */
743 	0,0,0,0,
744 	{
745 		{
746 			SOUND_YM3812,
747 			&ym3812_interface
748 		},
749 	},
750 };
751 
752 
753 
754 /***************************************************************************
755 
756   Game driver(s)
757 
758 ***************************************************************************/
759 
760 ROM_START( twincobr )
761 	ROM_REGION( 0x30000, REGION_CPU1 )	/* Main 68K code */
762 	ROM_LOAD_EVEN( "tc16",		0x00000, 0x10000, 0x07f64d13 )
763 	ROM_LOAD_ODD ( "tc14",		0x00000, 0x10000, 0x41be6978 )
764 	ROM_LOAD_EVEN( "tc15",		0x20000, 0x08000, 0x3a646618 )
765 	ROM_LOAD_ODD ( "tc13",		0x20000, 0x08000, 0xd7d1e317 )
766 
767 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
768 	ROM_LOAD( "tc12",			0x00000, 0x08000, 0xe37b3c44 )	/* slightly different from the other two sets */
769 
770 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
771 	ROM_LOAD_EVEN( "dsp_22.bin",	0x0000, 0x0800, 0x79389a71 )
772 	ROM_LOAD_ODD ( "dsp_21.bin",	0x0000, 0x0800, 0x2d135376 )
773 /******  The following are from a bootleg board. ******
774 	A0 and A1 are swapped between the TMS320C10 and these BPROMs on the board.
775 	ROM_LOAD_EVEN( "tc1b",		0x0000, 0x0800, 0x1757cc33 )
776 	ROM_LOAD_ODD ( "tc2a",		0x0000, 0x0800, 0xd6d878c9 )
777 */
778 
779 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
780 	ROM_LOAD( "tc11",			0x00000, 0x04000, 0x0a254133 )
781 	ROM_LOAD( "tc03",			0x04000, 0x04000, 0xe9e2d4b1 )
782 	ROM_LOAD( "tc04",			0x08000, 0x04000, 0xa599d845 )
783 
784 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
785 	ROM_LOAD( "tc01",			0x00000, 0x10000, 0x15b3991d )
786 	ROM_LOAD( "tc02",			0x10000, 0x10000, 0xd9e2e55d )
787 	ROM_LOAD( "tc06",			0x20000, 0x10000, 0x13daeac8 )
788 	ROM_LOAD( "tc05",			0x30000, 0x10000, 0x8cc79357 )
789 
790 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
791 	ROM_LOAD( "tc07",			0x00000, 0x08000, 0xb5d48389 )
792 	ROM_LOAD( "tc08",			0x08000, 0x08000, 0x97f20fdc )
793 	ROM_LOAD( "tc09",			0x10000, 0x08000, 0x170c01db )
794 	ROM_LOAD( "tc10",			0x18000, 0x08000, 0x44f5accd )
795 
796 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
797 	ROM_LOAD( "tc20",			0x00000, 0x10000, 0xcb4092b8 )
798 	ROM_LOAD( "tc19",			0x10000, 0x10000, 0x9cb8675e )
799 	ROM_LOAD( "tc18",			0x20000, 0x10000, 0x806fb374 )
800 	ROM_LOAD( "tc17",			0x30000, 0x10000, 0x4264bff8 )
801 
802 	ROM_REGION( 0x260, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
803 	ROM_LOAD( "82s129.d3",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
804 	ROM_LOAD( "82s129.d4",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
805 	ROM_LOAD( "82s123.d2",	0x200, 0x020, 0xf72482db )	/* sprite control ?? */
806 	ROM_LOAD( "82s123.e18",	0x220, 0x020, 0xbc88cced )	/* sprite attribute (flip/position) ?? */
807 	ROM_LOAD( "82s123.b24",	0x240, 0x020, 0x4fb5df2a )	/* tile to sprite priority ?? */
808 ROM_END
809 
ROM_START(twincobu)810 ROM_START( twincobu )
811 	ROM_REGION( 0x30000, REGION_CPU1 )	/* Main 68K code */
812 	ROM_LOAD_EVEN( "tc16",			0x00000, 0x10000, 0x07f64d13 )
813 	ROM_LOAD_ODD ( "tc14",			0x00000, 0x10000, 0x41be6978 )
814 	ROM_LOAD_EVEN( "tcbra26.bin",	0x20000, 0x08000, 0xbdd00ba4 )
815 	ROM_LOAD_ODD ( "tcbra27.bin",	0x20000, 0x08000, 0xed600907 )
816 
817 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
818 	ROM_LOAD( "b30-05",				0x00000, 0x08000, 0x1a8f1e10 )
819 
820 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
821 	ROM_LOAD_EVEN( "dsp_22.bin",	0x0000, 0x0800, 0x79389a71 )
822 	ROM_LOAD_ODD ( "dsp_21.bin",	0x0000, 0x0800, 0x2d135376 )
823 
824 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
825 	ROM_LOAD( "tc11",			0x00000, 0x04000, 0x0a254133 )
826 	ROM_LOAD( "tc03",			0x04000, 0x04000, 0xe9e2d4b1 )
827 	ROM_LOAD( "tc04",			0x08000, 0x04000, 0xa599d845 )
828 
829 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
830 	ROM_LOAD( "tc01",			0x00000, 0x10000, 0x15b3991d )
831 	ROM_LOAD( "tc02",			0x10000, 0x10000, 0xd9e2e55d )
832 	ROM_LOAD( "tc06",			0x20000, 0x10000, 0x13daeac8 )
833 	ROM_LOAD( "tc05",			0x30000, 0x10000, 0x8cc79357 )
834 
835 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
836 	ROM_LOAD( "tc07",			0x00000, 0x08000, 0xb5d48389 )
837 	ROM_LOAD( "tc08",			0x08000, 0x08000, 0x97f20fdc )
838 	ROM_LOAD( "tc09",			0x10000, 0x08000, 0x170c01db )
839 	ROM_LOAD( "tc10",			0x18000, 0x08000, 0x44f5accd )
840 
841 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
842 	ROM_LOAD( "tc20",			0x00000, 0x10000, 0xcb4092b8 )
843 	ROM_LOAD( "tc19",			0x10000, 0x10000, 0x9cb8675e )
844 	ROM_LOAD( "tc18",			0x20000, 0x10000, 0x806fb374 )
845 	ROM_LOAD( "tc17",			0x30000, 0x10000, 0x4264bff8 )
846 
847 	ROM_REGION( 0x260, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
848 	ROM_LOAD( "82s129.d3",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
849 	ROM_LOAD( "82s129.d4",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
850 	ROM_LOAD( "82s123.d2",	0x200, 0x020, 0xf72482db )	/* sprite control ?? */
851 	ROM_LOAD( "82s123.e18",	0x220, 0x020, 0xbc88cced )	/* sprite attribute (flip/position) ?? */
852 	ROM_LOAD( "82s123.b24",	0x240, 0x020, 0x4fb5df2a )	/* tile to sprite priority ?? */
853 ROM_END
854 
855 ROM_START( ktiger )
856 	ROM_REGION( 0x30000, REGION_CPU1 )	/* Main 68K code */
857 	ROM_LOAD_EVEN( "tc16",		0x00000, 0x10000, 0x07f64d13 )
858 	ROM_LOAD_ODD ( "tc14",		0x00000, 0x10000, 0x41be6978 )
859 	ROM_LOAD_EVEN( "b30-02",	0x20000, 0x08000, 0x1d63e9c4 )
860 	ROM_LOAD_ODD ( "b30-04",	0x20000, 0x08000, 0x03957a30 )
861 
862 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
863 	ROM_LOAD( "b30-05",			0x00000, 0x08000, 0x1a8f1e10 )
864 
865 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
866 	ROM_LOAD_EVEN( "dsp-22",	0x0000, 0x0800, BADCRC( 0x8a1d48d9 ) )
867 	ROM_LOAD_ODD ( "dsp-21",	0x0000, 0x0800, BADCRC( 0x33d99bc2 ) )
868 
869 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
870 	ROM_LOAD( "tc11",			0x00000, 0x04000, 0x0a254133 )
871 	ROM_LOAD( "tc03",			0x04000, 0x04000, 0xe9e2d4b1 )
872 	ROM_LOAD( "tc04",			0x08000, 0x04000, 0xa599d845 )
873 
874 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
875 	ROM_LOAD( "tc01",			0x00000, 0x10000, 0x15b3991d )
876 	ROM_LOAD( "tc02",			0x10000, 0x10000, 0xd9e2e55d )
877 	ROM_LOAD( "tc06",			0x20000, 0x10000, 0x13daeac8 )
878 	ROM_LOAD( "tc05",			0x30000, 0x10000, 0x8cc79357 )
879 
880 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
881 	ROM_LOAD( "tc07",			0x00000, 0x08000, 0xb5d48389 )
882 	ROM_LOAD( "tc08",			0x08000, 0x08000, 0x97f20fdc )
883 	ROM_LOAD( "tc09",			0x10000, 0x08000, 0x170c01db )
884 	ROM_LOAD( "tc10",			0x18000, 0x08000, 0x44f5accd )
885 
886 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
887 	ROM_LOAD( "tc20",			0x00000, 0x10000, 0xcb4092b8 )
888 	ROM_LOAD( "tc19",			0x10000, 0x10000, 0x9cb8675e )
889 	ROM_LOAD( "tc18",			0x20000, 0x10000, 0x806fb374 )
890 	ROM_LOAD( "tc17",			0x30000, 0x10000, 0x4264bff8 )
891 
892 	ROM_REGION( 0x260, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
893 	ROM_LOAD( "82s129.d3",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
894 	ROM_LOAD( "82s129.d4",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
895 	ROM_LOAD( "82s123.d2",	0x200, 0x020, 0xf72482db )	/* sprite control ?? */
896 	ROM_LOAD( "82s123.e18",	0x220, 0x020, 0xbc88cced )	/* sprite attribute (flip/position) ?? */
897 	ROM_LOAD( "82s123.b24",	0x240, 0x020, 0x4fb5df2a )	/* tile to sprite priority ?? */
898 ROM_END
899 
900 ROM_START( fshark )
901 	ROM_REGION( 0x20000, REGION_CPU1 )	/* Main 68K code */
902 	ROM_LOAD_EVEN( "b02_18-1.rom",	0x00000, 0x10000, 0x04739e02 )
903 	ROM_LOAD_ODD ( "b02_17-1.rom",	0x00000, 0x10000, 0xfd6ef7a8 )
904 
905 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
906 	ROM_LOAD( "b02_16.rom",		0x0000, 0x8000, 0xcdd1a153 )
907 
908 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
909 #ifdef MSB_FIRST
910 	ROM_LOAD_NIB_HIGH( "82s137-3.mcu",  0x1000, 0x0400, 0x70b537b9 ) /* lsb */
911 	ROM_LOAD_NIB_LOW ( "82s137-4.mcu",  0x1000, 0x0400, 0x6edb2de8 )
912 	ROM_LOAD_NIB_HIGH( "82s137-7.mcu",  0x1400, 0x0400, 0xcbf3184b )
913 	ROM_LOAD_NIB_LOW ( "82s137-8.mcu",  0x1400, 0x0400, 0x8246a05c )
914 	ROM_LOAD_NIB_HIGH( "82s137-1.mcu",  0x1800, 0x0400, 0xcc5b3f53 ) /* msb */
915 	ROM_LOAD_NIB_LOW ( "82s137-2.mcu",  0x1800, 0x0400, 0x47351d55 )
916 	ROM_LOAD_NIB_HIGH( "82s137-5.mcu",  0x1c00, 0x0400, 0xf35b978a )
917 	ROM_LOAD_NIB_LOW ( "82s137-6.mcu",  0x1c00, 0x0400, 0x0459e51b )
918 #else
919 	ROM_LOAD_NIB_HIGH( "82s137-1.mcu",  0x1000, 0x0400, 0xcc5b3f53 ) /* msb */
920 	ROM_LOAD_NIB_LOW ( "82s137-2.mcu",  0x1000, 0x0400, 0x47351d55 )
921 	ROM_LOAD_NIB_HIGH( "82s137-5.mcu",  0x1400, 0x0400, 0xf35b978a )
922 	ROM_LOAD_NIB_LOW ( "82s137-6.mcu",  0x1400, 0x0400, 0x0459e51b )
923 	ROM_LOAD_NIB_HIGH( "82s137-3.mcu",  0x1800, 0x0400, 0x70b537b9 ) /* lsb */
924 	ROM_LOAD_NIB_LOW ( "82s137-4.mcu",  0x1800, 0x0400, 0x6edb2de8 )
925 	ROM_LOAD_NIB_HIGH( "82s137-7.mcu",  0x1c00, 0x0400, 0xcbf3184b )
926 	ROM_LOAD_NIB_LOW ( "82s137-8.mcu",  0x1c00, 0x0400, 0x8246a05c )
927 #endif
928 
929 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
930 	ROM_LOAD( "b02_07-1.rom",	0x00000, 0x04000, 0xe669f80e )
931 	ROM_LOAD( "b02_06-1.rom",	0x04000, 0x04000, 0x5e53ae47 )
932 	ROM_LOAD( "b02_05-1.rom",	0x08000, 0x04000, 0xa8b05bd0 )
933 
934 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
935 	ROM_LOAD( "b02_12.rom",		0x00000, 0x08000, 0x733b9997 )
936 		/* 08000-0ffff not used */
937 	ROM_LOAD( "b02_15.rom",		0x10000, 0x08000, 0x8b70ef32 )
938 		/* 18000-1ffff not used */
939 	ROM_LOAD( "b02_14.rom",		0x20000, 0x08000, 0xf711ba7d )
940 		/* 28000-2ffff not used */
941 	ROM_LOAD( "b02_13.rom",		0x30000, 0x08000, 0x62532cd3 )
942 		/* 38000-3ffff not used */
943 
944 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
945 	ROM_LOAD( "b02_08.rom",		0x00000, 0x08000, 0xef0cf49c )
946 	ROM_LOAD( "b02_11.rom",		0x08000, 0x08000, 0xf5799422 )
947 	ROM_LOAD( "b02_10.rom",		0x10000, 0x08000, 0x4bd099ff )
948 	ROM_LOAD( "b02_09.rom",		0x18000, 0x08000, 0x230f1582 )
949 
950 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
951 	ROM_LOAD( "b02_01.512",		0x00000, 0x10000, 0x2234b424 )
952 	ROM_LOAD( "b02_02.512",		0x10000, 0x10000, 0x30d4c9a8 )
953 	ROM_LOAD( "b02_03.512",		0x20000, 0x10000, 0x64f3d88f )
954 	ROM_LOAD( "b02_04.512",		0x30000, 0x10000, 0x3b23a9fc )
955 
956 	ROM_REGION( 0x300, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
957 	ROM_LOAD( "clr2.bpr",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
958 	ROM_LOAD( "clr1.bpr",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
959 	ROM_LOAD( "clr3.bpr",	0x200, 0x100, 0x016fe2f7 )	/* ?? */
960 ROM_END
961 
962 ROM_START( skyshark )
963 	ROM_REGION( 0x20000, REGION_CPU1 )	/* Main 68K code */
964 	ROM_LOAD_EVEN( "18-2",		0x00000, 0x10000, 0x888e90f3 )
965 	ROM_LOAD_ODD ( "17-2",		0x00000, 0x10000, 0x066d67be )
966 
967 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
968 	ROM_LOAD( "b02_16.rom",		0x0000, 0x8000, 0xcdd1a153 )
969 
970 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
971 #ifdef MSB_FIRST
972 	ROM_LOAD_NIB_HIGH( "82s137-3.mcu",  0x1000, 0x0400, 0x70b537b9 ) /* lsb */
973 	ROM_LOAD_NIB_LOW ( "82s137-4.mcu",  0x1000, 0x0400, 0x6edb2de8 )
974 	ROM_LOAD_NIB_HIGH( "82s137-7.mcu",  0x1400, 0x0400, 0xcbf3184b )
975 	ROM_LOAD_NIB_LOW ( "82s137-8.mcu",  0x1400, 0x0400, 0x8246a05c )
976 	ROM_LOAD_NIB_HIGH( "82s137-1.mcu",  0x1800, 0x0400, 0xcc5b3f53 ) /* msb */
977 	ROM_LOAD_NIB_LOW ( "82s137-2.mcu",  0x1800, 0x0400, 0x47351d55 )
978 	ROM_LOAD_NIB_HIGH( "82s137-5.mcu",  0x1c00, 0x0400, 0xf35b978a )
979 	ROM_LOAD_NIB_LOW ( "82s137-6.mcu",  0x1c00, 0x0400, 0x0459e51b )
980 #else
981 	ROM_LOAD_NIB_HIGH( "82s137-1.mcu",  0x1000, 0x0400, 0xcc5b3f53 ) /* msb */
982 	ROM_LOAD_NIB_LOW ( "82s137-2.mcu",  0x1000, 0x0400, 0x47351d55 )
983 	ROM_LOAD_NIB_HIGH( "82s137-5.mcu",  0x1400, 0x0400, 0xf35b978a )
984 	ROM_LOAD_NIB_LOW ( "82s137-6.mcu",  0x1400, 0x0400, 0x0459e51b )
985 	ROM_LOAD_NIB_HIGH( "82s137-3.mcu",  0x1800, 0x0400, 0x70b537b9 ) /* lsb */
986 	ROM_LOAD_NIB_LOW ( "82s137-4.mcu",  0x1800, 0x0400, 0x6edb2de8 )
987 	ROM_LOAD_NIB_HIGH( "82s137-7.mcu",  0x1c00, 0x0400, 0xcbf3184b )
988 	ROM_LOAD_NIB_LOW ( "82s137-8.mcu",  0x1c00, 0x0400, 0x8246a05c )
989 #endif
990 
991 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
992 	ROM_LOAD( "7-2",			0x00000, 0x04000, 0xaf48c4e6 )
993 	ROM_LOAD( "6-2",			0x04000, 0x04000, 0x9a29a862 )
994 	ROM_LOAD( "5-2",			0x08000, 0x04000, 0xfb7cad55 )
995 
996 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
997 	ROM_LOAD( "b02_12.rom",		0x00000, 0x08000, 0x733b9997 )
998 		/* 08000-0ffff not used */
999 	ROM_LOAD( "b02_15.rom",		0x10000, 0x08000, 0x8b70ef32 )
1000 		/* 18000-1ffff not used */
1001 	ROM_LOAD( "b02_14.rom",		0x20000, 0x08000, 0xf711ba7d )
1002 		/* 28000-2ffff not used */
1003 	ROM_LOAD( "b02_13.rom",		0x30000, 0x08000, 0x62532cd3 )
1004 		/* 38000-3ffff not used */
1005 
1006 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
1007 	ROM_LOAD( "b02_08.rom",		0x00000, 0x08000, 0xef0cf49c )
1008 	ROM_LOAD( "b02_11.rom",		0x08000, 0x08000, 0xf5799422 )
1009 	ROM_LOAD( "b02_10.rom",		0x10000, 0x08000, 0x4bd099ff )
1010 	ROM_LOAD( "b02_09.rom",		0x18000, 0x08000, 0x230f1582 )
1011 
1012 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
1013 	ROM_LOAD( "b02_01.512",		0x00000, 0x10000, 0x2234b424 )
1014 	ROM_LOAD( "b02_02.512",		0x10000, 0x10000, 0x30d4c9a8 )
1015 	ROM_LOAD( "b02_03.512",		0x20000, 0x10000, 0x64f3d88f )
1016 	ROM_LOAD( "b02_04.512",		0x30000, 0x10000, 0x3b23a9fc )
1017 
1018 	ROM_REGION( 0x300, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
1019 	ROM_LOAD( "clr2.bpr",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
1020 	ROM_LOAD( "clr1.bpr",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
1021 	ROM_LOAD( "clr3.bpr",	0x200, 0x100, 0x016fe2f7 )	/* ?? */
1022 ROM_END
1023 
1024 ROM_START( hishouza )
1025 	ROM_REGION( 0x20000, REGION_CPU1 )	/* Main 68K code */
1026 	ROM_LOAD_EVEN( "b02-18.rom",	0x00000, 0x10000, 0x4444bb94 )
1027 	ROM_LOAD_ODD ( "b02-17.rom",	0x00000, 0x10000, 0xcdac7228 )
1028 
1029 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
1030 	ROM_LOAD( "b02_16.rom",		0x0000, 0x8000, 0xcdd1a153 )
1031 
1032 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
1033 #ifdef MSB_FIRST
1034 	ROM_LOAD_NIB_HIGH( "dsp-a3.bpr", 0x1000, 0x0400, 0xdf88e79b ) /* lsb */
1035 	ROM_LOAD_NIB_LOW ( "dsp-a4.bpr", 0x1000, 0x0400, 0xa2094a7f )
1036 	ROM_LOAD_NIB_HIGH( "dsp-b7.bpr", 0x1400, 0x0400, 0xe87540cd )
1037 	ROM_LOAD_NIB_LOW ( "dsp-b8.bpr", 0x1400, 0x0400, 0xd3c16c5c )
1038 	ROM_LOAD_NIB_HIGH( "dsp-a1.bpr", 0x1800, 0x0400, 0x45d4d1b1 ) /* msb */
1039 	ROM_LOAD_NIB_LOW ( "dsp-a2.bpr", 0x1800, 0x0400, 0xedd227fa )
1040 	ROM_LOAD_NIB_HIGH( "dsp-b5.bpr", 0x1c00, 0x0400, 0x85ca5d47 )
1041 	ROM_LOAD_NIB_LOW ( "dsp-b6.bpr", 0x1c00, 0x0400, 0x81816b2c )
1042 #else
1043 	ROM_LOAD_NIB_HIGH( "dsp-a1.bpr", 0x1000, 0x0400, 0x45d4d1b1 ) /* msb */
1044 	ROM_LOAD_NIB_LOW ( "dsp-a2.bpr", 0x1000, 0x0400, 0xedd227fa )
1045 	ROM_LOAD_NIB_HIGH( "dsp-b5.bpr", 0x1400, 0x0400, 0x85ca5d47 )
1046 	ROM_LOAD_NIB_LOW ( "dsp-b6.bpr", 0x1400, 0x0400, 0x81816b2c )
1047 	ROM_LOAD_NIB_HIGH( "dsp-a3.bpr", 0x1800, 0x0400, 0xdf88e79b ) /* lsb */
1048 	ROM_LOAD_NIB_LOW ( "dsp-a4.bpr", 0x1800, 0x0400, 0xa2094a7f )
1049 	ROM_LOAD_NIB_HIGH( "dsp-b7.bpr", 0x1c00, 0x0400, 0xe87540cd )
1050 	ROM_LOAD_NIB_LOW ( "dsp-b8.bpr", 0x1c00, 0x0400, 0xd3c16c5c )
1051 #endif
1052 
1053 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
1054 	ROM_LOAD( "b02-07.rom",		0x00000, 0x04000, 0xc13a775e )
1055 	ROM_LOAD( "b02-06.rom",		0x04000, 0x04000, 0xad5f1371 )
1056 	ROM_LOAD( "b02-05.rom",		0x08000, 0x04000, 0x85a7bff6 )
1057 
1058 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
1059 	ROM_LOAD( "b02_12.rom",		0x00000, 0x08000, 0x733b9997 )
1060 		/* 08000-0ffff not used */
1061 	ROM_LOAD( "b02_15.rom",		0x10000, 0x08000, 0x8b70ef32 )
1062 		/* 18000-1ffff not used */
1063 	ROM_LOAD( "b02_14.rom",		0x20000, 0x08000, 0xf711ba7d )
1064 		/* 28000-2ffff not used */
1065 	ROM_LOAD( "b02_13.rom",		0x30000, 0x08000, 0x62532cd3 )
1066 		/* 38000-3ffff not used */
1067 
1068 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
1069 	ROM_LOAD( "b02_08.rom",		0x00000, 0x08000, 0xef0cf49c )
1070 	ROM_LOAD( "b02_11.rom",		0x08000, 0x08000, 0xf5799422 )
1071 	ROM_LOAD( "b02_10.rom",		0x10000, 0x08000, 0x4bd099ff )
1072 	ROM_LOAD( "b02_09.rom",		0x18000, 0x08000, 0x230f1582 )
1073 
1074 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
1075 	ROM_LOAD( "b02_01.512",		0x00000, 0x10000, 0x2234b424 )
1076 	ROM_LOAD( "b02_02.512",		0x10000, 0x10000, 0x30d4c9a8 )
1077 	ROM_LOAD( "b02_03.512",		0x20000, 0x10000, 0x64f3d88f )
1078 	ROM_LOAD( "b02_04.512",		0x30000, 0x10000, 0x3b23a9fc )
1079 
1080 	ROM_REGION( 0x300, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
1081 	ROM_LOAD( "clr2.bpr",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
1082 	ROM_LOAD( "clr1.bpr",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
1083 	ROM_LOAD( "clr3.bpr",	0x200, 0x100, 0x016fe2f7 )	/* ?? */
1084 ROM_END
1085 
1086 ROM_START( fsharkbt )
1087 	ROM_REGION( 0x20000, REGION_CPU1 )	/* Main 68K code */
1088 	ROM_LOAD_EVEN( "r18",		0x00000, 0x10000, 0xef30f563 )
1089 	ROM_LOAD_ODD ( "r17",		0x00000, 0x10000, 0x0e18d25f )
1090 
1091 	ROM_REGION( 0x10000, REGION_CPU2 )	/* Sound Z80 code */
1092 	ROM_LOAD( "b02_16.rom",		0x0000, 0x8000, 0xcdd1a153 )
1093 
1094 	ROM_REGION( 0x10000, REGION_CPU3 )	/* Co-Processor TMS320C10 MCU code */
1095 #ifdef MSB_FIRST
1096 	ROM_LOAD_NIB_HIGH( "mcu-3.bpr",  0x1000, 0x0400, 0xdf88e79b ) /* lsb */
1097 	ROM_LOAD_NIB_LOW ( "mcu-4.bpr",  0x1000, 0x0400, 0xa2094a7f )
1098 	ROM_LOAD_NIB_HIGH( "mcu-7.bpr",  0x1400, 0x0400, 0x0cd30d49 )
1099 	ROM_LOAD_NIB_LOW ( "mcu-8.bpr",  0x1400, 0x0400, 0x3379bbff )
1100 	ROM_LOAD_NIB_HIGH( "mcu-1.bpr",  0x1800, 0x0400, 0x45d4d1b1 ) /* msb */
1101 	ROM_LOAD_NIB_LOW ( "mcu-2.bpr",  0x1800, 0x0400, 0x651336d1 )
1102 	ROM_LOAD_NIB_HIGH( "mcu-5.bpr",  0x1c00, 0x0400, 0xf97a58da )
1103 	ROM_LOAD_NIB_LOW ( "mcu-6.bpr",  0x1c00, 0x0400, 0xffcc422d )
1104 #else
1105 	ROM_LOAD_NIB_HIGH( "mcu-1.bpr",  0x1000, 0x0400, 0x45d4d1b1 ) /* msb */
1106 	ROM_LOAD_NIB_LOW ( "mcu-2.bpr",  0x1000, 0x0400, 0x651336d1 )
1107 	ROM_LOAD_NIB_HIGH( "mcu-5.bpr",  0x1400, 0x0400, 0xf97a58da )
1108 	ROM_LOAD_NIB_LOW ( "mcu-6.bpr",  0x1400, 0x0400, 0xffcc422d )
1109 	ROM_LOAD_NIB_HIGH( "mcu-3.bpr",  0x1800, 0x0400, 0xdf88e79b ) /* lsb */
1110 	ROM_LOAD_NIB_LOW ( "mcu-4.bpr",  0x1800, 0x0400, 0xa2094a7f )
1111 	ROM_LOAD_NIB_HIGH( "mcu-7.bpr",  0x1c00, 0x0400, 0x0cd30d49 )
1112 	ROM_LOAD_NIB_LOW ( "mcu-8.bpr",  0x1c00, 0x0400, 0x3379bbff )
1113 #endif
1114 
1115 	ROM_REGION( 0x0c000, REGION_GFX1 | REGIONFLAG_DISPOSE )	/* chars */
1116 	ROM_LOAD( "b02_07-1.rom",	0x00000, 0x04000, 0xe669f80e )
1117 	ROM_LOAD( "b02_06-1.rom",	0x04000, 0x04000, 0x5e53ae47 )
1118 	ROM_LOAD( "b02_05-1.rom",	0x08000, 0x04000, 0xa8b05bd0 )
1119 
1120 	ROM_REGION( 0x40000, REGION_GFX2 | REGIONFLAG_DISPOSE )	/* fg tiles */
1121 	ROM_LOAD( "b02_12.rom",		0x00000, 0x08000, 0x733b9997 )
1122 		/* 08000-0ffff not used */
1123 	ROM_LOAD( "b02_15.rom",		0x10000, 0x08000, 0x8b70ef32 )
1124 		/* 18000-1ffff not used */
1125 	ROM_LOAD( "b02_14.rom",		0x20000, 0x08000, 0xf711ba7d )
1126 		/* 28000-2ffff not used */
1127 	ROM_LOAD( "b02_13.rom",		0x30000, 0x08000, 0x62532cd3 )
1128 		/* 38000-3ffff not used */
1129 
1130 	ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )	/* bg tiles */
1131 	ROM_LOAD( "b02_08.rom",		0x00000, 0x08000, 0xef0cf49c )
1132 	ROM_LOAD( "b02_11.rom",		0x08000, 0x08000, 0xf5799422 )
1133 	ROM_LOAD( "b02_10.rom",		0x10000, 0x08000, 0x4bd099ff )
1134 	ROM_LOAD( "b02_09.rom",		0x18000, 0x08000, 0x230f1582 )
1135 
1136 	ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )	/* sprites */
1137 	ROM_LOAD( "b02_01.512",		0x00000, 0x10000, 0x2234b424 )
1138 	ROM_LOAD( "b02_02.512",		0x10000, 0x10000, 0x30d4c9a8 )
1139 	ROM_LOAD( "b02_03.512",		0x20000, 0x10000, 0x64f3d88f )
1140 	ROM_LOAD( "b02_04.512",		0x30000, 0x10000, 0x3b23a9fc )
1141 
1142 	ROM_REGION( 0x300, REGION_PROMS )	/* nibble bproms, lo/hi order to be determined */
1143 	ROM_LOAD( "clr2.bpr",	0x000, 0x100, 0x24e7d62f )	/* sprite priority control ?? */
1144 	ROM_LOAD( "clr1.bpr",	0x100, 0x100, 0xa50cef09 )	/* sprite priority control ?? */
1145 	ROM_LOAD( "clr3.bpr",	0x200, 0x100, 0x016fe2f7 )	/* ?? */
1146 ROM_END
1147 
1148 
1149 
1150 static void init_fshark(void)
1151 {
1152 	int A;
1153 	unsigned char datamsb;
1154 	unsigned char datalsb;
1155 
1156 	unsigned char *DSP_ROMS = memory_region(REGION_CPU3);
1157 
1158 	/* The ROM loader fixes the nibble images. Here we fix the byte ordering. */
1159 
1160 	for (A = 0;A < 0x0800;A++)
1161 	{
1162 		datamsb = DSP_ROMS[0x1000 + A];
1163 		datalsb = DSP_ROMS[0x1800 + A];
1164 		DSP_ROMS[(A*2)]   = datamsb;
1165 		DSP_ROMS[(A*2)+1] = datalsb;
1166 
1167 		DSP_ROMS[0x1000 + A] = 00;
1168 		DSP_ROMS[0x1800 + A] = 00;
1169 	}
1170 }
1171 
1172 
1173 
1174 GAME( 1987, twincobr, 0,        twincobr, twincobr, 0,      ROT270, "[Toaplan] Taito Corporation", "Twin Cobra (World)" )
1175 GAME( 1987, twincobu, twincobr, twincobr, twincobu, 0,      ROT270, "[Toaplan] Taito America Corporation (Romstar license)", "Twin Cobra (US)" )
1176 GAME( 1987, ktiger,   twincobr, twincobr, ktiger,   0,      ROT270, "[Toaplan] Taito Corporation", "Kyukyoku Tiger (Japan)" )
1177 GAME( 1987, fshark,   0,        twincobr, fshark,   fshark, ROT270, "[Toaplan] Taito Corporation", "Flying Shark (World)" )
1178 GAME( 1987, skyshark, fshark,   twincobr, skyshark, fshark, ROT270, "[Toaplan] Taito America Corporation (Romstar license)", "Sky Shark (US)" )
1179 GAME( 1987, hishouza, fshark,   twincobr, hishouza, fshark, ROT270, "[Toaplan] Taito Corporation", "Hishou Zame (Japan)" )
1180 GAME( 1987, fsharkbt, fshark,   twincobr, skyshark, fshark, ROT270, "bootleg", "Flying Shark (bootleg)" )
1181 
1182