1 /***************************************************************************
2 
3 Pole Position    (c) 1982 Namco
4 Pole Position II (c) 1983 Namco
5 
6 driver by Ernesto Corvi, Juergen Buchmueller, Alex Pasadyn, Aaron Giles, Nicola Salmoria
7 
8 
9 Custom ICs:
10 ----------
11 CPU board:
12 06XX     interface to custom 5xXX
13 07XX     clock divider
14 08XX(x2) bus controller
15 10XX(x4) Z8002 bus controller
16 51XX     I/O
17 52XX     sample player
18 53XX     I/O
19 54XX     explosion sound generator
20 
21 Video board:
22 02XX(x3) gfx data shifter and mixer (16-bit in, 4-bit out)
23 03XX(x2) ?
24 04XX     sprite address generator
25 07XX     clock divider
26 09XX     address bus interface
27 
28 
29 Memory maps:
30 -----------
31 Part of the address decoding is done by PALs so it is inferred by program behaviour
32 
33 Z80:
34 
35 Address          Dir Data     Name      Description
36 ---------------- --- -------- --------- -----------------------
37 000xxxxxxxxxxxxx R   xxxxxxxx ROM 7H    program ROM
38 0010xxxxxxxxxxxx R   xxxxxxxx ROM 7F    program ROM
39 0011-xxxxxxxxxxx R/W xxxxxxxx CMOSRAMCS battery back-up RAM
40 010000xxxxxxxxxx R/W xxxxxxxx CSMB      work RAM                                      [1]
41 010000111xxxxxxx R/W xxxxxxxx           portion holding sprite registers (POSI)       [1]
42 010001xxxxxxxxxx R/W xxxxxxxx CSMD      work RAM                                      [1]
43 010001111xxxxxxx R/W xxxxxxxx           portion holding sprite registers (SIZE, DATA) [1]
44 01001xxxxxxxxxxx R/W xxxxxxxx RAM 3F    1st half is road, 2nd half alpha tilemap      [1]
45 01010xxxxxxxxxxx R/W xxxxxxxx RAM 3E    background tilemap (1st half only)            [1]
46 1000--xxxxxxxxxx R/W xxxxxxxx RAMCS     work RAM
47 1000--1111xxxxxx R/W xxxxxxxx           portion holding the sound registers
48 1001---0-------- R/W xxxxxxxx IODBENBL  custom 06XX data
49 1001---1-------- R/W xxxxxxxx IODBENBL  custom 06XX control
50 1010--00-------- R   -------x READY     +5V
51 1010--00-------- R   ------x- READY     128V
52 1010--00-------- R   -----x-- READY     PWRUP (power line sense)
53 1010--00-------- R   ----x--- READY     ADC0804 INTR (end flag)
54 1010--01-------- R            n.c.
55 1010--10-------- R            n.c.
56 1010--11-------- R            n.c.
57 1010--00-----000   W -------x IRQON     Z80 IRQ enable/acknowledge
58 1010--00-----001   W -------x IOSEL     reset 5xXX chips
59 1010--00-----010   W -------x CLSON     sound enable [2]
60 1010--00-----011   W -------x GASEL     accelerator/brake select
61 1010--00-----100   W -------x RESB      reset Z8002 #1
62 1010--00-----101   W -------x RESA      reset Z8002 #2
63 1010--00-----110   W -------x SB0       start (goes to 51XX start button input)
64 1010--00-----111   W -------x CHACL     alpha layer enable color and msb
65 1010--01--------   W -------- WDR       watchdog reset
66 1010--10--------   W -------x XSOUND    engine enable
67 1010--10--------   W --xxxxx- XSOUND    engine pitch lsb
68 1010--11--------   W --xxxxxx XSON      engine pitch msb
69 
70 [1] shared with the two Z8002, but the Z80 can only access the low 8 bits of these
71     16-bit areas
72 [2] affects wave and engine, but not 54XX and 52XX. Note that for the engine, this
73     clears the XSOUND and XSON latches.
74 
75 
76 Z80 I/O:
77 
78 Address          Dir Data     Name      Description
79 ---------------- --- -------- --------- -----------------------
80 ---------------- R   xxxxxxxx           ADC0804 (accelerator/brake pedals)
81 
82 
83 Z8002 #1:
84 
85 Address          Dir Data             Name      Description
86 ---------------- --- ---------------- --------- -----------------------
87 00xxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx ROM 4L/3L program ROM
88 01xxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx ROM 4K/3K program ROM
89 011-------------   W ---------------x NMIACKB   Z8002 #2 NVI enable/acknowledge [1]
90 the rest of the memory map is common to the other Z8002
91 
92 
93 Z8002 #2:
94 
95 Address          Dir Data             Name      Description
96 ---------------- --- ---------------- --------- -----------------------
97 00xxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx ROM 4E/3E program ROM
98 01xxxxxxxxxxxxx- R   xxxxxxxxxxxxxxxx ROM 4D/3D program ROM
99 011-------------   W ---------------x NMIACKA   Z8002 #1 NVI enable/acknowledge [1]
100 the rest of the memory map is common to the other Z8002
101 
102 [1] One Z8002 writes at $6000 and the other at $6002, but they did it only for clarity
103     because the low address bits are ignored and the location is not shared.
104 
105 
106 Z8002 (common):
107 
108 Address          Dir Data             Name      Description
109 ---------------- --- ---------------- --------- -----------------------
110 10000xxxxxxxxxx- R/W xxxxxxxxxxxxxxxx CSMA/CSMB work RAM
111 10000111xxxxxxx- R/W xxxxxxxxxxxxxxxx           portion holding sprite registers (POSI)
112 10001xxxxxxxxxx- R/W xxxxxxxxxxxxxxxx CSMC/CSMD work RAM
113 10001111xxxxxxx- R/W xxxxxxxxxxxxxxxx           portion holding sprite registers (SIZE, DATA)
114 1001xxxxxxxxxxx- R/W xxxxxxxxxxxxxxxx RAM 4F/3F 1st half is road, 2nd half alpha tilemap
115 1010xxxxxxxxxxx- R/W xxxxxxxxxxxxxxxx RAM 4E/3E background tilemap (1st half only)
116 11---000--------   W ------xxxxxxxxxx VHP       background horizontal position
117 11---001--------   W ----xxxxxxxxxxxx RVP       road vertical position
118 11---010--------   W                  n.c.
119 11---011--------   W                  n.c.
120 11---100--------   W                  n.c.
121 11---101--------   W                  n.c.
122 11---110--------   W                  n.c.
123 11---111--------   W                  n.c.
124 
125 
126 Namco vs Atari ROM names and locations
127 --------------------------------------
128 * = not present
129 
130 Location  ID (PP1)    ID (PP2)    Location  ID (PP1)                  ID (PP2)
131 --------  ----------  ----------  --------  ------------------------  ----------
132 CPU 8M    PP1-1       PP4-1       CPU 3L    136014-101                136014-176
133 CPU 8L    PP1-2       PP4-2       CPU 4L    136014-102                136014-177
134    ?      PP1-3*      PP4-3*      CPU 3K    136014-112*               *
135    ?      PP1-4*      PP4-4*      CPU 4K    136014-113*               *
136 CPU 4M    PP1-5       PP4-5       CPU 3E    136014-103                136014-178
137 CPU 4L    PP1-6       PP4-6       CPU 4E    136014-104                136014-179
138 CPU 3M    PP1-7*      PP4-7       CPU 3D    136014-114*               136014-184
139 CPU 3L    PP1-8*      PP4-8       CPU 4D    136014-115*               136014-185
140 CPU 6H    PP1-9       PP4-9       CPU 7H    136014-105 or 136014-160  136014-180
141 CPU 5H    PP1-10      PP4-10      CPU 7F    136014-116                136014-183
142 CPU 2E    PP1-11      <--         CPU 9C    136014-106 or 136014-147  <--
143 CPU 2F    PP1-12      <--         CPU 9A    136014-108*               *
144 CPU 1E    PP1-13      <--         CPU 8C    136014-107*               *
145 CPU 1F    PP1-14      <--         CPU 8A    136014-109*               *
146 CPU 6A    PP1-15      PP4-15      CPU 12F   136014-110 or 136014-148  136014-181
147 CPU 5A    PP1-16      PP4-16      CPU 12E   136014-111 or 136014-149  136014-182
148    ?      PP1-1[pal]  <--         CPU 5C    PAL-1                     <--
149    ?      PP1-2[pal]  <--         CPU 2N    PAL-1                     <--
150    ?      PP1-3[pal]  <--         CPU 7C    PAL-3                     <--
151 CPU 9H    PP1-4[bpr]  <--         CPU 7L    136014-117                <--
152    ?      PP1-5[bpr]  <--         CPU 11D   136014-118                <--
153 
154 VID 5N    PP1-17      <--         VID 13J   136014-119 == 136014-150  <--
155 VID 5M    PP1-18      <--         VID 12J   136014-120 == 136014-151  <--
156 VID 4N    PP1-19      <--         VID 13K   136014-121 or 136014-152  136014-166
157 VID 4M    PP1-20      <--         VID 12K   136014-122 or 136014-153  136014-167
158 VID 3N    PP1-21      <--         VID 13L   136014-123 or 136014-154  136014-168
159 VID 3M    PP1-22      <--         VID 12L   136014-124 or 136014-155  136014-169
160 VID 2N    PP1-23*     PP4-23      VID 13M   136014-129*               136014-175
161 VID 2M    PP1-24*     PP4-24      VID 12M   136014-130*               136014-174
162 VID 1N    PP1-25      PP4-25      VID 13N   136014-125 or 136014-156  136014-170
163 VID 1M    PP1-26      PP4-26      VID 12N   136014-126 or 136014-157  136014-171
164    ?      PP1-27      <--         VID 11N   136014-131                <--
165 VID 1F    PP1-28      PP4-28      VID 7N    136014-132 or 137205-001? 136014-172
166 VID 1E    PP1-29      PP4-29      VID 6N    136014-133 or 137205-001? 136014-173
167 VID 3A    PP1-30      <--         VID 2L    136014-127 == 136014-158  <--
168 VID 2A    PP1-31      <--         VID 2M    136014-128 == 136014-159  <--
169 VID 1A    PP1-32      <--         VID 2N    136014-134 or 137205-001? <--
170 VID 6M    PP1-6[bpr]  PP4-6[bpr]  VID 12H   136014-146                136014-192
171 VID 8L    PP1-7[bpr]  PP4-7[bpr]  VID 11E   136014-137                136014-186
172 VID 9L    PP1-8[bpr]  PP4-8[bpr]  VID 11D   136014-138                136014-187
173 VID 10L   PP1-9[bpr]  PP4-9[bpr]  VID 11C   136014-139                136014-188
174 VID 2H    PP1-10[bpr] PP4-10[bpr] VID 8M    136014-140                136014-189
175 VID 4D    PP1-11[bpr] PP4-11[bpr] VID 5K    136014-141                136014-190
176 VID 3C    PP1-12[bpr] PP4-12[bpr] VID 4L    136014-145                136014-191
177 VID 8E    PP1-13[bpr] <--         VID 6E    136014-135                <--
178 VID 9E    PP1-14[bpr] <--         VID 6D    136014-136                <--
179    ?      PP1-15[bpr] <--         VID 2D    136014-142                <--
180    ?      PP1-16[bpr] <--         VID 2C    136014-143                <--
181 VID 11A   PP1-17[bpr] <--         VID 2B    136014-144                <--
182 
183 
184 Notes:
185 -----
186 - Easter egg (both Pole Position and Pole Position II):
187   - enter service mode
188   - turn wheel to 04; change the shifter from LO to HI
189   - turn wheel to 45; change the shifter from LO to HI
190   - turn wheel to 55; change the shifter from LO to HI
191   - turn wheel to 56; change the shifter from LO to HI
192   - turn wheel to 91; change the shifter from LO to HI
193   (c) 1982 NAMCO LTD. will appear on the screen.
194 
195 - To reset the high score table, enter service mode, press the accelerator and
196   change the shifter from LO to HI
197 
198 - Pole Position II reports 'Manual Start' on the Test Mode. This is ok,
199   because they had to accomodate the hardware from Pole Position I to allow
200   track selection.
201 
202 - Change POLEPOS_TOGGLE to 0 if you are using the original gearshift.
203 
204 - The old version of the vertical scaling ROM, 136014-131, has (apart from
205   some irrelevant differences) one bad bit.
206   This seems to be a genuine error on Atari's part, since they replaced it with
207   136014-231 which matches Namco's PP1-27. The bad bit should cause a tiny gfx
208   glitch, though it's difficult to notice.
209 
210 
211 ***************************************************************************/
212 
213 #include "driver.h"
214 #include "machine/namcoio.h"
215 #include "sound/namco.h"
216 #include "sound/namco52.h"
217 #include "sound/namco54.h"
218 
219 
220 #define POLEPOS_TOGGLE	IPF_TOGGLE
221 
222 
223 /* from sndhrdw */
224 int polepos_sh_start(const struct MachineSound *msound);
225 void polepos_sh_stop(void);
226 WRITE_HANDLER( polepos_engine_sound_lsb_w );
227 WRITE_HANDLER( polepos_engine_sound_msb_w );
228 
229 /* from vidhrdw */
230 extern data16_t *polepos_view16_memory;
231 extern data16_t *polepos_road16_memory;
232 extern data16_t *polepos_alpha16_memory;
233 extern data16_t *polepos_sprite16_memory;
234 
235 VIDEO_START( polepos );
236 PALETTE_INIT( polepos );
237 VIDEO_UPDATE( polepos );
238 
239 WRITE16_HANDLER( polepos_view16_w );
240 WRITE16_HANDLER( polepos_road16_w );
241 WRITE16_HANDLER( polepos_alpha16_w );
242 WRITE16_HANDLER( polepos_sprite16_w );
243 WRITE_HANDLER( polepos_view_w );
244 WRITE_HANDLER( polepos_road_w );
245 WRITE_HANDLER( polepos_alpha_w );
246 WRITE_HANDLER( polepos_sprite_w );
247 WRITE_HANDLER( polepos_chacl_w );
248 
249 READ16_HANDLER( polepos_view16_r );
250 READ16_HANDLER( polepos_road16_r );
251 READ16_HANDLER( polepos_alpha16_r );
252 READ16_HANDLER( polepos_sprite16_r );
253 READ_HANDLER( polepos_view_r );
254 READ_HANDLER( polepos_road_r );
255 READ_HANDLER( polepos_alpha_r );
256 READ_HANDLER( polepos_sprite_r );
257 WRITE16_HANDLER( polepos_view16_hscroll_w );
258 WRITE16_HANDLER( polepos_road16_vscroll_w );
259 
260 
261 /*************************************************************************************/
262 /* Pole Position II protection														 */
263 /*************************************************************************************/
264 
READ16_HANDLER(polepos2_ic25_r)265 READ16_HANDLER( polepos2_ic25_r )
266 {
267 	int result;
268 	/* protection states */
269 	static INT16 last_result;
270 	static INT8 last_signed;
271 	static UINT8 last_unsigned;
272 
273 	offset = offset & 0x1ff;
274 	if (offset < 0x100)
275 	{
276 		last_signed = offset & 0xff;
277 		result = last_result & 0xff;
278 	}
279 	else
280 	{
281 		last_unsigned = offset & 0xff;
282 		result = (last_result >> 8) & 0xff;
283 		last_result = (INT8)last_signed * (UINT8)last_unsigned;
284 	}
285 
286 //	logerror("%04X: read IC25 @ %04X = %02X\n", activecpu_get_pc(), offset, result);
287 
288 	return result | (result << 8);
289 }
290 
291 
292 static int adc_input;
293 static int auto_start_mask;
294 
295 
READ_HANDLER(polepos_adc_r)296 static READ_HANDLER( polepos_adc_r )
297 {
298 	return readinputport(3 + adc_input);
299 }
300 
READ_HANDLER(polepos_ready_r)301 static READ_HANDLER( polepos_ready_r )
302 {
303 	int ret = 0xff;
304 
305 	if (cpu_getscanline() >= 128)
306 		ret ^= 0x02;
307 
308 	ret ^= 0x08; /* ADC End Flag */
309 
310 	return ret;
311 }
312 
313 
WRITE_HANDLER(polepos_latch_w)314 static WRITE_HANDLER( polepos_latch_w )
315 {
316 	int bit = data & 1;
317 
318 	switch (offset)
319 	{
320 		case 0x00:	/* IRQON */
321 			cpu_interrupt_enable(0,bit);
322 			if (!bit)
323 				cpu_set_irq_line(0, 0, CLEAR_LINE);
324 			break;
325 
326 		case 0x01:	/* IOSEL */
327 /*polepos_mcu_enable_w(offset,data); */
328 			break;
329 
330 		case 0x02:	/* CLSON */
331 			polepos_sound_enable(bit);
332 			if (!bit)
333 			{
334 				polepos_engine_sound_lsb_w(0,0);
335 				polepos_engine_sound_msb_w(0,0);
336 			}
337 			break;
338 
339 		case 0x03:	/* GASEL */
340 			adc_input = bit;
341 			break;
342 
343 		case 0x04:	/* RESB */
344 			cpu_set_reset_line(1,bit ? CLEAR_LINE : ASSERT_LINE);
345 			break;
346 
347 		case 0x05:	/* RESA */
348 			cpu_set_reset_line(2,bit ? CLEAR_LINE : ASSERT_LINE);
349 			break;
350 
351 		case 0x06:	/* SB0 */
352 			auto_start_mask = 0xfb | (bit << 2);
353 			break;
354 
355 		case 0x07:	/* CHACL */
356 			polepos_chacl_w(offset,data);
357 			break;
358 	}
359 }
360 
WRITE16_HANDLER(polepos_z8002_nvi_enable_w)361 static WRITE16_HANDLER( polepos_z8002_nvi_enable_w )
362 {
363 	int which = cpu_getactivecpu();
364 
365 	data &= 1;
366 
367 	cpu_interrupt_enable(which,data);
368 	if (!data)
369 		cpu_set_irq_line(which, 0, CLEAR_LINE);
370 }
371 
372 
READ_HANDLER(in0_l)373 static READ_HANDLER( in0_l )	{ return readinputport(0) & auto_start_mask; }	// fire and start buttons
READ_HANDLER(in0_h)374 static READ_HANDLER( in0_h )	{ return readinputport(0) >> 4; }	// coins
READ_HANDLER(dipA_l)375 static READ_HANDLER( dipA_l )	{ return readinputport(1); }		// dips A
READ_HANDLER(dipA_h)376 static READ_HANDLER( dipA_h )	{ return readinputport(1) >> 4; }	// dips A
READ_HANDLER(dipB_l)377 static READ_HANDLER( dipB_l )	{ return readinputport(2); }		// dips B
READ_HANDLER(dipB_h)378 static READ_HANDLER( dipB_h )	{ return readinputport(2) >> 4; }	// dips B
READ_HANDLER(in1_l)379 static READ_HANDLER( in1_l )	{ return readinputport(5); }		// wheel
READ_HANDLER(in1_h)380 static READ_HANDLER( in1_h )	{ return readinputport(5) >> 4; }	// wheel
WRITE_HANDLER(out_0)381 static WRITE_HANDLER( out_0 )
382 {
383 // no start lamps in pole position
384 //	set_led_status(1,data & 1);
385 //	set_led_status(0,data & 2);
386 	coin_counter_w(1,~data & 4);
387 	coin_counter_w(0,~data & 8);
388 }
WRITE_HANDLER(out_1)389 static WRITE_HANDLER( out_1 )
390 {
391 	coin_lockout_global_w(data & 1);
392 }
393 
394 static struct namcoio_interface intf0 =
395 {
396 	{ in0_l, in0_h, dipB_l, dipB_h },	/* port read handlers */
397 	{ out_0, out_1 }					/* port write handlers */
398 };
399 static struct namcoio_interface intf1 =
400 {
401 	{ in1_l, in1_h, dipA_l, dipA_h, },	/* port read handlers */
402 	{ NULL, NULL }						/* port write handlers */
403 };
404 
405 
406 #include "cpu/z8000/z8000.h"
MACHINE_INIT(polepos)407 static MACHINE_INIT( polepos )
408 {
409 	int i;
410 
411 	/* Reset all latches */
412 	for (i = 0;i < 8;i++)
413 		polepos_latch_w(i,0);
414 
415 	namco_06xx_init(0, 0,
416 		NAMCOIO_51XX, &intf0,
417 		NAMCOIO_53XX_POLEPOS, &intf1,
418 		NAMCOIO_52XX, NULL,
419 		NAMCOIO_54XX, NULL);
420 
421 	/* set the interrupt vectors (this shouldn't be needed) */
422 	cpu_irq_line_vector_w(1, 0, Z8000_NVI);
423 	cpu_irq_line_vector_w(2, 0, Z8000_NVI);
424 }
425 
426 
427 
428 /*********************************************************************
429  * CPU memory structures
430  *********************************************************************/
431 
MEMORY_READ_START(z80_readmem)432 static MEMORY_READ_START( z80_readmem )
433     { 0x0000, 0x2fff, MRA_ROM },
434 	{ 0x3000, 0x37ff, MRA_RAM },	                    /* Battery Backup */
435 	{ 0x4000, 0x47ff, polepos_sprite_r },				/* Motion Object */
436 	{ 0x4800, 0x4bff, polepos_road_r }, 				/* Road Memory */
437 	{ 0x4c00, 0x4fff, polepos_alpha_r },				/* Alphanumeric (char ram) */
438     { 0x5000, 0x57ff, polepos_view_r }, 				/* Background Memory */
439 	{ 0x8000, 0x83ff, MRA_RAM },						/* Sound Memory */
440 	{ 0x9000, 0x90ff, namco_06xx_0_data_r },
441 	{ 0x9100, 0x9100, namco_06xx_0_ctrl_r },
442 	{ 0xa000, 0xa000, polepos_ready_r },				/* READY */
443 MEMORY_END
444 
445 static MEMORY_WRITE_START( z80_writemem )
446     { 0x0000, 0x2fff, MWA_ROM },
447 	{ 0x3000, 0x37ff, MWA_RAM, &generic_nvram, &generic_nvram_size },	/* Battery Backup */
448 	{ 0x4000, 0x47ff, polepos_sprite_w },				/* Motion Object */
449 	{ 0x4800, 0x4bff, polepos_road_w },				/* Road Memory */
450 	{ 0x4c00, 0x4fff, polepos_alpha_w },				/* Alphanumeric (char ram) */
451 	{ 0x5000, 0x57ff, polepos_view_w },				/* Background Memory */
452 	{ 0x8000, 0x83bf, MWA_RAM },						/* Sound Memory */
453 	{ 0x83c0, 0x83ff, polepos_sound_w, &polepos_soundregs }, /* Sound data */
454 	{ 0x9000, 0x90ff, namco_06xx_0_data_w },
455 	{ 0x9100, 0x9100, namco_06xx_0_ctrl_w },
456 	{ 0xa000, 0xa007, polepos_latch_w },				/* misc latches */
457 	{ 0xa100, 0xa100, watchdog_reset_w },				/* Watchdog */
458 	{ 0xa200, 0xa200, polepos_engine_sound_lsb_w }, 	/* Car Sound ( Lower Nibble ) */
459 	{ 0xa300, 0xa300, polepos_engine_sound_msb_w },	/* Car Sound ( Upper Nibble ) */
460 MEMORY_END
461 
462 static PORT_READ_START( z80_readport )
463     { 0x00, 0x00, polepos_adc_r },
464 PORT_END
465 
466 static PORT_WRITE_START( z80_writeport )
467     { 0x00, 0x00, MWA_NOP },
468 PORT_END
469 
470 
471 /* the same memory map is used by both Z8002 CPUs; all RAM areas are shared */
472 static MEMORY_READ16_START( z8002_readmem )
473     { 0x0000, 0x7fff, MRA16_ROM },
474 	{ 0x8000, 0x8fff, polepos_sprite16_r },	/* Motion Object */
475 	{ 0x9000, 0x97ff, polepos_road16_r },		/* Road Memory */
476 	{ 0x9800, 0x9fff, polepos_alpha16_r }, 	/* Alphanumeric (char ram) */
477 	{ 0xa000, 0xafff, polepos_view16_r },		/* Background memory */
478 MEMORY_END
479 
480 /* the same memory map is used by both Z8002 CPUs; all RAM areas are shared */
481 static MEMORY_WRITE16_START( z8002_writemem )
482         { 0x6000, 0x6003, polepos_z8002_nvi_enable_w },	/* NVI enable - *NOT* shared by the two CPUs */
483         { 0x0000, 0x7fff, MWA16_ROM },
484 	{ 0x8000, 0x8fff, polepos_sprite16_w, &polepos_sprite16_memory },	/* Motion Object */
485 	{ 0x9000, 0x97ff, polepos_road16_w, &polepos_road16_memory },	/* Road Memory */
486 	{ 0x9800, 0x9fff, polepos_alpha16_w, &polepos_alpha16_memory },	/* Alphanumeric (char ram) */
487 	{ 0xa000, 0xafff, polepos_view16_w, &polepos_view16_memory },	/* Background memory */
488 	{ 0xc000, 0xc001, polepos_view16_hscroll_w },					/* Background horz scroll position */
489 	{ 0xc100, 0xc101, polepos_road16_vscroll_w },						/* Road vertical position */
490 MEMORY_END
491 
492 
493 
494 /*********************************************************************
495  * Input port definitions
496  *********************************************************************/
497 
498 INPUT_PORTS_START( polepos )
499 	PORT_START
500 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
501 	PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | POLEPOS_TOGGLE, "Gear Change", KEYCODE_SPACE, IP_JOY_DEFAULT ) /* Gear */
502 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )	// start 1, program controlled
503 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
504 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
505 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
506 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
507 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
508 
509 	PORT_START	/* DSW A */
510 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
511 	PORT_DIPSETTING(	0x05, DEF_STR( 3C_1C ) )
512 	PORT_DIPSETTING(	0x03, DEF_STR( 2C_1C ) )
513 	PORT_DIPSETTING(	0x07, DEF_STR( 1C_1C ) )
514 	PORT_DIPSETTING(	0x04, DEF_STR( 2C_3C ) )
515 	PORT_DIPSETTING(	0x06, DEF_STR( 1C_2C ) )
516 	PORT_DIPSETTING(	0x02, DEF_STR( 1C_3C ) )
517 	PORT_DIPSETTING(	0x00, DEF_STR( 1C_5C ) )
518 	PORT_DIPSETTING(	0x01, DEF_STR( 1C_6C ) )
519 	PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
520 	PORT_DIPSETTING(	0x10, DEF_STR( 2C_1C ) )
521 	PORT_DIPSETTING(	0x18, DEF_STR( 1C_1C ) )
522 	PORT_DIPSETTING(	0x00, DEF_STR( 2C_3C ) )
523 	PORT_DIPSETTING(	0x08, DEF_STR( 1C_2C ) )
524 	PORT_DIPNAME( 0x60, 0x60, "Game Time" )
525 	PORT_DIPSETTING(	0x60, "90 secs." )
526 	PORT_DIPSETTING(	0x20, "100 secs." )
527 	PORT_DIPSETTING(	0x40, "110 secs." )
528 	PORT_DIPSETTING(	0x00, "120 secs." )
529 	PORT_DIPNAME( 0x80, 0x80, "Nr. of Laps" )
530 	PORT_DIPSETTING(	0x80, "3" )
531 	PORT_DIPSETTING(	0x00, "4" )
532 
533 	PORT_START	/* DSW B */
534 	PORT_DIPNAME( 0x07, 0x07, "Extended Rank" )
535 	PORT_DIPSETTING(	0x07, "A" )
536 	PORT_DIPSETTING(	0x03, "B" )
537 	PORT_DIPSETTING(	0x05, "C" )
538 	PORT_DIPSETTING(	0x01, "D" )
539 	PORT_DIPSETTING(	0x06, "E" )
540 	PORT_DIPSETTING(	0x02, "F" )
541 	PORT_DIPSETTING(	0x04, "G" )
542 	PORT_DIPSETTING(	0x00, "H" )
543 	PORT_DIPNAME( 0x38, 0x38, "Practice Rank" )
544 	PORT_DIPSETTING(	0x38, "A" )
545 	PORT_DIPSETTING(	0x18, "B" )
546 	PORT_DIPSETTING(	0x28, "C" )
547 	PORT_DIPSETTING(	0x08, "D" )
548 	PORT_DIPSETTING(	0x30, "E" )
549 	PORT_DIPSETTING(	0x10, "F" )
550 	PORT_DIPSETTING(	0x20, "G" )
551 	PORT_DIPSETTING(	0x00, "H" )
552 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
553 	PORT_DIPSETTING(	0x40, DEF_STR( Off) )
554 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
555 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
556 	PORT_DIPSETTING(	0x80, DEF_STR( Off ))
557 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
558 
559 	PORT_START /* IN1 - Brake */
560 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL2, 100, 16, 0, 0x90, KEYCODE_LALT, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
561 
562 	PORT_START /* IN2 - Accel */
563 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL, 100, 16, 0, 0x90, KEYCODE_LCONTROL, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
564 
565 	PORT_START /* IN3 - Steering */
566 	PORT_ANALOG ( 0xff, 0x00, IPT_DIAL, 30, 4, 0, 0 )
567 INPUT_PORTS_END
568 
569 
570 INPUT_PORTS_START( poleposa )
571 	PORT_START
572 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
573 	PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | POLEPOS_TOGGLE, "Gear Change", KEYCODE_SPACE, IP_JOY_DEFAULT ) /* Gear */
574 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )	// start 1, program controlled
575 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
576 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
577 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
578 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
579 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
580 
581 	PORT_START	/* DSW A */
582 	PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
583 	PORT_DIPSETTING(	0xc0, DEF_STR( 3C_1C ) )
584 	PORT_DIPSETTING(	0x20, DEF_STR( 2C_1C ) )
585 	PORT_DIPSETTING(	0x40, DEF_STR( 3C_2C ) )
586 	PORT_DIPSETTING(	0x80, DEF_STR( 4C_3C ) )
587 	PORT_DIPSETTING(	0xe0, DEF_STR( 1C_1C ) )
588 	PORT_DIPSETTING(	0x60, DEF_STR( 1C_2C ) )
589 	PORT_DIPSETTING(	0xa0, DEF_STR( 1C_3C ) )
590 	PORT_DIPSETTING(	0x00, DEF_STR( Free_Play ) )
591 	PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
592 	PORT_DIPSETTING(	0x08, DEF_STR( 2C_1C ) )
593 	PORT_DIPSETTING(	0x10, DEF_STR( 3C_2C ) )
594 	PORT_DIPSETTING(	0x00, DEF_STR( 4C_3C ) )
595 	PORT_DIPSETTING(	0x18, DEF_STR( 1C_1C ) )
596 	PORT_DIPNAME( 0x06, 0x06, "Game Time" )
597 	PORT_DIPSETTING(	0x06, "90 secs." )
598 	PORT_DIPSETTING(	0x02, "100 secs." )
599 	PORT_DIPSETTING(	0x04, "110 secs." )
600 	PORT_DIPSETTING(	0x00, "120 secs." )
601 	PORT_DIPNAME( 0x01, 0x01, "Nr. of Laps" )
602 	PORT_DIPSETTING(	0x01, "3" )
603 	PORT_DIPSETTING(	0x00, "4" )
604 
605 	PORT_START	/* DSW B */
606 	PORT_DIPNAME( 0xe0, 0xe0, "Practice Rank" )
607 	PORT_DIPSETTING(	0xe0, "A" )
608 	PORT_DIPSETTING(	0x60, "B" )
609 	PORT_DIPSETTING(	0xa0, "C" )
610 	PORT_DIPSETTING(	0x20, "D" )
611 	PORT_DIPSETTING(	0xc0, "E" )
612 	PORT_DIPSETTING(	0x40, "F" )
613 	PORT_DIPSETTING(	0x80, "G" )
614 	PORT_DIPSETTING(	0x00, "H" )
615 	PORT_DIPNAME( 0x1c, 0x1c, "Extended Rank" )
616 	PORT_DIPSETTING(	0x1c, "A" )
617 	PORT_DIPSETTING(	0x0c, "B" )
618 	PORT_DIPSETTING(	0x14, "C" )
619 	PORT_DIPSETTING(	0x04, "D" )
620 	PORT_DIPSETTING(	0x18, "E" )
621 	PORT_DIPSETTING(	0x08, "F" )
622 	PORT_DIPSETTING(	0x10, "G" )
623 	PORT_DIPSETTING(	0x00, "H" )
624 	PORT_DIPNAME( 0x02, 0x02, "Speed Unit" )
625 	PORT_DIPSETTING(	0x00, "mph" )
626 	PORT_DIPSETTING(	0x02, "km/h" )
627 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
628 	PORT_DIPSETTING(	0x01, DEF_STR( Off ))
629 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
630 
631 	PORT_START /* IN1 - Brake */
632 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL2, 100, 16, 0, 0x90, KEYCODE_LALT, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
633 
634 	PORT_START /* IN2 - Accel */
635 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL, 100, 16, 0, 0x90, KEYCODE_LCONTROL, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
636 
637 	PORT_START /* IN3 - Steering */
638 	PORT_ANALOG ( 0xff, 0x00, IPT_DIAL, 30, 4, 0, 0 )
639 INPUT_PORTS_END
640 
641 
642 INPUT_PORTS_START( polepos2 )
643 	PORT_START
644 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
645 	PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | POLEPOS_TOGGLE, "Gear Change", KEYCODE_SPACE, IP_JOY_DEFAULT ) /* Gear */
646 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL )	// start 1, program controlled
647 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
648 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
649 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
650 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
651 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
652 
653 	PORT_START	/* DSW A */
654 	PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_A ) )
655 	PORT_DIPSETTING(	0xc0, DEF_STR( 3C_1C ) )
656 	PORT_DIPSETTING(	0x20, DEF_STR( 2C_1C ) )
657 	PORT_DIPSETTING(	0x40, DEF_STR( 3C_2C ) )
658 	PORT_DIPSETTING(	0x80, DEF_STR( 4C_3C ) )
659 	PORT_DIPSETTING(	0xe0, DEF_STR( 1C_1C ) )
660 	PORT_DIPSETTING(	0x60, DEF_STR( 1C_2C ) )
661 	PORT_DIPSETTING(	0xa0, DEF_STR( 1C_3C ) )
662 	PORT_DIPSETTING(	0x00, DEF_STR( Free_Play ) )
663 	PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coin_B ) )
664 	PORT_DIPSETTING(	0x08, DEF_STR( 2C_1C ) )
665 	PORT_DIPSETTING(	0x10, DEF_STR( 3C_2C ) )
666 	PORT_DIPSETTING(	0x00, DEF_STR( 4C_3C ) )
667 	PORT_DIPSETTING(	0x18, DEF_STR( 1C_1C ) )
668 	PORT_DIPNAME( 0x04, 0x04, "Speed Unit" )
669 	PORT_DIPSETTING(	0x00, "mph" )
670 	PORT_DIPSETTING(	0x04, "km/h" )
671 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
672 	PORT_DIPSETTING(	0x00, DEF_STR( Off ))
673 	PORT_DIPSETTING(	0x02, DEF_STR( On ) )
674 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )	/* docs say "freeze", but it doesn't seem to work */
675 	PORT_DIPSETTING(	0x01, DEF_STR( Off ))
676 	PORT_DIPSETTING(	0x00, DEF_STR( On ) )
677 
678 	PORT_START	/* DSW B */
679 	PORT_DIPNAME( 0x80, 0x80, "Game Time" )
680 	PORT_DIPSETTING(	0x80, "90 secs." )
681 	PORT_DIPSETTING(	0x00, "120 secs." )
682 	PORT_DIPNAME( 0x60, 0x60, "Practice Rank" )
683 	PORT_DIPSETTING(	0x20, "A" )
684 	PORT_DIPSETTING(	0x60, "B" )
685 	PORT_DIPSETTING(	0x40, "C" )
686 	PORT_DIPSETTING(	0x00, "D" )
687 	PORT_DIPNAME( 0x18, 0x18, "Extended Rank" )
688 	PORT_DIPSETTING(	0x08, "A" )
689 	PORT_DIPSETTING(	0x18, "B" )
690 	PORT_DIPSETTING(	0x10, "C" )
691 	PORT_DIPSETTING(	0x00, "D" )
692 	PORT_DIPNAME( 0x06, 0x06, "Goal" )
693 	PORT_DIPSETTING(	0x02, "3" )
694 	PORT_DIPSETTING(	0x06, "4" )
695 	PORT_DIPSETTING(	0x04, "5" )
696 	PORT_DIPSETTING(	0x00, "6" )
697 	PORT_DIPNAME( 0x01, 0x01, "Speed" )
698 	PORT_DIPSETTING(	0x01, "Average" )
699 	PORT_DIPSETTING(	0x00, "High" )
700 
701 	PORT_START /* IN1 - Brake */
702 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL2, 100, 16, 0, 0x90, KEYCODE_LALT, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
703 
704 	PORT_START /* IN2 - Accel */
705 	PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL, 100, 16, 0, 0x90, KEYCODE_LCONTROL, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )
706 
707 	PORT_START /* IN3 - Steering */
708 	PORT_ANALOG ( 0xff, 0x00, IPT_DIAL, 30, 4, 0, 0 )
709 INPUT_PORTS_END
710 
711 
712 
713 /*********************************************************************
714  * Graphics layouts
715  *********************************************************************/
716 
717 static struct GfxLayout charlayout_2bpp =
718 {
719 	8,8,
720 	RGN_FRAC(1,1),
721 	2,
722 	{ 0, 4 },
723 	{ 0, 1, 2, 3, 8*8+0, 8*8+1, 8*8+2, 8*8+3 },
724 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
725 	8*8*2
726 };
727 
728 static struct GfxLayout bigspritelayout =
729 {
730 	32,32,
731 	RGN_FRAC(1,2),
732 	4,
733 	{ 0, 4, RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+4 },
734 	{  0,  1,  2,  3,  8,  9, 10, 11,
735 	  16, 17, 18, 19, 24, 25, 26, 27,
736 	  32, 33, 34, 35, 40, 41, 42, 43,
737 	  48, 49, 50, 51, 56, 57, 58, 59},
738 	{  0*64,  1*64,  2*64,	3*64,  4*64,  5*64,  6*64,	7*64,
739 		8*64,  9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64,
740 	  16*64, 17*64, 18*64, 19*64, 20*64, 21*64, 22*64, 23*64,
741 	  24*64, 25*64, 26*64, 27*64, 28*64, 29*64, 30*64, 31*64 },
742 	32*64
743 };
744 
745 static struct GfxLayout smallspritelayout =
746 {
747 	16,16,
748 	RGN_FRAC(1,2),
749 	4,
750 	{ 0, 4, RGN_FRAC(1,2), RGN_FRAC(1,2)+4
751 	},
752 	{  0,  1,  2,  3,  8,  9, 10, 11,
753 	  16, 17, 18, 19, 24, 25, 26, 27 },
754 	{ 0*32,  1*32,  2*32,  3*32,  4*32,  5*32,  6*32,  7*32,
755 	  8*32,	 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
756 	16*32
757 };
758 
759 static struct GfxDecodeInfo gfxdecodeinfo[] =
760 {
761 	{ REGION_GFX1, 0, &charlayout_2bpp,   0x0000, 128 },
762 	{ REGION_GFX2, 0, &charlayout_2bpp,   0x0200,  64 },
763 	{ REGION_GFX3, 0, &smallspritelayout, 0x0300, 128 },
764 	{ REGION_GFX4, 0, &bigspritelayout,   0x0300, 128 },
765 	{ -1 } /* end of array */
766 };
767 
768 
769 /*********************************************************************
770  * Sound interfaces
771  *********************************************************************/
772 
773 static struct namco_interface namco_interface =
774 {
775 	24576000/512, 	/* sample rate */
776 	8,				/* number of voices */
777 	100, 			/* playback volume */
778 	REGION_SOUND1,	/* memory region */
779 	1				/* stereo */
780 };
781 
782 static struct namco_52xx_interface namco_52xx_interface =
783 {
784 	24576000/16,	/* 1.536 MHz */
785 	25,				/* volume */
786 	REGION_SOUND3	/* memory region */
787 };
788 
789 static struct namco_54xx_interface namco_54xx_interface =
790 {
791 	24576000/16,		/* 1.536 MHz */
792 	{ 100, 100, 100 }	/* volume of the three outputs */
793 };
794 
795 static struct CustomSound_interface custom_interface =
796 {
797 	polepos_sh_start,
798 	polepos_sh_stop,
799 	NULL
800 };
801 
802 static const char *polepos_sample_names[] =
803 {
804 	"*polepos",
805 	"pp2_17.wav",
806 	"pp2_18.wav",
807 	0	/* end of array */
808 };
809 
810 static struct Samplesinterface samples_interface =
811 {
812 	2,	/* 2 channels */
813 	40, /* volume */
814 	polepos_sample_names
815 };
816 
817 
818 
819 /*********************************************************************
820  * Machine driver
821  *********************************************************************/
822 
823 static MACHINE_DRIVER_START( polepos )
824 
825 	/* basic machine hardware */
826 	MDRV_CPU_ADD(Z80, 24576000/8)	/* 3.072 MHz */
MDRV_CPU_MEMORY(z80_readmem,z80_writemem)827 	MDRV_CPU_MEMORY(z80_readmem,z80_writemem)
828 	MDRV_CPU_PORTS(z80_readport,z80_writeport)
829 	MDRV_CPU_VBLANK_INT(irq0_line_assert,2)	/* 64V */
830 
831 	MDRV_CPU_ADD(Z8000, 24576000/8)	/* 3.072 MHz */
832 	MDRV_CPU_MEMORY(z8002_readmem,z8002_writemem)
833 	MDRV_CPU_VBLANK_INT(irq0_line_assert,1)
834 
835 	MDRV_CPU_ADD(Z8000, 24576000/8)	/* 3.072 MHz */
836 	MDRV_CPU_MEMORY(z8002_readmem,z8002_writemem)
837 	MDRV_CPU_VBLANK_INT(irq0_line_assert,1)
838 
839 	MDRV_FRAMES_PER_SECOND(60.606060)
840 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
841 	MDRV_INTERLEAVE(100)	/* some interleaving */
842 
843 	MDRV_MACHINE_INIT(polepos)
844 	MDRV_NVRAM_HANDLER(generic_1fill)
845 
846 	/* video hardware */
847 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
848 	MDRV_SCREEN_SIZE(32*8, 32*8)
849 	MDRV_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
850 	MDRV_GFXDECODE(gfxdecodeinfo)
851 	MDRV_PALETTE_LENGTH(128)
852 	MDRV_COLORTABLE_LENGTH(0x0f00)
853 
854 	MDRV_PALETTE_INIT(polepos)
855 	MDRV_VIDEO_START(polepos)
856 	MDRV_VIDEO_UPDATE(polepos)
857 
858 	/* sound hardware */
859 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
860 	MDRV_SOUND_ADD(NAMCO_15XX, namco_interface)
861 	MDRV_SOUND_ADD(NAMCO_52XX, namco_52xx_interface)
862 	MDRV_SOUND_ADD(NAMCO_54XX, namco_54xx_interface)
863 	MDRV_SOUND_ADD(CUSTOM, custom_interface)
864 	MDRV_SOUND_ADD(SAMPLES, samples_interface)
865 MACHINE_DRIVER_END
866 
867 
868 /*********************************************************************
869  * ROM definitions
870  *********************************************************************/
871 
872 ROM_START( polepos )
873 	/* Z80 memory/ROM data */
874 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
875 	ROM_LOAD( "pp1_9b.6h",    0x0000, 0x2000, CRC(94436b70) SHA1(7495c2a8c3928c59146760d19e672afee01c5b17) )
876 	ROM_LOAD( "136014.116",   0x2000, 0x1000, CRC(7174bcb7) SHA1(460326a6cea201db2df813013c95562a222ea95d) )
877 
878 	/* Z8002 #1 memory/ROM data */
879 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
880 	ROM_LOAD16_BYTE( "pp1_1b.8m",     0x0001, 0x2000, CRC(361c56dd) SHA1(6e4abf98b10077c6980e8aa3861f0233135ea68f) )
881 	ROM_LOAD16_BYTE( "pp1_2b.8l",     0x0000, 0x2000, CRC(582b530a) SHA1(4fc38aa8b70816e14b321ec778090f6c7e7f1640) )
882 
883 	/* Z8002 #2 memory/ROM data */
884 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
885 	ROM_LOAD16_BYTE( "pp1_5b.4m",     0x0001, 0x2000, CRC(5cdf5294) SHA1(dbdf327a541fd71aadafda9c925fa4cf7f7c4a24) )
886 	ROM_LOAD16_BYTE( "pp1_6b.4l",     0x0000, 0x2000, CRC(81696272) SHA1(27041a7c24297a6f317537c44922b51d2b2278a6) )
887 
888 	/* graphics data */
889 	ROM_REGION( 0x01000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
890 	ROM_LOAD( "pp1_28.1f",     0x0000, 0x1000, CRC(5b277daf) SHA1(0b1feeb2c0c63a5db5ba9b0115aa1b2388636a70) )
891 
892 	ROM_REGION( 0x01000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
893 	ROM_LOAD( "pp1_29.1e",     0x0000, 0x1000, CRC(706e888a) SHA1(af1aa2199fcf73a3afbe760857ff117865350954) )
894 
895 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
896 	ROM_LOAD( "pp1_25.1n",     0x0000, 0x2000, CRC(ac8e28c1) SHA1(13bc2bf4be28d9ae987f79034f9532272b3a2543) )    /* 4bpp sm sprites, planes 0+1 */
897 	ROM_LOAD( "pp1_26.1m",     0x2000, 0x2000, CRC(94443079) SHA1(413d7b762c8dff541675e96874be6ee0251d3581) )    /* 4bpp sm sprites, planes 2+3 */
898 
899 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
900 	ROM_LOAD( "136014.150",   0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
901 	ROM_LOAD( "pp1_19.4n",    0x2000, 0x2000, CRC(43ff83e1) SHA1(8f830549a629b019125e59801e5027e4e4b3c0f2) )
902 	ROM_LOAD( "pp1_21.3n",    0x4000, 0x2000, CRC(5f958eb4) SHA1(b56d84e5e5e0ddeb0e71851ba66e5fa1b1409551) )
903 	ROM_LOAD( "136014.151",   0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
904 	ROM_LOAD( "pp1_20.4m",    0xa000, 0x2000, CRC(ec18075b) SHA1(af7be549c5fa47551a8dca4c0a531552147fa50f) )
905 	ROM_LOAD( "pp1_22.3m",    0xc000, 0x2000, CRC(1d2f30b1) SHA1(1d88a3069e9b15febd2835dd63e5511b3b2a6b45) )
906 
907 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
908 	ROM_LOAD( "136014.158",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
909 	ROM_LOAD( "136014.159",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
910 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
911 
912 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
913 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
914 
915 	/* graphics (P)ROM data */
916 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
917 	ROM_LOAD( "136014.137",   0x0000, 0x0100, CRC(f07ff2ad) SHA1(e1f3cb10a03d23f8c1d422acf271dba4e7b98cb1) )    /* red palette */
918 	ROM_LOAD( "136014.138",   0x0100, 0x0100, CRC(adbde7d7) SHA1(956ac5117c1e310f554ac705aa2dc24a796c36a5) )    /* green palette */
919 	ROM_LOAD( "136014.139",   0x0200, 0x0100, CRC(ddac786a) SHA1(d1860105bf91297533ccc4aa6775987df198d0fa) )    /* blue palette */
920 	ROM_LOAD( "136014.140",   0x0300, 0x0100, CRC(1e8d0491) SHA1(e8bf1db5c1fb04a35763099965cf5c588240bde5) )    /* alpha color */
921 	ROM_LOAD( "136014.141",   0x0400, 0x0100, CRC(0e4fe8a0) SHA1(d330b1e5ebccf5bbefcf71486fd80d816de38196) )    /* background color */
922 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
923 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
924 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
925 	ROM_LOAD( "136014.145",   0x0800, 0x0400, CRC(7afc7cfc) SHA1(ba2407f6eff124e881b354f13205a4c058b7cf60) )    /* road color */
926 	ROM_LOAD( "pp1_6.bpr",    0x0c00, 0x0400, CRC(2f1079ee) SHA1(18a27998a78deff13dd198f3668a7e92f084f467) )    /* sprite color */
927 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
928 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
929 
930 	/* sound (P)ROM data */
931 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
932 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
933 
934 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
935 	ROM_LOAD( "136014.110",   0x0000, 0x2000, CRC(b5ad4d5f) SHA1(c07e77a050200d6fe9952031f971ca35f4d15ff8) )    /* engine sound */
936 	ROM_LOAD( "136014.111",   0x2000, 0x2000, CRC(8fdd2f6f) SHA1(3818dc94c60cd78c4212ab7a4367cf3d98166ee6) )    /* engine sound */
937 
938 	ROM_REGION( 0x8000, REGION_SOUND3, 0 )
939 	ROM_LOAD( "pp1_11.2e",    0x0000, 0x2000, CRC(45b9bfeb) SHA1(ff8c690471944d414931fb88666594ef608997f8) )    /* voice */
940 	ROM_LOAD( "pp1_12.2f",    0x2000, 0x2000, CRC(a31b4be5) SHA1(38298093bb97ea8647fe187359cae05b65e1c616) )    /* voice */
941 	ROM_LOAD( "pp1_13.1e",    0x4000, 0x2000, CRC(a4237466) SHA1(88a397276038cc2fc05f2c18472e6b7cef167f2e) )    /* voice */
942 	ROM_LOAD( "pp1_14.1f",    0x6000, 0x2000, CRC(944580f9) SHA1(c76f529cae718674ce97a1a599a3c6eaf6bf561a) )    /* voice */
943 
944 	/* unknown or unused (P)ROM data */
945 	ROM_REGION( 0x0100, REGION_USER1, 0 )
946 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
947 ROM_END
948 
949 
950 ROM_START( poleposa )
951 	/* Z80 memory/ROM data */
952 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
953 	ROM_LOAD( "136014.105",   0x0000, 0x2000, CRC(c918c043) SHA1(abc1aa3d7b670b5a65b4565dc646cd3c4edf4e6f) )
954 	ROM_LOAD( "136014.116",   0x2000, 0x1000, CRC(7174bcb7) SHA1(460326a6cea201db2df813013c95562a222ea95d) )
955 
956 	/* Z8002 #1 memory/ROM data */
957 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
958 	ROM_LOAD16_BYTE( "136014.101",   0x0001, 0x2000, CRC(8c2cf172) SHA1(57c774afab79599ac3f434113c3170fbb3d42620) )
959 	ROM_LOAD16_BYTE( "136014.102",   0x0000, 0x2000, CRC(51018857) SHA1(ed28d44d172a01f76461f556229d1fe3a1b779a7) )
960 
961 	/* Z8002 #2 memory/ROM data */
962 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
963 	ROM_LOAD16_BYTE( "136014.203",   0x0001, 0x2000, CRC(eedea6e7) SHA1(e1459c5e3f824e589e624c3acb18a183fd160df6) )
964 	ROM_LOAD16_BYTE( "136014.204",   0x0000, 0x2000, CRC(c52c98ed) SHA1(2e33c487deaf8afb941e07e511a9828d2d8f6b31) )
965 
966 	/* graphics data */
967 	ROM_REGION( 0x01000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
968 	ROM_LOAD( "136014.132",   0x0000, 0x1000, CRC(a949aa85) SHA1(2d6414196b6071101001128418233e585279ffb9) )
969 
970 	ROM_REGION( 0x01000, REGION_GFX2, ROMREGION_DISPOSE )
971 	ROM_LOAD( "136014.133",   0x0000, 0x1000, CRC(3f0eb551) SHA1(39516d0f72f4e3b03df9451d2dbe081d6c71a508) )    /* 2bpp view layer */
972 
973 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
974 	ROM_LOAD( "136014.156",   0x0000, 0x2000, CRC(e7a09c93) SHA1(47cc5c6776333bba8454a3df9e2f6e7de4a465e1) )    /* 4bpp sm sprites, planes 0+1 */
975 	ROM_LOAD( "136014.157",   0x2000, 0x2000, CRC(dee7d687) SHA1(ea34b51c91f6915b74a4a7b53ddb4ff36b72bf66) )    /* 4bpp sm sprites, planes 2+3 */
976 
977 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
978 	ROM_LOAD( "136014.150",   0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
979 	ROM_LOAD( "136014.152",   0x2000, 0x2000, CRC(a7e3a1c6) SHA1(b7340318afaa4b5f416fe4444899579242cd36c2) )
980 	ROM_LOAD( "136014.154",   0x4000, 0x2000, CRC(8992d381) SHA1(3bf2544dbe88132137acec2c064a104a74139ec7) )
981 	ROM_LOAD( "136014.151",   0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
982 	ROM_LOAD( "136014.153",   0xa000, 0x2000, CRC(6c5c6e68) SHA1(dce74ee0e69e0fc0a1942a489c2065381239f0f1) )
983 	ROM_LOAD( "136014.155",   0xc000, 0x2000, CRC(111896ad) SHA1(15032b4c859231373bebfa640421fdcc8ba9d211) )
984 
985 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
986 	ROM_LOAD( "136014.158",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
987 	ROM_LOAD( "136014.159",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
988 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
989 
990 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
991 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
992 
993 	/* graphics (P)ROM data */
994 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
995 	ROM_LOAD( "136014.137",   0x0000, 0x0100, CRC(f07ff2ad) SHA1(e1f3cb10a03d23f8c1d422acf271dba4e7b98cb1) )    /* red palette */
996 	ROM_LOAD( "136014.138",   0x0100, 0x0100, CRC(adbde7d7) SHA1(956ac5117c1e310f554ac705aa2dc24a796c36a5) )    /* green palette */
997 	ROM_LOAD( "136014.139",   0x0200, 0x0100, CRC(ddac786a) SHA1(d1860105bf91297533ccc4aa6775987df198d0fa) )    /* blue palette */
998 	ROM_LOAD( "136014.140",   0x0300, 0x0100, CRC(1e8d0491) SHA1(e8bf1db5c1fb04a35763099965cf5c588240bde5) )    /* alpha color */
999 	ROM_LOAD( "136014.141",   0x0400, 0x0100, CRC(0e4fe8a0) SHA1(d330b1e5ebccf5bbefcf71486fd80d816de38196) )    /* background color */
1000 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1001 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1002 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1003 	ROM_LOAD( "136014.145",   0x0800, 0x0400, CRC(7afc7cfc) SHA1(ba2407f6eff124e881b354f13205a4c058b7cf60) )    /* road color */
1004 	ROM_LOAD( "136014.146",   0x0c00, 0x0400, CRC(ca4ba741) SHA1(de93d738bd27e24dbc4a8378d2c120ef8388c261) )    /* sprite color */
1005 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1006 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1007 
1008 	/* sound (P)ROM data */
1009 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1010 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1011 
1012 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1013 	ROM_LOAD( "136014.110",   0x0000, 0x2000, CRC(b5ad4d5f) SHA1(c07e77a050200d6fe9952031f971ca35f4d15ff8) )    /* engine sound */
1014 	ROM_LOAD( "136014.111",   0x2000, 0x2000, CRC(8fdd2f6f) SHA1(3818dc94c60cd78c4212ab7a4367cf3d98166ee6) )    /* engine sound */
1015 
1016 	ROM_REGION( 0x6000, REGION_SOUND3, 0 )
1017 	ROM_LOAD( "136014.106",   0x0000, 0x2000, CRC(5b4cf05e) SHA1(52342572940489175607bbf5b6cfd05ee9b0f004) )    /* voice */
1018 
1019 	/* unknown or unused (P)ROM data */
1020 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1021 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1022 ROM_END
1023 
1024 
1025 ROM_START( polepos1 )
1026 	/* Z80 memory/ROM data */
1027 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
1028 	ROM_LOAD( "136014.105",   0x0000, 0x2000, CRC(c918c043) SHA1(abc1aa3d7b670b5a65b4565dc646cd3c4edf4e6f) )
1029 	ROM_LOAD( "136014.116",   0x2000, 0x1000, CRC(7174bcb7) SHA1(460326a6cea201db2df813013c95562a222ea95d) )
1030 
1031 	/* Z8002 #1 memory/ROM data */
1032 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
1033 	ROM_LOAD16_BYTE( "136014.101",   0x0001, 0x2000, CRC(8c2cf172) SHA1(57c774afab79599ac3f434113c3170fbb3d42620) )
1034 	ROM_LOAD16_BYTE( "136014.102",   0x0000, 0x2000, CRC(51018857) SHA1(ed28d44d172a01f76461f556229d1fe3a1b779a7) )
1035 
1036 	/* Z8002 #2 memory/ROM data */
1037 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
1038 	ROM_LOAD16_BYTE( "136014.103",   0x0001, 0x2000, CRC(af4fc019) SHA1(1bb6c0f3ffada2e1df72e1767581f8e8bb2b18f9) )
1039 	ROM_LOAD16_BYTE( "136014.104",   0x0000, 0x2000, CRC(ba0045f3) SHA1(aedb8d8c56407963aa4ffb66243288c8fd6d845a) )
1040 
1041 	/* graphics data */
1042 	ROM_REGION( 0x01000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
1043 	ROM_LOAD( "136014.132",   0x0000, 0x1000, CRC(a949aa85) SHA1(2d6414196b6071101001128418233e585279ffb9) )
1044 
1045 	ROM_REGION( 0x01000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
1046 	ROM_LOAD( "136014.133",   0x0000, 0x1000, CRC(3f0eb551) SHA1(39516d0f72f4e3b03df9451d2dbe081d6c71a508) )
1047 
1048 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
1049 	ROM_LOAD( "136014.156",   0x0000, 0x2000, CRC(e7a09c93) SHA1(47cc5c6776333bba8454a3df9e2f6e7de4a465e1) )    /* 4bpp sm sprites, planes 0+1 */
1050 	ROM_LOAD( "136014.157",   0x2000, 0x2000, CRC(dee7d687) SHA1(ea34b51c91f6915b74a4a7b53ddb4ff36b72bf66) )    /* 4bpp sm sprites, planes 2+3 */
1051 
1052 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
1053 	ROM_LOAD( "136014.150",   0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
1054 	ROM_LOAD( "136014.152",   0x2000, 0x2000, CRC(a7e3a1c6) SHA1(b7340318afaa4b5f416fe4444899579242cd36c2) )
1055 	ROM_LOAD( "136014.154",   0x4000, 0x2000, CRC(8992d381) SHA1(3bf2544dbe88132137acec2c064a104a74139ec7) )
1056 	ROM_LOAD( "136014.151",   0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
1057 	ROM_LOAD( "136014.153",   0xa000, 0x2000, CRC(6c5c6e68) SHA1(dce74ee0e69e0fc0a1942a489c2065381239f0f1) )
1058 	ROM_LOAD( "136014.155",   0xc000, 0x2000, CRC(111896ad) SHA1(15032b4c859231373bebfa640421fdcc8ba9d211) )
1059 
1060 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
1061 	ROM_LOAD( "136014.158",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
1062 	ROM_LOAD( "136014.159",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
1063 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
1064 
1065 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
1066 	ROM_LOAD( "136014.131",   0x0000, 0x1000, CRC(5921777f) SHA1(4d9c91a26e0d84fbbe08f748d6e0364311ed6f73) )    /* vertical scaling */
1067 
1068 	/* graphics (P)ROM data */
1069 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
1070 	ROM_LOAD( "136014.137",   0x0000, 0x0100, CRC(f07ff2ad) SHA1(e1f3cb10a03d23f8c1d422acf271dba4e7b98cb1) )    /* red palette */
1071 	ROM_LOAD( "136014.138",   0x0100, 0x0100, CRC(adbde7d7) SHA1(956ac5117c1e310f554ac705aa2dc24a796c36a5) )    /* green palette */
1072 	ROM_LOAD( "136014.139",   0x0200, 0x0100, CRC(ddac786a) SHA1(d1860105bf91297533ccc4aa6775987df198d0fa) )    /* blue palette */
1073 	ROM_LOAD( "136014.140",   0x0300, 0x0100, CRC(1e8d0491) SHA1(e8bf1db5c1fb04a35763099965cf5c588240bde5) )    /* alpha color */
1074 	ROM_LOAD( "136014.141",   0x0400, 0x0100, CRC(0e4fe8a0) SHA1(d330b1e5ebccf5bbefcf71486fd80d816de38196) )    /* background color */
1075 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1076 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1077 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1078 	ROM_LOAD( "136014.145",   0x0800, 0x0400, CRC(7afc7cfc) SHA1(ba2407f6eff124e881b354f13205a4c058b7cf60) )    /* road color */
1079 	ROM_LOAD( "136014.146",   0x0c00, 0x0400, CRC(ca4ba741) SHA1(de93d738bd27e24dbc4a8378d2c120ef8388c261) )    /* sprite color */
1080 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1081 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1082 
1083 	/* sound (P)ROM data */
1084 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1085 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1086 
1087 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1088 	ROM_LOAD( "136014.110",   0x0000, 0x2000, CRC(b5ad4d5f) SHA1(c07e77a050200d6fe9952031f971ca35f4d15ff8) )    /* engine sound */
1089 	ROM_LOAD( "136014.111",   0x2000, 0x2000, CRC(8fdd2f6f) SHA1(3818dc94c60cd78c4212ab7a4367cf3d98166ee6) )    /* engine sound */
1090 
1091 	ROM_REGION( 0x6000, REGION_SOUND3, 0 )
1092 	ROM_LOAD( "136014.106",   0x0000, 0x2000, CRC(5b4cf05e) SHA1(52342572940489175607bbf5b6cfd05ee9b0f004) )    /* voice */
1093 
1094 	/* unknown or unused (P)ROM data */
1095 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1096 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1097 ROM_END
1098 
1099 
1100 ROM_START( topracer )
1101 	/* Z80 memory/ROM data */
1102 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
1103 	ROM_LOAD( "pp1_9b.6h",    0x0000, 0x2000, CRC(94436b70) SHA1(7495c2a8c3928c59146760d19e672afee01c5b17) )
1104 	ROM_LOAD( "136014.116",   0x2000, 0x1000, CRC(7174bcb7) SHA1(460326a6cea201db2df813013c95562a222ea95d) )
1105 
1106 	/* Z8002 #1 memory/ROM data */
1107 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
1108 	ROM_LOAD16_BYTE( "tr1b.bin",     0x0001, 0x2000, CRC(127f0750) SHA1(97ae6c6f8086187c7cdb8bff5fec94914791890b) )
1109 	ROM_LOAD16_BYTE( "tr2b.bin",     0x0000, 0x2000, CRC(6bd4ff6b) SHA1(cf992de39a8cf7804961a8e6773fc4f7feb1878b) )
1110 
1111 	/* Z8002 #2 memory/ROM data */
1112 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
1113 	ROM_LOAD16_BYTE( "tr5b.bin",     0x0001, 0x2000, CRC(4e5f7b9c) SHA1(d26b1f24dd9ef00388987890bc5b95d4db403815) )
1114 	ROM_LOAD16_BYTE( "tr6b.bin",     0x0000, 0x2000, CRC(9d038ada) SHA1(7a9496c3fb93fd1945393656f8510a0c6421a9ab) )
1115 
1116 	/* graphics data */
1117 	ROM_REGION( 0x01000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
1118 	ROM_LOAD( "tr28.bin",     0x0000, 0x1000, CRC(b8217c96) SHA1(aba311bc3c4b118ba322a00e33e2d5cbe7bc6e4a) )
1119 
1120 	ROM_REGION( 0x01000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
1121 	ROM_LOAD( "tr29.bin",     0x0000, 0x1000, CRC(c6e15c21) SHA1(e2a70b3f7ce51a003068eb75d9fe82548f0206d7) )
1122 
1123 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
1124 	ROM_LOAD( "trus25.bin",   0x0000, 0x2000, CRC(9e1a9c3b) SHA1(deca026c39093119985d1486ed61abc3e6e5705c) )    /* 4bpp sm sprites, planes 0+1 */
1125 	ROM_LOAD( "trus26.bin",   0x2000, 0x2000, CRC(3b39a176) SHA1(d04c9c2c9129c8dd7d7eab24c43502b67162407c) )    /* 4bpp sm sprites, planes 2+3 */
1126 
1127 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
1128 	ROM_LOAD( "pp17.bin",     0x0000, 0x2000, CRC(613ab0df) SHA1(88aa4500275aae010fc9783c1d8d843feab89afa) )    /* 4bpp lg sprites, planes 0+1 */
1129 	ROM_LOAD( "tr19.bin",     0x2000, 0x2000, CRC(f8e7f551) SHA1(faa23c55bc43325e6f71936be970f2ca144697d8) )
1130 	ROM_LOAD( "tr21.bin",     0x4000, 0x2000, CRC(17c798b0) SHA1(ae2047bc0e4e8c85e1de09c39c200ea8f7c6a72e) )
1131 	ROM_LOAD( "pp18.bin",     0x8000, 0x2000, CRC(5fd933e3) SHA1(5b27a8519234c935308f943cd58abc1efc463726) )    /* 4bpp lg sprites, planes 2+3 */
1132 	ROM_LOAD( "tr20.bin",     0xa000, 0x2000, CRC(7053e219) SHA1(97700fbe887e2d11c9f9a0937147725f6787f081) )
1133 	ROM_LOAD( "tr22.bin",     0xc000, 0x2000, CRC(f48917b2) SHA1(2823cfc33ae97ef979d92e2eeeb94c95f1f3d9f3) )
1134 
1135 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
1136 	ROM_LOAD( "136014.158",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
1137 	ROM_LOAD( "136014.159",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
1138 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
1139 
1140 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
1141 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
1142 
1143 	/* graphics (P)ROM data */
1144 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
1145 	ROM_LOAD( "136014.137",   0x0000, 0x0100, CRC(f07ff2ad) SHA1(e1f3cb10a03d23f8c1d422acf271dba4e7b98cb1) )    /* red palette */
1146 	ROM_LOAD( "136014.138",   0x0100, 0x0100, CRC(adbde7d7) SHA1(956ac5117c1e310f554ac705aa2dc24a796c36a5) )    /* green palette */
1147 	ROM_LOAD( "136014.139",   0x0200, 0x0100, CRC(ddac786a) SHA1(d1860105bf91297533ccc4aa6775987df198d0fa) )    /* blue palette */
1148 	ROM_LOAD( "10p.bin",      0x0300, 0x0100, CRC(5af3f710) SHA1(da13d17acf8abd0f6ebb4b51b23c3324c6197b7d) )    /* alpha color */
1149 	ROM_LOAD( "136014.141",   0x0400, 0x0100, CRC(0e4fe8a0) SHA1(d330b1e5ebccf5bbefcf71486fd80d816de38196) )    /* background color */
1150 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1151 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1152 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1153 	ROM_LOAD( "136014.145",   0x0800, 0x0400, CRC(7afc7cfc) SHA1(ba2407f6eff124e881b354f13205a4c058b7cf60) )    /* road color */
1154 	ROM_LOAD( "pp1_6.bpr",    0x0c00, 0x0400, BAD_DUMP CRC(2f1079ee) SHA1(18a27998a78deff13dd198f3668a7e92f084f467) )    /* sprite color */
1155 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1156 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1157 
1158 	/* sound (P)ROM data */
1159 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1160 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1161 
1162 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1163 	ROM_LOAD( "136014.110",   0x0000, 0x2000, CRC(b5ad4d5f) SHA1(c07e77a050200d6fe9952031f971ca35f4d15ff8) )    /* engine sound */
1164 	ROM_LOAD( "136014.111",   0x2000, 0x2000, CRC(8fdd2f6f) SHA1(3818dc94c60cd78c4212ab7a4367cf3d98166ee6) )    /* engine sound */
1165 
1166 	ROM_REGION( 0x6000, REGION_SOUND3, 0 )
1167 	ROM_LOAD( "136014.106",   0x0000, 0x2000, CRC(5b4cf05e) SHA1(52342572940489175607bbf5b6cfd05ee9b0f004) )    /* voice */
1168 
1169 	/* unknown or unused (P)ROM data */
1170 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1171 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1172 ROM_END
1173 
1174 
1175 ROM_START( polepos2 )
1176 	/* Z80 memory/ROM data */
1177 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
1178 	ROM_LOAD( "pp4_9.6h",      0x0000, 0x2000, CRC(bcf87004) SHA1(0c60cbb777fe72dfd11c6f3e9da806a515cd0f8a) )
1179 	ROM_LOAD( "136014.183",    0x2000, 0x1000, CRC(a9d4c380) SHA1(6048a8e858824936901e8e3e6b65d7505ccd82b4) )
1180 
1181 	/* Z8002 #1 memory/ROM data */
1182 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
1183 	ROM_LOAD16_BYTE( "pp4_1.8m",      0x0001, 0x2000, CRC(3f6ac294) SHA1(414ea7e43e62a573ad8971a7045f61eb997cf94e) )
1184 	ROM_LOAD16_BYTE( "pp4_2.8l",      0x0000, 0x2000, CRC(51b9a669) SHA1(563ba42098d330801a992cd9c008c4cbbb993530) )
1185 
1186 	/* Z8002 #2 memory/ROM data */
1187 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
1188 	ROM_LOAD16_BYTE( "pp4_5.4m",      0x0001, 0x2000, CRC(c3053cae) SHA1(f42cf61fe696dd7e282b29e2234ea7f487ec2372) )
1189 	ROM_LOAD16_BYTE( "pp4_6.4l",      0x0000, 0x2000, CRC(38d04e0f) SHA1(5527cb1864248208b10d219a50ad742f286a119f) )
1190 	ROM_LOAD16_BYTE( "pp4_7.3m",      0x4001, 0x1000, CRC(ad1c8994) SHA1(2877de9641516767170c0109900955cc7d1ff402) )
1191 	ROM_LOAD16_BYTE( "pp4_8.3l",      0x4000, 0x1000, CRC(ef25a2ee) SHA1(45959355cad1a48f19ae14193374e03d4f9965c7) )
1192 
1193 	/* graphics data */
1194 	ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
1195 	ROM_LOAD( "pp4_28.1f",     0x0000, 0x2000, CRC(280dde7d) SHA1(b7c7fb3a5076aa4d0e0cf3256ece9a6194315626) )
1196 
1197 	ROM_REGION( 0x02000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
1198 	ROM_LOAD( "136014.173",   0x0000, 0x2000, CRC(ec3ec6e6) SHA1(ae905d0ae802d1010b2c1f1a13e88a1f0dbe57da) )
1199 
1200 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
1201 	ROM_LOAD( "pp4_25.1n",     0x0000, 0x2000, CRC(fd098e65) SHA1(2c497f1d278ba6730752706a0d1b5a5a0fec3d5b) )    /* 4bpp sm sprites, planes 0+1 */
1202 	ROM_LOAD( "pp4_26.1m",     0x2000, 0x2000, CRC(35ac62b3) SHA1(21038a78eb73d520e3e1ae8e1c0047d06b94cdab) )    /* 4bpp sm sprites, planes 2+3 */
1203 
1204 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
1205 	ROM_LOAD( "136014.119",  0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
1206 	ROM_LOAD( "pp1_19.4n",     0x2000, 0x2000, CRC(43ff83e1) SHA1(8f830549a629b019125e59801e5027e4e4b3c0f2) )
1207 	ROM_LOAD( "pp1_21.3n",     0x4000, 0x2000, CRC(5f958eb4) SHA1(b56d84e5e5e0ddeb0e71851ba66e5fa1b1409551) )
1208 	ROM_LOAD( "pp4_23.2n",     0x6000, 0x2000, CRC(9e056fcd) SHA1(8545e0a9b6ebf8c2903321ceb9c4d693db10d750) )
1209 	ROM_LOAD( "136014.120",  0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
1210 	ROM_LOAD( "pp1_20.4m",     0xa000, 0x2000, CRC(ec18075b) SHA1(af7be549c5fa47551a8dca4c0a531552147fa50f) )
1211 	ROM_LOAD( "pp1_22.3m",     0xc000, 0x2000, CRC(1d2f30b1) SHA1(1d88a3069e9b15febd2835dd63e5511b3b2a6b45) )
1212 	ROM_LOAD( "pp4_24.2m",     0xe000, 0x2000, CRC(795268cf) SHA1(84136142ef4bdcd97ede2209ecb16745960ac393) )
1213 
1214 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
1215 	ROM_LOAD( "136014.127",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
1216 	ROM_LOAD( "136014.128",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
1217 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
1218 
1219 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
1220 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
1221 
1222 	/* graphics (P)ROM data */
1223 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
1224 	ROM_LOAD( "136014.186",   0x0000, 0x0100, CRC(16d69c31) SHA1(f24b345448e4f4ef4e2f3b057b81d399cf427f88) )    /* red palette */
1225 	ROM_LOAD( "136014.187",   0x0100, 0x0100, CRC(07340311) SHA1(3820d1fa99013ed18de5d9400ad376cc446d1217) )    /* green palette */
1226 	ROM_LOAD( "136014.188",   0x0200, 0x0100, CRC(1efc84d7) SHA1(6946e1c209eec0a4b75778ae88111e6cb63c63fb) )    /* blue palette */
1227 	ROM_LOAD( "136014.189",   0x0300, 0x0100, CRC(064d51a0) SHA1(d5baa29930530a8930b44a374e285de849c2a6ce) )    /* alpha color */
1228 	ROM_LOAD( "136014.190",   0x0400, 0x0100, CRC(7880c5af) SHA1(e4388e354420be3f99594a10c091e3d2f745cc04) )    /* background color */
1229 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1230 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1231 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1232 	ROM_LOAD( "136014.191",   0x0800, 0x0400, CRC(8b270902) SHA1(27b3ebc92d3a2a5c0432bde018a0e43669041d50) )    /* road color */
1233 	ROM_LOAD( "pp4-6.6m",     0x0c00, 0x0400, CRC(647212b5) SHA1(ad58dfebd0ce8226285c2671c3b7797852c26d07) )    /* sprite color */
1234 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1235 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1236 
1237 	/* sound (P)ROM data */
1238 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1239 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1240 
1241 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1242 	ROM_LOAD( "136014.181",   0x0000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1243 	ROM_LOAD( "136014.182",   0x2000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1244 
1245 	ROM_REGION( 0x8000, REGION_SOUND3, 0 )
1246 	ROM_LOAD( "pp1_11.2e",     0x0000, 0x2000, CRC(45b9bfeb) SHA1(ff8c690471944d414931fb88666594ef608997f8) )    /* voice */
1247 	ROM_LOAD( "pp1_12.2f",     0x2000, 0x2000, CRC(a31b4be5) SHA1(38298093bb97ea8647fe187359cae05b65e1c616) )    /* voice */
1248 	ROM_LOAD( "pp1_13.1e",     0x4000, 0x2000, CRC(a4237466) SHA1(88a397276038cc2fc05f2c18472e6b7cef167f2e) )    /* voice */
1249 	ROM_LOAD( "pp1_14.1f",     0x6000, 0x2000, CRC(944580f9) SHA1(c76f529cae718674ce97a1a599a3c6eaf6bf561a) )    /* voice */
1250 
1251 	/* unknown or unused (P)ROM data */
1252 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1253 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1254 ROM_END
1255 
1256 
1257 ROM_START( poleps2a )
1258 	/* Z80 memory/ROM data */
1259 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
1260 	ROM_LOAD( "136014.180",   0x0000, 0x2000, CRC(f85212c4) SHA1(666e55a7662247e72393b105b3e719be4233f1ff) )
1261 	ROM_LOAD( "136014.183",   0x2000, 0x1000, CRC(a9d4c380) SHA1(6048a8e858824936901e8e3e6b65d7505ccd82b4) )
1262 
1263 	/* Z8002 #1 memory/ROM data */
1264 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
1265 	ROM_LOAD16_BYTE( "136014.176",   0x0001, 0x2000, CRC(8aeaec98) SHA1(76b3bbb64a17090bf28858f1e91d2206a3beaf5b) )
1266 	ROM_LOAD16_BYTE( "136014.177",   0x0000, 0x2000, CRC(7051df35) SHA1(cf23118ab05f5af273d756f97e6453496a276c9a) )
1267 
1268 	/* Z8002 #2 memory/ROM data */
1269 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
1270 	ROM_LOAD16_BYTE( "136014.178",   0x0001, 0x2000, CRC(eac35cfa) SHA1(f96005b3b63d85fc30695ab746af79c60f2f1341) )
1271 	ROM_LOAD16_BYTE( "136014.179",   0x0000, 0x2000, CRC(613e917d) SHA1(97c139f8aa7bd871a907e72980757b83f99fd8a0) )
1272 	ROM_LOAD16_BYTE( "136014.184",   0x4001, 0x2000, CRC(d893c4ed) SHA1(60d39abefbb0c8df68864a30b1f5fcbf4780c86c) )
1273 	ROM_LOAD16_BYTE( "136014.185",   0x4000, 0x2000, CRC(899de75e) SHA1(4a16535115e37a3d342b2cb53f610a87c0d0abe1) )
1274 
1275 	/* graphics data */
1276 	ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
1277 	ROM_LOAD( "136014.172",   0x0000, 0x2000, CRC(fbe5e72f) SHA1(07965d6e98ac1332ac6192b5e9cc927dd9eb706f) )
1278 
1279 	ROM_REGION( 0x02000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
1280 	ROM_LOAD( "136014.173",   0x0000, 0x2000, CRC(ec3ec6e6) SHA1(ae905d0ae802d1010b2c1f1a13e88a1f0dbe57da) )
1281 
1282 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
1283 	ROM_LOAD( "136014.170",   0x0000, 0x2000, CRC(455d79a0) SHA1(03ef7c58f3145d9a6a461ef1aea3b5a49e653f80) )    /* 4bpp sm sprites, planes 0+1 */
1284 	ROM_LOAD( "136014.171",   0x2000, 0x2000, CRC(78372b81) SHA1(5defaf2074c1ab4d13dc36a190c658ddf7f7931b) )    /* 4bpp sm sprites, planes 2+3 */
1285 
1286 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
1287 	ROM_LOAD( "136014.119",   0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
1288 	ROM_LOAD( "136014.166",   0x2000, 0x2000, CRC(2b0517bd) SHA1(ebe447ba3dcd8a3b56f47d707483074f61953fec) )
1289 	ROM_LOAD( "136014.168",   0x4000, 0x2000, CRC(4d7916d9) SHA1(052745f252f51bfdd456e54cf7b8d22ab3aace27) )
1290 	ROM_LOAD( "136014.175",   0x6000, 0x2000, CRC(bd6df480) SHA1(58f39fa3ae43d94fe42dc51da341384a9c3879ae) )
1291 	ROM_LOAD( "136014.120",   0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
1292 	ROM_LOAD( "136014.167",   0xa000, 0x2000, CRC(411e21b5) SHA1(9659ee429d819926b5e5b12c41b968ae6e7f186e) )
1293 	ROM_LOAD( "136014.169",   0xc000, 0x2000, CRC(662ff24b) SHA1(4cf8509034742c2bec8a96c7a786dafdf5875e4f) )
1294 	ROM_LOAD( "136014.174",   0xe000, 0x2000, CRC(f0c571dc) SHA1(9e6839e9e203fc120a0389f4e11c9d46a817dbdf) )
1295 
1296 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
1297 	ROM_LOAD( "136014.127",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
1298 	ROM_LOAD( "136014.128",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
1299 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
1300 
1301 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
1302 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
1303 
1304 	/* graphics (P)ROM data */
1305 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
1306 	ROM_LOAD( "136014.186",   0x0000, 0x0100, CRC(16d69c31) SHA1(f24b345448e4f4ef4e2f3b057b81d399cf427f88) )    /* red palette */
1307 	ROM_LOAD( "136014.187",   0x0100, 0x0100, CRC(07340311) SHA1(3820d1fa99013ed18de5d9400ad376cc446d1217) )    /* green palette */
1308 	ROM_LOAD( "136014.188",   0x0200, 0x0100, CRC(1efc84d7) SHA1(6946e1c209eec0a4b75778ae88111e6cb63c63fb) )    /* blue palette */
1309 	ROM_LOAD( "136014.189",   0x0300, 0x0100, CRC(064d51a0) SHA1(d5baa29930530a8930b44a374e285de849c2a6ce) )    /* alpha color */
1310 	ROM_LOAD( "136014.190",   0x0400, 0x0100, CRC(7880c5af) SHA1(e4388e354420be3f99594a10c091e3d2f745cc04) )    /* background color */
1311 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1312 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1313 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1314 	ROM_LOAD( "136014.191",   0x0800, 0x0400, CRC(8b270902) SHA1(27b3ebc92d3a2a5c0432bde018a0e43669041d50) )    /* road color */
1315 	ROM_LOAD( "136014.192",   0x0c00, 0x0400, CRC(caddb0b0) SHA1(e41b89f2b40bf8f93546012f373ae63dcae870da) )    /* sprite color */
1316 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1317 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1318 
1319 	/* sound (P)ROM data */
1320 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1321 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1322 
1323 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1324 	ROM_LOAD( "136014.181",   0x0000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1325 	ROM_LOAD( "136014.182",   0x2000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1326 
1327 	ROM_REGION( 0x6000, REGION_SOUND3, 0 )
1328 	ROM_LOAD( "136014.106",   0x0000, 0x2000, CRC(5b4cf05e) SHA1(52342572940489175607bbf5b6cfd05ee9b0f004) )    /* voice */
1329 
1330 	/* unknown or unused (P)ROM data */
1331 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1332 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1333 ROM_END
1334 
1335 
1336 ROM_START( poleps2b )
1337 	/* Z80 memory/ROM data */
1338 	ROM_REGION( 0x10000, REGION_CPU1, 0 )
1339 	ROM_LOAD( "136014.180",   0x0000, 0x2000, CRC(f85212c4) SHA1(666e55a7662247e72393b105b3e719be4233f1ff) )
1340 	ROM_LOAD( "136014.183",   0x2000, 0x1000, CRC(a9d4c380) SHA1(6048a8e858824936901e8e3e6b65d7505ccd82b4) )
1341 
1342 	/* Z8002 #1 memory/ROM data */
1343 	ROM_REGION( 0x10000, REGION_CPU2, 0 )
1344 	ROM_LOAD16_BYTE( "3lcpu.rom",    0x0001, 0x2000, CRC(cf95a6b7) SHA1(6a8419af8a52d3a8c88663b67845e4cb18e35723) )
1345 	ROM_LOAD16_BYTE( "4lcpu.rom",    0x0000, 0x2000, CRC(643483f7) SHA1(020822f623b8e65c6016492266b6e328f7637b68) )
1346 	ROM_LOAD16_BYTE( "cpu-4k.rom",   0x4000, 0x1000, CRC(97a496b3) SHA1(fe79d2376c5fa9fe242905a841a1c894a5ccfba4) )
1347 
1348 	/* Z8002 #2 memory/ROM data */
1349 	ROM_REGION( 0x10000, REGION_CPU3, 0 )
1350 	ROM_LOAD16_BYTE( "136014.178",   0x0001, 0x2000, CRC(eac35cfa) SHA1(f96005b3b63d85fc30695ab746af79c60f2f1341) )
1351 	ROM_LOAD16_BYTE( "136014.179",   0x0000, 0x2000, CRC(613e917d) SHA1(97c139f8aa7bd871a907e72980757b83f99fd8a0) )
1352 	ROM_LOAD16_BYTE( "136014.184",   0x4001, 0x2000, CRC(d893c4ed) SHA1(60d39abefbb0c8df68864a30b1f5fcbf4780c86c) )
1353 	ROM_LOAD16_BYTE( "136014.185",   0x4000, 0x2000, CRC(899de75e) SHA1(4a16535115e37a3d342b2cb53f610a87c0d0abe1) )
1354 
1355 	/* graphics data */
1356 	ROM_REGION( 0x02000, REGION_GFX1, ROMREGION_DISPOSE ) 	/* 2bpp alpha layer */
1357 	ROM_LOAD( "136014.172",   0x0000, 0x2000, CRC(fbe5e72f) SHA1(07965d6e98ac1332ac6192b5e9cc927dd9eb706f) )
1358 
1359 	ROM_REGION( 0x02000, REGION_GFX2, ROMREGION_DISPOSE ) 	/* 2bpp view layer */
1360 	ROM_LOAD( "136014.173",   0x0000, 0x2000, CRC(ec3ec6e6) SHA1(ae905d0ae802d1010b2c1f1a13e88a1f0dbe57da) )
1361 
1362 	ROM_REGION( 0x04000, REGION_GFX3, ROMREGION_DISPOSE ) 	/* 4bpp 16x16 sprites */
1363 	ROM_LOAD( "136014.170",   0x0000, 0x2000, CRC(455d79a0) SHA1(03ef7c58f3145d9a6a461ef1aea3b5a49e653f80) )    /* 4bpp sm sprites, planes 0+1 */
1364 	ROM_LOAD( "136014.171",   0x2000, 0x2000, CRC(78372b81) SHA1(5defaf2074c1ab4d13dc36a190c658ddf7f7931b) )    /* 4bpp sm sprites, planes 2+3 */
1365 
1366 	ROM_REGION( 0x10000, REGION_GFX4, ROMREGION_DISPOSE ) 	/* 4bpp 32x32 sprites */
1367 	ROM_LOAD( "136014.119",   0x0000, 0x2000, CRC(2e134b46) SHA1(0938f5f9f5cc6d7c1096c569449db78dbc42da01) )    /* 4bpp lg sprites, planes 0+1 */
1368 	ROM_LOAD( "136014.166",   0x2000, 0x2000, CRC(2b0517bd) SHA1(ebe447ba3dcd8a3b56f47d707483074f61953fec) )
1369 	ROM_LOAD( "136014.168",   0x4000, 0x2000, CRC(4d7916d9) SHA1(052745f252f51bfdd456e54cf7b8d22ab3aace27) )
1370 	ROM_LOAD( "136014.175",   0x6000, 0x2000, CRC(bd6df480) SHA1(58f39fa3ae43d94fe42dc51da341384a9c3879ae) )
1371 	ROM_LOAD( "136014.120",   0x8000, 0x2000, CRC(6f9997d2) SHA1(b26d505266ccf23bfd867f881756c3251c80f57b) )    /* 4bpp lg sprites, planes 2+3 */
1372 	ROM_LOAD( "136014.167",   0xa000, 0x2000, CRC(411e21b5) SHA1(9659ee429d819926b5e5b12c41b968ae6e7f186e) )
1373 	ROM_LOAD( "136014.169",   0xc000, 0x2000, CRC(662ff24b) SHA1(4cf8509034742c2bec8a96c7a786dafdf5875e4f) )
1374 	ROM_LOAD( "136014.174",   0xe000, 0x2000, CRC(f0c571dc) SHA1(9e6839e9e203fc120a0389f4e11c9d46a817dbdf) )
1375 
1376 	ROM_REGION( 0x5000, REGION_GFX5, 0 ) 	/* road generation ROMs needed at runtime */
1377 	ROM_LOAD( "136014.127",   0x0000, 0x2000, CRC(ee6b3315) SHA1(9cc26c6d3604c0f60d716f86e67e9d9c0487f87d) )    /* road control */
1378 	ROM_LOAD( "136014.128",   0x2000, 0x2000, CRC(6d1e7042) SHA1(90113ff0c93ed86d95067290088705bb5e6608d1) )    /* road bits 1 */
1379 	ROM_LOAD( "136014.134",   0x4000, 0x1000, CRC(4e97f101) SHA1(f377d053821c74aee93ebcd30a4d43e6156f3cfe) )    /* road bits 2 */
1380 
1381 	ROM_REGION( 0x1000, REGION_GFX6, 0 ) 	/* sprite scaling */
1382 	ROM_LOAD( "136014.231",   0x0000, 0x1000, CRC(a61bff15) SHA1(f7a59970831cdaaa7bf59c2221a38e4746c54244) )    /* vertical scaling */
1383 
1384 	/* graphics (P)ROM data */
1385 	ROM_REGION( 0x1040, REGION_PROMS, 0 )
1386 	ROM_LOAD( "136014.186",   0x0000, 0x0100, CRC(16d69c31) SHA1(f24b345448e4f4ef4e2f3b057b81d399cf427f88) )    /* red palette */
1387 	ROM_LOAD( "136014.187",   0x0100, 0x0100, CRC(07340311) SHA1(3820d1fa99013ed18de5d9400ad376cc446d1217) )    /* green palette */
1388 	ROM_LOAD( "136014.188",   0x0200, 0x0100, CRC(1efc84d7) SHA1(6946e1c209eec0a4b75778ae88111e6cb63c63fb) )    /* blue palette */
1389 	ROM_LOAD( "136014.189",   0x0300, 0x0100, CRC(064d51a0) SHA1(d5baa29930530a8930b44a374e285de849c2a6ce) )    /* alpha color */
1390 	ROM_LOAD( "136014.190",   0x0400, 0x0100, CRC(7880c5af) SHA1(e4388e354420be3f99594a10c091e3d2f745cc04) )    /* background color */
1391 	ROM_LOAD( "136014.142",   0x0500, 0x0100, CRC(2d502464) SHA1(682b7dd22e51d5db52c0804b7e27e47641dfa6bd) )    /* vertical position low */
1392 	ROM_LOAD( "136014.143",   0x0600, 0x0100, CRC(027aa62c) SHA1(c7030d8b64b80e107c446f6fbdd63f560c0a91c0) )    /* vertical position med */
1393 	ROM_LOAD( "136014.144",   0x0700, 0x0100, CRC(1f8d0df3) SHA1(b8f17758f114f5e247b65b3f2922ca2660757e66) )    /* vertical position hi */
1394 	ROM_LOAD( "136014.191",   0x0800, 0x0400, CRC(8b270902) SHA1(27b3ebc92d3a2a5c0432bde018a0e43669041d50) )    /* road color */
1395 	ROM_LOAD( "136014.192",   0x0c00, 0x0400, CRC(caddb0b0) SHA1(e41b89f2b40bf8f93546012f373ae63dcae870da) )    /* sprite color */
1396 	ROM_LOAD( "136014.135",   0x1000, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1397 	ROM_LOAD( "136014.136",   0x1020, 0x0020, CRC(4330a51b) SHA1(9531d18ce2de4eda9913d47ef8c5cd8f05791716) )    /* video RAM address decoder (not used) */
1398 
1399 	/* sound (P)ROM data */
1400 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )
1401 	ROM_LOAD( "136014.118",   0x0000, 0x0100, CRC(8568decc) SHA1(0aac1fa082858d4d201e21511c609a989f9a1535) )    /* Namco sound */
1402 
1403 	ROM_REGION( 0x4000, REGION_SOUND2, 0 )
1404 	ROM_LOAD( "136014.181",   0x0000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1405 	ROM_LOAD( "136014.182",   0x2000, 0x2000, CRC(7d93bc1c) SHA1(dad7c0aa24aef593c84e21f7f8858ca7ada86364) )    /* engine sound */
1406 
1407 	ROM_REGION( 0x6000, REGION_SOUND3, 0 )
1408 	ROM_LOAD( "136014.106",   0x0000, 0x2000, CRC(5b4cf05e) SHA1(52342572940489175607bbf5b6cfd05ee9b0f004) )    /* voice */
1409 
1410 	/* unknown or unused (P)ROM data */
1411 	ROM_REGION( 0x0100, REGION_USER1, 0 )
1412 	ROM_LOAD( "136014.117",   0x0000, 0x0100, CRC(2401c817) SHA1(8991b7994513a469e64392fa8f233af5e5f06d54) )    /* sync chain */
1413 ROM_END
1414 
1415 
1416 /*********************************************************************
1417  * Initialization routines
1418  *********************************************************************/
1419 
1420 static DRIVER_INIT( polepos2 )
1421 {
1422 	/* note that the bootleg version doesn't need this custom IC; it has a hacked ROM in its place */
1423 	install_mem_read16_handler(1, 0x4000, 0x5fff, polepos2_ic25_r);
1424 }
1425 
1426 
1427 /*********************************************************************
1428  * Game drivers
1429  *********************************************************************/
1430 
1431 GAME( 1982, polepos,  0,		polepos, polepos,  0,		 ROT0, "Namco", "Pole Position" )
1432 GAME( 1982, poleposa, polepos,	polepos, poleposa, 0,		 ROT0, "Namco (Atari license)", "Pole Position (Atari version 2)" )
1433 GAME( 1982, polepos1, polepos,	polepos, poleposa, 0,		 ROT0, "[Namco] (Atari license)", "Pole Position (Atari version 1)" )
1434 GAME( 1982, topracer, polepos,	polepos, polepos,  0,		 ROT0, "bootleg", "Top Racer" )
1435 GAME( 1983, polepos2, 0,		polepos, polepos2, polepos2, ROT0, "Namco", "Pole Position II" )
1436 GAME( 1983, poleps2a, polepos2, polepos, polepos2, polepos2, ROT0, "Namco (Atari license)", "Pole Position II (Atari)" )
1437 GAME( 1983, poleps2b, polepos2, polepos, polepos2, 0,		 ROT0, "bootleg", "Pole Position II (bootleg)" )
1438