1 /***************************************************************************
2 
3 Crazy Climber memory map (preliminary)
4 as described by Lionel Theunissen (lionelth@ozemail.com.au)
5 
6 Crazy Kong is very similar to Crazy Climber, there is an additional ROM at
7 5000-5fff and RAM is at 6000-6bff. Dip switches and input connections are
8 different as well.
9 
10 Swimmer is similar but also different (e.g. it has two CPUs and two 8910,
11 graphics are 3bpp instead of 2)
12 
13 0000h-4fffh ;20k program ROMs. ROM11=0000h
14                                ROM10=1000h
15                                ROM09=2000h
16                                ROM08=3000h
17                                ROM07=4000h
18 
19 8000h-83ffh ;1k scratchpad RAM.
20 8800h-88ffh ;256 bytes Bigsprite RAM.
21 9000h-93ffh ;1k screen RAM.
22 9800h-981fh ;Column smooth scroll position. Corresponds to each char
23              column.
24 
25 9880h-989fh ;Sprite controls. 8 groups of 4 bytes:
26   1st byte; code/attribute.
27             Bits 0-5: sprite code.
28             Bit    6: x invert.
29             Bit    7: y invert.
30   2nd byte ;color.
31             Bits 0-3: colour. (palette scheme 0-15)
32             Bit    4: 0=charset1, 1 =charset 2.
33   3rd byte ;y position
34   4th byte ;x position
35 
36 98dc        bit 0  big sprite priority over sprites? (1 = less priority)
37 98ddh ;Bigsprite colour/attribute.
38             Bit 0-2: Big sprite colour.
39             bit 3  ??
40             Bit   4: x invert.
41             Bit   5: y invert.
42 98deh ;Bigsprite y position.
43 98dfh ;Bigsprite x position.
44 
45 9c00h-9fffh ;1/2k colour RAM: Bits 0-3: colour. (palette scheme 0-15)
46                               Bit    4: 0=charset1, 1=charset2.
47                               Bit    5: (not used by CC)
48                               Bit    6: x invert.
49                               Bit    7: y invert. (not used by CC)
50 
51 a000h ;RD: Player 1 controls.
52             Bit 0: Left up
53                 1: Left down
54                 2: Left left
55                 3: Left right
56                 4: Right up
57                 5: Right down
58                 6: Right left
59                 7: Right right
60 
61 a000h ;WR: Non Maskable interrupt.
62             Bit 0: 0=NMI disable, 1=NMI enable.
63 
64 a001h ;WR: Horizontal video direction (Crazy Kong sets it to 1).
65             Bit 0: 0=Normal, 1=invert.
66 
67 a002h ;WR: Vertical video direction (Crazy Kong sets it to 1).
68             Bit 0: 0=Normal, 1=invert.
69 
70 a004h ;WR: Sample trigger.
71             Bit 0: 0=Trigger.
72 
73 a800h ;RD: Player 2 controls (table model only).
74             Bit 0: Left up
75                 1: Left down
76                 2: Left left
77                 3: Left right
78                 4: Right up
79                 5: Right down
80                 6: Right left
81                 7: Right right
82 
83 
84 a800h ;WR: Sample rate speed.
85               Full byte value (0-255).
86 
87 b000h ;RD: DIP switches.
88             Bit 1,0: Number of climbers.
89                      00=3, 01=4, 10=5, 11=6.
90             Bit   2: Extra climber bonus.
91                      0=30000, 1=50000.
92             Bit   3: 1=Test Pattern
93             Bit 5,4: Coins per credit.
94                      00=1, 01=2, 10=3 11=4.
95             Bit 7,6: Plays per credit.
96                      00=1, 01=2, 10=3, 11=Freeplay.
97 
98 b000h ;WR: Sample volume.
99             Bits 0-5: Volume (0-31).
100 
101 b800h ;RD: Machine switches.
102             Bit 0: Coin 1.
103             Bit 1: Coin 2.
104             Bit 2: 1 Player start.
105             Bit 3: 2 Player start.
106             Bit 4: Upright/table select.
107                    0=table, 1=upright.
108 
109 
110 I/O 8  ;AY-3-8910 Control Reg.
111 I/O 9  ;AY-3-8910 Data Write Reg.
112 I/O C  ;AY-3-8910 Data Read Reg.
113         Port A of the 8910 selects the digital sample to play
114 
115 Changes:
116 25 Jan 98 LBO
117         * Added support for the real Swimmer bigsprite ROMs, courtesy of Gary Walton.
118         * Increased the IRQs for the Swimmer audio CPU to 4 to make it more "jaunty".
119           Not sure if this is accurate, but it should be closer.
120 3 Mar 98 LBO
121         * Added alternate version of Swimmer.
122 
123 TODO:
124         * Verify timings of sound/music on Swimmer.
125 
126 ***************************************************************************/
127 
128 #include "driver.h"
129 #include "vidhrdw/generic.h"
130 
131 
132 
133 extern unsigned char *cclimber_bsvideoram;
134 extern size_t cclimber_bsvideoram_size;
135 extern unsigned char *cclimber_bigspriteram;
136 extern unsigned char *cclimber_column_scroll;
137 WRITE_HANDLER( cclimber_colorram_w );
138 WRITE_HANDLER( cclimber_bigsprite_videoram_w );
139 PALETTE_INIT( cclimber );
140 VIDEO_UPDATE( cclimber );
141 
142 extern struct AY8910interface cclimber_ay8910_interface;
143 extern struct AY8910interface swimmer_ay8910_interface;
144 extern struct CustomSound_interface cclimber_custom_interface;
145 WRITE_HANDLER( cclimber_sample_trigger_w );
146 WRITE_HANDLER( cclimber_sample_rate_w );
147 WRITE_HANDLER( cclimber_sample_volume_w );
148 
149 
WRITE_HANDLER(flip_screen_x_w)150 static WRITE_HANDLER( flip_screen_x_w )
151 {
152 	flip_screen_x_set(data);
153 }
154 
WRITE_HANDLER(flip_screen_y_w)155 static WRITE_HANDLER( flip_screen_y_w )
156 {
157 	flip_screen_y_set(data);
158 }
159 
160 
MACHINE_INIT(cclimber)161 static MACHINE_INIT( cclimber )
162 {
163 	/* Disable interrupts, River Patrol / Silver Land needs this */
164 	cpu_interrupt_enable(0,0);
165 }
166 
167 
168 
169 /* Note that River Patrol reads/writes to a000-a4f0. This is a bug in the code.
170    The instruction at 0x0593 should say LD DE,$8000 */
171 
MEMORY_READ_START(readmem)172 static MEMORY_READ_START( readmem )
173 	{ 0x0000, 0x5fff, MRA_ROM },
174 	{ 0x6000, 0x6bff, MRA_RAM },	/* Crazy Kong only */
175 	{ 0x8000, 0x83ff, MRA_RAM },
176 	{ 0x8800, 0x8bff, MRA_RAM },
177 	{ 0x9000, 0x93ff, MRA_RAM },	/* video RAM */
178 	{ 0x9800, 0x9bff, MRA_RAM },	/* column scroll registers */
179 	{ 0x9c00, 0x9fff, MRA_RAM },	/* color RAM */
180 	{ 0xa000, 0xa000, input_port_0_r },     /* IN0 */
181 	{ 0xa800, 0xa800, input_port_1_r },     /* IN1 */
182 	{ 0xb000, 0xb000, input_port_2_r },     /* DSW */
183 	{ 0xb800, 0xb800, input_port_3_r },     /* IN2 */
184 MEMORY_END
185 
186 static MEMORY_WRITE_START( writemem )
187 	{ 0x0000, 0x5fff, MWA_ROM },
188 	{ 0x6000, 0x6bff, MWA_RAM },    /* Crazy Kong only */
189 	{ 0x8000, 0x83ff, MWA_RAM },
190 	{ 0x8800, 0x88ff, cclimber_bigsprite_videoram_w, &cclimber_bsvideoram, &cclimber_bsvideoram_size },
191 	{ 0x8900, 0x8bff, MWA_RAM },  /* not used, but initialized */
192 	{ 0x9000, 0x93ff, videoram_w, &videoram, &videoram_size },
193 	{ 0x9400, 0x97ff, videoram_w }, /* mirror address, used by Crazy Climber to draw windows */
194 	/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
195 	/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
196 	{ 0x9800, 0x981f, MWA_RAM, &cclimber_column_scroll },
197 	{ 0x9880, 0x989f, MWA_RAM, &spriteram, &spriteram_size },
198 	{ 0x98dc, 0x98df, MWA_RAM, &cclimber_bigspriteram },
199 	{ 0x9800, 0x9bff, MWA_RAM },  /* not used, but initialized */
200 	{ 0x9c00, 0x9fff, cclimber_colorram_w, &colorram },
201 	{ 0xa000, 0xa000, interrupt_enable_w },
202 	{ 0xa001, 0xa001, flip_screen_x_w },
203 	{ 0xa002, 0xa002, flip_screen_y_w },
204 	{ 0xa004, 0xa004, cclimber_sample_trigger_w },
205 	{ 0xa800, 0xa800, cclimber_sample_rate_w },
206 	{ 0xb000, 0xb000, cclimber_sample_volume_w },
207 MEMORY_END
208 
209 static MEMORY_READ_START( cannonb_readmem )
210 	{ 0x0000, 0x5fff, MRA_ROM },
211 	{ 0x6000, 0x6bff, MRA_RAM },	/* Crazy Kong only, Cannon Ball also*/
212 	{ 0x8000, 0x83ff, MRA_RAM },
213 
214 	{ 0x8800, 0x8800, MRA_NOP }, /* must not return what's written (game will reset after coin insert if it returns 0xff)*/
215 
216 //{ 0x8800, 0x8bff, MRA_RAM },
217 
218 	{ 0x9000, 0x93ff, MRA_RAM },	/* video RAM */
219 	{ 0x9800, 0x981f, MRA_RAM },	/* column scroll registers */
220 	{ 0x9820, 0x9bff, MRA_RAM },	/* */
221 	{ 0x9c00, 0x9fff, MRA_RAM },	/* color RAM */
222 
223 	{ 0xa000, 0xa000, input_port_0_r },     /* IN0 */
224 	{ 0xa800, 0xa800, input_port_1_r },     /* IN1 */
225 	{ 0xb000, 0xb000, input_port_2_r },     /* DSW */
226 	{ 0xb800, 0xb800, input_port_3_r },     /* IN2 */
227 MEMORY_END
228 
229 static MEMORY_WRITE_START( cannonb_writemem )
230 
231 	{ 0x5045, 0x505f, MWA_NOP},	/* do not errorlog this */
232 
233 	{ 0x0000, 0x5fff, MWA_ROM },
234 
235 	{ 0x6000, 0x6bff, MWA_RAM },    /* Crazy Kong only, Cannon Ball also */
236 	{ 0x8000, 0x83ff, MWA_RAM },
237 
238 	{ 0x8800, 0x88ff, cclimber_bigsprite_videoram_w, &cclimber_bsvideoram, &cclimber_bsvideoram_size },
239 //{ 0x8900, 0x8bff, MWA_RAM },  /* not used, but initialized */
240 	{ 0x9000, 0x93ff, videoram_w, &videoram, &videoram_size },
241 	{ 0x9400, 0x97ff, videoram_w }, /* mirror address, used by Crazy Climber to draw windows */
242 	/* 9800-9bff and 9c00-9fff share the same RAM, interleaved */
243 	/* (9800-981f for scroll, 9c20-9c3f for color RAM, and so on) */
244 	{ 0x9800, 0x981f, MWA_RAM, &cclimber_column_scroll },
245 	{ 0x9880, 0x989f, MWA_RAM, &spriteram, &spriteram_size },
246 	{ 0x98dc, 0x98df, MWA_RAM, &cclimber_bigspriteram },
247 	{ 0x9800, 0x9bff, MWA_RAM },  /* not used, but initialized */
248 	{ 0x9c00, 0x9fff, cclimber_colorram_w, &colorram },
249 	{ 0xa000, 0xa000, interrupt_enable_w },
250 	{ 0xa001, 0xa001, flip_screen_x_w },
251 	{ 0xa002, 0xa002, flip_screen_y_w },
252 	{ 0xa004, 0xa004, cclimber_sample_trigger_w },
253 	{ 0xa800, 0xa800, cclimber_sample_rate_w },
254 	{ 0xb000, 0xb000, cclimber_sample_volume_w },
255 MEMORY_END
256 
257 
258 static PORT_READ_START( readport )
259 	{ 0x0c, 0x0c, AY8910_read_port_0_r },
260 PORT_END
261 
262 static PORT_WRITE_START( writeport )
263 	{ 0x08, 0x08, AY8910_control_port_0_w },
264 	{ 0x09, 0x09, AY8910_write_port_0_w },
265 PORT_END
266 
267 
268 
269 INPUT_PORTS_START( cclimber )
270 	PORT_START      /* IN0 */
271 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP     | IPF_8WAY )
272 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN   | IPF_8WAY )
273 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT   | IPF_8WAY )
274 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT  | IPF_8WAY )
275 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY )
276 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY )
277 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY )
278 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY )
279 
280 	PORT_START      /* IN1 */
281 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP     | IPF_8WAY | IPF_COCKTAIL )
282 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN   | IPF_8WAY | IPF_COCKTAIL )
283 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT   | IPF_8WAY | IPF_COCKTAIL )
284 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT  | IPF_8WAY | IPF_COCKTAIL )
285 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY | IPF_COCKTAIL )
286 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY | IPF_COCKTAIL )
287 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY | IPF_COCKTAIL )
288 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY | IPF_COCKTAIL )
289 
290 	PORT_START      /* DSW */
291 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
292 	PORT_DIPSETTING(    0x00, "3" )
293 	PORT_DIPSETTING(    0x01, "4" )
294 	PORT_DIPSETTING(    0x02, "5" )
295 	PORT_DIPSETTING(    0x03, "6" )
296 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )		// Look code at 0x03c4 : 0x8076 is never tested !
297 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
298 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
299 	PORT_BITX(    0x08, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Test", KEYCODE_F1, IP_JOY_NONE )
300 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
301 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
302 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
303 	PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
304 	PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
305 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
306 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
307 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )		// Also "Bonus Life" due to code at 0x03d4
308 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )		// Bonus life : 30000 points
309 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )		// Bonus life : 50000 points
310 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )		// Bonus life : 30000 points
311 	PORT_DIPSETTING(    0xc0, DEF_STR( Free_Play ) )	// Bonus life : 50000 points
312 
313 	PORT_START      /* IN2 */
314 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
315 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
316 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
317 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
318 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
319 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
320 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
321 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
322 INPUT_PORTS_END
323 
324 /* Same as 'cclimber' but correct "Bonus Life" Dip Switch */
325 INPUT_PORTS_START( cclimbrj )
326 	PORT_START      /* IN0 */
327 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP     | IPF_8WAY )
328 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN   | IPF_8WAY )
329 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT   | IPF_8WAY )
330 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT  | IPF_8WAY )
331 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY )
332 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY )
333 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY )
334 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY )
335 
336 	PORT_START      /* IN1 */
337 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP     | IPF_8WAY | IPF_COCKTAIL )
338 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN   | IPF_8WAY | IPF_COCKTAIL )
339 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT   | IPF_8WAY | IPF_COCKTAIL )
340 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT  | IPF_8WAY | IPF_COCKTAIL )
341 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP    | IPF_8WAY | IPF_COCKTAIL )
342 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN  | IPF_8WAY | IPF_COCKTAIL )
343 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT  | IPF_8WAY | IPF_COCKTAIL )
344 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT | IPF_8WAY | IPF_COCKTAIL )
345 
346 	PORT_START      /* DSW */
347 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
348 	PORT_DIPSETTING(    0x00, "3" )
349 	PORT_DIPSETTING(    0x01, "4" )
350 	PORT_DIPSETTING(    0x02, "5" )
351 	PORT_DIPSETTING(    0x03, "6" )
352 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Bonus_Life ) )
353 	PORT_DIPSETTING(    0x00, "30000" )
354 	PORT_DIPSETTING(    0x04, "50000" )
355 	PORT_BITX(    0x08, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Test", KEYCODE_F1, IP_JOY_NONE )
356 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
357 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
358 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
359 	PORT_DIPSETTING(    0x30, DEF_STR( 4C_1C ) )
360 	PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
361 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
362 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
363 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
364 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
365 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
366 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
367 	PORT_DIPSETTING(    0xc0, DEF_STR( Free_Play ) )
368 
369 	PORT_START      /* IN2 */
370 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
371 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
372 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
373 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
374 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
375 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
376 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
377 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
378 INPUT_PORTS_END
379 
380 
381 /* copy of ckong with few changes */
382 INPUT_PORTS_START( cannonb )
383 	PORT_START      /* IN0 */
384 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
385 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
386 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
387 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
388 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
389 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
390 
391 	PORT_START      /* IN1 */
392 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
393 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
394 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
395 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
396 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
397 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
398 
399 	PORT_START      /* DSW */
400 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
401 	PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
402 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
403 	PORT_DIPNAME( 0x02, 0x00, "Player title" )
404 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
405 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
406 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) //there is cocktail mode around here
407 	PORT_DIPSETTING(    0x00, "7000" )//on
408 	PORT_DIPSETTING(    0x04, "10000" )//cocktail off
409 	PORT_DIPSETTING(    0x08, "15000" )//on
410 	PORT_DIPSETTING(    0x0c, "20000" )//cocktail off
411 	PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
412 	PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
413 	PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
414 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
415 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
416 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
417 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
418 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
419 	PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
420 	PORT_DIPNAME( 0x80, 0x00, "Unknown 1" )
421 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
422 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
423 
424 	PORT_START      /* IN2 - verified */
425 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
426 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
427 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
428 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
429 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
430 INPUT_PORTS_END
431 
432 
433 /* several differences with cclimber: note that IN2 bits are ACTIVE_LOW, while in */
434 /* cclimber they are ACTIVE_HIGH. */
435 INPUT_PORTS_START( ckong )
436 	PORT_START      /* IN0 */
437 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
438 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
439 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
440 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
441 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
442 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
443 
444 	PORT_START      /* IN1 */
445 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
446 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
447 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
448 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
449 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
450 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
451 
452 	PORT_START      /* DSW */
453 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
454 	PORT_DIPSETTING(    0x00, "3" )
455 	PORT_DIPSETTING(    0x01, "4" )
456 	PORT_DIPSETTING(    0x02, "5" )
457 	PORT_DIPSETTING(    0x03, "6" )
458 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
459 	PORT_DIPSETTING(    0x00, "7000" )
460 	PORT_DIPSETTING(    0x04, "10000" )
461 	PORT_DIPSETTING(    0x08, "15000" )
462 	PORT_DIPSETTING(    0x0c, "20000" )
463 	PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )
464 	PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
465 	PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
466 	PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
467 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
468 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
469 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
470 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
471 	PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
472 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
473 	PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
474 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
475 
476 	PORT_START      /* IN2 */
477 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
478 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
479 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
480 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
481 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
482 INPUT_PORTS_END
483 
484 INPUT_PORTS_START( rpatrolb )
485 	PORT_START      /* IN0 */
486 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
487 	PORT_BIT( 0x3e, IP_ACTIVE_HIGH, IPT_UNKNOWN )
488 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_2WAY | IPF_COCKTAIL )
489 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
490 
491 	PORT_START      /* IN1 */
492 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
493 	PORT_BIT( 0x3e, IP_ACTIVE_HIGH, IPT_UNKNOWN )
494 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_2WAY )
495 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
496 
497 	PORT_START      /* DSW */
498 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) )
499 	PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
500 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
501 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
502 	PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )
503 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
504 	PORT_DIPSETTING(    0x00, "3" )
505 	PORT_DIPSETTING(    0x04, "4" )
506 	PORT_DIPSETTING(    0x08, "5" )
507 	PORT_DIPSETTING(    0x0c, "6" )
508 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
509 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
510 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
511 	PORT_DIPNAME( 0x20, 0x00, "Unknown 1" )  /* Probably unused */
512 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
513 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
514 	PORT_DIPNAME( 0x40, 0x00, "Unknown 2" )  /* Probably unused */
515 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
516 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
517 	PORT_DIPNAME( 0x80, 0x80, "Memory Test" )
518 	PORT_DIPSETTING(    0x00, "Retry on Error" )
519 	PORT_DIPSETTING(    0x80, "Stop on Error" )
520 
521 	PORT_START      /* IN0 */
522 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
523 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
524 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
525 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
526 	PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
527 INPUT_PORTS_END
528 
529 
530 
531 static struct GfxLayout charlayout =
532 {
533 	8,8,    /* 8*8 characters */
534 	512,    /* 512 characters (256 in Crazy Climber) */
535 	2,      /* 2 bits per pixel */
536 	{ 0, 512*8*8 }, /* the two bitplanes are separated */
537 	{ 0, 1, 2, 3, 4, 5, 6, 7 },     /* pretty straightforward layout */
538 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
539 	8*8     /* every char takes 8 consecutive bytes */
540 };
541 static struct GfxLayout bscharlayout =
542 {
543 	8,8,    /* 8*8 characters */
544 	256,    /* 256 characters */
545 	2,      /* 2 bits per pixel */
546 	{ 0, 256*8*8 }, /* the bitplanes are separated */
547 	{ 0, 1, 2, 3, 4, 5, 6, 7 },     /* pretty straightforward layout */
548 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
549 	8*8     /* every char takes 8 consecutive bytes */
550 };
551 static struct GfxLayout spritelayout =
552 {
553 	16,16,  /* 16*16 sprites */
554 	128,    /* 128 sprites (64 in Crazy Climber) */
555 	2,      /* 2 bits per pixel */
556 	{ 0, 128*16*16 },       /* the bitplanes are separated */
557 	{ 0, 1, 2, 3, 4, 5, 6, 7,       /* pretty straightforward layout */
558 			8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
559 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
560 			16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
561 	32*8    /* every sprite takes 32 consecutive bytes */
562 };
563 
564 static struct GfxDecodeInfo gfxdecodeinfo[] =
565 {
566 	{ REGION_GFX1, 0x0000, &charlayout,      0, 16 }, /* char set #1 */
567 	{ REGION_GFX1, 0x2000, &charlayout,      0, 16 }, /* char set #2 */
568 	{ REGION_GFX2, 0x0000, &bscharlayout, 16*4,  8 }, /* big sprite char set */
569 	{ REGION_GFX1, 0x0000, &spritelayout,    0, 16 }, /* sprite set #1 */
570 	{ REGION_GFX1, 0x2000, &spritelayout,    0, 16 }, /* sprite set #2 */
571 	{ -1 } /* end of array */
572 };
573 
574 
575 
576 static MACHINE_DRIVER_START( cclimber )
577 
578 	/* basic machine hardware */
579 	MDRV_CPU_ADD(Z80, 3072000)	/* 3.072 MHz */
MDRV_CPU_MEMORY(readmem,writemem)580 	MDRV_CPU_MEMORY(readmem,writemem)
581 	MDRV_CPU_PORTS(readport,writeport)
582 	MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
583 
584 	MDRV_FRAMES_PER_SECOND(60)
585 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
586 	MDRV_MACHINE_INIT(cclimber)
587 
588 	/* video hardware */
589 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
590 	MDRV_SCREEN_SIZE(32*8, 32*8)
591 	MDRV_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
592 	MDRV_GFXDECODE(gfxdecodeinfo)
593 	MDRV_PALETTE_LENGTH(96)
594 	MDRV_COLORTABLE_LENGTH(16*4+8*4)
595 
596 	MDRV_PALETTE_INIT(cclimber)
597 	MDRV_VIDEO_START(generic)
598 	MDRV_VIDEO_UPDATE(cclimber)
599 
600 	/* sound hardware */
601 	MDRV_SOUND_ADD(AY8910, cclimber_ay8910_interface)
602 	MDRV_SOUND_ADD(CUSTOM, cclimber_custom_interface)
603 MACHINE_DRIVER_END
604 
605 
606 /* copy of cclimber except for readmem and writemem */
607 static MACHINE_DRIVER_START( cannonb )
608 
609 	/* basic machine hardware */
610 	MDRV_CPU_ADD(Z80, 3072000)	/* 3.072 MHz */
611 	MDRV_CPU_MEMORY(cannonb_readmem,cannonb_writemem)
612 	MDRV_CPU_PORTS(readport,writeport)
613 	MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
614 
615 	MDRV_FRAMES_PER_SECOND(60)
616 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
617 	MDRV_MACHINE_INIT(cclimber)
618 
619 	/* video hardware */
620 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
621 	MDRV_SCREEN_SIZE(32*8, 32*8)
622 	MDRV_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
623 	MDRV_GFXDECODE(gfxdecodeinfo)
624 	MDRV_PALETTE_LENGTH(96)
625 	MDRV_COLORTABLE_LENGTH(16*4+8*4)
626 
627 	MDRV_PALETTE_INIT(cclimber)
628 	MDRV_VIDEO_START(generic)
629 	MDRV_VIDEO_UPDATE(cclimber)
630 
631 	/* sound hardware */
632 	MDRV_SOUND_ADD(AY8910, cclimber_ay8910_interface)
633 	MDRV_SOUND_ADD(CUSTOM, cclimber_custom_interface)
634 MACHINE_DRIVER_END
635 
636 
637 /***************************************************************************
638 
639   Game driver(s)
640 
641 ***************************************************************************/
642 
643 ROM_START( cclimber )
644 	ROM_REGION( 2*0x10000, REGION_CPU1, 0 )	/* 64k for code + 64k for decrypted opcodes */
645 	ROM_LOAD( "cc11",         0x0000, 0x1000, CRC(217ec4ff) SHA1(334604c3a051d57440a9d0bfc34b809418ef1d2d) )
646 	ROM_LOAD( "cc10",         0x1000, 0x1000, CRC(b3c26cef) SHA1(f52cb5482c12a9c5fb56e2e2aec7cab0ed23e5a5) )
647 	ROM_LOAD( "cc09",         0x2000, 0x1000, CRC(6db0879c) SHA1(c0ba1976c1dcd6edadd78073173a26851ae8dd4f) )
648 	ROM_LOAD( "cc08",         0x3000, 0x1000, CRC(f48c5fe3) SHA1(79072bbbf37387998ffd031afe8eb569a16fa9bd) )
649 	ROM_LOAD( "cc07",         0x4000, 0x1000, CRC(3e873baf) SHA1(8870dc5948cdd3c8d2fe9e54a20cf6c311c94e53) )
650 
651 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
652 	ROM_LOAD( "cc06",         0x0000, 0x0800, CRC(481b64cc) SHA1(3f35c545fc784ed4f969aba2d7be6e13a5ae32b7) )
653 	/* empty hole - Crazy Kong has an additional ROM here */
654 	ROM_LOAD( "cc04",         0x1000, 0x0800, CRC(332347cb) SHA1(4115ca32af73f1791635b7d9e093bf77088a8222) )
655 	/* empty hole - Crazy Kong has an additional ROM here */
656 	ROM_LOAD( "cc05",         0x2000, 0x0800, CRC(2c33b760) SHA1(2edea8fe13376fbd51a5586d97aba3b30d78e94b) )
657 	/* empty hole - Crazy Kong has an additional ROM here */
658 	ROM_LOAD( "cc03",         0x3000, 0x0800, CRC(4e4b3658) SHA1(0d39a8cb5cd6cf06008be60707f9b277a8a32a2d) )
659 	/* empty hole - Crazy Kong has an additional ROM here */
660 
661 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
662 	ROM_LOAD( "cc02",         0x0000, 0x0800, CRC(14f3ecc9) SHA1(a1b5121abfbe8f07580eb3fa6384352d239a3d75) )
663 	ROM_LOAD( "cc01",         0x0800, 0x0800, CRC(21c0f9fb) SHA1(44fad56d302a439257216ddac9fd62b3666589f1) )
664 
665 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
666 	ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
667 	ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
668 	ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
669 
670 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
671 	ROM_LOAD( "cc13",         0x0000, 0x1000, CRC(e0042f75) SHA1(86cb31b110742a0f7ae33052c88f42d00deb5468) )
672 	ROM_LOAD( "cc12",         0x1000, 0x1000, CRC(5da13aaa) SHA1(b2d41e69435d09c456648a10e33f5e1fbb0bc64c) )
673 ROM_END
674 
675 ROM_START( cclimbrj )
676 	ROM_REGION( 2*0x10000, REGION_CPU1, 0 )	/* 64k for code + 64k for decrypted opcodes */
677 	ROM_LOAD( "cc11j.bin",    0x0000, 0x1000, CRC(89783959) SHA1(948fa88fcb9e3797b9c10934d36cf6a55cb590fe) )
678 	ROM_LOAD( "cc10j.bin",    0x1000, 0x1000, CRC(14eda506) SHA1(4bc55b4c4ec197952b05ad32584f15f0383cc2df) )
679 	ROM_LOAD( "cc09j.bin",    0x2000, 0x1000, CRC(26489069) SHA1(9be4d4a22dd334e619416e6c846a05003c0d687e) )
680 	ROM_LOAD( "cc08j.bin",    0x3000, 0x1000, CRC(b33c96f8) SHA1(3974f4a60f37bed9e4faee7dafb565f553b9c201) )
681 	ROM_LOAD( "cc07j.bin",    0x4000, 0x1000, CRC(fbc9626c) SHA1(32be2d06321b2943718d0bec77ec9ebb806e4b93) )
682 
683 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
684 	ROM_LOAD( "cc06",         0x0000, 0x0800, CRC(481b64cc) SHA1(3f35c545fc784ed4f969aba2d7be6e13a5ae32b7) )
685 	/* empty hole - Crazy Kong has an additional ROM here */
686 	ROM_LOAD( "cc04",         0x1000, 0x0800, CRC(332347cb) SHA1(4115ca32af73f1791635b7d9e093bf77088a8222) )
687 	/* empty hole - Crazy Kong has an additional ROM here */
688 	ROM_LOAD( "cc05",         0x2000, 0x0800, CRC(2c33b760) SHA1(2edea8fe13376fbd51a5586d97aba3b30d78e94b) )
689 	/* empty hole - Crazy Kong has an additional ROM here */
690 	ROM_LOAD( "cc03",         0x3000, 0x0800, CRC(4e4b3658) SHA1(0d39a8cb5cd6cf06008be60707f9b277a8a32a2d) )
691 	/* empty hole - Crazy Kong has an additional ROM here */
692 
693 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
694 	ROM_LOAD( "cc02",         0x0000, 0x0800, CRC(14f3ecc9) SHA1(a1b5121abfbe8f07580eb3fa6384352d239a3d75) )
695 	ROM_LOAD( "cc01",         0x0800, 0x0800, CRC(21c0f9fb) SHA1(44fad56d302a439257216ddac9fd62b3666589f1) )
696 
697 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
698 	ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
699 	ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
700 	ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
701 
702 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
703 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
704 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
705 ROM_END
706 
707 ROM_START( ccboot )
708 	ROM_REGION( 2*0x10000, REGION_CPU1, 0 )	/* 64k for code + 64k for decrypted opcodes */
709 	ROM_LOAD( "m11.bin",      0x0000, 0x1000, CRC(5efbe180) SHA1(e0c24f21d563da075eb5019d0e76cb01c2598c7a) )
710 	ROM_LOAD( "m10.bin",      0x1000, 0x1000, CRC(be2748c7) SHA1(ae66bc4e5e02bf9944a3ee4b0d2dec073f732260) )
711 	ROM_LOAD( "cc09j.bin",    0x2000, 0x1000, CRC(26489069) SHA1(9be4d4a22dd334e619416e6c846a05003c0d687e) )
712 	ROM_LOAD( "m08.bin",      0x3000, 0x1000, CRC(e3c542d6) SHA1(645cc4c94d1b1601c0083b156de67ec47fe2449f) )
713 	ROM_LOAD( "cc07j.bin",    0x4000, 0x1000, CRC(fbc9626c) SHA1(32be2d06321b2943718d0bec77ec9ebb806e4b93) )
714 
715 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
716 	ROM_LOAD( "cc06",         0x0000, 0x0800, CRC(481b64cc) SHA1(3f35c545fc784ed4f969aba2d7be6e13a5ae32b7) )
717 	/* empty hole - Crazy Kong has an additional ROM here */
718 	ROM_LOAD( "m04.bin",      0x1000, 0x0800, CRC(6fb80538) SHA1(6ba5add5c0190e79191b3fa749a1b94e766e3950) )
719 	/* empty hole - Crazy Kong has an additional ROM here */
720 	ROM_LOAD( "m05.bin",      0x2000, 0x0800, CRC(056af36b) SHA1(756a295bbf7ede201b2e4cb106ce67a127e008de) )
721 	/* empty hole - Crazy Kong has an additional ROM here */
722 	ROM_LOAD( "m03.bin",      0x3000, 0x0800, CRC(67127253) SHA1(e27556ed74e73644a2578ce6645c312d64f484c6) )
723 	/* empty hole - Crazy Kong has an additional ROM here */
724 
725 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
726 	ROM_LOAD( "m02.bin",      0x0000, 0x0800, CRC(7f4877de) SHA1(c9aa9ff1b6cf907917fedfbd419b15ac337cf7bb) )
727 	ROM_LOAD( "m01.bin",      0x0800, 0x0800, CRC(49fab908) SHA1(9665d6e26f390afcbf0ed9fe8fea9be94fbb3a84) )
728 
729 	ROM_REGION( 0x0160, REGION_PROMS, 0 )
730 	ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
731 	ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
732 	ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
733 	ROM_LOAD( "ccboot.prm",   0x0060, 0x0100, CRC(9e11550d) SHA1(b8cba8e16e10e23fba1f11551102ab77b680bdf0) )	/* decryption table (not used) */
734 
735 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
736 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
737 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
738 ROM_END
739 
740 ROM_START( ccboot2 )
741 	ROM_REGION( 2*0x10000, REGION_CPU1, 0 )	/* 64k for code + 64k for decrypted opcodes */
742 	ROM_LOAD( "11.4k",        0x0000, 0x1000, CRC(b2b17e24) SHA1(1242d64242b3a6fe099457d155ebc508e5482818) )
743 	ROM_LOAD( "10.4j",        0x1000, 0x1000, CRC(8382bc0f) SHA1(2390ee2ec08a074c7bc4b9c7750b979a1d3a8a67) )
744 	ROM_LOAD( "cc09j.bin",    0x2000, 0x1000, CRC(26489069) SHA1(9be4d4a22dd334e619416e6c846a05003c0d687e) )
745 	ROM_LOAD( "m08.bin",      0x3000, 0x1000, CRC(e3c542d6) SHA1(645cc4c94d1b1601c0083b156de67ec47fe2449f) )
746 	ROM_LOAD( "cc07j.bin",    0x4000, 0x1000, CRC(fbc9626c) SHA1(32be2d06321b2943718d0bec77ec9ebb806e4b93) )
747 
748 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
749 	ROM_LOAD( "cc06",         0x0000, 0x0800, CRC(481b64cc) SHA1(3f35c545fc784ed4f969aba2d7be6e13a5ae32b7) )
750 	/* empty hole - Crazy Kong has an additional ROM here */
751 	ROM_LOAD( "cc04",         0x1000, 0x0800, CRC(332347cb) SHA1(4115ca32af73f1791635b7d9e093bf77088a8222) )
752 	/* empty hole - Crazy Kong has an additional ROM here */
753 	ROM_LOAD( "cc05",         0x2000, 0x0800, CRC(2c33b760) SHA1(2edea8fe13376fbd51a5586d97aba3b30d78e94b) )
754 	/* empty hole - Crazy Kong has an additional ROM here */
755 	ROM_LOAD( "cc03",         0x3000, 0x0800, CRC(4e4b3658) SHA1(0d39a8cb5cd6cf06008be60707f9b277a8a32a2d) )
756 	/* empty hole - Crazy Kong has an additional ROM here */
757 
758 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
759 	ROM_LOAD( "cc02",         0x0000, 0x0800, CRC(14f3ecc9) SHA1(a1b5121abfbe8f07580eb3fa6384352d239a3d75) )
760 	ROM_LOAD( "cc01",         0x0800, 0x0800, CRC(21c0f9fb) SHA1(44fad56d302a439257216ddac9fd62b3666589f1) )
761 
762 	ROM_REGION( 0x0160, REGION_PROMS, 0 )
763 	ROM_LOAD( "cclimber.pr1", 0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
764 	ROM_LOAD( "cclimber.pr2", 0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
765 	ROM_LOAD( "cclimber.pr3", 0x0040, 0x0020, CRC(71317756) SHA1(1195f0a037e379cc1a3c0314cb746f5cd2bffe50) )
766 	ROM_LOAD( "ccboot.prm",   0x0060, 0x0100, CRC(9e11550d) SHA1(b8cba8e16e10e23fba1f11551102ab77b680bdf0) )	/* decryption table (not used) */
767 
768 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
769 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
770 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
771 ROM_END
772 
773 ROM_START( ckong )
774 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
775 	ROM_LOAD( "d05-07.bin",   0x0000, 0x1000, CRC(b27df032) SHA1(57f9be139c610405e3c2fddd7093dfb1277e450e) )
776 	ROM_LOAD( "f05-08.bin",   0x1000, 0x1000, CRC(5dc1aaba) SHA1(42b9e5946ffce7c156d114bde68f37c2c34853c4) )
777 	ROM_LOAD( "h05-09.bin",   0x2000, 0x1000, CRC(c9054c94) SHA1(1aa08d2501ee620759fd5c111e12f6d432c25294) )
778 	ROM_LOAD( "k05-10.bin",   0x3000, 0x1000, CRC(069c4797) SHA1(03be185e6914ec7f3770ce3da4eb49cdb97adc85) )
779 	ROM_LOAD( "l05-11.bin",   0x4000, 0x1000, CRC(ae159192) SHA1(d467256a3a366e246243e7828ff4a45d4c146e2c) )
780 	ROM_LOAD( "n05-12.bin",   0x5000, 0x1000, CRC(966bc9ab) SHA1(4434fc620169ffea1b1f227b61674e1daf79b54b) )
781 
782 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
783 	ROM_LOAD( "n11-06.bin",   0x0000, 0x1000, CRC(2dcedd12) SHA1(dfdcfc21bcba7c8e148ee54daae511ca78c58e70) )
784 	ROM_LOAD( "k11-04.bin",   0x1000, 0x1000, CRC(3375b3bd) SHA1(a00b3c31cff123aab6ac0833aabfdd663302971a) )
785 	ROM_LOAD( "l11-05.bin",   0x2000, 0x1000, CRC(fa7cbd91) SHA1(0208d2ebc59f3600005476b6987472685bc99d67) )
786 	ROM_LOAD( "h11-03.bin",   0x3000, 0x1000, CRC(5655cc11) SHA1(5195e9b2a60c54280b48b32ee8248090904dbc51) )
787 
788 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
789 	ROM_LOAD( "c11-02.bin",   0x0000, 0x0800, CRC(d1352c31) SHA1(da726a63a8be830d695afeddc1717749af8c9d47) )
790 	ROM_LOAD( "a11-01.bin",   0x0800, 0x0800, CRC(a7a2fdbd) SHA1(529865f8bbfbdbbf34ac39c70ef17e6d5bd0f845) )
791 
792 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
793 	ROM_LOAD( "prom.v6",      0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) )
794 	ROM_LOAD( "prom.u6",      0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) )
795 	ROM_LOAD( "prom.t6",      0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) )
796 
797 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
798 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
799 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
800 ROM_END
801 
802 ROM_START( ckonga )
803 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
804 	ROM_LOAD( "d05-07.bin",   0x0000, 0x1000, CRC(b27df032) SHA1(57f9be139c610405e3c2fddd7093dfb1277e450e) )
805 	ROM_LOAD( "f05-08.bin",   0x1000, 0x1000, CRC(5dc1aaba) SHA1(42b9e5946ffce7c156d114bde68f37c2c34853c4) )
806 	ROM_LOAD( "h05-09.bin",   0x2000, 0x1000, CRC(c9054c94) SHA1(1aa08d2501ee620759fd5c111e12f6d432c25294) )
807 	ROM_LOAD( "10.dat",       0x3000, 0x1000, CRC(c3beb501) SHA1(14f49c45fc7c91799034c5a51fca310f0a66b1d7) )
808 	ROM_LOAD( "l05-11.bin",   0x4000, 0x1000, CRC(ae159192) SHA1(d467256a3a366e246243e7828ff4a45d4c146e2c) )
809 	ROM_LOAD( "n05-12.bin",   0x5000, 0x1000, CRC(966bc9ab) SHA1(4434fc620169ffea1b1f227b61674e1daf79b54b) )
810 
811 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
812 	ROM_LOAD( "n11-06.bin",   0x0000, 0x1000, CRC(2dcedd12) SHA1(dfdcfc21bcba7c8e148ee54daae511ca78c58e70) )
813 	ROM_LOAD( "k11-04.bin",   0x1000, 0x1000, CRC(3375b3bd) SHA1(a00b3c31cff123aab6ac0833aabfdd663302971a) )
814 	ROM_LOAD( "l11-05.bin",   0x2000, 0x1000, CRC(fa7cbd91) SHA1(0208d2ebc59f3600005476b6987472685bc99d67) )
815 	ROM_LOAD( "h11-03.bin",   0x3000, 0x1000, CRC(5655cc11) SHA1(5195e9b2a60c54280b48b32ee8248090904dbc51) )
816 
817 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
818 	ROM_LOAD( "c11-02.bin",   0x0000, 0x0800, CRC(d1352c31) SHA1(da726a63a8be830d695afeddc1717749af8c9d47) )
819 	ROM_LOAD( "a11-01.bin",   0x0800, 0x0800, CRC(a7a2fdbd) SHA1(529865f8bbfbdbbf34ac39c70ef17e6d5bd0f845) )
820 
821 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
822 	ROM_LOAD( "prom.v6",      0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) )
823 	ROM_LOAD( "prom.u6",      0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) )
824 	ROM_LOAD( "prom.t6",      0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) )
825 
826 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
827 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
828 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
829 ROM_END
830 
831 ROM_START( ckongjeu )
832 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
833 	ROM_LOAD( "d05-07.bin",   0x0000, 0x1000, CRC(b27df032) SHA1(57f9be139c610405e3c2fddd7093dfb1277e450e) )
834 	ROM_LOAD( "f05-08.bin",   0x1000, 0x1000, CRC(5dc1aaba) SHA1(42b9e5946ffce7c156d114bde68f37c2c34853c4) )
835 	ROM_LOAD( "h05-09.bin",   0x2000, 0x1000, CRC(c9054c94) SHA1(1aa08d2501ee620759fd5c111e12f6d432c25294) )
836 	ROM_LOAD( "ckjeu10.dat",  0x3000, 0x1000, CRC(7e6eeec4) SHA1(98b283ea22bedc46710a24e65cfae48b87a57605) )
837 	ROM_LOAD( "l05-11.bin",   0x4000, 0x1000, CRC(ae159192) SHA1(d467256a3a366e246243e7828ff4a45d4c146e2c) )
838 	ROM_LOAD( "ckjeu12.dat",  0x5000, 0x1000, CRC(0532f270) SHA1(a73680bd7939097bd821fb6834e8763cf1572b55) )
839 
840 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
841 	ROM_LOAD( "n11-06.bin",   0x0000, 0x1000, CRC(2dcedd12) SHA1(dfdcfc21bcba7c8e148ee54daae511ca78c58e70) )
842 	ROM_LOAD( "k11-04.bin",   0x1000, 0x1000, CRC(3375b3bd) SHA1(a00b3c31cff123aab6ac0833aabfdd663302971a) )
843 	ROM_LOAD( "l11-05.bin",   0x2000, 0x1000, CRC(fa7cbd91) SHA1(0208d2ebc59f3600005476b6987472685bc99d67) )
844 	ROM_LOAD( "h11-03.bin",   0x3000, 0x1000, CRC(5655cc11) SHA1(5195e9b2a60c54280b48b32ee8248090904dbc51) )
845 
846 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
847 	ROM_LOAD( "c11-02.bin",   0x0000, 0x0800, CRC(d1352c31) SHA1(da726a63a8be830d695afeddc1717749af8c9d47) )
848 	ROM_LOAD( "a11-01.bin",   0x0800, 0x0800, CRC(a7a2fdbd) SHA1(529865f8bbfbdbbf34ac39c70ef17e6d5bd0f845) )
849 
850 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
851 	ROM_LOAD( "prom.v6",      0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) )
852 	ROM_LOAD( "prom.u6",      0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) )
853 	ROM_LOAD( "prom.t6",      0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) )
854 
855 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
856 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
857 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
858 ROM_END
859 
860 ROM_START( ckongo )
861 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
862 	ROM_LOAD( "o55a-1",       0x0000, 0x1000, CRC(8bfb4623) SHA1(1b8e12d1f337756bbfa9c3d736db7513d571c1b3) )
863 	ROM_LOAD( "o55a-2",       0x1000, 0x1000, CRC(9ae8089b) SHA1(e50864bb77dce24ba6d10c4fc16ccaa593962442) )
864 	ROM_LOAD( "o55a-3",       0x2000, 0x1000, CRC(e82b33c8) SHA1(27befba696cd1a9453fb49e8e4ddd46eab41b30d) )
865 	ROM_LOAD( "o55a-4",       0x3000, 0x1000, CRC(f038f941) SHA1(02be92ef3bf8d36c9916b40109c738965a652a76) )
866 	ROM_LOAD( "o55a-5",       0x4000, 0x1000, CRC(5182db06) SHA1(f3e981dc3744aff7756f8e0bfd4d92583a02417d) )
867 	/* no ROM at 5000 */
868 
869 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
870 	/* same as ckong but with halves switched */
871 	ROM_LOAD( "o50b-1",       0x0000, 0x0800, CRC(cae9e2bf) SHA1(bc62d98840b8b5b296de0f1379baabb1b4d25df0) )
872 	ROM_CONTINUE(             0x2000, 0x0800 )
873 	ROM_LOAD( "o50b-2",       0x0800, 0x0800, CRC(fba82114) SHA1(36b7c124edf73b01681f5d63867fafa38a31abbf) )
874 	ROM_CONTINUE(             0x2800, 0x0800 )
875 	ROM_LOAD( "o50b-3",       0x1000, 0x0800, CRC(1714764b) SHA1(b025fcc03d45b1ec29be7e292622745544ba891d) )
876 	ROM_CONTINUE(             0x3000, 0x0800 )
877 	ROM_LOAD( "o50b-4",       0x1800, 0x0800, CRC(b7008b57) SHA1(9328ff79947dbebdc3e2dd8bcc362667b8201476) )
878 	ROM_CONTINUE(             0x3800, 0x0800 )
879 
880 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
881 	ROM_LOAD( "c11-02.bin",   0x0000, 0x0800, CRC(d1352c31) SHA1(da726a63a8be830d695afeddc1717749af8c9d47) )
882 	ROM_LOAD( "a11-01.bin",   0x0800, 0x0800, CRC(a7a2fdbd) SHA1(529865f8bbfbdbbf34ac39c70ef17e6d5bd0f845) )
883 
884 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
885 	ROM_LOAD( "prom.v6",      0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) )
886 	ROM_LOAD( "prom.u6",      0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) )
887 	ROM_LOAD( "prom.t6",      0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) )
888 
889 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
890 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
891 	ROM_LOAD( "cc12j.bin",    0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
892 ROM_END
893 
894 ROM_START( ckongalc )
895 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
896 	ROM_LOAD( "ck7.bin",      0x0000, 0x1000, CRC(2171cac3) SHA1(7b18bfe44c32fb64b675bbbe2136344522c79b09) )
897 	ROM_LOAD( "ck8.bin",      0x1000, 0x1000, CRC(88b83ff7) SHA1(4afc494cc264aaa4614da6aed02ce062d9c20850) )
898 	ROM_LOAD( "ck9.bin",      0x2000, 0x1000, CRC(cff2af47) SHA1(1757428cefad13855a623162101ec01c04006c94) )
899 	ROM_LOAD( "ck10.bin",     0x3000, 0x1000, CRC(520fa4de) SHA1(6edbaf727756cd33bde94492d72654aa12dbd7e1) )
900 	ROM_LOAD( "ck11.bin",     0x4000, 0x1000, CRC(327dcadf) SHA1(17b2d3b9e2a82b5278a01cc972cb49705d113127) )
901 	/* no ROM at 5000 */
902 
903 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
904 	ROM_LOAD( "ck6.bin",      0x0000, 0x1000, CRC(a8916dc8) SHA1(472520aae3837e6026f2a7577d3b2aff371a316c) )
905 	ROM_LOAD( "ck4.bin",      0x1000, 0x1000, CRC(b62a0367) SHA1(8c285cbc714d7e6589bd63b3cef7c841ed1c2a4e) )
906 	ROM_LOAD( "ck5.bin",      0x2000, 0x1000, CRC(cd3b5dde) SHA1(2319a2be04d70989b01f4fc703756ba6e1c1f388) )
907 	ROM_LOAD( "ck3.bin",      0x3000, 0x1000, CRC(61122c5e) SHA1(978b6dbec35f3adc651fddf332db17625099a92e) )
908 
909 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
910 	ROM_LOAD( "ck2.bin",      0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) )
911 	ROM_LOAD( "ck1.bin",      0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) )
912 
913 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
914 	ROM_LOAD( "ck6v.bin",     0x0000, 0x0020, CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a) )
915 	ROM_LOAD( "ck6u.bin",     0x0020, 0x0020, CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423) )
916 	ROM_LOAD( "ck6t.bin",     0x0040, 0x0020, CRC(b4e827a5) SHA1(31a5a5ad54417a474d22bb16c473415d99a2b6f1) )
917 
918 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
919 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
920 	ROM_LOAD( "ck12.bin",     0x1000, 0x1000, CRC(2eb23b60) SHA1(c9e7dc584562aceb374193655fbacb7df6c9c731) )
921 ROM_END
922 
923 ROM_START( monkeyd )
924 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
925 	ROM_LOAD( "ck7.bin",      0x0000, 0x1000, CRC(2171cac3) SHA1(7b18bfe44c32fb64b675bbbe2136344522c79b09) )
926 	ROM_LOAD( "ck8.bin",      0x1000, 0x1000, CRC(88b83ff7) SHA1(4afc494cc264aaa4614da6aed02ce062d9c20850) )
927 	ROM_LOAD( "ck9.bin",      0x2000, 0x1000, CRC(cff2af47) SHA1(1757428cefad13855a623162101ec01c04006c94) )
928 	ROM_LOAD( "ck10.bin",     0x3000, 0x1000, CRC(520fa4de) SHA1(6edbaf727756cd33bde94492d72654aa12dbd7e1) )
929 	ROM_LOAD( "md5l.bin",     0x4000, 0x1000, CRC(d1db1bb0) SHA1(fe7d700c7f9eca9c389be3717ebebf3e7dc63aa2) )
930 	/* no ROM at 5000 */
931 
932 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
933 	ROM_LOAD( "ck6.bin",      0x0000, 0x1000, CRC(a8916dc8) SHA1(472520aae3837e6026f2a7577d3b2aff371a316c) )
934 	ROM_LOAD( "ck4.bin",      0x1000, 0x1000, CRC(b62a0367) SHA1(8c285cbc714d7e6589bd63b3cef7c841ed1c2a4e) )
935 	ROM_LOAD( "ck5.bin",      0x2000, 0x1000, CRC(cd3b5dde) SHA1(2319a2be04d70989b01f4fc703756ba6e1c1f388) )
936 	ROM_LOAD( "ck3.bin",      0x3000, 0x1000, CRC(61122c5e) SHA1(978b6dbec35f3adc651fddf332db17625099a92e) )
937 
938 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
939 	ROM_LOAD( "ck2.bin",      0x0000, 0x0800, CRC(f67c80f1) SHA1(d1fbcce1b6242f810e106ff50812636e3168ebc1) )
940 	ROM_LOAD( "ck1.bin",      0x0800, 0x0800, CRC(80eb517d) SHA1(fef4111f656c58b28e7eac5aa5b5cc7e07ccb2fd) )
941 
942 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
943 	ROM_LOAD( "ck6v.bin",     0x0000, 0x0020, BAD_DUMP CRC(751c3325) SHA1(edce2bc883996c1d72dc6c1c9f62799b162d415a)  )
944 	ROM_LOAD( "ck6u.bin",     0x0020, 0x0020, BAD_DUMP CRC(ab1940fa) SHA1(8d98e05cbaa6f55770c12e0a9a8ed9c73cc54423)  )
945 	ROM_LOAD( "ck6t.bin",     0x0040, 0x0020, BAD_DUMP CRC(b4e827a5) SHA1(31a5a5ad54417a474d22bb16c473415d99a2b6f1)  )
946 
947 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
948 	ROM_LOAD( "cc13j.bin",    0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
949 	ROM_LOAD( "ck12.bin",     0x1000, 0x1000, CRC(2eb23b60) SHA1(c9e7dc584562aceb374193655fbacb7df6c9c731) )
950 ROM_END
951 
952 ROM_START( rpatrolb )
953 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
954 	ROM_LOAD( "rp1.4l",       0x0000, 0x1000, CRC(bfd7ae7a) SHA1(a06d1cc2674ed40d0bfa67dd6d724964c1e40600) )
955 	ROM_LOAD( "rp2.4j",       0x1000, 0x1000, CRC(03f53340) SHA1(35336945f4b634fc4c7791ac9c9e6643c8cd8006) )
956 	ROM_LOAD( "rp3.4f",       0x2000, 0x1000, CRC(8fa300df) SHA1(5c3ba1ef6c1ce8df437b4fa464293208630b5e8d) )
957 	ROM_LOAD( "rp4.4e",       0x3000, 0x1000, CRC(74a8f1f4) SHA1(6bbc4944e4b31425a6b82f370b6760e5a4b36f56) )
958 	ROM_LOAD( "rp5.4c",       0x4000, 0x1000, CRC(d7ef6c87) SHA1(38e3b44b355907824919acc4f5064dcb98ebb1d0) )
959 	/* no ROM at 5000 */
960 
961 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
962 	ROM_LOAD( "rp6.6n",       0x0000, 0x0800, CRC(19f18e9e) SHA1(a5500ac36bcda772f3ba79d9e9d37b1eec7bfd13) )
963 	/* 0800-0fff empty */
964 	ROM_LOAD( "rp8.6k",       0x1000, 0x0800, CRC(008738c7) SHA1(a66d9daf31b0d9cf087b591c74f0aaee3d7607b5) )
965 	/* 1800-1fff empty */
966 	ROM_LOAD( "rp7.6l",       0x2000, 0x0800, CRC(07f2070d) SHA1(39df286fda9e48eba6e770fe23a603b5e10d88b6) )
967 	/* 2800-2fff empty */
968 	ROM_LOAD( "rp9.6h",       0x3000, 0x0800, CRC(ea5aafca) SHA1(d8f8fe270680ae261d63bd4702107961cd904699) )
969 	/* 3800-3fff empty */
970 
971 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
972 	ROM_LOAD( "rp10.6a",      0x0000, 0x0800, CRC(59747c31) SHA1(92acf07489f3e17f0c1769a0df15b6ddb117830f) )
973 	ROM_LOAD( "rp11.6c",      0x0800, 0x0800, CRC(065651a5) SHA1(5c2f9b44d8819d2f792525c06b5c341fe07329c0) )
974 
975 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
976 	ROM_LOAD( "bprom1.9n",    0x0000, 0x0020, CRC(f9a2383b) SHA1(4d88c177740efdb27708474c9ee0fcdca5a78c36) )
977 	ROM_LOAD( "bprom2.9p",    0x0020, 0x0020, CRC(1743bd26) SHA1(9bb50f6e24a7ac3c9ddf3923e57c5532603009e5) )
978 	ROM_LOAD( "bprom3.9c",    0x0040, 0x0020, CRC(ee03bc96) SHA1(45e33e750a536a904f30136d84dd7993d97e8e54) )
979 
980 	/* no samples */
981 ROM_END
982 
983 ROM_START( silvland )
984 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
985 	ROM_LOAD( "7.2r",         0x0000, 0x1000, CRC(57e6be62) SHA1(c1d47970f8209256c9ccd6512b921dec6c276998) )
986 	ROM_LOAD( "8.1n",         0x1000, 0x1000, CRC(bbb2b287) SHA1(93cd4ebe238c189c80be8b8ab1ec2649256dd6ea) )
987 	ROM_LOAD( "rp3.4f",       0x2000, 0x1000, CRC(8fa300df) SHA1(5c3ba1ef6c1ce8df437b4fa464293208630b5e8d) )
988 	ROM_LOAD( "10.2n",        0x3000, 0x1000, CRC(5536a65d) SHA1(0bf2b9ea76fd6fd8c0475bf6f49a42f1c96d3906) )
989 	ROM_LOAD( "11.1r",        0x4000, 0x1000, CRC(6f23f66f) SHA1(3ca8075c28956ec473ccb0e9f05e9ad8669f743d) )
990 	ROM_LOAD( "12.2k",        0x5000, 0x1000, CRC(26f1537c) SHA1(0468352d49edec3a52e32612856735b78e11079b) )
991 
992 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
993 	ROM_LOAD( "6.6n",         0x0000, 0x0800, CRC(affb804f) SHA1(9fc77804690e91773787e06f3329accef075f9f3) )
994 	/* 0800-0fff empty */
995 	ROM_LOAD( "4.6k",         0x1000, 0x0800, CRC(e487579d) SHA1(aed59f15dbc904d73e19d914ccd0a86fda859085) )
996 	/* 1800-1fff empty */
997 	ROM_LOAD( "5.6l",         0x2000, 0x0800, CRC(ad4642e5) SHA1(f4de2d9ed0e69c002be07f47247e95167a3ffffb) )
998 	/* 2800-2fff empty */
999 	ROM_LOAD( "3.6h",         0x3000, 0x0800, CRC(59125a1a) SHA1(37638fb690d6b4f11585f6a13586271c2f0e3743) )
1000 	/* 3800-3fff empty */
1001 
1002 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
1003 	ROM_LOAD( "2.6c",         0x0000, 0x0800, CRC(c8d32b8e) SHA1(7d655d243ed13cf2537f3fdfde5bf34229f7cb84) )
1004 	ROM_LOAD( "1.6a",         0x0800, 0x0800, CRC(ee333daf) SHA1(b02998dccec9a4f841838874221caabae8380fcc) )
1005 
1006 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
1007 	ROM_LOAD( "mb7051.1v",    0x0000, 0x0020, CRC(1d2343b1) SHA1(294f22178af4532abf767c1ffe2dc831bbe683bf) )
1008 	ROM_LOAD( "mb7051.1u",    0x0020, 0x0020, CRC(c174753c) SHA1(303bfb1f470b525ccaeafa81a38a4bc3a7de5dbb) )
1009 	ROM_LOAD( "mb7051.1t",    0x0040, 0x0020, CRC(04a1be01) SHA1(9c270c04d374d46752ec99bd4e79fed1e2896bc0) )
1010 
1011 	/* no samples */
1012 ROM_END
1013 
1014 
1015 ROM_START( cannonb )
1016 	ROM_REGION( 0x11000, REGION_CPU1, 0 )     /* 64k for code */
1017 	ROM_LOAD( "canballs.5d", 0x10000, 0x1000, CRC(43ad0d16) SHA1(682f1ee15e41bb5a161287536bb97704c0d3be9c) ) /* only this one ROM is encrypted */
1018 	ROM_LOAD( "canballs.5f",  0x1000, 0x1000, CRC(3e0dacdd) SHA1(cdd3684a6962f2fb582b8a415383c06a5e5059dd) )
1019 	ROM_LOAD( "canballs.5h",  0x2000, 0x1000, CRC(e18a836b) SHA1(19b90a55db82914c5db18486e05d9f59aba1b442) )
1020 	ROM_LOAD( "canballs.5k",  0x3000, 0x0800, CRC(6ed3cbf4) SHA1(070ba61dc97df6be8004f7e052a4cef836234888) )
1021 	ROM_LOAD( "canballs.5m",  0x4000, 0x1000, CRC(4f0088ab) SHA1(a8009f5b8517ba4d84fbc483b199f2514f24eae8) )
1022 	ROM_LOAD( "canballs.5n",  0x5000, 0x1000, CRC(91570033) SHA1(7cd7fe9541da36c3919324bc65e6db1d1ca635e0) )
1023 
1024 	ROM_REGION( 0x4000, REGION_GFX1, ROMREGION_DISPOSE )
1025 	ROM_LOAD( "canballs.11n", 0x0000, 0x1000, CRC(a95b8e03) SHA1(e78125023e1af6de292292b875b45401b2173ca9) )
1026 	ROM_LOAD( "canballs.11k", 0x1000, 0x1000, CRC(dbbe8263) SHA1(efe4bba25a03261bc8309e6d83d5600def875b0c) )
1027 	ROM_LOAD( "canballs.11l", 0x2000, 0x1000, CRC(060b044c) SHA1(3121f07adb661663a2303085eea1b662968f8f98) )
1028 	ROM_LOAD( "canballs.11h", 0x3000, 0x1000, CRC(8043bc1a) SHA1(bd2f3dfe26cf8d987d9ecaa41eac4bdc4e16a692) )
1029 
1030 	ROM_REGION( 0x1000, REGION_GFX2, ROMREGION_DISPOSE )
1031 	ROM_LOAD( "canballs.11c", 0x0000, 0x0800, CRC(d1352c31) SHA1(da726a63a8be830d695afeddc1717749af8c9d47) )
1032 	ROM_LOAD( "canballs.11a", 0x0800, 0x0800, CRC(a7a2fdbd) SHA1(529865f8bbfbdbbf34ac39c70ef17e6d5bd0f845) )
1033 
1034 	ROM_REGION( 0x0060, REGION_PROMS, 0 )
1035 	ROM_LOAD( "prom.v6",      0x0000, 0x0020, CRC(b3fc1505) SHA1(5b94adde0428a26b815c7eb9b3f3716470d349c7) )
1036 	ROM_LOAD( "prom.u6",      0x0020, 0x0020, CRC(26aada9e) SHA1(f59645e606ea4f0dd0fc4ea47dd03f526c534941) )
1037 	ROM_LOAD( "prom.t6",      0x0040, 0x0020, CRC(676b3166) SHA1(29b9434cd34d43ea5664e436e2a24b54f8d88aac) )
1038 
1039 	ROM_REGION( 0x2000, REGION_SOUND1, 0 )	/* samples */
1040 	ROM_LOAD( "canballs.5s",  0x0000, 0x1000, CRC(5f0bcdfb) SHA1(7f79bf6de117348f606696ed7ea1937bbf926612) )
1041 	ROM_LOAD( "canballs.5p",  0x1000, 0x1000, CRC(9003ffbd) SHA1(fd016056aabc23957643f37230f03842294f795e) )
1042 ROM_END
1043 
1044 static DRIVER_INIT( cannonb )
1045 {
1046 	int A;
1047 	unsigned char *rom = memory_region(REGION_CPU1);
1048 
1049 
1050 	for (A = 0x0000;A < 0x1000;A++) /* only first ROM is encrypted */
1051 	{
1052 		unsigned char src;
1053 		int i;
1054 		unsigned char xor_tab[4] ={0x92, 0x82, 0x12, 0x10};
1055 
1056 		src = rom[A+0x10000];
1057 
1058 		i = ((A&0x200)>>8) | ((A&0x80)>>7);
1059 
1060 		src ^= xor_tab[i];
1061 
1062 		rom[A] = src;
1063 	}
1064 }
1065 
1066 
1067 
1068 /***************************************************************************
1069 
1070   Swimmer driver
1071 
1072 ***************************************************************************/
1073 
1074 WRITE_HANDLER( swimmer_bgcolor_w );
1075 WRITE_HANDLER( swimmer_palettebank_w );
1076 PALETTE_INIT( swimmer );
1077 VIDEO_UPDATE( swimmer );
1078 WRITE_HANDLER( swimmer_sidepanel_enable_w );
1079 
1080 
1081 
WRITE_HANDLER(swimmer_sh_soundlatch_w)1082 WRITE_HANDLER( swimmer_sh_soundlatch_w )
1083 {
1084 	soundlatch_w(offset,data);
1085 	cpu_set_irq_line_and_vector(1,0,HOLD_LINE,0xff);
1086 }
1087 
1088 
1089 
MEMORY_READ_START(swimmer_readmem)1090 static MEMORY_READ_START( swimmer_readmem )
1091 	{ 0x0000, 0x7fff, MRA_ROM },
1092 	{ 0x8000, 0x87ff, MRA_RAM },
1093 	{ 0x9000, 0x93ff, MRA_RAM },
1094 	{ 0x9400, 0x97ff, videoram_r }, /* mirror address (used by Swimmer) */
1095 	{ 0x9c00, 0x9fff, MRA_RAM },
1096 	{ 0xa000, 0xa000, input_port_0_r },
1097 	{ 0xa800, 0xa800, input_port_1_r },
1098 	{ 0xb000, 0xb000, input_port_2_r },
1099 	{ 0xb800, 0xb800, input_port_3_r },
1100 	{ 0xb880, 0xb880, input_port_4_r },
1101 	{ 0xc000, 0xc7ff, MRA_RAM },    /* ??? used by Guzzler */
1102 	{ 0xe000, 0xffff, MRA_ROM },    /* Guzzler only */
1103 MEMORY_END
1104 
1105 static MEMORY_WRITE_START( swimmer_writemem )
1106 	{ 0x0000, 0x7fff, MWA_ROM },
1107 	{ 0x8000, 0x87ff, MWA_RAM },
1108 	{ 0x8800, 0x88ff, cclimber_bigsprite_videoram_w, &cclimber_bsvideoram, &cclimber_bsvideoram_size },
1109 	{ 0x8900, 0x89ff, cclimber_bigsprite_videoram_w },      /* mirror for the above (Guzzler writes to both) */
1110 	{ 0x9000, 0x93ff, videoram_w, &videoram, &videoram_size },
1111 	{ 0x9400, 0x97ff, videoram_w }, /* mirror address (used by Guzzler) */
1112 	{ 0x9800, 0x981f, MWA_RAM, &cclimber_column_scroll },
1113 	{ 0x9880, 0x989f, MWA_RAM, &spriteram, &spriteram_size },
1114 	{ 0x98fc, 0x98ff, MWA_RAM, &cclimber_bigspriteram },
1115 	{ 0x9c00, 0x9fff, cclimber_colorram_w, &colorram },
1116 	{ 0xa000, 0xa000, interrupt_enable_w },
1117 	{ 0xa001, 0xa001, flip_screen_x_w },
1118 	{ 0xa002, 0xa002, flip_screen_y_w },
1119 	{ 0xa003, 0xa003, swimmer_sidepanel_enable_w },
1120 	{ 0xa004, 0xa004, swimmer_palettebank_w },
1121 	{ 0xa800, 0xa800, swimmer_sh_soundlatch_w },
1122 	{ 0xb800, 0xb800, swimmer_bgcolor_w },  /* river color in Swimmer */
1123 	{ 0xc000, 0xc7ff, MWA_RAM },    /* ??? used by Guzzler */
1124 	{ 0xe000, 0xffff, MWA_ROM },    /* Guzzler only */
1125 MEMORY_END
1126 
1127 
1128 static MEMORY_READ_START( sound_readmem )
1129 	{ 0x0000, 0x0fff, MRA_ROM },
1130 	{ 0x2000, 0x23ff, MRA_RAM },
1131 	{ 0x3000, 0x3000, soundlatch_r },
1132 	{ 0x4000, 0x4001, MRA_RAM },    /* ??? */
1133 MEMORY_END
1134 
1135 static MEMORY_WRITE_START( sound_writemem )
1136 	{ 0x0000, 0x0fff, MWA_ROM },
1137 	{ 0x2000, 0x23ff, MWA_RAM },
1138 	{ 0x4000, 0x4000, MWA_RAM },    /* ??? */
1139 MEMORY_END
1140 
1141 static PORT_WRITE_START( sound_writeport )
1142 	{ 0x00, 0x00, AY8910_write_port_0_w },
1143 	{ 0x01, 0x01, AY8910_control_port_0_w },
1144 	{ 0x80, 0x80, AY8910_write_port_1_w },
1145 	{ 0x81, 0x81, AY8910_control_port_1_w },
1146 PORT_END
1147 
1148 
1149 
1150 INPUT_PORTS_START( swimmer )
1151 	PORT_START      /* IN0 */
1152 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
1153 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
1154 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
1155 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
1156 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
1157 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1158 
1159 	PORT_START      /* IN1 */
1160 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
1161 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
1162 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
1163 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
1164 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1165 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1166 
1167 	PORT_START      /* DSW1 */
1168 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
1169 	PORT_DIPSETTING(    0x00, "3" )
1170 	PORT_DIPSETTING(    0x01, "4" )
1171 	PORT_DIPSETTING(    0x02, "5" )
1172 	PORT_BITX( 0,       0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
1173 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
1174 	PORT_DIPSETTING(    0x00, "10000" )
1175 	PORT_DIPSETTING(    0x04, "20000" )
1176 	PORT_DIPSETTING(    0x08, "30000" )
1177 	PORT_DIPSETTING(    0x0c, "None" )
1178 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
1179 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1180 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1181 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1182 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_3C ) )
1183 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
1184 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1185 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1186 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1187 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
1188 
1189 	PORT_START      /* IN3/DSW2 */
1190 	PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
1191 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
1192 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
1193 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
1194 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
1195 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1196 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
1197 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1198 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1199 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
1200 	PORT_DIPSETTING(    0x00, "Easy" )		// labeled this way for similarities with 'swimmerb'
1201 	PORT_DIPSETTING(    0x40, "Hard" )		// labeled this way for similarities with 'swimmerb'
1202 	PORT_DIPSETTING(    0x80, "Harder" )
1203 	PORT_DIPSETTING(    0xc0, "Hardest" )
1204 
1205 	PORT_START      /* IN4 */
1206 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
1207 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
1208 	PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
1209 INPUT_PORTS_END
1210 
1211 /* Same as 'swimmer' but different "Difficulty" Dip Switch */
1212 INPUT_PORTS_START( swimmerb )
1213 	PORT_START      /* IN0 */
1214 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
1215 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
1216 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
1217 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
1218 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
1219 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1220 
1221 	PORT_START      /* IN1 */
1222 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
1223 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
1224 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
1225 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
1226 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1227 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1228 
1229 	PORT_START      /* DSW1 */
1230 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
1231 	PORT_DIPSETTING(    0x00, "3" )
1232 	PORT_DIPSETTING(    0x01, "4" )
1233 	PORT_DIPSETTING(    0x02, "5" )
1234 	PORT_BITX( 0,       0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
1235 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
1236 	PORT_DIPSETTING(    0x00, "10000" )
1237 	PORT_DIPSETTING(    0x04, "20000" )
1238 	PORT_DIPSETTING(    0x08, "30000" )
1239 	PORT_DIPSETTING(    0x0c, "None" )
1240 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
1241 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1242 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1243 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1244 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_3C ) )
1245 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
1246 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1247 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1248 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1249 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
1250 
1251 	PORT_START      /* IN3/DSW2 */
1252 	PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
1253 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
1254 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
1255 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
1256 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
1257 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1258 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
1259 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1260 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1261 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )
1262 	PORT_DIPSETTING(    0x00, "Easy" )
1263 	PORT_DIPSETTING(    0x40, "Hard" )
1264 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
1265 
1266 	PORT_START      /* IN4 */
1267 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
1268 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
1269 	PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNUSED )
1270 INPUT_PORTS_END
1271 
1272 INPUT_PORTS_START( guzzler )
1273 	PORT_START      /* IN0 */
1274 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
1275 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
1276 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
1277 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
1278 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL )
1279 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1280 
1281 	PORT_START      /* IN1 */
1282 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
1283 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
1284 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
1285 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
1286 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1287 	PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
1288 
1289 	PORT_START      /* DSW0 */
1290 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
1291 	PORT_DIPSETTING(    0x00, "3" )
1292 	PORT_DIPSETTING(    0x01, "4" )
1293 	PORT_DIPSETTING(    0x02, "5" )
1294 	PORT_BITX( 0,       0x03, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
1295 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
1296 	PORT_DIPSETTING(    0x04, "20K, every 50K" )
1297 	PORT_DIPSETTING(    0x00, "30K, every 100K" )
1298 	PORT_DIPSETTING(    0x08, "30K only" )
1299 	PORT_DIPSETTING(    0x0c, "None" )
1300 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coin_A ) )
1301 	PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1302 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1303 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1304 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_3C ) )
1305 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_B ) )
1306 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1307 	PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1308 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1309 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_6C ) )
1310 
1311 	PORT_START      /* DSW1 */
1312 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
1313 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
1314 	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
1315 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1316 	PORT_DIPNAME( 0x20, 0x00, "High Score Names" )
1317 	PORT_DIPSETTING(    0x20, "3 Letters" )
1318 	PORT_DIPSETTING(    0x00, "10 Letters" )
1319 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
1320 	PORT_DIPSETTING(    0x00, "Easy" )
1321 	PORT_DIPSETTING(    0x40, "Medium" )
1322 	PORT_DIPSETTING(    0x80, "Hard" )
1323 	PORT_DIPSETTING(    0xc0, "Hardest" )
1324 
1325 	PORT_START      /* coin */
1326 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 2)
1327 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 2)
1328 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
1329 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
1330 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
1331 INPUT_PORTS_END
1332 
1333 
1334 
1335 static struct GfxLayout swimmer_charlayout =
1336 {
1337 	8,8,    /* 8*8 characters */
1338 	512,    /* 512 characters */
1339 	3,      /* 3 bits per pixel */
1340 	{ 0, 512*8*8, 512*2*8*8 },      /* the bitplanes are separated */
1341 	{ 0, 1, 2, 3, 4, 5, 6, 7 },	     /* characters are upside down */
1342 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
1343 	8*8     /* every char takes 8 consecutive bytes */
1344 };
1345 
1346 static struct GfxLayout swimmer_spritelayout =
1347 {
1348 	16,16,  /* 16*16 sprites */
1349 	128,    /* 128 sprites */
1350 	3,	      /* 3 bits per pixel */
1351 	{ 0, 128*16*16, 128*2*16*16 },  /* the bitplanes are separated */
1352 	{ 0, 1, 2, 3, 4, 5, 6, 7,       /* pretty straightforward layout */
1353 			8*8+0, 8*8+1, 8*8+2, 8*8+3, 8*8+4, 8*8+5, 8*8+6, 8*8+7 },
1354 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
1355 			16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8 },
1356 	32*8    /* every sprite takes 32 consecutive bytes */
1357 };
1358 
1359 static struct GfxDecodeInfo swimmer_gfxdecodeinfo[] =
1360 {
1361 	{ REGION_GFX1, 0, &swimmer_charlayout,      0, 64 }, /* characters */
1362 	{ REGION_GFX1, 0, &swimmer_spritelayout,    0, 32 }, /* sprite set #1 */
1363 	{ REGION_GFX2, 0, &swimmer_charlayout,   64*8, 4 },  /* big sprite set */
1364 	{ -1 } /* end of array */
1365 };
1366 
1367 
1368 
1369 
1370 static MACHINE_DRIVER_START( swimmer )
1371 
1372 	/* basic machine hardware */
1373 	MDRV_CPU_ADD(Z80, 3072000)	/* 3.072 MHz */
MDRV_CPU_MEMORY(swimmer_readmem,swimmer_writemem)1374 	MDRV_CPU_MEMORY(swimmer_readmem,swimmer_writemem)
1375 	MDRV_CPU_VBLANK_INT(nmi_line_pulse,1)
1376 
1377 	MDRV_CPU_ADD(Z80,4000000/2)
1378 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)	/* 2 MHz */
1379 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
1380 	MDRV_CPU_PORTS(0,sound_writeport)
1381 	MDRV_CPU_PERIODIC_INT(nmi_line_pulse,4000000/16384) /* IRQs are triggered by the main CPU */
1382 
1383 	MDRV_FRAMES_PER_SECOND(60)
1384 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
1385 
1386 	/* video hardware */
1387 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
1388 	MDRV_SCREEN_SIZE(32*8, 32*8)
1389 	MDRV_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
1390 	MDRV_GFXDECODE(swimmer_gfxdecodeinfo)
1391 	MDRV_PALETTE_LENGTH(256+32+2)
1392 	MDRV_COLORTABLE_LENGTH(64*8+4*8)
1393 
1394 	MDRV_PALETTE_INIT(swimmer)
1395 	MDRV_VIDEO_START(generic)
1396 	MDRV_VIDEO_UPDATE(swimmer)
1397 
1398 	/* sound hardware */
1399 	MDRV_SOUND_ADD(AY8910, swimmer_ay8910_interface)
1400 MACHINE_DRIVER_END
1401 
1402 
1403 
1404 ROM_START( swimmer )
1405 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
1406 	ROM_LOAD( "sw1",          0x0000, 0x1000, CRC(f12481e7) SHA1(4e8ee509043fd57ec1579594f0b2c543f270bead) )
1407 	ROM_LOAD( "sw2",          0x1000, 0x1000, CRC(a0b6fdd2) SHA1(7d3603de6c282224869824c7572868fc85599ea2) )
1408 	ROM_LOAD( "sw3",          0x2000, 0x1000, CRC(ec93d7de) SHA1(e225c6b98eb3c32825c1cc1fcf69dec7e340460c) )
1409 	ROM_LOAD( "sw4",          0x3000, 0x1000, CRC(0107927d) SHA1(419aeca37c7604f71f49e3dee36f477eee0ba53a) )
1410 	ROM_LOAD( "sw5",          0x4000, 0x1000, CRC(ebd8a92c) SHA1(65401f8d39250f6ec61841e58ce4c21ddfe99842) )
1411 	ROM_LOAD( "sw6",          0x5000, 0x1000, CRC(f8539821) SHA1(82f43ecbbb0a3771632eb26e10bc5453d74b65b1) )
1412 	ROM_LOAD( "sw7",          0x6000, 0x1000, CRC(37efb64e) SHA1(0ed4d678895c17b37df605990acd096c538e3675) )
1413 	ROM_LOAD( "sw8",          0x7000, 0x1000, CRC(33d6001e) SHA1(749b746d018e74e364fd6974e4522c8a18915774) )
1414 
1415 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for sound board */
1416 	ROM_LOAD( "sw12.4k",      0x0000, 0x1000, CRC(2eee9bcb) SHA1(ceafdf750a8af0c1c9abbbf437c3e9d9ae09f72b) )
1417 
1418 	ROM_REGION( 0x3000, REGION_GFX1, ROMREGION_DISPOSE )
1419 	ROM_LOAD( "sw15.18k",     0x0000, 0x1000, CRC(4f3608cb) SHA1(cebcad69c4ad5dacc0bf597fdaed6f8950ffdfe1) )  /* chars */
1420 	ROM_LOAD( "sw14.18l",     0x1000, 0x1000, CRC(7181c8b4) SHA1(b22fa0ebac884002cf6f5651e4366f30d0ab09f5) )
1421 	ROM_LOAD( "sw13.18m",     0x2000, 0x1000, CRC(2eb1af5c) SHA1(0105d03adfc5ce9ca478e678a1e1d8bae7c516e0) )
1422 
1423 	ROM_REGION( 0x3000, REGION_GFX2, ROMREGION_DISPOSE )
1424 	ROM_LOAD( "sw23.6c",      0x0000, 0x0800, CRC(9ca67e24) SHA1(86f561abc1a1c6b0c29c6017246d805c5a48b999) )  /* bigsprite data */
1425 	ROM_RELOAD(               0x0800, 0x0800 )	/* Guzzler has larger ROMs */
1426 	ROM_LOAD( "sw22.5c",      0x1000, 0x0800, CRC(02c10992) SHA1(8c383fdcd83aa9997e5802a58419b9d993a9b38d) )
1427 	ROM_RELOAD(               0x1800, 0x0800 )	/* Guzzler has larger ROMs */
1428 	ROM_LOAD( "sw21.4c",      0x2000, 0x0800, CRC(7f4993c1) SHA1(a5884b3af707109e810cf1f38bee3cb642e619f6) )
1429 	ROM_RELOAD(               0x2800, 0x0800 )	/* Guzzler has larger ROMs */
1430 
1431 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
1432 	ROM_LOAD( "24s10.13b",    0x0000, 0x100, CRC(8e35b97d) SHA1(2e2c254574660e01b9983f795a2adb5b9911d7f0) )
1433 	ROM_LOAD( "24s10.13a",    0x0100, 0x100, CRC(c5f24909) SHA1(27f2c967d440f6387841aa3f7b116c64bb812af1) )
1434 	ROM_LOAD( "18s030.12c",   0x0200, 0x020, CRC(3b2deb3a) SHA1(bb7b5c662454f5b355cc59cbdf8879e4664bed1d) )
1435 ROM_END
1436 
1437 ROM_START( swimmera )
1438 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
1439 	ROM_LOAD( "swa1",         0x0000, 0x1000, CRC(42c2b6c5) SHA1(13688e1ee08308b13ead5af7b4f65043dae4e40f) )
1440 	ROM_LOAD( "swa2",         0x1000, 0x1000, CRC(49bac195) SHA1(a5d2cc2cdd10003f69014c4799f5f59e47a44260) )
1441 	ROM_LOAD( "swa3",         0x2000, 0x1000, CRC(a6d8cb01) SHA1(80ab0ffaee6e0edf19b767229865722c2af6112c) )
1442 	ROM_LOAD( "swa4",         0x3000, 0x1000, CRC(7be75182) SHA1(4fe7bc6382ea7311be1225fb0715aa2ff4ec084c) )
1443 	ROM_LOAD( "swa5",         0x4000, 0x1000, CRC(78f79573) SHA1(6124fae47b3fa2e5965dffdfe9cbeb96acf08314) )
1444 	ROM_LOAD( "swa6",         0x5000, 0x1000, CRC(fda9b311) SHA1(d9c914ad27f5988d0d4da5c942fb12bb5728cdfb) )
1445 	ROM_LOAD( "swa7",         0x6000, 0x1000, CRC(7090e5ee) SHA1(d1e0ca38c3d1e4a7b7efa3696e47fb36ad3f8aa0) )
1446 	ROM_LOAD( "swa8",         0x7000, 0x1000, CRC(ab86efa9) SHA1(5b5a80ae285c7e9f4c51e646116edf789d4dba39) )
1447 
1448 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for sound board */
1449 	ROM_LOAD( "sw12.4k",      0x0000, 0x1000, CRC(2eee9bcb) SHA1(ceafdf750a8af0c1c9abbbf437c3e9d9ae09f72b) )
1450 
1451 	ROM_REGION( 0x3000, REGION_GFX1, ROMREGION_DISPOSE )
1452 	ROM_LOAD( "sw15.18k",     0x0000, 0x1000, CRC(4f3608cb) SHA1(cebcad69c4ad5dacc0bf597fdaed6f8950ffdfe1) )  /* chars */
1453 	ROM_LOAD( "sw14.18l",     0x1000, 0x1000, CRC(7181c8b4) SHA1(b22fa0ebac884002cf6f5651e4366f30d0ab09f5) )
1454 	ROM_LOAD( "sw13.18m",     0x2000, 0x1000, CRC(2eb1af5c) SHA1(0105d03adfc5ce9ca478e678a1e1d8bae7c516e0) )
1455 
1456 	ROM_REGION( 0x3000, REGION_GFX2, ROMREGION_DISPOSE )
1457 	ROM_LOAD( "sw23.6c",      0x0000, 0x0800, CRC(9ca67e24) SHA1(86f561abc1a1c6b0c29c6017246d805c5a48b999) )  /* bigsprite data */
1458 	ROM_RELOAD(               0x0800, 0x0800 )	/* Guzzler has larger ROMs */
1459 	ROM_LOAD( "sw22.5c",      0x1000, 0x0800, CRC(02c10992) SHA1(8c383fdcd83aa9997e5802a58419b9d993a9b38d) )
1460 	ROM_RELOAD(               0x1800, 0x0800 )	/* Guzzler has larger ROMs */
1461 	ROM_LOAD( "sw21.4c",      0x2000, 0x0800, CRC(7f4993c1) SHA1(a5884b3af707109e810cf1f38bee3cb642e619f6) )
1462 	ROM_RELOAD(               0x2800, 0x0800 )	/* Guzzler has larger ROMs */
1463 
1464 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
1465 	ROM_LOAD( "24s10.13b",    0x0000, 0x100, CRC(8e35b97d) SHA1(2e2c254574660e01b9983f795a2adb5b9911d7f0) )
1466 	ROM_LOAD( "24s10.13a",    0x0100, 0x100, CRC(c5f24909) SHA1(27f2c967d440f6387841aa3f7b116c64bb812af1) )
1467 	ROM_LOAD( "18s030.12c",   0x0200, 0x020, CRC(3b2deb3a) SHA1(bb7b5c662454f5b355cc59cbdf8879e4664bed1d) )
1468 ROM_END
1469 
1470 ROM_START( swimmerb )
1471 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
1472 	ROM_LOAD( "sw1.9l",       0x0000, 0x1000, CRC(b045be08) SHA1(52187e1daebec521a98157f22960637393e40e62) )
1473 	ROM_LOAD( "sw2.9k",       0x1000, 0x1000, CRC(163d65e5) SHA1(b505f05af96f241285f0f7082ed03fa07bbde7de) )
1474 	ROM_LOAD( "sw3.9j",       0x2000, 0x1000, CRC(631d74e9) SHA1(b6adba9445264de80f5daf33dad1c90b23617648) )
1475 	ROM_LOAD( "sw4.9f",       0x3000, 0x1000, CRC(d62634db) SHA1(c6d0d2cf7a3a19fac1752a30189f31eb3df8fa42) )
1476 	ROM_LOAD( "sw5.9e",       0x4000, 0x1000, CRC(922d5d87) SHA1(e5f111d82a072e59c00b759eaada195f1fc06532) )
1477 	ROM_LOAD( "sw6.9d",       0x5000, 0x1000, CRC(85478209) SHA1(df3c79ca25229fef2fe0f48d3c173e389628a68d) )
1478 	ROM_LOAD( "sw7.9c",       0x6000, 0x1000, CRC(88266f2e) SHA1(4ad15f9ba7b45a6c1c3637f8d0fd8be9c04b495f) )
1479 	ROM_LOAD( "sw8.9a",       0x7000, 0x1000, CRC(191a16e4) SHA1(75d3f49e2f4ea04d3a7cc88662c023768bf48365) )
1480 
1481 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for sound board */
1482 	ROM_LOAD( "sw12.4k",      0x0000, 0x1000, CRC(2eee9bcb) SHA1(ceafdf750a8af0c1c9abbbf437c3e9d9ae09f72b) )
1483 
1484 	ROM_REGION( 0x3000, REGION_GFX1, ROMREGION_DISPOSE )
1485 	ROM_LOAD( "sw15.18k",     0x0000, 0x1000, CRC(4f3608cb) SHA1(cebcad69c4ad5dacc0bf597fdaed6f8950ffdfe1) )  /* chars */
1486 	ROM_LOAD( "sw14.18l",     0x1000, 0x1000, CRC(7181c8b4) SHA1(b22fa0ebac884002cf6f5651e4366f30d0ab09f5) )
1487 	ROM_LOAD( "sw13.18m",     0x2000, 0x1000, CRC(2eb1af5c) SHA1(0105d03adfc5ce9ca478e678a1e1d8bae7c516e0) )
1488 
1489 	ROM_REGION( 0x3000, REGION_GFX2, ROMREGION_DISPOSE )
1490 	ROM_LOAD( "sw23.6c",      0x0000, 0x0800, CRC(9ca67e24) SHA1(86f561abc1a1c6b0c29c6017246d805c5a48b999) )  /* bigsprite data */
1491 	ROM_RELOAD(               0x0800, 0x0800 )	/* Guzzler has larger ROMs */
1492 	ROM_LOAD( "sw22.5c",      0x1000, 0x0800, CRC(02c10992) SHA1(8c383fdcd83aa9997e5802a58419b9d993a9b38d) )
1493 	ROM_RELOAD(               0x1800, 0x0800 )	/* Guzzler has larger ROMs */
1494 	ROM_LOAD( "sw21.4c",      0x2000, 0x0800, CRC(7f4993c1) SHA1(a5884b3af707109e810cf1f38bee3cb642e619f6) )
1495 	ROM_RELOAD(               0x2800, 0x0800 )	/* Guzzler has larger ROMs */
1496 
1497 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
1498 	ROM_LOAD( "24s10.13b",    0x0000, 0x100, CRC(8e35b97d) SHA1(2e2c254574660e01b9983f795a2adb5b9911d7f0) )
1499 	ROM_LOAD( "24s10.13a",    0x0100, 0x100, CRC(c5f24909) SHA1(27f2c967d440f6387841aa3f7b116c64bb812af1) )
1500 	ROM_LOAD( "18s030.12c",   0x0200, 0x020, CRC(3b2deb3a) SHA1(bb7b5c662454f5b355cc59cbdf8879e4664bed1d) )
1501 ROM_END
1502 
1503 ROM_START( guzzler )
1504 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code */
1505 	ROM_LOAD( "guzz-01.bin",  0x0000, 0x2000, CRC(58aaa1e9) SHA1(4ea9c85670a0d71483ac79564093043762a24b2c) )
1506 	ROM_LOAD( "guzz-02.bin",  0x2000, 0x2000, CRC(f80ceb17) SHA1(eedff7355fb5aa18b82f0a3e39bba5521c359791) )
1507 	ROM_LOAD( "guzz-03.bin",  0x4000, 0x2000, CRC(e63c65a2) SHA1(e2b888911330690faa3a041e1a17d838b46e6bbd) )
1508 	ROM_LOAD( "guzz-04.bin",  0x6000, 0x2000, CRC(45be42f5) SHA1(578943afdb6ceca34ca7c19c2fd1164ca3aa57bd) )
1509 	ROM_LOAD( "guzz-16.bin",  0xe000, 0x2000, CRC(61ee00b7) SHA1(ea8516c8dfb2de32a8034f94c7d0c086e3596740) )
1510 
1511 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for sound board */
1512 	ROM_LOAD( "guzz-12.bin",  0x0000, 0x1000, CRC(f3754d9e) SHA1(bb30832aba4e82ab0ecce40fc1223d9771ff7dd2) )
1513 
1514 	ROM_REGION( 0x3000, REGION_GFX1, ROMREGION_DISPOSE )
1515 	ROM_LOAD( "guzz-13.bin",  0x0000, 0x1000, CRC(afc464e2) SHA1(61730b5e5add24ba3d4e8903c5d71cf4df9b77e0) )   /* chars */
1516 	ROM_LOAD( "guzz-14.bin",  0x1000, 0x1000, CRC(acbdfe1f) SHA1(ab7abe4bb321fc7dc4e73acab4b1a7133e6bcf20) )
1517 	ROM_LOAD( "guzz-15.bin",  0x2000, 0x1000, CRC(66978c05) SHA1(2c8d5545f8b1d3cd7cd63448f8064fd3712d6fee) )
1518 
1519 	ROM_REGION( 0x3000, REGION_GFX2, ROMREGION_DISPOSE )
1520 	ROM_LOAD( "guzz-11.bin",  0x0000, 0x1000, CRC(ec2e9d86) SHA1(2fc631229e78db68777e74a03f98f660f324a885) )   /* big sprite */
1521 	ROM_LOAD( "guzz-10.bin",  0x1000, 0x1000, CRC(bd3f0bf7) SHA1(c57aff05812801c22104a4afc8a8a6bca33dda96) )
1522 	ROM_LOAD( "guzz-09.bin",  0x2000, 0x1000, CRC(18927579) SHA1(414676193ef1f6ce79a4cba73e4d017312f766f4) )
1523 
1524 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
1525 	ROM_LOAD( "guzzler.003",  0x0000, 0x100, CRC(f86930c1) SHA1(58efc8cbef05e1612d12e2f0babddf15571d42bb) )
1526 	ROM_LOAD( "guzzler.002",  0x0100, 0x100, CRC(b566ea9e) SHA1(345078af6a339fbe6cd966046acd9d04c8926b5c) )
1527 	ROM_LOAD( "guzzler.001",  0x0200, 0x020, CRC(69089495) SHA1(96b067b22be14536bac748f8d61e5587a8a04e92) )
1528 ROM_END
1529 
1530 
1531 
1532 void cclimber_decode(const unsigned char convtable[8][16])
1533 {
1534 	int A;
1535 	unsigned char *rom = memory_region(REGION_CPU1);
1536 	int diff = memory_region_length(REGION_CPU1) / 2;
1537 
1538 
1539 	memory_set_opcode_base(0,rom+diff);
1540 
1541 	for (A = 0x0000;A < 0x10000;A++)
1542 	{
1543 		int i,j;
1544 		unsigned char src;
1545 
1546 
1547 		src = rom[A];
1548 
1549 		/* pick the translation table from bit 0 of the address */
1550 		/* and from bits 1 7 of the source data */
1551 		i = (A & 1) | (src & 0x02) | ((src & 0x80) >> 5);
1552 
1553 		/* pick the offset in the table from bits 0 2 4 6 of the source data */
1554 		j = (src & 0x01) | ((src & 0x04) >> 1) | ((src & 0x10) >> 2) | ((src & 0x40) >> 3);
1555 
1556 		/* decode the opcodes */
1557 		rom[A + diff] = (src & 0xaa) | convtable[i][j];
1558 	}
1559 }
1560 
DRIVER_INIT(cclimber)1561 static DRIVER_INIT( cclimber )
1562 {
1563 	static const unsigned char convtable[8][16] =
1564 	{
1565 		/* -1 marks spots which are unused and therefore unknown */
1566 		{ 0x44,0x14,0x54,0x10,0x11,0x41,0x05,0x50,0x51,0x00,0x40,0x55,0x45,0x04,0x01,0x15 },
1567 		{ 0x44,0x10,0x15,0x55,0x00,0x41,0x40,0x51,0x14,0x45,0x11,0x50,0x01,0x54,0x04,0x05 },
1568 		{ 0x45,0x10,0x11,0x44,0x05,0x50,0x51,0x04,0x41,0x14,0x15,0x40,0x01,0x54,0x55,0x00 },
1569 		{ 0x04,0x51,0x45,0x00,0x44,0x10,  -1,0x55,0x11,0x54,0x50,0x40,0x05,  -1,0x14,0x01 },
1570 		{ 0x54,0x51,0x15,0x45,0x44,0x01,0x11,0x41,0x04,0x55,0x50,  -1,0x00,0x10,0x40,  -1 },
1571 		{   -1,0x54,0x14,0x50,0x51,0x01,  -1,0x40,0x41,0x10,0x00,0x55,0x05,0x44,0x11,0x45 },
1572 		{ 0x51,0x04,0x10,  -1,0x50,0x40,0x00,  -1,0x41,0x01,0x05,0x15,0x11,0x14,0x44,0x54 },
1573 		{   -1,  -1,0x54,0x01,0x15,0x40,0x45,0x41,0x51,0x04,0x50,0x05,0x11,0x44,0x10,0x14 }
1574 	};
1575 
1576 	cclimber_decode(convtable);
1577 }
1578 
DRIVER_INIT(cclimbrj)1579 DRIVER_INIT( cclimbrj )
1580 {
1581 	static const unsigned char convtable[8][16] =
1582 	{
1583 		{ 0x41,0x54,0x51,0x14,0x05,0x10,0x01,0x55,0x44,0x11,0x00,0x50,0x15,0x40,0x04,0x45 },
1584 		{ 0x50,0x11,0x40,0x55,0x51,0x14,0x45,0x04,0x54,0x15,0x10,0x05,0x44,0x01,0x00,0x41 },
1585 		{ 0x44,0x11,0x00,0x50,0x41,0x54,0x04,0x14,0x15,0x40,0x51,0x55,0x05,0x10,0x01,0x45 },
1586 		{ 0x10,0x50,0x54,0x55,0x01,0x44,0x40,0x04,0x14,0x11,0x00,0x41,0x45,0x15,0x51,0x05 },
1587 		{ 0x14,0x41,0x01,0x44,0x04,0x50,0x51,0x45,0x11,0x40,0x54,0x15,0x10,0x00,0x55,0x05 },
1588 		{ 0x01,0x05,0x41,0x45,0x54,0x50,0x55,0x10,0x11,0x15,0x51,0x14,0x44,0x40,0x04,0x00 },
1589 		{ 0x05,0x55,0x00,0x50,0x11,0x40,0x54,0x14,0x45,0x51,0x10,0x04,0x44,0x01,0x41,0x15 },
1590 		{ 0x55,0x50,0x15,0x10,0x01,0x04,0x41,0x44,0x45,0x40,0x05,0x00,0x11,0x14,0x51,0x54 },
1591 	};
1592 
1593 	cclimber_decode(convtable);
1594 }
1595 
1596 
1597 
1598 GAME( 1980, cclimber, 0,        cclimber, cclimber, cclimber, ROT0,   "Nichibutsu", "Crazy Climber (US)" )
1599 GAME( 1980, cclimbrj, cclimber, cclimber, cclimbrj, cclimbrj, ROT0,   "Nichibutsu", "Crazy Climber (Japan)" )
1600 GAME( 1980, ccboot,   cclimber, cclimber, cclimber, cclimbrj, ROT0,   "bootleg", "Crazy Climber (bootleg set 1)" )
1601 GAME( 1980, ccboot2,  cclimber, cclimber, cclimber, cclimbrj, ROT0,   "bootleg", "Crazy Climber (bootleg set 2)" )
1602 GAME( 1981, ckong,    0,        cclimber, ckong,    0,        ROT270, "Falcon", "Crazy Kong (set 1)" )
1603 GAME( 1981, ckonga,   ckong,    cclimber, ckong,    0,        ROT270, "Falcon", "Crazy Kong (set 2)" )
1604 GAME( 1981, ckongjeu, ckong,    cclimber, ckong,    0,        ROT270, "bootleg", "Crazy Kong (Jeutel bootleg)" )
1605 GAME( 1981, ckongo,   ckong,    cclimber, ckong,    0,        ROT270, "bootleg", "Crazy Kong (Orca bootleg)" )
1606 GAME( 1981, ckongalc, ckong,    cclimber, ckong,    0,        ROT270, "bootleg", "Crazy Kong (Alca bootleg)" )
1607 GAME( 1981, monkeyd,  ckong,    cclimber, ckong,    0,        ROT270, "bootleg", "Monkey Donkey" )
1608 GAME( 1982?,rpatrolb, 0,        cclimber, rpatrolb, 0,        ROT0,   "bootleg", "River Patrol (bootleg)" )
1609 GAME( 1982?,silvland, rpatrolb, cclimber, rpatrolb, 0,        ROT0,   "Falcon", "Silver Land" )
1610 GAMEX( 1985, cannonb,  0,        cannonb,  cannonb,  cannonb,  ROT90,  "Soft", "Cannon Ball (Crazy Climber hardware)" , GAME_IMPERFECT_GRAPHICS )
1611 
1612 GAME( 1982, swimmer,  0,        swimmer,  swimmer,  0,        ROT0,   "Tehkan", "Swimmer (set 1)" )
1613 GAME( 1982, swimmera, swimmer,  swimmer,  swimmer,  0,        ROT0,   "Tehkan", "Swimmer (set 2)" )
1614 GAME( 1982, swimmerb, swimmer,  swimmer,  swimmerb, 0,        ROT0,   "Tehkan", "Swimmer (set 3)" )
1615 GAME( 1983, guzzler,  0,        swimmer,  guzzler,  0,        ROT90,  "Tehkan", "Guzzler" )
1616