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 : Exvania : VM Driver Source

Source Listing


     1: /***************************************************************************
     2: Namco NA-1 / NA-2 System
     3: 
     4: NA-1 Games:
     5: -	Bakuretsu Quiz Ma-Q Dai Bouken
     6: -	F/A
     7: -	Super World Court (C354, C357)
     8: -	Nettou! Gekitou! Quiztou!! (C354, C365 - both are 32pin)
     9: -	Exvania (C350, C354)
    10: -	Cosmo Gang the Puzzle (C356)
    11: -	Tinkle Pit (C354, C367)
    12: -	Emeraldia (C354, C358)
    13: 
    14: NA-2 Games:
    15: -	Knuckle Heads
    16: -	Numan Athletics
    17: -	X-Day 2
    18: 
    19: To Do:
    20: 
    21: - Pressing "F3" (reset) crashes MAME
    22: 
    23: - Emeralda:
    24: 	After selecting the game type, tilemap scrolling is briefly incorrect
    25: 
    26: - Emeralda:
    27: 	Shadow sprites, if enabled, make the score display invisible
    28: 
    29: - Hook up ROZ registers
    30: 
    31: - Is view area controlled by registers?
    32: 
    33: - Xday 2:
    34: 	has some graphics glitches (wrong sprite tiles); probably blitter-related
    35: 	input ports are wonky; can add "coins" while in free-play mode, but can't start game
    36: 
    37: 	Rom board  M112
    38: 	Rom board custom Key chip i.d. C394
    39: 	Game uses a small cash-register type printer (connects to rom board)
    40: 	Game also has a large L.E.D. type score board with several
    41:     displays for various scores. (connects to rom board)
    42: 	Game uses coin-type battery on rom board. (not suicide)
    43: 	Game won't startup unless printer is connected and with paper.
    44: 
    45: The board has a 28c16 EEPROM
    46: 
    47: No other CPUs on the board, but there are many custom chips.
    48: Mother Board:
    49: 210 (28pin SOP)
    50: C70 (80pin PQFP)
    51: 215 (176pin PQFP)
    52: C218 (208pin PQFP)
    53: 219 (160pin PQFP)
    54: Plus 1 or 2 custom chips on ROM board.
    55: 
    56: Notes:
    57: 
    58: -	NA-2 is backwards compatible with NA-1.
    59: 
    60: -	NA-2 games use a different MCU BIOS
    61: 
    62: -	Test mode for NA2 games includes an additional item: UART Test.
    63: 	No games are known to actually link up and use the UART feature.
    64: 	It's been confirmed that a Numan Athletics fails the UART test,
    65: 	behaving as it does in MAME.
    66: 
    67: -	Quiz games use 1p button 1 to pick test, 2p button 1 to begin test,
    68: 	and 2p button 2 to exit. Because quiz games doesn't have joystick.
    69: 
    70: -	Almost all quiz games using JAMMA edge connector assign
    71: 	button1 to up, button 2 to down, button 3 to left, button 4 to right.
    72: 	But Taito F2 quiz games assign button 3 to right and button 4 to left.
    73: 
    74: ***************************************************************************/
    75: 
    76: #include "driver.h" 
    77: #include "vidhrdw/generic.h" 
    78: #include "namcona1.h" 
    79: #include "sound/namcona.h" 
    80: #include "machine/random.h" 
    81: 
    82: static data16_t *mpBank0, *mpBank1;
    83: static data8_t mCoinCount[4];
    84: static data8_t mCoinState;
    85: static data16_t *mcu_ram;
    86: static int mEnableInterrupts;
    87: int namcona1_gametype;
    88: 
    89: /*************************************************************************/
    90: 
    91: static const UINT8 ExvaniaDefaultNvMem[] =
    92: {
    93: /* This data oughtn't be necessary; when Exbania's EPROM area is uninitialized,
    94:  * the game software automatically writes these values there, but then jumps
    95:  * to an unmapped (bogus) address, causing MAME to crash.
    96:  */
    97:  	0x30,0x32,0x4f,0x63,0x74,0x39,0x32,0x52,0x45,0x56,0x49,0x53,0x49,0x4f,0x4e,0x35,
    98: 	0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,
    99: 	0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
   100: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   101: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   102: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   103: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   104: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   105: 	0x51,0x01,0x38,0x38,0xa7,0xbf,0xf1,0x04,0x0d,0x15,0x9b,0x80,0x1f,0x83,0xd5,0xa4,
   106: 	0x69,0x88,0x7c,0x9f,0xb6,0x01,0xda,0x93,0x17,0x45,0x8b,0x12,0xb2,0x02,0x33,0x5c,
   107: 	0x50,0xd6,0xe1,0x56,0xa4,0xad,0x42,0x4a,0x5c,0xdd,0x86,0x61,0xe9,0x03,0x12,0xe1,
   108: 	0x0f,0x9b,0xea,0x26,0x2c,0x61,0xdc,0x62,0x48,0x6b,0x6d,0x14,0xe0,0x03,0x85,0x4a,
   109: 	0x72,0x46,0xda,0x96,0xc8,0x7d,0x1c,0xd1,0x05,0x3e,0xe5,0x92,0x70,0x43,0x5f,0x6c,
   110: 	0x03,0x05,0xb3,0xeb,0xb3,0x20,0x35,0x4d,0x7e,0x66,0x50,0x01,0x36,0xc0,0x33,0xe1,
   111: 	0x0f,0xc9,0x38,0x2e,0xe9,0x29,0x19,0x4f,0x5e,0xb1,0xd1,0x49,0x8b,0x3b,0x53,0xfd,
   112: 	0x9f,0x3f,0xee,0x25,0x25,0x35,0x7b,0x0d,0x11,0xaf,0x4c,0x11,0x8c,0x32,0xd4,0xda,
   113: 	0x7f,0xd8,0x16,0x57,0xe1,0xa6,0xce,0x7d,0xc1,0xae,0x62,0xbf,0x13,0xe4,0x87,0x4c,
   114: 	0x3a,0xc1,0xb3,0x0c,0x59,0x99,0x47,0x58,0x5a,0xbd,0x78,0x7c,0xba,0x50,0x01,0xed,
   115: 	0x1b,0xea,0x8a,0x49,0x88,0xee,0xd6,0x14,0x85,0xab,0xb0,0x2c,0xde,0x35,0x93,0x11,
   116: 	0x2d,0x01,0x1c,0xd7,0x28,0x43,0x30,0xe7,0xb0,0x08,0xed,0x79
   117: }; /* ExvaniaDefaultNvMem */
   118: 
   119: static const UINT8 QuiztouDefaultNvMem[] =
   120: {
   121: /* This data oughtn't be necessary; when QuiztouDefaultNvMem's EPROM area is uninitialized,
   122:  * the game software automatically writes these values there, but then jumps
   123:  * to an unmapped (bogus) address, causing MAME to crash.
   124:  */
   125: 	0x30,0x32,0x4F,0x63,0x74,0x39,0x32,0x52,0x45,0x56,0x49,0x53,0x49,0x4F,0x4E,0x35,
   126: 	0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,
   127: 	0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
   128: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   129: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   130: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   131: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   132: 	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
   133: 	0xC1,0x9B,0xE1,0xC0,0x7E,0xE9,0xA8,0x9A,0xA7,0x86,0xC2,0xB5,0x54,0xBF,0x9A,0xE7,
   134: 	0xD9,0x23,0xD1,0x55,0x90,0x38,0x28,0xD1,0xD9,0x6C,0xA1,0x66,0x5E,0x4E,0xE1,0x30,
   135: 	0x9C,0xFE,0xD9,0x71,0x9F,0xE2,0xA5,0xE2,0x0C,0x9B,0xB4,0x47,0x65,0x38,0x2A,0x46,
   136: 	0x89,0xA9,0x82,0x79,0x7A,0x76,0x78,0xC2,0x63,0xB1,0x26,0xDF,0xDA,0x29,0x6D,0x3E,
   137: 	0x62,0xE0,0x96,0x12,0x34,0xBF,0x39,0xA6,0x3F,0x89,0x5E,0xF1,0x6D,0x0E,0xE3,0x6C,
   138: 	0x28,0xA1,0x1E,0x20,0x1D,0xCB,0xC2,0x03,0x3F,0x41,0x07,0x84,0x0F,0x14,0x05,0x65,
   139: 	0x1B,0x28,0x61,0xC9,0xC5,0xE7,0x2C,0x8E,0x46,0x36,0x08,0xDC,0xF3,0xA8,0x8D,0xFE,
   140: 	0xBE,0xF2,0xEB,0x71,0xFF,0xA0,0xD0,0x3B,0x75,0x06,0x8C,0x7E,0x87,0x78,0x73,0x4D,
   141: 	0xD0,0xBE,0x82,0xBE,0xDB,0xC2,0x46,0x41,0x2B,0x8C,0xFA,0x30,0x7F,0x70,0xF0,0xA7,
   142: 	0x54,0x86,0x32,0x95,0xAA,0x5B,0x68,0x13,0x0B,0xE6,0xFC,0xF5,0xCA,0xBE,0x7D,0x9F,
   143: 	0x89,0x8A,0x41,0x1B,0xFD,0xB8,0x4F,0x68,0xF6,0x72,0x7B,0x14,0x99,0xCD,0xD3,0x0D,
   144: 	0xF0,0x44,0x3A,0xB4,0xA6,0x66,0x53,0x33,0x0B,0xCB,0xA1,0x10,0x5E,0x4C,0xEC,0x03,
   145: 	0x4C,0x73,0xE6,0x05,0xB4,0x31,0x0E,0xAA,0xAD,0xCF,0xD5,0xB0,0xCA,0x27,0xFF,0xD8,
   146: 	0x9D,0x14,0x4D,0xF4,0x79,0x27,0x59,0x42,0x7C,0x9C,0xC1,0xF8,0xCD,0x8C,0x87,0x20,
   147: 	0x23,0x64,0xB8,0xA6
   148: }; /* QuiztouDefaultNvMem */
   149: 
   150: static data8_t namcona1_nvmem[NA1_NVRAM_SIZE];
   151: 
   152: static NVRAM_HANDLER( namcosna1 )
   153: {
   154: 	if( read_or_write )
   155: 	{
   156: 		mame_fwrite( file, namcona1_nvmem, NA1_NVRAM_SIZE );
   157: 	}
   158: 	else
   159: 	{
   160: 		if (file)
   161: 		{
   162: 			mame_fread( file, namcona1_nvmem, NA1_NVRAM_SIZE );
   163: 		}
   164: 		else
   165: 		{
   166: 			memset( namcona1_nvmem, 0x00, NA1_NVRAM_SIZE );
   167: 
   168: 			switch( namcona1_gametype )
   169: 			{
   170: 			case NAMCO_EXBANIA:
   171: 				memcpy( namcona1_nvmem, ExvaniaDefaultNvMem, sizeof(ExvaniaDefaultNvMem) );
   172: 				break;
   173: 
   174: 			case NAMCO_QUIZTOU:
   175: 				memcpy( namcona1_nvmem, QuiztouDefaultNvMem, sizeof(QuiztouDefaultNvMem) );
   176: 				break;
   177: 			}
   178: 		}
   179: 	}
   180: } /* namcosna1_nvram_handler */
   181: 
   182: static READ16_HANDLER( namcona1_nvram_r )
   183: {
   184: 	return namcona1_nvmem[offset];
   185: } /* namcona1_nvram_r */
   186: 
   187: static WRITE16_HANDLER( namcona1_nvram_w )
   188: {
   189: 	if( ACCESSING_LSB )
   190: 	{
   191: 		namcona1_nvmem[offset] = data&0xff;
   192: 	}
   193: } /* namcona1_nvram_w */
   194: 
   195: /***************************************************************************/
   196: 
   197: INPUT_PORTS_START( namcona1_joy )
   198: 	PORT_START
   199: 	PORT_DIPNAME( 0x01, 0x00, "DIP2 (Freeze)" )
   200: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   201: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   202: 	PORT_DIPNAME( 0x02, 0x00, "DIP1 (Test)" )
   203: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   204: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
   205: 	PORT_DIPNAME( 0x20, 0x00, "Test" )
   206: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   207: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
   208: 	PORT_DIPNAME( 0x40, 0x00, "SERVICE" )
   209: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   210: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
   211: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE )
   212: 
   213: 	PORT_START
   214: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY )
   215: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY )
   216: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY )
   217: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY )
   218: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
   219: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
   220: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 )
   221: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
   222: 
   223: 	PORT_START
   224: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
   225: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
   226: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
   227: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
   228: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
   229: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
   230: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2 )
   231: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
   232: 
   233: 	PORT_START
   234: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
   235: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 )
   236: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER3 )
   237: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER3 )
   238: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER3 )
   239: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER3 )
   240: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER3 )
   241: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START3 )
   242: 
   243: 	PORT_START
   244: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
   245: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER4 )
   246: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER4 )
   247: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER4 )
   248: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER4 )
   249: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER4 )
   250: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER4 )
   251: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START4 )
   252: 
   253: 	PORT_START
   254: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
   255: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
   256: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
   257: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN3 )
   258: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN4 )
   259: INPUT_PORTS_END
   260: 
   261: INPUT_PORTS_START( namcona1_quiz )
   262: 	PORT_START
   263: 	PORT_DIPNAME( 0x01, 0x00, "DIP2 (Freeze)" )
   264: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   265: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   266: 	PORT_DIPNAME( 0x02, 0x00, "DIP1 (Test)" )
   267: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   268: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
   269: 	PORT_DIPNAME( 0x20, 0x00, "Test" )
   270: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   271: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
   272: 	PORT_DIPNAME( 0x40, 0x00, "SERVICE" )
   273: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   274: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
   275: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE )
   276: 
   277: 	PORT_START
   278: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 )
   279: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 )
   280: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 )
   281: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 )
   282: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
   283: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
   284: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   285: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
   286: 
   287: 	PORT_START
   288: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 | IPF_PLAYER2 )
   289: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2 )
   290: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
   291: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
   292: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
   293: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
   294: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   295: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
   296: 
   297: 	PORT_START
   298: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 | IPF_PLAYER3 )
   299: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER3 )
   300: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER3 )
   301: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER3 )
   302: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
   303: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
   304: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   305: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START3 )
   306: 
   307: 	PORT_START
   308: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 | IPF_PLAYER4 )
   309: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER4 )
   310: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER4 )
   311: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER4 )
   312: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
   313: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
   314: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
   315: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START4 )
   316: 
   317: 	PORT_START
   318: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
   319: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
   320: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
   321: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN3 )
   322: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN4 )
   323: INPUT_PORTS_END
   324: 
   325: INPUT_PORTS_START( xday2 )
   326: 	PORT_START
   327: 	PORT_DIPNAME( 0x01, 0x00, "DIP2 (Freeze)" )
   328: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   329: 	PORT_DIPSETTING(    0x01, DEF_STR( On ) )
   330: 	PORT_DIPNAME( 0x02, 0x00, "DIP1 (Test)" )
   331: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   332: 	PORT_DIPSETTING(    0x02, DEF_STR( On ) )
   333: 	PORT_DIPNAME( 0x20, 0x00, "Test" )
   334: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   335: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
   336: 	PORT_DIPNAME( 0x40, 0x00, "SERVICE" )
   337: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
   338: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
   339: 	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE )
   340: 
   341: 	PORT_START
   342: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) /* next */
   343: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) /* prev */
   344: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
   345: 	PORT_BIT( 0x8f, IP_ACTIVE_HIGH, IPT_UNUSED )
   346: 	// 0x2000 enter was pressed (in game settings screen)
   347: 	// 0x1000 exit was pressed (in game settings screen)
   348: 
   349: 	PORT_START
   350: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2 ) /* enter */
   351: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 ) /* exit */
   352: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
   353: 	PORT_BIT( 0x8f, IP_ACTIVE_HIGH, IPT_UNUSED )
   354: 	// 0x2000 next was pressed (in game settings screen)
   355: 	// 0x1000 prev was pressed (in game settings screen)
   356: 
   357: 	PORT_START
   358: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER3 )
   359: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER3 )
   360: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER3 )
   361: 	PORT_BIT( 0x8f, IP_ACTIVE_HIGH, IPT_UNUSED )
   362: 
   363: 	PORT_START
   364: 	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER4 )
   365: 	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER4 )
   366: 	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER4 )
   367: 	PORT_BIT( 0x8f, IP_ACTIVE_HIGH, IPT_UNUSED )
   368: 
   369: 	PORT_START
   370: 	PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
   371: 	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
   372: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
   373: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN3 )
   374: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN4 )
   375: INPUT_PORTS_END
   376: 
   377: /***************************************************************************/
   378: 
   379: static void
   380: simulate_mcu( void )
   381: {
   382: 	int i;
   383: 	data16_t data;
   384: 	data8_t poll_coins;
   385: 
   386: 	mcu_ram[0xf60/2] = 0x0000; /* mcu ready */
   387: 
   388: 	mcu_ram[0xfc0/2] = readinputport(0x0); /* dipswitch */
   389: 
   390: 	for( i=1; i<=4; i++ )
   391: 	{
   392: 		data = readinputport(i)<<8;
   393: 		switch( namcona1_gametype )
   394: 		{
   395: 		case NAMCO_KNCKHEAD:
   396: 		case NAMCO_BKRTMAQ:
   397: 		case NAMCO_QUIZTOU:
   398: 		case NAMCO_EXBANIA:
   399: 			data |= data>>8;
   400: 			break;
   401: 
   402: 		case NAMCO_XDAY2:
   403: 			data |= data>>8; /* wrong! */
   404: 			break;
   405: 
   406: 		case NAMCO_TINKLPIT:
   407: 			if( data&0x2000 ) data |= 0x20; /* throw */
   408: 			if( data&0x4000 ) data |= 0x10; /* jump */
   409: 			if( i==1 )
   410: 			{
   411: 				if( readinputport(1)&0x80 ) data |= 0x80; /* P1 start */
   412: 				if( readinputport(2)&0x80 ) data |= 0x40; /* P2 start */
   413: 			}
   414: 			break;
   415: 
   416: 		default:
   417: 			break;
   418: 		}
   419: 		mcu_ram[0xfc0/2+i] = data;
   420: 	}
   421: 
   422: 	/* "analog" and "encoder" ports are polled during test mode,
   423: 	 * but I haven't found any games that make use of them.
   424: 	 */
   425: 	mcu_ram[0xfc0/2+0x05] = 0xffff; /* analog0,1 */
   426: 	mcu_ram[0xfc0/2+0x06] = 0xffff; /* analog2,3 */
   427: 	mcu_ram[0xfc0/2+0x07] = 0xffff; /* analog4,5 */
   428: 	mcu_ram[0xfc0/2+0x08] = 0xffff; /* analog6,7 */
   429: 	mcu_ram[0xfc0/2+0x09] = 0xffff; /* encoder0,1 */
   430: 
   431: 	poll_coins = readinputport(5); /* coin input */
   432: 	if( (poll_coins&0x8)&~(mCoinState&0x8) ) mCoinCount[0]++;
   433: 	if( (poll_coins&0x4)&~(mCoinState&0x4) ) mCoinCount[1]++;
   434: 	if( (poll_coins&0x2)&~(mCoinState&0x2) ) mCoinCount[2]++;
   435: 	if( (poll_coins&0x1)&~(mCoinState&0x1) ) mCoinCount[3]++;
   436: 	mCoinState = poll_coins;
   437: 
   438: 	mcu_ram[0xfc0/2+0xa] = (mCoinCount[0]<<8)|mCoinCount[1];
   439: 	mcu_ram[0xfc0/2+0xb] = (mCoinCount[2]<<8)|mCoinCount[3];
   440: 
   441: 	/* special handling for F/A */
   442: 	data = ~((readinputport(1)<<8)|readinputport(2));
   443: 	mcu_ram[0xffc/2] = data;
   444: 	mcu_ram[0xffe/2] = data;
   445: 
   446: 	if( namcona1_gametype == NAMCO_XDAY2 )
   447: 	{
   448: 		int p1 = readinputport(1);
   449: 		int p2 = readinputport(2);
   450: 		data32_t code = 0;
   451: 		if( p2&0x40 ) code |= 0x2000; // enter (top-level of self-test)
   452: 		if( p2&0x20 ) code |= 0x1000; // exit  (top-level of self-test)
   453: 		if( p1&0x40 ) code |= 0x0020; // next  (top-level of self-test)
   454: 		if( p1&0x20 ) code |= 0x0010; // prev  (top-level of self-test)
   455: 		code = ~code;
   456: 		mcu_ram[0xffc/2] = code>>16;
   457: 		mcu_ram[0xffe/2] = code&0xffff;
   458: 	}
   459: } /* simulate_mcu */
   460: 
   461: static READ16_HANDLER( namcona1_mcu_r )
   462: {
   463: 	return mcu_ram[offset];
   464: }
   465: 
   466: static WRITE16_HANDLER( namcona1_mcu_w )
   467: {
   468: 	COMBINE_DATA( &mcu_ram[offset] );
   469: 	if( offset>=0x400/2 && (offset<0x820/2 || (offset>=0xf30/2 && offset<0xf72/2)) )
   470: 	{
   471: 		logerror( "0x%03x: 0x%04x\n", offset*2, mcu_ram[offset] );
   472: 	}
   473: 	/*
   474: 		400..53d  code for MCU?
   475: 
   476: 		820:					song select
   477: 		822:					song control (volume? tempo?)
   478: 		824,826,828,....89e:	sample select
   479: 			0x40 is written to odd addresses to signal the MCU that a sound command has been issued
   480: 
   481: 		8f0: 0x07 unknown
   482: 		8f2: 0x01 unknown
   483: 		8f4: 0xa4 unknown
   484: 
   485: 		f30..f71	data for MCU
   486: 		f72: MCU command:
   487: 			0x07 = identify version
   488: 			0x03 = process data
   489: 			0x87 = ?
   490: 
   491: 		fc0..fc9: used by knuckleheads (NA2-specific?)
   492: 
   493: 		fd8: ?
   494: 
   495: 		fbf: watchdog
   496: 	*/
   497: }
   498: 
   499: /* NA2 hardware sends a special command to the MCU, then tests to
   500:  * see if the proper BIOS version string appears in shared memory.
   501:  */
   502: static void write_version_info( void )
   503: {
   504: 	const data16_t source[0x8] =
   505: 	{ /* "NSA-BIOS ver"... */
   506: 		0x534e,0x2d41,0x4942,0x534f,0x7620,0x7265,0x2e31,0x3133
   507: 	};
   508: 	int i;
   509: 	for( i=0; i<8; i++ )
   510: 	{
   511: 		namcona1_workram[i] = source[i];
   512: 	}
   513: } /* write_version_info */
   514: 
   515: static WRITE16_HANDLER( mcu_command_w )
   516: {
   517: 	data16_t *pMem = (data16_t *)memory_region( REGION_CPU1 );
   518: 	data16_t cmd = pMem[0xf72/2]>>8;
   519: 
   520: 	switch( cmd ){
   521: 	case 0x03:
   522: 		/* Process data at 0xf30..0xf71
   523: 		 *
   524: 		 * f30: 0101 0020 0400 013e 8a00 0000 0000 011e
   525: 		 * f40: 0301 0000 0000 0000 8a16 0000 0000 012c
   526: 		 * f50: 0301 0000 0000 0000 8a61 0000 0000 019e
   527: 		 * f60: 0301 0000 0000 0000 8a61 0000 0000 01ae
   528: 		 * f70: 0000
   529: 		 *
   530: 		 * f30: 0301 0000 0000 0000 8a88 0000 0000 0120
   531: 		 * f40: 0301 0000 0000 0000 8ad1 0000 0000 015a
   532: 		 * f50: 0301 0000 0000 0000 8af6 0000 0000 011c
   533: 		 * f60: 0301 0000 0000 0000 8b08 0000 0000 0114
   534: 		 * f70: 0000
   535: 		 *
   536: 		 * f30: 0300 0000 0000 0000 8b1f 2004 0000 0000
   537: 		 * f40: 0301 0000 0000 0000 8b33 0000 0000 8902
   538: 		 * f50: 0000
   539: 		 */
   540: 		break;
   541: 
   542: 	case 0x07:
   543: 		/* This command is used to detect Namco NA-2 hardware; without it,
   544: 		 * NA-2 games (Knuckleheads, Numan Athletics) refuse to run.
   545: 		 */
   546: 		write_version_info();
   547: 		break;
   548: 	}
   549: } /* mcu_command_w */
   550: 
   551: /***************************************************************************/
   552: /* sound
   553:  *
   554:  * 8 bit signed PCM data
   555:  * copied to workram
   556:  *
   557:  *	0x01fffc: pointer
   558:  *	0x020000: samples
   559:  *	0x040000: samples
   560:  *	0x060000: samples
   561:  *
   562:  *	0x070000: metadata; 10 byte frames
   563:  */
   564: 
   565: /***************************************************************************/
   566: 
   567: /**
   568:  * "Custom Key" Emulation
   569:  *
   570:  * The primary purpose of the custom key chip is protection.  It prevents
   571:  * ROM swaps from working with games that otherwise run on the same hardware.
   572:  *
   573:  * The secondary purpose of the custom key chip is to act as a random number
   574:  * generator in some games.
   575:  */
   576: static READ16_HANDLER( custom_key_r )
   577: {
   578: 	static unsigned char keyseq;
   579: 	static data16_t count;
   580: 	int old_count;
   581: 
   582: 	old_count = count;
   583: 	do
   584: 	{
   585: 		count = mame_rand();
   586: 	} while( old_count == count );
   587: 
   588: 	switch( namcona1_gametype )
   589: 	{
   590: 	case NAMCO_BKRTMAQ:
   591: 		if( offset==2 ) return 0x015c;
   592: 		break;
   593: 
   594: 	case NAMCO_FA:
   595: 		if( offset==2 ) return 0x015d;
   596: 		if( offset==4 ) return count;
   597: 		break;
   598: 
   599: 	case NAMCO_EXBANIA:
   600: 		if( offset==2 ) return 0x015e;
   601: 		break;
   602: 
   603: 	case NAMCO_CGANGPZL:
   604: 		if( offset==1 ) return 0x0164;
   605: 		if( offset==2 ) return count;
   606: 		break;
   607: 
   608: 	case NAMCO_SWCOURT:
   609: 		if( offset==1 ) return 0x0165;
   610: 		if( offset==2 ) return count;
   611: 		break;
   612: 
   613: 	case NAMCO_EMERALDA:
   614: 		if( offset==1 ) return 0x0166;
   615: 		if( offset==2 ) return count;
   616: 		break;
   617: 
   618: 	case NAMCO_NUMANATH:
   619: 		if( offset==1 ) return 0x0167;
   620: 		if( offset==2 ) return count;
   621: 		break;
   622: 
   623: 	case NAMCO_KNCKHEAD:
   624: 		if( offset==1 ) return 0x0168;
   625: 		if( offset==2 ) return count;
   626: 		break;
   627: 
   628: 	case NAMCO_QUIZTOU:
   629: 		if( offset==2 ) return 0x016d;
   630: 		break;
   631: 
   632: 	case NAMCO_TINKLPIT:
   633: 		if( offset==7 ) return 0x016f;
   634: 		if( offset==4 ) keyseq = 0;
   635: 		if( offset==3 )
   636: 		{
   637: 			const data16_t data[] =
   638: 			{
   639: 				0x0000,0x2000,0x2100,0x2104,0x0106,0x0007,0x4003,0x6021,
   640: 				0x61a0,0x31a4,0x9186,0x9047,0xc443,0x6471,0x6db0,0x39bc,
   641: 				0x9b8e,0x924f,0xc643,0x6471,0x6db0,0x19bc,0xba8e,0xb34b,
   642: 				0xe745,0x4576,0x0cb7,0x789b,0xdb29,0xc2ec,0x16e2,0xb491
   643: 			};
   644: 			return data[(keyseq++)&0x1f];
   645: 		}
   646: 		break;
   647: 
   648: 	case NAMCO_XDAY2:
   649: 		if( offset==2 ) return 0x018a;
   650: 		if( offset==3 ) return count;
   651: 		break;
   652: 
   653: 	default:
   654: 		return 0;
   655: 	}
   656: 	return mame_rand()&0xffff;
   657: } /* custom_key_r */
   658: 
   659: static WRITE16_HANDLER( custom_key_w )
   660: {
   661: } /* custom_key_w */
   662: 
   663: /***************************************************************/
   664: 
   665: static READ16_HANDLER( namcona1_vreg_r )
   666: {
   667: 	return namcona1_vreg[offset];
   668: } /* namcona1_vreg_r */
   669: 
   670: static int
   671: transfer_dword( UINT32 dest, UINT32 source )
   672: {
   673: 	data16_t data;
   674: 
   675: 	if( source>=0x400000 && source<0xc00000 )
   676: 	{
   677: 		data = mpBank1[(source-0x400000)/2];
   678: 	}
   679: 	else if( source>=0xc00000 && source<0xe00000 )
   680: 	{
   681: 		data = mpBank0[(source-0xc00000)/2];
   682: 	}
   683: 	else if( source<0x80000 && source>=0x1000 )
   684: 	{
   685: 		data = namcona1_workram[(source-0x001000)/2];
   686: 	}
   687: 	else
   688: 	{
   689: 		logerror( "bad blt src %08x\n", source );
   690: 		return -1;
   691: 	}
   692: 	if( dest>=0xf00000 && dest<=0xf02000 )
   693: 	{
   694: 		namcona1_paletteram_w( (dest-0xf00000)/2, data, 0x0000 );
   695: 	}
   696: 	else if( dest>=0xf40000 && dest<=0xf80000 )
   697: 	{
   698: 		namcona1_gfxram_w( (dest-0xf40000)/2, data, 0x0000 );
   699: 	}
   700: 	else if( dest>=0xff0000 && dest<0xff8000 )
   701: 	{
   702: 		namcona1_videoram_w( (dest-0xff0000)/2, data, 0x0000 );
   703: 	}
   704: 	else if( dest>=0xff8000 && dest<=0xffdfff )
   705: 	{
   706: 		namcona1_sparevram[(dest-0xff8000)/2] = data;
   707: 	}
   708: 	else if( dest>=0xfff000 && dest<=0xffffff )
   709: 	{
   710: 		spriteram16[(dest-0xfff000)/2] = data;
   711: 	}
   712: 	else
   713: 	{
   714: 		logerror( "bad blt dst %08x\n", dest );
   715: 		return -1;
   716: 	}
   717: 	return 0;
   718: } /* transfer_dword */
   719: 
   720: static void
   721: blit_setup( int format, int *bytes_per_row, int *pitch, int mode )
   722: {
   723: 	if( mode == 3 )
   724: 	{
   725: 		switch( format )
   726: 		{
   727: 		case 0x0001:
   728: 			*bytes_per_row = 0x1000;
   729: 			*pitch = 0x1000;
   730: 			break;
   731: 
   732: 		case 0x0081:
   733: 			*bytes_per_row = 4*8;
   734: 			*pitch = 36*8;
   735: 			break;
   736: 
   737: 		default:
   738: //		case 0x00f1:
   739: //		case 0x00f9:
   740: //		case 0x00fd:
   741: 			*bytes_per_row = (64 - (format>>2))*0x08;
   742: 			*pitch = 0x200;
   743: 			break;
   744: 		}
   745: 	}
   746: 	else
   747: 	{
   748: 		switch( format )
   749: 		{
   750: 		case 0x00bd: /* Numan Athletics */
   751: 			*bytes_per_row = 4;
   752: 			*pitch = 0x120;
   753: 			break;
   754: 		case 0x008d: /* Numan Athletics */
   755: 			*bytes_per_row = 8;
   756: 			*pitch = 0x120;
   757: 			break;
   758: 
   759: 		case 0x0000: /* Numan (used to clear spriteram) */
   760: //		0000 0000 0000 : src0
   761: //		0000 0001 0000 : dst0
   762: //		003d 75a0      : src (7AEB40)
   763: //		---- ----      : spriteram
   764: //		0800		   : numbytes
   765: //		0000		   : blit
   766: 			*bytes_per_row = 0x10;
   767: 			*pitch = 0;
   768: 			break;
   769: 
   770: 		case 0x0001:
   771: 			*bytes_per_row = 0x1000;
   772: 			*pitch = 0x1000;
   773: 			break;
   774: 
   775: 		case 0x0401: /* F/A */
   776: 			*bytes_per_row = 4*0x40;
   777: 			*pitch = 36*0x40;
   778: 			break;
   779: 
   780: 		default:
   781: //		case 0x00f1:
   782: //		case 0x0781:
   783: //		case 0x07c1:
   784: //		case 0x07e1:
   785: 			*bytes_per_row = (64 - (format>>5))*0x40;
   786: 			*pitch = 0x1000;
   787: 			break;
   788: 		}
   789: 	}
   790: } /* blit_setup */
   791: 
   792: /*
   793: $efff20: sprite control: 0x3a,0x3e,0x3f
   794: 			bit 0x01 selects spriteram bank
   795: 
   796:                0    2    4    6    8    a    c    e
   797: $efff00:	src0 src1 src2 dst0 dst1 dst2 BANK [src
   798: $efff10:	src] [dst dst] #BYT BLIT eINT 001f 0001
   799: $efff20:	003f 003f IACK ---- ---- ---- ---- ----
   800: $efff30:	---- ---- ---- ---- ---- ---- ---- ----
   801: $efff40:	---- ---- ---- ---- ---- ---- ---- ----
   802: $efff50:	---- ---- ---- ---- ---- ---- ---- ----
   803: $efff60:	---- ---- ---- ---- ---- ---- ---- ----
   804: $efff70:	---- ---- ---- ---- ---- ---- ---- ----
   805: $efff80:	0050 0170 0020 0100 0000 0000 0000 GFXE
   806: $efff90:	0000 0001 0002 0003 FLIP ---- ---- ----
   807: $efffa0:	PRI  PRI  PRI  PRI  ---- ---- 00c0 ----		priority (0..7)
   808: $efffb0:	COLR COLR COLR COLR 0001 0004 0000 ----		color (0..f)
   809: $efffc0:	???? ???? ???? ????	???? ???? ???? ----		ROZ
   810: 
   811: Emeralda:
   812: $efff80:	0048 0177 0020 0100 0000 00fd 0000 GFXE
   813: */
   814: 
   815: static void namcona1_blit( void )
   816: {
   817: 	int src0 = namcona1_vreg[0x0];
   818: 	int src1 = namcona1_vreg[0x1];
   819: 	int src2 = namcona1_vreg[0x2];
   820: 
   821: 	int dst0 = namcona1_vreg[0x3];
   822: 	int dst1 = namcona1_vreg[0x4];
   823: 	int dst2 = namcona1_vreg[0x5];
   824: 
   825: 	int gfxbank = namcona1_vreg[0x6];
   826: 
   827: 	/* dest and source are provided as dword offsets */
   828: 	UINT32 src_baseaddr	= 2*((namcona1_vreg[0x7]<<16)|namcona1_vreg[0x8]);
   829: 	UINT32 dst_baseaddr	= 2*((namcona1_vreg[0x9]<<16)|namcona1_vreg[0xa]);
   830: 
   831: 	int num_bytes = namcona1_vreg[0xb];
   832: 
   833: 	int dest_offset, source_offset;
   834: 	int dest_bytes_per_row, dst_pitch;
   835: 	int source_bytes_per_row, src_pitch;
   836: 
   837: 	(void)dst2;
   838: 	(void)dst0;
   839: 	(void)src2;
   840: 	(void)src0;
   841: 
   842: 	logerror( "0x%08x: blt(%08x,%08x,%08x);%04x %04x %04x; %04x %04x %04x; gfx=%04x\n",
   843: 		activecpu_get_pc(),
   844: 		dst_baseaddr,src_baseaddr,num_bytes,
   845: 		src0,src1,src2,
   846: 		dst0,dst1,dst2,
   847: 		gfxbank );
   848: 
   849: 	blit_setup( dst1, &dest_bytes_per_row, &dst_pitch, gfxbank);
   850: 	blit_setup( src1, &source_bytes_per_row, &src_pitch, gfxbank );
   851: 
   852: 	if( num_bytes&1 )
   853: 	{
   854: 		num_bytes++;
   855: 	}
   856: 
   857: 	if( dst_baseaddr < 0xf00000 )
   858: 	{
   859: 		dst_baseaddr += 0xf40000;
   860: 	}
   861: 
   862: 	dest_offset		= 0;
   863: 	source_offset	= 0;
   864: 
   865: 	while( num_bytes>0 )
   866: 	{
   867: 		if( transfer_dword(
   868: 			dst_baseaddr + dest_offset,
   869: 			src_baseaddr + source_offset ) )
   870: 		{
   871: 			return;
   872: 		}
   873: 
   874: 		num_bytes -= 2;
   875: 
   876: 		dest_offset+=2;
   877: 		if( dest_offset >= dest_bytes_per_row )
   878: 		{
   879: 			dst_baseaddr += dst_pitch;
   880: 			dest_offset = 0;
   881: 		}
   882: 
   883: 		source_offset+=2;
   884: 		if( source_offset >= source_bytes_per_row )
   885: 		{
   886: 			src_baseaddr += src_pitch;
   887: 			source_offset = 0;
   888: 		}
   889: 	}
   890: } /* namcona1_blit */
   891: 
   892: static WRITE16_HANDLER( namcona1_vreg_w )
   893: {
   894: 	COMBINE_DATA( &namcona1_vreg[offset] );
   895: 
   896: 	switch( offset )
   897: 	{
   898: 	case 0x18/2:
   899: 		namcona1_blit();
   900: 		/* see also 0x1e */
   901: 		break;
   902: 
   903: 	case 0x1a/2:
   904: 		mEnableInterrupts = 1;
   905: 		/* interrupt enable mask; 0 enables INT level */
   906: 		break;
   907: 	}
   908: } /* namcona1_vreg_w */
   909: 
   910: /***************************************************************/
   911: 
   912: static WRITE16_HANDLER( bogus_w )
   913: {
   914: //	extern int debug_key_pressed;
   915: //	debug_key_pressed = 1;
   916: }
   917: static READ16_HANDLER( bogus_r )
   918: {
   919: //	extern int debug_key_pressed;
   920: //	debug_key_pressed = 1;
   921: 	return 0;
   922: }
   923: 
   924: static MEMORY_READ16_START( namcona1_readmem )
   925: 	{ 0x000000, 0x000fff, namcona1_mcu_r },
   926: 	{ 0x001000, 0x07ffff, MRA16_RAM },		/* work RAM */
   927: 	{ 0x080000, 0x3fffff, bogus_r },
   928: 	{ 0x400000, 0xbfffff, MRA16_BANK2 },	/* data */
   929: 	{ 0xc00000, 0xdfffff, MRA16_BANK1 },	/* code */
   930: 	{ 0xe00000, 0xe00fff, namcona1_nvram_r },
   931: 	{ 0xe40000, 0xe4000f, custom_key_r },
   932: 	{ 0xe40010, 0xeffeff, bogus_r },
   933: 	{ 0xefff00, 0xefffff, namcona1_vreg_r },
   934: 	{ 0xf00000, 0xf01fff, namcona1_paletteram_r },
   935: 	{ 0xf02000, 0xf3ffff, bogus_r },
   936: 	{ 0xf40000, 0xf7ffff, namcona1_gfxram_r },
   937: 	{ 0xf80000, 0xfeffff, bogus_r },
   938: 	{ 0xff0000, 0xff7fff, namcona1_videoram_r },
   939: 	{ 0xff8000, 0xffdfff, MRA16_RAM },		/* spare videoram */
   940: 	{ 0xffe000, 0xffefff, MRA16_RAM },		/* scroll registers */
   941: 	{ 0xfff000, 0xffffff, MRA16_RAM },		/* spriteram */
   942: MEMORY_END
   943: 
   944: static MEMORY_WRITE16_START( namcona1_writemem )
   945: 	{ 0x000000, 0x000fff, namcona1_mcu_w, &mcu_ram },
   946: 	{ 0x001000, 0x07ffff, MWA16_RAM, &namcona1_workram },
   947: 	{ 0x080000, 0x3f8007, bogus_w },
   948: 	{ 0x3f8008, 0x3f8009, mcu_command_w },
   949: 	{ 0x3f800a, 0x3fffff, bogus_w },
   950: 	{ 0x400000, 0xdfffff, MWA16_ROM }, /* data + code */
   951: 	{ 0xe00000, 0xe00fff, namcona1_nvram_w },
   952: 	{ 0xe01000, 0xe3ffff, bogus_w },
   953: 	{ 0xe40000, 0xe4000f, custom_key_w },
   954: 	{ 0xe40010, 0xeffeff, bogus_w },
   955: 	{ 0xefff00, 0xefffff, namcona1_vreg_w, &namcona1_vreg },
   956: 	{ 0xf00000, 0xf01fff, namcona1_paletteram_w, &paletteram16 },
   957: 	{ 0xf02000, 0xf3ffff, bogus_w },
   958: 	{ 0xf40000, 0xf7ffff, namcona1_gfxram_w },
   959: 	{ 0xf80000, 0xfeffff, bogus_w },
   960: 	{ 0xff0000, 0xff7fff, namcona1_videoram_w, &videoram16 },
   961: 	{ 0xff8000, 0xffdfff, MWA16_RAM, &namcona1_sparevram },
   962: 	{ 0xffe000, 0xffefff, MWA16_RAM, &namcona1_scroll },
   963: 	{ 0xfff000, 0xffffff, MWA16_RAM, &spriteram16 },
   964: MEMORY_END
   965: 
   966: INTERRUPT_GEN( namcona1_interrupt )
   967: {
   968: 	int level = cpu_getiloops(); /* 0,1,2,3,4 */
   969: 	if( level==0 )
   970: 	{
   971: 		simulate_mcu();
   972: 	}
   973: 	if( mEnableInterrupts )
   974: 	{
   975: 		if( (namcona1_vreg[0x1a/2]&(1<<level))==0 )
   976: 		{
   977: 			cpu_set_irq_line(0, level+1, HOLD_LINE);
   978: 		}
   979: 	}
   980: }
   981: 
   982: static struct NAMCONAinterface NAMCONA_interface =
   983: {
   984: 	4*8000,
   985: 	REGION_CPU1,
   986: 	100
   987: };
   988: 
   989: /* cropped at sides */
   990: static MACHINE_DRIVER_START( namcona1 )
   991: 	/* basic machine hardware */
   992: 	MDRV_CPU_ADD(M68000, 50113000/4)
   993: 	MDRV_CPU_MEMORY(namcona1_readmem,namcona1_writemem)
   994: 	MDRV_CPU_VBLANK_INT(namcona1_interrupt,5)
   995: 
   996: 	MDRV_FRAMES_PER_SECOND(60)
   997: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
   998: 
   999: 	MDRV_NVRAM_HANDLER(namcosna1)
  1000: 
  1001: 	/* video hardware */
  1002: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER|VIDEO_HAS_SHADOWS)
  1003: 	MDRV_SCREEN_SIZE(38*8, 32*8)
  1004: 	MDRV_VISIBLE_AREA(8, 38*8-1-8, 4*8, 32*8-1)
  1005: 	MDRV_PALETTE_LENGTH(0x1000)
  1006: 
  1007: 	MDRV_VIDEO_START(namcona1)
  1008: 	MDRV_VIDEO_UPDATE(namcona1)
  1009: 
  1010: 	/* sound hardware */
  1011: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  1012: 	MDRV_SOUND_ADD(NAMCONA, NAMCONA_interface)
  1013: MACHINE_DRIVER_END
  1014: 
  1015: 
  1016: /* full-width */
  1017: static MACHINE_DRIVER_START( namcona1w )
  1018: 
  1019: 	/* basic machine hardware */
  1020: 	MDRV_IMPORT_FROM(namcona1)
  1021: 
  1022: 	/* video hardware */
  1023: 	MDRV_VISIBLE_AREA(0, 38*8-1-0, 4*8, 32*8-1)
  1024: MACHINE_DRIVER_END
  1025: 
  1026: 
  1027: static void
  1028: init_namcona1( void )
  1029: {
  1030: 	data16_t *pMem = (data16_t *)memory_region( REGION_CPU1 );
  1031: 	pMem[0] = 0x0007; pMem[1] = 0xfffc; /* (?) stack */
  1032: 	pMem[2] = 0x00c0; pMem[3] = 0x0000; /* reset vector */
  1033: 
  1034: 	mpBank0 = &pMem[0x80000/2];
  1035: 	mpBank1 = mpBank0 +  0x200000/2;
  1036: 
  1037: 	cpu_setbank( 1, mpBank0 ); /* code */
  1038: 	cpu_setbank( 2, mpBank1 ); /* data */
  1039: 
  1040: 	mCoinCount[0] = mCoinCount[1] = mCoinCount[2] = mCoinCount[3] = 0;
  1041: 	mCoinState = 0;
  1042: 	mEnableInterrupts = 0;
  1043: }
  1044: 
  1045: DRIVER_INIT( bkrtmaq ){		init_namcona1(); namcona1_gametype = NAMCO_BKRTMAQ; }
  1046: DRIVER_INIT( cgangpzl ){	init_namcona1(); namcona1_gametype = NAMCO_CGANGPZL; }
  1047: DRIVER_INIT( emeralda ){	init_namcona1(); namcona1_gametype = NAMCO_EMERALDA; }
  1048: DRIVER_INIT( exbania ){		init_namcona1(); namcona1_gametype = NAMCO_EXBANIA; }
  1049: DRIVER_INIT( fa ){			init_namcona1(); namcona1_gametype = NAMCO_FA; }
  1050: DRIVER_INIT( knckhead ){	init_namcona1(); namcona1_gametype = NAMCO_KNCKHEAD; }
  1051: DRIVER_INIT( numanath ){	init_namcona1(); namcona1_gametype = NAMCO_NUMANATH; }
  1052: DRIVER_INIT( quiztou ){		init_namcona1(); namcona1_gametype = NAMCO_QUIZTOU; }
  1053: DRIVER_INIT( swcourt ){		init_namcona1(); namcona1_gametype = NAMCO_SWCOURT; }
  1054: DRIVER_INIT( tinklpit ){	init_namcona1(); namcona1_gametype = NAMCO_TINKLPIT; }
  1055: DRIVER_INIT( xday2 ){		init_namcona1(); namcona1_gametype = NAMCO_XDAY2; }
  1056: 
  1057: ROM_START( bkrtmaq )
  1058: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1059: 	ROM_LOAD16_BYTE( "mq1_ep0l.bin", 0x080001, 0x080000, CRC(f029bc57) SHA1(fdbf8b8b9f69d5755ca5197dda4f887b12dd66f4) ) /* 0xc00000 */
  1060: 	ROM_LOAD16_BYTE( "mq1_ep0u.bin", 0x080000, 0x080000, CRC(4cff62b8) SHA1(5cac170dcfbeb3dcfa0840bdbe7541a9d2f44a14) )
  1061: 	ROM_LOAD16_BYTE( "mq1_ep1l.bin", 0x180001, 0x080000, CRC(e3be6f4b) SHA1(75d9a4cff25e63a9d6c092aa6e241eccd1c61f91) )
  1062: 	ROM_LOAD16_BYTE( "mq1_ep1u.bin", 0x180000, 0x080000, CRC(b44e31b2) SHA1(3d8c63789b98ada3663ba9e28c370815a9a9c3ed) )
  1063: 
  1064: 	ROM_LOAD16_BYTE( "mq1_ma0l.bin", 0x280001, 0x100000, CRC(11fed35f) SHA1(511d98b6b42b330238a1874bca031b1892654a48) ) /* 0x400000 */
  1065: 	ROM_LOAD16_BYTE( "mq1_ma0u.bin", 0x280000, 0x100000, CRC(23442ac0) SHA1(fac706f24045d51a2712f51530967140ea8e875f) )
  1066: 	ROM_LOAD16_BYTE( "mq1_ma1l.bin", 0x480001, 0x100000, CRC(fe82205f) SHA1(860cc7a96ae3f848ce594077c1362e4e22a36908) )
  1067: 	ROM_LOAD16_BYTE( "mq1_ma1u.bin", 0x480000, 0x100000, CRC(0cdb6bd0) SHA1(b8b398477c9654e96921110fb30c754240183897) )
  1068: ROM_END
  1069: 
  1070: ROM_START( cgangpzl )
  1071: 	ROM_REGION( 0x180000, REGION_CPU1, 0 )
  1072: 	ROM_LOAD16_BYTE( "cp2-ep0l.bin", 0x080001, 0x80000, CRC(8f5cdcc5) SHA1(925db3f3f16224bc28f97a57aba0ab2b51c5067c) ) /* 0xc00000 */
  1073: 	ROM_LOAD16_BYTE( "cp2-ep0u.bin", 0x080000, 0x80000, CRC(3a816140) SHA1(613c367e08a0a20ec62e1938faab0128743b26f8) )
  1074: ROM_END
  1075: 
  1076: ROM_START( cgangpzj )
  1077: 	ROM_REGION( 0x180000, REGION_CPU1, 0 )
  1078: 	ROM_LOAD16_BYTE( "cp1-ep0l.bin", 0x080001, 0x80000, CRC(2825f7ba) SHA1(5f6f8df6bdf0f45656904411cdbb31fdcf8f3be0) ) /* 0xc00000 */
  1079: 	ROM_LOAD16_BYTE( "cp1-ep0u.bin", 0x080000, 0x80000, CRC(94d7d6fc) SHA1(2460741e0dbb2ccff28f4fbc419a7507382467d2) )
  1080: ROM_END
  1081: 
  1082: ROM_START( emeralda )
  1083: 	ROM_REGION( 0x280000, REGION_CPU1, 0 )
  1084: 	ROM_LOAD16_BYTE( "ep0lb.bin",    0x080001, 0x080000, CRC(fcd55293) SHA1(fdabf9d5f528c37196ac1e031b097618b4c887b5) ) /* 0xc00000 */
  1085: 	ROM_LOAD16_BYTE( "ep0ub.bin",    0x080000, 0x080000, CRC(a52f00d5) SHA1(85f95d2a69a2df2e9195f55583645c064b0b6fe6) )
  1086: 	ROM_LOAD16_BYTE( "em1-ep1l.bin", 0x180001, 0x080000, CRC(373c1c59) SHA1(385cb3bc056b798878de890dbff97a8bdd48fe4e) )
  1087: 	ROM_LOAD16_BYTE( "em1-ep1u.bin", 0x180000, 0x080000, CRC(4e969152) SHA1(2c89ae5d43585f479f16cf8278f8fc001e077e45) )
  1088: ROM_END
  1089: 
  1090: ROM_START( emerldaa )
  1091: 	ROM_REGION( 0x280000, REGION_CPU1, 0 )
  1092: 	ROM_LOAD16_BYTE( "em1-ep0l.bin", 0x080001, 0x080000, CRC(443f3fce) SHA1(35b6c834e5716c1e9b55f1e39f4e7336dbbe2d9b) ) /* 0xc00000 */
  1093: 	ROM_LOAD16_BYTE( "em1-ep0u.bin", 0x080000, 0x080000, CRC(484a2a81) SHA1(1b60c18dfb2aebfd4aa8b2a85a1e90883a1f8e61) )
  1094: 	ROM_LOAD16_BYTE( "em1-ep1l.bin", 0x180001, 0x080000, CRC(373c1c59) SHA1(385cb3bc056b798878de890dbff97a8bdd48fe4e) )
  1095: 	ROM_LOAD16_BYTE( "em1-ep1u.bin", 0x180000, 0x080000, CRC(4e969152) SHA1(2c89ae5d43585f479f16cf8278f8fc001e077e45) )
  1096: ROM_END
  1097: 
  1098: ROM_START( exvania )
  1099: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1100: 	ROM_LOAD16_BYTE( "ex1-ep0l.bin", 0x080001, 0x080000, CRC(18c12015) SHA1(e4f3524e798545c434549719b377c8b5863f580f) ) /* 0xc00000 */
  1101: 	ROM_LOAD16_BYTE( "ex1-ep0u.bin", 0x080000, 0x080000, CRC(07d054d1) SHA1(e2d2cb81acd309c519686572804648bef4cbd191) )
  1102: 
  1103: 	ROM_LOAD16_BYTE( "ex1-ma0l.bin", 0x280001, 0x100000, CRC(17922cd4) SHA1(af92c2335e7110c0c5e712f3148c1534d22d3814) ) /* 0x400000 */
  1104: 	ROM_LOAD16_BYTE( "ex1-ma0u.bin", 0x280000, 0x100000, CRC(93d66106) SHA1(c5d665db04ae0e8992ef46544e2cb7b0e27c8bfe) )
  1105: 	ROM_LOAD16_BYTE( "ex1-ma1l.bin", 0x480001, 0x100000, CRC(e4bba6ed) SHA1(6483ef91e5a5b8ddd13a3d889936c39829fa50d6) )
  1106: 	ROM_LOAD16_BYTE( "ex1-ma1u.bin", 0x480000, 0x100000, CRC(04e7c4b0) SHA1(78180d96cd1fae583617d4d227ed4ee24f2f9e29) )
  1107: ROM_END
  1108: 
  1109: ROM_START( knckhead )
  1110: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1111: 	ROM_LOAD16_BYTE( "kh2-ep0l.bin", 0x080001, 0x080000, CRC(b4b88077) SHA1(9af03d1832ad6c77222e18427f4afca330a41ce6) ) /* 0xc00000 */
  1112: 	ROM_LOAD16_BYTE( "kh2-ep0u.bin", 0x080000, 0x080000, CRC(a578d97e) SHA1(9a5bb6649cca7b98daf538a66c813f61cca2e2ec) )
  1113: 	ROM_LOAD16_BYTE( "kh1-ep1l.bin", 0x180001, 0x080000, CRC(27e6ab4e) SHA1(66f397cc2117c1e73652c4800c0937e6d8116380) )
  1114: 	ROM_LOAD16_BYTE( "kh1-ep1u.bin", 0x180000, 0x080000, CRC(487b2434) SHA1(2d62db85ceac1fca61c39e4db92c96ae80ba3323) )
  1115: 
  1116: 	ROM_LOAD16_BYTE( "kh1-ma0l.bin", 0x280001, 0x100000, CRC(7b2db5df) SHA1(ecc392c4683cf0718d986e73336b69952d324548) ) /* 0x400000 */
  1117: 	ROM_LOAD16_BYTE( "kh1-ma0u.bin", 0x280000, 0x100000, CRC(6983228b) SHA1(5f3eeb780e9d91445b4c11da63d4ca580e654f34) )
  1118: 	ROM_LOAD16_BYTE( "kh1-ma1l.bin", 0x480001, 0x100000, CRC(b24f93e6) SHA1(3d8951485dc8a2810da9ddf2f4896efa31779bf4) )
  1119: 	ROM_LOAD16_BYTE( "kh1-ma1u.bin", 0x480000, 0x100000, CRC(18a60348) SHA1(298e0e0e7649e872791c3c99c81a19f273e9eb8a) )
  1120: 	ROM_LOAD16_BYTE( "kh1-ma2l.bin", 0x680001, 0x100000, CRC(82064ee9) SHA1(0b984565d17e580f49fff982a1621ef90e14c064) )
  1121: 	ROM_LOAD16_BYTE( "kh1-ma2u.bin", 0x680000, 0x100000, CRC(17fe8c3d) SHA1(88c45076477725faa5f8a23512e65a40385bb27d) )
  1122: 	ROM_LOAD16_BYTE( "kh1-ma3l.bin", 0x880001, 0x100000, CRC(ad9a7807) SHA1(c40f18a68306e76acd89ccb3fc82b8106556912e) )
  1123: 	ROM_LOAD16_BYTE( "kh1-ma3u.bin", 0x880000, 0x100000, CRC(efeb768d) SHA1(15d016244549f3ea0d19f5cfb04bcebd65ac6134) )
  1124: ROM_END
  1125: 
  1126: ROM_START( knckhedj )
  1127: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1128: 	ROM_LOAD16_BYTE( "kh1-ep0l.bin", 0x080001, 0x080000, CRC(94660bec) SHA1(42fa23f759cf66b05f30c2fc03a12fd14ae1f796) ) /* 0xc00000 */
  1129: 	ROM_LOAD16_BYTE( "kh1-ep0u.bin", 0x080000, 0x080000, CRC(ad640d69) SHA1(62595a9d1d5952cbe3dd7266cfda9292be51d269) )
  1130: 	ROM_LOAD16_BYTE( "kh1-ep1l.bin", 0x180001, 0x080000, CRC(27e6ab4e) SHA1(66f397cc2117c1e73652c4800c0937e6d8116380) )
  1131: 	ROM_LOAD16_BYTE( "kh1-ep1u.bin", 0x180000, 0x080000, CRC(487b2434) SHA1(2d62db85ceac1fca61c39e4db92c96ae80ba3323) )
  1132: 
  1133: 	ROM_LOAD16_BYTE( "kh1-ma0l.bin", 0x280001, 0x100000, CRC(7b2db5df) SHA1(ecc392c4683cf0718d986e73336b69952d324548) ) /* 0x400000 */
  1134: 	ROM_LOAD16_BYTE( "kh1-ma0u.bin", 0x280000, 0x100000, CRC(6983228b) SHA1(5f3eeb780e9d91445b4c11da63d4ca580e654f34) )
  1135: 	ROM_LOAD16_BYTE( "kh1-ma1l.bin", 0x480001, 0x100000, CRC(b24f93e6) SHA1(3d8951485dc8a2810da9ddf2f4896efa31779bf4) )
  1136: 	ROM_LOAD16_BYTE( "kh1-ma1u.bin", 0x480000, 0x100000, CRC(18a60348) SHA1(298e0e0e7649e872791c3c99c81a19f273e9eb8a) )
  1137: 	ROM_LOAD16_BYTE( "kh1-ma2l.bin", 0x680001, 0x100000, CRC(82064ee9) SHA1(0b984565d17e580f49fff982a1621ef90e14c064) )
  1138: 	ROM_LOAD16_BYTE( "kh1-ma2u.bin", 0x680000, 0x100000, CRC(17fe8c3d) SHA1(88c45076477725faa5f8a23512e65a40385bb27d) )
  1139: 	ROM_LOAD16_BYTE( "kh1-ma3l.bin", 0x880001, 0x100000, CRC(ad9a7807) SHA1(c40f18a68306e76acd89ccb3fc82b8106556912e) )
  1140: 	ROM_LOAD16_BYTE( "kh1-ma3u.bin", 0x880000, 0x100000, CRC(efeb768d) SHA1(15d016244549f3ea0d19f5cfb04bcebd65ac6134) )
  1141: ROM_END
  1142: 
  1143: ROM_START( numanatj )
  1144: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1145: 	ROM_LOAD16_BYTE( "nm1_ep0l.bin", 0x080001, 0x080000, CRC(4398b898) SHA1(0d1517409ba181f796f7f413cac704c60085b505) ) /* 0xc00000 */
  1146: 	ROM_LOAD16_BYTE( "nm1_ep0u.bin", 0x080000, 0x080000, CRC(be90aa79) SHA1(6884a8d72dd34c889527e8e653f5e5b4cf3fb5d6) )
  1147: 	ROM_LOAD16_BYTE( "nm1_ep1l.bin", 0x180001, 0x080000, CRC(4581dcb4) SHA1(1f46f98e63a7c9cdfde9e8ee2696a13c3f9bcc8e) )
  1148: 	ROM_LOAD16_BYTE( "nm1_ep1u.bin", 0x180000, 0x080000, CRC(30cd589a) SHA1(74a14ec41fe4fc9f73e5357b0903f1199ed96337) )
  1149: 
  1150: 	ROM_LOAD16_BYTE( "nm1_ma0l.bin", 0x280001, 0x100000, CRC(20faaa57) SHA1(9dbfc0dd48eec37b2c0715a5691c6e6f923fc7f7) ) /* 0x400000 */
  1151: 	ROM_LOAD16_BYTE( "nm1_ma0u.bin", 0x280000, 0x100000, CRC(ed7c37f2) SHA1(829751af33754ade941f76982e196b494d56ab0a) )
  1152: 	ROM_LOAD16_BYTE( "nm1_ma1l.bin", 0x480001, 0x100000, CRC(2232e3b4) SHA1(e9da3dc34eb2576c8a88e23cb9007129e885496d) )
  1153: 	ROM_LOAD16_BYTE( "nm1_ma1u.bin", 0x480000, 0x100000, CRC(6cc9675c) SHA1(fec74da4479f2a088760efc6908e6acfaea3989f) )
  1154: 	ROM_LOAD16_BYTE( "nm1_ma2l.bin", 0x680001, 0x100000, CRC(208abb39) SHA1(52d7247a71c6a14467f12f5270921bba1824cc3f) )
  1155: 	ROM_LOAD16_BYTE( "nm1_ma2u.bin", 0x680000, 0x100000, CRC(03a3f204) SHA1(9cb0422c8ecc819d0cc8a65c29a228369d78d986) )
  1156: 	ROM_LOAD16_BYTE( "nm1_ma3l.bin", 0x880001, 0x100000, CRC(42a539e9) SHA1(1c53a5a031648891ab7a37cf026c979404ce9589) )
  1157: 	ROM_LOAD16_BYTE( "nm1_ma3u.bin", 0x880000, 0x100000, CRC(f79e2112) SHA1(8bb8639a9d3a5d3ac5c9bb78e72b3d76582a9c25) )
  1158: ROM_END
  1159: 
  1160: ROM_START( numanath )
  1161: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1162: 	ROM_LOAD16_BYTE( "nm2_ep0l.bin", 0x080001, 0x080000, CRC(f24414bb) SHA1(68b13dfdc2292afd5279edb891fe63972f991e7b) ) /* 0xc00000 */
  1163: 	ROM_LOAD16_BYTE( "nm2_ep0u.bin", 0x080000, 0x080000, CRC(25c41616) SHA1(68ba67d3dd45f3bdddfa2fd21b574535306c1214) )
  1164: 	ROM_LOAD16_BYTE( "nm1_ep1l.bin", 0x180001, 0x080000, CRC(4581dcb4) SHA1(1f46f98e63a7c9cdfde9e8ee2696a13c3f9bcc8e) )
  1165: 	ROM_LOAD16_BYTE( "nm1_ep1u.bin", 0x180000, 0x080000, CRC(30cd589a) SHA1(74a14ec41fe4fc9f73e5357b0903f1199ed96337) )
  1166: 
  1167: 	ROM_LOAD16_BYTE( "nm1_ma0l.bin", 0x280001, 0x100000, CRC(20faaa57) SHA1(9dbfc0dd48eec37b2c0715a5691c6e6f923fc7f7) ) /* 0x400000 */
  1168: 	ROM_LOAD16_BYTE( "nm1_ma0u.bin", 0x280000, 0x100000, CRC(ed7c37f2) SHA1(829751af33754ade941f76982e196b494d56ab0a) )
  1169: 	ROM_LOAD16_BYTE( "nm1_ma1l.bin", 0x480001, 0x100000, CRC(2232e3b4) SHA1(e9da3dc34eb2576c8a88e23cb9007129e885496d) )
  1170: 	ROM_LOAD16_BYTE( "nm1_ma1u.bin", 0x480000, 0x100000, CRC(6cc9675c) SHA1(fec74da4479f2a088760efc6908e6acfaea3989f) )
  1171: 	ROM_LOAD16_BYTE( "nm1_ma2l.bin", 0x680001, 0x100000, CRC(208abb39) SHA1(52d7247a71c6a14467f12f5270921bba1824cc3f) )
  1172: 	ROM_LOAD16_BYTE( "nm1_ma2u.bin", 0x680000, 0x100000, CRC(03a3f204) SHA1(9cb0422c8ecc819d0cc8a65c29a228369d78d986) )
  1173: 	ROM_LOAD16_BYTE( "nm1_ma3l.bin", 0x880001, 0x100000, CRC(42a539e9) SHA1(1c53a5a031648891ab7a37cf026c979404ce9589) )
  1174: 	ROM_LOAD16_BYTE( "nm1_ma3u.bin", 0x880000, 0x100000, CRC(f79e2112) SHA1(8bb8639a9d3a5d3ac5c9bb78e72b3d76582a9c25) )
  1175: ROM_END
  1176: 
  1177: ROM_START( quiztou )
  1178: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1179: 	ROM_LOAD16_BYTE( "qt1_ep0l.bin", 0x080001, 0x080000, CRC(b680e543) SHA1(f10f38113a46c821d8e9d66f52d7311d9d52e595) ) /* 0xc00000 */
  1180: 	ROM_LOAD16_BYTE( "qt1_ep0u.bin", 0x080000, 0x080000, CRC(143c5e4d) SHA1(24c584986c97a5e6fe7e73f0e9af4af28ed20c4a) )
  1181: 	ROM_LOAD16_BYTE( "qt1_ep1l.bin", 0x180001, 0x080000, CRC(33a72242) SHA1(5d17f033878d28dbebba50931a549ccf84802c05) )
  1182: 	ROM_LOAD16_BYTE( "qt1_ep1u.bin", 0x180000, 0x080000, CRC(69f876cb) SHA1(d0c7e972a04c45d3ab34ef5be88614d6389189c6) )
  1183: 
  1184: 	ROM_LOAD16_BYTE( "qt1_ma0l.bin", 0x280001, 0x100000, CRC(5597f2b9) SHA1(747c4be867d4eb37ffab8303740729686a00b825) ) /* 0x400000 */
  1185: 	ROM_LOAD16_BYTE( "qt1_ma0u.bin", 0x280000, 0x100000, CRC(f0a4cb7d) SHA1(364e85af956e7cfc29c957da11574a4b389f7797) )
  1186: 	ROM_LOAD16_BYTE( "qt1_ma1l.bin", 0x480001, 0x100000, CRC(1b9ce7a6) SHA1(dac1da9dd8076f238211fed5c780b4b8bededf22) )
  1187: 	ROM_LOAD16_BYTE( "qt1_ma1u.bin", 0x480000, 0x100000, CRC(58910872) SHA1(c0acbd64e90672564c3839fd21870672aa32e439) )
  1188: 	ROM_LOAD16_BYTE( "qt1_ma2l.bin", 0x680001, 0x100000, CRC(94739917) SHA1(b5be5c9fd7223d3fb601f769cb80f56a5a586de0) )
  1189: 	ROM_LOAD16_BYTE( "qt1_ma2u.bin", 0x680000, 0x100000, CRC(6ba5b893) SHA1(071caed9cf261f1f8af7079875bd206177baef1a) )
  1190: 	ROM_LOAD16_BYTE( "qt1_ma3l.bin", 0x880001, 0x100000, CRC(aa9dc6ff) SHA1(c738f8c59bb5245874576c5bcf88c7138fa9a147) )
  1191: 	ROM_LOAD16_BYTE( "qt1_ma3u.bin", 0x880000, 0x100000, CRC(14a5a163) SHA1(1107f50e491bedeb4ab7ac3f32cfe47727274ba9) )
  1192: ROM_END
  1193: 
  1194: ROM_START( swcourt )
  1195: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1196: 	ROM_LOAD16_BYTE( "sc1-ep0l.bin", 0x080001, 0x080000, CRC(145111dd) SHA1(f8f74f77fb80af2ea37ea8ddbf02c1f3fcaf3fdb) ) /* 0xc00000 */
  1197: 	ROM_LOAD16_BYTE( "sc1-ep0u.bin", 0x080000, 0x080000, CRC(c721c138) SHA1(5d30d66629d982b54c3bb62118be940dc7b69a6b) )
  1198: 	ROM_LOAD16_BYTE( "sc1-ep1l.bin", 0x180001, 0x080000, CRC(fb45cf5f) SHA1(6ded351daa9b39d0b8149100caefc4fa0c598e79) )
  1199: 	ROM_LOAD16_BYTE( "sc1-ep1u.bin", 0x180000, 0x080000, CRC(1ce07b15) SHA1(b1b28cc480301c9ad642597c7cdd8e9cdec996a6) )
  1200: 
  1201: 	ROM_LOAD16_BYTE( "sc1-ma0l.bin", 0x280001, 0x100000, CRC(3e531f5e) SHA1(6da56630bdfbb19f1639c539779c180d106f6ee2) ) /* 0x400000 */
  1202: 	ROM_LOAD16_BYTE( "sc1-ma0u.bin", 0x280000, 0x100000, CRC(31e76a45) SHA1(5c278c167c1025c648ce2da2c3764645e96dcd55) )
  1203: 	ROM_LOAD16_BYTE( "sc1-ma1l.bin", 0x480001, 0x100000, CRC(8ba3a4ec) SHA1(f881e7b4728f388d18450ba85e13e233071fbc88) )
  1204: 	ROM_LOAD16_BYTE( "sc1-ma1u.bin", 0x480000, 0x100000, CRC(252dc4b7) SHA1(f1be6bd045495c7a0ecd97f01d1dc8ad341fecfd) )
  1205: ROM_END
  1206: 
  1207: ROM_START( tinklpit )
  1208: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1209: 	ROM_LOAD16_BYTE( "tk1-ep0l.bin", 0x080001, 0x080000, CRC(fdccae42) SHA1(398384482ccb3eb08bfb9db495513272a5188d92) ) /* 0xc00000 */
  1210: 	ROM_LOAD16_BYTE( "tk1-ep0u.bin", 0x080000, 0x080000, CRC(62cdb48c) SHA1(73c7b99b117b8dc567bc254b0ffcc117c9d42fb5) )
  1211: 	ROM_LOAD16_BYTE( "tk1-ep1l.bin", 0x180001, 0x080000, CRC(7e90f104) SHA1(79e371426b2e32dc8f687e4d124d23c251198937) )
  1212: 	ROM_LOAD16_BYTE( "tk1-ep1u.bin", 0x180000, 0x080000, CRC(9c0b70d6) SHA1(eac44d3470f4c2ddd9c41f82e6398bca0cc8a4fd) )
  1213: 
  1214: 	ROM_LOAD16_BYTE( "tk1-ma0l.bin", 0x280001, 0x100000, CRC(c6b4e15d) SHA1(55252ba4d904b14940436f1b4dc5e2a6bd163bdf) ) /* 0x400000 */
  1215: 	ROM_LOAD16_BYTE( "tk1-ma0u.bin", 0x280000, 0x100000, CRC(a3ad6f67) SHA1(54289eed5347defb5464ec5a610a6748909159f6) )
  1216: 	ROM_LOAD16_BYTE( "tk1-ma1l.bin", 0x480001, 0x100000, CRC(61cfb92a) SHA1(eacf0e7557f33d552045f43a116ff08c533a2771) )
  1217: 	ROM_LOAD16_BYTE( "tk1-ma1u.bin", 0x480000, 0x100000, CRC(54b77816) SHA1(9341d07858623e1920eaae7b2b90126c7057297e) )
  1218: 	ROM_LOAD16_BYTE( "tk1-ma2l.bin", 0x680001, 0x100000, CRC(087311d2) SHA1(6fe50f9e08551e57d15a15b01e3822a6cb7c8352) )
  1219: 	ROM_LOAD16_BYTE( "tk1-ma2u.bin", 0x680000, 0x100000, CRC(5ce20c2c) SHA1(7eaff21714bae44f8b21b6db98f055e04bfbae18) )
  1220: ROM_END
  1221: 
  1222: ROM_START( fghtatck )
  1223: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1224: 	ROM_LOAD16_BYTE( "fa2_ep0l.bin", 0x080001, 0x080000, CRC(8996db9c) SHA1(ebbe7d4cb2960a346cfbdf38c77638d71b6ba20e) ) /* 0xc00000 */
  1225: 	ROM_LOAD16_BYTE( "fa2_ep0u.bin", 0x080000, 0x080000, CRC(58d5e090) SHA1(950219d4e9bf440f92e3c8765f47e23a9019d2d1) )
  1226: 	ROM_LOAD16_BYTE( "fa1_ep1l.bin", 0x180001, 0x080000, CRC(b23a5b01) SHA1(4ba9bc2102fffc93a5ff73a107d557fc0f3beefd) )
  1227: 	ROM_LOAD16_BYTE( "fa1_ep1u.bin", 0x180000, 0x080000, CRC(de2eb129) SHA1(912993cab1c2edcaf986478f2ae22a2f10edf807) )
  1228: 
  1229: 	ROM_LOAD16_BYTE( "fa1_ma0l.bin", 0x280001, 0x100000, CRC(a0a95e54) SHA1(da35f8a6a5bc9e2b5b6cacf8eb0d900ef1073a67) ) /* 0x400000 */
  1230: 	ROM_LOAD16_BYTE( "fa1_ma0u.bin", 0x280000, 0x100000, CRC(1d0135bd) SHA1(2a7f8d09c213629a68376ce0379be61b37711d0a) )
  1231: 	ROM_LOAD16_BYTE( "fa1_ma1l.bin", 0x480001, 0x100000, CRC(c4adf0a2) SHA1(4cc7adc68b1db7e725a973b31d52720bd7dc1140) )
  1232: 	ROM_LOAD16_BYTE( "fa1_ma1u.bin", 0x480000, 0x100000, CRC(900297be) SHA1(57bb2078ff104c6f631c67219f80f8ede5ddbd09) )
  1233: ROM_END
  1234: 
  1235: ROM_START( fa )
  1236: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1237: 	ROM_LOAD16_BYTE( "fa1_ep0l.bin", 0x080001, 0x080000, CRC(182eee5c) SHA1(49769e3b72b59fc3e7b73364fe97168977dbe66b) ) /* 0xc00000 */
  1238: 	ROM_LOAD16_BYTE( "fa1_ep0u.bin", 0x080000, 0x080000, CRC(7ea7830e) SHA1(79390943eea0b8029b2b8869233caf27228e776a) )
  1239: 	ROM_LOAD16_BYTE( "fa1_ep1l.bin", 0x180001, 0x080000, CRC(b23a5b01) SHA1(4ba9bc2102fffc93a5ff73a107d557fc0f3beefd) )
  1240: 	ROM_LOAD16_BYTE( "fa1_ep1u.bin", 0x180000, 0x080000, CRC(de2eb129) SHA1(912993cab1c2edcaf986478f2ae22a2f10edf807) )
  1241: 
  1242: 	ROM_LOAD16_BYTE( "fa1_ma0l.bin", 0x280001, 0x100000, CRC(a0a95e54) SHA1(da35f8a6a5bc9e2b5b6cacf8eb0d900ef1073a67) ) /* 0x400000 */
  1243: 	ROM_LOAD16_BYTE( "fa1_ma0u.bin", 0x280000, 0x100000, CRC(1d0135bd) SHA1(2a7f8d09c213629a68376ce0379be61b37711d0a) )
  1244: 	ROM_LOAD16_BYTE( "fa1_ma1l.bin", 0x480001, 0x100000, CRC(c4adf0a2) SHA1(4cc7adc68b1db7e725a973b31d52720bd7dc1140) )
  1245: 	ROM_LOAD16_BYTE( "fa1_ma1u.bin", 0x480000, 0x100000, CRC(900297be) SHA1(57bb2078ff104c6f631c67219f80f8ede5ddbd09) )
  1246: ROM_END
  1247: 
  1248: ROM_START( xday2 )
  1249: 	ROM_REGION( 0xa80000, REGION_CPU1, 0 )
  1250: 	ROM_LOAD16_BYTE( "xds1mpr0.4b", 0x080001, 0x080000, CRC(83539aaa) ) /* 0xc00000 */
  1251: 	ROM_LOAD16_BYTE( "xds1mpr1.8b", 0x080000, 0x080000, CRC(468b36de) )
  1252: 
  1253: 	ROM_LOAD16_BYTE( "xds1dat0.4b", 0x280001, 0x200000, CRC(42cecc8b) ) /* 0x400000 */
  1254: 	ROM_LOAD16_BYTE( "xds1dat1.8b", 0x280000, 0x200000, CRC(d250b7e8) )
  1255: 	ROM_LOAD16_BYTE( "xds1dat2.4c", 0x680001, 0x200000, CRC(99d72a08) )
  1256: 	ROM_LOAD16_BYTE( "xds1dat3.8c", 0x680000, 0x200000, CRC(8980acc4) )
  1257: ROM_END
  1258: 
  1259: GAMEX( 1992,bkrtmaq,  0,        namcona1w, namcona1_quiz,	bkrtmaq,  ROT0, "Namco", "Bakuretsu Quiz Ma-Q Dai Bouken (Japan)", GAME_IMPERFECT_SOUND )
  1260: GAMEX( 1992,cgangpzl, 0,        namcona1w, namcona1_joy,	cgangpzl, ROT0, "Namco", "Cosmo Gang the Puzzle (US)", GAME_IMPERFECT_SOUND )
  1261: GAMEX( 1992,cgangpzj, cgangpzl, namcona1w, namcona1_joy,	cgangpzl, ROT0, "Namco", "Cosmo Gang the Puzzle (Japan)", GAME_IMPERFECT_SOUND )
  1262: GAMEX( 1992,exvania,  0,        namcona1,  namcona1_joy,	exbania,  ROT0, "Namco", "Exvania (Japan)", GAME_IMPERFECT_SOUND )
  1263: GAMEX( 1992,fghtatck, 0,        namcona1,  namcona1_joy,	fa,       ROT90,"Namco", "Fighter & Attacker (US)", GAME_IMPERFECT_SOUND )
  1264: GAMEX( 1992,fa,       fghtatck, namcona1,  namcona1_joy,	fa,       ROT90,"Namco", "F/A (Japan)", GAME_IMPERFECT_SOUND )
  1265: GAMEX( 1992,knckhead, 0,        namcona1,  namcona1_joy,	knckhead, ROT0, "Namco", "Knuckle Heads (World)", GAME_IMPERFECT_SOUND )
  1266: GAMEX( 1992,knckhedj, knckhead, namcona1,  namcona1_joy,	knckhead, ROT0, "Namco", "Knuckle Heads (Japan)", GAME_IMPERFECT_SOUND )
  1267: GAMEX( 1992,swcourt,  0,        namcona1w, namcona1_joy,	swcourt,  ROT0, "Namco", "Super World Court (Japan)", GAME_IMPERFECT_SOUND )
  1268: GAMEX( 1993,emeralda, 0,        namcona1w, namcona1_joy,	emeralda, ROT0, "Namco", "Emeraldia (Japan Version B)", GAME_IMPERFECT_SOUND )
  1269: GAMEX( 1993,emerldaa, emeralda, namcona1w, namcona1_joy,	emeralda, ROT0, "Namco", "Emeraldia (Japan)", GAME_IMPERFECT_SOUND )
  1270: GAMEX( 1993,numanath, 0,        namcona1,  namcona1_joy,	numanath, ROT0, "Namco", "Numan Athletics (World)", GAME_IMPERFECT_SOUND )
  1271: GAMEX( 1993,numanatj, numanath, namcona1,  namcona1_joy,	numanath, ROT0, "Namco", "Numan Athletics (Japan)", GAME_IMPERFECT_SOUND )
  1272: GAMEX( 1993,quiztou,  0,        namcona1,  namcona1_quiz,	quiztou,  ROT0, "Namco", "Nettou! Gekitou! Quiztou!! (Japan)", GAME_IMPERFECT_SOUND )
  1273: GAMEX( 1993,tinklpit, 0,        namcona1w, namcona1_joy,	tinklpit, ROT0, "Namco", "Tinkle Pit (Japan)", GAME_IMPERFECT_SOUND )
  1274: GAMEX( 1995,xday2,    0,        namcona1,  xday2,           xday2,    ROT0, "Namco", "X-Day 2 (Japan)", GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
  1275: 




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