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 : Great 1000 Mile Rally : VM Driver Source

Source Listing


     1: /***************************************************************************
     2: 
     3: 							-= Kaneko 16 Bit Games =-
     4: 
     5: 					driver by	Luca Elia (l.elia@tin.it)
     6: 
     7: 
     8: CPU    :  68000  +  MCU [Optional]
     9: 
    10: SOUND  :  OKI-M6295 x (1 | 2) + YM2149 x (0 | 2)
    11:    OR  :  Z80  +  YM2151
    12: 
    13: OTHER  :  93C46 EEPROM [Optional]
    14: 
    15: CUSTOM :  VU-001 046A                  (48pin PQFP)
    16:           VU-002 052 151021            (160pin PQFP)	<- Sprites
    17:           VU-003 										<- High Colour Background
    18:           VIEW2-CHIP 23160-509 9047EAI (144pin PQFP)	<- Tilemaps
    19:           MUX2-CHIP                    (64pin PQFP)
    20:           HELP1-CHIP
    21:           IU-001 9045KP002             (44pin PQFP)
    22:           I/O JAMMA MC-8282 047        (46pin)			<- Inputs
    23: 
    24: 
    25: ---------------------------------------------------------------------------
    26: Year + Game					PCB			Notes
    27: ---------------------------------------------------------------------------
    28: 91	The Berlin Wall
    29: 	Magical Crystals		Z00FC-02
    30: 92	Bakuretsu Breaker					Incomplete dump (gfx+sfx missing)
    31: 	Blaze On							2 Sprites Chips !?
    32: 	Sand Scorpion (by Face)				MCU protection (collision detection etc.)
    33: 	Shogun Warriors						MCU protection (68k code snippets, NOT WORKING)
    34:     B.Rap Boys                          MCU protection (not working, game can be
    35:                                                         run on a shoggwar board ok)
    36: 94	Great 1000 Miles Rally				MCU protection (EEPROM handling etc.)
    37: 95	Great 1000 Miles Rally 2			MCU protection (EEPROM handling etc.)
    38: ---------------------------------------------------------------------------
    39: 
    40: Note: gtmr manual shows "Compatible with AX Kaneko System Board"
    41: 
    42: To Do:
    43: 
    44: [gtmr]
    45: 
    46: - Stage 4: The layers' scrolling is very jerky for a couple of seconds
    47:   in the middle of this level (probably interrupt related)
    48: 
    49: - The layers' colours are not initialised when showing the self test
    50:   screen and the very first screen (with the Kaneko logo in the middle).
    51:   They're probably supposed to be disabled in those occasions, but the
    52:   relevant registers aren't changed throughout the game (?)
    53: 
    54: [gtmr2]
    55: 
    56: - Finish the Inputs (different wheels and pedals)
    57: 
    58: - Find infos about the communication stuff (even if it won't be supported)
    59: 
    60: ***************************************************************************/
    61: 
    62: #include "driver.h" 
    63: #include "vidhrdw/generic.h" 
    64: #include "machine/eeprom.h" 
    65: #include "machine/random.h" 
    66: #include "kaneko16.h" 
    67: 
    68: /* Variables only used here: */
    69: 
    70: static int shogwarr_mcu_status, shogwarr_mcu_command_offset;
    71: static data16_t *mcu_ram, gtmr_mcu_com[4];
    72: 
    73: 
    74: /***************************************************************************
    75: 
    76: 
    77: 							Machine Initialisation
    78: 
    79: 
    80: ***************************************************************************/
    81: 
    82: MACHINE_INIT( kaneko16 )
    83: {
    84: 	kaneko16_sprite_type  = 0;
    85: 
    86: 	kaneko16_sprite_xoffs = 0;
    87: 	kaneko16_sprite_yoffs = 0;
    88: 
    89: /*
    90: 	Sx = Sprites with priority x, x = tiles with priority x,
    91: 	Sprites - Tiles Order (bottom -> top):
    92: 
    93: 	0	S0	1	2	3
    94: 	0	1	S1	2	3
    95: 	0	1	2	S2	3
    96: 	0	1	2	3	S3
    97: */
    98: 	kaneko16_priority.tile[0] = 0;
    99: 	kaneko16_priority.tile[1] = 1;
   100: 	kaneko16_priority.tile[2] = 2;
   101: 	kaneko16_priority.tile[3] = 3;
   102: 
   103: 	kaneko16_priority.sprite[0] = 0xfffc;	// above tile[0],   below the others
   104: 	kaneko16_priority.sprite[1] = 0xfff0;	// above tile[0-1], below the others
   105: 	kaneko16_priority.sprite[2] = 0xff00;	// above tile[0-2], below the others
   106: 	kaneko16_priority.sprite[3] = 0x0000;	// above all
   107: }
   108: 
   109: static MACHINE_INIT( berlwall )
   110: {
   111: 	machine_init_kaneko16();
   112: 
   113: 	kaneko16_sprite_type = 2;	// like type 0, but using 16 instead of 8 bytes
   114: }
   115: 
   116: static MACHINE_INIT( blazeon )
   117: {
   118: 	machine_init_kaneko16();
   119: 
   120: 	kaneko16_sprite_xoffs = 0x10000 - 0x680;
   121: 	kaneko16_sprite_yoffs = 0x000;
   122: 
   123: /*
   124: 	Sx = Sprites with priority x, x = tiles with priority x,
   125: 	Sprites - Tiles Order (bottom -> top):
   126: 
   127: 	0	S0	1	2	3
   128: 	0	1	S1	2	3
   129: 	0	1	2	3	S2
   130: 	0	1	2	3	S3
   131: */
   132: 	kaneko16_priority.sprite[0] = 0xfffc;	// above tile[0], below the others
   133: 	kaneko16_priority.sprite[1] = 0xfff0;	// above tile[0-1], below the others
   134: 	kaneko16_priority.sprite[2] = 0x0000;	// above all
   135: 	kaneko16_priority.sprite[3] = 0x0000;	// ""
   136: }
   137: 
   138: static MACHINE_INIT( bloodwar )
   139: {
   140: 	/* Priorities unknown */
   141: 	kaneko16_priority.tile[0] = 0;
   142: 	kaneko16_priority.tile[1] = 1;
   143: 	kaneko16_priority.tile[2] = 2;
   144: 	kaneko16_priority.tile[3] = 3;
   145: 
   146: 	kaneko16_priority.sprite[0] = 0x0000;	// above all
   147: 	kaneko16_priority.sprite[1] = 0x0000;	// above all
   148: 	kaneko16_priority.sprite[2] = 0x0000;	// above all
   149: 	kaneko16_priority.sprite[3] = 0x0000;	// above all
   150: 
   151: 	kaneko16_sprite_type = 1;
   152: 
   153: 	memset(gtmr_mcu_com, 0, 4 * sizeof( data16_t) );
   154: }
   155: 
   156: static MACHINE_INIT( gtmr )
   157: {
   158: 	machine_init_kaneko16();
   159: 
   160: 	kaneko16_sprite_type = 1;
   161: 
   162: 	memset(gtmr_mcu_com, 0, 4 * sizeof( data16_t) );
   163: }
   164: 
   165: static MACHINE_INIT( mgcrystl )
   166: {
   167: 	machine_init_kaneko16();
   168: /*
   169: 	Sx = Sprites with priority x, x = tiles with priority x,
   170: 	Sprites - Tiles Order:
   171: 
   172: 	S0:	below 0 2
   173: 
   174: 	S1:	over  2
   175: 		below 0
   176: 
   177: 	S2:	over 0 2
   178: 
   179: 	S3:	over all
   180: 
   181: 	tiles of the 2nd VIEW2 chip always behind sprites?
   182: 
   183: */
   184: 	kaneko16_priority.tile[0] = 2;	// priorty mask = 1
   185: 	kaneko16_priority.tile[1] = 0;	// priorty mask = 2
   186: 	kaneko16_priority.tile[2] = 3;	// priorty mask = 4
   187: 	kaneko16_priority.tile[3] = 1;	// priorty mask = 8
   188: 
   189: 	kaneko16_priority.sprite[0] = 0xfffe;	// below all
   190: 	kaneko16_priority.sprite[1] = 0xfffc;	// above tile[0], below the others
   191: 	kaneko16_priority.sprite[2] = 0x0000;	// above all
   192: 	kaneko16_priority.sprite[3] = 0x0000;	// ""
   193: }
   194: 
   195: static MACHINE_INIT( sandscrp )
   196: {
   197: 	machine_init_kaneko16();
   198: 
   199: 	kaneko16_sprite_type = 3;	// "different" sprites layout
   200: 
   201: 	watchdog_reset16_r(0,0);	// start with an armed watchdog
   202: }
   203: 
   204: static MACHINE_INIT( shogwarr )
   205: {
   206: 	machine_init_kaneko16();
   207: 
   208: 	shogwarr_mcu_status = 0;
   209: 	shogwarr_mcu_command_offset = 0;
   210: }
   211: 
   212: 
   213: /***************************************************************************
   214: 
   215: 
   216: 							MCU Code Simulation
   217: 
   218: 
   219: ***************************************************************************/
   220: 
   221: /***************************************************************************
   222: 								Blood Warrior
   223: ***************************************************************************/
   224: 
   225: void bloodwar_mcu_run(void)
   226: {
   227: 	data16_t mcu_command	=	mcu_ram[0x0010/2];
   228: 	data16_t mcu_offset		=	mcu_ram[0x0012/2] / 2;
   229: 	data16_t mcu_data		=	mcu_ram[0x0014/2];
   230: 
   231: 	logerror("CPU #0 PC %06X : MCU executed command: %04X %04X %04X\n",activecpu_get_pc(),mcu_command,mcu_offset*2,mcu_data);
   232: 
   233: 	switch (mcu_command >> 8)
   234: 	{
   235: #if 0 
   236: 		case 0x02:	// TEST
   237: 		{
   238: 			/* MCU writes the string " ATOP 1993.12 " to shared ram */
   239: 			mcu_ram[mcu_offset + 0x70/2 + 0] = 0x2041;
   240: 			mcu_ram[mcu_offset + 0x70/2 + 1] = 0x544F;
   241: 			mcu_ram[mcu_offset + 0x70/2 + 2] = 0x5020;
   242: 			mcu_ram[mcu_offset + 0x70/2 + 3] = 0x3139;
   243: 			mcu_ram[mcu_offset + 0x70/2 + 4] = 0x3933;
   244: 			mcu_ram[mcu_offset + 0x70/2 + 5] = 0x2E31;
   245: 			mcu_ram[mcu_offset + 0x70/2 + 6] = 0x3220;
   246: 			mcu_ram[mcu_offset + 0x70/2 + 7] = 0xff00;
   247: 
   248: 			mcu_ram[mcu_offset + 0x10/2 + 0] = 0x0000;
   249: 			mcu_ram[mcu_offset + 0x12/2 + 0] = 0x0000;
   250: 		}
   251: 		break;
   252: #endif 
   253: 
   254: 		case 0x02:	// Read from NVRAM
   255: 		{
   256: 			mame_file *f;
   257: 			if ((f = mame_fopen(Machine->gamedrv->name,0,FILETYPE_NVRAM,0)) != 0)
   258: 			{
   259: 				mame_fread(f,&mcu_ram[mcu_offset], 128);
   260: 				mame_fclose(f);
   261: 			}
   262: 			else
   263: 				memcpy(&mcu_ram[mcu_offset],memory_region(REGION_USER1),128);
   264: 		}
   265: 		break;
   266: 
   267: 		case 0x42:	// Write to NVRAM
   268: 		{
   269: 			mame_file *f;
   270: 			if ((f = mame_fopen(Machine->gamedrv->name,0,FILETYPE_NVRAM,1)) != 0)
   271: 			{
   272: 				mame_fwrite(f,&mcu_ram[mcu_offset], 128);
   273: 				mame_fclose(f);
   274: 			}
   275: 		}
   276: 		break;
   277: 
   278: 		case 0x03:	// DSW
   279: 		{
   280: 			mcu_ram[mcu_offset] = readinputport(4);
   281: 		}
   282: 		break;
   283: 
   284: 		case 0x04:	// Protection
   285: 		{
   286: 			switch(mcu_data)
   287: 			{
   288: 				// unknown data
   289: 				case 0x01:
   290: 				case 0x02:
   291: 				case 0x03:
   292: 				case 0x04:
   293: 				case 0x05:
   294: 				case 0x06:
   295: 				case 0x07:
   296: 				case 0x08:
   297: 				case 0x09:
   298: 				break;
   299: 
   300: 				// palette data
   301: 				case 0x0a:
   302: 				case 0x0b:
   303: 				case 0x0c:
   304: 				case 0x0d:
   305: 				case 0x0e:
   306: 				case 0x0f:
   307: 				case 0x10:
   308: 				case 0x11:
   309: 				case 0x12:
   310: 				case 0x13:
   311: 				case 0x14:
   312: 				case 0x15:
   313: 				case 0x16:
   314: 				case 0x17:
   315: 				case 0x18:
   316: 				case 0x19:
   317: 				{
   318: 					mcu_ram[mcu_offset + 0] = 0x0001;	// number of palettes (>=1)
   319: 					// palette data follows (each palette is 0x200 byes long)
   320: 					mcu_ram[mcu_offset + 1] = 0x8000;	// a negative word will end the palette
   321: 				}
   322: 				break;
   323: 
   324: 				// tilemap data
   325: 				case 0x1c:
   326: 				case 0x1d:
   327: 				case 0x1e:
   328: 				case 0x1f:
   329: 				case 0x20:
   330: 				case 0x21:
   331: 				case 0x22:
   332: 				case 0x23:
   333: 				case 0x24:
   334: 				{
   335: 					// tile data (ff means no tiles) followed by routine index
   336: 					mcu_ram[mcu_offset + 0] = 0xff00;
   337: 				}
   338: 				break;
   339: 
   340: 				// unknown long
   341: 				case 0x25:
   342: 				case 0x26:
   343: 				case 0x27:
   344: 				case 0x28:
   345: 				case 0x29:
   346: 				case 0x2a:
   347: 				case 0x2b:
   348: 				case 0x2c:
   349: 				case 0x2d:
   350: 				{
   351: 					mcu_ram[mcu_offset + 0] = 0x0000;
   352: 					mcu_ram[mcu_offset + 1] = 0x0000;
   353: 				}
   354: 				break;
   355: 
   356: 				default:
   357: 					logerror("UNKNOWN PARAMETER %02X TO COMMAND 4\n",mcu_data);
   358: 			}
   359: 		}
   360: 		break;
   361: 
   362: 		default:
   363: 			logerror("UNKNOWN COMMAND\n");
   364: 		break;
   365: 	}
   366: }
   367: 
   368: #define BLOODWAR_MCU_COM_W(_n_) \ 
   369: WRITE16_HANDLER( bloodwar_mcu_com##_n_##_w ) \
   370: { \
   371: 	COMBINE_DATA(&gtmr_mcu_com[_n_]); \
   372: 	if (gtmr_mcu_com[0] != 0xFFFF)	return; \
   373: 	if (gtmr_mcu_com[1] != 0xFFFF)	return; \
   374: 	if (gtmr_mcu_com[2] != 0xFFFF)	return; \
   375: 	if (gtmr_mcu_com[3] != 0xFFFF)	return; \
   376: \
   377: 	memset(gtmr_mcu_com, 0, 4 * sizeof( data16_t ) ); \
   378: 	bloodwar_mcu_run(); \
   379: }
   380: 
   381: BLOODWAR_MCU_COM_W(0)
   382: BLOODWAR_MCU_COM_W(1)
   383: BLOODWAR_MCU_COM_W(2)
   384: BLOODWAR_MCU_COM_W(3)
   385: 
   386: /***************************************************************************
   387: 							Great 1000 Miles Rally
   388: ***************************************************************************/
   389: 
   390: const struct GameDriver driver_gtmr;
   391: const struct GameDriver driver_gtmre;
   392: const struct GameDriver driver_gtmrusa;
   393: const struct GameDriver driver_gtmr2;
   394: 
   395: /*
   396: 
   397: 	MCU Tasks:
   398: 
   399: 	- Write and ID string to shared RAM.
   400: 	- Access the EEPROM
   401: 	- Read the DSWs
   402: 
   403: */
   404: 
   405: void gtmr_mcu_run(void)
   406: {
   407: 	data16_t mcu_command	=	mcu_ram[0x0010/2];
   408: 	data16_t mcu_offset		=	mcu_ram[0x0012/2] / 2;
   409: 	data16_t mcu_data		=	mcu_ram[0x0014/2];
   410: 
   411: 	logerror("CPU #0 PC %06X : MCU executed command: %04X %04X %04X\n",activecpu_get_pc(),mcu_command,mcu_offset*2,mcu_data);
   412: 
   413: 	switch (mcu_command >> 8)
   414: 	{
   415: 
   416: 		case 0x02:	// Read from NVRAM
   417: 		{
   418: 			mame_file *f;
   419: 			if ((f = mame_fopen(Machine->gamedrv->name,0,FILETYPE_NVRAM,0)) != 0)
   420: 			{
   421: 				mame_fread(f,&mcu_ram[mcu_offset], 128);
   422: 				mame_fclose(f);
   423: 			}
   424: 		}
   425: 		break;
   426: 
   427: 		case 0x42:	// Write to NVRAM
   428: 		{
   429: 			mame_file *f;
   430: 			if ((f = mame_fopen(Machine->gamedrv->name,0,FILETYPE_NVRAM,1)) != 0)
   431: 			{
   432: 				mame_fwrite(f,&mcu_ram[mcu_offset], 128);
   433: 				mame_fclose(f);
   434: 			}
   435: 		}
   436: 		break;
   437: 
   438: 		case 0x03:	// DSW
   439: 		{
   440: 			mcu_ram[mcu_offset] = readinputport(4);
   441: 		}
   442: 		break;
   443: 
   444: 		case 0x04:	// TEST (2 versions)
   445: 		{
   446: 			if (Machine->gamedrv == &driver_gtmr)
   447: 			{
   448: 				/* MCU writes the string "MM0525-TOYBOX199" to shared ram */
   449: 				mcu_ram[mcu_offset+0] = 0x4d4d;
   450: 				mcu_ram[mcu_offset+1] = 0x3035;
   451: 				mcu_ram[mcu_offset+2] = 0x3235;
   452: 				mcu_ram[mcu_offset+3] = 0x2d54;
   453: 				mcu_ram[mcu_offset+4] = 0x4f59;
   454: 				mcu_ram[mcu_offset+5] = 0x424f;
   455: 				mcu_ram[mcu_offset+6] = 0x5831;
   456: 				mcu_ram[mcu_offset+7] = 0x3939;
   457: 			}
   458: 			else if ( (Machine->gamedrv == &driver_gtmre)  ||
   459: 					  (Machine->gamedrv == &driver_gtmrusa) ||
   460: 					  (Machine->gamedrv == &driver_gtmr2) )
   461: 			{
   462: 				/* MCU writes the string "USMM0713-TB1994 " to shared ram */
   463: 				mcu_ram[mcu_offset+0] = 0x5553;
   464: 				mcu_ram[mcu_offset+1] = 0x4d4d;
   465: 				mcu_ram[mcu_offset+2] = 0x3037;
   466: 				mcu_ram[mcu_offset+3] = 0x3133;
   467: 				mcu_ram[mcu_offset+4] = 0x2d54;
   468: 				mcu_ram[mcu_offset+5] = 0x4231;
   469: 				mcu_ram[mcu_offset+6] = 0x3939;
   470: 				mcu_ram[mcu_offset+7] = 0x3420;
   471: 			}
   472: 		}
   473: 		break;
   474: 	}
   475: 
   476: }
   477: 
   478: 
   479: #define GTMR_MCU_COM_W(_n_) \ 
   480: WRITE16_HANDLER( gtmr_mcu_com##_n_##_w ) \
   481: { \
   482: 	COMBINE_DATA(&gtmr_mcu_com[_n_]); \
   483: 	if (gtmr_mcu_com[0] != 0xFFFF)	return; \
   484: 	if (gtmr_mcu_com[1] != 0xFFFF)	return; \
   485: 	if (gtmr_mcu_com[2] != 0xFFFF)	return; \
   486: 	if (gtmr_mcu_com[3] != 0xFFFF)	return; \
   487: \
   488: 	memset(gtmr_mcu_com, 0, 4 * sizeof( data16_t ) ); \
   489: 	gtmr_mcu_run(); \
   490: }
   491: 
   492: GTMR_MCU_COM_W(0)
   493: GTMR_MCU_COM_W(1)
   494: GTMR_MCU_COM_W(2)
   495: GTMR_MCU_COM_W(3)
   496: 
   497: 
   498: /***************************************************************************
   499: 								Sand Scorpion
   500: ***************************************************************************/
   501: 
   502: /*
   503: 
   504: 	MCU Tasks:
   505: 
   506: 	- Collision detection (test if 2 rectangles overlap)
   507: 	- Multiply 2 words, obtaining a long word
   508: 	- Return a random value?
   509: 
   510: */
   511: 
   512: static READ16_HANDLER( sandscrp_mcu_ram_r )
   513: {
   514: 	switch( offset )
   515: 	{
   516: 		case 0x04/2:	// Bit 0: collision detection
   517: 		{
   518: 			/* First rectangle */
   519: 			int x_10		=	mcu_ram[0x00/2];
   520: 			int x_11		=	mcu_ram[0x02/2] + x_10;
   521: 			int y_10		=	mcu_ram[0x04/2];
   522: 			int y_11		=	mcu_ram[0x06/2] + y_10;
   523: 
   524: 			/* Second rectangle */
   525: 			int x_20		=	mcu_ram[0x08/2];
   526: 			int x_21		=	mcu_ram[0x0a/2] + x_20;
   527: 			int y_20		=	mcu_ram[0x0c/2];
   528: 			int y_21		=	mcu_ram[0x0e/2] + y_20;
   529: 
   530: 			/* Sign extend the words */
   531: 			x_10 = (x_10 & 0x7fff) - (x_10 & 0x8000);
   532: 			x_11 = (x_11 & 0x7fff) - (x_11 & 0x8000);
   533: 			y_10 = (y_10 & 0x7fff) - (y_10 & 0x8000);
   534: 			y_11 = (y_11 & 0x7fff) - (y_11 & 0x8000);
   535: 			x_20 = (x_20 & 0x7fff) - (x_20 & 0x8000);
   536: 			x_21 = (x_21 & 0x7fff) - (x_21 & 0x8000);
   537: 			y_20 = (y_20 & 0x7fff) - (y_20 & 0x8000);
   538: 			y_21 = (y_21 & 0x7fff) - (y_21 & 0x8000);
   539: 
   540: 			/* Check if they overlap */
   541: 			if	(	( x_10 > x_21 ) || ( x_11 < x_20 ) ||
   542: 					( y_10 > y_21 ) || ( y_11 < y_20 )	)
   543: 				return 0;
   544: 			else
   545: 				return 1;
   546: 		}
   547: 		break;
   548: 
   549: 		case 0x10/2:	// Multiply 2 words, obtain a long word.
   550: 		case 0x12/2:
   551: 		{
   552: 			int res = mcu_ram[0x10/2] * mcu_ram[0x12/2];
   553: 			if (offset == 0x10/2)	return (res >> 16) & 0xffff;
   554: 			else					return (res >>  0) & 0xffff;
   555: 		}
   556: 		break;
   557: 
   558: 		case 0x14/2:	// Random?
   559: 			return (mame_rand() & 0xffff);
   560: 	}
   561: 
   562: 	logerror("CPU #0 PC %06X : Unknown MCU word %04X read\n",activecpu_get_pc(),offset*2);
   563: 	return mcu_ram[offset];
   564: }
   565: 
   566: static WRITE16_HANDLER( sandscrp_mcu_ram_w )
   567: {
   568: 	COMBINE_DATA(&mcu_ram[offset]);
   569: }
   570: 
   571: 
   572: /***************************************************************************
   573: 								Shogun Warriors
   574: ***************************************************************************/
   575: 
   576: /* Preliminary simulation: the game doesn't work */
   577: 
   578: /*
   579: 
   580: 	MCU Tasks:
   581: 
   582: 	- Read the DSWs
   583: 	- Supply code snippets to the 68000
   584: 
   585: */
   586: 
   587: void shogwarr_mcu_run(void)
   588: {
   589: 	data16_t mcu_command;
   590: 
   591: 	if ( shogwarr_mcu_status != (1|2|4|8) )	return;
   592: 
   593: 	mcu_command = mcu_ram[shogwarr_mcu_command_offset + 0];
   594: 
   595: 	if (mcu_command == 0) return;
   596: 
   597: 	logerror("CPU #0 PC %06X : MCU executed command at %04X: %04X\n",
   598: 	 	activecpu_get_pc(),shogwarr_mcu_command_offset*2,mcu_command);
   599: 
   600: 	switch (mcu_command)
   601: 	{
   602: 
   603: 		case 0x00ff:
   604: 		{
   605: 			int param1 = mcu_ram[shogwarr_mcu_command_offset + 1];
   606: 			int param2 = mcu_ram[shogwarr_mcu_command_offset + 2];
   607: 			int param3 = mcu_ram[shogwarr_mcu_command_offset + 3];
   608: //			int param4 = mcu_ram[shogwarr_mcu_command_offset + 4];
   609: 			int param5 = mcu_ram[shogwarr_mcu_command_offset + 5];
   610: //			int param6 = mcu_ram[shogwarr_mcu_command_offset + 6];
   611: //			int param7 = mcu_ram[shogwarr_mcu_command_offset + 7];
   612: 
   613: 			// clear old command (handshake to main cpu)
   614: 			mcu_ram[shogwarr_mcu_command_offset] = 0x0000;
   615: 
   616: 			// execute the command:
   617: 
   618: 			mcu_ram[param1 / 2] = ~readinputport(4);	// DSW
   619: 			mcu_ram[param2 / 2] = 0xffff;				// ? -1 / anything else
   620: 
   621: 			shogwarr_mcu_command_offset = param3 / 2;	// where next command will be written?
   622: 			// param 4?
   623: 			mcu_ram[param5 / 2] = 0x8ee4;				// MCU Rom Checksum!
   624: 			// param 6&7 = address.l
   625: /*
   626: 
   627: First code snippet provided by the MCU:
   628: 
   629: 207FE0: 48E7 FFFE                movem.l D0-D7/A0-A6, -(A7)
   630: 
   631: 207FE4: 3039 00A8 0000           move.w  $a80000.l, D0
   632: 207FEA: 4279 0020 FFFE           clr.w   $20fffe.l
   633: 
   634: 207FF0: 41F9 0020 0000           lea     $200000.l, A0
   635: 207FF6: 7000                     moveq   #$0, D0
   636: 
   637: 207FF8: 43E8 01C6                lea     ($1c6,A0), A1
   638: 207FFC: 7E02                     moveq   #$2, D7
   639: 207FFE: D059                     add.w   (A1)+, D0
   640: 208000: 51CF FFFC                dbra    D7, 207ffe
   641: 
   642: 208004: 43E9 0002                lea     ($2,A1), A1
   643: 208008: 7E04                     moveq   #$4, D7
   644: 20800A: D059                     add.w   (A1)+, D0
   645: 20800C: 51CF FFFC                dbra    D7, 20800a
   646: 
   647: 208010: 4640                     not.w   D0
   648: 208012: 5340                     subq.w  #1, D0
   649: 208014: 0068 0030 0216           ori.w   #$30, ($216,A0)
   650: 
   651: 20801A: B07A 009A                cmp.w   ($9a,PC), D0; ($2080b6)
   652: 20801E: 670A                     beq     20802a
   653: 
   654: 208020: 0268 000F 0216           andi.w  #$f, ($216,A0)
   655: 208026: 4268 0218                clr.w   ($218,A0)
   656: 
   657: 20802A: 5468 0216                addq.w  #2, ($216,A0)
   658: 20802E: 42A8 030C                clr.l   ($30c,A0)
   659: 208032: 117C 0020 030C           move.b  #$20, ($30c,A0)
   660: 
   661: 208038: 3E3C 0001                move.w  #$1, D7
   662: 
   663: 20803C: 0C68 0008 0218           cmpi.w  #$8, ($218,A0)
   664: 208042: 6C00 0068                bge     2080ac
   665: 
   666: 208046: 117C 0080 0310           move.b  #$80, ($310,A0)
   667: 20804C: 117C 0008 0311           move.b  #$8, ($311,A0)
   668: 208052: 317C 7800 0312           move.w  #$7800, ($312,A0)
   669: 208058: 5247                     addq.w  #1, D7
   670: 20805A: 0C68 0040 0216           cmpi.w  #$40, ($216,A0)
   671: 208060: 6D08                     blt     20806a
   672: 
   673: 208062: 5468 0218                addq.w  #2, ($218,A0)
   674: 208066: 6000 0044                bra     2080ac
   675: 
   676: 20806A: 117C 0041 0314           move.b  #$41, ($314,A0)
   677: 
   678: 208070: 0C39 0001 0010 2E12      cmpi.b  #$1, $102e12.l
   679: 208078: 6606                     bne     208080
   680: 
   681: 20807A: 117C 0040 0314           move.b  #$40, ($314,A0)
   682: 
   683: 208080: 117C 000C 0315           move.b  #$c, ($315,A0)
   684: 208086: 317C 7000 0316           move.w  #$7000, ($316,A0)
   685: 20808C: 5247                     addq.w  #1, D7
   686: 
   687: 20808E: 0839 0001 0010 2E15      btst    #$1, $102e15.l	; service mode
   688: 208096: 6714                     beq     2080ac
   689: 
   690: 208098: 117C 0058 0318           move.b  #$58, ($318,A0)
   691: 20809E: 117C 0006 0319           move.b  #$6, ($319,A0)
   692: 2080A4: 317C 6800 031A           move.w  #$6800, ($31a,A0)
   693: 2080AA: 5247                     addq.w  #1, D7
   694: 
   695: 2080AC: 3147 030A                move.w  D7, ($30a,A0)
   696: 2080B0: 4CDF 7FFF                movem.l (A7)+, D0-D7/A0-A6
   697: 2080B4: 4E73                     rte
   698: 
   699: 2080B6: C747
   700: */
   701: 		}
   702: 		break;
   703: 
   704: 
   705: 		case 0x0001:
   706: 		{
   707: //			int param1 = mcu_ram[shogwarr_mcu_command_offset + 1];
   708: 			int param2 = mcu_ram[shogwarr_mcu_command_offset + 2];
   709: 
   710: 			// clear old command (handshake to main cpu)
   711: 			mcu_ram[shogwarr_mcu_command_offset] = 0x0000;
   712: 
   713: 			// execute the command:
   714: 
   715: 			// param1 ?
   716: 			mcu_ram[param2/2 + 0] = 0x0000;		// ?
   717: 			mcu_ram[param2/2 + 1] = 0x0000;		// ?
   718: 			mcu_ram[param2/2 + 2] = 0x0000;		// ?
   719: 			mcu_ram[param2/2 + 3] = 0x0000;		// ? addr.l
   720: 			mcu_ram[param2/2 + 4] = 0x00e0;		// 0000e0: 4e73 rte
   721: 
   722: 		}
   723: 		break;
   724: 
   725: 
   726: 		case 0x0002:
   727: 		{
   728: //			int param1 = mcu_ram[shogwarr_mcu_command_offset + 1];
   729: //			int param2 = mcu_ram[shogwarr_mcu_command_offset + 2];
   730: //			int param3 = mcu_ram[shogwarr_mcu_command_offset + 3];
   731: //			int param4 = mcu_ram[shogwarr_mcu_command_offset + 4];
   732: //			int param5 = mcu_ram[shogwarr_mcu_command_offset + 5];
   733: //			int param6 = mcu_ram[shogwarr_mcu_command_offset + 6];
   734: //			int param7 = mcu_ram[shogwarr_mcu_command_offset + 7];
   735: 
   736: 			// clear old command (handshake to main cpu)
   737: 			mcu_ram[shogwarr_mcu_command_offset] = 0x0000;
   738: 
   739: 			// execute the command:
   740: 
   741: 		}
   742: 		break;
   743: 
   744: 	}
   745: 
   746: }
   747: 
   748: 
   749: 
   750: WRITE16_HANDLER( shogwarr_mcu_ram_w )
   751: {
   752: 	COMBINE_DATA(&mcu_ram[offset]);
   753: 	shogwarr_mcu_run();
   754: }
   755: 
   756: 
   757: 
   758: #define SHOGWARR_MCU_COM_W(_n_) \ 
   759: WRITE16_HANDLER( shogwarr_mcu_com##_n_##_w ) \
   760: { \
   761: 	shogwarr_mcu_status |= (1 << _n_); \
   762: 	shogwarr_mcu_run(); \
   763: }
   764: 
   765: SHOGWARR_MCU_COM_W(0)
   766: SHOGWARR_MCU_COM_W(1)
   767: SHOGWARR_MCU_COM_W(2)
   768: SHOGWARR_MCU_COM_W(3)
   769: 
   770: 
   771: /***************************************************************************
   772: 
   773: 
   774: 						Misc Machine Emulation Routines
   775: 
   776: 
   777: ***************************************************************************/
   778: 
   779: READ16_HANDLER( kaneko16_rnd_r )
   780: {
   781: 	return mame_rand() & 0xffff;
   782: }
   783: 
   784: WRITE16_HANDLER( kaneko16_coin_lockout_w )
   785: {
   786: 	if (ACCESSING_MSB)
   787: 	{
   788: 		coin_counter_w(0,   data  & 0x0100);
   789: 		coin_counter_w(1,   data  & 0x0200);
   790: 		coin_lockout_w(0, (~data) & 0x0400 );
   791: 		coin_lockout_w(1, (~data) & 0x0800 );
   792: 	}
   793: }
   794: 
   795: /* Sand Scorpion */
   796: 
   797: static UINT8 sprite_irq;
   798: static UINT8 unknown_irq;
   799: static UINT8 vblank_irq;
   800: 
   801: 
   802: /* Update the IRQ state based on all possible causes */
   803: static void update_irq_state(void)
   804: {
   805: 	if (vblank_irq || sprite_irq || unknown_irq)
   806: 		cpu_set_irq_line(0, 1, ASSERT_LINE);
   807: 	else
   808: 		cpu_set_irq_line(0, 1, CLEAR_LINE);
   809: }
   810: 
   811: 
   812: /* Called once/frame to generate the VBLANK interrupt */
   813: static INTERRUPT_GEN( sandscrp_interrupt )
   814: {
   815: 	vblank_irq = 1;
   816: 	update_irq_state();
   817: }
   818: 
   819: 
   820: static VIDEO_EOF( sandscrp )
   821: {
   822: 	sprite_irq = 1;
   823: 	update_irq_state();
   824: }
   825: 
   826: /* Reads the cause of the interrupt */
   827: static READ16_HANDLER( sandscrp_irq_cause_r )
   828: {
   829: 	return 	( sprite_irq  ?  0x08  : 0 ) |
   830: 			( unknown_irq ?  0x10  : 0 ) |
   831: 			( vblank_irq  ?  0x20  : 0 ) ;
   832: }
   833: 
   834: 
   835: /* Clear the cause of the interrupt */
   836: static WRITE16_HANDLER( sandscrp_irq_cause_w )
   837: {
   838: 	if (ACCESSING_LSB)
   839: 	{
   840: 		kaneko16_sprite_flipx	=	data & 1;
   841: 		kaneko16_sprite_flipy	=	data & 1;
   842: 
   843: 		if (data & 0x08)	sprite_irq  = 0;
   844: 		if (data & 0x10)	unknown_irq = 0;
   845: 		if (data & 0x20)	vblank_irq  = 0;
   846: 	}
   847: 
   848: 	update_irq_state();
   849: }
   850: 
   851: 
   852: /***************************************************************************
   853: 
   854: 
   855: 									Sound
   856: 
   857: 
   858: ***************************************************************************/
   859: 
   860: WRITE16_HANDLER( kaneko16_soundlatch_w )
   861: {
   862: 	if (ACCESSING_MSB)
   863: 	{
   864: 		soundlatch_w(0, (data & 0xff00) >> 8 );
   865: 		cpu_set_nmi_line(1,PULSE_LINE);
   866: 	}
   867: }
   868: 
   869: /* Two identically mapped YM2149 chips */
   870: 
   871: READ16_HANDLER( kaneko16_YM2149_0_r )
   872: {
   873: 	/* Each 2149 register is mapped to a different address */
   874: 	AY8910_control_port_0_w(0,offset);
   875: 	return AY8910_read_port_0_r(0);
   876: }
   877: READ16_HANDLER( kaneko16_YM2149_1_r )
   878: {
   879: 	/* Each 2149 register is mapped to a different address */
   880: 	AY8910_control_port_1_w(0,offset);
   881: 	return AY8910_read_port_1_r(0);
   882: }
   883: 
   884: WRITE16_HANDLER( kaneko16_YM2149_0_w )
   885: {
   886: 	/* Each 2149 register is mapped to a different address */
   887: 	AY8910_control_port_0_w(0,offset);
   888: 	/* The registers are mapped to odd addresses, except one! */
   889: 	if (ACCESSING_LSB)	AY8910_write_port_0_w(0, data       & 0xff);
   890: 	else				AY8910_write_port_0_w(0,(data >> 8) & 0xff);
   891: }
   892: WRITE16_HANDLER( kaneko16_YM2149_1_w )
   893: {
   894: 	/* Each 2149 register is mapped to a different address */
   895: 	AY8910_control_port_1_w(0,offset);
   896: 	/* The registers are mapped to odd addresses, except one! */
   897: 	if (ACCESSING_LSB)	AY8910_write_port_1_w(0, data       & 0xff);
   898: 	else				AY8910_write_port_1_w(0,(data >> 8) & 0xff);
   899: }
   900: 
   901: 
   902: /***************************************************************************
   903: 
   904: 
   905: 									EEPROM
   906: 
   907: 
   908: ***************************************************************************/
   909: 
   910: READ_HANDLER( kaneko16_eeprom_r )
   911: {
   912: 	return EEPROM_read_bit() & 1;
   913: }
   914: 
   915: WRITE_HANDLER( kaneko16_eeprom_reset_w )
   916: {
   917: 	// reset line asserted: reset.
   918: 	EEPROM_set_cs_line((data & 0x01) ? CLEAR_LINE : ASSERT_LINE );
   919: }
   920: 
   921: WRITE16_HANDLER( kaneko16_eeprom_w )
   922: {
   923: 	if (ACCESSING_LSB)
   924: 	{
   925: 		// latch the bit
   926: 		EEPROM_write_bit(data & 0x02);
   927: 
   928: 		// reset line asserted: reset.
   929: //		EEPROM_set_cs_line((data & 0x00) ? CLEAR_LINE : ASSERT_LINE );
   930: 
   931: 		// clock line asserted: write latch or select next bit to read
   932: 		EEPROM_set_clock_line((data & 0x01) ? ASSERT_LINE : CLEAR_LINE );
   933: 	}
   934: }
   935: 
   936: 
   937: /***************************************************************************
   938: 
   939: 
   940: 							Memory Maps - Main CPU
   941: 
   942: 
   943: ***************************************************************************/
   944: 
   945: /***************************************************************************
   946: 								The Berlin Wall
   947: ***************************************************************************/
   948: 
   949: static MEMORY_READ16_START( berlwall_readmem )
   950: 	{ 0x000000, 0x03ffff, MRA16_ROM					},	// ROM
   951: 	{ 0x200000, 0x20ffff, MRA16_RAM					},	// Work RAM
   952: 	{ 0x30e000, 0x30ffff, MRA16_RAM					},	// Sprites
   953: 	{ 0x400000, 0x400fff, MRA16_RAM					},	// Palette
   954: //	{ 0x480000, 0x480001, MRA16_RAM					},	// ?
   955: 	{ 0x500000, 0x500001, kaneko16_bg15_reg_r		},	// High Color Background
   956: 	{ 0x580000, 0x580001, kaneko16_bg15_select_r	},
   957: 	{ 0x600000, 0x60003f, MRA16_RAM					},	// Sprites Regs
   958: 	{ 0x680000, 0x680001, input_port_0_word_r		},	// Inputs
   959: 	{ 0x680002, 0x680003, input_port_1_word_r		},
   960: 	{ 0x680004, 0x680005, input_port_2_word_r		},
   961: //	{ 0x680006, 0x680007, input_port_3_word_r		},
   962: 	{ 0x780000, 0x780001, watchdog_reset16_r		},	// Watchdog
   963: 	{ 0x800000, 0x80001f, kaneko16_YM2149_0_r		},	// Sound
   964: 	{ 0x800200, 0x80021f, kaneko16_YM2149_1_r		},
   965: 	{ 0x800400, 0x800401, OKIM6295_status_0_lsb_r	},
   966: 	{ 0xc00000, 0xc03fff, MRA16_RAM					},	// Layers
   967: 	{ 0xd00000, 0xd0001f, MRA16_RAM					},	// Layers Regs
   968: MEMORY_END
   969: 
   970: static MEMORY_WRITE16_START( berlwall_writemem )
   971: 	{ 0x000000, 0x03ffff, MWA16_ROM											},	// ROM
   972: 	{ 0x200000, 0x20ffff, MWA16_RAM											},	// Work RAM
   973: 	{ 0x30e000, 0x30ffff, MWA16_RAM, &spriteram16, &spriteram_size			},	// Sprites
   974: 	{ 0x400000, 0x400fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
   975: //	{ 0x480000, 0x480001, MWA16_RAM											},	// ?
   976: 	{ 0x500000, 0x500001, kaneko16_bg15_reg_w,     &kaneko16_bg15_reg		},	// High Color Background
   977: 	{ 0x580000, 0x580001, kaneko16_bg15_select_w,  &kaneko16_bg15_select	},
   978: 	{ 0x600000, 0x60003f, kaneko16_sprites_regs_w, &kaneko16_sprites_regs	},	// Sprites Regs
   979: 	{ 0x700000, 0x700001, kaneko16_coin_lockout_w							},	// Coin Lockout
   980: 	{ 0x800000, 0x80001f, kaneko16_YM2149_0_w								},	// Sound
   981: 	{ 0x800200, 0x80021f, kaneko16_YM2149_1_w								},
   982: 	{ 0x800400, 0x800401, OKIM6295_data_0_lsb_w								},
   983: 	{ 0xc00000, 0xc00fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers
   984: 	{ 0xc01000, 0xc01fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
   985: 	{ 0xc02000, 0xc02fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
   986: 	{ 0xc03000, 0xc03fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
   987: 	{ 0xd00000, 0xd0001f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers Regs
   988: MEMORY_END
   989: 
   990: 
   991: /***************************************************************************
   992: 							Bakuretsu Breaker
   993: ***************************************************************************/
   994: 
   995: static MEMORY_READ16_START( bakubrkr_readmem )
   996: 	{ 0x000000, 0x07ffff, MRA16_ROM					},	// ROM
   997: 	{ 0x100000, 0x10ffff, MRA16_RAM					},	// Work RAM
   998: 	{ 0x400000, 0x40001f, kaneko16_YM2149_0_r		},	// Sound
   999: 	{ 0x400200, 0x40021f, kaneko16_YM2149_1_r		},	//
  1000: 	{ 0x400400, 0x400401, OKIM6295_status_0_lsb_r	},	//
  1001: 	{ 0x500000, 0x503fff, MRA16_RAM					},	// Layers 1
  1002: 	{ 0x580000, 0x583fff, MRA16_RAM					},	// Layers 0
  1003: 	{ 0x600000, 0x601fff, MRA16_RAM					},	// Sprites
  1004: 	{ 0x700000, 0x700fff, MRA16_RAM					},	// Palette
  1005: 	{ 0x800000, 0x80001f, MRA16_RAM					},	// Layers 0 Regs
  1006: 	{ 0x900000, 0x90001f, MRA16_RAM					},	// Sprites Regs
  1007: 	{ 0xa80000, 0xa80001, watchdog_reset16_r		},	// Watchdog
  1008: 	{ 0xb00000, 0xb0001f, MRA16_RAM					},	// Layers 1 Regs
  1009: 	{ 0xe00000, 0xe00001, input_port_0_word_r		},	// Inputs
  1010: 	{ 0xe00002, 0xe00003, input_port_1_word_r		},
  1011: 	{ 0xe00004, 0xe00005, input_port_2_word_r		},
  1012: 	{ 0xe00006, 0xe00007, input_port_3_word_r		},
  1013: MEMORY_END
  1014: 
  1015: static MEMORY_WRITE16_START( bakubrkr_writemem )
  1016: 	{ 0x000000, 0x07ffff, MWA16_ROM											},	// ROM
  1017: 	{ 0x100000, 0x10ffff, MWA16_RAM											},	// Work RAM
  1018: 	{ 0x400000, 0x40001f, kaneko16_YM2149_0_w								},	// Sound
  1019: 	{ 0x400200, 0x40021f, kaneko16_YM2149_1_w								},	//
  1020: 	{ 0x500000, 0x500fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers 0
  1021: 	{ 0x501000, 0x501fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
  1022: 	{ 0x502000, 0x502fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
  1023: 	{ 0x503000, 0x503fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
  1024: 	{ 0x580000, 0x580fff, kaneko16_vram_3_w, &kaneko16_vram_3				},	// Layers 1
  1025: 	{ 0x581000, 0x581fff, kaneko16_vram_2_w, &kaneko16_vram_2				},	//
  1026: 	{ 0x582000, 0x582fff, MWA16_RAM, &kaneko16_vscroll_3,					},	//
  1027: 	{ 0x583000, 0x583fff, MWA16_RAM, &kaneko16_vscroll_2,					},	//
  1028: 	{ 0x600000, 0x601fff, MWA16_RAM, &spriteram16, &spriteram_size			},	// Sprites
  1029: 	{ 0x700000, 0x700fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1030: 	{ 0x900000, 0x90001f, kaneko16_sprites_regs_w,  &kaneko16_sprites_regs	},	// Sprites Regs
  1031: 	{ 0x800000, 0x80001f, kaneko16_layers_1_regs_w, &kaneko16_layers_1_regs	},	// Layers 0 Regs
  1032: 	{ 0xb00000, 0xb0001f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 1 Regs
  1033: 	{ 0xd00000, 0xd00001, kaneko16_eeprom_w									},	// EEPROM
  1034: MEMORY_END
  1035: 
  1036: 
  1037: /***************************************************************************
  1038: 									Blaze On
  1039: ***************************************************************************/
  1040: 
  1041: static MEMORY_READ16_START( blazeon_readmem )
  1042: 	{ 0x000000, 0x07ffff, MRA16_ROM				},	// ROM
  1043: 	{ 0x300000, 0x30ffff, MRA16_RAM				},	// Work RAM
  1044: 	{ 0x500000, 0x500fff, MRA16_RAM				},	// Palette
  1045: 	{ 0x600000, 0x603fff, MRA16_RAM				},	// Layers 0
  1046: 	{ 0x700000, 0x700fff, MRA16_RAM				},	// Sprites
  1047: /**/{ 0x800000, 0x80001f, MRA16_RAM				},	// Layers 0 Regs
  1048: /**/{ 0x900000, 0x90001f, MRA16_RAM				},	// Sprites Regs #1
  1049: /**/{ 0x980000, 0x98001f, MRA16_RAM				},	// Sprites Regs #2
  1050: 	{ 0xc00000, 0xc00001, input_port_0_word_r	},	// Inputs
  1051: 	{ 0xc00002, 0xc00003, input_port_1_word_r	},
  1052: 	{ 0xc00004, 0xc00005, input_port_2_word_r	},
  1053: 	{ 0xc00006, 0xc00007, input_port_3_word_r	},
  1054: 	{ 0xe00000, 0xe00001, MRA16_NOP				},	// IRQ Ack ?
  1055: 	{ 0xe40000, 0xe40001, MRA16_NOP				},	// IRQ Ack ?
  1056: //	{ 0xe80000, 0xe80001, MRA16_NOP				},	// IRQ Ack ?
  1057: 	{ 0xec0000, 0xec0001, MRA16_NOP				},	// Lev 4 IRQ Ack ?
  1058: MEMORY_END
  1059: 
  1060: static MEMORY_WRITE16_START( blazeon_writemem )
  1061: 	{ 0x000000, 0x07ffff, MWA16_ROM											},	// ROM
  1062: 	{ 0x300000, 0x30ffff, MWA16_RAM											},	// Work RAM
  1063: 	{ 0x500000, 0x500fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1064: 	{ 0x600000, 0x600fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers 0
  1065: 	{ 0x601000, 0x601fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
  1066: 	{ 0x602000, 0x602fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
  1067: 	{ 0x603000, 0x603fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
  1068: 	{ 0x700000, 0x700fff, MWA16_RAM, &spriteram16,	&spriteram_size			},	// Sprites
  1069: 	{ 0x800000, 0x80001f, kaneko16_layers_0_regs_w,	&kaneko16_layers_0_regs	},	// Layers 1 Regs
  1070: 	{ 0x900000, 0x90001f, kaneko16_sprites_regs_w,	&kaneko16_sprites_regs	},	// Sprites Regs #1
  1071: 	{ 0x980000, 0x98001f, MWA16_RAM											},	// Sprites Regs #2
  1072: 	{ 0xd00000, 0xd00001, kaneko16_coin_lockout_w							},	// Coin Lockout
  1073: 	{ 0xe00000, 0xe00001, kaneko16_soundlatch_w								},
  1074: MEMORY_END
  1075: 
  1076: 
  1077: /***************************************************************************
  1078: 								Blood Warrior
  1079: ***************************************************************************/
  1080: 
  1081: static WRITE16_HANDLER( bloodwar_oki_0_bank_w )
  1082: {
  1083: 	if (ACCESSING_LSB)
  1084: 	{
  1085: 		OKIM6295_set_bank_base(0, 0x40000 * (data & 0x3) );
  1086: //		logerror("CPU #0 PC %06X : OKI0  bank %08X\n",activecpu_get_pc(),data);
  1087: 	}
  1088: }
  1089: 
  1090: static WRITE16_HANDLER( bloodwar_oki_1_bank_w )
  1091: {
  1092: 	if (ACCESSING_LSB)
  1093: 	{
  1094: 		OKIM6295_set_bank_base(1, 0x40000 * (data & 0x3) );
  1095: //		logerror("CPU #0 PC %06X : OKI1  bank %08X\n",activecpu_get_pc(),data);
  1096: 	}
  1097: }
  1098: 
  1099: static WRITE16_HANDLER( bloodwar_coin_lockout_w )
  1100: {
  1101: 	if (ACCESSING_MSB)
  1102: 	{
  1103: 		coin_counter_w(0, data & 0x0100);
  1104: 
  1105: 		coin_lockout_w(0, data & 0x8000 );
  1106: 		coin_lockout_w(1, data & 0x8000 );
  1107: 	}
  1108: }
  1109: 
  1110: static MEMORY_READ16_START( bloodwar_readmem )
  1111: 	{ 0x000000, 0x0fffff, MRA16_ROM					},	// ROM
  1112: 	{ 0x100000, 0x10ffff, MRA16_RAM					},	// Work RAM
  1113: 	{ 0x200000, 0x20ffff, MRA16_RAM					},	// Shared With MCU
  1114: 	{ 0x300000, 0x30ffff, MRA16_RAM					},	// Palette
  1115: 	{ 0x400000, 0x401fff, MRA16_RAM					},	// Sprites
  1116: 	{ 0x500000, 0x503fff, MRA16_RAM					},	// Layers 0
  1117: 	{ 0x580000, 0x583fff, MRA16_RAM					},	// Layers 1
  1118: 	{ 0x600000, 0x60000f, MRA16_RAM					},	// Layers 0 Regs
  1119: 	{ 0x680000, 0x68000f, MRA16_RAM					},	// Layers 1 Regs
  1120: 	{ 0x700000, 0x70001f, MRA16_RAM					},	// Sprites Regs
  1121: 	{ 0x800000, 0x800001, OKIM6295_status_0_lsb_r	},
  1122: 	{ 0x880000, 0x880001, OKIM6295_status_1_lsb_r	},
  1123: 	{ 0x900014, 0x900015, kaneko16_rnd_r			},	// Random Number ?
  1124: 	{ 0xa00000, 0xa00001, watchdog_reset16_r		},	// Watchdog
  1125: 	{ 0xb00000, 0xb00001, input_port_0_word_r		},	// Inputs
  1126: 	{ 0xb00002, 0xb00003, input_port_1_word_r		},	//
  1127: 	{ 0xb00004, 0xb00005, input_port_2_word_r		},	//
  1128: 	{ 0xb00006, 0xb00007, input_port_3_word_r		},	//
  1129: 	{ 0xd00000, 0xd00001, MRA16_NOP					},	// ? (bit 0)
  1130: MEMORY_END
  1131: 
  1132: static MEMORY_WRITE16_START( bloodwar_writemem )
  1133: 	{ 0x000000, 0x0fffff, MWA16_ROM											},	// ROM
  1134: 	{ 0x100000, 0x10ffff, MWA16_RAM											},	// Work RAM
  1135: 	{ 0x200000, 0x20ffff, MWA16_RAM, &mcu_ram								},	// Shared With MCU
  1136: 	{ 0x2a0000, 0x2a0001, bloodwar_mcu_com0_w								},	// To MCU ?
  1137: 	{ 0x2b0000, 0x2b0001, bloodwar_mcu_com1_w								},
  1138: 	{ 0x2c0000, 0x2c0001, bloodwar_mcu_com2_w								},
  1139: 	{ 0x2d0000, 0x2d0001, bloodwar_mcu_com3_w								},
  1140: 	{ 0x300000, 0x30ffff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1141: 	{ 0x400000, 0x401fff, MWA16_RAM, &spriteram16, &spriteram_size			},	// Sprites
  1142: 
  1143: 	{ 0x580000, 0x580fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers 0
  1144: 	{ 0x581000, 0x581fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
  1145: 	{ 0x582000, 0x582fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
  1146: 	{ 0x583000, 0x583fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
  1147: 
  1148: 	{ 0x500000, 0x500fff, kaneko16_vram_3_w, &kaneko16_vram_3				},	// Layers 1
  1149: 	{ 0x501000, 0x501fff, kaneko16_vram_2_w, &kaneko16_vram_2				},	//
  1150: 	{ 0x502000, 0x502fff, MWA16_RAM, &kaneko16_vscroll_3,					},	//
  1151: 	{ 0x503000, 0x503fff, MWA16_RAM, &kaneko16_vscroll_2,					},	//
  1152: 
  1153: 	{ 0x680000, 0x68001f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 0 Regs
  1154: 	{ 0x600000, 0x60001f, kaneko16_layers_1_regs_w, &kaneko16_layers_1_regs	},	// Layers 1 Regs
  1155: 
  1156: 	{ 0x700000, 0x70001f, kaneko16_sprites_regs_w,  &kaneko16_sprites_regs	},	// Sprites Regs
  1157: 	{ 0x800000, 0x800001, OKIM6295_data_0_lsb_w								},
  1158: 	{ 0x880000, 0x880001, OKIM6295_data_1_lsb_w								},
  1159: 	{ 0xa00000, 0xa00001, watchdog_reset16_w				},	// Watchdog
  1160: 	{ 0xb80000, 0xb80001, bloodwar_coin_lockout_w			},	// Coin Lockout
  1161: 	{ 0xc00000, 0xc00001, MWA16_NOP							},	// ?
  1162: 	{ 0xe00000, 0xe00001, bloodwar_oki_0_bank_w				},
  1163: 	{ 0xe80000, 0xe80001, bloodwar_oki_1_bank_w				},
  1164: MEMORY_END
  1165: 
  1166: 
  1167: /***************************************************************************
  1168: 							Great 1000 Miles Rally
  1169: ***************************************************************************/
  1170: 
  1171: 
  1172: READ16_HANDLER( gtmr_wheel_r )
  1173: {
  1174: 	if ( (readinputport(4) & 0x1800) == 0x10)	// DSW setting
  1175: 		return	readinputport(5)<<8;			// 360° Wheel
  1176: 	else
  1177: 		return	readinputport(5);				// 270° Wheel
  1178: }
  1179: 
  1180: static int bank0;
  1181: WRITE16_HANDLER( gtmr_oki_0_bank_w )
  1182: {
  1183: 	if (ACCESSING_LSB)
  1184: 	{
  1185: 		OKIM6295_set_bank_base(0, 0x10000 * (data & 0xF) );
  1186: 		bank0 = (data & 0xF);
  1187: //		logerror("CPU #0 PC %06X : OKI0 bank %08X\n",activecpu_get_pc(),data);
  1188: 	}
  1189: }
  1190: 
  1191: WRITE16_HANDLER( gtmr_oki_1_bank_w )
  1192: {
  1193: 	if (ACCESSING_LSB)
  1194: 	{
  1195: 		OKIM6295_set_bank_base(1, 0x40000 * (data & 0x1) );
  1196: //		logerror("CPU #0 PC %06X : OKI1 bank %08X\n",activecpu_get_pc(),data);
  1197: 	}
  1198: }
  1199: 
  1200: /*
  1201: 	If you look at the samples ROM for the OKI chip #0, you'll see
  1202: 	it's divided into 16 chunks, each chunk starting with the header
  1203: 	holding the samples	addresses. But, except for chunk 0, the first
  1204: 	$100 bytes ($20 samples) of each chunk are empty, and despite that,
  1205: 	samples in the range $0-1f are played. So, whenever a samples in
  1206: 	this range is requested, we use the address and sample from chunk 0,
  1207: 	otherwise we use those from the selected bank. By using this scheme
  1208: 	the sound improves, but I wouldn't bet it's correct..
  1209: */
  1210: 
  1211: WRITE16_HANDLER( gtmr_oki_0_data_w )
  1212: {
  1213: 	static int pend = 0;
  1214: 
  1215: 	if (ACCESSING_LSB)
  1216: 	{
  1217: 
  1218: 		if (pend)	pend = 0;
  1219: 		else
  1220: 		{
  1221: 			if (data & 0x80)
  1222: 			{
  1223: 				int samp = data &0x7f;
  1224: 
  1225: 				pend = 1;
  1226: 				if (samp < 0x20)
  1227: 				{
  1228: 					OKIM6295_set_bank_base(0, 0);
  1229: //					logerror("Setting OKI0 bank to zero\n");
  1230: 				}
  1231: 				else
  1232: 					OKIM6295_set_bank_base(0, 0x10000 * bank0 );
  1233: 			}
  1234: 		}
  1235: 
  1236: 		OKIM6295_data_0_w(0,data);
  1237: //		logerror("CPU #0 PC %06X : OKI0 <- %08X\n",activecpu_get_pc(),data);
  1238: 
  1239: 	}
  1240: 
  1241: }
  1242: 
  1243: WRITE16_HANDLER( gtmr_oki_1_data_w )
  1244: {
  1245: 	if (ACCESSING_LSB)
  1246: 	{
  1247: 		OKIM6295_data_1_w(0,data);
  1248: //		logerror("CPU #0 PC %06X : OKI1 <- %08X\n",activecpu_get_pc(),data);
  1249: 	}
  1250: }
  1251: 
  1252: 
  1253: static MEMORY_READ16_START( gtmr_readmem )
  1254: 	{ 0x000000, 0x0ffffd, MRA16_ROM					},	// ROM
  1255: 	{ 0x0ffffe, 0x0fffff, gtmr_wheel_r				},	// Wheel Value
  1256: 	{ 0x100000, 0x10ffff, MRA16_RAM					},	// Work RAM
  1257: 	{ 0x200000, 0x20ffff, MRA16_RAM					},	// Shared With MCU
  1258: 	{ 0x300000, 0x30ffff, MRA16_RAM					},	// Palette
  1259: 	{ 0x310000, 0x327fff, MRA16_RAM					},	//
  1260: 	{ 0x400000, 0x401fff, MRA16_RAM					},	// Sprites
  1261: 	{ 0x500000, 0x503fff, MRA16_RAM					},	// Layers 0
  1262: 	{ 0x580000, 0x583fff, MRA16_RAM					},	// Layers 1
  1263: 	{ 0x600000, 0x60000f, MRA16_RAM					},	// Layers 0 Regs
  1264: 	{ 0x680000, 0x68000f, MRA16_RAM					},	// Layers 1 Regs
  1265: 	{ 0x700000, 0x70001f, kaneko16_sprites_regs_r	},	// Sprites Regs
  1266: 	{ 0x800000, 0x800001, OKIM6295_status_0_lsb_r	},	// Samples
  1267: 	{ 0x880000, 0x880001, OKIM6295_status_1_lsb_r	},
  1268: 	{ 0x900014, 0x900015, kaneko16_rnd_r			},	// Random Number ?
  1269: 	{ 0xa00000, 0xa00001, watchdog_reset16_r		},	// Watchdog
  1270: 	{ 0xb00000, 0xb00001, input_port_0_word_r		},	// Inputs
  1271: 	{ 0xb00002, 0xb00003, input_port_1_word_r		},
  1272: 	{ 0xb00004, 0xb00005, input_port_2_word_r		},
  1273: 	{ 0xb00006, 0xb00007, input_port_3_word_r		},
  1274: 	{ 0xd00000, 0xd00001, MRA16_NOP					},	// ? (bit 0)
  1275: MEMORY_END
  1276: 
  1277: static MEMORY_WRITE16_START( gtmr_writemem )
  1278: 	{ 0x000000, 0x0fffff, MWA16_ROM					},	// ROM
  1279: 	{ 0x100000, 0x10ffff, MWA16_RAM					},	// Work RAM
  1280: 	{ 0x200000, 0x20ffff, MWA16_RAM, &mcu_ram		},	// Shared With MCU
  1281: 	{ 0x2a0000, 0x2a0001, gtmr_mcu_com0_w			},	// To MCU ?
  1282: 	{ 0x2b0000, 0x2b0001, gtmr_mcu_com1_w			},
  1283: 	{ 0x2c0000, 0x2c0001, gtmr_mcu_com2_w			},
  1284: 	{ 0x2d0000, 0x2d0001, gtmr_mcu_com3_w			},
  1285: 	{ 0x300000, 0x30ffff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1286: 	{ 0x310000, 0x327fff, MWA16_RAM												},	//
  1287: 	{ 0x400000, 0x401fff, MWA16_RAM, &spriteram16, &spriteram_size			},	// Sprites
  1288: 	{ 0x500000, 0x500fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers 0
  1289: 	{ 0x501000, 0x501fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
  1290: 	{ 0x502000, 0x502fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
  1291: 	{ 0x503000, 0x503fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
  1292: 	{ 0x580000, 0x580fff, kaneko16_vram_3_w, &kaneko16_vram_3				},	// Layers 1
  1293: 	{ 0x581000, 0x581fff, kaneko16_vram_2_w, &kaneko16_vram_2				},	//
  1294: 	{ 0x582000, 0x582fff, MWA16_RAM, &kaneko16_vscroll_3,					},	//
  1295: 	{ 0x583000, 0x583fff, MWA16_RAM, &kaneko16_vscroll_2,					},	//
  1296: 	{ 0x600000, 0x60000f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 0 Regs
  1297: 	{ 0x680000, 0x68000f, kaneko16_layers_1_regs_w, &kaneko16_layers_1_regs	},	// Layers 1 Regs
  1298: 	{ 0x700000, 0x70001f, kaneko16_sprites_regs_w, &kaneko16_sprites_regs	},	// Sprites Regs
  1299: 	{ 0x800000, 0x800001, gtmr_oki_0_data_w			},	// Samples
  1300: 	{ 0x880000, 0x880001, gtmr_oki_1_data_w			},
  1301: 	{ 0xa00000, 0xa00001, watchdog_reset16_w		},	// Watchdog
  1302: 	{ 0xb80000, 0xb80001, kaneko16_coin_lockout_w	},	// Coin Lockout
  1303: //	{ 0xc00000, 0xc00001, MWA16_NOP					},	// ?
  1304: 	{ 0xe00000, 0xe00001, gtmr_oki_0_bank_w			},	// Samples Bankswitching
  1305: 	{ 0xe80000, 0xe80001, gtmr_oki_1_bank_w			},
  1306: MEMORY_END
  1307: 
  1308: 
  1309: /***************************************************************************
  1310: 							Great 1000 Miles Rally 2
  1311: ***************************************************************************/
  1312: 
  1313: 
  1314: READ16_HANDLER( gtmr2_wheel_r )
  1315: {
  1316: 	switch (readinputport(4) & 0x1800)
  1317: 	{
  1318: 		case 0x0000:	// 270° A. Wheel
  1319: 			return	(readinputport(5));
  1320: 			break;
  1321: 		case 0x1000:	// 270° D. Wheel
  1322: 			return	(readinputport(6) << 8);
  1323: 			break;
  1324: 		case 0x0800:	// 360° Wheel
  1325: 			return	(readinputport(7) << 8);
  1326: 			break;
  1327: 		default:
  1328: 			logerror("gtmr2_wheel_r : read at %06x with joystick\n", activecpu_get_pc());
  1329: 			return	(~0);
  1330: 			break;
  1331: 	}
  1332: }
  1333: 
  1334: READ16_HANDLER( gtmr2_IN1_r )
  1335: {
  1336: 	return	(readinputport(1) & (readinputport(8) | ~0x7100));
  1337: }
  1338: 
  1339: static MEMORY_READ16_START( gtmr2_readmem )
  1340: 	{ 0x000000, 0x0ffffd, MRA16_ROM					},	// ROM
  1341: 	{ 0x0ffffe, 0x0fffff, gtmr2_wheel_r				},	// Wheel Value
  1342: 	{ 0x100000, 0x10ffff, MRA16_RAM					},	// Work RAM
  1343: 	{ 0x200000, 0x20ffff, MRA16_RAM					},	// Shared With MCU
  1344: 	{ 0x300000, 0x30ffff, MRA16_RAM					},	// Palette
  1345: 	{ 0x310000, 0x327fff, MRA16_RAM					},	//
  1346: 	{ 0x400000, 0x401fff, MRA16_RAM					},	// Sprites
  1347: 	{ 0x500000, 0x503fff, MRA16_RAM					},	// Layers 0
  1348: 	{ 0x580000, 0x583fff, MRA16_RAM					},	// Layers 1
  1349: 	{ 0x600000, 0x60000f, MRA16_RAM					},	// Layers 0 Regs
  1350: 	{ 0x680000, 0x68000f, MRA16_RAM					},	// Layers 1 Regs
  1351: 	{ 0x700000, 0x70001f, kaneko16_sprites_regs_r	},	// Sprites Regs
  1352: 	{ 0x800000, 0x800001, OKIM6295_status_0_lsb_r	},	// Samples
  1353: 	{ 0x880000, 0x880001, OKIM6295_status_1_lsb_r	},
  1354: 	{ 0x900014, 0x900015, kaneko16_rnd_r			},	// Random Number ?
  1355: 	{ 0xa00000, 0xa00001, watchdog_reset16_r		},	// Watchdog
  1356: 	{ 0xb00000, 0xb00001, input_port_0_word_r		},	// Inputs
  1357: //	{ 0xb00002, 0xb00003, input_port_1_word_r		},
  1358: 	{ 0xb00002, 0xb00003, gtmr2_IN1_r		},
  1359: 	{ 0xb00004, 0xb00005, input_port_2_word_r		},
  1360: 	{ 0xb00006, 0xb00007, input_port_3_word_r		},
  1361: 	{ 0xd00000, 0xd00001, MRA16_NOP					},	// ? (bit 0)
  1362: MEMORY_END
  1363: 
  1364: /***************************************************************************
  1365: 								Magical Crystal
  1366: ***************************************************************************/
  1367: 
  1368: static MEMORY_READ16_START( mgcrystl_readmem )
  1369: 	{ 0x000000, 0x07ffff, MRA16_ROM					},	// ROM
  1370: 	{ 0x300000, 0x30ffff, MRA16_RAM					},	// Work RAM
  1371: 	{ 0x400000, 0x40001f, kaneko16_YM2149_0_r		},	// Sound
  1372: 	{ 0x400200, 0x40021f, kaneko16_YM2149_1_r		},
  1373: 	{ 0x400400, 0x400401, OKIM6295_status_0_lsb_r	},
  1374: 	{ 0x500000, 0x500fff, MRA16_RAM					},	// Palette
  1375: 	{ 0x600000, 0x603fff, MRA16_RAM					},	// Layers 0
  1376: 	{ 0x680000, 0x683fff, MRA16_RAM					},	// Layers 1
  1377: 	{ 0x700000, 0x701fff, MRA16_RAM					},	// Sprites
  1378: 	{ 0x800000, 0x80000f, MRA16_RAM					},	// Layers 0 Regs
  1379: 	{ 0x900000, 0x90001f, MRA16_RAM					},	// Sprites Regs
  1380: 	{ 0xb00000, 0xb0000f, MRA16_RAM					},	// Layers 1 Regs
  1381: 	{ 0xa00000, 0xa00001, watchdog_reset16_r		},	// Watchdog
  1382: 	{ 0xc00000, 0xc00001, input_port_0_word_r		},	// Inputs
  1383: 	{ 0xc00002, 0xc00003, input_port_1_word_r		},	//
  1384: 	{ 0xc00004, 0xc00005, input_port_2_word_r		},	//
  1385: MEMORY_END
  1386: 
  1387: static MEMORY_WRITE16_START( mgcrystl_writemem )
  1388: 	{ 0x000000, 0x07ffff, MWA16_ROM											},	// ROM
  1389: 	{ 0x300000, 0x30ffff, MWA16_RAM											},	// Work RAM
  1390: 	{ 0x400000, 0x40001f, kaneko16_YM2149_0_w								},	// Sound
  1391: 	{ 0x400200, 0x40021f, kaneko16_YM2149_1_w								},
  1392: 	{ 0x400400, 0x400401, OKIM6295_data_0_lsb_w								},
  1393: 	{ 0x500000, 0x500fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1394: 	{ 0x600000, 0x600fff, kaneko16_vram_1_w, &kaneko16_vram_1				},	// Layers 0
  1395: 	{ 0x601000, 0x601fff, kaneko16_vram_0_w, &kaneko16_vram_0				},	//
  1396: 	{ 0x602000, 0x602fff, MWA16_RAM, &kaneko16_vscroll_1,					},	//
  1397: 	{ 0x603000, 0x603fff, MWA16_RAM, &kaneko16_vscroll_0,					},	//
  1398: 	{ 0x680000, 0x680fff, kaneko16_vram_3_w, &kaneko16_vram_3				},	// Layers 1
  1399: 	{ 0x681000, 0x681fff, kaneko16_vram_2_w, &kaneko16_vram_2				},	//
  1400: 	{ 0x682000, 0x682fff, MWA16_RAM, &kaneko16_vscroll_3,					},	//
  1401: 	{ 0x683000, 0x683fff, MWA16_RAM, &kaneko16_vscroll_2,					},	//
  1402: 	{ 0x700000, 0x701fff, MWA16_RAM, &spriteram16, &spriteram_size			},	// Sprites
  1403: 	{ 0x800000, 0x80001f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 0 Regs
  1404: 	{ 0x900000, 0x90001f, kaneko16_sprites_regs_w,  &kaneko16_sprites_regs	},	// Sprites Regs
  1405: 	{ 0xb00000, 0xb0001f, kaneko16_layers_1_regs_w, &kaneko16_layers_1_regs	},	// Layers 1 Regs
  1406: 	{ 0xd00000, 0xd00001, kaneko16_eeprom_w									},	// EEPROM
  1407: MEMORY_END
  1408: 
  1409: 
  1410: /***************************************************************************
  1411: 								Sand Scorpion
  1412: ***************************************************************************/
  1413: 
  1414: WRITE16_HANDLER( sandscrp_coin_counter_w )
  1415: {
  1416: 	if (ACCESSING_LSB)
  1417: 	{
  1418: 		coin_counter_w(0,   data  & 0x0001);
  1419: 		coin_counter_w(1,   data  & 0x0002);
  1420: 	}
  1421: }
  1422: 
  1423: static data8_t latch1_full;
  1424: static data8_t latch2_full;
  1425: 
  1426: static READ16_HANDLER( sandscrp_latchstatus_word_r )
  1427: {
  1428: 	return	(latch1_full ? 0x80 : 0) |
  1429: 			(latch2_full ? 0x40 : 0) ;
  1430: }
  1431: 
  1432: static WRITE16_HANDLER( sandscrp_latchstatus_word_w )
  1433: {
  1434: 	if (ACCESSING_LSB)
  1435: 	{
  1436: 		latch1_full = data & 0x80;
  1437: 		latch2_full = data & 0x40;
  1438: 	}
  1439: }
  1440: 
  1441: static READ16_HANDLER( sandscrp_soundlatch_word_r )
  1442: {
  1443: 	latch2_full = 0;
  1444: 	return soundlatch2_r(0);
  1445: }
  1446: 
  1447: static WRITE16_HANDLER( sandscrp_soundlatch_word_w )
  1448: {
  1449: 	if (ACCESSING_LSB)
  1450: 	{
  1451: 		latch1_full = 1;
  1452: 		soundlatch_w(0, data & 0xff);
  1453: 		cpu_set_nmi_line(1,PULSE_LINE);
  1454: 		cpu_spinuntil_time(TIME_IN_USEC(100));	// Allow the other cpu to reply
  1455: 	}
  1456: }
  1457: 
  1458: static MEMORY_READ16_START( sandscrp_readmem )
  1459: 	{ 0x000000, 0x07ffff, MRA16_ROM						},	// ROM
  1460: 	{ 0x700000, 0x70ffff, MRA16_RAM						},	// RAM
  1461: 	{ 0x200000, 0x20001f, sandscrp_mcu_ram_r			},	// Protection
  1462: 	{ 0x300000, 0x30000f, MRA16_RAM						},	// Scroll
  1463: 	{ 0x400000, 0x401fff, MRA16_RAM						},	// Layers
  1464: 	{ 0x402000, 0x403fff, MRA16_RAM						},	//
  1465: 	{ 0x500000, 0x501fff, MRA16_RAM						},	// Sprites
  1466: 	{ 0x600000, 0x600fff, MRA16_RAM						},	// Palette
  1467: 	{ 0xb00000, 0xb00001, input_port_0_word_r			},	// Inputs
  1468: 	{ 0xb00002, 0xb00003, input_port_1_word_r			},	//
  1469: 	{ 0xb00004, 0xb00005, input_port_2_word_r			},	//
  1470: 	{ 0xb00006, 0xb00007, input_port_3_word_r			},	//
  1471: 	{ 0xec0000, 0xec0001, watchdog_reset16_r			},	//
  1472: 	{ 0x800000, 0x800001, sandscrp_irq_cause_r			},	// IRQ Cause
  1473: 	{ 0xe00000, 0xe00001, sandscrp_soundlatch_word_r	},	// From Sound CPU
  1474: 	{ 0xe40000, 0xe40001, sandscrp_latchstatus_word_r	},	//
  1475: MEMORY_END
  1476: 
  1477: static MEMORY_WRITE16_START( sandscrp_writemem )
  1478: 	{ 0x000000, 0x07ffff, MWA16_ROM								},	// ROM
  1479: 	{ 0x200000, 0x20001f, sandscrp_mcu_ram_w, &mcu_ram			},	// Protection
  1480: 	{ 0x700000, 0x70ffff, MWA16_RAM								},	// RAM
  1481: 	{ 0x300000, 0x30000f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 0 Regs
  1482: 	{ 0x100000, 0x100001, sandscrp_irq_cause_w					},	// IRQ Ack
  1483: 	{ 0x400000, 0x400fff, kaneko16_vram_1_w, &kaneko16_vram_1	},	// Layers 0
  1484: 	{ 0x401000, 0x401fff, kaneko16_vram_0_w, &kaneko16_vram_0	},	//
  1485: 	{ 0x402000, 0x402fff, MWA16_RAM, &kaneko16_vscroll_1,		},	//
  1486: 	{ 0x403000, 0x403fff, MWA16_RAM, &kaneko16_vscroll_0,		},	//
  1487: 	{ 0x500000, 0x501fff, MWA16_RAM, &spriteram16, &spriteram_size	},	// Sprites
  1488: 	{ 0x600000, 0x600fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1489: 	{ 0xa00000, 0xa00001, sandscrp_coin_counter_w				},	// Coin Counters (Lockout unused)
  1490: 	{ 0xe00000, 0xe00001, sandscrp_soundlatch_word_w			},	// To Sound CPU
  1491: 	{ 0xe40000, 0xe40001, sandscrp_latchstatus_word_w			},	//
  1492: MEMORY_END
  1493: 
  1494: 
  1495: /***************************************************************************
  1496: 								Shogun Warriors
  1497: ***************************************************************************/
  1498: 
  1499: /* Untested */
  1500: WRITE16_HANDLER( shogwarr_oki_bank_w )
  1501: {
  1502: 	if (ACCESSING_LSB)
  1503: 	{
  1504: 		OKIM6295_set_bank_base(0, 0x10000 * ((data >> 0) & 0x3) );
  1505: 		OKIM6295_set_bank_base(1, 0x10000 * ((data >> 4) & 0x3) );
  1506: 	}
  1507: }
  1508: 
  1509: static MEMORY_READ16_START( shogwarr_readmem )
  1510: 	{ 0x000000, 0x03ffff, MRA16_ROM					},	// ROM
  1511: 	{ 0x100000, 0x10ffff, MRA16_RAM					},	// Work RAM
  1512: 	{ 0x200000, 0x20ffff, MRA16_RAM					},	// Shared With MCU
  1513: 	{ 0x380000, 0x380fff, MRA16_RAM					},	// Palette
  1514: 	{ 0x400000, 0x400001, OKIM6295_status_0_lsb_r	},	// Samples
  1515: 	{ 0x480000, 0x480001, OKIM6295_status_1_lsb_r	},
  1516: 	{ 0x580000, 0x581fff, MRA16_RAM					},	// Sprites
  1517: 	{ 0x600000, 0x603fff, MRA16_RAM					},	// Layers 0
  1518: 	{ 0x800000, 0x80000f, MRA16_RAM					},	// Layers 0 Regs
  1519: 	{ 0x900000, 0x90001f, MRA16_RAM					},	// Sprites Regs
  1520: 	{ 0xa00014, 0xa00015, kaneko16_rnd_r			},	// Random Number ?
  1521: 	{ 0xa80000, 0xa80001, watchdog_reset16_r		},	// Watchdog
  1522: 	{ 0xb80000, 0xb80001, input_port_0_word_r		},	// Inputs
  1523: 	{ 0xb80002, 0xb80003, input_port_1_word_r		},
  1524: 	{ 0xb80004, 0xb80005, input_port_2_word_r		},
  1525: 	{ 0xb80006, 0xb80007, input_port_3_word_r		},
  1526: 	{ 0xd00000, 0xd00001, MRA16_NOP					},	// ? (bit 0)
  1527: MEMORY_END
  1528: 
  1529: static MEMORY_WRITE16_START( shogwarr_writemem )
  1530: 	{ 0x000000, 0x03ffff, MWA16_ROM								},	// ROM
  1531: 	{ 0x100000, 0x10ffff, MWA16_RAM								},	// Work RAM
  1532: 	{ 0x200000, 0x20ffff, shogwarr_mcu_ram_w, &mcu_ram			},	// Shared With MCU
  1533: 	{ 0x280000, 0x280001, shogwarr_mcu_com0_w					},	// To MCU ?
  1534: 	{ 0x290000, 0x290001, shogwarr_mcu_com1_w					},
  1535: 	{ 0x2b0000, 0x2b0001, shogwarr_mcu_com2_w					},
  1536: 	{ 0x2d0000, 0x2d0001, shogwarr_mcu_com3_w					},
  1537: 	{ 0x380000, 0x380fff, paletteram16_xGGGGGRRRRRBBBBB_word_w, &paletteram16	},	// Palette
  1538: 	{ 0x400000, 0x400001, OKIM6295_data_0_lsb_w					},	// Samples
  1539: 	{ 0x480000, 0x480001, OKIM6295_data_1_lsb_w					},
  1540: 	{ 0x580000, 0x581fff, MWA16_RAM, &spriteram16, &spriteram_size	},	// Sprites
  1541: 	{ 0x600000, 0x600fff, kaneko16_vram_1_w, &kaneko16_vram_1		},	// Layers 0
  1542: 	{ 0x601000, 0x601fff, kaneko16_vram_0_w, &kaneko16_vram_0		},	//
  1543: 	{ 0x602000, 0x602fff, MWA16_RAM, &kaneko16_vscroll_1,			},	//
  1544: 	{ 0x603000, 0x603fff, MWA16_RAM, &kaneko16_vscroll_0,			},	//
  1545: 	{ 0x800000, 0x80000f, kaneko16_layers_0_regs_w, &kaneko16_layers_0_regs	},	// Layers 1 Regs
  1546: 	{ 0x900000, 0x90001f, kaneko16_sprites_regs_w, &kaneko16_sprites_regs		},	// Sprites Regs
  1547: 	{ 0xa80000, 0xa80001, watchdog_reset16_w					},	// Watchdog
  1548: 	{ 0xd00000, 0xd00001, MWA16_NOP								},	// ?
  1549: 	{ 0xe00000, 0xe00001, shogwarr_oki_bank_w					},	// Samples Bankswitching
  1550: MEMORY_END
  1551: 
  1552: 
  1553: 
  1554: /***************************************************************************
  1555: 
  1556: 
  1557: 							Memory Maps - Sound CPU
  1558: 
  1559: 
  1560: ***************************************************************************/
  1561: 
  1562: /***************************************************************************
  1563: 									Blaze On
  1564: ***************************************************************************/
  1565: 
  1566: #if 0 
  1567: static WRITE_HANDLER( blazeon_bankswitch_w )
  1568: {
  1569: 	unsigned char *RAM = memory_region(REGION_CPU1);
  1570: 	int bank = data & 7;
  1571: 	cpu_setbank(15, &RAM[bank * 0x10000 + 0x1000]);
  1572: }
  1573: #endif 
  1574: 
  1575: static MEMORY_READ_START( blazeon_sound_readmem )
  1576: 	{ 0x0000, 0x7fff, MRA_ROM					},	// ROM
  1577: 	{ 0xc000, 0xdfff, MRA_RAM					},	// RAM
  1578: MEMORY_END
  1579: static MEMORY_WRITE_START( blazeon_sound_writemem )
  1580: 	{ 0x0000, 0x7fff, MWA_ROM					},	// ROM
  1581: 	{ 0xc000, 0xdfff, MWA_RAM					},	// RAM
  1582: MEMORY_END
  1583: 
  1584: static PORT_READ_START( blazeon_sound_readport )
  1585: 	{ 0x03, 0x03, YM2151_status_port_0_r	},
  1586: 	{ 0x06, 0x06, soundlatch_r				},
  1587: PORT_END
  1588: static PORT_WRITE_START( blazeon_sound_writeport )
  1589: 	{ 0x02, 0x02, YM2151_register_port_0_w	},
  1590: 	{ 0x03, 0x03, YM2151_data_port_0_w		},
  1591: PORT_END
  1592: 
  1593: 
  1594: /***************************************************************************
  1595: 								Sand Scorpion
  1596: ***************************************************************************/
  1597: 
  1598: WRITE_HANDLER( sandscrp_bankswitch_w )
  1599: {
  1600: 	unsigned char *RAM = memory_region(REGION_CPU1);
  1601: 	int bank = data & 0x07;
  1602: 
  1603: 	if ( bank != data )	logerror("CPU #1 - PC %04X: Bank %02X\n",activecpu_get_pc(),data);
  1604: 
  1605: 	if (bank < 3)	RAM = &RAM[0x4000 * bank];
  1606: 	else			RAM = &RAM[0x4000 * (bank-3) + 0x10000];
  1607: 
  1608: 	cpu_setbank(1, RAM);
  1609: }
  1610: 
  1611: static READ_HANDLER( sandscrp_latchstatus_r )
  1612: {
  1613: 	return	(latch2_full ? 0x80 : 0) |	// swapped!?
  1614: 			(latch1_full ? 0x40 : 0) ;
  1615: }
  1616: 
  1617: static READ_HANDLER( sandscrp_soundlatch_r )
  1618: {
  1619: 	latch1_full = 0;
  1620: 	return soundlatch_r(0);
  1621: }
  1622: 
  1623: static WRITE_HANDLER( sandscrp_soundlatch_w )
  1624: {
  1625: 	latch2_full = 1;
  1626: 	soundlatch2_w(0,data);
  1627: }
  1628: 
  1629: static MEMORY_READ_START( sandscrp_sound_readmem )
  1630: 	{ 0x0000, 0x7fff, MRA_ROM					},	// ROM
  1631: 	{ 0x8000, 0xbfff, MRA_BANK1					},	// Banked ROM
  1632: 	{ 0xc000, 0xdfff, MRA_RAM					},	// RAM
  1633: MEMORY_END
  1634: static MEMORY_WRITE_START( sandscrp_sound_writemem )
  1635: 	{ 0x0000, 0x7fff, MWA_ROM					},	// ROM
  1636: 	{ 0x8000, 0xbfff, MWA_ROM					},	// Banked ROM
  1637: 	{ 0xc000, 0xdfff, MWA_RAM					},	// RAM
  1638: MEMORY_END
  1639: 
  1640: static PORT_READ_START( sandscrp_sound_readport )
  1641: 	{ 0x02, 0x02, YM2203_status_port_0_r		},	// YM2203
  1642: 	{ 0x03, 0x03, YM2203_read_port_0_r			},	// PORTA/B read
  1643: 	{ 0x07, 0x07, sandscrp_soundlatch_r			},	//
  1644: 	{ 0x08, 0x08, sandscrp_latchstatus_r		},	//
  1645: PORT_END
  1646: static PORT_WRITE_START( sandscrp_sound_writeport )
  1647: 	{ 0x00, 0x00, sandscrp_bankswitch_w		},	// ROM Bank
  1648: 	{ 0x02, 0x02, YM2203_control_port_0_w	},	// YM2203
  1649: 	{ 0x03, 0x03, YM2203_write_port_0_w		},	//
  1650: 	{ 0x04, 0x04, OKIM6295_data_0_w			},	// OKIM6295
  1651: 	{ 0x06, 0x06, sandscrp_soundlatch_w		},	//
  1652: PORT_END
  1653: 
  1654: 
  1655: 
  1656: 
  1657: /***************************************************************************
  1658: 
  1659: 
  1660: 								Input Ports
  1661: 
  1662: 
  1663: ***************************************************************************/
  1664: 
  1665: /***************************************************************************
  1666: 							Bakuretsu Breaker
  1667: ***************************************************************************/
  1668: 
  1669: INPUT_PORTS_START( bakubrkr )
  1670: 	PORT_START	// IN0 - Player 1 + DSW - e00000.w
  1671: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1672: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1673: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1674: 	PORT_SERVICE( 0x0002, IP_ACTIVE_LOW )
  1675: 	PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2" )
  1676: 	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  1677: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1678: 	PORT_DIPNAME( 0x0008, 0x0008, "Unknown 1-3" )
  1679: 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  1680: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1681: 	PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
  1682: 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  1683: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1684: 	PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
  1685: 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1686: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1687: 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
  1688: 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1689: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1690: 	PORT_DIPNAME( 0x0080, 0x0080, "Unknown 1-7" )
  1691: 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  1692: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  1693: 
  1694: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1695: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1696: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1697: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1698: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1699: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1700: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1701: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1702: 
  1703: 	PORT_START	// IN1 - Player 2 - e00002.b
  1704: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1705: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1706: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1707: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1708: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1709: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1710: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1711: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1712: 
  1713: 	PORT_START	// IN2 - Coins - e00004.b
  1714: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  1715: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  1716: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  1717: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  1718: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1719: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)	// pause
  1720: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  1721: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)
  1722: 
  1723: 	PORT_START	// IN3 - Seems unused ! - e00006.b
  1724: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1725: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1726: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1727: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1728: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1729: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1730: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1731: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1732: INPUT_PORTS_END
  1733: 
  1734: 
  1735: /***************************************************************************
  1736: 							The Berlin Wall (set 1)
  1737: ***************************************************************************/
  1738: 
  1739: INPUT_PORTS_START( berlwall )
  1740: 	PORT_START	// IN0 - Player 1 - 680000.w
  1741: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1742: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1743: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1744: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1745: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1746: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1747: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  1748: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1749: 
  1750: 	PORT_START	// IN1 - Player 2 - 680002.w
  1751: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1752: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1753: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1754: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1755: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1756: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1757: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1758: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1759: 
  1760: 	PORT_START	// IN2 - Coins - 680004.w
  1761: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  1762: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  1763: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  1764: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  1765: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1766: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)
  1767: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  1768: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)
  1769: 
  1770: 	PORT_START	// IN3 - ? - 680006.w
  1771: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1772: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1773: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1774: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1775: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1776: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1777: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1778: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1779: 
  1780: 	PORT_START	// IN4 - DSW 1 - $200018.b <- ! $80001d.b
  1781: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1782: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1783: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1784: 	PORT_DIPNAME( 0x02, 0x02, "Reserved" )
  1785: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1786: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1787: 	PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_A ) )
  1788: 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  1789: 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
  1790: 	PORT_DIPSETTING(    0x0c, DEF_STR( 2C_1C ) )
  1791: 	PORT_DIPSETTING(    0x1c, DEF_STR( 1C_1C ) )
  1792: 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_3C ) )
  1793: 	PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
  1794: 	PORT_DIPSETTING(    0x14, DEF_STR( 1C_3C ) )
  1795: 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_4C ) )
  1796: 	PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_B ) )
  1797: 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_1C ) )
  1798: 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_1C ) )
  1799: 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_3C ) )
  1800: 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  1801: 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_3C ) )
  1802: 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1803: 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_5C ) )
  1804: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  1805: 
  1806: 	PORT_START	// IN5 - DSW 2 - $200019.b <- $80001f.b
  1807: 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  1808: 	PORT_DIPSETTING(    0x02, "Easy"    )
  1809: 	PORT_DIPSETTING(    0x03, "Normal"  )
  1810: 	PORT_DIPSETTING(    0x01, "Hard"    )
  1811: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1812: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )	// 1p lives at 202982.b
  1813: 	PORT_DIPSETTING(    0x00, "1" )
  1814: 	PORT_DIPSETTING(    0x0c, "2" )
  1815: 	PORT_DIPSETTING(    0x08, "3" )
  1816: 	PORT_DIPSETTING(    0x04, "5" )
  1817: 	PORT_DIPNAME( 0x30, 0x30, "Country"   )
  1818: 	PORT_DIPSETTING(    0x30, "England" )
  1819: 	PORT_DIPSETTING(    0x20, "Italy"   )
  1820: 	PORT_DIPSETTING(    0x10, "Germany" )
  1821: 	PORT_DIPSETTING(    0x00, "Freeze Screen" )
  1822: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  1823: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1824: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1825: 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  1826: INPUT_PORTS_END
  1827: 
  1828: 
  1829: /***************************************************************************
  1830: 							The Berlin Wall (set 2)
  1831: ***************************************************************************/
  1832: 
  1833: //	Same as berlwall, but for a different lives setting
  1834: 
  1835: INPUT_PORTS_START( berlwalt )
  1836: 	PORT_START	// IN0 - Player 1 - 680000.w
  1837: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  1838: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  1839: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  1840: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  1841: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  1842: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  1843: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  1844: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1845: 
  1846: 	PORT_START	// IN1 - Player 2 - 680002.w
  1847: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1848: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1849: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1850: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1851: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1852: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1853: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  1854: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1855: 
  1856: 	PORT_START	// IN2 - Coins - 680004.w
  1857: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  1858: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  1859: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  1860: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  1861: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  1862: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)
  1863: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  1864: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)
  1865: 
  1866: 	PORT_START	// IN3 - ? - 680006.w
  1867: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1868: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1869: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1870: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1871: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1872: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1873: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1874: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  1875: 
  1876: 	PORT_START	// IN4 - DSW 1 - $80001d.b
  1877: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  1878: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1879: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1880: 	PORT_DIPNAME( 0x02, 0x02, "Reserved" )
  1881: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1882: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1883: 	PORT_DIPNAME( 0x1c, 0x1c, DEF_STR( Coin_A ) )
  1884: 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  1885: 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
  1886: 	PORT_DIPSETTING(    0x0c, DEF_STR( 2C_1C ) )
  1887: 	PORT_DIPSETTING(    0x1c, DEF_STR( 1C_1C ) )
  1888: 	PORT_DIPSETTING(    0x08, DEF_STR( 2C_3C ) )
  1889: 	PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
  1890: 	PORT_DIPSETTING(    0x14, DEF_STR( 1C_3C ) )
  1891: 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_4C ) )
  1892: 	PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Coin_B ) )
  1893: 	PORT_DIPSETTING(    0x60, DEF_STR( 2C_1C ) )
  1894: 	PORT_DIPSETTING(    0xe0, DEF_STR( 1C_1C ) )
  1895: 	PORT_DIPSETTING(    0x40, DEF_STR( 2C_3C ) )
  1896: 	PORT_DIPSETTING(    0xc0, DEF_STR( 1C_2C ) )
  1897: 	PORT_DIPSETTING(    0xa0, DEF_STR( 1C_3C ) )
  1898: 	PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
  1899: 	PORT_DIPSETTING(    0x20, DEF_STR( 1C_5C ) )
  1900: 	PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
  1901: 
  1902: 	PORT_START	// IN5 - DSW 2 - $80001f.b
  1903: 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
  1904: 	PORT_DIPSETTING(    0x02, "Easy"    )
  1905: 	PORT_DIPSETTING(    0x03, "Normal"  )
  1906: 	PORT_DIPSETTING(    0x01, "Hard"    )
  1907: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1908: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  1909: 	PORT_DIPSETTING(    0x00, "7" )
  1910: 	PORT_DIPSETTING(    0x04, "5" )
  1911: 	PORT_DIPSETTING(    0x0c, "3" )
  1912: 	PORT_DIPSETTING(    0x08, "2" )
  1913: 	PORT_DIPNAME( 0x30, 0x30, "Country"   )
  1914: 	PORT_DIPSETTING(    0x30, "England" )
  1915: 	PORT_DIPSETTING(    0x20, "Italy"   )
  1916: 	PORT_DIPSETTING(    0x10, "Germany" )
  1917: 	PORT_DIPSETTING(    0x00, "Freeze Screen" )
  1918: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  1919: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1920: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  1921: 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  1922: INPUT_PORTS_END
  1923: 
  1924: 
  1925: /***************************************************************************
  1926: 									Blaze On
  1927: ***************************************************************************/
  1928: 
  1929: INPUT_PORTS_START( blazeon )
  1930: 	PORT_START	// IN0 - Player 1 + DSW - c00000.w
  1931: 	PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
  1932: 	PORT_DIPSETTING(      0x0002, "Easy"    )
  1933: 	PORT_DIPSETTING(      0x0003, "Normal"  )
  1934: 	PORT_DIPSETTING(      0x0001, "Hard"    )
  1935: 	PORT_DIPSETTING(      0x0000, "Hardest" )
  1936: 	PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Lives ) )
  1937: 	PORT_DIPSETTING(      0x0000, "2" )
  1938: 	PORT_DIPSETTING(      0x000c, "3" )
  1939: 	PORT_DIPSETTING(      0x0008, "4" )
  1940: 	PORT_DIPSETTING(      0x0004, "5" )
  1941: 	PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) )
  1942: 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  1943: 	PORT_DIPSETTING(      0x0010, DEF_STR( On ) )
  1944: 	PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
  1945: 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1946: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1947: 	PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
  1948: 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1949: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1950: 	PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1951: 
  1952: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
  1953: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 )
  1954: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 )
  1955: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  1956: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER1 )
  1957: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER1 )
  1958: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_START1                       )
  1959: 	PORT_BIT_IMPULSE( 0x8000, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  1960: 
  1961: 	PORT_START	// IN1 - Player 2 - c00002.w
  1962: 	PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coin_A ) )
  1963: 	PORT_DIPSETTING(      0x0007, DEF_STR( 4C_1C ) )
  1964: 	PORT_DIPSETTING(      0x0008, DEF_STR( 3C_1C ) )
  1965: 	PORT_DIPSETTING(      0x0005, "6 Coins/3 Credits" )
  1966: 	PORT_DIPSETTING(      0x0009, DEF_STR( 2C_1C ) )
  1967: 	PORT_DIPSETTING(      0x0004, DEF_STR( 4C_3C ) )
  1968: 	PORT_DIPSETTING(      0x000f, DEF_STR( 1C_1C ) )
  1969: //	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_1C ) )
  1970: 	PORT_DIPSETTING(      0x0003, "5 Coins/6 Credits" )
  1971: 	PORT_DIPSETTING(      0x0002, DEF_STR( 4C_5C ) )
  1972: 	PORT_DIPSETTING(      0x0006, DEF_STR( 2C_3C ) )
  1973: //	PORT_DIPSETTING(      0x0001, DEF_STR( 2C_3C ) )
  1974: 	PORT_DIPSETTING(      0x000e, DEF_STR( 1C_2C ) )
  1975: 	PORT_DIPSETTING(      0x000d, DEF_STR( 1C_3C ) )
  1976: 	PORT_DIPSETTING(      0x000c, DEF_STR( 1C_4C ) )
  1977: 	PORT_DIPSETTING(      0x000b, DEF_STR( 1C_5C ) )
  1978: 	PORT_DIPSETTING(      0x000a, DEF_STR( 1C_6C ) )
  1979: 
  1980: 	PORT_DIPNAME( 0x00f0, 0x00f0, DEF_STR( Coin_B ) )
  1981: 	PORT_DIPSETTING(      0x0070, DEF_STR( 4C_1C ) )
  1982: 	PORT_DIPSETTING(      0x0080, DEF_STR( 3C_1C ) )
  1983: 	PORT_DIPSETTING(      0x0050, "6 Coins/3 Credits" )
  1984: 	PORT_DIPSETTING(      0x0090, DEF_STR( 2C_1C ) )
  1985: 	PORT_DIPSETTING(      0x0040, DEF_STR( 4C_3C ) )
  1986: 	PORT_DIPSETTING(      0x00f0, DEF_STR( 1C_1C ) )
  1987: //	PORT_DIPSETTING(      0x0000, DEF_STR( 1C_1C ) )
  1988: 	PORT_DIPSETTING(      0x0030, "5 Coins/6 Credits" )
  1989: 	PORT_DIPSETTING(      0x0020, DEF_STR( 4C_5C ) )
  1990: 	PORT_DIPSETTING(      0x0060, DEF_STR( 2C_3C ) )
  1991: //	PORT_DIPSETTING(      0x0010, DEF_STR( 2C_3C ) )
  1992: 	PORT_DIPSETTING(      0x00e0, DEF_STR( 1C_2C ) )
  1993: 	PORT_DIPSETTING(      0x00d0, DEF_STR( 1C_3C ) )
  1994: 	PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_4C ) )
  1995: 	PORT_DIPSETTING(      0x00b0, DEF_STR( 1C_5C ) )
  1996: 	PORT_DIPSETTING(      0x00a0, DEF_STR( 1C_6C ) )
  1997: 
  1998: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
  1999: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  2000: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 )
  2001: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  2002: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER2 )
  2003: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER2 )
  2004: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_START2                       )
  2005: 	PORT_BIT_IMPULSE( 0x8000, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2006: 
  2007: 	PORT_START	// IN2 - ? - c00004.w
  2008: 	PORT_BIT(  0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )	// unused?
  2009: 
  2010: 	PORT_START	// IN3 - Other Buttons - c00006.w
  2011: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2012: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2013: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2014: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2015: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2016: 	PORT_BITX( 0x2000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2017: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_TILT  )
  2018: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 )
  2019: INPUT_PORTS_END
  2020: 
  2021: /***************************************************************************
  2022: 								Blood Warrior
  2023: ***************************************************************************/
  2024: 
  2025: INPUT_PORTS_START( bloodwar )
  2026: 	PORT_START	// IN0 - Player 2 - b00000.w
  2027: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER1 )
  2028: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER1 )
  2029: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER1 )
  2030: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER1 )
  2031: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER1 )
  2032: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER1 )
  2033: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3			|	IPF_PLAYER1 )
  2034: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_BUTTON4			|	IPF_PLAYER1 )
  2035: 
  2036: 	PORT_START	// IN1 - Player 2 - b00002.w
  2037: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP		|	IPF_PLAYER2 )
  2038: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN		|	IPF_PLAYER2 )
  2039: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT		|	IPF_PLAYER2 )
  2040: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT	|	IPF_PLAYER2 )
  2041: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1			|	IPF_PLAYER2 )
  2042: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2			|	IPF_PLAYER2 )
  2043: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3			|	IPF_PLAYER2 )
  2044: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_BUTTON4			|	IPF_PLAYER2 )
  2045: 
  2046: 	PORT_START	// IN2 - Coins - b00004.w
  2047: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  2048: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  2049: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  2050: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2051: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2052: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)
  2053: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  2054: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_SERVICE2	)	// tested
  2055: 
  2056: 	PORT_START	// IN3 - ? - b00006.w
  2057: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested
  2058: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2059: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )	// tested
  2060: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2061: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2062: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2063: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2064: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2065: 
  2066: 	PORT_START	// IN4 - DSW from the MCU - $10497e.b <- $208000.b
  2067: 	PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) )
  2068: 	PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  2069: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2070: 	PORT_SERVICE( 0x0200, IP_ACTIVE_LOW )
  2071: 	PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Flip_Screen ) )
  2072: 	PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
  2073: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2074: 	PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Difficulty ) )
  2075: 	PORT_DIPSETTING(      0x3800, "1 Easy" )
  2076: 	PORT_DIPSETTING(      0x3000, "2" )
  2077: 	PORT_DIPSETTING(      0x2800, "3" )
  2078: 	PORT_DIPSETTING(      0x2000, "4" )
  2079: 	PORT_DIPSETTING(      0x1800, "5" )
  2080: 	PORT_DIPSETTING(      0x1000, "6" )
  2081: 	PORT_DIPSETTING(      0x0800, "7" )
  2082: 	PORT_DIPSETTING(      0x0000, "8 Hard" )
  2083: 	PORT_DIPNAME( 0x4000, 0x4000, "Join During Game" )
  2084: 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  2085: 	PORT_DIPSETTING(      0x4000, DEF_STR( On ) )
  2086: 	PORT_DIPNAME( 0x8000, 0x8000, "Allow Continue" )
  2087: 	PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  2088: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2089: INPUT_PORTS_END
  2090: 
  2091: 
  2092: /***************************************************************************
  2093: 							Great 1000 Miles Rally
  2094: ***************************************************************************/
  2095: 
  2096: INPUT_PORTS_START( gtmr )
  2097: 	PORT_START	// IN0 - Player 1 - b00000.w
  2098: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  2099: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  2100: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  2101: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  2102: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 ) // swapped for consistency:
  2103: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) // button1 is usually accel.
  2104: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2105: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2106: 
  2107: 	PORT_START	// IN1 - Player 2 - b00002.w
  2108: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  2109: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  2110: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  2111: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  2112: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) // swapped for consistency:
  2113: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) // button1 is usually accel.
  2114: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2115: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2116: 
  2117: 	PORT_START	// IN2 - Coins - b00004.w
  2118: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  2119: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  2120: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  2121: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2122: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2123: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)
  2124: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  2125: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)
  2126: 
  2127: 	PORT_START	// IN3 - Seems unused ! - b00006.w
  2128: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2129: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2130: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2131: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2132: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2133: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2134: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2135: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2136: 
  2137: 	PORT_START	// IN4 - DSW from the MCU - 101265.b <- 206000.b
  2138: 	PORT_SERVICE( 0x0100, IP_ACTIVE_LOW )
  2139: 	PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
  2140: 	PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  2141: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  2142: 	PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Cabinet )  )
  2143: 	PORT_DIPSETTING(      0x0400, DEF_STR( Upright )  )
  2144: 	PORT_DIPSETTING(      0x0000, DEF_STR( Cocktail ) )
  2145: 	PORT_DIPNAME( 0x1800, 0x1800, "Controls"    )
  2146: 	PORT_DIPSETTING(      0x1800, "1 Joystick"  )
  2147: 	PORT_DIPSETTING(      0x0800, "2 Joysticks" )
  2148: 	PORT_DIPSETTING(      0x1000, "Wheel (360)" )
  2149: 	PORT_DIPSETTING(      0x0000, "Wheel (270)" )
  2150: 	PORT_DIPNAME( 0x2000, 0x2000, "Use Brake"    )
  2151: 	PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  2152: 	PORT_DIPSETTING(      0x2000, DEF_STR( On )  )
  2153: 	PORT_DIPNAME( 0xc000, 0xc000, "National Anthem & Flag" )
  2154: 	PORT_DIPSETTING(      0xc000, "Use Memory"  )
  2155: 	PORT_DIPSETTING(      0x8000, "Anthem Only" )
  2156: 	PORT_DIPSETTING(      0x4000, "Flag Only"   )
  2157: 	PORT_DIPSETTING(      0x0000, "None"        )
  2158: 
  2159: 	PORT_START	// IN5 - Wheel - 100015.b <- ffffe.b
  2160: 	PORT_ANALOG ( 0x00ff, 0x0080, IPT_AD_STICK_X | IPF_CENTER, 30, 1, 0x00, 0xff )
  2161: INPUT_PORTS_END
  2162: 
  2163: 
  2164: /***************************************************************************
  2165: 							Great 1000 Miles Rally 2
  2166: ***************************************************************************/
  2167: 
  2168: INPUT_PORTS_START( gtmr2 )
  2169: 	PORT_START	// IN0 - Player 1 - 100004.w <- b00000.w (cpl)
  2170: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  2171: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  2172: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  2173: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  2174: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 ) // swapped for consistency:
  2175: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 ) // button1 is usually accel.
  2176: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2177: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2178: 
  2179: 	PORT_START	// IN1 - Player 2 - 10000c.w <- b00002.w (cpl) - for "test mode" only
  2180: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  2181: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  2182: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  2183: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  2184: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 ) // swapped for consistency:
  2185: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) // button1 is usually accel.
  2186: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2187: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2188: 
  2189: 	PORT_START	// IN2 - Coins - 100014.w <- b00004.w (cpl)
  2190: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  2191: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)	// only in "test mode"
  2192: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  2193: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2194: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2195: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT	)
  2196: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  2197: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)
  2198: 
  2199: 	PORT_START	// IN3 - 100017.w <- b00006.w
  2200: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2201: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2202: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2203: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2204: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2205: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2206: 	PORT_BITX( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3, "IN 3-6", IP_KEY_DEFAULT, IP_JOY_NONE )	// Code at 0x002236 - Centers 270D wheel ?
  2207: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2208: 
  2209: 	PORT_START	// IN4 - DSW from the MCU - 1016f7.b <- 206000.b
  2210: 	PORT_DIPNAME( 0x0700, 0x0700, "Communication" )
  2211: 	PORT_DIPSETTING(      0x0700, "None" )
  2212: 	PORT_DIPSETTING(      0x0600, "Machine 1" )
  2213: 	PORT_DIPSETTING(      0x0500, "Machine 2" )
  2214: 	PORT_DIPSETTING(      0x0400, "Machine 3" )
  2215: 	PORT_DIPSETTING(      0x0300, "Machine 4" )
  2216: 	/* 0x0000 to 0x0200 : "Machine 4"
  2217: 	PORT_DIPSETTING(      0x0200, "Machine 4 (0x0200)" )
  2218: 	PORT_DIPSETTING(      0x0100, "Machine 4 (0x0100)" )
  2219: 	PORT_DIPSETTING(      0x0000, "Machine 4 (0x0000)" )
  2220: 	*/
  2221: 	PORT_DIPNAME( 0x1800, 0x1800, "Controls" )
  2222: 	PORT_DIPSETTING(      0x1800, "Joystick" )
  2223: 	PORT_DIPSETTING(      0x0800, "Wheel (360)" )			// Not working correctly in race
  2224: 	PORT_DIPSETTING(      0x1000, "Wheel (270D)" )			// Not working correctly !
  2225: 	PORT_DIPSETTING(      0x0000, "Wheel (270A)" )			// Not working correctly in race
  2226: 	PORT_DIPNAME( 0x2000, 0x2000, "Pedal Function" )
  2227: 	PORT_DIPSETTING(      0x2000, "Microswitch" )
  2228: //	PORT_DIPSETTING(      0x0000, "Potentiometer" )			// Not implemented yet
  2229: 	PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Flip_Screen ) )
  2230: 	PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
  2231: 	PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
  2232: 	PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
  2233: 
  2234: 	PORT_START	// IN5 - Wheel (270A) - 100019.b <- fffff.b
  2235: 	PORT_ANALOG ( 0x00ff, 0x0080, IPT_AD_STICK_X | IPF_CENTER, 30, 1, 0x00, 0xff )
  2236: 
  2237: 	PORT_START	// IN6 - Wheel (270D) - 100019.b <- ffffe.b
  2238: 	PORT_ANALOG ( 0x00ff, 0x0080, IPT_AD_STICK_X, 30, 1, 0x00, 0xff )
  2239: 
  2240: 	PORT_START	// IN7 - Wheel (360) - 100019.b <- ffffe.b
  2241: 	PORT_ANALOGX( 0x00ff, 0x0080, IPT_DIAL, 30, 1, 0, 0, KEYCODE_LEFT, KEYCODE_RIGHT, 0, 0 )
  2242: 
  2243: 	PORT_START	// Fake IN1 - To be pressed during boot sequence - Code at 0x000c9e
  2244: 	PORT_BITX( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON5, "IN 1-0", KEYCODE_H, IP_JOY_NONE )	// "sound test"
  2245: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2246: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2247: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2248: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON6, "IN 1-4", KEYCODE_J, IP_JOY_NONE )	// "view tiles"
  2249: 	PORT_BITX( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON7, "IN 1-5", KEYCODE_K, IP_JOY_NONE )	// "view memory"
  2250: 	PORT_BITX( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON8, "IN 1-6", KEYCODE_L, IP_JOY_NONE )	// "view sprites ?"
  2251: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2252: INPUT_PORTS_END
  2253: 
  2254: 
  2255: /***************************************************************************
  2256: 								Magical Crystal
  2257: ***************************************************************************/
  2258: 
  2259: INPUT_PORTS_START( mgcrystl )
  2260: 	PORT_START	// IN0 - Player 1 + DSW - c00000.w
  2261: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  2262: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  2263: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2264: 	PORT_SERVICE( 0x0002, IP_ACTIVE_LOW )
  2265: 	PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
  2266: 	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  2267: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2268: 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
  2269: 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  2270: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2271: 	PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
  2272: 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  2273: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2274: 	PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
  2275: 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  2276: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2277: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )	// TESTED!
  2278: 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  2279: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2280: 	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
  2281: 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  2282: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2283: 
  2284: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
  2285: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER1 )
  2286: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 )
  2287: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  2288: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER1 )
  2289: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER1 )
  2290: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2291: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2292: 
  2293: 	PORT_START	// IN1 - Player 2 - c00002.b
  2294: 	PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )
  2295: 	PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  2296: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2297: 	PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
  2298: 	PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  2299: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2300: 	PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
  2301: 	PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  2302: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2303: 	PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
  2304: 	PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  2305: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2306: 	PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
  2307: 	PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  2308: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2309: 	PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
  2310: 	PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  2311: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2312: 	PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
  2313: 	PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  2314: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2315: 	PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
  2316: 	PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  2317: 	PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  2318: 
  2319: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
  2320: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_PLAYER2 )
  2321: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 )
  2322: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  2323: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER2 )
  2324: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER2 )
  2325: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2326: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2327: 
  2328: 	PORT_START	// IN2 - Other Buttons - c00004.b
  2329: 	PORT_BIT ( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  2330: 	PORT_BIT ( 0x0100, IP_ACTIVE_LOW, IPT_START1   )
  2331: 	PORT_BIT ( 0x0200, IP_ACTIVE_LOW, IPT_START2   )
  2332: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  2333: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2334: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2335: 	PORT_BIT ( 0x2000, IP_ACTIVE_LOW, IPT_TILT     )
  2336: 	PORT_BIT ( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 )
  2337: 	PORT_BIT ( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  2338: INPUT_PORTS_END
  2339: 
  2340: 
  2341: /***************************************************************************
  2342: 								Sand Scorpion
  2343: ***************************************************************************/
  2344: 
  2345: INPUT_PORTS_START( sandscrp )
  2346: 	PORT_START	// IN0 - $b00000.w
  2347: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER1 )
  2348: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN	| IPF_PLAYER1 )
  2349: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER1 )
  2350: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
  2351: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER1 )
  2352: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER1 )
  2353: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2354: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2355: 
  2356: 	PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2357: 
  2358: 	PORT_START	// IN1 - $b00002.w
  2359: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_PLAYER2 )
  2360: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN	| IPF_PLAYER2 )
  2361: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_PLAYER2 )
  2362: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
  2363: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1        | IPF_PLAYER2 )
  2364: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2        | IPF_PLAYER2 )
  2365: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2366: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2367: 
  2368: 	PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2369: 
  2370: 	PORT_START	// IN2 - $b00004.w
  2371: 	PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1   )
  2372: 	PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2   )
  2373: 	PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1    )
  2374: 	PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN2    )
  2375: 	PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_TILT     )
  2376: 	PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  2377: 	PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
  2378: 	PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  2379: 
  2380: 	PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2381: 
  2382: 	PORT_START	// IN3 - $b00006.w
  2383: 	PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2384: 
  2385: 	PORT_START	// IN4 - DSW 1 read by the Z80 through the sound chip
  2386: 	PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  2387: 	PORT_DIPSETTING(    0x02, "1" )
  2388: 	PORT_DIPSETTING(    0x01, "2" )
  2389: 	PORT_DIPSETTING(    0x03, "3" )
  2390: 	PORT_DIPSETTING(    0x00, "5" )
  2391: 	PORT_DIPNAME( 0x0c, 0x0c, "Bombs" )
  2392: 	PORT_DIPSETTING(    0x08, "1" )
  2393: 	PORT_DIPSETTING(    0x04, "2" )
  2394: 	PORT_DIPSETTING(    0x0c, "3" )
  2395: 	PORT_DIPSETTING(    0x00, "5" )
  2396: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  2397: 	PORT_DIPSETTING(    0x30, "Easy"    )
  2398: 	PORT_DIPSETTING(    0x20, "Normal"  )
  2399: 	PORT_DIPSETTING(    0x10, "Hard"    )
  2400: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2401: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) )
  2402: 	PORT_DIPSETTING(    0x80, "100K, 300K" )
  2403: 	PORT_DIPSETTING(    0xc0, "200K, 500K" )
  2404: 	PORT_DIPSETTING(    0x40, "500K, 1000K" )
  2405: 	PORT_DIPSETTING(    0x00, "1000K, 3000K" )
  2406: 
  2407: 	PORT_START	// IN5 - DSW 2 read by the Z80 through the sound chip
  2408: 	PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coinage ) )
  2409: 	PORT_DIPSETTING(    0x0a, DEF_STR( 6C_1C ) )
  2410: 	PORT_DIPSETTING(    0x0b, DEF_STR( 5C_1C ) )
  2411: 	PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  2412: 	PORT_DIPSETTING(    0x0d, DEF_STR( 3C_1C ) )
  2413: 	PORT_DIPSETTING(    0x01, DEF_STR( 8C_3C ) )
  2414: 	PORT_DIPSETTING(    0x0e, DEF_STR( 2C_1C ) )
  2415: 	PORT_DIPSETTING(    0x02, DEF_STR( 5C_3C ) )
  2416: 	PORT_DIPSETTING(    0x03, DEF_STR( 3C_2C ) )
  2417: 	PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  2418: 	PORT_DIPSETTING(    0x04, DEF_STR( 2C_3C ) )
  2419: 	PORT_DIPSETTING(    0x09, DEF_STR( 1C_2C ) )
  2420: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )
  2421: 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_4C ) )
  2422: 	PORT_DIPSETTING(    0x06, DEF_STR( 1C_5C ) )
  2423: 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
  2424: 	PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  2425: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
  2426: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  2427: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2428: 	PORT_DIPNAME( 0x20, 0x20, "Allow Continue" )
  2429: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2430: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  2431: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )
  2432: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2433: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  2434: 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  2435: INPUT_PORTS_END
  2436: 
  2437: 
  2438: /***************************************************************************
  2439: 								Shogun Warriors
  2440: ***************************************************************************/
  2441: 
  2442: INPUT_PORTS_START( shogwarr )
  2443: 	PORT_START	// IN0 - - b80000.w
  2444: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER1 )
  2445: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER1 )
  2446: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER1 )
  2447: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER1 )
  2448: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
  2449: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  2450: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
  2451: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// ? tested
  2452: 
  2453: 	PORT_START	// IN1 - - b80002.w
  2454: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  2455: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  2456: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  2457: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  2458: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  2459: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  2460: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  2461: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )	// ? tested
  2462: 
  2463: 	PORT_START	// IN2 - Coins - b80004.w
  2464: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_START1	)
  2465: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_START2	)
  2466: 	PORT_BIT_IMPULSE( 0x0400, IP_ACTIVE_LOW, IPT_COIN1, 2 )
  2467: 	PORT_BIT_IMPULSE( 0x0800, IP_ACTIVE_LOW, IPT_COIN2, 2 )
  2468: 	PORT_BITX( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  2469: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_TILT		)
  2470: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_SERVICE1	)
  2471: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN	)	// ? tested
  2472: 
  2473: 	PORT_START	// IN3 - ? - b80006.w
  2474: 	PORT_BIT(  0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2475: 	PORT_BIT(  0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2476: 	PORT_BIT(  0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2477: 	PORT_BIT(  0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2478: 	PORT_BIT(  0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2479: 	PORT_BIT(  0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2480: 	PORT_BIT(  0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2481: 	PORT_BIT(  0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2482: 
  2483: 	PORT_START	// IN4 - DSW from the MCU - 102e15.b <- 200059.b
  2484: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  2485: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2486: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2487: 	PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
  2488: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) )
  2489: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2490: 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  2491: 	PORT_DIPNAME( 0x38, 0x38, DEF_STR( Difficulty ) )
  2492: 	PORT_DIPSETTING(    0x38, "1" )	// easy
  2493: 	PORT_DIPSETTING(    0x30, "2" )
  2494: 	PORT_DIPSETTING(    0x28, "3" )
  2495: 	PORT_DIPSETTING(    0x20, "4" )
  2496: 	PORT_DIPSETTING(    0x18, "5" )
  2497: 	PORT_DIPSETTING(    0x10, "6" )
  2498: 	PORT_DIPSETTING(    0x08, "7" )
  2499: 	PORT_DIPSETTING(    0x00, "8" )
  2500: 	PORT_DIPNAME( 0x40, 0x40, "Can Join During Game" )
  2501: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )	//	2 credits		winner vs computer
  2502: 	PORT_DIPSETTING(    0x40, DEF_STR( On ) )	//	1 credit		game over
  2503: 	PORT_DIPNAME( 0x80, 0x80, "Special Continue Mode" )
  2504: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2505: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2506: INPUT_PORTS_END
  2507: 
  2508: 
  2509: 
  2510: /***************************************************************************
  2511: 
  2512: 
  2513: 								Graphics Layouts
  2514: 
  2515: 
  2516: ***************************************************************************/
  2517: 
  2518: 
  2519: /*
  2520: 	16x16x4 made of 4 8x8x4 blocks arrenged like:		 	01
  2521:  	(nibbles are swapped for tiles, not for sprites)		23
  2522: */
  2523: static struct GfxLayout layout_16x16x4 =
  2524: {
  2525: 	16,16,
  2526: 	RGN_FRAC(1,1),
  2527: 	4,
  2528: 	{ STEP4(0,1) },
  2529: 	{ STEP8(8*8*4*0,4),   STEP8(8*8*4*1,4)   },
  2530: 	{ STEP8(8*8*4*0,8*4), STEP8(8*8*4*2,8*4) },
  2531: 	16*16*4
  2532: };
  2533: 
  2534: /*
  2535: 	16x16x8 made of 4 8x8x8 blocks arrenged like:	01
  2536: 													23
  2537: */
  2538: static struct GfxLayout layout_16x16x8 =
  2539: {
  2540: 	16,16,
  2541: 	RGN_FRAC(1,1),
  2542: 	8,
  2543: 	{ STEP8(0,1) },
  2544: 	{ STEP8(0,8),   STEP8(8*8*8*1,8)   },
  2545: 	{ STEP8(0,8*8), STEP8(8*8*8*2,8*8) },
  2546: 	16*16*8
  2547: };
  2548: 
  2549: static struct GfxDecodeInfo kaneko16_gfx_1x4bit_1x4bit[] =
  2550: {
  2551: 	{ REGION_GFX1, 0, &layout_16x16x4, 0,			0x40 }, // [0] Sprites
  2552: 	{ REGION_GFX2, 0, &layout_16x16x4, 0x40 * 16,	0x40 }, // [1] Layers
  2553: 	{ -1 }
  2554: };
  2555: static struct GfxDecodeInfo kaneko16_gfx_1x4bit_2x4bit[] =
  2556: {
  2557: 	{ REGION_GFX1, 0, &layout_16x16x4, 0,			0x40 }, // [0] Sprites
  2558: 	{ REGION_GFX2, 0, &layout_16x16x4, 0x40 * 16,	0x40 }, // [1] Layers
  2559: 	{ REGION_GFX3, 0, &layout_16x16x4, 0x40 * 16,	0x40 }, // [2] Layers
  2560: 	{ -1 }
  2561: };
  2562: static struct GfxDecodeInfo kaneko16_gfx_1x8bit_2x4bit[] =
  2563: {
  2564: 	{ REGION_GFX1, 0, &layout_16x16x8,	0x40 * 256,	0x40 }, // [0] Sprites
  2565: 	{ REGION_GFX2, 0, &layout_16x16x4,	0,			0x40 }, // [1] Layers
  2566: 	{ REGION_GFX3, 0, &layout_16x16x4,	0,			0x40 }, // [2] Layers
  2567: 	{ -1 }
  2568: };
  2569: 
  2570: /* 16x16x4 tiles (made of four 8x8 tiles) */
  2571: static struct GfxLayout layout_16x16x4_2 =
  2572: {
  2573: 	16,16,
  2574: 	RGN_FRAC(1,1),
  2575: 	4,
  2576: 	{ STEP4(0,1) },
  2577: 	{ STEP4(8*8*4*0 + 3*4, -4), STEP4(8*8*4*0 + 7*4, -4),
  2578: 	  STEP4(8*8*4*1 + 3*4, -4), STEP4(8*8*4*1 + 7*4, -4) },
  2579: 	{ STEP8(8*8*4*0, 8*4),     STEP8(8*8*4*2, 8*4) },
  2580: 	16*16*4
  2581: };
  2582: static struct GfxDecodeInfo sandscrp_gfxdecodeinfo[] =
  2583: {
  2584: 	{ REGION_GFX1, 0, &layout_16x16x4,   0x000, 0x10 }, // [0] Sprites
  2585: 	{ REGION_GFX2, 0, &layout_16x16x4_2, 0x400, 0x40 }, // [1] Layers
  2586: 	{ -1 }
  2587: };
  2588: 
  2589: 
  2590: /***************************************************************************
  2591: 
  2592: 
  2593: 								Machine Drivers
  2594: 
  2595: 
  2596: ***************************************************************************/
  2597: 
  2598: #define KANEKO16_INTERRUPTS_NUM	3 
  2599: INTERRUPT_GEN( kaneko16_interrupt )
  2600: {
  2601: 	switch ( cpu_getiloops() )
  2602: 	{
  2603: 		case 2:  cpu_set_irq_line(0, 3, HOLD_LINE);	break;
  2604: 		case 1:  cpu_set_irq_line(0, 4, HOLD_LINE); break;
  2605: 		case 0:  cpu_set_irq_line(0, 5, HOLD_LINE); break;
  2606: 	}
  2607: }
  2608: 
  2609: static struct OKIM6295interface okim6295_intf_8kHz =
  2610: {
  2611: 	1,
  2612: 	{ 8000 },
  2613: 	{ REGION_SOUND1 },
  2614: 	{ 100 }
  2615: };
  2616: static struct OKIM6295interface okim6295_intf_12kHz =
  2617: {
  2618: 	1,
  2619: 	{ 12000000/6/165 }, /* 2MHz -> 6295 (mode A) */
  2620: 	{ REGION_SOUND1 },
  2621: 	{ 100 }
  2622: };
  2623: static struct OKIM6295interface okim6295_intf_15kHz =
  2624: {
  2625: 	1,
  2626: 	{ 12000000/6/132 }, /* 2MHz -> 6295 (mode B) */
  2627: 	{ REGION_SOUND1 },
  2628: 	{ 100 }
  2629: };
  2630: static struct OKIM6295interface okim6295_intf_18kHz =
  2631: {
  2632: 	1,
  2633: 	{ 12000000/4/165 }, /* 3MHz -> 6295 (mode A) */
  2634: 	{ REGION_SOUND1 },
  2635: 	{ 100 }
  2636: };
  2637: static struct OKIM6295interface okim6295_intf_2x12kHz =
  2638: {
  2639: 	2,
  2640: 	{ 12000, 12000 },
  2641: 	{ REGION_SOUND1, REGION_SOUND2 },
  2642: 	{ 100, 100 }
  2643: };
  2644: 
  2645: static struct AY8910interface ay8910_intf_2x1MHz_DSW =
  2646: {
  2647: 	2,
  2648: 	1000000,	/* ? */
  2649: 	{ MIXER(100,MIXER_PAN_LEFT), MIXER(100,MIXER_PAN_RIGHT) },
  2650: 	{ input_port_4_r, 0 },	/* input A: DSW 1 */
  2651: 	{ input_port_5_r, 0 },	/* input B: DSW 2 */
  2652: 	{ 0, 0 },
  2653: 	{ 0, 0 }
  2654: };
  2655: static struct AY8910interface ay8910_intf_2x2MHz_EEPROM =
  2656: {
  2657: 	2,
  2658: 	2000000,	/* ? */
  2659: 	{ MIXER(100,MIXER_PAN_LEFT), MIXER(100,MIXER_PAN_RIGHT) },
  2660: 	{ 0, kaneko16_eeprom_r },		/* inputs  A:  0,EEPROM bit read */
  2661: 	{ 0, 0 },						/* inputs  B */
  2662: 	{ 0, 0 },						/* outputs A */
  2663: 	{ 0, kaneko16_eeprom_reset_w }	/* outputs B:  0,EEPROM reset */
  2664: };
  2665: 
  2666: static struct YM2151interface ym2151_intf_blazeon =
  2667: {
  2668: 	1,
  2669: 	4000000,			/* ? */
  2670: 	{ YM3012_VOL(100,MIXER_PAN_LEFT,100,MIXER_PAN_RIGHT) },
  2671: 	{ 0 },				/* irq handler */
  2672: 	{ 0 }				/* port_write */
  2673: };
  2674: 
  2675: 
  2676: /***************************************************************************
  2677: 								The Berlin Wall
  2678: ***************************************************************************/
  2679: 
  2680: /*
  2681: 	Berlwall interrupts:
  2682: 
  2683: 	1-3]	e8c:
  2684: 	4]		e54:
  2685: 	5]		de4:
  2686: 	6-7]	rte
  2687: */
  2688: 
  2689: static MACHINE_DRIVER_START( berlwall )
  2690: 
  2691: 	/* basic machine hardware */
  2692: 	MDRV_CPU_ADD(M68000, 12000000)	/* MC68000P12 */
  2693: 	MDRV_CPU_MEMORY(berlwall_readmem,berlwall_writemem)
  2694: 	MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM)
  2695: 
  2696: 	MDRV_FRAMES_PER_SECOND(60)
  2697: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
  2698: 
  2699: 	MDRV_MACHINE_INIT(berlwall)
  2700: 
  2701: 	/* video hardware */
  2702: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)	// mangled sprites otherwise
  2703: 	MDRV_SCREEN_SIZE(256, 256)
  2704: 	MDRV_VISIBLE_AREA(0, 256-1, 16, 240-1)
  2705: 	MDRV_GFXDECODE(kaneko16_gfx_1x4bit_1x4bit)
  2706: 	MDRV_PALETTE_LENGTH(2048 + 32768)	/* 32768 static colors for the bg */
  2707: 
  2708: 	MDRV_PALETTE_INIT(berlwall)
  2709: 	MDRV_VIDEO_START(berlwall)
  2710: 	MDRV_VIDEO_UPDATE(kaneko16)
  2711: 
  2712: 	/* sound hardware */
  2713: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  2714: 	MDRV_SOUND_ADD(AY8910, ay8910_intf_2x1MHz_DSW)
  2715: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_12kHz)
  2716: MACHINE_DRIVER_END
  2717: 
  2718: 
  2719: /***************************************************************************
  2720: 							Bakuretsu Breaker
  2721: ***************************************************************************/
  2722: 
  2723: static MACHINE_DRIVER_START( bakubrkr )
  2724: 
  2725: 	/* basic machine hardware */
  2726: 	MDRV_CPU_ADD(M68000, 16000000)	/* ? */
  2727: 	MDRV_CPU_MEMORY(bakubrkr_readmem,bakubrkr_writemem)
  2728: 	MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM)
  2729: 
  2730: 	MDRV_FRAMES_PER_SECOND(60)
  2731: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
  2732: 
  2733: 	MDRV_MACHINE_INIT(kaneko16)
  2734: 	MDRV_NVRAM_HANDLER(93C46)
  2735: 
  2736: 	/* video hardware */
  2737: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)	// mangled sprites otherwise
  2738: 	MDRV_SCREEN_SIZE(256, 256)
  2739: 	MDRV_VISIBLE_AREA(0, 256-1, 16, 240-1)
  2740: 	MDRV_GFXDECODE(kaneko16_gfx_1x4bit_2x4bit)
  2741: 	MDRV_PALETTE_LENGTH(2048)
  2742: 
  2743: 	MDRV_VIDEO_START(kaneko16_2xVIEW2)
  2744: 	MDRV_VIDEO_UPDATE(kaneko16)
  2745: 
  2746: 	/* sound hardware */
  2747: 	MDRV_SOUND_ADD(AY8910, ay8910_intf_2x2MHz_EEPROM)
  2748: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_8kHz)
  2749: MACHINE_DRIVER_END
  2750: 
  2751: 
  2752: /***************************************************************************
  2753: 									Blaze On
  2754: ***************************************************************************/
  2755: 
  2756: /*
  2757: 	Blaze On:
  2758: 		1]		busy loop
  2759: 		2]		does nothing
  2760: 		3]		rte
  2761: 		4]		drives the game
  2762: 		5]		== 2
  2763: 		6-7]	busy loop
  2764: */
  2765: 
  2766: static MACHINE_DRIVER_START( blazeon )
  2767: 
  2768: 	/* basic machine hardware */
  2769: 	MDRV_CPU_ADD(M68000,12000000)	/* TMP68HC000-12 */
  2770: 	MDRV_CPU_MEMORY(blazeon_readmem,blazeon_writemem)
  2771: 	MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM)
  2772: 
  2773: 	MDRV_CPU_ADD(Z80,4000000)	/* D780C-2 */
  2774: 	MDRV_CPU_MEMORY(blazeon_sound_readmem,blazeon_sound_writemem)
  2775: 	MDRV_CPU_PORTS(blazeon_sound_readport,blazeon_sound_writeport)
  2776: 
  2777: 	MDRV_FRAMES_PER_SECOND(60)
  2778: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
  2779: 
  2780: 	MDRV_MACHINE_INIT(blazeon)
  2781: 
  2782: 	/* video hardware */
  2783: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)
  2784: 	MDRV_SCREEN_SIZE(320, 240)
  2785: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 240-1 -8)
  2786: 	MDRV_GFXDECODE(kaneko16_gfx_1x4bit_1x4bit)
  2787: 	MDRV_PALETTE_LENGTH(2048)
  2788: 
  2789: 	MDRV_VIDEO_START(kaneko16_1xVIEW2)
  2790: 	MDRV_VIDEO_UPDATE(kaneko16)
  2791: 
  2792: 	/* sound hardware */
  2793: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  2794: 	MDRV_SOUND_ADD(YM2151, ym2151_intf_blazeon)
  2795: MACHINE_DRIVER_END
  2796: 
  2797: 
  2798: 
  2799: /***************************************************************************
  2800: 							Great 1000 Miles Rally
  2801: ***************************************************************************/
  2802: 
  2803: /*
  2804: 	gtmr interrupts:
  2805: 
  2806: 	3] 476:			time, input ports, scroll registers
  2807: 	4] 466->258e:	set sprite ram
  2808: 	5] 438:			set sprite colors
  2809: 
  2810: 	VIDEO_UPDATE_AFTER_VBLANK fixes the mangled/wrong colored sprites
  2811: */
  2812: 
  2813: static MACHINE_DRIVER_START( gtmr )
  2814: 
  2815: 	/* basic machine hardware */
  2816: 	MDRV_CPU_ADD_TAG("gtmr", M68000, 16000000)	/* ? Most likely a 68000-HC16 */
  2817: 	MDRV_CPU_MEMORY(gtmr_readmem,gtmr_writemem)
  2818: 	MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM)
  2819: 
  2820: 	MDRV_FRAMES_PER_SECOND(60)
  2821: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
  2822: 
  2823: 	MDRV_MACHINE_INIT(gtmr)
  2824: 
  2825: 	/* video hardware */
  2826: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)
  2827: 	MDRV_SCREEN_SIZE(320, 240)
  2828: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 240-1)
  2829: 	MDRV_GFXDECODE(kaneko16_gfx_1x8bit_2x4bit)
  2830: 	MDRV_PALETTE_LENGTH(32768)
  2831: 
  2832: 	MDRV_VIDEO_START(kaneko16_2xVIEW2)
  2833: 	MDRV_VIDEO_UPDATE(kaneko16)
  2834: 
  2835: 	/* sound hardware */
  2836: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_2x12kHz)
  2837: MACHINE_DRIVER_END
  2838: 
  2839: /***************************************************************************
  2840: 								Blood Warrior
  2841: ***************************************************************************/
  2842: 
  2843: static MACHINE_DRIVER_START( bloodwar )
  2844: 
  2845: 	/* basic machine hardware */
  2846: 	MDRV_IMPORT_FROM(gtmr)
  2847: 	MDRV_CPU_MODIFY("gtmr")
  2848: 	MDRV_CPU_MEMORY(bloodwar_readmem,bloodwar_writemem)
  2849: 
  2850: 	MDRV_MACHINE_INIT( bloodwar )
  2851: 
  2852: MACHINE_DRIVER_END
  2853: 
  2854: /***************************************************************************
  2855: 							Great 1000 Miles Rally 2
  2856: ***************************************************************************/
  2857: 
  2858: static MACHINE_DRIVER_START( gtmr2 )
  2859: 
  2860: 	/* basic machine hardware */
  2861: 	MDRV_IMPORT_FROM(gtmr)
  2862: 	MDRV_CPU_MODIFY("gtmr")
  2863: 	MDRV_CPU_MEMORY(gtmr2_readmem,gtmr_writemem)
  2864: MACHINE_DRIVER_END
  2865: 
  2866: /***************************************************************************
  2867: 								Magical Crystal
  2868: ***************************************************************************/
  2869: 
  2870: static MACHINE_DRIVER_START( mgcrystl )
  2871: 
  2872: 	/* basic machine hardware */
  2873: 	MDRV_CPU_ADD(M68000, 12000000)
  2874: 	MDRV_CPU_MEMORY(mgcrystl_readmem,mgcrystl_writemem)
  2875: 	MDRV_CPU_VBLANK_INT(kaneko16_interrupt,KANEKO16_INTERRUPTS_NUM)
  2876: 
  2877: 	MDRV_FRAMES_PER_SECOND(60)
  2878: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)
  2879: 
  2880: 	MDRV_MACHINE_INIT(mgcrystl)
  2881: 	MDRV_NVRAM_HANDLER(93C46)
  2882: 
  2883: 	/* video hardware */
  2884: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_AFTER_VBLANK)
  2885: 	MDRV_SCREEN_SIZE(256, 256)
  2886: 	MDRV_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1)
  2887: 	MDRV_GFXDECODE(kaneko16_gfx_1x4bit_2x4bit)
  2888: 	MDRV_PALETTE_LENGTH(2048)
  2889: 
  2890: 	MDRV_VIDEO_START(kaneko16_2xVIEW2)
  2891: 	MDRV_VIDEO_UPDATE(kaneko16)
  2892: 
  2893: 	/* sound hardware */
  2894: 	MDRV_SOUND_ADD(AY8910, ay8910_intf_2x2MHz_EEPROM)
  2895: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_18kHz)
  2896: MACHINE_DRIVER_END
  2897: 
  2898: 
  2899: /***************************************************************************
  2900: 								Sand Scorpion
  2901: ***************************************************************************/
  2902: 
  2903: /* YM3014B + YM2203C */
  2904: 
  2905: static void irq_handler(int irq)
  2906: {
  2907: 	cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
  2908: }
  2909: 
  2910: static struct YM2203interface ym2203_intf_sandscrp =
  2911: {
  2912: 	1,
  2913: 	4000000,	/* ? */
  2914: 	{ YM2203_VOL(100,100) },
  2915: 	{ input_port_4_r },	/* Port A Read - DSW 1 */
  2916: 	{ input_port_5_r },	/* Port B Read - DSW 2 */
  2917: 	{ 0 },	/* Port A Write */
  2918: 	{ 0 },	/* Port B Write */
  2919: 	{ irq_handler },	/* IRQ handler */
  2920: };
  2921: 
  2922: 
  2923: static MACHINE_DRIVER_START( sandscrp )
  2924: 
  2925: 	/* basic machine hardware */
  2926: 	MDRV_CPU_ADD(M68000,12000000)	/* TMP68HC000N-12 */
  2927: 	MDRV_CPU_MEMORY(sandscrp_readmem,sandscrp_writemem)
  2928: 	MDRV_CPU_VBLANK_INT(sandscrp_interrupt,1)
  2929: 
  2930: 	MDRV_CPU_ADD(Z80,4000000)	/* Z8400AB1, Reads the DSWs: it can't be disabled */
  2931: 	MDRV_CPU_MEMORY(sandscrp_sound_readmem,sandscrp_sound_writemem)
  2932: 	MDRV_CPU_PORTS(sandscrp_sound_readport,sandscrp_sound_writeport)
  2933: 
  2934: 	MDRV_FRAMES_PER_SECOND(60)
  2935: 	MDRV_VBLANK_DURATION(DEFAULT_REAL_60HZ_VBLANK_DURATION)	// eof callback
  2936: 
  2937: 	MDRV_MACHINE_INIT(sandscrp)
  2938: 
  2939: 	/* video hardware */
  2940: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
  2941: 	MDRV_SCREEN_SIZE(256, 256)
  2942: 	MDRV_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1)
  2943: 	MDRV_GFXDECODE(sandscrp_gfxdecodeinfo)
  2944: 	MDRV_PALETTE_LENGTH(2048)
  2945: 
  2946: 	MDRV_VIDEO_START(sandscrp_1xVIEW2)
  2947: 	MDRV_VIDEO_EOF(sandscrp)
  2948: 	MDRV_VIDEO_UPDATE(kaneko16)
  2949: 
  2950: 	/* sound hardware */
  2951: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
  2952: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_15kHz)
  2953: 	MDRV_SOUND_ADD(YM2203, ym2203_intf_sandscrp)
  2954: MACHINE_DRIVER_END
  2955: 
  2956: 
  2957: /***************************************************************************
  2958: 								Shogun Warriors
  2959: ***************************************************************************/
  2960: 
  2961: /*
  2962: 	shogwarr interrupts:
  2963: 
  2964: 	2] 100:	rte
  2965: 	3] 102:
  2966: 	4] 136:
  2967: 		movem.l D0-D7/A0-A6, -(A7)
  2968: 		movea.l $207808.l, A0	; from mcu?
  2969: 		jmp     ($4,A0)
  2970: 
  2971: 	other: busy loop
  2972: */
  2973: #define SHOGWARR_INTERRUPTS_NUM	3 
  2974: INTERRUPT_GEN( shogwarr_interrupt )
  2975: {
  2976: 	switch ( cpu_getiloops() )
  2977: 	{
  2978: 		case 2:  cpu_set_irq_line(0, 2, HOLD_LINE); break;
  2979: 		case 1:  cpu_set_irq_line(0, 3, HOLD_LINE); break;
  2980: //		case 0:  cpu_set_irq_line(0, 4, HOLD_LINE); break;
  2981: 	}
  2982: }
  2983: 
  2984: static MACHINE_DRIVER_START( shogwarr )
  2985: 
  2986: 	/* basic machine hardware */
  2987: 	MDRV_CPU_ADD(M68000, 12000000)
  2988: 	MDRV_CPU_MEMORY(shogwarr_readmem,shogwarr_writemem)
  2989: 	MDRV_CPU_VBLANK_INT(shogwarr_interrupt,SHOGWARR_INTERRUPTS_NUM)
  2990: 
  2991: 	MDRV_FRAMES_PER_SECOND(60)
  2992: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
  2993: 
  2994: 	MDRV_MACHINE_INIT(shogwarr)
  2995: 
  2996: 	/* video hardware */
  2997: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
  2998: 	MDRV_SCREEN_SIZE(320, 240)
  2999: 	MDRV_VISIBLE_AREA(0, 320-1, 0, 240-1)
  3000: 	MDRV_GFXDECODE(kaneko16_gfx_1x4bit_1x4bit)
  3001: 	MDRV_PALETTE_LENGTH(2048)
  3002: 
  3003: 	MDRV_VIDEO_START(kaneko16_1xVIEW2)
  3004: 	MDRV_VIDEO_UPDATE(kaneko16)
  3005: 
  3006: 	/* sound hardware */
  3007: 	MDRV_SOUND_ADD(OKIM6295, okim6295_intf_2x12kHz)
  3008: MACHINE_DRIVER_END
  3009: 
  3010: 
  3011: /***************************************************************************
  3012: 
  3013: 
  3014: 								ROMs Loading
  3015: 
  3016: 
  3017: ***************************************************************************/
  3018: 
  3019: /*
  3020:  Sprites and tiles are stored in the ROMs using the same layout. But tiles
  3021:  have the even and odd pixels swapped. So we use this function to untangle
  3022:  them and have one single gfxlayout for both tiles and sprites.
  3023: */
  3024: void kaneko16_unscramble_tiles(int region)
  3025: {
  3026: 	unsigned char *RAM	=	memory_region(region);
  3027: 	int size			=	memory_region_length(region);
  3028: 	int i;
  3029: 
  3030: 	if (RAM == NULL)	return;
  3031: 
  3032: 	for (i = 0; i < size; i ++)
  3033: 	{
  3034: 		RAM[i] = ((RAM[i] & 0xF0)>>4) + ((RAM[i] & 0x0F)<<4);
  3035: 	}
  3036: }
  3037: 
  3038: DRIVER_INIT( kaneko16 )
  3039: {
  3040: 	kaneko16_unscramble_tiles(REGION_GFX2);
  3041: 	kaneko16_unscramble_tiles(REGION_GFX3);
  3042: }
  3043: 
  3044: DRIVER_INIT( berlwall )
  3045: {
  3046: 	kaneko16_unscramble_tiles(REGION_GFX2);
  3047: }
  3048: 
  3049: 
  3050: /***************************************************************************
  3051: 
  3052: 								Bakuretsu Breaker
  3053: 
  3054: 	USES TOSHIBA 68000 CPU W/TWO YM2149 SOUND
  3055: 
  3056: 	LOCATION    TYPE
  3057: 	------------------
  3058: 	U38         27C040
  3059: 	U37         "
  3060: 	U36         27C020
  3061: 	U19         "
  3062: 	U18         "
  3063: 
  3064: ***************************************************************************/
  3065: 
  3066: ROM_START( bakubrkr )
  3067:  	ROM_REGION( 0x080000, REGION_CPU1, 0 )			/* 68000 Code */
  3068: 	ROM_LOAD16_BYTE( "u18", 0x000000, 0x040000, CRC(8cc0a4fd) )
  3069: 	ROM_LOAD16_BYTE( "u19", 0x000001, 0x040000, CRC(aea92195) )
  3070: 
  3071: 	ROM_REGION( 0x240000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3072: 	ROM_LOAD( "u37",  0x000000, 0x080000, CRC(70b66e7e) )
  3073: 	ROM_RELOAD(       0x100000, 0x080000             )
  3074: 	ROM_LOAD( "u38",  0x080000, 0x080000, CRC(a7a94143) )
  3075: 	ROM_RELOAD(       0x180000, 0x080000             )
  3076: 	ROM_LOAD( "u36",  0x200000, 0x040000, CRC(611271e6) )
  3077: 
  3078: 	ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles */
  3079: 	ROM_LOAD( "layer1", 0x000000, 0x040000, NO_DUMP )
  3080: 	ROM_FILL(           0x000000, 0x040000, 0x00 )
  3081: 
  3082: 	ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles */
  3083: 	ROM_LOAD( "layer2", 0x000000, 0x040000, NO_DUMP )
  3084: 	ROM_FILL(           0x000000, 0x040000, 0x00 )
  3085: 
  3086: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3087: 	ROM_LOAD( "samples", 0x000000, 0x040000, NO_DUMP )
  3088: ROM_END
  3089: 
  3090: 
  3091: /***************************************************************************
  3092: 
  3093: 								The Berlin Wall
  3094: 
  3095: The Berlin Wall, Kaneko 1991, BW-002
  3096: 
  3097: ----
  3098: 
  3099: BW-004 BW-008                    VU-003
  3100: BW-005 BW-009                    VU-003
  3101: BW-006 BW-00A                    VU-003
  3102: BW-007 BW-00B                          6116-90
  3103:                                        6116-90
  3104: BW-003                           52256  52256
  3105:                                  BW101A BW100A
  3106: 5864
  3107: 5864                   MUX2      68000
  3108:             VIEW2
  3109: BW300
  3110: BW-002
  3111: BW-001                      42101
  3112:                             42101
  3113: 41464 41464      VU-002
  3114: 41464 41464                      YM2149  IU-004
  3115: 41464 41464                      YM2149
  3116:                            SWB             BW-000  6295
  3117:                            SWA
  3118: 
  3119: 
  3120: PALs : BW-U47, BW-U48 (backgrounds encryption)
  3121: 
  3122: ***************************************************************************/
  3123: 
  3124: ROM_START( berlwall )
  3125:  	ROM_REGION( 0x040000, REGION_CPU1, 0 )			/* 68000 Code */
  3126: 	ROM_LOAD16_BYTE( "bw100a", 0x000000, 0x020000, CRC(e6bcb4eb) SHA1(220b8fddc79230b4f6a8cf33e1035355c485e8d1) )
  3127: 	ROM_LOAD16_BYTE( "bw101a", 0x000001, 0x020000, CRC(38056fb2) SHA1(48338b9a5ebea872286541a3c45016673c4af76b) )
  3128: 
  3129: 	ROM_REGION( 0x120000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3130: 	ROM_LOAD( "bw001",  0x000000, 0x080000, CRC(bc927260) SHA1(44273a8b6a041504d54da4a7897adf23e3e9db10) )
  3131: 	ROM_LOAD( "bw002",  0x080000, 0x080000, CRC(223f5465) SHA1(6ed077514ab4370a215a4a60c3aecc8b72ed1c97) )
  3132: 	ROM_LOAD( "bw300",  0x100000, 0x020000, CRC(b258737a) SHA1(b5c8fe44a8dcfc19bccba896bdb73030c5843544) )
  3133: 
  3134: 	ROM_REGION( 0x080000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3135: 	ROM_LOAD( "bw003",  0x000000, 0x080000, CRC(fbb4b72d) SHA1(07a0590f18b3bba1843ef6a89a5c214e8e605cc3) )
  3136: 
  3137: 	ROM_REGION( 0x400000, REGION_GFX3, ROMREGION_DISPOSE )	/* High Color Background */
  3138: 	ROM_LOAD16_BYTE( "bw004",  0x000000, 0x080000, CRC(5300c34d) SHA1(ccb12ea05f89ef68bcfe003faced2ffea24c4bf0) )
  3139: 	ROM_LOAD16_BYTE( "bw008",  0x000001, 0x080000, CRC(9aaf2f2f) SHA1(1352856159e19f07e8e30f9c44b21347103ce024) ) // FIXED BITS (xxxxxxx0)
  3140: 	ROM_LOAD16_BYTE( "bw005",  0x100000, 0x080000, CRC(16db6d43) SHA1(0158d0278d085487400ad4384b8cc9618503319e) )
  3141: 	ROM_LOAD16_BYTE( "bw009",  0x100001, 0x080000, CRC(1151a0b0) SHA1(584a0da7eb7f06450f95e76faa20d19f053cb74c) ) // FIXED BITS (xxxxxxx0)
  3142: 	ROM_LOAD16_BYTE( "bw006",  0x200000, 0x080000, CRC(73a35d1f) SHA1(af919cf858c5923aea45e0d8d91493e6284cb99e) )
  3143: 	ROM_LOAD16_BYTE( "bw00a",  0x200001, 0x080000, CRC(f447dfc2) SHA1(1254eafea92e8e416deedf21cb01990ffc4f896c) ) // FIXED BITS (xxxxxxx0)
  3144: 	ROM_LOAD16_BYTE( "bw007",  0x300000, 0x080000, CRC(97f85c87) SHA1(865e076e098c49c96639f62be793f2de24b4926b) )
  3145: 	ROM_LOAD16_BYTE( "bw00b",  0x300001, 0x080000, CRC(b0a48225) SHA1(de256bb6e2a824114274bff0c6c1234934c31c49) ) // FIXED BITS (xxxxxxx0)
  3146: 
  3147: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3148: 	ROM_LOAD( "bw000",  0x000000, 0x040000, CRC(d8fe869d) SHA1(75e9044c4164ca6db9519fcff8eca6c8a2d8d5d1) )
  3149: ROM_END
  3150: 
  3151: ROM_START( berlwalt )
  3152:  	ROM_REGION( 0x040000, REGION_CPU1, 0 )			/* 68000 Code */
  3153: 	ROM_LOAD16_BYTE( "u23_01.bin", 0x000000, 0x020000, CRC(76b526ce) SHA1(95ba7cccbe88fd695c28b6a7c25a1afd130c1aa6) )
  3154: 	ROM_LOAD16_BYTE( "u39_01.bin", 0x000001, 0x020000, CRC(78fa7ef2) SHA1(8392de6e307dcd2bf5bcbeb37d578d33246acfcf) )
  3155: 
  3156: 	ROM_REGION( 0x120000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3157: 	ROM_LOAD( "bw001",  0x000000, 0x080000, CRC(bc927260) SHA1(44273a8b6a041504d54da4a7897adf23e3e9db10) )
  3158: 	ROM_LOAD( "bw002",  0x080000, 0x080000, CRC(223f5465) SHA1(6ed077514ab4370a215a4a60c3aecc8b72ed1c97) )
  3159: 	ROM_LOAD( "bw300",  0x100000, 0x020000, CRC(b258737a) SHA1(b5c8fe44a8dcfc19bccba896bdb73030c5843544) )
  3160: 
  3161: 	ROM_REGION( 0x080000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3162: 	ROM_LOAD( "bw003",  0x000000, 0x080000, CRC(fbb4b72d) SHA1(07a0590f18b3bba1843ef6a89a5c214e8e605cc3) )
  3163: 
  3164: 	ROM_REGION( 0x400000, REGION_GFX3, ROMREGION_DISPOSE )	/* High Color Background */
  3165: 	ROM_LOAD16_BYTE( "bw004",  0x000000, 0x080000, CRC(5300c34d) SHA1(ccb12ea05f89ef68bcfe003faced2ffea24c4bf0) )
  3166: 	ROM_LOAD16_BYTE( "bw008",  0x000001, 0x080000, CRC(9aaf2f2f) SHA1(1352856159e19f07e8e30f9c44b21347103ce024) ) // FIXED BITS (xxxxxxx0)
  3167: 	ROM_LOAD16_BYTE( "bw005",  0x100000, 0x080000, CRC(16db6d43) SHA1(0158d0278d085487400ad4384b8cc9618503319e) )
  3168: 	ROM_LOAD16_BYTE( "bw009",  0x100001, 0x080000, CRC(1151a0b0) SHA1(584a0da7eb7f06450f95e76faa20d19f053cb74c) ) // FIXED BITS (xxxxxxx0)
  3169: 	ROM_LOAD16_BYTE( "bw006",  0x200000, 0x080000, CRC(73a35d1f) SHA1(af919cf858c5923aea45e0d8d91493e6284cb99e) )
  3170: 	ROM_LOAD16_BYTE( "bw00a",  0x200001, 0x080000, CRC(f447dfc2) SHA1(1254eafea92e8e416deedf21cb01990ffc4f896c) ) // FIXED BITS (xxxxxxx0)
  3171: 	ROM_LOAD16_BYTE( "bw007",  0x300000, 0x080000, CRC(97f85c87) SHA1(865e076e098c49c96639f62be793f2de24b4926b) )
  3172: 	ROM_LOAD16_BYTE( "bw00b",  0x300001, 0x080000, CRC(b0a48225) SHA1(de256bb6e2a824114274bff0c6c1234934c31c49) ) // FIXED BITS (xxxxxxx0)
  3173: 
  3174: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3175: 	ROM_LOAD( "bw000",  0x000000, 0x040000, CRC(d8fe869d) SHA1(75e9044c4164ca6db9519fcff8eca6c8a2d8d5d1) )
  3176: ROM_END
  3177: 
  3178: 
  3179: /***************************************************************************
  3180: 
  3181: 							Blaze On (Japan version)
  3182: 
  3183: CPU:          TMP68HC000-12/D780C-2(Z80)
  3184: SOUND:        YM2151
  3185: OSC:          13.3330/16.000MHz
  3186: CUSTOM:       KANEKO VU-002 x2
  3187:               KANEKO 23160-509 VIEW2-CHIP
  3188:               KANEKO MUX2-CHIP
  3189:               KANEKO HELP1-CHIP
  3190: 
  3191: ---------------------------------------------------
  3192:  filemanes          devices       kind
  3193: ---------------------------------------------------
  3194:  BZ_PRG1.U80        27C020        68000 main prg.
  3195:  BZ_PRG2.U81        27C020        68000 main prg.
  3196:  3.U45              27C010        Z80 sound prg.
  3197:  BZ_BG.U2           57C8200       BG CHR
  3198:  BZ_SP1.U20         27C8001       OBJ
  3199:  BZ_SP2.U21         27C8001       OBJ
  3200:  BZ_SP1.U68 ( == BZ_SP1.U20)
  3201:  BZ_SP2.U86 ( == BZ_SP2.U21)
  3202: 
  3203: ***************************************************************************/
  3204: 
  3205: ROM_START( blazeon )
  3206:  	ROM_REGION( 0x080000, REGION_CPU1, 0 )			/* 68000 Code */
  3207: 	ROM_LOAD16_BYTE( "bz_prg1.u80", 0x000000, 0x040000, CRC(8409e31d) SHA1(a9dfc299f4b457df190314401aef309adfaf9bae) )
  3208: 	ROM_LOAD16_BYTE( "bz_prg2.u81", 0x000001, 0x040000, CRC(b8a0a08b) SHA1(5f275b98d3e49a834850b45179d26e8c2f9fd604) )
  3209: 
  3210:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* Z80 Code */
  3211: 	ROM_LOAD( "3.u45", 0x000000, 0x020000, CRC(52fe4c94) SHA1(896230e4627503292575bbd84edc3cf9cb18b27e) )	// 1xxxxxxxxxxxxxxxx = 0xFF
  3212: 
  3213: 	ROM_REGION( 0x200000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3214: 	ROM_LOAD( "bz_sp1.u20", 0x000000, 0x100000, CRC(0d5809a1) SHA1(e72669f95b050d1967d10a865bab8f3634c9daad) )
  3215: 	ROM_LOAD( "bz_sp2.u21", 0x100000, 0x100000, CRC(56ead2bd) SHA1(463723f3c533603ce3a95310e9ce12b4e582b52d) )
  3216: 
  3217: 	ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3218: 	ROM_LOAD( "bz_bg.u2", 0x000000, 0x100000, CRC(fc67f19f) SHA1(f5d9e037a736b0932efbfb48587de08bec93df5d) )
  3219: ROM_END
  3220: 
  3221: /***************************************************************************
  3222: 
  3223: 								Blood Warrior
  3224: 
  3225: Kaneko 1994
  3226: 
  3227: TOP BOARD
  3228: 
  3229: CPU - Toshiba TMP68HC000N - 16
  3230: SOUND - OKI M6295  x2
  3231: QUARTZ OSCILLATORS AT 27.0000MHz, 16.0000MHz, 20.0000MHz and 33.3330MHz
  3232: RAM - LC3664 x6, 424260 x2, LH52B256D x6, D42101C x2
  3233: 
  3234: 
  3235: PCU11.u11 - 18CV8PC    \
  3236: PCU15.u15 - 18CV8PC     | NEAR OKI
  3237: Z091P016.u16 - 18CV8PC /
  3238: Z091P013.u13 - 18CV8PC \
  3239: PCU17.u17 - 18CV8PC     |
  3240: PCU14.u14 - 18CV8PC     | NEAR 68000
  3241: PCU94.u94 - 18CV8PC     |
  3242: PCU92.u92 - 18CV8PC     |
  3243: Z092P093.u93 - 18CV8PC /
  3244: ALL ABOVE NOT DUMPED
  3245: 
  3246: Custom Chips
  3247: 
  3248: 231609-509 View2-Chip x2
  3249: KC-002 L0002 023 9321EK702
  3250: 9343T - 44 pin PQFP (NEAR JAMMMA CONNECTOR)
  3251: 
  3252: BOTTOM BOARD
  3253: 
  3254: TBS0P01 452 9339PK001 - MCU
  3255: 
  3256: ofs1g006.u6 - GAL16V8B
  3257: ofs1g007.u7 - GAL16V8B
  3258: ofs1p059.u59 - 18CV8PC
  3259: ofs1p511.u511 - 18CV8PC
  3260: ALL ABOVE NOT DUMPED
  3261: 
  3262: ROMS
  3263: 
  3264: 9346.u126 - 93C46
  3265: ofdox3.U124 - 27C010
  3266: ofp1f3.U513 - 27C4000
  3267: ofpof3.U514 - 27C4000
  3268: of101f0223.U101 - 27C800
  3269: of20902011.u17 - 27C040
  3270: of210000213.u19 - 27C040
  3271: of2110215.u21 - 27C040
  3272: of21200217.u23 - 27C040
  3273: of21300219.u25 - 27C040
  3274: of21400221.u27 - 27C040
  3275: of1000222.u99 - 27C800
  3276: of0010226.u55 - 27C800
  3277: of3000225.u51 - 27C800
  3278: of2080209.u28 - 27V160
  3279: of2060207.u14 - 27V160
  3280: of2070208.u15 - 27V160
  3281: of2050206.u13 - 27V160
  3282: of2040205.u12 - 27V160
  3283: of2030204.u11 - 27V160
  3284: of2020203.u10 - 27V160
  3285: of2010202.u9 - 27V160
  3286: of2000201.u8 - 27V160
  3287: of209e0210.u16 - 27C040
  3288: of210e0212.u18 - 27C040
  3289: of211e0214.u20 - 27C040
  3290: of212e0216.u22 - 27C040
  3291: of213e0218.u24 - 27C040
  3292: of214e0220.u26 - 27C040
  3293: 
  3294: ***************************************************************************/
  3295: 
  3296: ROM_START( bloodwar )
  3297:  	ROM_REGION( 0x100000, REGION_CPU1, 0 )			/* 68000 Code */
  3298: 	ROM_LOAD16_BYTE( "pof3.514", 0x000000, 0x080000, CRC(0c93da15) )
  3299: 	ROM_LOAD16_BYTE( "p1f3.513", 0x000001, 0x080000, CRC(894ecbe5) )
  3300: 
  3301:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  3302: 	ROM_LOAD( "dox3.124",  0x000000, 0x020000, CRC(399f2005) )
  3303: 
  3304:  	ROM_REGION16_BE( 0x0080, REGION_USER1, 0 )			/* EEPROM */
  3305: 	ROM_LOAD16_WORD( "9346.126",  0x0000, 0x0080, CRC(1579db94) )
  3306: 
  3307: 	ROM_REGION( 0x1e00000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3308: 	ROM_LOAD       ( "2000201.8",   0x0000000, 0x200000, CRC(bba63025) )
  3309: 	ROM_LOAD       ( "2010202.9",   0x0200000, 0x200000, CRC(4ffd9ddc) )
  3310: 	ROM_LOAD       ( "2020203.10",  0x0400000, 0x200000, CRC(fbcc5363) )
  3311: 	ROM_LOAD       ( "2030204.11",  0x0600000, 0x200000, CRC(8e818ce9) )
  3312: 	ROM_LOAD       ( "2040205.12",  0x0800000, 0x200000, CRC(70c4a76b) )
  3313: 	ROM_LOAD       ( "2050206.13",  0x0a00000, 0x200000, CRC(80c667bb) )
  3314: 	ROM_LOAD       ( "2060207.14",  0x0c00000, 0x200000, CRC(c2028c97) )
  3315: 	ROM_LOAD       ( "2070208.15",  0x0e00000, 0x200000, CRC(b1f30c61) )
  3316: 	ROM_LOAD       ( "2080209.28",  0x1000000, 0x200000, CRC(a8f29545) )
  3317: 
  3318: 	ROM_LOAD16_BYTE( "209e0210.16", 0x1800000, 0x080000, CRC(fbdfee1e) )
  3319: 	ROM_LOAD16_BYTE( "20902011.17", 0x1800001, 0x080000, CRC(2baefdb2) )
  3320: 	ROM_LOAD16_BYTE( "210e0212.18", 0x1900000, 0x080000, CRC(d59cb3c0) )
  3321: 	ROM_LOAD16_BYTE( "21000213.19", 0x1900001, 0x080000, CRC(62cb5c8b) )
  3322: 	ROM_LOAD16_BYTE( "211e0214.20", 0x1a00000, 0x080000, CRC(3305015e) )
  3323: 	ROM_LOAD16_BYTE( "21100215.21", 0x1a00001, 0x080000, CRC(5e3a13bd) )
  3324: 	ROM_LOAD16_BYTE( "212e0216.22", 0x1b00000, 0x080000, CRC(2836073b) )
  3325: 	ROM_LOAD16_BYTE( "21200217.23", 0x1b00001, 0x080000, CRC(267b8ee0) )
  3326: 	ROM_LOAD16_BYTE( "213e0218.24", 0x1c00000, 0x080000, CRC(7b202f6c) )
  3327: 	ROM_LOAD16_BYTE( "21300219.25", 0x1c00001, 0x080000, CRC(09f16222) )
  3328: 	ROM_LOAD16_BYTE( "214e0220.26", 0x1d00000, 0x080000, CRC(bfcb86aa) )
  3329: 	ROM_LOAD16_BYTE( "21400221.27", 0x1d00001, 0x080000, CRC(90682117) )
  3330: 
  3331: 	ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3332: 	ROM_LOAD( "3010226.55", 0x000000, 0x100000, CRC(fcf215de) )
  3333: 
  3334: 	ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3335: 	ROM_LOAD( "3000225.51", 0x000000, 0x100000, CRC(fbc3c08a) )
  3336: 
  3337: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3338: 	ROM_LOAD( "101f0223.101", 0x000000, 0x100000, CRC(295f3c93) )
  3339: 
  3340: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3341: 	ROM_LOAD( "1000222.99",   0x000000, 0x100000, CRC(42b12269) )
  3342: ROM_END
  3343: 
  3344: 
  3345: /***************************************************************************
  3346: 
  3347: 							Great 1000 Miles Rally
  3348: 
  3349: GMMU2+1	512K * 2	68k
  3350: GMMU23	1M		OKI6295: 00000-2ffff + chunks of 0x10000 with headers
  3351: GMMU24	1M		OKI6295: chunks of 0x40000 with headers - FIRST AND SECOND HALF IDENTICAL
  3352: 
  3353: GMMU27	2M		sprites
  3354: GMMU28	2M		sprites
  3355: GMMU29	2M		sprites
  3356: GMMU30	512k	sprites
  3357: 
  3358: GMMU64	1M		sprites - FIRST AND SECOND HALF IDENTICAL
  3359: GMMU65	1M		sprites - FIRST AND SECOND HALF IDENTICAL
  3360: 
  3361: GMMU52	2M		tiles
  3362: 
  3363: 
  3364: ---------------------------------------------------------------------------
  3365: 								Game code
  3366: ---------------------------------------------------------------------------
  3367: 
  3368: 100000.b	<- (!b00000.b) & 7f	[1p]
  3369:     01.b	previous value of the above
  3370:     02.b	bits gone high
  3371: 
  3372: 100008.b	<- (!b00002.b) & 7f	[2p]
  3373: 
  3374: 100010.b	<- !b00004.b [coins]
  3375:     11.b	previous value of the above
  3376:     12.b	bits gone high
  3377: 
  3378: 100013.b	<- b00006.b	(both never accessed again?)
  3379: 
  3380: 100015.b	<- wheel value
  3381: 
  3382: 600000.w	<- 100a20.w + 100a30.w		600002.w	<- 100a22.w + 100a32.w
  3383: 600004.w	<- 100a24.w + 100a34.w		600006.w	<- 100a26.w + 100a36.w
  3384: 
  3385: 680000.w	<- 100a28.w + 100a38.w		680002.w	<- 100a2a.w + 100a3a.w
  3386: 680004.w	<- 100a2c.w + 100a3c.w		680006.w	<- 100a2e.w + 100a3e.w
  3387: 
  3388: 101265.b	<- DSW (from 206000)
  3389: 101266		<- Settings from NVRAM (0x80 bytes from 208000)
  3390: 
  3391: 1034f8.b	credits
  3392: 103502.b	coins x ..
  3393: 103503.b	.. credits
  3394: 
  3395: 1035ec.l	*** Time (BCD: seconds * 10000) ***
  3396: 103e64.w	*** Speed << 4 ***
  3397: 
  3398: 10421a.b	bank for the oki mapped at 800000
  3399: 104216.b	last value of the above
  3400: 
  3401: 10421c.b	bank for the oki mapped at 880000
  3402: 104218.b	last value of the above
  3403: 
  3404: ROUTINES:
  3405: 
  3406: dd6	print string: a2->scr ; a1->string ; d1.l = xpos.w<<6|ypos.w<<6
  3407: 
  3408: Trap #2 = 43a0 ; d0.w = routine index ; (where not specified: 43c0):
  3409: 1:  43C4	2:  43F8	3:  448E	4:  44EE
  3410: 5:  44D2	6:  4508	7:  453A	10: 0AF6
  3411: 18: 4580	19: 4604
  3412: 20> 2128	writes 700000-70001f
  3413: 21: 21F6
  3414: 24> 2346	clears 400000-401407 (641*8 = $281*8)
  3415: 30> 282A	writes 600008/9/b/e-f, 680008/9/b/e-f
  3416: 31: 295A
  3417: 32> 2B36	100a30-f <- 100a10-f
  3418: 34> 2B4C	clears 500000-503fff, 580000-583fff
  3419: 35> 2B9E	d1.w = selects between:	500000;501000;580000;581000.
  3420: 			Fill 0x1000 bytes from there with d2.l
  3421: 
  3422: 70: 2BCE>	11d8a
  3423: 71: 2BD6
  3424: 74: 2BDE	90: 3D44
  3425: 91> 3D4C	wait for bit 0 of d00000 to be 0
  3426: 92> 3D5C	200010.w<-D1	200012.w<-D2	200014.w<-D3
  3427: f1: 10F6
  3428: 
  3429: ***************************************************************************/
  3430: 
  3431: /*	This version displays:
  3432: 
  3433: 	tb05mm-eu "1000 miglia"
  3434: 	master up= 94/07/18 15:12:35			*/
  3435: 
  3436: ROM_START( gtmr )
  3437:  	ROM_REGION( 0x100000, REGION_CPU1, 0 )			/* 68000 Code */
  3438: 	ROM_LOAD16_BYTE( "u2.bin", 0x000000, 0x080000, CRC(031799f7) SHA1(a59a9635002d139247828e3b74f6cf2fbdd5e569) )
  3439: 	ROM_LOAD16_BYTE( "u1.bin", 0x000001, 0x080000, CRC(6238790a) SHA1(a137fd581138804534f3193068f117611a982004) )
  3440: 
  3441:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  3442: 	ROM_LOAD( "mcu_code.u12",  0x000000, 0x020000, NO_DUMP )
  3443: 
  3444: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3445: 	/* fill the 0x700000-7fffff range first, with the second of the identical halves */
  3446: //	ROM_LOAD16_BYTE( "gmmu64.bin",  0x600000, 0x100000, CRC(57d77b33) SHA1(f7ae28ae889be4442b7b236705943eaad1f0c84e) )	// HALVES IDENTICAL
  3447: //	ROM_LOAD16_BYTE( "gmmu65.bin",  0x600001, 0x100000, CRC(05b8bdca) SHA1(44471d66787d5b48ae8b13676f42f27af44e5c6a) )	// HALVES IDENTICAL
  3448: 	ROM_LOAD( "gmmu27.bin",  0x000000, 0x200000, CRC(c0ab3efc) SHA1(e6cd15480977b036234d91e6f3a6e21b7f0a3c3e) )
  3449: 	ROM_LOAD( "gmmu28.bin",  0x200000, 0x200000, CRC(cf6b23dc) SHA1(ccfd0b17507e091e55c169361cd6a6b19641b717) )
  3450: 	ROM_LOAD( "gmmu29.bin",  0x400000, 0x200000, CRC(8f27f5d3) SHA1(219a86446ce2556682009d8aff837480f040a01e) )
  3451: 	ROM_LOAD( "gmmu30.bin",  0x600000, 0x080000, CRC(e9747c8c) SHA1(2507102ec34755c6f110eadb3444e6d3a3474051) )
  3452: 	/* codes 6800-7fff are explicitly skipped */
  3453: 	/* wrong tiles: 	gtmr	77e0 ; gtmralt	81c4 81e0 81c4 */
  3454: 	ROM_LOAD( "sprites",     0x700000, 0x100000, NO_DUMP )
  3455: 
  3456: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3457: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3458: 
  3459: 	ROM_REGION( 0x200000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3460: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3461: 
  3462: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3463: 	ROM_LOAD( "gmmu23.bin",  0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) )	// 16 x $10000
  3464: 
  3465: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3466: 	ROM_LOAD( "gmmu24.bin",  0x000000, 0x100000, CRC(380cdc7c) SHA1(ba7f51201b0f2bf15e66557e45bb2af5cf797779) )	//  2 x $40000 - HALVES IDENTICAL
  3467: ROM_END
  3468: 
  3469: 
  3470: /*	This version displays:
  3471: 
  3472: 	tb05mm-eu "1000 miglia"
  3473: 	master up= 94/09/06 14:49:19			*/
  3474: 
  3475: ROM_START( gtmre )
  3476:  	ROM_REGION( 0x100000, REGION_CPU1, 0 )			/* 68000 Code */
  3477: 	ROM_LOAD16_BYTE( "gmmu2.bin", 0x000000, 0x080000, CRC(36dc4aa9) SHA1(0aea4dc169d7aad2ea957a1de698d1fa12c71556) )
  3478: 	ROM_LOAD16_BYTE( "gmmu1.bin", 0x000001, 0x080000, CRC(8653c144) SHA1(a253a01327a9443337a55a13c063ea5096444c4c) )
  3479: 
  3480:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  3481: 	ROM_LOAD( "mcu_code.u12",  0x000000, 0x020000, NO_DUMP )
  3482: 
  3483: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3484: 	/* fill the 0x700000-7fffff range first, with the second of the identical halves */
  3485: 	ROM_LOAD16_BYTE( "gmmu64.bin",  0x600000, 0x100000, CRC(57d77b33) SHA1(f7ae28ae889be4442b7b236705943eaad1f0c84e) )	// HALVES IDENTICAL
  3486: 	ROM_LOAD16_BYTE( "gmmu65.bin",  0x600001, 0x100000, CRC(05b8bdca) SHA1(44471d66787d5b48ae8b13676f42f27af44e5c6a) )	// HALVES IDENTICAL
  3487: 	ROM_LOAD( "gmmu27.bin",  0x000000, 0x200000, CRC(c0ab3efc) SHA1(e6cd15480977b036234d91e6f3a6e21b7f0a3c3e) )
  3488: 	ROM_LOAD( "gmmu28.bin",  0x200000, 0x200000, CRC(cf6b23dc) SHA1(ccfd0b17507e091e55c169361cd6a6b19641b717) )
  3489: 	ROM_LOAD( "gmmu29.bin",  0x400000, 0x200000, CRC(8f27f5d3) SHA1(219a86446ce2556682009d8aff837480f040a01e) )
  3490: 	ROM_LOAD( "gmmu30.bin",  0x600000, 0x080000, CRC(e9747c8c) SHA1(2507102ec34755c6f110eadb3444e6d3a3474051) )
  3491: 	/* codes 6800-6fff are explicitly skipped */
  3492: 
  3493: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3494: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3495: 
  3496: 	ROM_REGION( 0x200000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3497: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3498: 
  3499: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3500: 	ROM_LOAD( "gmmu23.bin",  0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) )	// 16 x $10000
  3501: 
  3502: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3503: 	ROM_LOAD( "gmmu24.bin",  0x000000, 0x100000, CRC(380cdc7c) SHA1(ba7f51201b0f2bf15e66557e45bb2af5cf797779) )	//  2 x $40000 - HALVES IDENTICAL
  3504: ROM_END
  3505: 
  3506: 
  3507: /*	This version displays:
  3508: 
  3509: 	tb05mm-eu "1000 miglia"
  3510: 	master up= 94/09/06 20:30:39			*/
  3511: 
  3512: ROM_START( gtmrusa )
  3513:  	ROM_REGION( 0x100000, REGION_CPU1, 0 )			/* 68000 Code */
  3514: 	ROM_LOAD16_BYTE( "gtmrusa.u2", 0x000000, 0x080000, CRC(5be615c4) SHA1(c14d11a5bf6e025a65b932039165302ff407c4e1) )
  3515: 	ROM_LOAD16_BYTE( "gtmrusa.u1", 0x000001, 0x080000, CRC(ae853e4e) SHA1(31eaa73b0c5ddab1292f521ceec43b202653efe9) )
  3516: 
  3517:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code? */
  3518: 	ROM_LOAD( "gtmrusa.u12",  0x000000, 0x020000, CRC(2e1a06ff) SHA1(475a7555653eefac84307492a385895b839cab0d) )
  3519: 
  3520: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3521: 	/* fill the 0x700000-7fffff range first, with the second of the identical halves */
  3522: 	ROM_LOAD16_BYTE( "gmmu64.bin",  0x600000, 0x100000, CRC(57d77b33) SHA1(f7ae28ae889be4442b7b236705943eaad1f0c84e) )	// HALVES IDENTICAL
  3523: 	ROM_LOAD16_BYTE( "gmmu65.bin",  0x600001, 0x100000, CRC(05b8bdca) SHA1(44471d66787d5b48ae8b13676f42f27af44e5c6a) )	// HALVES IDENTICAL
  3524: 	ROM_LOAD( "gmmu27.bin",  0x000000, 0x200000, CRC(c0ab3efc) SHA1(e6cd15480977b036234d91e6f3a6e21b7f0a3c3e) )
  3525: 	ROM_LOAD( "gmmu28.bin",  0x200000, 0x200000, CRC(cf6b23dc) SHA1(ccfd0b17507e091e55c169361cd6a6b19641b717) )
  3526: 	ROM_LOAD( "gmmu29.bin",  0x400000, 0x200000, CRC(8f27f5d3) SHA1(219a86446ce2556682009d8aff837480f040a01e) )
  3527: 	ROM_LOAD( "gmmu30.bin",  0x600000, 0x080000, CRC(e9747c8c) SHA1(2507102ec34755c6f110eadb3444e6d3a3474051) )
  3528: 	/* codes 6800-6fff are explicitly skipped */
  3529: 
  3530: 	ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3531: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3532: 
  3533: 	ROM_REGION( 0x200000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3534: 	ROM_LOAD( "gmmu52.bin",  0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
  3535: 
  3536: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3537: 	ROM_LOAD( "gmmu23.bin",  0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) )	// 16 x $10000
  3538: 
  3539: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3540: 	ROM_LOAD( "gmmu24.bin",  0x000000, 0x100000, CRC(380cdc7c) SHA1(ba7f51201b0f2bf15e66557e45bb2af5cf797779) )	//  2 x $40000 - HALVES IDENTICAL
  3541: ROM_END
  3542: 
  3543: 
  3544: /***************************************************************************
  3545: 
  3546: 						Great 1000 Miles Rally 2
  3547: 
  3548: Bootup displays "TB06MM2EX 1000 Miglia 2"
  3549:                 "Master Up 95-04-04 19:39:01"
  3550: 
  3551: Top board
  3552: ---------
  3553: PCB ID : M201F00138  KANEKO AX-SYSTEM BOARD
  3554: CPU    : TMP68HC000N-16 (68000)
  3555: SOUND  : Oki M6295 (x2)
  3556: OSC    : 27.000MHz, 16.000MHz, 20.000MHz, 33.3330MHz
  3557: RAM    : LC3664 (28 pin SOIC, x4)
  3558:          UT6264 (28 pin SOIC, x2)
  3559:          LH628256 (28 pin DIP, x6)
  3560:          D42101 (24 pin DIP, x2)
  3561:          424260 (40 pin SOIC, x2)
  3562: PALs   : AXOP048, AXOP049, AXOP050 (GAL16V8, near M6295's)
  3563:          AXOP021 \
  3564:          AXOP022  |
  3565:          AXOP062  |
  3566:          AXOP063  |  (18CV8     )
  3567:          AXOP064  |  (near 68000)
  3568:          AXOP070  |
  3569:          AXOP071  |
  3570:          AXOP089 /
  3571: 
  3572: OTHER  : Custom chips
  3573:                       Kaneko Japan 9448 TA (44 pin PQFP, near JAMMA connector)
  3574:                       Kaneko VIEW2-CHIP (x2, 144 pin PQFP)
  3575:                       Kaneko KC002 L0002 023 9339EK706 (208 pin PQFP)
  3576: 
  3577: ROMs   : None
  3578: 
  3579: 
  3580: Bottom board
  3581: ------------
  3582: PCB ID : AX09S00138  KANEKO AX-SYSTEM BOARD ROM-08
  3583: DIP    : 8 position (x1)
  3584: RAM    : 6116 (x4)
  3585: PALs   : COMUX4, COMUX4 (GAL16V8, near U21)
  3586:          MMs4P067 (18CV8, near U47)
  3587:          MMs6G095 (GAL16V8, near U94)
  3588:          MMs4G084 (GAL16V8, near U50)
  3589:          COMUX2, COMUX3 (GAL16V8, near U33)
  3590:          COMUX1, MMS4P004 (18CV8, near U33)
  3591: 
  3592: OTHER  : 93C46 EEPROM
  3593:          KANEKO TBSOP02 454 9451MK002 (74 pin PQFP, Custom MCU?)
  3594: 
  3595: ROMs   :  (filename is ROM Label, extension is PCB 'u' location)
  3596: 
  3597: ***************************************************************************/
  3598: 
  3599: ROM_START( gtmr2 )
  3600:  	ROM_REGION( 0x100000, REGION_CPU1, 0 )			/* 68000 Code */
  3601: 	ROM_LOAD16_BYTE( "m2p0x1.u8",  0x000000, 0x080000, CRC(525f6618) SHA1(da8008cc7768b4e8c0091aa3ea21752d0ca33691) )
  3602: 	ROM_LOAD16_BYTE( "m2p1x1.u7",  0x000001, 0x080000, CRC(914683e5) SHA1(dbb2140f7de86073647abc6e73ba739ea201dd30) )
  3603: 
  3604:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code? */
  3605: 	ROM_LOAD( "m2d0x0.u31",        0x000000, 0x020000, CRC(2e1a06ff) SHA1(475a7555653eefac84307492a385895b839cab0d) )
  3606: 
  3607: 	ROM_REGION( 0x800000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3608: 	ROM_LOAD( "m2-200-0.u49",      0x000000, 0x400000, CRC(93aafc53) SHA1(1d28b6e3bd61ce9c938fc5303aeabcdefa549852) )
  3609: 	ROM_LOAD( "m2-201-0.u50",      0x400000, 0x200000, CRC(39b60a83) SHA1(aa7b37c7c92bbcf685f4fec84cc6d8a77d26433c) )
  3610: 	ROM_LOAD( "m2-202-0.u51",      0x600000, 0x200000, CRC(fd06b339) SHA1(5de0af7d23147f6eb403700eabd66794198f3641) )
  3611: 	ROM_LOAD16_BYTE( "m2s0x1.u32", 0x700000, 0x080000, CRC(4069d6c7) SHA1(2ed1cbb7ebde8347e0359cd56ee3a0d4d42d551f) )
  3612: 	ROM_LOAD16_BYTE( "m2s1x1.u33", 0x700001, 0x080000, CRC(c53fe269) SHA1(e6c485bbaea4b67f074b89e047f686f107805713) )
  3613: 
  3614: 	ROM_REGION( 0x440000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3615: 	ROM_LOAD( "m2-300-0.u89",      0x000000, 0x200000, CRC(4dc42fbb) SHA1(f14c287bc60f561eb9a57db4e3390aae9a81c392) )
  3616: 	ROM_LOAD( "m2-301-0.u90",      0x200000, 0x200000, CRC(f4e894f2) SHA1(1f983a1d93845fe298afba60d4dacdd1a10cab7f) )
  3617: 	ROM_LOAD16_BYTE( "m2b0x0.u93", 0x400000, 0x020000, CRC(e023d51b) SHA1(3c9f591f3ca2ee8e1100b83ae8eb593e11e6eac7) )
  3618: 	ROM_LOAD16_BYTE( "m2b1x0.u94", 0x400001, 0x020000, CRC(03c48bdb) SHA1(f5ba45d026530d46f760cf06d02a1ffcca89aa3c) )
  3619: 
  3620: 	ROM_REGION( 0x440000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3621: 	ROM_LOAD( "m2-300-0.u89",      0x000000, 0x200000, CRC(4dc42fbb) SHA1(f14c287bc60f561eb9a57db4e3390aae9a81c392) )
  3622: 	ROM_LOAD( "m2-301-0.u90",      0x200000, 0x200000, CRC(f4e894f2) SHA1(1f983a1d93845fe298afba60d4dacdd1a10cab7f) )
  3623: 	ROM_LOAD16_BYTE( "m2b0x0.u93", 0x400000, 0x020000, CRC(e023d51b) SHA1(3c9f591f3ca2ee8e1100b83ae8eb593e11e6eac7) )
  3624: 	ROM_LOAD16_BYTE( "m2b1x0.u94", 0x400001, 0x020000, CRC(03c48bdb) SHA1(f5ba45d026530d46f760cf06d02a1ffcca89aa3c) )
  3625: 
  3626: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3627: 	ROM_LOAD( "m2-100-0.u48",      0x000000, 0x100000, CRC(5250fa45) SHA1(b1ad4660906997faea0aa89866de01a0e9f2b61d) )
  3628: 
  3629: 	ROM_REGION( 0x080000, REGION_SOUND2, 0 )	/* Samples */
  3630: 	ROM_LOAD( "m2w1x0.u47",        0x040000, 0x040000, CRC(1b0513c5) SHA1(8c9ddef19297e1b39d900297005203b7ff28667e) )
  3631: ROM_END
  3632: 
  3633: 
  3634: /***************************************************************************
  3635: 
  3636: 								Magical Crystals
  3637: 
  3638: (c)1991 Kaneko/Atlus
  3639: Z00FC-02
  3640: 
  3641: CPU  : TMP68HC000N-12
  3642: Sound: YM2149Fx2 M6295
  3643: OSC  : 16.0000MHz(X1) 12.0000MHz(X2)
  3644: 
  3645: ROMs:
  3646: mc100j.u18 - Main programs
  3647: mc101j.u19 /
  3648: 
  3649: mc000.u38  - Graphics (32pin mask)
  3650: mc001.u37  | (32pin mask)
  3651: mc002j.u36 / (27c010)
  3652: 
  3653: mc010.u04 - Graphics (42pin mask)
  3654: 
  3655: mc020.u33 - Graphics (42pin mask)
  3656: 
  3657: mc030.u32 - Samples (32pin mask)
  3658: 
  3659: PALs (18CV8PC):
  3660: u08, u20, u41, u42, u50, u51, u54
  3661: 
  3662: Custom chips:
  3663: KANEKO VU-001 046A (u53, 48pin PQFP)
  3664: KANEKO VU-002 052 151021 (u60, 160pin PQFP)
  3665: KANEKO 23160-509 9047EAI VIEW2-CHIP (u24 & u34, 144pin PQFP)
  3666: KANEKO MUX2-CHIP (u28, 64pin PQFP)
  3667: KANEKO IU-001 9045KP002 (u22, 44pin PQFP)
  3668: KANEKO I/O JAMMA MC-8282 047 (u5, 46pin)
  3669: 699206p (u09, 44pin PQFP)
  3670: 699205p (u10, 44pin PQFP)
  3671: 
  3672: Other:
  3673: 93C46 EEPROM
  3674: 
  3675: DIP settings:
  3676: 1: Flip screen
  3677: 2: Test mode
  3678: 3: Unused
  3679: 4: Unused
  3680: 
  3681: ***************************************************************************/
  3682: 
  3683: ROM_START( mgcrystl )
  3684:  	ROM_REGION( 0x040000*2, REGION_CPU1, ROMREGION_ERASE )			/* 68000 Code */
  3685: 	ROM_LOAD16_BYTE( "magcrstl.u18", 0x000000, 0x020000, CRC(c7456ba7) SHA1(96c25c3432069373fa86d7af3e093e02e39aea34) )
  3686: 	ROM_LOAD16_BYTE( "magcrstl.u19", 0x000001, 0x040000, CRC(ea8f9300) SHA1(0cd0d448805aa45986b63befca00b08fe066dbb2) ) //!!
  3687: 
  3688: 	ROM_REGION( 0x280000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3689: 	ROM_LOAD( "mc000.u38",    0x000000, 0x100000, CRC(28acf6f4) SHA1(6647ad90ea580b65ed28772f9d65352b06833d0c) )
  3690: 	ROM_LOAD( "mc001.u37",    0x100000, 0x080000, CRC(005bc43d) SHA1(6f6cd99e8e60562fa86581008455a6d9d646fa95) )
  3691: 	ROM_RELOAD(               0x180000, 0x080000             )
  3692: 	ROM_LOAD( "magcrstl.u36", 0x200000, 0x020000, CRC(22729037) SHA1(de4e1bdab57aa617411b6327f3db4856970e8953) )
  3693: 	ROM_RELOAD(               0x220000, 0x020000             )
  3694: 	ROM_RELOAD(               0x240000, 0x020000             )
  3695: 	ROM_RELOAD(               0x260000, 0x020000             )
  3696: 
  3697: 	ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3698: 	ROM_LOAD( "mc010.u04",  0x000000, 0x100000, CRC(85072772) SHA1(25e903cc2c893d61db791d1fe60a1205a4395667) )
  3699: 
  3700: 	ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3701: 	ROM_LOAD( "mc020.u34",  0x000000, 0x100000, CRC(1ea92ff1) SHA1(66ec53e664b2a5a751a280a538aaeceafc187ceb) )
  3702: 
  3703: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3704: 	ROM_LOAD( "mc030.u32",  0x000000, 0x040000, CRC(c165962e) SHA1(f7e130db387ae9dcb7223f7ad6e51270d3033bc9) )
  3705: ROM_END
  3706: 
  3707: ROM_START( mgcrystj )
  3708:  	ROM_REGION( 0x040000*2, REGION_CPU1, ROMREGION_ERASE )			/* 68000 Code */
  3709: 	ROM_LOAD16_BYTE( "mc100j.u18", 0x000000, 0x020000, CRC(afe5882d) SHA1(176e6e12e3df63c08d7aff781f5e5a9bd83ec293) )
  3710: 	ROM_LOAD16_BYTE( "mc101j.u19", 0x000001, 0x040000, CRC(60da5492) SHA1(82b90a617d355825624ce9fb30bddf4714bd0d18) )	//!!
  3711: 
  3712: 	ROM_REGION( 0x280000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3713: 	ROM_LOAD( "mc000.u38",  0x000000, 0x100000, CRC(28acf6f4) SHA1(6647ad90ea580b65ed28772f9d65352b06833d0c) )
  3714: 	ROM_LOAD( "mc001.u37",  0x100000, 0x080000, CRC(005bc43d) SHA1(6f6cd99e8e60562fa86581008455a6d9d646fa95) )
  3715: 	ROM_RELOAD(             0x180000, 0x080000             )
  3716: 	ROM_LOAD( "mc002j.u36", 0x200000, 0x020000, CRC(27ac1056) SHA1(34b07c1a0d403ca45c9849d3d8d311012f787df6) )
  3717: 	ROM_RELOAD(             0x220000, 0x020000             )
  3718: 	ROM_RELOAD(             0x240000, 0x020000             )
  3719: 	ROM_RELOAD(             0x260000, 0x020000             )
  3720: 
  3721: 	ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3722: 	ROM_LOAD( "mc010.u04",  0x000000, 0x100000, CRC(85072772) SHA1(25e903cc2c893d61db791d1fe60a1205a4395667) )
  3723: 
  3724: 	ROM_REGION( 0x100000, REGION_GFX3, ROMREGION_DISPOSE )	/* Tiles (Scrambled) */
  3725: 	ROM_LOAD( "mc020.u34",  0x000000, 0x100000, CRC(1ea92ff1) SHA1(66ec53e664b2a5a751a280a538aaeceafc187ceb) )
  3726: 
  3727: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3728: 	ROM_LOAD( "mc030.u32",  0x000000, 0x040000, CRC(c165962e) SHA1(f7e130db387ae9dcb7223f7ad6e51270d3033bc9) )
  3729: ROM_END
  3730: 
  3731: 
  3732: /***************************************************************************
  3733: 
  3734: 								Sand Scorpion
  3735: 
  3736: (C) FACE
  3737: 68HC000N-12
  3738: Z8400AB1
  3739: OKI6295, YM2203C
  3740: OSC:  16.000mhz,   12.000mhz
  3741: 
  3742: SANDSC03.BIN     27C040
  3743: SANDSC04.BIN     27C040
  3744: SANDSC05.BIN     27C040
  3745: SANDSC06.BIN     27C040
  3746: SANDSC07.BIN     27C2001
  3747: SANDSC08.BIN     27C1001
  3748: SANDSC11.BIN     27C2001
  3749: SANDSC12.BIN     27C2001
  3750: 
  3751: ***************************************************************************/
  3752: 
  3753: ROM_START( sandscrp )
  3754: 	ROM_REGION( 0x080000, REGION_CPU1, 0 )		/* 68000 Code */
  3755: 	ROM_LOAD16_BYTE( "sandsc11.bin", 0x000000, 0x040000, CRC(9b24ab40) SHA1(3187422dbe8b15d8053be4cb20e56d3e6afbd5f2) )
  3756: 	ROM_LOAD16_BYTE( "sandsc12.bin", 0x000001, 0x040000, CRC(ad12caee) SHA1(83267445b89c3cf4dc317106aa68763d2f29eff7) )
  3757: 
  3758: 	ROM_REGION( 0x24000, REGION_CPU2, 0 )		/* Z80 Code */
  3759: 	ROM_LOAD( "sandsc08.bin", 0x00000, 0x0c000, CRC(6f3e9db1) SHA1(06a04fa17f44319986913bff70433510c89e38f1) )
  3760: 	ROM_CONTINUE(             0x10000, 0x14000             )
  3761: 
  3762: 	ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3763: 	ROM_LOAD( "sandsc05.bin", 0x000000, 0x080000, CRC(9bb675f6) SHA1(c3f6768cfd99a0e19ca2224fff9aa4e27ec0da24) )
  3764: 	ROM_LOAD( "sandsc06.bin", 0x080000, 0x080000, CRC(7df2f219) SHA1(e2a59e201bfededa92d6c86f8dc1b212527ef66f) )
  3765: 
  3766: 	ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )	/* Layers */
  3767: 	ROM_LOAD16_BYTE( "sandsc04.bin", 0x000000, 0x080000, CRC(b9222ff2) SHA1(a445da3f7f5dea5ff64bb0b048f624f947875a39) )
  3768: 	ROM_LOAD16_BYTE( "sandsc03.bin", 0x000001, 0x080000, CRC(adf20fa0) SHA1(67a7a2be774c86916cbb97e4c9b16c2e48125780) )
  3769: 
  3770: 	ROM_REGION( 0x040000, REGION_SOUND1, 0 )	/* Samples */
  3771: 	ROM_LOAD( "sandsc07.bin", 0x000000, 0x040000, CRC(9870ab12) SHA1(5ea3412cbc57bfaa32a1e2552b2eb46f4ceb5fa8) )
  3772: ROM_END
  3773: 
  3774: 
  3775: /***************************************************************************
  3776: 
  3777: 								Shogun Warriors
  3778: 
  3779: Shogun Warriors, Kaneko 1992
  3780: 
  3781:    fb010.u65           fb040.u33
  3782:    fb011.u66
  3783:    rb012.u67
  3784:    rb013.u68
  3785: 
  3786:                          fb001.u43
  3787:      68000-12            fb000.u42  m6295
  3788:     51257     fb030.u61  fb002.u44  m6295
  3789:     51257     fb031.u62  fb003.u45
  3790: 
  3791: 
  3792:                 fb021a.u3
  3793:                 fb021b.u4
  3794:                 fb022a.u5
  3795:    fb023.u7     fb022b.u6
  3796:    fb020a.u1    fb020b.u2
  3797: 
  3798: 
  3799: 
  3800: ---------------------------------------------------------------------------
  3801: 								Game code
  3802: ---------------------------------------------------------------------------
  3803: 
  3804: 102e04-7	<- !b80004-7
  3805: 102e18.w	-> $800000
  3806: 102e1c.w	-> $800002 , $800006
  3807: 102e1a.w	-> $800004
  3808: 102e20.w	-> $800008
  3809: 
  3810: ROUTINES:
  3811: 
  3812: 6622	print ($600000)
  3813: 
  3814: ***************************************************************************/
  3815: 
  3816: ROM_START( shogwarr )
  3817:  	ROM_REGION( 0x040000, REGION_CPU1, 0 )			/* 68000 Code */
  3818: 	ROM_LOAD16_BYTE( "fb030a.u61", 0x000000, 0x020000, CRC(a04106c6) )
  3819: 	ROM_LOAD16_BYTE( "fb031a.u62", 0x000001, 0x020000, CRC(d1def5e2) )
  3820: 
  3821:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  3822: 	ROM_LOAD( "fb040a.u33",  0x000000, 0x020000, CRC(4b62c4d9) )
  3823: 
  3824: 	ROM_REGION( 0x600000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3825: 	ROM_LOAD( "fb020a.u1",  0x000000, 0x080000, CRC(da1b7373) )
  3826: 	ROM_LOAD( "fb022a.u5",  0x080000, 0x080000, CRC(60aa1282) )
  3827: 	ROM_LOAD( "fb020b.u2",  0x100000, 0x100000, CRC(276b9d7b) )
  3828: 	ROM_LOAD( "fb021a.u3",  0x200000, 0x100000, CRC(7da15d37) )
  3829: 	ROM_LOAD( "fb021b.u4",  0x300000, 0x100000, CRC(6a512d7b) )
  3830: 	ROM_LOAD( "fb023.u7",   0x400000, 0x100000, CRC(132794bd) )
  3831: 	ROM_LOAD( "fb022b.u6",  0x500000, 0x080000, CRC(cd05a5c8) )
  3832: 
  3833: 	ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3834: 	ROM_LOAD( "fb010.u65",  0x000000, 0x100000, CRC(296ffd92) )
  3835: 	ROM_LOAD( "fb011.u66",  0x100000, 0x080000, CRC(500a0367) )	// ?!
  3836: 	ROM_LOAD( "rb012.u67",  0x200000, 0x100000, CRC(bfdbe0d1) )
  3837: 	ROM_LOAD( "rb013.u68",  0x300000, 0x100000, CRC(28c37fe8) )
  3838: 
  3839: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3840: 	ROM_LOAD( "fb000e.u42",  0x000000, 0x080000, CRC(969f1465) )	// 2 x $40000
  3841: 	ROM_LOAD( "fb001e.u43",  0x080000, 0x080000, CRC(f524aaa1) )	// 2 x $40000
  3842: 
  3843: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3844: 	ROM_LOAD( "fb002.u44",   0x000000, 0x080000, CRC(05d7c2a9) )	// 2 x $40000
  3845: 	ROM_LOAD( "fb003.u45",   0x080000, 0x080000, CRC(405722e9) )	// 2 x $40000
  3846: ROM_END
  3847: 
  3848: 
  3849: DRIVER_INIT( shogwarr )
  3850: {
  3851: 	/* Code patches */
  3852: #if 0 
  3853: 	data16_t *RAM = memory_region(REGION_CPU1);
  3854: 	RAM[0x0039a / 2] = 0x4e71;	// 200000 test
  3855: 	RAM[0x003e6 / 2] = 0x4e71;	// 20030a test
  3856: 	RAM[0x223a8 / 2] = 0x6000;	// rom test
  3857: #endif 
  3858: 
  3859: 	init_kaneko16();
  3860: 
  3861: /*
  3862: 	ROM test at 2237e:
  3863: 
  3864: 	the chksum of 00000-03fffd = $657f is added to ($200042).w
  3865: 	[from shared ram]. The result must be $f463 [=($3fffe).w]
  3866: 
  3867: 	Now, $f463-$657f = $8ee4 = byte sum of FB040A.U33 !!
  3868: 
  3869: 	So, there's probably the MCU's code in there, though
  3870: 	I can't id what kind of CPU should run it :-(
  3871: */
  3872: }
  3873: 
  3874: /***************************************************************************
  3875: 
  3876: 								Fujiyama Buster
  3877: 
  3878: Japan (c) 1992 Kaneko
  3879: This is the Japanese version of Shogun Warriors
  3880: 
  3881: Main PCB No: ZO1DK-002 (Same as B.Rap Boys)
  3882:  ROM PCB No: ZO5DP
  3883:         CPU: TMP68HC000N-12 (Toshiba)
  3884:         SND: OKI M6295 x 2
  3885:         OSC: 16.000MHz, 12.000MHz
  3886:         DIP: 1 x 8 POSITION
  3887: 
  3888: OTHER:
  3889: 93C46 (8 Pin DIP, EEPROM, Linked to FB-040.U33 & CALC3 Chip)
  3890: KANEKO JAPAN 9152EV 175101 (160 Pin PQFP)
  3891: KANEKO VIEW2-CHIP (144 Pin PQFP)
  3892: KANEKO MUX2-CHIP (64 Pin PQFP)
  3893: KANEKO CALC3 508 (74 Pin PQFP, MCU, Linked to FB-040.U33)
  3894: KANEKO JAPAN 9203 T (44 PIN PQFP)
  3895: 
  3896: Differences from Shogun Warriors:
  3897: 
  3898: File Name    CRC32       Labelled As   ROM Type
  3899: ===============================================
  3900: fb030j.u61   0x32ce7909  FB030J/U61-00   27C010 | 68000 CPU Code
  3901: fb031j.u62   0x000c8c08  FB031J/U62-00   27C010 /
  3902: 
  3903: fb040j.u33   0x299d0746  FB040J/U33-00   27C010 - MCU Code? 68000 Code snipets??
  3904: 
  3905: fb000j.u43   0xa7522555  FB000J/U43-00   27C040 | Japanese Sound Samples
  3906: fb001j_u.101 0x07d4e8e2  FB001J/U101-0   27C040 /
  3907: 
  3908: NOTE: U67 & U68 are empty on this Original board.
  3909: 
  3910: ***************************************************************************/
  3911: 
  3912: ROM_START( fjbuster )	// Fujiyama Buster - Japan version of Shogun Warriors
  3913:  	ROM_REGION( 0x040000, REGION_CPU1, 0 )			/* 68000 Code */
  3914: 	ROM_LOAD16_BYTE( "fb030j.u61", 0x000000, 0x020000, CRC(32ce7909) )
  3915: 	ROM_LOAD16_BYTE( "fb031j.u62", 0x000001, 0x020000, CRC(000c8c08) )
  3916: 
  3917:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  3918: 	ROM_LOAD( "fb040j.u33",  0x000000, 0x020000, CRC(299d0746) )
  3919: 
  3920: 	ROM_REGION( 0x600000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  3921: 	ROM_LOAD( "fb020a.u1",  0x000000, 0x080000, CRC(da1b7373) )
  3922: 	ROM_LOAD( "fb022a.u5",  0x080000, 0x080000, CRC(60aa1282) )
  3923: 	ROM_LOAD( "fb020b.u2",  0x100000, 0x100000, CRC(276b9d7b) )
  3924: 	ROM_LOAD( "fb021a.u3",  0x200000, 0x100000, CRC(7da15d37) )
  3925: 	ROM_LOAD( "fb021b.u4",  0x300000, 0x100000, CRC(6a512d7b) )
  3926: 	ROM_LOAD( "fb023.u7",   0x400000, 0x100000, CRC(132794bd) )
  3927: 	ROM_LOAD( "fb022b.u6",  0x500000, 0x080000, CRC(cd05a5c8) )
  3928: 
  3929: 	ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  3930: 	ROM_LOAD( "fb010.u65",  0x000000, 0x100000, CRC(296ffd92) )
  3931: 	ROM_LOAD( "fb011.u66",  0x100000, 0x080000, CRC(500a0367) )	// ?!
  3932: //	ROM_LOAD( "rb012.u67",  0x200000, 0x100000, CRC(bfdbe0d1) )	Not used!  No ROMs here
  3933: //	ROM_LOAD( "rb013.u68",  0x300000, 0x100000, CRC(28c37fe8) )	Not used!  No ROMs here
  3934: 
  3935: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  3936: 	ROM_LOAD( "fb000j.u43",    0x000000, 0x080000, CRC(a7522555) )	// 2 x $40000
  3937: 	ROM_LOAD( "fb001j_u.101",  0x080000, 0x080000, CRC(07d4e8e2) )	// 2 x $40000
  3938: 
  3939: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  3940: 	ROM_LOAD( "fb002.u44",   0x000000, 0x080000, CRC(05d7c2a9) )	// 2 x $40000
  3941: 	ROM_LOAD( "fb003.u45",   0x080000, 0x080000, CRC(405722e9) )	// 2 x $40000
  3942: ROM_END
  3943: 
  3944: DRIVER_INIT( fjbuster )
  3945: {
  3946: 	/* Code patches */
  3947: #if 0 
  3948: /*
  3949: 	Need to find equivalent for Fujiyama Buster for these patches:
  3950: 
  3951: 	data16_t *RAM = memory_region(REGION_CPU1);
  3952: 	RAM[0x0039a / 2] = 0x4e71;	// 200000 test
  3953: 	RAM[0x003e6 / 2] = 0x4e71;	// 20030a test
  3954: 	RAM[0x223a8 / 2] = 0x6000;	// rom test
  3955: */
  3956: #endif 
  3957: 
  3958: 	init_kaneko16();
  3959: }
  3960: 
  3961: /***************************************************************************
  3962: 
  3963: 								B.Rap Boys
  3964: 
  3965: B.Rap Boys
  3966: Kaneko, 1992
  3967: 
  3968: Game is a beat-em up, where a bunch of rapping boys (The B.Rap Boys) beats
  3969: up anyone and anything that gets in their way, smashing shop windows
  3970: and other property with their fists, chairs, wooden bats and whatever else
  3971: they can lay their hands on!
  3972: 
  3973: 
  3974: Main PCB No: ZO1DK-002
  3975: ROM PCB No:  ZO1DK-EXROM
  3976: CPU: TMP68HC000N-12
  3977: SND: OKI M6295 x 2
  3978: OSC: 16.000MHz, 12.000MHz
  3979: DIP: 1 x 8 POSITION
  3980: SW1 - PCB location for 2 position DIP but location is unpopulated.
  3981: SW2:
  3982: 
  3983: 					1	2	3	4	5	6	7	8
  3984: SCREEN FLIP		NORMAL		OFF
  3985: 			FLIP		ON
  3986: MODE			NORMAL			OFF
  3987: 			TEST			ON
  3988: SWITCH TEST [1]		NO				OFF
  3989: 			YES				ON
  3990: POSITION #4		NOT USED				OFF
  3991: COIN TYPE	 	LOCAL COIN					OFF
  3992: 			COMMON COIN					ON
  3993: GAME TYPE		3 PLAYERS	 					OFF
  3994: 			2 PLAYERS						ON
  3995: DIFFICULTY [2]		EASY								ON	OFF
  3996: 			NORMAL								OFF	OFF
  3997: 			HARD								OFF	ON
  3998: 			VERY HARD							ON	ON
  3999: 
  4000: [1] This additional test becomes available in test mode when this DIP is ON.
  4001: [2] Additional settings available in test mode via another on-screen menu.
  4002: Some text is written in Japanese. See scan in archive for details.
  4003: 
  4004: Control is via 8 Way Joystick and 2 buttons
  4005: 
  4006: There are two extra pin connectors near the JAMMA connector.
  4007: Pinouts are....
  4008: 
  4009: (A)
  4010: 10 3P START SW
  4011:  9 3P COIN SW
  4012:  8 3P BUTTON 2
  4013:  7 3P BUTTON 1
  4014:  6 3P UP
  4015:  5 3P DOWN
  4016:  4 3P LEFT
  4017:  3 3P RIGHT
  4018:  2 GND
  4019:  1 GND
  4020: 
  4021: (B)
  4022: 6 COIN COUNTER 3
  4023: 5 COIN LOCKOUT 3
  4024: 4 TOTAL COIN COUNTER
  4025: 3 NC
  4026: 2 NC
  4027: 1 NC
  4028: 
  4029: RAM:
  4030: M5M4464 x 6, M51257AL x 2, KM6264BLS x 2, D42101C x 2, LH5116D x 2, CAT71C256 x 2
  4031: 
  4032: OTHER:
  4033: 93C46 (8 PIN DIP, EEPROM, LINKED TO RB-006.U33)
  4034: KANEKO JAPAN 9152EV 175101 (160 PIN PQFP)
  4035: KANEKO VIEW2-CHIP (144 PIN PQFP)
  4036: KANEKO MUX2-CHIP (64 PIN PQFP)
  4037: KANEKO CALC3 508 (74 PIN PQFP, MCU, LINKED TO RB-006.U33)
  4038: KANEKO JAPAN 9204 T (44 PIN PQFP)
  4039: PALs (x 11, read protected, not dumped)
  4040: 
  4041: ROMs:
  4042: RB-004.U61	27C010	  \     Main program
  4043: RB-005.U62	27C010    /
  4044: 
  4045: RB-000.U43	2M mask	  \
  4046: RB-001.U44	4M mask	   |    Located near main program and OKI M6295 chips
  4047: RB-002.U45	4M mask	   |    Possibly sound related / OKI Samples etc..
  4048: RB-003.101	4M mask	  /
  4049: 
  4050: RB-006.U33	27C010	  	MCU program? (Linked to CALC3 508)
  4051: 
  4052: RB-010.U65	8M mask   \
  4053: RB-011.U66	8M mask	   |    GFX
  4054: RB-012.U67	8M mask    |
  4055: RB-013.U68	8M mask   /
  4056: 
  4057: RB-021.U76	4M mask   \
  4058: RB-022.U77	4M mask    |
  4059: RB-023.U78	4M mask	   |	GFX (located under a plug-in ROM PCB)
  4060: RB-024.U79	4M mask   /
  4061: 
  4062: RB-020.U2	4M mask   \
  4063: RB-025.U4	27C040	   |	GFX (located on a plug-in ROM PCB)
  4064: RB-026.U5	27C040    /
  4065: 
  4066: More info reqd? Problems with the archive? Email me....
  4067: theguru@emuunlim.com
  4068: 
  4069: -----
  4070: 
  4071: Game can be ROM Swapped onto a Shogun Warriors board and works
  4072: 
  4073: ***************************************************************************/
  4074: 
  4075: ROM_START( brapboys )
  4076:  	ROM_REGION( 0x040000, REGION_CPU1, 0 )			/* 68000 Code */
  4077: 	ROM_LOAD16_BYTE( "rb-004.u61", 0x000000, 0x020000, CRC(5432442c) )
  4078: 	ROM_LOAD16_BYTE( "rb-005.u62", 0x000001, 0x020000, CRC(118b3cfb) )
  4079: 
  4080:  	ROM_REGION( 0x020000, REGION_CPU2, 0 )			/* MCU Code */
  4081: 	ROM_LOAD( "rb-006.u33",  0x000000, 0x020000, CRC(f1d76b20) )
  4082: 
  4083: 	ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )	/* Sprites */
  4084: 	/* order is probably wrong, but until it does more we can't tell */
  4085: 	ROM_LOAD( "rb-020.u2",  0x000000, 0x080000, CRC(b038440e) )
  4086: 	ROM_LOAD( "rb-025.u4",  0x080000, 0x080000, CRC(aa795ba5) )
  4087: 	ROM_LOAD( "rb-026.u5",  0x100000, 0x080000, CRC(bb7604d4) )
  4088: 
  4089: 	ROM_LOAD( "rb-021.u76", 0x200000, 0x080000, CRC(b7e2d362) )
  4090: 	ROM_LOAD( "rb-022.u77", 0x280000, 0x080000, CRC(8d40c97a) ) // right pos. (text)
  4091: 	ROM_LOAD( "rb-023.u78", 0x300000, 0x080000, CRC(dcf11c8d) )
  4092: 	ROM_LOAD( "rb-024.u79", 0x380000, 0x080000, CRC(65fa6447) )
  4093: 
  4094: 	ROM_REGION( 0x400000, REGION_GFX2, ROMREGION_DISPOSE )	/* Tiles (scrambled) */
  4095: 	ROM_LOAD( "rb-010.u65",  0x000000, 0x100000, CRC(ffd73f87) )
  4096: 	ROM_LOAD( "rb-011.u66",  0x100000, 0x100000, CRC(d9325f78) )
  4097: 	ROM_LOAD( "rb-012.u67",  0x200000, 0x100000, CRC(bfdbe0d1) ) // same as shoggwar
  4098: 	ROM_LOAD( "rb-013.u68",  0x300000, 0x100000, CRC(28c37fe8) ) // same as shoggwar
  4099: 
  4100: 	ROM_REGION( 0x100000, REGION_SOUND1, 0 )	/* Samples */
  4101: 	/* order is probably wrong, but until it does more we can't tell */
  4102: 	ROM_LOAD( "rb-003.101",  0x000000, 0x080000, CRC(2cac25d7) )
  4103: 	ROM_LOAD( "rb-000.u43",  0x080000, 0x040000, CRC(c7c848ac) )
  4104: 
  4105: 	ROM_REGION( 0x100000, REGION_SOUND2, 0 )	/* Samples */
  4106: 	/* order is probably wrong, but until it does more we can't tell */
  4107: 	ROM_LOAD( "rb-001.u44",   0x000000, 0x080000, CRC(09c779e3) )
  4108: 	ROM_LOAD( "rb-002.u45",   0x080000, 0x080000, CRC(55de7003) )
  4109: ROM_END
  4110: 
  4111: /***************************************************************************
  4112: 
  4113: 
  4114: 								Game drivers
  4115: 
  4116: 
  4117: ***************************************************************************/
  4118: 
  4119: /* Working games */
  4120: 
  4121: GAME( 1991, berlwall, 0,        berlwall, berlwall, berlwall, ROT0,  "Kaneko", "The Berlin Wall (set 1)" )
  4122: GAME( 1991, berlwalt, berlwall, berlwall, berlwalt, berlwall, ROT0,  "Kaneko", "The Berlin Wall (set 2)" )
  4123: GAME( 1991, mgcrystl, 0,        mgcrystl, mgcrystl, kaneko16, ROT0,  "Kaneko", "Magical Crystals (World)" )
  4124: GAME( 1991, mgcrystj, mgcrystl, mgcrystl, mgcrystl, kaneko16, ROT0,  "Kaneko (Atlus license)", "Magical Crystals (Japan)" )
  4125: GAME( 1992, blazeon,  0,        blazeon,  blazeon,  kaneko16, ROT0,  "Atlus",  "Blaze On (Japan)" )
  4126: GAME( 1992, sandscrp, 0,        sandscrp, sandscrp, 0,        ROT90, "Face",   "Sand Scorpion" )
  4127: GAME( 1994, gtmr,     0,        gtmr,     gtmr,     kaneko16, ROT0,  "Kaneko", "Great 1000 Miles Rally" )
  4128: GAME( 1994, gtmre,    gtmr,     gtmr,     gtmr,     kaneko16, ROT0,  "Kaneko", "Great 1000 Miles Rally (Evolution Model)" )
  4129: GAME( 1994, gtmrusa,  gtmr,     gtmr,     gtmr,     kaneko16, ROT0,  "Kaneko", "Great 1000 Miles Rally (USA)" )
  4130: 
  4131: /* Non-working games (mainly due to incomplete dumps) */
  4132: 
  4133: GAME( 1995, gtmr2,    0,        gtmr2,    gtmr2,    kaneko16, ROT0,  "Kaneko", "Mille Miglia 2: Great 1000 Miles Rally" )
  4134: 
  4135: GAMEX(1992, bakubrkr, 0,        bakubrkr, bakubrkr, 0,        ROT90,      "Kaneko", "Bakuretsu Breaker",         GAME_NOT_WORKING  )
  4136: GAMEX(1992, shogwarr, 0,        shogwarr, shogwarr, shogwarr, ROT0,       "Kaneko", "Shogun Warriors",           GAME_NOT_WORKING  )
  4137: GAMEX(1992, fjbuster, shogwarr, shogwarr, shogwarr, fjbuster, ROT0,  "Kaneko", "Fujiyama Buster (Japan)", GAME_NOT_WORKING  )
  4138: GAMEX(1992, brapboys, 0,        shogwarr, shogwarr, 0,        ROT0,       "Kaneko", "B.Rap Boys",                GAME_NOT_WORKING  )
  4139: GAMEX(1994, bloodwar, 0,        bloodwar, bloodwar, kaneko16, ROT0,  "Kaneko", "Blood Warrior",           GAME_NOT_WORKING  )
  4140: 




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