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 : Tower Of Druaga, The : VM Driver Source

Source Listing


     1: /***************************************************************************
     2: 
     3: Mappy memory map (preliminary)
     4: 
     5: driver by Aaron Giles
     6: 
     7: 
     8: CPU #1:
     9: 0000-07ff video RAM
    10: 0800-0fff color RAM
    11: 1000-177f RAM
    12: 1780-17ff sprite data 1 (sprite number & color)
    13: 1800-1f7f RAM
    14: 1f80-1fff sprite data 2 (x, y position)
    15: 2000-277f RAM
    16: 2780-27ff sprite data 3 (high bit of y, flip flags, double-size flags)
    17: 3800-3fff scroll register map
    18: 4040-43ff RAM shared with CPU #2
    19: 4800-480f custom I/O chip #1
    20: 4810-481f custom I/O chip #2
    21: 5002-5003 IRQ enable
    22: 5004-5005 cocktail flipscreen
    23: 5008      CPU #2 reset & disable I/O chips
    24: 5009      enable I/O chips
    25: 500a-500b CPU #2 enable
    26: 8000      watchdog timer
    27: a000-ffff ROM
    28: 
    29: CPU #2:
    30: 0000-0040 sound registers
    31: 0040-03ff RAM shared with CPU #1
    32: 2000-2001 IRQ enable
    33: 2006-2007 sound enable
    34: e000-ffff ROM
    35: 
    36: Interrupts:
    37: CPU #1 IRQ generated by VBLANK
    38: CPU #2 IRQ generated by VBLANK
    39: 
    40: Changes:
    41: Aug 1999   Proper cocktail emulation implemented by Chad Hendrickson
    42: 
    43: ***************************************************************************/
    44: 
    45: #include "driver.h" 
    46: #include "vidhrdw/generic.h" 
    47: 
    48: 
    49: 
    50: /* machine driver data & functions */
    51: extern unsigned char *mappy_sharedram;
    52: extern unsigned char *mappy_customio_1,*mappy_customio_2;
    53: MACHINE_INIT( mappy );
    54: MACHINE_INIT( motos );
    55: READ_HANDLER( mappy_sharedram_r );
    56: WRITE_HANDLER( mappy_sharedram_w );
    57: WRITE_HANDLER( mappy_customio_1_w );
    58: WRITE_HANDLER( mappy_customio_2_w );
    59: INTERRUPT_GEN( mappy_interrupt_1 );
    60: INTERRUPT_GEN( mappy_interrupt_2 );
    61: WRITE_HANDLER( mappy_interrupt_enable_1_w );
    62: WRITE_HANDLER( mappy_interrupt_enable_2_w );
    63: WRITE_HANDLER( mappy_cpu_enable_w );
    64: WRITE_HANDLER( mappy_reset_2_w );
    65: WRITE_HANDLER( mappy_io_chips_enable_w );
    66: WRITE_HANDLER( mappy_flipscreen_w );
    67: 
    68: READ_HANDLER( mappy_customio_1_r );
    69: READ_HANDLER( mappy_customio_2_r );
    70: 
    71: READ_HANDLER( digdug2_customio_1_r );
    72: READ_HANDLER( digdug2_customio_2_r );
    73: 
    74: READ_HANDLER( motos_customio_1_r );
    75: READ_HANDLER( motos_customio_2_r );
    76: 
    77: READ_HANDLER( todruaga_customio_1_r );
    78: READ_HANDLER( todruaga_customio_2_r );
    79: 
    80: /* video driver data & functions */
    81: VIDEO_START( mappy );
    82: VIDEO_START( motos );
    83: VIDEO_START( todruaga );
    84: VIDEO_UPDATE( mappy );
    85: WRITE_HANDLER( mappy_videoram_w );
    86: WRITE_HANDLER( mappy_colorram_w );
    87: WRITE_HANDLER( mappy_scroll_w );
    88: PALETTE_INIT( mappy );
    89: 
    90: /* sound driver data & functions */
    91: extern unsigned char *mappy_soundregs;
    92: WRITE_HANDLER( mappy_sound_w );
    93: WRITE_HANDLER( mappy_sound_enable_w );
    94: 
    95: 
    96: /* CPU 1 read addresses */
    97: static MEMORY_READ_START( mappy_readmem_cpu1 )
    98: 	{ 0x4040, 0x43ff, MRA_RAM },			/* shared RAM with the sound CPU */
    99: 	{ 0x4800, 0x480f, mappy_customio_1_r },	/* custom I/O chip #1 interface */
   100: 	{ 0x4810, 0x481f, mappy_customio_2_r },	/* custom I/O chip #2 interface */
   101: 	{ 0x0000, 0x9fff, MRA_RAM },			/* RAM everywhere else */
   102: 	{ 0xa000, 0xffff, MRA_ROM },			/* ROM code */
   103: MEMORY_END
   104: 
   105: static MEMORY_READ_START( digdug2_readmem_cpu1 )
   106: 	{ 0x4040, 0x43ff, MRA_RAM },				/* shared RAM with the sound CPU */
   107: 	{ 0x4800, 0x480f, digdug2_customio_1_r },	/* custom I/O chip #1 interface */
   108: 	{ 0x4810, 0x481f, digdug2_customio_2_r },	/* custom I/O chip #2 interface */
   109: 	{ 0x4820, 0x4bff, MRA_RAM },				/* extra RAM for Dig Dug 2 */
   110: 	{ 0x0000, 0x7fff, MRA_RAM },				/* RAM everywhere else */
   111: 	{ 0x8000, 0xffff, MRA_ROM },				/* ROM code */
   112: MEMORY_END
   113: 
   114: static MEMORY_READ_START( motos_readmem_cpu1 )
   115: 	{ 0x4040, 0x43ff, MRA_RAM },			/* shared RAM with the sound CPU */
   116: 	{ 0x4800, 0x480f, motos_customio_1_r },	/* custom I/O chip #1 interface */
   117: 	{ 0x4810, 0x481f, motos_customio_2_r },	/* custom I/O chip #2 interface */
   118: 	{ 0x0000, 0x7fff, MRA_RAM },			/* RAM everywhere else */
   119: 	{ 0x8000, 0xffff, MRA_ROM },			/* ROM code */
   120: MEMORY_END
   121: 
   122: static MEMORY_READ_START( todruaga_readmem_cpu1 )
   123: 	{ 0x4040, 0x43ff, MRA_RAM },				/* shared RAM with the sound CPU */
   124: 	{ 0x4800, 0x480f, todruaga_customio_1_r },	/* custom I/O chip #1 interface */
   125: 	{ 0x4810, 0x481f, todruaga_customio_2_r },	/* custom I/O chip #2 interface */
   126: 	{ 0x0000, 0x7fff, MRA_RAM },				/* RAM everywhere else */
   127: 	{ 0x8000, 0xffff, MRA_ROM },				/* ROM code */
   128: MEMORY_END
   129: 
   130: 
   131: /* CPU 1 write addresses */
   132: static MEMORY_WRITE_START( writemem_cpu1 )
   133: 	{ 0x1000, 0x177f, MWA_RAM },                                 /* general RAM, area 1 */
   134: 	{ 0x1800, 0x1f7f, MWA_RAM },                                 /* general RAM, area 2 */
   135: 	{ 0x2000, 0x277f, MWA_RAM },                                 /* general RAM, area 3 */
   136: 	{ 0x4040, 0x43ff, MWA_RAM, &mappy_sharedram },               /* shared RAM with the sound CPU */
   137: 	{ 0x4820, 0x4bff, MWA_RAM },                                 /* extra RAM for Dig Dug 2 */
   138: 	{ 0x0000, 0x07ff, mappy_videoram_w, &videoram, &videoram_size },/* video RAM */
   139: 	{ 0x0800, 0x0fff, mappy_colorram_w, &colorram },             /* color RAM */
   140: 	{ 0x1780, 0x17ff, MWA_RAM, &spriteram, &spriteram_size },    /* sprite RAM, area 1 */
   141: 	{ 0x1f80, 0x1fff, MWA_RAM, &spriteram_2 },                   /* sprite RAM, area 2 */
   142: 	{ 0x2780, 0x27ff, MWA_RAM, &spriteram_3 },                   /* sprite RAM, area 3 */
   143: 	{ 0x3800, 0x3fff, mappy_scroll_w },                          /* scroll registers */
   144: 	{ 0x4800, 0x480f, mappy_customio_1_w, &mappy_customio_1 },   /* custom I/O chip #1 interface */
   145: 	{ 0x4810, 0x481f, mappy_customio_2_w, &mappy_customio_2 },   /* custom I/O chip #2 interface */
   146: 	{ 0x5002, 0x5003, mappy_interrupt_enable_1_w },              /* interrupt enable */
   147: 	{ 0x5004, 0x5005, mappy_flipscreen_w },				 /* cocktail flipscreen */
   148: 	{ 0x5008, 0x5008, mappy_reset_2_w },			       /* reset CPU #2 & disable I/O chips */
   149: 	{ 0x5009, 0x5009, mappy_io_chips_enable_w },		       /* enable I/O chips */
   150: 	{ 0x500a, 0x500b, mappy_cpu_enable_w },                      /* sound CPU enable */
   151: 	{ 0x8000, 0x8000, MWA_NOP },                                 /* watchdog timer */
   152: 	{ 0x8000, 0xffff, MWA_ROM },                                 /* ROM code */
   153: 
   154: MEMORY_END
   155: 
   156: 
   157: /* CPU 2 read addresses */
   158: static MEMORY_READ_START( mappy_readmem_cpu2 )
   159: 	{ 0xe000, 0xffff, MRA_ROM },                                 /* ROM code */
   160: 	{ 0x0040, 0x03ff, mappy_sharedram_r },                      /* shared RAM with the main CPU */
   161: 
   162: MEMORY_END
   163: 
   164: static MEMORY_READ_START( digdug2_readmem_cpu2 )
   165: 	{ 0xe000, 0xffff, MRA_ROM },                                 /* ROM code */
   166: 	{ 0x0040, 0x03ff, mappy_sharedram_r },                    /* shared RAM with the main CPU */
   167: 
   168: MEMORY_END
   169: 
   170: static MEMORY_READ_START( motos_readmem_cpu2 )
   171: 	{ 0xe000, 0xffff, MRA_ROM },                                 /* ROM code */
   172: 	{ 0x0040, 0x03ff, mappy_sharedram_r },						 /* shared RAM with the main CPU */
   173: 
   174: MEMORY_END
   175: 
   176: static MEMORY_READ_START( todruaga_readmem_cpu2 )
   177: 	{ 0xe000, 0xffff, MRA_ROM },                                 /* ROM code */
   178: 	{ 0x0040, 0x03ff, mappy_sharedram_r },						 /* shared RAM with the main CPU */
   179: 
   180: MEMORY_END
   181: 
   182: 
   183: /* CPU 2 write addresses */
   184: static MEMORY_WRITE_START( writemem_cpu2 )
   185: 	{ 0x0040, 0x03ff, mappy_sharedram_w },                       /* shared RAM with the main CPU */
   186: 	{ 0x0000, 0x003f, mappy_sound_w, &mappy_soundregs },         /* sound control registers */
   187: 	{ 0x2000, 0x2001, mappy_interrupt_enable_2_w },              /* interrupt enable */
   188: 	{ 0x2006, 0x2007, mappy_sound_enable_w },                    /* sound enable */
   189: 	{ 0xe000, 0xffff, MWA_ROM },                                 /* ROM code */
   190: 
   191: MEMORY_END
   192: 
   193: 
   194: /* input from the outside world */
   195: INPUT_PORTS_START( mappy )
   196: 	PORT_START      /* DSW0 */
   197: /* According to the manual, 0x04, 0x08 and 0x10 should always be off,
   198: but... */
   199: 	PORT_DIPNAME( 0x07, 0x00, "Rank" )
   200: 	PORT_DIPSETTING(    0x00, "A" )
   201: 	PORT_DIPSETTING(    0x01, "B" )
   202: 	PORT_DIPSETTING(    0x02, "C" )
   203: 	PORT_DIPSETTING(    0x03, "D" )
   204: 	PORT_DIPSETTING(    0x04, "E" )
   205: 	PORT_DIPSETTING(    0x05, "F" )
   206: 	PORT_DIPSETTING(    0x06, "G" )
   207: 	PORT_DIPSETTING(    0x07, "H" )
   208: 	PORT_DIPNAME( 0x18, 0x00, DEF_STR( Coin_B ) )
   209: 	PORT_DIPSETTING(    0x18, DEF_STR( 2C_1C ) )
   210: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   211: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_5C) )
   212: 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_7C ) )
   213: 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
   214: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
   215: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   216: 	PORT_BITX(    0x40, 0x00, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Rack Test", KEYCODE_F1, IP_JOY_NONE )
   217: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   218: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
   219: 	PORT_DIPNAME( 0x80, 0x00, "Freeze" )
   220: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   221: 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
   222: 
   223: 	PORT_START      /* DSW1 */
   224: 	PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) )
   225: 	PORT_DIPSETTING(    0x06, DEF_STR( 3C_1C ) )
   226: 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
   227: 	PORT_DIPSETTING(    0x07, DEF_STR( 3C_2C ) )
   228: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   229: 	PORT_DIPSETTING(    0x05, DEF_STR( 2C_3C ) )
   230: 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
   231: 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
   232: 	PORT_DIPSETTING(    0x03, DEF_STR( 1C_6C ) )
   233: 	/* TODO: bonus scores are different for 5 lives */
   234: 	PORT_DIPNAME( 0x38, 0x00, DEF_STR( Bonus_Life ) )
   235: 	PORT_DIPSETTING(    0x28, "20k 70k and every 70k" )
   236: 	PORT_DIPSETTING(    0x30, "20k 80k and every 80k" )
   237: 	PORT_DIPSETTING(    0x08, "20k 60k" )
   238: 	PORT_DIPSETTING(    0x00, "20k 70k" )
   239: 	PORT_DIPSETTING(    0x10, "20k 80k" )
   240: 	PORT_DIPSETTING(    0x18, "30k 100k" )
   241: 	PORT_DIPSETTING(    0x20, "20k" )
   242: 	PORT_DIPSETTING(    0x38, "None" )
   243: /* those are the bonus with 5 lives
   244: 	PORT_DIPNAME( 0x38, 0x00, DEF_STR( Bonus_Life ) )
   245: 	PORT_DIPSETTING(    0x28, "30k 100k and every 100k" )
   246: 	PORT_DIPSETTING(    0x30, "40k 120k and every 120k" )
   247: 	PORT_DIPSETTING(    0x00, "30k 80k" )
   248: 	PORT_DIPSETTING(    0x08, "30k 100k" )
   249: 	PORT_DIPSETTING(    0x10, "30k 120k" )
   250: 	PORT_DIPSETTING(    0x18, "30k" )
   251: 	PORT_DIPSETTING(    0x20, "40k" )
   252: 	PORT_DIPSETTING(    0x38, "None" ) */
   253: 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Lives ) )
   254: 	PORT_DIPSETTING(    0x80, "1" )
   255: 	PORT_DIPSETTING(    0xc0, "2" )
   256: 	PORT_DIPSETTING(    0x00, "3" )
   257: 	PORT_DIPSETTING(    0x40, "5" )
   258: 
   259: 	PORT_START      /* DSW2 */
   260: 	PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
   261: 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
   262: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
   263: 	PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
   264: 	PORT_SERVICE( 0x08, IP_ACTIVE_HIGH )
   265: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
   266: 
   267: 	PORT_START      /* FAKE */
   268: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   269: 	/* These fake input ports are read by mappy_customio_data_r() */
   270: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
   271: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY )
   272: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
   273: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY )
   274: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 1 )
   275: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   276: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   277: 
   278: 	PORT_START      /* FAKE */
   279: 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1 )
   280: /* Coin 2 is not working */
   281: 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 1 )
   282: 	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
   283: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_START1, 1 )
   284: 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_START2, 1 )
   285: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   286: 
   287: 	PORT_START	    /* FAKE */
   288: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
   289: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_COCKTAIL )
   290: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, 1 )
   291: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   292: 
   293: INPUT_PORTS_END
   294: 
   295: 
   296: INPUT_PORTS_START( digdug2 )
   297: 	PORT_START      /* DSW0 */
   298: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
   299: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   300: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   301: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
   302: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   303: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
   304: 	PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
   305: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   306: 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
   307: 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
   308: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   309: 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
   310: 	PORT_DIPNAME( 0x10, 0x00, "Reset" )
   311: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   312: 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
   313: 	PORT_DIPNAME( 0x20, 0x00, DEF_STR( Lives ) )
   314: 	PORT_DIPSETTING(    0x00, "3" )
   315: 	PORT_DIPSETTING(    0x20, "5" )
   316: 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) )
   317: 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
   318: 	PORT_DIPSETTING(    0xc0, "2 Coins/1 Credit 3C/2C" )
   319: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   320: 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
   321: 
   322: 	PORT_START      /* DSW1 */
   323: 	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) )
   324: 	PORT_DIPSETTING(    0x00, "30k 80k and ..." )
   325: 	PORT_DIPSETTING(    0x01, "30k 100k and ..." )
   326: 	PORT_DIPSETTING(    0x02, "30k 120k and ..." )
   327: 	PORT_DIPSETTING(    0x03, "30k 150k and..." )
   328: 	PORT_DIPNAME( 0x04, 0x00, "Level Select" )
   329: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   330: 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
   331: 	PORT_DIPNAME( 0x08, 0x00, "Freeze?" )
   332: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   333: 	PORT_DIPSETTING(    0x08, DEF_STR( On ) )
   334: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2, 1 )
   335: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON2, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   336: 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
   337: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   338: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
   339: //	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   340: 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
   341: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
   342: 	PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
   343: 
   344: 	PORT_START      /* DSW2 */
   345: 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
   346: 	PORT_SERVICE( 0x08, IP_ACTIVE_HIGH )
   347: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
   348: 
   349: 	PORT_START      /* FAKE */
   350: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   351: 	/* These fake input ports are read by mappy_customio_data_r() */
   352: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
   353: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
   354: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
   355: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
   356: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 1 )
   357: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   358: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   359: 
   360: 	PORT_START      /* FAKE */
   361: 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1 )
   362: /* Coin 2 is not working */
   363: 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 1 )
   364: 	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
   365: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_START1, 1 )
   366: 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_START2, 1 )
   367: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   368: 
   369: 	PORT_START      /* FAKE */
   370: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   371: 	/* These fake input ports are read by mappy_customio_data_r() */
   372: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
   373: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
   374: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
   375: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
   376: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 1 )
   377: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   378: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   379: 
   380: INPUT_PORTS_END
   381: 
   382: 
   383: INPUT_PORTS_START( motos )
   384: 	PORT_START      /* DSW0 */
   385: 	PORT_DIPNAME( 0x01, 0x00, "Reset" )
   386: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   387: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   388: 	PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
   389: 	PORT_DIPSETTING(    0x06, DEF_STR( 3C_1C ) )
   390: 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
   391: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   392: 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
   393: 	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) )
   394: 	PORT_DIPSETTING(    0x00, "3" )
   395: 	PORT_DIPSETTING(    0x08, "5" )
   396: 	PORT_DIPNAME( 0x10, 0x00, "Rank" )
   397: 	PORT_DIPSETTING(    0x00, "A" )
   398: 	PORT_DIPSETTING(    0x10, "B" )
   399: 	PORT_DIPNAME( 0x60, 0x00, DEF_STR( Bonus_Life ) )
   400: 	PORT_DIPSETTING(    0x00, "10k 30k and every 50k" )
   401: 	PORT_DIPSETTING(    0x20, "20k and every 50k" )
   402: 	PORT_DIPSETTING(    0x40, "30k and every 70k" )
   403: 	PORT_DIPSETTING(    0x60, "20k 70k" )
   404: 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
   405: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
   406: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   407: 
   408: 	PORT_START      /* DSW1 */
   409: 	PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_UNUSED )
   410: 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
   411: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
   412: 	PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
   413: 	PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
   414: 
   415: 	PORT_START      /* FAKE */
   416: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   417: 	/* These fake input ports are read by mappy_customio_data_r() */
   418: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY )
   419: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
   420: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY )
   421: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY )
   422: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 2 )
   423: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   424: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   425: 
   426: 	PORT_START      /* FAKE */
   427: 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 2 )
   428: 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 2 )
   429: 	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
   430: 	PORT_BIT_IMPULSE( 0x40, IP_ACTIVE_HIGH, IPT_START1, 2 )
   431: 	PORT_BIT_IMPULSE( 0x80, IP_ACTIVE_HIGH, IPT_START2, 2 )
   432: 	PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
   433: 
   434: 	PORT_START      /* FAKE */
   435: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   436: 	/* These fake input ports are read by mappy_customio_data_r() */
   437: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
   438: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
   439: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
   440: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
   441: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 2 )
   442: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   443: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   444: 
   445: 
   446: INPUT_PORTS_END
   447: 
   448: 
   449: INPUT_PORTS_START( todruaga )
   450: 	PORT_START      /* DSW0 */
   451: 	PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
   452: 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) )
   453: 	PORT_DIPSETTING(    0x20, "1" )
   454: 	PORT_DIPSETTING(    0x10, "2" )
   455: 	PORT_DIPSETTING(    0x00, "3" )
   456: 	PORT_DIPSETTING(    0x30, "5" )
   457: 	PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coin_A ) )
   458: 	PORT_DIPSETTING(    0xc0, DEF_STR( 3C_1C ) )
   459: 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
   460: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   461: 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
   462: 
   463: 	PORT_START      /* DSW1 */
   464: 	PORT_DIPNAME( 0x01, 0x00, "Freeze" )
   465: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   466: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   467: 	PORT_DIPNAME( 0x02, 0x00, "Reset" )
   468: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   469: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
   470: 	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )
   471: 	PORT_DIPSETTING(    0x0c, DEF_STR( 3C_1C ) )
   472: 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
   473: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
   474: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
   475: 	PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_UNUSED )
   476: 	PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
   477: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
   478: 	PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
   479: 
   480: 	PORT_START      /* DSW2 */
   481: 	PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
   482: 	PORT_SERVICE( 0x08, IP_ACTIVE_HIGH )
   483: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
   484: 
   485: 	PORT_START      /* FAKE */
   486: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   487: 	/* These fake input ports are read by mappy_customio_data_r() */
   488: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY )
   489: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY )
   490: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY )
   491: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY )
   492: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1, 1 )
   493: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   494: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   495: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )	/* used on level 31 */
   496: 
   497: 	PORT_START      /* FAKE */
   498: 	PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED )
   499: 	/* this is just a guess */
   500: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2, 1 )
   501: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON2, 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   502: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   503: 
   504: 	PORT_START      /* FAKE */
   505: 	PORT_BIT_IMPULSE( 0x01, IP_ACTIVE_HIGH, IPT_COIN1, 1 )
   506: /* Coin 2 is not working */
   507: 	PORT_BIT_IMPULSE( 0x02, IP_ACTIVE_HIGH, IPT_COIN2, 1 )
   508: 	PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED )
   509: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )	/* we take it from port 3 */
   510: //	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_START1, 1 )
   511: 	PORT_BIT_IMPULSE( 0x20, IP_ACTIVE_HIGH, IPT_START2, 1 )
   512: 	PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
   513: 
   514: 	PORT_START      /* FAKE */
   515: 	/* The player inputs are not memory mapped, they are handled by an I/O chip. */
   516: 	/* These fake input ports are read by mappy_customio_data_r() */
   517: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
   518: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
   519: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
   520: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
   521: 	PORT_BIT_IMPULSE( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 1 )
   522: 	PORT_BITX(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_COCKTAIL , 0, IP_KEY_PREVIOUS, IP_JOY_PREVIOUS )
   523: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   524: 
   525: 
   526: INPUT_PORTS_END
   527: 
   528: 
   529: /* layout of the 8x8x2 character data */
   530: static struct GfxLayout charlayout =
   531: {
   532: 	8,8,             /* 8*8 characters */
   533: 	256,             /* 256 characters */
   534: 	2,             /* 2 bits per pixel */
   535: 	{ 0, 4 },      /* the two bitplanes for 4 pixels are packed into one byte */
   536: 	{ 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 },   /* bits are packed in groups of four */
   537: 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },   /* characters are rotated 90 degrees */
   538: 	16*8           /* every char takes 16 bytes */
   539: };
   540: 
   541: 
   542: /* layout of the 16x16x4 sprite data */
   543: static struct GfxLayout mappy_spritelayout =
   544: {
   545: 	16,16,       /* 16*16 sprites */
   546: 	128,            /* 128 sprites */
   547: 	4,                 /* 4 bits per pixel */
   548: 	{ 0, 4, 8192*8, 8192*8+4 },     /* the two bitplanes for 4 pixels are packed into one byte */
   549: 	{ 0, 1, 2, 3, 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3,
   550: 			24*8+0, 24*8+1, 24*8+2, 24*8+3 },
   551: 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
   552: 			32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8 },
   553: 	64*8    /* every sprite takes 64 bytes */
   554: };
   555: 
   556: 
   557: static struct GfxLayout digdug2_spritelayout =
   558: {
   559: 	16,16,       /* 16*16 sprites */
   560: 	256,            /* 256 sprites */
   561: 	4,                 /* 4 bits per pixel */
   562: 	{ 0, 4, 16384*8, 16384*8+4 },   /* the two bitplanes for 4 pixels are packed into one byte */
   563: 	{ 0, 1, 2, 3, 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3,
   564: 			24*8+0, 24*8+1, 24*8+2, 24*8+3 },
   565: 	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
   566: 			32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8 },
   567: 	64*8    /* every sprite takes 64 bytes */
   568: };
   569: 
   570: 
   571: /* pointers to the appropriate memory locations and their associated decode structs */
   572: static struct GfxDecodeInfo mappy_gfxdecodeinfo[] =
   573: {
   574: 	{ REGION_GFX1, 0, &charlayout,            0, 64 },
   575: 	{ REGION_GFX2, 0, &mappy_spritelayout, 64*4, 16 },
   576: 	{ -1 } /* end of array */
   577: };
   578: 
   579: static struct GfxDecodeInfo digdug2_gfxdecodeinfo[] =
   580: {
   581: 	{ REGION_GFX1, 0, &charlayout,              0, 64 },
   582: 	{ REGION_GFX2, 0, &digdug2_spritelayout, 64*4, 16 },
   583: 	{ -1 } /* end of array */
   584: };
   585: 
   586: static struct GfxDecodeInfo todruaga_gfxdecodeinfo[] =
   587: {
   588: 	{ REGION_GFX1, 0, &charlayout,            0, 64 },
   589: 	{ REGION_GFX2, 0, &mappy_spritelayout, 64*4, 64 },
   590: 	{ -1 } /* end of array */
   591: };
   592: 
   593: static struct namco_interface namco_interface =
   594: {
   595: 	24000,	/* sample rate */
   596: 	8,		/* number of voices */
   597: 	100,	/* playback volume */
   598: 	REGION_SOUND1	/* memory region */
   599: };
   600: 
   601: 
   602: 
   603: /* the machine driver: 2 6809s running at 1MHz */
   604: static MACHINE_DRIVER_START( mappy )
   605: 
   606: 	/* basic machine hardware */
   607: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   608: 	MDRV_CPU_MEMORY(mappy_readmem_cpu1,writemem_cpu1)
   609: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_1,1)
   610: 
   611: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   612: 	MDRV_CPU_MEMORY(mappy_readmem_cpu2,writemem_cpu2)
   613: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_2,1)
   614: 
   615: 	MDRV_FRAMES_PER_SECOND(60.606060)
   616: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   617: 	MDRV_INTERLEAVE(100)    /* 100 CPU slices per frame - an high value to ensure proper */
   618: 							/* synchronization of the CPUs */
   619: 	MDRV_MACHINE_INIT(mappy)
   620: 
   621: 	/* video hardware */
   622: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   623: 	MDRV_SCREEN_SIZE(36*8, 28*8)
   624: 	MDRV_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
   625: 	MDRV_GFXDECODE(mappy_gfxdecodeinfo)
   626: 	MDRV_PALETTE_LENGTH(32)
   627: 	MDRV_COLORTABLE_LENGTH(64*4+16*16)
   628: 
   629: 	MDRV_PALETTE_INIT(mappy)
   630: 	MDRV_VIDEO_START(mappy)
   631: 	MDRV_VIDEO_UPDATE(mappy)
   632: 
   633: 	/* sound hardware */
   634: 	MDRV_SOUND_ADD(NAMCO, namco_interface)
   635: MACHINE_DRIVER_END
   636: 
   637: 
   638: static MACHINE_DRIVER_START( digdug2 )
   639: 
   640: 	/* basic machine hardware */
   641: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   642: 	MDRV_CPU_MEMORY(digdug2_readmem_cpu1,writemem_cpu1)
   643: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_1,1)
   644: 
   645: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   646: 	MDRV_CPU_MEMORY(digdug2_readmem_cpu2,writemem_cpu2)
   647: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_2,1)
   648: 
   649: 	MDRV_FRAMES_PER_SECOND(60.606060)
   650: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   651: 	MDRV_INTERLEAVE(100)    /* 100 CPU slices per frame - an high value to ensure proper */
   652: 							/* synchronization of the CPUs */
   653: 	MDRV_MACHINE_INIT(mappy)
   654: 
   655: 	/* video hardware */
   656: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   657: 	MDRV_SCREEN_SIZE(36*8, 28*8)
   658: 	MDRV_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
   659: 	MDRV_GFXDECODE(digdug2_gfxdecodeinfo)
   660: 	MDRV_PALETTE_LENGTH(32)
   661: 	MDRV_COLORTABLE_LENGTH(64*4+16*16)
   662: 
   663: 	MDRV_PALETTE_INIT(mappy)
   664: 	MDRV_VIDEO_START(mappy)
   665: 	MDRV_VIDEO_UPDATE(mappy)
   666: 
   667: 	/* sound hardware */
   668: 	MDRV_SOUND_ADD(NAMCO, namco_interface)
   669: MACHINE_DRIVER_END
   670: 
   671: 
   672: static MACHINE_DRIVER_START( motos )
   673: 
   674: 	/* basic machine hardware */
   675: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   676: 	MDRV_CPU_MEMORY(motos_readmem_cpu1,writemem_cpu1)
   677: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_1,1)
   678: 
   679: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   680: 	MDRV_CPU_MEMORY(motos_readmem_cpu2,writemem_cpu2)
   681: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_2,1)
   682: 
   683: 	MDRV_FRAMES_PER_SECOND(60.606060)
   684: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   685: 	MDRV_INTERLEAVE(100)    /* 100 CPU slices per frame - an high value to ensure proper */
   686: 							/* synchronization of the CPUs */
   687: 	MDRV_MACHINE_INIT(motos)
   688: 
   689: 	/* video hardware */
   690: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   691: 	MDRV_SCREEN_SIZE(36*8, 28*8)
   692: 	MDRV_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
   693: 	MDRV_GFXDECODE(digdug2_gfxdecodeinfo)
   694: 	MDRV_PALETTE_LENGTH(32)
   695: 	MDRV_COLORTABLE_LENGTH(64*4+16*16)
   696: 
   697: 	MDRV_PALETTE_INIT(mappy)
   698: 	MDRV_VIDEO_START(motos)
   699: 	MDRV_VIDEO_UPDATE(mappy)
   700: 
   701: 	/* sound hardware */
   702: 	MDRV_SOUND_ADD(NAMCO, namco_interface)
   703: MACHINE_DRIVER_END
   704: 
   705: 
   706: static MACHINE_DRIVER_START( todruaga )
   707: 
   708: 	/* basic machine hardware */
   709: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   710: 	MDRV_CPU_MEMORY(todruaga_readmem_cpu1,writemem_cpu1)
   711: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_1,1)
   712: 
   713: 	MDRV_CPU_ADD(M6809, 18432000/12)	/* 1.536 MHz */
   714: 	MDRV_CPU_MEMORY(todruaga_readmem_cpu2,writemem_cpu2)
   715: 	MDRV_CPU_VBLANK_INT(mappy_interrupt_2,1)
   716: 
   717: 	MDRV_FRAMES_PER_SECOND(60.606060)
   718: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   719: 	MDRV_INTERLEAVE(100)    /* 100 CPU slices per frame - an high value to ensure proper */
   720: 							/* synchronization of the CPUs */
   721: 	MDRV_MACHINE_INIT(mappy)
   722: 
   723: 	/* video hardware */
   724: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   725: 	MDRV_SCREEN_SIZE(36*8, 28*8)
   726: 	MDRV_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
   727: 	MDRV_GFXDECODE(todruaga_gfxdecodeinfo)
   728: 	MDRV_PALETTE_LENGTH(32)
   729: 	MDRV_COLORTABLE_LENGTH(64*4+64*16)
   730: 
   731: 	MDRV_PALETTE_INIT(mappy)
   732: 	MDRV_VIDEO_START(todruaga)
   733: 	MDRV_VIDEO_UPDATE(mappy)
   734: 
   735: 	/* sound hardware */
   736: 	MDRV_SOUND_ADD(NAMCO, namco_interface)
   737: MACHINE_DRIVER_END
   738: 
   739: 
   740: 
   741: ROM_START( mappy )
   742: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   743: 	ROM_LOAD( "mpx_3.1d",	0xa000, 0x2000, CRC(52e6c708) SHA1(b9722941438e93325e84691ada4e95620bec73b2) )
   744: 	ROM_LOAD( "mp1_2.1c",	0xc000, 0x2000, CRC(a958a61c) SHA1(e5198703cdf47b2cd7fc9f2a5fde7bf4ab2275db) )
   745: 	ROM_LOAD( "mpx_1.1b",	0xe000, 0x2000, CRC(203766d4) SHA1(1dbc4f42d4c16a08240a221bec27dcc3a8dd7461) )
   746: 
   747: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   748: 	ROM_LOAD( "mp1_4.1k",	0xe000, 0x2000, CRC(8182dd5b) SHA1(f36b57f7f1e79f00b3f07afe1960bca5f5325ee2) )
   749: 
   750: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   751: 	ROM_LOAD( "mp1_5.3b",	0x0000, 0x1000, CRC(16498b9f) SHA1(76610149c65f955484fef1c033ddc3fed3f4e568) )
   752: 
   753: 	ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE )
   754: 	ROM_LOAD( "mp1_6.3m",	0x0000, 0x2000, CRC(f2d9647a) SHA1(3cc216793c6a5f73c437ad2524563deb3b5e2890) )
   755: 	ROM_LOAD( "mp1_7.3n",	0x2000, 0x2000, CRC(757cf2b6) SHA1(8dfbf03953d5219d9eb5fc654ec3392442ba1dc4) )
   756: 
   757: 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
   758: 	ROM_LOAD( "mp1-5.5b",	0x0000, 0x0020, CRC(56531268) SHA1(2e356706c07f43eeb67783fb122bdc7fed1b3589) ) /* palette */
   759: 	ROM_LOAD( "mp1-6.4c",	0x0020, 0x0100, CRC(50765082) SHA1(f578e14f15783acb2073644db4a2f0d196cc0957) ) /* characters */
   760: 	ROM_LOAD( "mp1-7.5k",	0x0120, 0x0100, CRC(5396bd78) SHA1(2e387e5d8b8cab005f67f821b4db65d0ae8bd362) ) /* sprites */
   761: 
   762: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   763: 	ROM_LOAD( "mp1-3.3m",	0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) )
   764: ROM_END
   765: 
   766: ROM_START( mappyj )
   767: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   768: 	ROM_LOAD( "mp1_3.1d",	0xa000, 0x2000, CRC(db9d5ab5) SHA1(32a0190f96f9c00c541b24dd17d6ad487938a8bf) )
   769: 	ROM_LOAD( "mp1_2.1c",	0xc000, 0x2000, CRC(a958a61c) SHA1(e5198703cdf47b2cd7fc9f2a5fde7bf4ab2275db) )
   770: 	ROM_LOAD( "mp1_1.1b",	0xe000, 0x2000, CRC(77c0b492) SHA1(631b73560ac59c3612e692fa59558773639ceda7) )
   771: 
   772: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   773: 	ROM_LOAD( "mp1_4.1k",	0xe000, 0x2000, CRC(8182dd5b) SHA1(f36b57f7f1e79f00b3f07afe1960bca5f5325ee2) )
   774: 
   775: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   776: 	ROM_LOAD( "mp1_5.3b",	0x0000, 0x1000, CRC(16498b9f) SHA1(76610149c65f955484fef1c033ddc3fed3f4e568) )
   777: 
   778: 	ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE )
   779: 	ROM_LOAD( "mp1_6.3m",	0x0000, 0x2000, CRC(f2d9647a) SHA1(3cc216793c6a5f73c437ad2524563deb3b5e2890) )
   780: 	ROM_LOAD( "mp1_7.3n",	0x2000, 0x2000, CRC(757cf2b6) SHA1(8dfbf03953d5219d9eb5fc654ec3392442ba1dc4) )
   781: 
   782: 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
   783: 	ROM_LOAD( "mp1-5.5b",	0x0000, 0x0020, CRC(56531268) SHA1(2e356706c07f43eeb67783fb122bdc7fed1b3589) ) /* palette */
   784: 	ROM_LOAD( "mp1-6.4c",	0x0020, 0x0100, CRC(50765082) SHA1(f578e14f15783acb2073644db4a2f0d196cc0957) ) /* characters */
   785: 	ROM_LOAD( "mp1-7.5k",	0x0120, 0x0100, CRC(5396bd78) SHA1(2e387e5d8b8cab005f67f821b4db65d0ae8bd362) ) /* sprites */
   786: 
   787: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   788: 	ROM_LOAD( "mp1-3.3m",	0x0000, 0x0100, CRC(16a9166a) SHA1(847cbaf7c88616576c410177e066ae1d792ac0ba) )
   789: ROM_END
   790: 
   791: ROM_START( digdug2 )
   792: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   793: 	ROM_LOAD( "d23_3.1d",	0x8000, 0x4000, CRC(cc155338) SHA1(d6796479ebb00081e9ae281380a4ce75f730766e) )
   794: 	ROM_LOAD( "d23_1.1b",	0xc000, 0x4000, CRC(40e46af8) SHA1(698a5c425e23627331d85216a4edee9c391e5749) )
   795: 
   796: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   797: 	ROM_LOAD( "d21_4.1k",	0xe000, 0x2000, CRC(737443b1) SHA1(0e46204089cc6e5ffab0d2a62f9a1728f8c35948) )
   798: 
   799: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   800: 	ROM_LOAD( "d21_5.3b",	0x0000, 0x1000, CRC(afcb4509) SHA1(c9a54df22b0b92efbe7417a00200587225906b46) )
   801: 
   802: 	ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
   803: 	ROM_LOAD( "d21_6.3m",	0x0000, 0x4000, CRC(df1f4ad8) SHA1(004fba630018dbf03c4b0e284c98077e19fface3) )
   804: 	ROM_LOAD( "d21_7.3n",	0x4000, 0x4000, CRC(ccadb3ea) SHA1(77d8d8e6039272f73e63c8f76084138ec613365a) )
   805: 
   806: 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
   807: 	ROM_LOAD( "d21-5.5b",	0x0000, 0x0020, CRC(9b169db5) SHA1(77e840d10ab59708a051c3b15305b33d431ee06d) ) /* palette */
   808: 	ROM_LOAD( "d21-6.4c",	0x0020, 0x0100, CRC(55a88695) SHA1(bd6bd641c9f220b6a2cc414a1117d5c089571400) ) /* characters */
   809: 	ROM_LOAD( "d21-7.5k",	0x0120, 0x0100, CRC(9c55feda) SHA1(30a4593726f5a4791e0812fd593e592087e730e3) ) /* sprites */
   810: 
   811: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   812: 	ROM_LOAD( "d21-3.3m",	0x0000, 0x0100, CRC(e0074ee2) SHA1(f4f02977130110be52f4dd82fc3c0d02f45778b9) )
   813: ROM_END
   814: 
   815: ROM_START( digdug2o )
   816: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   817: 	ROM_LOAD( "d21_3.1d",	0x8000, 0x4000, CRC(be7ec80b) SHA1(a053274ffbf3200e9b89a8be1bd91744acb4a823) )
   818: 	ROM_LOAD( "d21_1.1b",	0xc000, 0x4000, CRC(5c77c0d4) SHA1(56709e5db1686fd996d21c1005accf34e2d863e1) )
   819: 
   820: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   821: 	ROM_LOAD( "d21_4.1k",	0xe000, 0x2000, CRC(737443b1) SHA1(0e46204089cc6e5ffab0d2a62f9a1728f8c35948) )
   822: 
   823: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   824: 	ROM_LOAD( "d21_5.3b",	0x0000, 0x1000, CRC(afcb4509) SHA1(c9a54df22b0b92efbe7417a00200587225906b46) )
   825: 
   826: 	ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
   827: 	ROM_LOAD( "d21_6.3m",	0x0000, 0x4000, CRC(df1f4ad8) SHA1(004fba630018dbf03c4b0e284c98077e19fface3) )
   828: 	ROM_LOAD( "d21_7.3n",	0x4000, 0x4000, CRC(ccadb3ea) SHA1(77d8d8e6039272f73e63c8f76084138ec613365a) )
   829: 
   830: 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
   831: 	ROM_LOAD( "d21-5.5b",	0x0000, 0x0020, CRC(9b169db5) SHA1(77e840d10ab59708a051c3b15305b33d431ee06d) ) /* palette */
   832: 	ROM_LOAD( "d21-6.4c",	0x0020, 0x0100, CRC(55a88695) SHA1(bd6bd641c9f220b6a2cc414a1117d5c089571400) ) /* characters */
   833: 	ROM_LOAD( "d2x-7.5k",	0x0120, 0x0100, CRC(1525a4d1) SHA1(bbedb0cf5957671fca1229d38cb33086356813e1) ) /* sprites */
   834: 	/* the sprite lookup table is different from the other set, could be a bad dump */
   835: 
   836: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   837: 	ROM_LOAD( "d21-3.3m",	0x0000, 0x0100, CRC(e0074ee2) SHA1(f4f02977130110be52f4dd82fc3c0d02f45778b9) )
   838: ROM_END
   839: 
   840: ROM_START( motos )
   841: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   842: 	ROM_LOAD( "mo1_3.1d",	0x8000, 0x4000, CRC(1104abb2) SHA1(ade809a73ac24494b9f95f65b7592df5f86dce60) )
   843: 	ROM_LOAD( "mo1_1.1b",	0xc000, 0x4000, CRC(57b157e2) SHA1(b050495fcc4a4d93551b29d4f05e49f64017c870) )
   844: 
   845: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   846: 	ROM_LOAD( "mo1_4.1k",	0xe000, 0x2000, CRC(55e45d21) SHA1(a8b195acfec542734751de29c9dafc2b165a5881) )
   847: 
   848: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   849: 	ROM_LOAD( "mo1_5.3b",	0x0000, 0x1000, CRC(5d4a2a22) SHA1(4af9bf2ae9bb78d2d029ef38809181ffa3c0eb66) )
   850: 
   851: 	ROM_REGION( 0x8000, REGION_GFX2, ROMREGION_DISPOSE )
   852: 	ROM_LOAD( "mo1_6.3m",	0x0000, 0x4000, CRC(2f0e396e) SHA1(664679f9d3d74a3fccb086af910392b4fe40c9bc) )
   853: 	ROM_LOAD( "mo1_7.3n",	0x4000, 0x4000, CRC(cf8a3b86) SHA1(2b49cdec516e23783f2a291633d81ab8bd0245fc) )
   854: 
   855: 	ROM_REGION( 0x0220, REGION_PROMS, 0 )
   856: 	ROM_LOAD( "mo1-5.5b",	0x0000, 0x0020, CRC(71972383) SHA1(66b0619affcc5168b099108800a941d6e2416ab0) ) /* palette */
   857: 	ROM_LOAD( "mo1-6.4c",	0x0020, 0x0100, CRC(730ba7fb) SHA1(24eb167266752b064689662e3ef0f62d0407ac26) ) /* characters */
   858: 	ROM_LOAD( "mo1-7.5k",	0x0120, 0x0100, CRC(7721275d) SHA1(543adb5348db81ea82a5c039451001ebd82735e3) ) /* sprites */
   859: 
   860: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   861: 	ROM_LOAD( "mo1-3.3m",	0x0000, 0x0100, CRC(2accdfb4) SHA1(e21a0618c0f8e35ce26666b6850ac9c0d95d7971) )
   862: ROM_END
   863: 
   864: ROM_START( todruaga )
   865: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   866: 	ROM_LOAD( "td2_3.1d",	0x8000, 0x4000, CRC(fbf16299) SHA1(9abbaaaf0a53aff38df8287f62d091b13146cf13) )
   867: 	ROM_LOAD( "td2_1.1b",	0xc000, 0x4000, CRC(b238d723) SHA1(ab8eadd45638ff1ab2dacbd5ab2c6870b9f79086) )
   868: 
   869: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   870: 	ROM_LOAD( "td1_4.1k",	0xe000, 0x2000, CRC(ae9d06d9) SHA1(3d8621fdd74fafa61f342886faa37f0aab50c5a7) )
   871: 
   872: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   873: 	ROM_LOAD( "td1_5.3b",	0x0000, 0x1000, CRC(d32b249f) SHA1(7d7cee4101ef615fb92c3702f89a9823a6231195) )
   874: 
   875: 	ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE )
   876: 	ROM_LOAD( "td1_6.3m",	0x0000, 0x2000, CRC(e827e787) SHA1(74e0af4c7d6e334bcd211a33eb18dddc8a182aa7) )
   877: 	ROM_LOAD( "td1_7.3n",	0x2000, 0x2000, CRC(962bd060) SHA1(74cdcafc26475bda085bf62ed17e6474ed782453) )
   878: 
   879: 	ROM_REGION( 0x0520, REGION_PROMS, 0 )
   880: 	ROM_LOAD( "td1-5.5b",	0x0000, 0x0020, CRC(122cc395) SHA1(a648c53f2e95634bb5b27d79be3fd908021d056e) ) /* palette */
   881: 	ROM_LOAD( "td1-6.4c",	0x0020, 0x0100, CRC(8c661d6a) SHA1(1340e4f657f4f2c4ef651a441c3b51632e757d0b) ) /* characters */
   882: 	ROM_LOAD( "td1-7.5k",	0x0120, 0x0400, CRC(a86c74dd) SHA1(dfd7d6b2740761c3bcab4c7999d2699d920843e7) ) /* sprites */
   883: 
   884: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   885: 	ROM_LOAD( "td1-3.3m",	0x0000, 0x0100, CRC(07104c40) SHA1(16db55525034bacb71e7dc8bd2a7c3c4464d4808) )
   886: ROM_END
   887: 
   888: ROM_START( todruago )
   889: 	ROM_REGION( 0x10000, REGION_CPU1, 0 )     /* 64k for code for the first CPU  */
   890: 	ROM_LOAD( "td1_3.1d",	0x8000, 0x4000, CRC(7ab4f5b2) SHA1(65035a5ecdff14bf23e01fe0f5e0935d156d94ff) )
   891: 	ROM_LOAD( "td1_1.1b",	0xc000, 0x4000, CRC(8c20ef10) SHA1(12ea4875ce4d4590b88862139d3379ab9f5cec03) )
   892: 
   893: 	ROM_REGION( 0x10000, REGION_CPU2, 0 )     /* 64k for the second CPU */
   894: 	ROM_LOAD( "td1_4.1k",	0xe000, 0x2000, CRC(ae9d06d9) SHA1(3d8621fdd74fafa61f342886faa37f0aab50c5a7) )
   895: 
   896: 	ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
   897: 	ROM_LOAD( "td1_5.3b",	0x0000, 0x1000, CRC(d32b249f) SHA1(7d7cee4101ef615fb92c3702f89a9823a6231195) )
   898: 
   899: 	ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE )
   900: 	ROM_LOAD( "td1_6.3m",	0x0000, 0x2000, CRC(e827e787) SHA1(74e0af4c7d6e334bcd211a33eb18dddc8a182aa7) )
   901: 	ROM_LOAD( "td1_7.3n",	0x2000, 0x2000, CRC(962bd060) SHA1(74cdcafc26475bda085bf62ed17e6474ed782453) )
   902: 
   903: 	ROM_REGION( 0x0520, REGION_PROMS, 0 )
   904: 	ROM_LOAD( "td1-5.5b",	0x0000, 0x0020, CRC(122cc395) SHA1(a648c53f2e95634bb5b27d79be3fd908021d056e) ) /* palette */
   905: 	ROM_LOAD( "td1-6.4c",	0x0020, 0x0100, CRC(8c661d6a) SHA1(1340e4f657f4f2c4ef651a441c3b51632e757d0b) ) /* characters */
   906: 	ROM_LOAD( "td1-7.5k",	0x0120, 0x0400, CRC(a86c74dd) SHA1(dfd7d6b2740761c3bcab4c7999d2699d920843e7) ) /* sprites */
   907: 
   908: 	ROM_REGION( 0x0100, REGION_SOUND1, 0 )	/* sound prom */
   909: 	ROM_LOAD( "td1-3.3m",	0x0000, 0x0100, CRC(07104c40) SHA1(16db55525034bacb71e7dc8bd2a7c3c4464d4808) )
   910: ROM_END
   911: 
   912: 
   913: 
   914: GAME( 1983, mappy,    0,        mappy,    mappy,    0, ROT90, "Namco", "Mappy (US)" )
   915: GAME( 1983, mappyj,   mappy,    mappy,    mappy,    0, ROT90, "Namco", "Mappy (Japan)" )
   916: GAME( 1985, digdug2,  0,        digdug2,  digdug2,  0, ROT90, "Namco", "Dig Dug II (New Ver.)" )
   917: GAME( 1985, digdug2o, digdug2,  digdug2,  digdug2,  0, ROT90, "Namco", "Dig Dug II (Old Ver.)" )
   918: GAME( 1985, motos,    0,        motos,    motos,    0, ROT90, "Namco", "Motos" )
   919: GAME( 1984, todruaga, 0,        todruaga, todruaga, 0, ROT90, "Namco", "Tower of Druaga (New Ver.)" )
   920: GAME( 1984, todruago, todruaga, todruaga, todruaga, 0, ROT90, "Namco", "Tower of Druaga (Old Ver.)" )
   921: 




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