QuarterArcade Coin-Op Tech Net

Quick Nav: # A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Coin-Op : Arcade : Run & Gun : VM Driver Source

Source Listing


     1: #define RNG_DEBUG 0 
     2: 
     3: /*
     4:    Run and Gun / Slam Dunk
     5:    (c) 1993 Konami
     6: 
     7:    Driver by R. Belmont.
     8: 
     9:    This hardware uses the 55673 sprite chip like PreGX and System GX, but in a 4 bit
    10:    per pixel layout.  There is also an all-TTL front overlay tilemap and a rotating
    11:    scaling background done with the PSAC2 ('936).
    12: 
    13:    Status: Front tilemap should be complete, sprites are mostly correct, controls
    14:    should be fine.
    15: 
    16: 
    17:    Change Log:
    18: 
    19:    (AT070703)
    20:    drivers\rungun.c (this file)
    21:      - mem maps, device settings, component communications, I/O's, sound...etc.
    22: 
    23:    vidhrdw\rungun.c
    24:      - general clean-up, clipping, alignment
    25: 
    26:    vidhrdw\konamiic.c
    27:      - missing sprites and priority
    28: 
    29:    Known Issues:
    30:      - ** sound program ROM "247-a05" needs redump **
    31:      - no dual monitor support
    32:      - synchronization and other oddities (rungunu doesn't show attract mode)
    33:      - swapped P12 and P34 controls in 4-player mode team selectet (real puzzler)
    34:      - P3 and P4 coin chutes not working in 4-player mode
    35:      - sprite palettes are not entirely right
    36:      - ROZ update causes music to stutter
    37: */
    38: 
    39: #include "driver.h" 
    40: #include "state.h" 
    41: 
    42: #include "vidhrdw/generic.h" 
    43: #include "vidhrdw/konamiic.h" 
    44: #include "cpu/m68000/m68000.h" 
    45: #include "cpu/z80/z80.h" 
    46: #include "machine/eeprom.h" 
    47: #include "sound/k054539.h" 
    48: 
    49: VIDEO_START( rng );
    50: VIDEO_UPDATE( rng );
    51: MACHINE_INIT( rng );
    52: READ16_HANDLER( ttl_ram_r );
    53: WRITE16_HANDLER( ttl_ram_w );
    54: WRITE16_HANDLER( rng_936_videoram_w );
    55: 
    56: data16_t *rng_936_videoram;
    57: 
    58: static data16_t *rng_sysreg;
    59: static int init_eeprom_count;
    60: static int rng_z80_control;
    61: static int rng_sound_status;
    62: 
    63: static struct EEPROM_interface eeprom_interface =
    64: {
    65: 	7,			/* address bits */
    66: 	8,			/* data bits */
    67: 	"011000",		/*  read command */
    68: 	"011100",		/* write command */
    69: 	"0100100000000",/* erase command */
    70: 	"0100000000000",/* lock command */
    71: 	"0100110000000" /* unlock command */
    72: };
    73: 
    74: static NVRAM_HANDLER( rungun )
    75: {
    76: 	if (read_or_write)
    77: 		EEPROM_save(file);
    78: 	else
    79: 	{
    80: 		EEPROM_init(&eeprom_interface);
    81: 
    82: 		if (file)
    83: 		{
    84: 			init_eeprom_count = 0;
    85: 			EEPROM_load(file);
    86: 		}
    87: 		else
    88: 			init_eeprom_count = 10;
    89: 	}
    90: }
    91: 
    92: static READ16_HANDLER( rng_sysregs_r )
    93: {
    94: 	data16_t data = 0;
    95: 
    96: 	switch (offset)
    97: 	{
    98: 		case 0x00/2:
    99: 			if (readinputport(1) & 0x20)
   100: 				return(readinputport(2) | readinputport(4)<<8);
   101: 			else
   102: 			{
   103: 				data = readinputport(2) & readinputport(4);
   104: 				return(data<<8 | data);
   105: 			}
   106: 		break;
   107: 
   108: 		case 0x02/2:
   109: 			if (readinputport(1) & 0x20)
   110: 				return(readinputport(3) | readinputport(5)<<8);
   111: 			else
   112: 			{
   113: 				data = readinputport(3) & readinputport(5);
   114: 				return(data<<8 | data);
   115: 			}
   116: 		break;
   117: 
   118: 		case 0x04/2:
   119: 			/*
   120: 				bit0-7: coin mechs and services
   121: 				bit8 : freeze
   122: 				bit9 : joysticks layout(auto detect???)
   123: 			*/
   124: 			return(input_port_0_word_r(0, 0));
   125: 		break;
   126: 
   127: 		case 0x06/2:
   128: 			if (ACCESSING_LSB)
   129: 			{
   130: 				data = readinputport(1) | EEPROM_read_bit();
   131: 
   132: 				if (init_eeprom_count)
   133: 				{
   134: 					init_eeprom_count--;
   135: 					data &= 0xf7;
   136: 				}
   137: 			}
   138: 			return((rng_sysreg[0x06/2] & 0xff00) | data);
   139: 		break;
   140: 	}
   141: 
   142: 	return(rng_sysreg[offset]);
   143: }
   144: 
   145: static WRITE16_HANDLER( rng_sysregs_w )
   146: {
   147: 	COMBINE_DATA(rng_sysreg + offset);
   148: 
   149: 	switch (offset)
   150: 	{
   151: 		case 0x08/2:
   152: 			/*
   153: 				bit0  : EEPROM_write_bit
   154: 				bit1  : EEPROM_set_cs_line
   155: 				bit2  : EEPROM_set_clock_line
   156: 				bit3  : coin counter?
   157: 				bit7  : set before massive memory writes
   158: 				bit10 : IRQ5 ACK
   159: 			*/
   160: 			if (ACCESSING_LSB)
   161: 			{
   162: 				EEPROM_write_bit((data & 0x01) ? 1 : 0);
   163: 				EEPROM_set_cs_line((data & 0x02) ? CLEAR_LINE : ASSERT_LINE);
   164: 				EEPROM_set_clock_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
   165: 			}
   166: 
   167: 			if (!(data & 0x40))
   168: 				cpu_set_irq_line(0, MC68000_IRQ_5, CLEAR_LINE);
   169: 		break;
   170: 
   171: 		case 0x0c/2:
   172: 			/*
   173: 				bit 0 : also enables IRQ???
   174: 				bit 1 : disable PSAC2 input?
   175: 				bit 2 : OBJCHA
   176: 				bit 3 : enable IRQ 5
   177: 			*/
   178: 			K053246_set_OBJCHA_line((data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
   179: 		break;
   180: 	}
   181: }
   182: 
   183: static WRITE16_HANDLER( sound_cmd1_w )
   184: {
   185: 	if (ACCESSING_MSB)
   186: 		soundlatch_w(0, data>>8);
   187: }
   188: 
   189: static WRITE16_HANDLER( sound_cmd2_w )
   190: {
   191: 	if (ACCESSING_MSB)
   192: 		soundlatch2_w(0, data>>8);
   193: }
   194: 
   195: static WRITE16_HANDLER( sound_irq_w )
   196: {
   197: 	if (ACCESSING_MSB)
   198: 		cpu_set_irq_line(1, 0, HOLD_LINE);
   199: }
   200: 
   201: static READ16_HANDLER( sound_status_msb_r )
   202: {
   203: 	if (ACCESSING_MSB)
   204: 		return(rng_sound_status<<8);
   205: 
   206: 	return(0);
   207: }
   208: 
   209: static INTERRUPT_GEN(rng_interrupt)
   210: {
   211: 	if (rng_sysreg[0x0c/2] & 0x09)
   212: 		cpu_set_irq_line(0, MC68000_IRQ_5, ASSERT_LINE);
   213: }
   214: 
   215: static MEMORY_READ16_START( rngreadmem )
   216: 	{ 0x000000, 0x2fffff, MRA16_ROM },		// main program + data
   217: 	{ 0x300000, 0x3007ff, MRA16_RAM },		// palette RAM
   218: 	{ 0x380000, 0x39ffff, MRA16_RAM },		// work RAM
   219: 	{ 0x400000, 0x43ffff, MRA16_NOP },		// K053936_0_rom_r }, // '936 ROM readback window
   220: 	{ 0x480000, 0x48001f, rng_sysregs_r },
   221: 	{ 0x4c0000, 0x4c001f, K053252_word_r },	// CCU (for scanline and vblank polling)
   222: 	{ 0x580014, 0x580015, sound_status_msb_r },
   223: 	{ 0x580000, 0x58001f, MRA16_RAM },		// sound regs read fall-through
   224: 	{ 0x5c0000, 0x5c000d, K053246_word_r },	// 246A ROM readback window
   225: 	{ 0x600000, 0x600fff, K053247_word_r },	// OBJ RAM
   226: 	{ 0x601000, 0x601fff, MRA16_RAM },		// communication? second monitor buffer?
   227: 	{ 0x6c0000, 0x6cffff, MRA16_RAM },		// PSAC2 render RAM
   228: 	{ 0x700000, 0x7007ff, MRA16_RAM },		// PSAC2 line effect
   229: 	{ 0x740000, 0x741fff, ttl_ram_r },		// text plane RAM
   230: #if RNG_DEBUG 
   231: 	{ 0x5c0010, 0x5c001f, K053247_reg_word_r },
   232: 	{ 0x640000, 0x640007, K053246_reg_word_r },
   233: #endif 
   234: MEMORY_END
   235: 
   236: static MEMORY_WRITE16_START( rngwritemem )
   237: 	{ 0x000000, 0x2fffff, MWA16_ROM },
   238: 	{ 0x300000, 0x3007ff, paletteram16_xBBBBBGGGGGRRRRR_word_w, &paletteram16 },
   239: 	{ 0x380000, 0x39ffff, MWA16_RAM },		// work RAM
   240: 	{ 0x480000, 0x48001f, rng_sysregs_w, &rng_sysreg },
   241: 	{ 0x4c0000, 0x4c001f, K053252_word_w },	// CCU
   242: 	{ 0x540000, 0x540001, sound_irq_w },
   243: 	{ 0x58000c, 0x58000d, sound_cmd1_w },
   244: 	{ 0x58000e, 0x58000f, sound_cmd2_w },
   245: 	{ 0x580000, 0x58001f, MWA16_RAM },		// sound regs write fall-through
   246: 	{ 0x5c0010, 0x5c001f, K053247_reg_word_w },
   247: 	{ 0x600000, 0x600fff, K053247_word_w },	// OBJ RAM
   248: 	{ 0x601000, 0x601fff, MWA16_RAM },		// communication? second monitor buffer?
   249: 	{ 0x640000, 0x640007, K053246_word_w },	// '246A registers
   250: 	{ 0x680000, 0x68001f, MWA16_RAM, &K053936_0_ctrl },				// '936 registers
   251: 	{ 0x6c0000, 0x6cffff, rng_936_videoram_w, &rng_936_videoram },	// PSAC2 ('936) RAM (34v + 35v)
   252: 	{ 0x700000, 0x7007ff, MWA16_RAM, &K053936_0_linectrl },			// "Line RAM"
   253: 	{ 0x740000, 0x741fff, ttl_ram_w },		// text plane RAM
   254: 	{ 0x7c0000, 0x7c0001, MWA16_NOP },		// watchdog
   255: MEMORY_END
   256: 
   257: /**********************************************************************************/
   258: 
   259: static WRITE_HANDLER( sound_status_w )
   260: {
   261: 	rng_sound_status = data;
   262: }
   263: 
   264: static WRITE_HANDLER( z80ctrl_w )
   265: {
   266: 	rng_z80_control = data;
   267: 
   268: 	cpu_setbank(2, memory_region(REGION_CPU2) + 0x10000 + (data & 0x07) * 0x4000);
   269: 
   270: 	if (data & 0x10)
   271: 		cpu_set_nmi_line(1, CLEAR_LINE);
   272: }
   273: 
   274: static INTERRUPT_GEN(audio_interrupt)
   275: {
   276: 	if (rng_z80_control & 0x80) return;
   277: 
   278: 	cpu_set_nmi_line(1, ASSERT_LINE);
   279: }
   280: 
   281: /* sound (this should be split into sndhrdw/xexex.c or pregx.c or so someday) */
   282: 
   283: static MEMORY_READ_START( sound_readmem )
   284: 	{ 0x0000, 0x7fff, MRA_ROM },
   285: 	{ 0x8000, 0xbfff, MRA_BANK2 },
   286: 	{ 0xc000, 0xdfff, MRA_RAM },
   287: 	{ 0xe000, 0xe22f, K054539_0_r },
   288: 	{ 0xe230, 0xe3ff, MRA_RAM },
   289: 	{ 0xe400, 0xe62f, K054539_1_r },
   290: 	{ 0xe630, 0xe7ff, MRA_RAM },
   291: 	{ 0xf002, 0xf002, soundlatch_r },
   292: 	{ 0xf003, 0xf003, soundlatch2_r },
   293: MEMORY_END
   294: 
   295: static MEMORY_WRITE_START( sound_writemem )
   296: 	{ 0x0000, 0xbfff, MWA_ROM },
   297: 	{ 0xc000, 0xdfff, MWA_RAM },
   298: 	{ 0xe000, 0xe22f, K054539_0_w },
   299: 	{ 0xe230, 0xe3ff, MWA_RAM },
   300: 	{ 0xe400, 0xe62f, K054539_1_w },
   301: 	{ 0xe630, 0xe7ff, MWA_RAM },
   302: 	{ 0xf000, 0xf000, sound_status_w },
   303: 	{ 0xf800, 0xf800, z80ctrl_w },
   304: 	{ 0xfff0, 0xfff3, MWA_NOP },
   305: MEMORY_END
   306: 
   307: static struct K054539interface k054539_interface =
   308: {
   309: 	2,			/* 2 chips */
   310: 	48000,
   311: 	{ REGION_SOUND1, REGION_SOUND1 },
   312: 	{ { 100, 100 }, { 100, 100 } },
   313: 	{ NULL }
   314: };
   315: 
   316: /**********************************************************************************/
   317: 
   318: static struct GfxLayout bglayout =
   319: {
   320: 	16,16,
   321: 	RGN_FRAC(1,1),
   322: 	4,
   323: 	{ 0, 1, 2, 3 },
   324: 	{ 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4, 8*4,
   325: 	  9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4 },
   326: 	{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
   327: 			8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
   328: 	128*8
   329: };
   330: 
   331: static struct GfxDecodeInfo gfxdecodeinfo[] =
   332: {
   333: 	{ REGION_GFX1, 0, &bglayout, 0x0000, 64 },
   334: 	{ -1 } /* end of array */
   335: };
   336: 
   337: static MACHINE_DRIVER_START( rng )
   338: 
   339: 	/* basic machine hardware */
   340: 	MDRV_CPU_ADD_TAG("main", M68000, 16000000)
   341: 	MDRV_CPU_MEMORY(rngreadmem,rngwritemem)
   342: 	MDRV_CPU_VBLANK_INT(rng_interrupt,1)
   343: 
   344: 	MDRV_CPU_ADD_TAG("sound", Z80, 10000000) // 8Mhz (10Mhz is much safer in self-test due to heavy sync)
   345: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
   346: 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
   347: 	MDRV_CPU_PERIODIC_INT(audio_interrupt, 480)
   348: 
   349: 	MDRV_INTERLEAVE(100) // higher if sound stutters
   350: 	MDRV_FRAMES_PER_SECOND(60)
   351: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   352: 
   353: 	MDRV_GFXDECODE(gfxdecodeinfo)
   354: 
   355: 	MDRV_MACHINE_INIT(rng)
   356: 	MDRV_NVRAM_HANDLER(rungun)
   357: 
   358: 	/* video hardware */
   359: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_NEEDS_6BITS_PER_GUN | VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_BEFORE_VBLANK)
   360: 	MDRV_SCREEN_SIZE(64*8, 32*8)
   361: 	MDRV_VISIBLE_AREA(88, 88+384-1, 24, 24+224-1)
   362: 	MDRV_PALETTE_LENGTH(1024)
   363: 
   364: 	MDRV_VIDEO_START(rng)
   365: 	MDRV_VIDEO_UPDATE(rng)
   366: 
   367: 	/* sound hardware */
   368: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
   369: 	MDRV_SOUND_ADD(K054539, k054539_interface)
   370: MACHINE_DRIVER_END
   371: 
   372: INPUT_PORTS_START( rng )
   373: 	PORT_START
   374: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
   375: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
   376: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
   377: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN4 )
   378: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
   379: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
   380: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 )
   381: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE4 )
   382: 	PORT_DIPNAME( 0x0100, 0x0000, "Freeze" )
   383: 	PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
   384: 	PORT_DIPSETTING( 0x0100, DEF_STR( On ) )
   385: 	PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
   386: 	PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
   387: 	PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
   388: 
   389: 	PORT_START
   390: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )	/* EEPROM data */
   391: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL )	/* EEPROM ready (always 1) */
   392: 	PORT_BITX(0x08, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
   393: 	PORT_DIPNAME( 0x10, 0x00, "Monitors" )
   394: 	PORT_DIPSETTING(    0x00, "1" )
   395: 	PORT_DIPSETTING(    0x10, "2" )
   396: 	PORT_DIPNAME( 0x20, 0x00, "Number of players" )
   397: 	PORT_DIPSETTING(    0x00, "2" )
   398: 	PORT_DIPSETTING(    0x20, "4" )
   399: 	PORT_DIPNAME( 0x40, 0x00, "Sound Output" )
   400: 	PORT_DIPSETTING(    0x40, "Mono" )
   401: 	PORT_DIPSETTING(    0x00, "Stereo" )
   402: 	PORT_DIPNAME( 0x04, 0x04, "Bit2 (Unknown)" )
   403: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
   404: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   405: 	PORT_DIPNAME( 0x80, 0x80, "Bit7 (Unknown)" )
   406: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
   407: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   408: 
   409: 	PORT_START
   410: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
   411: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
   412: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
   413: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
   414: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
   415: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
   416: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
   417: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
   418: 
   419: 	PORT_START
   420: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
   421: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
   422: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
   423: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
   424: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
   425: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
   426: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
   427: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
   428: 
   429: 	PORT_START
   430: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
   431: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
   432: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
   433: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
   434: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
   435: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
   436: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
   437: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START3 )
   438: 
   439: 	PORT_START
   440: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
   441: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
   442: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
   443: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
   444: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
   445: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
   446: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
   447: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
   448: INPUT_PORTS_END
   449: 
   450: #define ROM_LOAD64_WORD(name,offset,length,crc)		ROMX_LOAD(name, offset, length, crc, ROM_GROUPWORD | ROM_SKIP(6)) 
   451: 
   452: ROM_START( rungunu )
   453: 	/* main program */
   454: 	ROM_REGION( 0x300000, REGION_CPU1, 0)
   455: 	ROM_LOAD16_BYTE( "247b03", 0x000000, 0x80000, CRC(f259fd11) SHA1(60381a3fa7f78022dcb3e2f3d13ea32a10e4e36e) )
   456: 	ROM_LOAD16_BYTE( "247b04", 0x000001, 0x80000, CRC(b918cf5a) SHA1(4314c611ef600ec081f409c78218de1639f8b463) )
   457: 
   458: 	/* data */
   459: 	ROM_LOAD16_BYTE( "247a01", 0x100000, 0x80000, CRC(8341cf7d) SHA1(372c147c4a5d54aed2a16b0ed258247e65dda563) )
   460: 	ROM_LOAD16_BYTE( "247a02", 0x100001, 0x80000, CRC(f5ef3f45) SHA1(2e1d8f672c130dbfac4365dc1301b47beee10161) )
   461: 
   462: 	/* sound program */
   463: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )
   464: 	ROM_LOAD("247a05", 0x000000, 0x20000, CRC(64e85430) SHA1(542919c3be257c8f118fc21d3835d7b6426a22ed) )
   465: 	ROM_RELOAD(        0x010000, 0x20000 )
   466: 
   467: 	/* '936 tiles */
   468: 	ROM_REGION( 0x400000, REGION_GFX1, 0)
   469: 	ROM_LOAD( "247a13", 0x000000, 0x200000, CRC(c5a8ef29) SHA1(23938b8093bc0b9eef91f6d38127ca7acbdc06a6) )
   470: 
   471: 	/* sprites */
   472: 	ROM_REGION( 0x800000, REGION_GFX2, 0)
   473: 	ROM_LOAD64_WORD( "247-a11", 0x000000, 0x200000, CRC(c3f60854) SHA1(cbee7178ab9e5aa6a5aeed0511e370e29001fb01) )	// 5y
   474: 	ROM_LOAD64_WORD( "247-a08", 0x000002, 0x200000, CRC(3e315eef) SHA1(898bc4d5ad244e5f91cbc87820b5d0be99ef6662) )	// 2u
   475: 	ROM_LOAD64_WORD( "247-a09", 0x000004, 0x200000, CRC(5ca7bc06) SHA1(83c793c68227399f93bd1ed167dc9ed2aaac4167) )	// 2y
   476: 	ROM_LOAD64_WORD( "247-a10", 0x000006, 0x200000, CRC(a5ccd243) SHA1(860b88ade1a69f8b6c5b8206424814b386343571) )	// 5u
   477: 
   478: 	/* TTL text plane ("fix layer") */
   479: 	ROM_REGION( 0x20000, REGION_GFX3, 0)
   480: 	ROM_LOAD( "247-a12", 0x000000, 0x20000, CRC(57a8d26e) SHA1(0431d10b76d77c26a1f6f2b55d9dbcfa959e1cd0) )
   481: 
   482: 	/* sound data */
   483: 	ROM_REGION( 0x400000, REGION_SOUND1, 0)
   484: 	ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) )
   485: 	ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) )
   486: ROM_END
   487: 
   488: ROM_START( rungun )
   489: 	/* main program */
   490: 	ROM_REGION( 0x300000, REGION_CPU1, 0)
   491: 	ROM_LOAD16_BYTE( "247-c03", 0x000000, 0x80000, CRC(fec3e1d6) SHA1(cd89dc32ad06308134d277f343a7e8b5fe381f69) )
   492: 	ROM_LOAD16_BYTE( "247-c04", 0x000001, 0x80000, CRC(1b556af9) SHA1(c8351ebd595307d561d089c66cd6ed7f6111d996) )
   493: 
   494: 	/* data (Guru 1 megabyte redump) */
   495: 	ROM_LOAD16_BYTE( "247b01.23n", 0x200000, 0x80000, CRC(2d774f27) SHA1(c48de9cb9daba25603b8278e672f269807aa0b20) )
   496: 	ROM_CONTINUE(                  0x100000, 0x80000)
   497: 	ROM_LOAD16_BYTE( "247b02.21n", 0x200001, 0x80000, CRC(d088c9de) SHA1(19d7ad4120f7cfed9cae862bb0c799fdad7ab15c) )
   498: 	ROM_CONTINUE(                  0x100001, 0x80000)
   499: 
   500: 	/* sound program */
   501: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )
   502: 	// bad dump (higher banks and the second half of lower banks filled with 0xff)
   503: 	ROM_LOAD("247-a05", 0x000000, 0x20000, BAD_DUMP CRC(412fa1e0) SHA1(3fcf203cfcfb7ec9539d8613a8bf95747c76cc4f) )
   504: 	// borrowed from rungunu
   505: 	ROM_LOAD("247a05",  0x000000, 0x20000, CRC(64e85430) SHA1(542919c3be257c8f118fc21d3835d7b6426a22ed) )
   506: 	ROM_RELOAD(         0x010000, 0x20000 )
   507: 
   508: 	/* '936 tiles */
   509: 	ROM_REGION( 0x400000, REGION_GFX1, 0)
   510: 	ROM_LOAD( "247-a13", 0x000000, 0x200000, CRC(cc194089) SHA1(b5af94f5f583d282ac1499b371bbaac8b2fedc03) )
   511: 
   512: 	/* sprites */
   513: 	ROM_REGION( 0x800000, REGION_GFX2, 0)
   514: 	ROM_LOAD64_WORD( "247-a11", 0x000000, 0x200000, CRC(c3f60854) SHA1(cbee7178ab9e5aa6a5aeed0511e370e29001fb01) )	// 5y
   515: 	ROM_LOAD64_WORD( "247-a08", 0x000002, 0x200000, CRC(3e315eef) SHA1(898bc4d5ad244e5f91cbc87820b5d0be99ef6662) )	// 2u
   516: 	ROM_LOAD64_WORD( "247-a09", 0x000004, 0x200000, CRC(5ca7bc06) SHA1(83c793c68227399f93bd1ed167dc9ed2aaac4167) )	// 2y
   517: 	ROM_LOAD64_WORD( "247-a10", 0x000006, 0x200000, CRC(a5ccd243) SHA1(860b88ade1a69f8b6c5b8206424814b386343571) )	// 5u
   518: 
   519: 	/* TTL text plane ("fix layer") */
   520: 	ROM_REGION( 0x20000, REGION_GFX3, 0)
   521: 	ROM_LOAD( "247-a12", 0x000000, 0x20000, CRC(57a8d26e) SHA1(0431d10b76d77c26a1f6f2b55d9dbcfa959e1cd0) )
   522: 
   523: 	/* sound data */
   524: 	ROM_REGION( 0x400000, REGION_SOUND1, 0)
   525: 	ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) )
   526: 	ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) )
   527: ROM_END
   528: 
   529: ROM_START( slmdunkj )
   530: 	/* main program */
   531: 	ROM_REGION( 0x300000, REGION_CPU1, 0)
   532: 	ROM_LOAD16_BYTE( "247jaa03.bin", 0x000000, 0x20000, CRC(87572078) SHA1(cfa784eb40ed8b3bda9d57abb6022bbe92056206) )
   533: 	ROM_LOAD16_BYTE( "247jaa04.bin", 0x000001, 0x20000, CRC(aa105e00) SHA1(617ac14535048b6e0da43cc98c4b67c8e306bef1) )
   534: 
   535: 	/* data (Guru 1 megabyte redump) */
   536: 	ROM_LOAD16_BYTE( "247b01.23n", 0x200000, 0x80000, CRC(2d774f27) SHA1(c48de9cb9daba25603b8278e672f269807aa0b20) )
   537: 	ROM_CONTINUE(                  0x100000, 0x80000)
   538: 	ROM_LOAD16_BYTE( "247b02.21n", 0x200001, 0x80000, CRC(d088c9de) SHA1(19d7ad4120f7cfed9cae862bb0c799fdad7ab15c) )
   539: 	ROM_CONTINUE(                  0x100001, 0x80000)
   540: 
   541: 	/* sound program */
   542: 	ROM_REGION( 0x030000, REGION_CPU2, 0 )
   543: 	// bad dump (higher banks and the second half of lower banks filled with 0xff)
   544: 	ROM_LOAD("247-a05", 0x000000, 0x20000, BAD_DUMP CRC(412fa1e0) SHA1(3fcf203cfcfb7ec9539d8613a8bf95747c76cc4f) )
   545: 	// borrowed from rungunu
   546: 	ROM_LOAD("247a05",  0x000000, 0x20000, CRC(64e85430) SHA1(542919c3be257c8f118fc21d3835d7b6426a22ed) )
   547: 	ROM_RELOAD(         0x010000, 0x20000 )
   548: 
   549: 	/* '936 tiles */
   550: 	ROM_REGION( 0x400000, REGION_GFX1, 0)
   551: 	ROM_LOAD( "247-a13", 0x000000, 0x200000, CRC(cc194089) SHA1(b5af94f5f583d282ac1499b371bbaac8b2fedc03) )
   552: 
   553: 	/* sprites */
   554: 	ROM_REGION( 0x800000, REGION_GFX2, 0)
   555: 	ROM_LOAD64_WORD( "247-a11", 0x000000, 0x200000, CRC(c3f60854) SHA1(cbee7178ab9e5aa6a5aeed0511e370e29001fb01) )	// 5y
   556: 	ROM_LOAD64_WORD( "247-a08", 0x000002, 0x200000, CRC(3e315eef) SHA1(898bc4d5ad244e5f91cbc87820b5d0be99ef6662) )	// 2u
   557: 	ROM_LOAD64_WORD( "247-a09", 0x000004, 0x200000, CRC(5ca7bc06) SHA1(83c793c68227399f93bd1ed167dc9ed2aaac4167) )	// 2y
   558: 	ROM_LOAD64_WORD( "247-a10", 0x000006, 0x200000, CRC(a5ccd243) SHA1(860b88ade1a69f8b6c5b8206424814b386343571) )	// 5u
   559: 
   560: 	/* TTL text plane ("fix layer") */
   561: 	ROM_REGION( 0x20000, REGION_GFX3, 0)
   562: 	ROM_LOAD( "247-a12", 0x000000, 0x20000, CRC(57a8d26e) SHA1(0431d10b76d77c26a1f6f2b55d9dbcfa959e1cd0) )
   563: 
   564: 	/* sound data */
   565: 	ROM_REGION( 0x400000, REGION_SOUND1, 0)
   566: 	ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) )
   567: 	ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) )
   568: ROM_END
   569: 
   570: static DRIVER_INIT( rng )
   571: {
   572: 	K054539_init_flags(K054539_REVERSE_STEREO);
   573: }
   574: 
   575: MACHINE_INIT( rng )
   576: {
   577: 	memset(rng_sysreg, 0, 0x20);
   578: 
   579: 	init_eeprom_count = 0;
   580: 	rng_z80_control = 0;
   581: 	rng_sound_status = 0;
   582: }
   583: 
   584: GAMEX( 1993, rungun,   0,      rng, rng, rng, ROT0, "Konami", "Run and Gun (World ver. EAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
   585: GAMEX( 1993, rungunu,  rungun, rng, rng, rng, ROT0, "Konami", "Run and Gun (US ver. UAB)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
   586: GAMEX( 1993, slmdunkj, rungun, rng, rng, rng, ROT0, "Konami", "Slam Dunk (Japan ver. JAA))", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND )
   587: 




powered by ggdb.com this page took approx. 0.007s