1 /***************************************************************************
2 
3 Super Dodgeball / Nekketsu Koukou Dodgeball Bu
4 
5 briver by Paul Hampson and Nicola Salmoria
6 
7 TODO:
8 - sprite lag (the real game has quite a bit of lag too)
9 - rowscroll (not used expect for status display)
10 - double-tap tolerance
11 
12 Notes:
13 - there's probably a 63701 on the board, used for protection. It is checked
14   on startup and then just used to read the input ports. It doesn't return
15   the ports verbatim, it adds further processing, setting flags when the
16   player double-taps in one direction to run.(updated to edge-triggering)
17 
18 ***************************************************************************/
19 
20 #include "driver.h"
21 #include "vidhrdw/generic.h"
22 #include "cpu/m6809/m6809.h"
23 
24 
25 extern unsigned char *spdodgeb_videoram;
26 
27 PALETTE_INIT( spdodgeb );
28 VIDEO_START( spdodgeb );
29 VIDEO_UPDATE( spdodgeb );
30 INTERRUPT_GEN( spdodgeb_interrupt );
31 WRITE_HANDLER( spdodgeb_scrollx_lo_w );
32 WRITE_HANDLER( spdodgeb_ctrl_w );
33 WRITE_HANDLER( spdodgeb_videoram_w );
34 
35 
36 /* private globals */
37 static int toggle=0;//, soundcode = 0;
38 static int adpcm_pos[2],adpcm_end[2],adpcm_idle[2];
39 /* end of private globals */
40 
41 
WRITE_HANDLER(sound_command_w)42 static WRITE_HANDLER( sound_command_w )
43 {
44 	soundlatch_w(offset,data);
45 	cpu_set_irq_line(1,M6809_IRQ_LINE,HOLD_LINE);
46 }
47 
WRITE_HANDLER(spd_adpcm_w)48 static WRITE_HANDLER( spd_adpcm_w )
49 {
50 	int chip = offset & 1;
51 
52 	switch (offset/2)
53 	{
54 		case 3:
55 			adpcm_idle[chip] = 1;
56 			MSM5205_reset_w(chip,1);
57 			break;
58 
59 		case 2:
60 			adpcm_pos[chip] = (data & 0x7f) * 0x200;
61 			break;
62 
63 		case 1:
64 			adpcm_end[chip] = (data & 0x7f) * 0x200;
65 			break;
66 
67 		case 0:
68 			adpcm_idle[chip] = 0;
69 			MSM5205_reset_w(chip,0);
70 			break;
71 	}
72 }
73 
spd_adpcm_int(int chip)74 static void spd_adpcm_int(int chip)
75 {
76 	static int adpcm_data[2] = { -1, -1 };
77 
78 	if (adpcm_pos[chip] >= adpcm_end[chip] || adpcm_pos[chip] >= 0x10000)
79 	{
80 		adpcm_idle[chip] = 1;
81 		MSM5205_reset_w(chip,1);
82 	}
83 	else if (adpcm_data[chip] != -1)
84 	{
85 		MSM5205_data_w(chip,adpcm_data[chip] & 0x0f);
86 		adpcm_data[chip] = -1;
87 	}
88 	else
89 	{
90 		unsigned char *ROM = memory_region(REGION_SOUND1) + 0x10000 * chip;
91 
92 		adpcm_data[chip] = ROM[adpcm_pos[chip]++];
93 		MSM5205_data_w(chip,adpcm_data[chip] >> 4);
94 	}
95 }
96 
97 
98 static int mcu63701_command;
99 static int inputs[4];
100 
101 #if 0	// default - more sensitive (state change and timing measured on real board?)
102 static void mcu63705_update_inputs(void)
103 {
104 	static int running[2],jumped[2];
105 	int buttons[2];
106 	int p,j;
107 
108 	/* update running state */
109 	for (p = 0;p <= 1;p++)
110 	{
111 		static int prev[2][2],countup[2][2],countdown[2][2];
112 		int curr[2][2];
113 
114 		curr[p][0] = readinputport(2+p) & 0x01;
115 		curr[p][1] = readinputport(2+p) & 0x02;
116 
117 		for (j = 0;j <= 1;j++)
118 		{
119 			if (curr[p][j] == 0)
120 			{
121 				if (prev[p][j] != 0)
122 					countup[p][j] = 0;
123 				if (curr[p][j^1])
124 					countup[p][j] = 100;
125 				countup[p][j]++;
126 				running[p] &= ~(1 << j);
127 			}
128 			else
129 			{
130 				if (prev[p][j] == 0)
131 				{
132 					if (countup[p][j] < 10 && countdown[p][j] < 5)
133 						running[p] |= 1 << j;
134 					countdown[p][j] = 0;
135 				}
136 				countdown[p][j]++;
137 			}
138 		}
139 
140 		prev[p][0] = curr[p][0];
141 		prev[p][1] = curr[p][1];
142 	}
143 
144 	/* update jumping and buttons state */
145 	for (p = 0;p <= 1;p++)
146 	{
147 		static int prev[2];
148 		int curr[2];
149 
150 		curr[p] = readinputport(2+p) & 0x30;
151 
152 		if (jumped[p]) buttons[p] = 0;	/* jump only momentarily flips the buttons */
153 		else buttons[p] = curr[p];
154 
155 		if (buttons[p] == 0x30) jumped[p] = 1;
156 		if (curr[p] == 0x00) jumped[p] = 0;
157 
158 		prev[p] = curr[p];
159 	}
160 
161 	inputs[0] = readinputport(2) & 0xcf;
162 	inputs[1] = readinputport(3) & 0x0f;
163 	inputs[2] = running[0] | buttons[0];
164 	inputs[3] = running[1] | buttons[1];
165 }
166 #else	// alternate - less sensitive
mcu63705_update_inputs(void)167 static void mcu63705_update_inputs(void)
168 {
169 #define DBLTAP_TOLERANCE 5
170 
171 #define R 0x01
172 #define L 0x02
173 #define A 0x10
174 #define D 0x20
175 
176 	static UINT8 tapc[4] = {0,0,0,0};	// R1, R2, L1, L2
177 	static UINT8 last_port[2] = {0,0};
178 	static UINT8 last_dash[2] = {0,0};
179 	UINT8 curr_port[2];
180 	UINT8 curr_dash[2];
181 	int p;
182 
183 	for (p=0; p<=1; p++)
184 	{
185 		curr_port[p] = readinputport(p+2);
186 		curr_dash[p] = 0;
187 
188 		if (curr_port[p] & R)
189 		{
190 			if (!(last_port[p] & R))
191 			{
192 				if (tapc[p]) curr_dash[p] |= R; else tapc[p] = DBLTAP_TOLERANCE;
193 			}
194 			else if (last_dash[p] & R) curr_dash[p] |= R;
195 		}
196 		else if (curr_port[p] & L)
197 		{
198 			if (!(last_port[p] & L))
199 			{
200 				if (tapc[p+2]) curr_dash[p] |= L; else tapc[p+2] = DBLTAP_TOLERANCE;
201 			}
202 			else if (last_dash[p] & L) curr_dash[p] |= L;
203 		}
204 
205 		if (curr_port[p] & A && !(last_port[p] & A)) curr_dash[p] |= A;
206 		if (curr_port[p] & D && !(last_port[p] & D)) curr_dash[p] |= D;
207 
208 		last_port[p] = curr_port[p];
209 		last_dash[p] = curr_dash[p];
210 
211 		if (tapc[p  ]) tapc[p  ]--;
212 		if (tapc[p+2]) tapc[p+2]--;
213 	}
214 
215 	inputs[0] = curr_port[0] & 0xcf;
216 	inputs[1] = curr_port[1] & 0x0f;
217 	inputs[2] = curr_dash[0];
218 	inputs[3] = curr_dash[1];
219 
220 #undef DBLTAP_TOLERANCE
221 #undef R
222 #undef L
223 #undef A
224 #undef D
225 }
226 #endif
227 
READ_HANDLER(mcu63701_r)228 static READ_HANDLER( mcu63701_r )
229 {
230 //	logerror("CPU #0 PC %04x: read from port %02x of 63701 data address 3801\n",activecpu_get_pc(),offset);
231 
232 	if (mcu63701_command == 0) return 0x6a;
233 	else switch (offset)
234 	{
235 		default:
236 		case 0: return inputs[0];
237 		case 1: return inputs[1];
238 		case 2: return inputs[2];
239 		case 3: return inputs[3];
240 		case 4: return readinputport(4);
241 	}
242 }
243 
WRITE_HANDLER(mcu63701_w)244 static WRITE_HANDLER( mcu63701_w )
245 {
246 //	logerror("CPU #0 PC %04x: write %02x to 63701 control address 3800\n",activecpu_get_pc(),data);
247 	mcu63701_command = data;
248 	mcu63705_update_inputs();
249 }
250 
251 
READ_HANDLER(port_0_r)252 static READ_HANDLER( port_0_r )
253 {
254 	int port = readinputport(0);
255 
256 	toggle^=0x02;	/* mcu63701_busy flag */
257 
258 	return (port | toggle);
259 }
260 
261 
262 
MEMORY_READ_START(readmem)263 static MEMORY_READ_START( readmem )
264 	{ 0x0000, 0x0fff, MRA_RAM },
265 	{ 0x2000, 0x2fff, MRA_RAM },
266 	{ 0x3000, 0x3000, port_0_r },
267 	{ 0x3001, 0x3001, input_port_1_r },	/* DIPs */
268 	{ 0x3801, 0x3805, mcu63701_r },
269 	{ 0x4000, 0x7fff, MRA_BANK1 },
270 	{ 0x8000, 0xffff, MRA_ROM },
271 MEMORY_END
272 
273 static MEMORY_WRITE_START( writemem )
274 	{ 0x0000, 0x0fff, MWA_RAM },
275 	{ 0x1000, 0x10ff, MWA_RAM, &spriteram, &spriteram_size },
276 	{ 0x2000, 0x2fff, spdodgeb_videoram_w, &spdodgeb_videoram },
277 //	{ 0x3000, 0x3000, MWA_RAM },
278 //	{ 0x3001, 0x3001, MWA_RAM },
279 	{ 0x3002, 0x3002, sound_command_w },
280 //	{ 0x3003, 0x3003, MWA_RAM },
281 	{ 0x3004, 0x3004, spdodgeb_scrollx_lo_w },
282 //	{ 0x3005, 0x3005, MWA_RAM }, /* mcu63701_output_w */
283 	{ 0x3006, 0x3006, spdodgeb_ctrl_w },	/* scroll hi, flip screen, bank switch, palette select */
284 	{ 0x3800, 0x3800, mcu63701_w },
285 	{ 0x4000, 0xffff, MWA_ROM },
286 MEMORY_END
287 
288 static MEMORY_READ_START( sound_readmem )
289 	{ 0x0000, 0x0fff, MRA_RAM },
290 	{ 0x1000, 0x1000, soundlatch_r },
291 	{ 0x8000, 0xffff, MRA_ROM },
292 MEMORY_END
293 
294 static MEMORY_WRITE_START( sound_writemem )
295 	{ 0x0000, 0x0fff, MWA_RAM },
296 	{ 0x2800, 0x2800, YM3812_control_port_0_w },
297 	{ 0x2801, 0x2801, YM3812_write_port_0_w },
298 	{ 0x3800, 0x3807, spd_adpcm_w },
299 	{ 0x8000, 0xffff, MWA_ROM },
300 MEMORY_END
301 
302 
303 INPUT_PORTS_START( spdodgeb )
304 	PORT_START
305 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK )
306 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL )	/* mcu63701_busy flag */
307 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
308 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
309 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
310 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
311 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
312 	PORT_DIPSETTING(    0x80, "Easy")
313 	PORT_DIPSETTING(    0xc0, "Normal")
314 	PORT_DIPSETTING(    0x40, "Hard")
315 	PORT_DIPSETTING(    0x00, "Very Hard")
316 
317 	PORT_START
318 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
319 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
320 	PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
321 	PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
322 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
323 	PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
324 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
325 	PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
326 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_5C ) )
327 	PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
328 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
329 	PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
330 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
331 	PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
332 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
333 	PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
334 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
335 	PORT_DIPSETTING(    0x18, DEF_STR( 1C_5C ) )
336 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
337 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
338 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
339 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
340 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
341 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
342 
343 	PORT_START
344 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
345 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
346 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
347 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
348 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
349 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER1 )
350 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 )
351 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
352 
353 	PORT_START
354 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
355 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
356 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
357 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
358 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
359 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
360 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
361 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
362 
363 	PORT_START
364 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
365 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
366 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
367 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
368 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
369 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
370 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
371 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
372 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
373 	PORT_DIPNAME( 0x80, 0x00, "Allow Continue" )
374 	PORT_DIPSETTING(    0x80, DEF_STR( No ) )
375 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
376 INPUT_PORTS_END
377 
378 
379 
380 static struct GfxLayout charlayout =
381 {
382 	8,8,
383 	RGN_FRAC(1,1),
384 	4,
385 	{ 0, 2, 4, 6 },
386 	{ 1, 0, 64+1, 64+0, 128+1, 128+0, 192+1, 192+0 },
387 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
388 	32*8
389 };
390 
391 static struct GfxLayout spritelayout =
392 {
393 	16,16,
394 	RGN_FRAC(1,2),
395 	4,
396 	{ RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4, 0,4 },
397 	{ 3, 2, 1, 0, 16*8+3, 16*8+2, 16*8+1, 16*8+0,
398 		  32*8+3, 32*8+2, 32*8+1, 32*8+0, 48*8+3, 48*8+2, 48*8+1, 48*8+0 },
399 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
400 		  8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
401 	64*8
402 };
403 
404 static struct GfxDecodeInfo gfxdecodeinfo[] =
405 {
406 	{ REGION_GFX1, 0, &charlayout,   0x000, 32 },	/* colors 0x000-0x1ff */
407 	{ REGION_GFX2, 0, &spritelayout, 0x200, 32 },	/* colors 0x200-0x3ff */
408 	{ -1 } /* end of array */
409 };
410 
411 
irq_handler(int irq)412 static void irq_handler(int irq)
413 {
414 	cpu_set_irq_line(1,M6809_FIRQ_LINE,irq ? ASSERT_LINE : CLEAR_LINE);
415 }
416 
417 static struct YM3812interface ym3812_interface =
418 {
419 	1,			/* 1 chip */
420 	3000000, 	/* 3MHz ? */
421 	{ 100 },		/* volume */
422 	{ irq_handler }
423 };
424 
425 static struct MSM5205interface msm5205_interface =
426 {
427 	2,			/* 2 chips */
428 	384000,		/* 384KHz */
429 	{ spd_adpcm_int, spd_adpcm_int },	/* interrupt function */
430 	{ MSM5205_S48_4B, MSM5205_S48_4B },	/* 8kHz? */
431 	{ 50, 50 }	/* volume */
432 };
433 
434 
435 
436 static MACHINE_DRIVER_START( spdodgeb )
437 
438 	/* basic machine hardware */
439 	MDRV_CPU_ADD(M6502,12000000/6)	/* 2MHz ? */
440 	MDRV_CPU_MEMORY(readmem,writemem)
441 	MDRV_CPU_VBLANK_INT(spdodgeb_interrupt,33)	/* 1 IRQ every 8 visible scanlines, plus NMI for vblank */
442 
443 	MDRV_CPU_ADD(M6809,12000000/6)
444 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)	/* 2MHz ? */
445 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
446 
447 	MDRV_FRAMES_PER_SECOND(60)
448 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
449 
450 	/* video hardware */
451 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
452 	MDRV_SCREEN_SIZE(32*8, 32*8)
453 	MDRV_VISIBLE_AREA(1*8, 31*8-1, 1*8, 31*8-1)
454 	MDRV_GFXDECODE(gfxdecodeinfo)
455 	MDRV_PALETTE_LENGTH(1024)
456 	MDRV_COLORTABLE_LENGTH(1024)
457 
458 	MDRV_PALETTE_INIT(spdodgeb)
459 	MDRV_VIDEO_START(spdodgeb)
460 	MDRV_VIDEO_UPDATE(spdodgeb)
461 
462 	/* sound hardware */
463 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
464 	MDRV_SOUND_ADD(YM3812, ym3812_interface)
465 	MDRV_SOUND_ADD(MSM5205, msm5205_interface)
466 MACHINE_DRIVER_END
467 
468 
469 
470 ROM_START( spdodgeb )
471 	ROM_REGION( 0x18000, REGION_CPU1, 0 )
472 	ROM_LOAD( "22a-04.139",	  0x10000, 0x08000, CRC(66071fda) SHA1(4a239295900e6234a2a693321ca821671747a58e) )  /* Two banks */
473 	ROM_CONTINUE(             0x08000, 0x08000 )		 /* Static code */
474 
475 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* audio cpu */
476 	ROM_LOAD( "22j5-0.33",    0x08000, 0x08000, CRC(c31e264e) SHA1(0828a2094122e3934b784ec9ad7c2b89d91a83bb) )
477 
478 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* I/O mcu */
479 	ROM_LOAD( "63701.bin",    0xc000, 0x4000, NO_DUMP )	/* missing */
480 
481 	ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) /* text */
482 	ROM_LOAD( "22a-4.121",    0x00000, 0x20000, CRC(acc26051) SHA1(445224238cce420990894824d95447e3f63a9ef0) )
483 	ROM_LOAD( "22a-3.107",    0x20000, 0x20000, CRC(10bb800d) SHA1(265a3d67669034d17713b505ef55cd1c90f8d205) )
484 
485 	ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
486 	ROM_LOAD( "22a-1.2",      0x00000, 0x20000, CRC(3bd1c3ec) SHA1(40f61552ea6f7a81915fe3e13f75dc1dc69da33e) )
487 	ROM_LOAD( "22a-2.35",     0x20000, 0x20000, CRC(409e1be1) SHA1(35a77fc8fe6fc212734e2f452dbde9b8cf696f61) )
488 
489 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* adpcm samples */
490 	ROM_LOAD( "22j6-0.83",    0x00000, 0x10000, CRC(744a26e3) SHA1(519f22f1e5cc417cb8f9ced97e959d23c711283b) )
491 	ROM_LOAD( "22j7-0.82",    0x10000, 0x10000, CRC(2fa1de21) SHA1(e8c7af6057b64ecadd3473b82abd8e9f873082fd) )
492 
493 	ROM_REGION( 0x0800, REGION_PROMS, 0 )	/* color PROMs */
494 	ROM_LOAD( "mb7132e.158",  0x0000, 0x0400, CRC(7e623722) SHA1(e1fe60533237bd0aba5c8de9775df620ed5227c0) )
495 	ROM_LOAD( "mb7122e.159",  0x0400, 0x0400, CRC(69706e8d) SHA1(778ee88ff566aa38c80e0e61bb3fe8458f0e9450) )
496 ROM_END
497 
498 ROM_START( nkdodgeb )
499 	ROM_REGION( 0x18000, REGION_CPU1, 0 )
500 	ROM_LOAD( "12.bin",	      0x10000, 0x08000, CRC(aa674fd8) SHA1(4e8d3e07b54d23b221cb39cf10389bc7a56c4021) )  /* Two banks */
501 	ROM_CONTINUE(             0x08000, 0x08000 )		 /* Static code */
502 
503 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* audio cpu */
504 	ROM_LOAD( "22j5-0.33",    0x08000, 0x08000, CRC(c31e264e) SHA1(0828a2094122e3934b784ec9ad7c2b89d91a83bb) )
505 
506 	ROM_REGION( 0x10000, REGION_CPU3, 0 ) /* I/O mcu */
507 	ROM_LOAD( "63701.bin",    0xc000, 0x4000, NO_DUMP )	/* missing */
508 
509 	ROM_REGION( 0x40000, REGION_GFX1, ROMREGION_DISPOSE ) /* text */
510 	ROM_LOAD( "10.bin",       0x00000, 0x10000, CRC(442326fd) SHA1(e0e9e1dfdca3edd6e2522f55c191b40b81b8eaff) )
511 	ROM_LOAD( "11.bin",       0x10000, 0x10000, CRC(2140b070) SHA1(7a9d89eb6130b1dd21236fefaeb09a29c7f0d208) )
512 	ROM_LOAD( "9.bin",        0x20000, 0x10000, CRC(18660ac1) SHA1(be6a47eea9649d7b9ff8b30a4de643522c9869e6) )
513 	ROM_LOAD( "8.bin",        0x30000, 0x10000, CRC(5caae3c9) SHA1(f81a1c4ce2117d41e81542d417ff3573ea0f5313) )
514 
515 	ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
516 	ROM_LOAD( "2.bin",        0x00000, 0x10000, CRC(1271583e) SHA1(98a597f2be1abdac6c4de811cfa8a53549bc6904) )
517 	ROM_LOAD( "1.bin",        0x10000, 0x10000, CRC(5ae6cccf) SHA1(6bd385d6559b54c681d05eed2e91bfc2aa3e6844) )
518 	ROM_LOAD( "4.bin",        0x20000, 0x10000, CRC(f5022822) SHA1(fa67b1f70da80365f14776b712df6f656e603fb0) )
519 	ROM_LOAD( "3.bin",        0x30000, 0x10000, CRC(05a71179) SHA1(7e5ed81b37ac458d7a40e89f83f1efb742e797a8) )
520 
521 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* adpcm samples */
522 	ROM_LOAD( "22j6-0.83",    0x00000, 0x10000, CRC(744a26e3) SHA1(519f22f1e5cc417cb8f9ced97e959d23c711283b) )
523 	ROM_LOAD( "22j7-0.82",    0x10000, 0x10000, CRC(2fa1de21) SHA1(e8c7af6057b64ecadd3473b82abd8e9f873082fd) )
524 
525 	ROM_REGION( 0x0800, REGION_PROMS, 0 )	/* color PROMs */
526 	ROM_LOAD( "27s191.bin",  0x0000, 0x0800, CRC(317e42ea) SHA1(59caacc02fb7fb11604bd177f790fd68830ca7c1) )
527 	ROM_LOAD( "82s137.bin",  0x0400, 0x0400, CRC(6059f401) SHA1(280b1bda3a55f2d8c2fd4552c4dcec7100f0170f) )
528 ROM_END
529 
530 
531 
532 GAME( 1987, spdodgeb, 0,        spdodgeb, spdodgeb, 0, ROT0, "Technos", "Super Dodge Ball (US)" )
533 GAME( 1987, nkdodgeb, spdodgeb, spdodgeb, spdodgeb, 0, ROT0, "Technos", "Nekketsu Koukou Dodgeball Bu (Japan bootleg)" )
534