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

Source Listing


     1: /*
     2: 	Sega System16 Hardware
     3: 	major cleanup in progress - still a lot to do!
     4: 
     5: 	see vidhrdw/system16.c for more information
     6: */
     7: 
     8: /***************************************************************************/
     9: /*
    10:   ASTORMBL
    11:           3. In the ending, the 3 heroes are floating into a half bubble. (see picture).
    12:           Also colour problems during ending as well.
    13:           4. In the later Shooting gallery stage (like inside the car shop and the factory (mission 3)),
    14: 		  there is some garbage graphics (sprite of death monsters that appear where they should not)
    15: 
    16: 	working:
    17: 		Alex Kidd
    18: 		Alien Storm (bootleg)
    19: 		Alien Syndrome
    20: 		Altered Beast (Ver 1)
    21: 		Altered Beast (Ver 2)	(No Sound)
    22: 		Atomic Point			(No Sound)
    23: 		Aurail					(Speech quality sounds poor)
    24: 		Aurail (317-0168)
    25: 		Bay Route
    26: 		Body Slam
    27: 	    Dump Matsumoto (Japan, Body Slam)
    28: 		Dynamite Dux (bootleg)
    29: 		Enduro Racer (bootleg)
    30: 		Enduro Racer (custom bootleg)
    31: 		E-Swat (bootleg)
    32: 		Fantasy Zone (Old Ver.)
    33: 		Fantasy Zone (New Ver.)
    34: 		Flash Point  (bootleg)
    35: 		Golden Axe (Ver 1)
    36: 		Golden Axe (Ver 2)
    37: 		Hang-on
    38: 		Heavyweight Champ: some minor graphics glitches
    39: 		Major League: No game over.
    40: 		Moonwalker (bootleg): Music Speed varies
    41: 		Outrun (set 1)
    42: 		Outrun (set 2)
    43: 		Outrun (custom bootleg)
    44: 		Passing Shot (bootleg)
    45: 		Passing Shot (4 player bootleg)
    46: 		Quartet: Glitch on highscore list
    47: 		Quartet (Japan): Glitch on highscore list
    48: 		Quartet 2: Glitch on highscore list
    49: 		Riot City
    50: 		SDI
    51: 		Shadow Dancer
    52: 		Shadow Dancer (Japan)
    53: 		Shinobi
    54: 		Shinobi (Sys16A Bootleg?)
    55: 		Space Harrier
    56: 		Super Hangon (bootleg)
    57: 		Tetris (bootleg)
    58: 		Time Scanner
    59: 		Toryumon
    60: 		Tough Turf (Japan)			(No Sound)
    61: 		Tough Turf (US)				(No Sound)
    62: 		Tough Turf (bootleg)	(No Speech Roms)
    63: 		Wonderboy 3 - Monster Lair
    64: 		Wonderboy 3 - Monster Lair (bootleg)
    65: 		Wrestle War
    66: 
    67: 	not really working:
    68: 		Shadow Dancer (bootleg)
    69: 
    70: 	protected:
    71: 		Alex Kidd (jpn?)
    72: 		Alien Syndrome
    73: 		Alien Syndrome
    74: 		Alien Syndrome (Japan)
    75: 		Alien Storm
    76: 		Alien Storm (2 Player)
    77: 		Bay Route (317-0116)
    78: 		Bay Route (protected bootleg 1)
    79: 		Bay Route (protected bootleg 2)
    80: 		Enduro Racer
    81: 		E-Swat
    82: 		Flash Point
    83: 		Golden Axe (Ver 1 317-0121 Japan)
    84: 		Golden Axe (Ver 2 317-0110)
    85: 		Golden Axe (Ver 2 317-0122)
    86: 		Golden Axe (protected bootleg)
    87: 		Jyuohki (Japan, altered beast)
    88: 		Moonwalker (317-0158)
    89: 		Moonwalker (317-0159)
    90: 		Passing Shot (317-0080)
    91: 		Shinobi (Sys16B 317-0049)
    92: 		Shinobi (Sys16A 317-0050)
    93: 		SDI (Japan, old version)
    94: 		Super Hangon
    95: 		Tetris (Type A)
    96: 		Tetris (Type B 317-0092)
    97: 		Wonderboy 3 - Monster Lair (317-0089)
    98: 
    99: 	protected (No driver):
   100: 		Ace Attacker
   101: 		Action Fighter
   102: 		Bloxeed
   103: 		Clutch Hitter
   104: 		Cotton (Japan)
   105: 		Cotton
   106: 		DD Crew
   107: 		Dunk Shot
   108: 		Excite League
   109: 		Laser Ghost
   110: 		MVP
   111: 		Ryukyu
   112: 		Super Leagu
   113: 		Turbo Outrun
   114: 		Turbo Outrun (Set 2)
   115: */
   116: 
   117: #include "driver.h" 
   118: #include "vidhrdw/generic.h" 
   119: #include "cpu/z80/z80.h" 
   120: #include "cpu/i8039/i8039.h" 
   121: #include "system16.h" 
   122: 
   123: /***************************************************************************/
   124: 
   125: // 7751 emulation
   126: WRITE_HANDLER( sys16_7751_audio_8255_w );
   127:  READ_HANDLER( sys16_7751_audio_8255_r );
   128:  READ_HANDLER( sys16_7751_sh_rom_r );
   129:  READ_HANDLER( sys16_7751_sh_t1_r );
   130:  READ_HANDLER( sys16_7751_sh_command_r );
   131: WRITE_HANDLER( sys16_7751_sh_dac_w );
   132: WRITE_HANDLER( sys16_7751_sh_busy_w );
   133: WRITE_HANDLER( sys16_7751_sh_offset_a0_a3_w );
   134: WRITE_HANDLER( sys16_7751_sh_offset_a4_a7_w );
   135: WRITE_HANDLER( sys16_7751_sh_offset_a8_a11_w );
   136: WRITE_HANDLER( sys16_7751_sh_rom_select_w );
   137: 
   138: /***************************************************************************/
   139: 
   140: static data16_t coinctrl;
   141: 
   142: static WRITE16_HANDLER( sys16_3d_coinctrl_w )
   143: {
   144: 	if( ACCESSING_LSB ){
   145: 		coinctrl = data&0xff;
   146: 		sys16_refreshenable = coinctrl & 0x10;
   147: 		coin_counter_w(0,coinctrl & 0x01);
   148: 		/* bit 6 is also used (0 in fantzone) */
   149: 
   150: 		/* Hang-On, Super Hang-On, Space Harrier, Enduro Racer */
   151: 		set_led_status(0,coinctrl & 0x04);
   152: 
   153: 		/* Space Harrier */
   154: 		set_led_status(1,coinctrl & 0x08);
   155: 	}
   156: }
   157: 
   158: static INTERRUPT_GEN( sys16_interrupt )
   159: {
   160: 	if(sys16_custom_irq) sys16_custom_irq();
   161: 	cpu_set_irq_line(0, 4, HOLD_LINE); /* Interrupt vector 4, used by VBlank */
   162: }
   163: 
   164: 
   165: 
   166: /***************************************************************************/
   167: 
   168: static MEMORY_READ_START( sound_readmem )
   169: 	{ 0x0000, 0x7fff, MRA_ROM },
   170: 	{ 0xe800, 0xe800, soundlatch_r },
   171: 	{ 0xf800, 0xffff, MRA_RAM },
   172: MEMORY_END
   173: 
   174: static MEMORY_WRITE_START( sound_writemem )
   175: 	{ 0x0000, 0x7fff, MWA_ROM },
   176: 	{ 0xf800, 0xffff, MWA_RAM },
   177: MEMORY_END
   178: 
   179: static PORT_READ_START( sound_readport )
   180: 	{ 0x01, 0x01, YM2151_status_port_0_r },
   181: 	{ 0xc0, 0xc0, soundlatch_r },
   182: PORT_END
   183: 
   184: static PORT_WRITE_START( sound_writeport )
   185: 	{ 0x00, 0x00, YM2151_register_port_0_w },
   186: 	{ 0x01, 0x01, YM2151_data_port_0_w },
   187: PORT_END
   188: 
   189: // 7751 Sound
   190: static MEMORY_READ_START( sound_readmem_7751 )
   191: 	{ 0x0000, 0x7fff, MRA_ROM },
   192: 	{ 0xe800, 0xe800, soundlatch_r },
   193: 	{ 0xf800, 0xffff, MRA_RAM },
   194: MEMORY_END
   195: 
   196: static PORT_READ_START( sound_readport_7751 )
   197: 	{ 0x01, 0x01, YM2151_status_port_0_r },
   198: //    { 0x0e, 0x0e, sys16_7751_audio_8255_r },
   199: 	{ 0xc0, 0xc0, soundlatch_r },
   200: PORT_END
   201: 
   202: static PORT_WRITE_START( sound_writeport_7751 )
   203: 	{ 0x00, 0x00, YM2151_register_port_0_w },
   204: 	{ 0x01, 0x01, YM2151_data_port_0_w },
   205: 	{ 0x80, 0x80, sys16_7751_audio_8255_w },
   206: PORT_END
   207: 
   208: static MEMORY_READ_START( readmem_7751 )
   209: 	{ 0x0000, 0x03ff, MRA_ROM },
   210: MEMORY_END
   211: 
   212: static MEMORY_WRITE_START( writemem_7751 )
   213: 	{ 0x0000, 0x03ff, MWA_ROM },
   214: MEMORY_END
   215: 
   216: static PORT_READ_START( readport_7751 )
   217: 	{ I8039_t1,  I8039_t1,  sys16_7751_sh_t1_r },
   218: 	{ I8039_p2,  I8039_p2,  sys16_7751_sh_command_r },
   219: 	{ I8039_bus, I8039_bus, sys16_7751_sh_rom_r },
   220: PORT_END
   221: 
   222: static PORT_WRITE_START( writeport_7751 )
   223: 	{ I8039_p1, I8039_p1, sys16_7751_sh_dac_w },
   224: 	{ I8039_p2, I8039_p2, sys16_7751_sh_busy_w },
   225: 	{ I8039_p4, I8039_p4, sys16_7751_sh_offset_a0_a3_w },
   226: 	{ I8039_p5, I8039_p5, sys16_7751_sh_offset_a4_a7_w },
   227: 	{ I8039_p6, I8039_p6, sys16_7751_sh_offset_a8_a11_w },
   228: 	{ I8039_p7, I8039_p7, sys16_7751_sh_rom_select_w },
   229: PORT_END
   230: 
   231: // 7759
   232: static MEMORY_READ_START( sound_readmem_7759 )
   233: 	{ 0x0000, 0x7fff, MRA_ROM },
   234: 	{ 0x8000, 0xdfff, MRA_BANK1 },
   235: 	{ 0xe800, 0xe800, soundlatch_r },
   236: 	{ 0xf800, 0xffff, MRA_RAM },
   237: MEMORY_END
   238: 
   239: static WRITE_HANDLER( UPD7759_bank_w )
   240: {
   241: 	int size = (memory_region_length(REGION_CPU2)-0x10000);
   242: 	int mask = size <= 0x20000 ? 0x1ffff : size < 0x40000 ? 0x3ffff : 0x7ffff;
   243: 	int offs = 0x10000 + ((0x4000*data) & mask);
   244: 
   245: 	if (offs>size)
   246: 		offs%=size;
   247: 
   248: 	cpu_setbank(1, memory_region(REGION_CPU2) + offs);
   249: 
   250: 	UPD7759_reset_w(0, data & 0x40);
   251: }
   252: 
   253: 
   254: static PORT_WRITE_START( sound_writeport_7759 )
   255: 	{ 0x00, 0x00, YM2151_register_port_0_w },
   256: 	{ 0x01, 0x01, YM2151_data_port_0_w },
   257: 	{ 0x40, 0x40, UPD7759_bank_w },
   258: 	{ 0x80, 0x80, UPD7759_0_port_w },
   259: PORT_END
   260: 
   261: 
   262: static WRITE16_HANDLER( sound_command_w ){
   263: 	if( ACCESSING_LSB ){
   264: 		soundlatch_w( 0,data&0xff );
   265: 		cpu_set_irq_line( 1, 0, HOLD_LINE );
   266: 	}
   267: }
   268: 
   269: static WRITE16_HANDLER( sound_command_nmi_w ){
   270: 	if( ACCESSING_LSB ){
   271: 		soundlatch_w( 0,data&0xff );
   272: 		cpu_set_nmi_line(1, PULSE_LINE);
   273: 	}
   274: }
   275: 
   276: //static data16_t coinctrl;
   277: 
   278: static READ16_HANDLER( sys16_coinctrl_r ){
   279: 	return coinctrl;
   280: }
   281: 
   282: static WRITE16_HANDLER( sys16_coinctrl_w )
   283: {
   284: 	if( ACCESSING_LSB ){
   285: 		coinctrl = data&0xff;
   286: 		sys16_refreshenable = coinctrl & 0x20;
   287: 		coin_counter_w(0,coinctrl & 0x01);
   288: 		set_led_status(0,coinctrl & 0x04);
   289: 		set_led_status(1,coinctrl & 0x08);
   290: 		/* bit 6 is also used (1 most of the time; 0 in dduxbl, sdi, wb3;
   291: 		   tturf has it normally 1 but 0 after coin insertion) */
   292: 		/* eswat sets bit 4 */
   293: 	}
   294: }
   295: 
   296: /***************************************************************************/
   297: 
   298: static MACHINE_DRIVER_START( system16 )
   299: 
   300: 	/* basic machine hardware */
   301: 	MDRV_CPU_ADD_TAG("main", M68000, 10000000)
   302: 	MDRV_CPU_VBLANK_INT(sys16_interrupt,1)
   303: 
   304: 	MDRV_CPU_ADD_TAG("sound", Z80, 4096000)
   305: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
   306: 	MDRV_CPU_MEMORY(sound_readmem,sound_writemem)
   307: 	MDRV_CPU_PORTS(sound_readport,sound_writeport)
   308: 
   309: 	MDRV_FRAMES_PER_SECOND(60)
   310: 	MDRV_VBLANK_DURATION(DEFAULT_60HZ_VBLANK_DURATION)
   311: 
   312: 	/* video hardware */
   313: 	MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
   314: 	MDRV_SCREEN_SIZE(40*8, 28*8)
   315: 	MDRV_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
   316: 	MDRV_GFXDECODE(sys16_gfxdecodeinfo)
   317: 	MDRV_PALETTE_LENGTH(2048*ShadowColorsMultiplier)
   318: 
   319: 	MDRV_VIDEO_START(system16)
   320: 	MDRV_VIDEO_UPDATE(system16)
   321: 
   322: 	/* sound hardware */
   323: 	MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO)
   324: 	MDRV_SOUND_ADD_TAG("2151", YM2151, sys16_ym2151_interface)
   325: MACHINE_DRIVER_END
   326: 
   327: 
   328: static MACHINE_DRIVER_START( system16_7759 )
   329: 
   330: 	/* basic machine hardware */
   331: 	MDRV_IMPORT_FROM(system16)
   332: 
   333: 	MDRV_CPU_MODIFY("sound")
   334: 	MDRV_CPU_MEMORY(sound_readmem_7759,sound_writemem)
   335: 	MDRV_CPU_PORTS(sound_readport,sound_writeport_7759)
   336: 
   337: 	/* sound hardware */
   338: 	MDRV_SOUND_ADD_TAG("7759", UPD7759, sys16_upd7759_interface)
   339: MACHINE_DRIVER_END
   340: 
   341: 
   342: static MACHINE_DRIVER_START( system16_7751 )
   343: 
   344: 	/* basic machine hardware */
   345: 	MDRV_IMPORT_FROM(system16)
   346: 
   347: 	MDRV_CPU_MODIFY("sound")
   348: 	MDRV_CPU_MEMORY(sound_readmem_7751,sound_writemem)
   349: 	MDRV_CPU_PORTS(sound_readport_7751,sound_writeport_7751)
   350: 
   351: 	MDRV_CPU_ADD(N7751, 6000000/15)
   352: 	MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
   353: 	MDRV_CPU_MEMORY(readmem_7751,writemem_7751)
   354: 	MDRV_CPU_PORTS(readport_7751,writeport_7751)
   355: 
   356: 	/* sound hardware */
   357: 	MDRV_SOUND_ADD(DAC, sys16_7751_dac_interface)
   358: MACHINE_DRIVER_END
   359: 
   360: /***************************************************************************/
   361: 
   362: static void set_tile_bank( int data ){
   363: 	sys16_tile_bank1 = data&0xf;
   364: 	sys16_tile_bank0 = (data>>4)&0xf;
   365: }
   366: 
   367: #if 0 
   368: static void set_tile_bank18( int data ){
   369: 	sys16_tile_bank0 = data&0xf;
   370: 	sys16_tile_bank1 = (data>>4)&0xf;
   371: }
   372: #endif 
   373: 
   374: static void set_fg_page( int data ){
   375: 	sys16_fg_page[0] = data>>12;
   376: 	sys16_fg_page[1] = (data>>8)&0xf;
   377: 	sys16_fg_page[2] = (data>>4)&0xf;
   378: 	sys16_fg_page[3] = data&0xf;
   379: }
   380: 
   381: static void set_bg_page( int data ){
   382: 	sys16_bg_page[0] = data>>12;
   383: 	sys16_bg_page[1] = (data>>8)&0xf;
   384: 	sys16_bg_page[2] = (data>>4)&0xf;
   385: 	sys16_bg_page[3] = data&0xf;
   386: }
   387: 
   388: static void set_fg_page1( int data ){
   389: 	sys16_fg_page[1] = data>>12;
   390: 	sys16_fg_page[0] = (data>>8)&0xf;
   391: 	sys16_fg_page[3] = (data>>4)&0xf;
   392: 	sys16_fg_page[2] = data&0xf;
   393: }
   394: 
   395: static void set_bg_page1( int data ){
   396: 	sys16_bg_page[1] = data>>12;
   397: 	sys16_bg_page[0] = (data>>8)&0xf;
   398: 	sys16_bg_page[3] = (data>>4)&0xf;
   399: 	sys16_bg_page[2] = data&0xf;
   400: }
   401: 
   402: #if 0 
   403: static void set_fg2_page( int data ){
   404: 	sys16_fg2_page[0] = data>>12;
   405: 	sys16_fg2_page[1] = (data>>8)&0xf;
   406: 	sys16_fg2_page[2] = (data>>4)&0xf;
   407: 	sys16_fg2_page[3] = data&0xf;
   408: }
   409: 
   410: static void set_bg2_page( int data ){
   411: 	sys16_bg2_page[0] = data>>12;
   412: 	sys16_bg2_page[1] = (data>>8)&0xf;
   413: 	sys16_bg2_page[2] = (data>>4)&0xf;
   414: 	sys16_bg2_page[3] = data&0xf;
   415: }
   416: #endif 
   417: 
   418: /***************************************************************************/
   419: // sys16A
   420: ROM_START( alexkidd )
   421: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
   422: 	ROM_LOAD16_BYTE( "epr10429.42", 0x000000, 0x10000, CRC(bdf49eca) SHA1(899bc2d346544e4a33de51b60e02ebf7ee82cea8) )
   423: 	ROM_LOAD16_BYTE( "epr10427.26", 0x000001, 0x10000, CRC(f6e3dd29) SHA1(bb94ebc062bb7c6c13b68579053b9cbe8b92417c) )
   424: 	ROM_LOAD16_BYTE( "epr10430.43", 0x020000, 0x10000, CRC(89e3439f) SHA1(7c751bb477584842d93fda6686b03e289140bd62) )
   425: 	ROM_LOAD16_BYTE( "epr10428.25", 0x020001, 0x10000, CRC(dbed3210) SHA1(1e2d22935a633641ff88967d67ec673ee25cbf55) )
   426: 
   427: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   428: 	ROM_LOAD( "10431.95", 0x00000, 0x08000, CRC(a7962c39) SHA1(c816fc5d9f21b2ba32b9841e64b634bce7ea78c8) )
   429: 	ROM_LOAD( "10432.94", 0x08000, 0x08000, CRC(db8cd24e) SHA1(656d98844ad9ccaa68e3f501137dddd0a27d999d) )
   430: 	ROM_LOAD( "10433.93", 0x10000, 0x08000, CRC(e163c8c2) SHA1(ac54c5ecedca5b1a2c550de32687ca57c4d3a411) )
   431: 
   432: 	ROM_REGION( 0x040000, REGION_GFX2, 0 ) /* sprites */
   433: 	ROM_LOAD16_BYTE( "10437.10", 0x000001, 0x8000, CRC(522f7618) SHA1(9a6bc857dfef1dd1b7bffa034523c1c4cd8b3f4c) )
   434: 	ROM_LOAD16_BYTE( "10441.11", 0x000000, 0x8000, CRC(74e3a35c) SHA1(26b980a0a3aee94ac38e0e0c7d305bb35a60d1c4) )
   435: 	ROM_LOAD16_BYTE( "10438.17", 0x010001, 0x8000, CRC(738a6362) SHA1(a3c5f10c263cb216d275875f6333484a1cca281b) )
   436: 	ROM_LOAD16_BYTE( "10442.18", 0x010000, 0x8000, CRC(86cb9c14) SHA1(42bd0ed985de61ff183eed0192257966caa01594) )
   437: 	ROM_LOAD16_BYTE( "10439.23", 0x020001, 0x8000, CRC(b391aca7) SHA1(ca9d80b67e5365f709f90a5342b5e3aa7c7126e1) )
   438: 	ROM_LOAD16_BYTE( "10443.24", 0x020000, 0x8000, CRC(95d32635) SHA1(788af2af1ae783128bcdc8cd44d17cd2f1542231) )
   439: 	ROM_LOAD16_BYTE( "10440.29", 0x030001, 0x8000, CRC(23939508) SHA1(68450a18fc7e35f5b0155632aa68cffd251be38c) )
   440: 	ROM_LOAD16_BYTE( "10444.30", 0x030000, 0x8000, CRC(82115823) SHA1(e4103003cda949bebe57815115a5028f4fe8e7d7) )
   441: 
   442: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
   443: 	ROM_LOAD( "10434.12", 0x0000, 0x8000, CRC(77141cce) SHA1(6c5e83527f7e11a5ff5cc4fa75d55618a55e1a58) )
   444: 
   445: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
   446: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
   447: 
   448: 	ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* 7751 sound data (not used yet) */
   449: 	ROM_LOAD( "10435.1", 0x0000, 0x8000, CRC(ad89f6e3) SHA1(812a132142065b0fe13b5f0ac534b6d8830ba102) )
   450: 	ROM_LOAD( "10436.2", 0x8000, 0x8000, CRC(96c76613) SHA1(fe3e4e649fd2cb2453eec0c92015bd54b3b9a1b5) )
   451: ROM_END
   452: 
   453: ROM_START( alexkida )
   454: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
   455: 	ROM_LOAD16_BYTE( "10447.43", 0x000000, 0x10000, CRC(29e87f71) SHA1(af980e55c02b3de1121c144fee23af74d24042ac) )
   456: 	ROM_LOAD16_BYTE( "10445.26", 0x000001, 0x10000, CRC(25ce5b6f) SHA1(dfec64df7e8d145d30740808bc94bdbbe667c4e8) )
   457: 	ROM_LOAD16_BYTE( "10448.42", 0x020000, 0x10000, CRC(05baedb5) SHA1(fc15989bf3d850170e4e018d74f18553f0268576) )
   458: 	ROM_LOAD16_BYTE( "10446.25", 0x020001, 0x10000, CRC(cd61d23c) SHA1(c235c4fef28556e9f2d07e815ad213c308e85598) )
   459: 
   460: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   461: 	ROM_LOAD( "10431.95", 0x00000, 0x08000, CRC(a7962c39) SHA1(c816fc5d9f21b2ba32b9841e64b634bce7ea78c8) )
   462: 	ROM_LOAD( "10432.94", 0x08000, 0x08000, CRC(db8cd24e) SHA1(656d98844ad9ccaa68e3f501137dddd0a27d999d) )
   463: 	ROM_LOAD( "10433.93", 0x10000, 0x08000, CRC(e163c8c2) SHA1(ac54c5ecedca5b1a2c550de32687ca57c4d3a411) )
   464: 
   465: 	ROM_REGION( 0x040000, REGION_GFX2, 0 ) /* sprites */
   466: 	ROM_LOAD16_BYTE( "10437.10", 0x000001, 0x8000, CRC(522f7618) SHA1(9a6bc857dfef1dd1b7bffa034523c1c4cd8b3f4c) )
   467: 	ROM_LOAD16_BYTE( "10441.11", 0x000000, 0x8000, CRC(74e3a35c) SHA1(26b980a0a3aee94ac38e0e0c7d305bb35a60d1c4) )
   468: 	ROM_LOAD16_BYTE( "10438.17", 0x010001, 0x8000, CRC(738a6362) SHA1(a3c5f10c263cb216d275875f6333484a1cca281b) )
   469: 	ROM_LOAD16_BYTE( "10442.18", 0x010000, 0x8000, CRC(86cb9c14) SHA1(42bd0ed985de61ff183eed0192257966caa01594) )
   470: 	ROM_LOAD16_BYTE( "10439.23", 0x020001, 0x8000, CRC(b391aca7) SHA1(ca9d80b67e5365f709f90a5342b5e3aa7c7126e1) )
   471: 	ROM_LOAD16_BYTE( "10443.24", 0x020000, 0x8000, CRC(95d32635) SHA1(788af2af1ae783128bcdc8cd44d17cd2f1542231) )
   472: 	ROM_LOAD16_BYTE( "10440.29", 0x030001, 0x8000, CRC(23939508) SHA1(68450a18fc7e35f5b0155632aa68cffd251be38c) )
   473: 	ROM_LOAD16_BYTE( "10444.30", 0x030000, 0x8000, CRC(82115823) SHA1(e4103003cda949bebe57815115a5028f4fe8e7d7) )
   474: 
   475: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
   476: 	ROM_LOAD( "10434.12", 0x0000, 0x8000, CRC(77141cce) SHA1(6c5e83527f7e11a5ff5cc4fa75d55618a55e1a58) )
   477: 
   478: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
   479: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
   480: 
   481: 	ROM_REGION( 0x10000, REGION_SOUND1, 0 ) /* 7751 sound data */
   482: 	ROM_LOAD( "10435.1", 0x0000, 0x8000, CRC(ad89f6e3) SHA1(812a132142065b0fe13b5f0ac534b6d8830ba102) )
   483: 	ROM_LOAD( "10436.2", 0x8000, 0x8000, CRC(96c76613) SHA1(fe3e4e649fd2cb2453eec0c92015bd54b3b9a1b5) )
   484: ROM_END
   485: 
   486: /***************************************************************************/
   487: 
   488: static READ16_HANDLER( alexkidd_skip_r ){
   489: 	if (activecpu_get_pc()==0x242c) {cpu_spinuntil_int(); return 0xffff;}
   490: 	return sys16_workingram[0x3108/2];
   491: }
   492: 
   493: static MEMORY_READ16_START( alexkidd_readmem )
   494: 	{ 0x000000, 0x03ffff, MRA16_ROM },
   495: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
   496: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
   497: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
   498: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
   499: 	{ 0xc40002, 0xc40005, MRA16_NOP },		//??
   500: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
   501: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
   502: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
   503: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
   504: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
   505: 	{ 0xc60000, 0xc60001, MRA16_NOP },
   506: 	{ 0xfff108, 0xfff109, alexkidd_skip_r },
   507: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
   508: MEMORY_END
   509: 
   510: static MEMORY_WRITE16_START( alexkidd_writemem )
   511: 	{ 0x000000, 0x03ffff, MWA16_ROM },
   512: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
   513: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
   514: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
   515: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
   516: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
   517: 	{ 0xc40002, 0xc40005, MWA16_NOP },		//??
   518: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
   519: MEMORY_END
   520: 
   521: /***************************************************************************/
   522: 
   523: static void alexkidd_update_proc( void ){
   524: 	set_bg_page1( sys16_textram[0x74e] );
   525: 	set_fg_page1( sys16_textram[0x74f] );
   526: 	sys16_fg_scrollx = sys16_textram[0x7fc] & 0x01ff;
   527: 	sys16_bg_scrollx = sys16_textram[0x7fd] & 0x01ff;
   528: 	sys16_fg_scrolly = sys16_textram[0x792] & 0x00ff;
   529: 	sys16_bg_scrolly = sys16_textram[0x793] & 0x01ff;
   530: }
   531: 
   532: static MACHINE_INIT( alexkidd ){
   533: 	sys16_textmode=1;
   534: 	sys16_spritesystem = sys16_sprite_quartet2;
   535: 	sys16_sprxoffset = -0xbc;
   536: 	sys16_fgxoffset = sys16_bgxoffset = 7;
   537: 	sys16_bg_priority_mode=1;
   538: 
   539: 	sys16_update_proc = alexkidd_update_proc;
   540: }
   541: 
   542: static DRIVER_INIT( alexkidd )
   543: {
   544: 	machine_init_sys16_onetime();
   545: }
   546: /***************************************************************************/
   547: 
   548: INPUT_PORTS_START( alexkidd )
   549: 	SYS16_JOY1_SWAPPEDBUTTONS
   550: 	SYS16_JOY2_SWAPPEDBUTTONS
   551: 	SYS16_SERVICE
   552: 	SYS16_COINAGE
   553: 
   554: PORT_START	/* DSW1 */
   555: 	PORT_DIPNAME( 0x01, 0x00, "Continues" )
   556: 	PORT_DIPSETTING(    0x01, "Only before level 5" )
   557: 	PORT_DIPSETTING(    0x00, "Unlimited" )
   558: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
   559: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
   560: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   561: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
   562: 	PORT_DIPSETTING(    0x0c, "3" )
   563: 	PORT_DIPSETTING(    0x08, "4" )
   564: 	PORT_DIPSETTING(    0x04, "5" )
   565: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "240", IP_KEY_NONE, IP_JOY_NONE )
   566: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
   567: 	PORT_DIPSETTING(    0x20, "10000" )
   568: 	PORT_DIPSETTING(    0x30, "20000" )
   569: 	PORT_DIPSETTING(    0x10, "40000" )
   570: 	PORT_DIPSETTING(    0x00, "None" )
   571: 	PORT_DIPNAME( 0xc0, 0xc0, "Time Adjust" )
   572: 	PORT_DIPSETTING(    0x80, "70" )
   573: 	PORT_DIPSETTING(    0xc0, "60" )
   574: 	PORT_DIPSETTING(    0x40, "50" )
   575: 	PORT_DIPSETTING(    0x00, "40" )
   576: 
   577: INPUT_PORTS_END
   578: 
   579: /***************************************************************************/
   580: 
   581: static MACHINE_DRIVER_START( alexkidd )
   582: 
   583: 	/* basic machine hardware */
   584: 	MDRV_IMPORT_FROM(system16_7751)
   585: 	MDRV_CPU_MODIFY("main")
   586: 	MDRV_CPU_MEMORY(alexkidd_readmem,alexkidd_writemem)
   587: 
   588: 	MDRV_MACHINE_INIT(alexkidd)
   589: MACHINE_DRIVER_END
   590: 
   591: /***************************************************************************/
   592: // sys16B
   593: ROM_START( aliensyn )
   594: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
   595: 	ROM_LOAD16_BYTE( "11083.a4", 0x00000, 0x8000, CRC(cb2ad9b3) SHA1(66284b4e1071b3cb4b36960a2dba8949325f9e86) )
   596: 	ROM_LOAD16_BYTE( "11080.a1", 0x00001, 0x8000, CRC(fe7378d9) SHA1(acfee79e5fe9fdf95926562c02599e96e96f76b5) )
   597: 	ROM_LOAD16_BYTE( "11084.a5", 0x10000, 0x8000, CRC(2e1ec7b1) SHA1(666a9e402d7d02d74c0a2468853a3843b161c1a2) )
   598: 	ROM_LOAD16_BYTE( "11081.a2", 0x10001, 0x8000, CRC(1308ee63) SHA1(36a4c8cf3a310398e264c57c7c6f53c05dbc0108) )
   599: 	ROM_LOAD16_BYTE( "11085.a6", 0x20000, 0x8000, CRC(cff78f39) SHA1(78431ce6c03232150a8db15499da9371977b570b) )
   600: 	ROM_LOAD16_BYTE( "11082.a3", 0x20001, 0x8000, CRC(9cdc2a14) SHA1(c06693f45675e31d591703c27bb3f6ec02fc1215) )
   601: 
   602: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   603: 	ROM_LOAD( "10702.b9",  0x00000, 0x10000, CRC(393bc813) SHA1(672782c8fb2a6e454b27e073acc26130cacf3e50) )
   604: 	ROM_LOAD( "10703.b10", 0x10000, 0x10000, CRC(6b6dd9f5) SHA1(964409c6630caa13caf7d644d0c6fb071860b61b) )
   605: 	ROM_LOAD( "10704.b11", 0x20000, 0x10000, CRC(911e7ebc) SHA1(f03d3d3a09d19f7b705f9cb29f73140a3073463f) )
   606: 
   607: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
   608: 	ROM_LOAD16_BYTE( "10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) )
   609: 	ROM_LOAD16_BYTE( "10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) )
   610: 	ROM_LOAD16_BYTE( "10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) )
   611: 	ROM_LOAD16_BYTE( "10714.b6", 0x20000, 0x10000, CRC(91bf42fb) SHA1(4b9d3e97768323dee01e92378adafecb26bcc094) )
   612: 	ROM_LOAD16_BYTE( "10711.b3", 0x40001, 0x10000, CRC(29166ef6) SHA1(99a7cfd7d811537c821412a320beadb5a9c09af3) )
   613: 	ROM_LOAD16_BYTE( "10715.b7", 0x40000, 0x10000, CRC(a7c57384) SHA1(46f8efa691d7bbb0a18119c0ff12cff7c0d129e1) )
   614: 	ROM_LOAD16_BYTE( "10712.b4", 0x60001, 0x10000, CRC(876ad019) SHA1(39973ddb5a5746e0e094c759447bff1130c72c84) )
   615: 	ROM_LOAD16_BYTE( "10716.b8", 0x60000, 0x10000, CRC(40ba1d48) SHA1(e2d4d2689bb9b9bdc85e7f72a6665e5fd4c583aa) )
   616: 
   617: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
   618: 	ROM_LOAD( "10723.a7", 0x0000, 0x8000, CRC(99953526) SHA1(4a980370923fd5d3dc9e25d42a032c9e78c7ff47) )
   619: 	ROM_LOAD( "10724.a8", 0x10000, 0x8000, CRC(f971a817) SHA1(502c95638e4fd5f87e5fc837cb44b39a5d62f4e4) )
   620: 	ROM_LOAD( "10725.a9", 0x18000, 0x8000, CRC(6a50e08f) SHA1(d34b2ccadb8b07d5ad99cab5c5b5b79642c65574) )
   621: 	ROM_LOAD( "10726.a10",0x20000, 0x8000, CRC(d50b7736) SHA1(b1f8e3b0cf2ffee5382098100cfabe21b383cd51) )
   622: ROM_END
   623: 
   624: // sys16A - use a different sound chip?
   625: ROM_START( aliensya )
   626: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code. I guessing the order a bit here */
   627: 	ROM_LOAD16_BYTE( "10808", 0x00000, 0x8000, CRC(e669929f) SHA1(b5ab41d6f31f0369f8c5f5eb6fc08e8c23312b96) )
   628: 	ROM_LOAD16_BYTE( "10806", 0x00001, 0x8000, CRC(9f7f8fdd) SHA1(819e9c491b7d23deaef646d37319c38e75827d68) )
   629: 	ROM_LOAD16_BYTE( "10809", 0x10000, 0x8000, CRC(9a424919) SHA1(a7be5d9bed329099df10ff5a0104cb832485bd0a) )
   630: 	ROM_LOAD16_BYTE( "10807", 0x10001, 0x8000, CRC(3d2c3530) SHA1(567ed45c84b1d3d92371c4ad33fdb28f68cf29a3) )
   631: 	ROM_LOAD16_BYTE( "10701", 0x20000, 0x8000, CRC(92171751) SHA1(69a282c01db7224f32386a6db25309e09e29a112) )
   632: 	ROM_LOAD16_BYTE( "10698", 0x20001, 0x8000, CRC(c1e4fdc0) SHA1(65817a9336f7887d2bf14485bdff8352c960d2ab) )
   633: 
   634: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   635: 	ROM_LOAD( "10739", 0x00000, 0x10000, CRC(a29ec207) SHA1(c469d2689a7bdc2a59dfff56ce13d34e9fbac263) )
   636: 	ROM_LOAD( "10740", 0x10000, 0x10000, CRC(47f93015) SHA1(68247a6bffd1d4d1c450148dd46214d01ce1c668) )
   637: 	ROM_LOAD( "10741", 0x20000, 0x10000, CRC(4970739c) SHA1(5bdf4222209ec46e0015bfc0f90578dd9b30bdd1) )
   638: 
   639: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
   640: 	ROM_LOAD16_BYTE( "10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) )
   641: 	ROM_LOAD16_BYTE( "10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) )
   642: 	ROM_LOAD16_BYTE( "10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) )
   643: 	ROM_LOAD16_BYTE( "10714.b6", 0x20000, 0x10000, CRC(91bf42fb) SHA1(4b9d3e97768323dee01e92378adafecb26bcc094) )
   644: 	ROM_LOAD16_BYTE( "10711.b3", 0x40001, 0x10000, CRC(29166ef6) SHA1(99a7cfd7d811537c821412a320beadb5a9c09af3) )
   645: 	ROM_LOAD16_BYTE( "10715.b7", 0x40000, 0x10000, CRC(a7c57384) SHA1(46f8efa691d7bbb0a18119c0ff12cff7c0d129e1) )
   646: 	ROM_LOAD16_BYTE( "10712.b4", 0x60001, 0x10000, CRC(876ad019) SHA1(39973ddb5a5746e0e094c759447bff1130c72c84) )
   647: 	ROM_LOAD16_BYTE( "10716.b8", 0x60000, 0x10000, CRC(40ba1d48) SHA1(e2d4d2689bb9b9bdc85e7f72a6665e5fd4c583aa) )
   648: 
   649: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
   650: 	ROM_LOAD( "10705", 0x00000, 0x8000, CRC(777b749e) SHA1(086b03100064a98228f95db7962b2671121c46ea) )
   651: 	ROM_LOAD( "10706", 0x10000, 0x8000, CRC(aa114acc) SHA1(81a2b3586ae90bc7fc55b82478ffe182ac49983e) )
   652: 	ROM_LOAD( "10707", 0x18000, 0x8000, CRC(800c1d82) SHA1(aac4123bd35f87da09264649f4cf8326b2ba3cb8) )
   653: 	ROM_LOAD( "10708", 0x20000, 0x8000, CRC(5921ef52) SHA1(eff9978361692e6e60a9c6caf5740dd6182cfe4a) )
   654: ROM_END
   655: 
   656: ROM_START( aliensyj )
   657: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* Custom 68000 code . I guessing the order a bit here */
   658: // custom cpu 317-0033
   659: 	ROM_LOAD16_BYTE( "epr10699.43", 0x00000, 0x8000, CRC(3fd38d17) SHA1(538c1246121051a1af9ba2a4259eb1fe7e4952e1) )
   660: 	ROM_LOAD16_BYTE( "epr10696.26", 0x00001, 0x8000, CRC(d734f19f) SHA1(4a08c35084f7a9364ba0f058b9a9ffc30c8b5a78) )
   661: 	ROM_LOAD16_BYTE( "epr10700.42", 0x10000, 0x8000, CRC(3b04b252) SHA1(0e40e89e8feb7c98ee1da1c3fb3fe1d317c66842) )
   662: 	ROM_LOAD16_BYTE( "epr10697.25", 0x10001, 0x8000, CRC(f2bc123d) SHA1(7848529342495289e2d4f865767f3649cd85993b) )
   663: 	ROM_LOAD16_BYTE( "10701", 0x20000, 0x8000, CRC(92171751) SHA1(69a282c01db7224f32386a6db25309e09e29a112) )
   664: 	ROM_LOAD16_BYTE( "10698", 0x20001, 0x8000, CRC(c1e4fdc0) SHA1(65817a9336f7887d2bf14485bdff8352c960d2ab) )
   665: 
   666: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   667: 	ROM_LOAD( "10739", 0x00000, 0x10000, CRC(a29ec207) SHA1(c469d2689a7bdc2a59dfff56ce13d34e9fbac263) )
   668: 	ROM_LOAD( "10740", 0x10000, 0x10000, CRC(47f93015) SHA1(68247a6bffd1d4d1c450148dd46214d01ce1c668) )
   669: 	ROM_LOAD( "10741", 0x20000, 0x10000, CRC(4970739c) SHA1(5bdf4222209ec46e0015bfc0f90578dd9b30bdd1) )
   670: 
   671: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
   672: 	ROM_LOAD16_BYTE( "10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) )
   673: 	ROM_LOAD16_BYTE( "10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) )
   674: 	ROM_LOAD16_BYTE( "10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) )
   675: 	ROM_LOAD16_BYTE( "10714.b6", 0x20000, 0x10000, CRC(91bf42fb) SHA1(4b9d3e97768323dee01e92378adafecb26bcc094) )
   676: 	ROM_LOAD16_BYTE( "10711.b3", 0x40001, 0x10000, CRC(29166ef6) SHA1(99a7cfd7d811537c821412a320beadb5a9c09af3) )
   677: 	ROM_LOAD16_BYTE( "10715.b7", 0x40000, 0x10000, CRC(a7c57384) SHA1(46f8efa691d7bbb0a18119c0ff12cff7c0d129e1) )
   678: 	ROM_LOAD16_BYTE( "10712.b4", 0x60001, 0x10000, CRC(876ad019) SHA1(39973ddb5a5746e0e094c759447bff1130c72c84) )
   679: 	ROM_LOAD16_BYTE( "10716.b8", 0x60000, 0x10000, CRC(40ba1d48) SHA1(e2d4d2689bb9b9bdc85e7f72a6665e5fd4c583aa) )
   680: 
   681: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
   682: 	ROM_LOAD( "10705", 0x00000, 0x8000, CRC(777b749e) SHA1(086b03100064a98228f95db7962b2671121c46ea) )
   683: 	ROM_LOAD( "10706", 0x10000, 0x8000, CRC(aa114acc) SHA1(81a2b3586ae90bc7fc55b82478ffe182ac49983e) )
   684: 	ROM_LOAD( "10707", 0x18000, 0x8000, CRC(800c1d82) SHA1(aac4123bd35f87da09264649f4cf8326b2ba3cb8) )
   685: 	ROM_LOAD( "10708", 0x20000, 0x8000, CRC(5921ef52) SHA1(eff9978361692e6e60a9c6caf5740dd6182cfe4a) )
   686: ROM_END
   687: 
   688: 
   689: ROM_START( aliensyb )
   690: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
   691: 	ROM_LOAD16_BYTE( "as_typeb.a4", 0x00000, 0x8000, CRC(17bf5304) SHA1(f6318c6c4a606d21ba43354229b60a51d8a3baa6) )
   692: 	ROM_LOAD16_BYTE( "as_typeb.a1", 0x00001, 0x8000, CRC(4cd134df) SHA1(541377bd6eba280d7f0367694032891989762485) )
   693: 	ROM_LOAD16_BYTE( "as_typeb.a5", 0x10000, 0x8000, CRC(c8b791b0) SHA1(7a83a6781ed5b43583d86d4ee5fb3120a650874b) )
   694: 	ROM_LOAD16_BYTE( "as_typeb.a2", 0x10001, 0x8000, CRC(bdcf4a30) SHA1(e11264999f15cef7c35b6569407bb3dd8e2dd236) )
   695: 	ROM_LOAD16_BYTE( "as_typeb.a6", 0x20000, 0x8000, CRC(1d0790aa) SHA1(c141b12aa7e4f86b96eabeb3f827ee26ddacde34) )
   696: 	ROM_LOAD16_BYTE( "as_typeb.a3", 0x20001, 0x8000, CRC(1e7586b7) SHA1(be4c2c03119aee1b8f26f3dd79c99ce431a43b28) )
   697: 
   698: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   699: 	ROM_LOAD( "10702.b9",  0x00000, 0x10000, CRC(393bc813) SHA1(672782c8fb2a6e454b27e073acc26130cacf3e50) )
   700: 	ROM_LOAD( "10703.b10", 0x10000, 0x10000, CRC(6b6dd9f5) SHA1(964409c6630caa13caf7d644d0c6fb071860b61b) )
   701: 	ROM_LOAD( "10704.b11", 0x20000, 0x10000, CRC(911e7ebc) SHA1(f03d3d3a09d19f7b705f9cb29f73140a3073463f) )
   702: 
   703: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
   704: 	ROM_LOAD16_BYTE( "10709.b1", 0x00001, 0x10000, CRC(addf0a90) SHA1(a92c9531f1817763773471ce63f566b9e88360a0) )
   705: 	ROM_LOAD16_BYTE( "10713.b5", 0x00000, 0x10000, CRC(ececde3a) SHA1(9c12d4665179bf433c42f5ddc8a043ad592aa90e) )
   706: 	ROM_LOAD16_BYTE( "10710.b2", 0x20001, 0x10000, CRC(992369eb) SHA1(c6796acf6807e9ba4c3d241903653f91adf4764e) )
   707: 	ROM_LOAD16_BYTE( "10714.b6", 0x20000, 0x10000, CRC(91bf42fb) SHA1(4b9d3e97768323dee01e92378adafecb26bcc094) )
   708: 	ROM_LOAD16_BYTE( "10711.b3", 0x40001, 0x10000, CRC(29166ef6) SHA1(99a7cfd7d811537c821412a320beadb5a9c09af3) )
   709: 	ROM_LOAD16_BYTE( "10715.b7", 0x40000, 0x10000, CRC(a7c57384) SHA1(46f8efa691d7bbb0a18119c0ff12cff7c0d129e1) )
   710: 	ROM_LOAD16_BYTE( "10712.b4", 0x60001, 0x10000, CRC(876ad019) SHA1(39973ddb5a5746e0e094c759447bff1130c72c84) )
   711: 	ROM_LOAD16_BYTE( "10716.b8", 0x60000, 0x10000, CRC(40ba1d48) SHA1(e2d4d2689bb9b9bdc85e7f72a6665e5fd4c583aa) )
   712: 
   713: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
   714: 	ROM_LOAD( "10723.a7", 0x0000, 0x8000, CRC(99953526) SHA1(4a980370923fd5d3dc9e25d42a032c9e78c7ff47) )
   715: 	ROM_LOAD( "10724.a8", 0x10000, 0x8000, CRC(f971a817) SHA1(502c95638e4fd5f87e5fc837cb44b39a5d62f4e4) )
   716: 	ROM_LOAD( "10725.a9", 0x18000, 0x8000, CRC(6a50e08f) SHA1(d34b2ccadb8b07d5ad99cab5c5b5b79642c65574) )
   717: 	ROM_LOAD( "10726.a10",0x20000, 0x8000, CRC(d50b7736) SHA1(b1f8e3b0cf2ffee5382098100cfabe21b383cd51) )
   718: ROM_END
   719: 
   720: /***************************************************************************/
   721: 
   722: static MEMORY_READ16_START( aliensyn_readmem )
   723: 	{ 0x000000, 0x02ffff, MRA16_ROM },
   724: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
   725: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
   726: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
   727: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
   728: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
   729: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
   730: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
   731: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
   732: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
   733: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
   734: MEMORY_END
   735: 
   736: static MEMORY_WRITE16_START( aliensyn_writemem )
   737: 	{ 0x000000, 0x02ffff, MWA16_ROM },
   738: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
   739: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
   740: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
   741: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
   742: 	{ 0xc00006, 0xc00007, sound_command_w },
   743: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
   744: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
   745: MEMORY_END
   746: 
   747: /***************************************************************************/
   748: 
   749: static void aliensyn_update_proc( void ){
   750: 	set_fg_page( sys16_textram[0x740] );
   751: 	set_bg_page( sys16_textram[0x741] );
   752: 	sys16_fg_scrolly = sys16_textram[0x748];
   753: 	sys16_bg_scrolly = sys16_textram[0x749];
   754: 	sys16_fg_scrollx = sys16_textram[0x74c];
   755: 	sys16_bg_scrollx = sys16_textram[0x74d];
   756: }
   757: 
   758: static MACHINE_INIT( aliensyn ){
   759: 	static int bank[16] = {
   760: 		0,0,0,0,
   761: 		0,0,0,3,
   762: 		0,0,0,2,
   763: 		0,1,0,0
   764: 	};
   765: 	sys16_obj_bank = bank;
   766: 
   767: 	sys16_bg_priority_mode=1;
   768: 	sys16_fg_priority_mode=1;
   769: 
   770: 	sys16_update_proc = aliensyn_update_proc;
   771: }
   772: 
   773: static DRIVER_INIT( aliensyn )
   774: {
   775: 	machine_init_sys16_onetime();
   776: 	sys16_bg1_trans=1;
   777: }
   778: 
   779: /***************************************************************************/
   780: 
   781: INPUT_PORTS_START( aliensyn )
   782: 	SYS16_JOY1
   783: 	SYS16_JOY2
   784: 	SYS16_SERVICE
   785: 	SYS16_COINAGE
   786: 
   787: PORT_START	/* DSW1 */
   788: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
   789: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
   790: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   791: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
   792: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
   793: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   794: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
   795: 	PORT_DIPSETTING(    0x08, "2" )
   796: 	PORT_DIPSETTING(    0x0c, "3" )
   797: 	PORT_DIPSETTING(    0x04, "4" )
   798: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "127", IP_KEY_NONE, IP_JOY_NONE )
   799: 	PORT_DIPNAME( 0x30, 0x30, "Timer" )
   800: 	PORT_DIPSETTING(    0x00, "120" )
   801: 	PORT_DIPSETTING(    0x10, "130" )
   802: 	PORT_DIPSETTING(    0x20, "140" )
   803: 	PORT_DIPSETTING(    0x30, "150" )
   804: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
   805: 	PORT_DIPSETTING(    0x80, "Easy" )
   806: 	PORT_DIPSETTING(    0xc0, "Normal" )
   807: 	PORT_DIPSETTING(    0x40, "Hard" )
   808: 	PORT_DIPSETTING(    0x00, "Hardest" )
   809: INPUT_PORTS_END
   810: 
   811: /****************************************************************************/
   812: 
   813: static MACHINE_DRIVER_START( aliensyn )
   814: 
   815: 	/* basic machine hardware */
   816: 	MDRV_IMPORT_FROM(system16_7759)
   817: 	MDRV_CPU_MODIFY("main")
   818: 	MDRV_CPU_MEMORY(aliensyn_readmem,aliensyn_writemem)
   819: 
   820: 	MDRV_MACHINE_INIT(aliensyn)
   821: MACHINE_DRIVER_END
   822: 
   823: /***************************************************************************/
   824: // sys16B
   825: ROM_START( altbeast )
   826: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
   827: 	ROM_LOAD16_BYTE( "11705", 0x000000, 0x20000, CRC(57dc5c7a) SHA1(a5cc9b10a00778f5163fc915b956fa5d0d7a37ce) )
   828: 	ROM_LOAD16_BYTE( "11704", 0x000001, 0x20000, CRC(33bbcf07) SHA1(534e5426580dbf72509dceb762b8b99766d3a739) )
   829: 
   830: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   831: 	ROM_LOAD( "11674", 0x00000, 0x20000, CRC(a57a66d5) SHA1(5103583d48997abad12a0c5fee26431c486ced52) )
   832: 	ROM_LOAD( "11675", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) )
   833: 	ROM_LOAD( "11676", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) )
   834: 
   835: 	ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* sprites */
   836: 	ROM_LOAD16_BYTE( "epr11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) )
   837: 	ROM_LOAD16_BYTE( "epr11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) )
   838: 	ROM_LOAD16_BYTE( "epr11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) )
   839: 	ROM_LOAD16_BYTE( "epr11682.b6", 0x40000, 0x20000, CRC(e3f77c5e) SHA1(6b3cb7918ab0c7c97a51cc5ea19ced3374ff3914) )
   840: 	ROM_LOAD16_BYTE( "epr11679.b3", 0x80001, 0x20000, CRC(14dcc245) SHA1(1ca1b6e0f2b7bedad2a8ab70f52da8c54d40d3cf) )
   841: 	ROM_LOAD16_BYTE( "epr11683.b7", 0x80000, 0x20000, CRC(f9a60f06) SHA1(0cffcfdb02733feaa869198b7e668c58b47c321a) )
   842: 	ROM_LOAD16_BYTE( "epr11680.b4", 0xc0001, 0x20000, CRC(f43dcdec) SHA1(2941500cf33afca487f19f2329033d5d17aad826) )
   843: 	ROM_LOAD16_BYTE( "epr11684.b8", 0xc0000, 0x20000, CRC(b20c0edb) SHA1(6c8694d05e3adac37c9015037ab800233371db36) )
   844: 
   845: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
   846: 	ROM_LOAD( "11671",		 0x00000, 0x08000, CRC(2b71343b) SHA1(8a657f787de2b9d5161ed2c109642a148348af09) )
   847: 	ROM_LOAD( "opr11672",    0x10000, 0x20000, CRC(bbd7f460) SHA1(bbc5c2219cb3a827d84062b19affd9780da2a3cf) )
   848: 	ROM_LOAD( "opr11673",    0x30000, 0x20000, CRC(400c4a36) SHA1(de4bdfa91734410e0a7f6a16bf8336db172f458a) )
   849: ROM_END
   850: 
   851: ROM_START( jyuohki )
   852: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* Custom 68000 code. */
   853: // custom cpu 317-0065
   854: 	ROM_LOAD16_BYTE( "epr11670.a7", 0x000000, 0x20000, CRC(b748eb07) SHA1(f3663831610bcb358340f14c2c96833dd7591bfb) )
   855: 	ROM_LOAD16_BYTE( "epr11669.a5", 0x000001, 0x20000, CRC(005ecd11) SHA1(c392195955cf727752f03db92414701cc2bf1f4a) )
   856: 
   857: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   858: 	ROM_LOAD( "11674", 0x00000, 0x20000, CRC(a57a66d5) SHA1(5103583d48997abad12a0c5fee26431c486ced52) )
   859: 	ROM_LOAD( "11675", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) )
   860: 	ROM_LOAD( "11676", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) )
   861: 
   862: 	ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* sprites */
   863: 	ROM_LOAD16_BYTE( "epr11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) )
   864: 	ROM_LOAD16_BYTE( "epr11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) )
   865: 	ROM_LOAD16_BYTE( "epr11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) )
   866: 	ROM_LOAD16_BYTE( "epr11682.b6", 0x40000, 0x20000, CRC(e3f77c5e) SHA1(6b3cb7918ab0c7c97a51cc5ea19ced3374ff3914) )
   867: 	ROM_LOAD16_BYTE( "epr11679.b3", 0x80001, 0x20000, CRC(14dcc245) SHA1(1ca1b6e0f2b7bedad2a8ab70f52da8c54d40d3cf) )
   868: 	ROM_LOAD16_BYTE( "epr11683.b7", 0x80000, 0x20000, CRC(f9a60f06) SHA1(0cffcfdb02733feaa869198b7e668c58b47c321a) )
   869: 	ROM_LOAD16_BYTE( "epr11680.b4", 0xc0001, 0x20000, CRC(f43dcdec) SHA1(2941500cf33afca487f19f2329033d5d17aad826) )
   870: 	ROM_LOAD16_BYTE( "epr11684.b8", 0xc0000, 0x20000, CRC(b20c0edb) SHA1(6c8694d05e3adac37c9015037ab800233371db36) )
   871: 
   872: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
   873: 	ROM_LOAD( "11671",		 0x00000, 0x08000, CRC(2b71343b) SHA1(8a657f787de2b9d5161ed2c109642a148348af09) )
   874: 	ROM_LOAD( "opr11672",    0x10000, 0x20000, CRC(bbd7f460) SHA1(bbc5c2219cb3a827d84062b19affd9780da2a3cf) )
   875: 	ROM_LOAD( "opr11673",    0x30000, 0x20000, CRC(400c4a36) SHA1(de4bdfa91734410e0a7f6a16bf8336db172f458a) )
   876: ROM_END
   877: 
   878: // sys16B
   879: ROM_START( altbeas2 )
   880: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
   881: 	ROM_LOAD16_BYTE( "epr11740", 0x000000, 0x20000, CRC(ce227542) SHA1(54adcc1246943360bb68498e971809a0d4f9fe0c) )
   882: 	ROM_LOAD16_BYTE( "epr11739", 0x000001, 0x20000, CRC(e466eb65) SHA1(c9bb57818eb81a43abdf2ad2a79a0bd45c25d208) )
   883: 
   884: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
   885: 	ROM_LOAD( "11674", 0x00000, 0x20000, CRC(a57a66d5) SHA1(5103583d48997abad12a0c5fee26431c486ced52) )
   886: 	ROM_LOAD( "11675", 0x20000, 0x20000, CRC(2ef2f144) SHA1(38d22d609db2d9b6067b5d12f6499436de4605cb) )
   887: 	ROM_LOAD( "11676", 0x40000, 0x20000, CRC(0c04acac) SHA1(87fe2a0dd9913f9550e9b4cbc7e7465b61640e07) )
   888: 
   889: 	ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* sprites */
   890: 	ROM_LOAD16_BYTE( "epr11677.b1", 0x00001, 0x20000, CRC(a01425cd) SHA1(72be5ec29e476601f9bf6aaedef9b73cedeb42f0) )
   891: 	ROM_LOAD16_BYTE( "epr11681.b5", 0x00000, 0x20000, CRC(d9e03363) SHA1(995a7c6a8f0c61468b57a3bb407461a2a3ae8adc) )
   892: 	ROM_LOAD16_BYTE( "epr11678.b2", 0x40001, 0x20000, CRC(17a9fc53) SHA1(85a9a605742ae5aab86db37189b9ee4d54c70e56) )
   893: 	ROM_LOAD16_BYTE( "epr11682.b6", 0x40000, 0x20000, CRC(e3f77c5e) SHA1(6b3cb7918ab0c7c97a51cc5ea19ced3374ff3914) )
   894: 	ROM_LOAD16_BYTE( "epr11679.b3", 0x80001, 0x20000, CRC(14dcc245) SHA1(1ca1b6e0f2b7bedad2a8ab70f52da8c54d40d3cf) )
   895: 	ROM_LOAD16_BYTE( "epr11683.b7", 0x80000, 0x20000, CRC(f9a60f06) SHA1(0cffcfdb02733feaa869198b7e668c58b47c321a) )
   896: 	ROM_LOAD16_BYTE( "epr11680.b4", 0xc0001, 0x20000, CRC(f43dcdec) SHA1(2941500cf33afca487f19f2329033d5d17aad826) )
   897: 	ROM_LOAD16_BYTE( "epr11684.b8", 0xc0000, 0x20000, CRC(b20c0edb) SHA1(6c8694d05e3adac37c9015037ab800233371db36) )
   898: 
   899: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
   900: 	ROM_LOAD( "opr11686",	 0x00000, 0x08000, CRC(828a45b3) SHA1(df921701b411afac1b6716b6798a1bffc2180133) )	// ???
   901: 	ROM_LOAD( "opr11672",    0x10000, 0x20000, CRC(bbd7f460) SHA1(bbc5c2219cb3a827d84062b19affd9780da2a3cf) )
   902: 	ROM_LOAD( "opr11673",    0x30000, 0x20000, CRC(400c4a36) SHA1(de4bdfa91734410e0a7f6a16bf8336db172f458a) )
   903: ROM_END
   904: 
   905: /***************************************************************************/
   906: 
   907: static READ16_HANDLER( altbeast_skip_r )
   908: {
   909: 	if (activecpu_get_pc()==0x3994) {cpu_spinuntil_int(); return 1<<8;}
   910: 	return sys16_workingram[0x301c/2];
   911: }
   912: 
   913: // ??? What is this, input test shows 4 bits to each player, but what does it do?
   914: static READ16_HANDLER( altbeast_io_r )
   915: {
   916: 	return 0xff;
   917: }
   918: 
   919: static MEMORY_READ16_START( altbeast_readmem )
   920: 	{ 0x000000, 0x03ffff, MRA16_ROM },
   921: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
   922: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
   923: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
   924: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
   925: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
   926: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
   927: 	{ 0xc41004, 0xc41005, altbeast_io_r },
   928: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
   929: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
   930: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
   931: 	{ 0xfff01c, 0xfff01d, altbeast_skip_r },
   932: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
   933: MEMORY_END
   934: 
   935: static MEMORY_WRITE16_START( altbeast_writemem )
   936: 	{ 0x000000, 0x03ffff, MWA16_ROM },
   937: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
   938: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
   939: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
   940: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
   941: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
   942: 	{ 0xfe0006, 0xfe0007, sound_command_w },
   943: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
   944: MEMORY_END
   945: 
   946: /***************************************************************************/
   947: 
   948: static void altbeast_update_proc( void ){
   949: 	set_fg_page( sys16_textram[0x740] );
   950: 	set_bg_page( sys16_textram[0x741] );
   951: 	sys16_fg_scrolly = sys16_textram[0x748];
   952: 	sys16_bg_scrolly = sys16_textram[0x749];
   953: 	sys16_fg_scrollx = sys16_textram[0x74c];
   954: 	sys16_bg_scrollx = sys16_textram[0x74d];
   955: 
   956: 	set_tile_bank( sys16_workingram[0x3094/2] );
   957: }
   958: 
   959: static MACHINE_INIT( altbeast ){
   960: 	sys16_update_proc = altbeast_update_proc;
   961: }
   962: 
   963: static MACHINE_INIT( altbeas2 ){
   964: 	static int bank[16] = {
   965: 		0x00,0x00,
   966: 		0x01,0x00,
   967: 		0x02,0x00,
   968: 		0x03,0x00,
   969: 		0x04,0x00,
   970: 		0x05,0x00,
   971: 		0x06,0x00,
   972: 		0x07,0x00
   973: 	};
   974: 	sys16_obj_bank = bank;
   975: 	sys16_update_proc = altbeast_update_proc;
   976: }
   977: 
   978: static DRIVER_INIT( altbeast )
   979: {
   980: 	machine_init_sys16_onetime();
   981: }
   982: 
   983: /***************************************************************************/
   984: 
   985: INPUT_PORTS_START( altbeast )
   986: 	SYS16_JOY1
   987: 	SYS16_JOY2
   988: 	SYS16_SERVICE
   989: 	SYS16_COINAGE
   990: 
   991: PORT_START	/* DSW1 */
   992: 	PORT_DIPNAME( 0x01, 0x01, "Credits needed" )
   993: 	PORT_DIPSETTING(    0x01, "1 to start, 1 to continue" )
   994: 	PORT_DIPSETTING(    0x00, "2 to start, 1 to continue" )
   995: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
   996: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
   997: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
   998: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
   999: 	PORT_DIPSETTING(    0x08, "2" )
  1000: 	PORT_DIPSETTING(    0x0c, "3" )
  1001: 	PORT_DIPSETTING(    0x04, "4" )
  1002: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "240", IP_KEY_NONE, IP_JOY_NONE )
  1003: 	PORT_DIPNAME( 0x30, 0x30, "Energy Meter" )
  1004: 	PORT_DIPSETTING(    0x20, "2" )
  1005: 	PORT_DIPSETTING(    0x30, "3" )
  1006: 	PORT_DIPSETTING(    0x10, "4" )
  1007: 	PORT_DIPSETTING(    0x00, "5" )
  1008: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  1009: 	PORT_DIPSETTING(    0x80, "Easy" )
  1010: 	PORT_DIPSETTING(    0xc0, "Normal" )
  1011: 	PORT_DIPSETTING(    0x40, "Hard" )
  1012: 	PORT_DIPSETTING(    0x00, "Hardest" )
  1013: INPUT_PORTS_END
  1014: 
  1015: /***************************************************************************/
  1016: 
  1017: static MACHINE_DRIVER_START( altbeast )
  1018: 
  1019: 	/* basic machine hardware */
  1020: 	MDRV_IMPORT_FROM(system16_7759)
  1021: 	MDRV_CPU_MODIFY("main")
  1022: 	MDRV_CPU_MEMORY(altbeast_readmem,altbeast_writemem)
  1023: 
  1024: 	MDRV_MACHINE_INIT(altbeast)
  1025: MACHINE_DRIVER_END
  1026: 
  1027: 
  1028: static MACHINE_DRIVER_START( altbeas2 )
  1029: 
  1030: 	/* basic machine hardware */
  1031: 	MDRV_IMPORT_FROM(system16_7759)
  1032: 	MDRV_CPU_MODIFY("main")
  1033: 	MDRV_CPU_MEMORY(altbeast_readmem,altbeast_writemem)
  1034: 
  1035: 	MDRV_MACHINE_INIT(altbeas2)
  1036: MACHINE_DRIVER_END
  1037: 
  1038: /***************************************************************************/
  1039: // sys16B
  1040: ROM_START( atomicp )
  1041: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  1042: 	ROM_LOAD16_BYTE( "ap-t2.bin", 0x000000, 0x10000, CRC(97421047) SHA1(18d61260470da7a0bef532f81df567a613c0d821) )
  1043: 	ROM_LOAD16_BYTE( "ap-t1.bin", 0x000001, 0x10000, CRC(5c65fe56) SHA1(aaf3b6f932c090b839817140c105f13c7d6b4ae2) )
  1044: 
  1045: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1046: 	ROM_LOAD( "ap-t4.bin",  0x00000, 0x8000, CRC(332e58f4) SHA1(cf5aeb6c14018cbd8f222a0ecf85ccf467f294a8) )
  1047: 	ROM_LOAD( "ap-t3.bin",  0x08000, 0x8000, CRC(dddc122c) SHA1(3411eae360ccd615636fb85e9738affc33c2c0ad) )
  1048: 	ROM_LOAD( "ap-t5.bin",  0x10000, 0x8000, CRC(ef5ecd6b) SHA1(07edc8ea4c0a5ad421df7f97e7a62a5e12a8dbd0) )
  1049: 
  1050: 	ROM_REGION( 0x1, REGION_GFX2, 0 ) /* sprites */
  1051: ROM_END
  1052: 
  1053: /***************************************************************************/
  1054: 
  1055: #if 0 
  1056: static READ16_HANDLER( atomicp_skip_r ){
  1057: 	if (activecpu_get_pc()==0x7fc) {cpu_spinuntil_int(); return 0xffff;}
  1058: 	return sys16_workingram[0x0902/2];
  1059: }
  1060: #endif 
  1061: 
  1062: static MEMORY_READ16_START( atomicp_readmem )
  1063: 	{ 0x000000, 0x01ffff, MRA16_ROM },
  1064: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  1065: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  1066: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  1067: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  1068: 	{ 0xc41000, 0xc41001, input_port_0_word_r }, // player1
  1069: 	{ 0xc41002, 0xc41003, input_port_1_word_r }, // player2
  1070: 	{ 0xc41004, 0xc41005, input_port_3_word_r }, // dip1
  1071: 	{ 0xc41006, 0xc41007, input_port_4_word_r }, // dip2
  1072: //	{ 0xffc902, 0xffc903, atomicp_skip_r },
  1073: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  1074: MEMORY_END
  1075: 
  1076: static WRITE16_HANDLER( atomicp_sound_w ){
  1077: 	if( ACCESSING_MSB ){
  1078: 		if(offset==0)
  1079: 			YM2413_register_port_0_w(0,(data>>8)&0xff);
  1080: 		else
  1081: 			YM2413_data_port_0_w(0,(data>>8)&0xff);
  1082: 	}
  1083: }
  1084: 
  1085: static MEMORY_WRITE16_START( atomicp_writemem )
  1086: 	{ 0x000000, 0x01ffff, MWA16_ROM },
  1087: 	{ 0x080000, 0x080003, atomicp_sound_w },
  1088: 	{ 0x3f0000, 0x3f0003, MWA16_NOP },
  1089: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  1090: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  1091: 	{ 0x440000, 0x44ffff, SYS16_MWA16_SPRITERAM },
  1092: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  1093: 	{ 0xc40000, 0xc40001, SYS16_MWA16_EXTRAM2 },
  1094: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  1095: MEMORY_END
  1096: 
  1097: //	{ 0x0a, 0x0a, YM2413_register_port_0_w },
  1098: //	{ 0x0b, 0x0b, YM2413_data_port_0_w },
  1099: 
  1100: /***************************************************************************/
  1101: 
  1102: static void atomicp_update_proc( void ){
  1103: 	set_fg_page( sys16_textram[0x740] );
  1104: 	set_bg_page( sys16_textram[0x741] );
  1105: 	sys16_fg_scrolly = sys16_textram[0x748];
  1106: 	sys16_bg_scrolly = sys16_textram[0x749];
  1107: 	sys16_fg_scrollx = sys16_textram[0x74c];
  1108: 	sys16_bg_scrollx = sys16_textram[0x74d];
  1109: }
  1110: 
  1111: static MACHINE_INIT( atomicp ){
  1112: 	sys16_update_proc = atomicp_update_proc;
  1113: }
  1114: 
  1115: static DRIVER_INIT( atomicp )
  1116: {
  1117: 	machine_init_sys16_onetime();
  1118: }
  1119: 
  1120: /***************************************************************************/
  1121: 
  1122: INPUT_PORTS_START( atomicp )
  1123: 
  1124: PORT_START
  1125: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  1126: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  1127: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  1128: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  1129: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  1130: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  1131: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
  1132: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
  1133: 
  1134: PORT_START
  1135: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  1136: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  1137: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  1138: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  1139: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  1140: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  1141: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
  1142: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
  1143: 
  1144: PORT_START	// dummy
  1145: 
  1146: PORT_START	// dip1
  1147: 	PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) )
  1148: 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  1149: 	PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
  1150: 	PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
  1151: 	PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  1152: 	PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  1153: 	PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
  1154: 	PORT_DIPSETTING(    0x01, DEF_STR( 1C_4C ) )
  1155: 	PORT_DIPSETTING(    0x06, DEF_STR( 1C_5C ) )
  1156: 
  1157: 	PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_A ) )
  1158: 	PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  1159: 	PORT_DIPSETTING(    0x20, DEF_STR( 3C_1C ) )
  1160: 	PORT_DIPSETTING(    0x18, DEF_STR( 2C_1C ) )
  1161: 	PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
  1162: 	PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  1163: 	PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
  1164: 	PORT_DIPSETTING(    0x08, DEF_STR( 1C_4C ) )
  1165: 	PORT_DIPSETTING(    0x30, DEF_STR( 1C_5C ) )
  1166: 
  1167: 	PORT_DIPNAME( 0xC0, 0xC0, DEF_STR( Lives ) )
  1168: 	PORT_DIPSETTING(    0xC0, "1" )
  1169: 	PORT_DIPSETTING(    0x80, "2" )
  1170: 	PORT_DIPSETTING(    0x40, "3" )
  1171: 	PORT_DIPSETTING(    0x00, "5" )
  1172: 
  1173: PORT_START  //dip2
  1174: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  1175: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1176: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1177: 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  1178: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1179: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1180: 	PORT_DIPNAME( 0x04, 0x04, "Instructions" )
  1181: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  1182: 	PORT_DIPSETTING(    0x04, DEF_STR( On ) )
  1183: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1184: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1185: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1186: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1187: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1188: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1189: 	PORT_DIPNAME( 0x20, 0x20, "Continuation" )
  1190: 	PORT_DIPSETTING(    0x20, "Continue" )
  1191: 	PORT_DIPSETTING(    0x00, "No Continue" )
  1192: 	PORT_DIPNAME( 0x40, 0x00, "Level Select" )
  1193: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  1194: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1195: 	PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
  1196: INPUT_PORTS_END
  1197: 
  1198: /***************************************************************************/
  1199: static INTERRUPT_GEN( ap_interrupt )
  1200: {
  1201: 	int intleft=cpu_getiloops();
  1202: 	if(intleft!=0) cpu_set_irq_line(0, 2, HOLD_LINE);
  1203: 	else cpu_set_irq_line(0, 4, HOLD_LINE);
  1204: }
  1205: 
  1206: 
  1207: static MACHINE_DRIVER_START( atomicp )
  1208: 
  1209: 	/* basic machine hardware */
  1210: 	MDRV_IMPORT_FROM(system16)
  1211: 	MDRV_CPU_MODIFY("main")
  1212: 	MDRV_CPU_MEMORY(atomicp_readmem,atomicp_writemem)
  1213: 	MDRV_CPU_VBLANK_INT(ap_interrupt,2)
  1214: 
  1215: 	MDRV_CPU_REMOVE("sound")
  1216: 
  1217: 	MDRV_MACHINE_INIT(atomicp)
  1218: 
  1219: 	/* sound hardware */
  1220: 	MDRV_SOUND_ATTRIBUTES(0)
  1221: 	MDRV_SOUND_REPLACE("2151", YM2413, sys16_ym2413_interface)
  1222: MACHINE_DRIVER_END
  1223: 
  1224: 
  1225: /***************************************************************************
  1226: 
  1227:    Aurail
  1228: 
  1229: ***************************************************************************/
  1230: // sys16B
  1231: ROM_START( aurail )
  1232: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1233: 	ROM_LOAD16_BYTE( "13577", 0x000000, 0x20000, CRC(6701b686) SHA1(ce1e99a516b34241bfe2fbe42d105970ad6e6ddb) )
  1234: 	ROM_LOAD16_BYTE( "13576", 0x000001, 0x20000, CRC(1e428d94) SHA1(53c0c2d946822157974c8505fd301f8001fc3401) )
  1235: 	/* empty 0x40000 - 0x80000 */
  1236: 	ROM_LOAD16_BYTE( "13447", 0x080000, 0x20000, CRC(70a52167) SHA1(51512d4ee1e63902375b197cf04170744b099d88) )
  1237: 	ROM_LOAD16_BYTE( "13445", 0x080001, 0x20000, CRC(28dfc3dd) SHA1(b1d6d3e31a48062a91cc9b7b6ff68bfde0a3ea1c) )
  1238: 
  1239: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1240: 	ROM_LOAD( "aurail.a14", 0x00000, 0x20000, CRC(0fc4a7a8) SHA1(b46b22a6b0ead19551e67abfb3304c52b02b8d29) ) /* plane 1 */
  1241: 	ROM_LOAD( "aurail.b14", 0x20000, 0x20000, CRC(e08135e0) SHA1(cd748f4a8f67f562174fa9c6edb966c77b488e75) )
  1242: 	ROM_LOAD( "aurail.a15", 0x40000, 0x20000, CRC(1c49852f) SHA1(d08d6991c203400f685fada2445a22a7eceeee04) ) /* plane 2 */
  1243: 	ROM_LOAD( "aurail.b15", 0x60000, 0x20000, CRC(e14c6684) SHA1(f9b0d45e01a6df2b3875b493db9fa41bf37d79f0) )
  1244: 	ROM_LOAD( "aurail.a16", 0x80000, 0x20000, CRC(047bde5e) SHA1(e759baedcbb637a6c14af461b8a492554cadc9e4) ) /* plane 3 */
  1245: 	ROM_LOAD( "aurail.b16", 0xa0000, 0x20000, CRC(6309fec4) SHA1(f90c9679bade3cfbaa7949e412410c29d5bfa4d3) )
  1246: 
  1247: 	ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */
  1248: 	ROM_LOAD16_BYTE( "aurail.b1",  0x000001, 0x020000, CRC(5fa0a9f8) SHA1(d9d67cc006a608d48e37aa89359f1a9403172b00) )
  1249: 	ROM_LOAD16_BYTE( "aurail.b5",  0x000000, 0x020000, CRC(0d1b54da) SHA1(c7a6393f9e13adabe93b7a86aa7845c5f4d188f1) )
  1250: 	ROM_LOAD16_BYTE( "aurail.b2",  0x040001, 0x020000, CRC(5f6b33b1) SHA1(5d397bdaa2c7a9ce82cc9134bfeb78418dc613b0) )
  1251: 	ROM_LOAD16_BYTE( "aurail.b6",  0x040000, 0x020000, CRC(bad340c3) SHA1(e04ef028e44054d34831d3617c5a6348823cfebd) )
  1252: 	ROM_LOAD16_BYTE( "aurail.b3",  0x080001, 0x020000, CRC(4e80520b) SHA1(8147793ee0023ac18f633d756ecc53aef1980e95) )
  1253: 	ROM_LOAD16_BYTE( "aurail.b7",  0x080000, 0x020000, CRC(7e9165ac) SHA1(32114095f96fb0ae385c9bf31dd97a99ef182aaa) )
  1254: 	ROM_LOAD16_BYTE( "aurail.b4",  0x0c0001, 0x020000, CRC(5733c428) SHA1(865203ebee9d98e67324c46915d8835d0289ee0c) )
  1255: 	ROM_LOAD16_BYTE( "aurail.b8",  0x0c0000, 0x020000, CRC(66b8f9b3) SHA1(4bf003a9bed40673d88df51a314eb6bd10f0d039) )
  1256: 	ROM_LOAD16_BYTE( "aurail.a1",  0x100001, 0x020000, CRC(4f370b2b) SHA1(66beb4264d569520d80f8915e1c1fddbf61efb21) )
  1257: 	ROM_LOAD16_BYTE( "aurail.b10", 0x100000, 0x020000, CRC(f76014bf) SHA1(b44f0b6fb9dee927d81c62282aa946d8c35766ca) )
  1258: 	ROM_LOAD16_BYTE( "aurail.a2",  0x140001, 0x020000, CRC(37cf9cb4) SHA1(f51cee874ad8a824462d2475a23e7016ef64c6b4) )
  1259: 	ROM_LOAD16_BYTE( "aurail.b11", 0x140000, 0x020000, CRC(1061e7da) SHA1(bad3560f1ed6a5a79f4ecf85d3843b24ecf22d19) )
  1260: 	ROM_LOAD16_BYTE( "aurail.a3",  0x180001, 0x020000, CRC(049698ef) SHA1(dca1a78f0156cfac9acbfb6e47eb3897b579d2ec) )
  1261: 	ROM_LOAD16_BYTE( "aurail.b12", 0x180000, 0x020000, CRC(7dbcfbf1) SHA1(0b7be1de57f83b1213805489c6ebfc0f1e5fb4b0) )
  1262: 	ROM_LOAD16_BYTE( "aurail.a4",  0x1c0001, 0x020000, CRC(77a8989e) SHA1(0ad0877a9814fb7c2fb79062a50b1f9ce9420768) )
  1263: 	ROM_LOAD16_BYTE( "aurail.b13", 0x1c0000, 0x020000, CRC(551df422) SHA1(cf4cd2b66335853c7c6cce949e79c05e93a39666) )
  1264: 
  1265: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1266: 	ROM_LOAD( "13448",      0x0000, 0x8000, CRC(b5183fb9) SHA1(c8372b57fa486256d49dc5851d6b17c92de593fb) )
  1267: 	ROM_LOAD( "aurail.a12", 0x10000,0x20000, CRC(d3d9aaf9) SHA1(0fb3a8cb11033accceb3a43a691fb424cf8b9619) )
  1268: 	ROM_RELOAD(             0x30000,0x20000 )
  1269: ROM_END
  1270: 
  1271: ROM_START( auraila )
  1272: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1273: // custom cpu 317-0168
  1274: 	ROM_LOAD16_BYTE( "epr13469.a7", 0x000000, 0x20000, CRC(c628b69d) SHA1(839cefe5ab1c58fb3e6af8cba245194d5d672223) )
  1275: 	ROM_LOAD16_BYTE( "epr13468.a5", 0x000001, 0x20000, CRC(ce092218) SHA1(c93450234bc37060bc4b8bca34ea69154d99be6c) )
  1276: 	/* 0x40000 - 0x80000 is empty, I will place decrypted opcodes here */
  1277: 	ROM_LOAD16_BYTE( "13447", 0x080000, 0x20000, CRC(70a52167) SHA1(51512d4ee1e63902375b197cf04170744b099d88) )
  1278: 	ROM_LOAD16_BYTE( "13445", 0x080001, 0x20000, CRC(28dfc3dd) SHA1(b1d6d3e31a48062a91cc9b7b6ff68bfde0a3ea1c) )
  1279: 
  1280: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1281: 	ROM_LOAD( "aurail.a14", 0x00000, 0x20000, CRC(0fc4a7a8) SHA1(b46b22a6b0ead19551e67abfb3304c52b02b8d29) ) /* plane 1 */
  1282: 	ROM_LOAD( "aurail.b14", 0x20000, 0x20000, CRC(e08135e0) SHA1(cd748f4a8f67f562174fa9c6edb966c77b488e75) )
  1283: 	ROM_LOAD( "aurail.a15", 0x40000, 0x20000, CRC(1c49852f) SHA1(d08d6991c203400f685fada2445a22a7eceeee04) ) /* plane 2 */
  1284: 	ROM_LOAD( "aurail.b15", 0x60000, 0x20000, CRC(e14c6684) SHA1(f9b0d45e01a6df2b3875b493db9fa41bf37d79f0) )
  1285: 	ROM_LOAD( "aurail.a16", 0x80000, 0x20000, CRC(047bde5e) SHA1(e759baedcbb637a6c14af461b8a492554cadc9e4) ) /* plane 3 */
  1286: 	ROM_LOAD( "aurail.b16", 0xa0000, 0x20000, CRC(6309fec4) SHA1(f90c9679bade3cfbaa7949e412410c29d5bfa4d3) )
  1287: 
  1288: 	ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */
  1289: 	ROM_LOAD16_BYTE( "aurail.b1",  0x000001, 0x020000, CRC(5fa0a9f8) SHA1(d9d67cc006a608d48e37aa89359f1a9403172b00) )
  1290: 	ROM_LOAD16_BYTE( "aurail.b5",  0x000000, 0x020000, CRC(0d1b54da) SHA1(c7a6393f9e13adabe93b7a86aa7845c5f4d188f1) )
  1291: 	ROM_LOAD16_BYTE( "aurail.b2",  0x040001, 0x020000, CRC(5f6b33b1) SHA1(5d397bdaa2c7a9ce82cc9134bfeb78418dc613b0) )
  1292: 	ROM_LOAD16_BYTE( "aurail.b6",  0x040000, 0x020000, CRC(bad340c3) SHA1(e04ef028e44054d34831d3617c5a6348823cfebd) )
  1293: 	ROM_LOAD16_BYTE( "aurail.b3",  0x080001, 0x020000, CRC(4e80520b) SHA1(8147793ee0023ac18f633d756ecc53aef1980e95) )
  1294: 	ROM_LOAD16_BYTE( "aurail.b7",  0x080000, 0x020000, CRC(7e9165ac) SHA1(32114095f96fb0ae385c9bf31dd97a99ef182aaa) )
  1295: 	ROM_LOAD16_BYTE( "aurail.b4",  0x0c0001, 0x020000, CRC(5733c428) SHA1(865203ebee9d98e67324c46915d8835d0289ee0c) )
  1296: 	ROM_LOAD16_BYTE( "aurail.b8",  0x0c0000, 0x020000, CRC(66b8f9b3) SHA1(4bf003a9bed40673d88df51a314eb6bd10f0d039) )
  1297: 	ROM_LOAD16_BYTE( "aurail.a1",  0x100001, 0x020000, CRC(4f370b2b) SHA1(66beb4264d569520d80f8915e1c1fddbf61efb21) )
  1298: 	ROM_LOAD16_BYTE( "aurail.b10", 0x100000, 0x020000, CRC(f76014bf) SHA1(b44f0b6fb9dee927d81c62282aa946d8c35766ca) )
  1299: 	ROM_LOAD16_BYTE( "aurail.a2",  0x140001, 0x020000, CRC(37cf9cb4) SHA1(f51cee874ad8a824462d2475a23e7016ef64c6b4) )
  1300: 	ROM_LOAD16_BYTE( "aurail.b11", 0x140000, 0x020000, CRC(1061e7da) SHA1(bad3560f1ed6a5a79f4ecf85d3843b24ecf22d19) )
  1301: 	ROM_LOAD16_BYTE( "aurail.a3",  0x180001, 0x020000, CRC(049698ef) SHA1(dca1a78f0156cfac9acbfb6e47eb3897b579d2ec) )
  1302: 	ROM_LOAD16_BYTE( "aurail.b12", 0x180000, 0x020000, CRC(7dbcfbf1) SHA1(0b7be1de57f83b1213805489c6ebfc0f1e5fb4b0) )
  1303: 	ROM_LOAD16_BYTE( "aurail.a4",  0x1c0001, 0x020000, CRC(77a8989e) SHA1(0ad0877a9814fb7c2fb79062a50b1f9ce9420768) )
  1304: 	ROM_LOAD16_BYTE( "aurail.b13", 0x1c0000, 0x020000, CRC(551df422) SHA1(cf4cd2b66335853c7c6cce949e79c05e93a39666) )
  1305: 
  1306: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1307: 	ROM_LOAD( "13448",      0x0000, 0x8000, CRC(b5183fb9) SHA1(c8372b57fa486256d49dc5851d6b17c92de593fb) )
  1308: 	ROM_LOAD( "aurail.a12", 0x10000,0x20000, CRC(d3d9aaf9) SHA1(0fb3a8cb11033accceb3a43a691fb424cf8b9619) )
  1309: 	ROM_RELOAD(             0x30000,0x20000 )
  1310: ROM_END
  1311: 
  1312: 
  1313: /***************************************************************************/
  1314: 
  1315: static READ16_HANDLER( aurail_skip_r )
  1316: {
  1317: 	if (activecpu_get_pc()==0xe4e) {cpu_spinuntil_int(); return 0;}
  1318: 	return sys16_workingram[0x274e/2];
  1319: }
  1320: 
  1321: static MEMORY_READ16_START( aurail_readmem )
  1322: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  1323: 	{ 0x3f0000, 0x3fffff, SYS16_MRA16_EXTRAM },
  1324: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  1325: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  1326: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  1327: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  1328: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  1329: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  1330: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  1331: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  1332: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  1333: 	{ 0xfc0000, 0xfc0fff, SYS16_MRA16_EXTRAM3 },
  1334: 	{ 0xffe74e, 0xffe74f, aurail_skip_r },
  1335: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  1336: MEMORY_END
  1337: 
  1338: static MEMORY_WRITE16_START( aurail_writemem )
  1339: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  1340: 	{ 0x3f0000, 0x3fffff, SYS16_MWA16_EXTRAM },
  1341: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  1342: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  1343: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  1344: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  1345: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  1346: 	{ 0xfc0000, 0xfc0fff, SYS16_MWA16_EXTRAM3 },
  1347: 	{ 0xfe0006, 0xfe0007, sound_command_w },
  1348: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  1349: MEMORY_END
  1350: 
  1351: /***************************************************************************/
  1352: 
  1353: static void aurail_update_proc (void){
  1354: 	sys16_fg_scrollx = sys16_textram[0x0e98/2];
  1355: 	sys16_bg_scrollx = sys16_textram[0x0e9a/2];
  1356: 	sys16_fg_scrolly = sys16_textram[0x0e90/2];
  1357: 	sys16_bg_scrolly = sys16_textram[0x0e92/2];
  1358: 
  1359: 	set_fg_page( sys16_textram[0x0e80/2] );
  1360: 	set_bg_page( sys16_textram[0x0e82/2] );
  1361: 
  1362: 	set_tile_bank( sys16_extraram3[0x0002/2] );
  1363: }
  1364: 
  1365: static MACHINE_INIT( aurail ){
  1366: 	sys16_spritesystem = sys16_sprite_aurail;
  1367: 	sys16_spritelist_end=0x8000;
  1368: 	sys16_bg_priority_mode=1;
  1369: 
  1370: 	sys16_update_proc = aurail_update_proc;
  1371: }
  1372: 
  1373: static DRIVER_INIT( aurail )
  1374: {
  1375: 	machine_init_sys16_onetime();
  1376: }
  1377: 
  1378: static DRIVER_INIT( auraila )
  1379: {
  1380: 	data16_t *rom = (data16_t *)memory_region(REGION_CPU1);
  1381: 	int diff = 0x40000;	/* place decrypted opcodes in a empty hole */
  1382: 
  1383: 	init_aurail();
  1384: 
  1385: 	memory_set_opcode_base(0,rom+diff/2);
  1386: 
  1387: 	memcpy(rom+diff/2,rom,0x40000);
  1388: 
  1389: 	aurail_decode_data(rom,rom,0x10000);
  1390: 	aurail_decode_opcode1(rom+diff/2,rom+diff/2,0x10000);
  1391: 	aurail_decode_opcode2(rom+(diff+0x10000)/2,rom+(diff+0x10000)/2,0x10000);
  1392: }
  1393: 
  1394: /***************************************************************************/
  1395: 
  1396: INPUT_PORTS_START( aurail )
  1397: 	SYS16_JOY1
  1398: 	SYS16_JOY2
  1399: 	SYS16_SERVICE
  1400: 	SYS16_COINAGE
  1401: 
  1402: PORT_START	/* DSW1 */
  1403: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  1404: 	PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  1405: 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  1406: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1407: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1408: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1409: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  1410: 	PORT_DIPSETTING(    0x00, "2" )
  1411: 	PORT_DIPSETTING(    0x0c, "3" )
  1412: 	PORT_DIPSETTING(    0x08, "4" )
  1413: 	PORT_DIPSETTING(    0x04, "5" )
  1414: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) )
  1415: 	PORT_DIPSETTING(    0x10, "Normal" )
  1416: 	PORT_DIPSETTING(    0x00, "Hard" )
  1417: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Difficulty ) )
  1418: 	PORT_DIPSETTING(    0x20, "Normal" )
  1419: 	PORT_DIPSETTING(    0x00, "Hard" )
  1420: 	PORT_DIPNAME( 0x40, 0x40, "Controller select" )
  1421: 	PORT_DIPSETTING(    0x40, "1 Player side" )
  1422: 	PORT_DIPSETTING(    0x00, "2 Players side" )
  1423: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  1424: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1425: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1426: INPUT_PORTS_END
  1427: 
  1428: /***************************************************************************/
  1429: 
  1430: static MACHINE_DRIVER_START( aurail )
  1431: 
  1432: 	/* basic machine hardware */
  1433: 	MDRV_IMPORT_FROM(system16_7759)
  1434: 	MDRV_CPU_MODIFY("main")
  1435: 	MDRV_CPU_MEMORY(aurail_readmem,aurail_writemem)
  1436: 
  1437: 	MDRV_MACHINE_INIT(aurail)
  1438: MACHINE_DRIVER_END
  1439: 
  1440: /***************************************************************************/
  1441: // sys16B
  1442: ROM_START( bayroute )
  1443: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1444: 	ROM_LOAD16_BYTE( "br.4a", 0x000000, 0x10000, CRC(91c6424b) SHA1(79a968ade7690d5944ee815e19586cb82c3aa562) )
  1445: 	ROM_LOAD16_BYTE( "br.1a", 0x000001, 0x10000, CRC(76954bf3) SHA1(bd617c6ddaf1e7760479b17205388c201fb67662) )
  1446: 	/* empty 0x20000-0x80000*/
  1447: 	ROM_LOAD16_BYTE( "br.5a", 0x080000, 0x10000, CRC(9d6fd183) SHA1(5ae78d33c0e929886d84a25c0fbd62ab45dcbff4) )
  1448: 	ROM_LOAD16_BYTE( "br.2a", 0x080001, 0x10000, CRC(5ca1e3d2) SHA1(51ce67ed0a0054f9c9c4ac56c5775716c44d74b1) )
  1449: 	ROM_LOAD16_BYTE( "br.6a", 0x0a0000, 0x10000, CRC(ed97ad4c) SHA1(6c7d671c3046f1adb486f053acdd2be0c981c68b) )
  1450: 	ROM_LOAD16_BYTE( "br.3a", 0x0a0001, 0x10000, CRC(0d362905) SHA1(04cb35aa44cc1d9ead44c5a7b4f838efec453c85) )
  1451: 
  1452: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1453: 	ROM_LOAD( "opr12462.a14", 0x00000, 0x10000, CRC(a19943b5) SHA1(95cd95223ea76677227b807a7c4eff120e690d37) )
  1454: 	ROM_LOAD( "opr12463.a15", 0x10000, 0x10000, CRC(62f8200d) SHA1(a5a0035249f339396b33f8a908d393777e8951c4) )
  1455: 	ROM_LOAD( "opr12464.a16", 0x20000, 0x10000, CRC(c8c59703) SHA1(3a4f45b88990d27c55ddfde5fc93496954868200) )
  1456: 
  1457: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
  1458: 	ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
  1459: 	ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
  1460: 	ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
  1461: 	ROM_LOAD16_BYTE( "br_obj1e.6b", 0x20000, 0x10000, CRC(d3123315) SHA1(16a87caed1cabb080d4f35935910b38797344ca5) )
  1462: 	ROM_LOAD16_BYTE( "br_obj2o.3b", 0x40001, 0x10000, CRC(84efac1f) SHA1(41c43d70dc7ae7e361d6fa12c5790ea7ebf13ca8) )
  1463: 	ROM_LOAD16_BYTE( "br_obj2e.7b", 0x40000, 0x10000, CRC(b73b12cb) SHA1(e8265ae90aabf1ee0522dbc6541a0f82fec97c7a) )
  1464: 	ROM_LOAD16_BYTE( "br_obj3o.4b", 0x60001, 0x10000, CRC(a2e238ac) SHA1(c854774c0ffd1ccf6e46591a8fa3c80a4630e007) )
  1465: 	ROM_LOAD16_BYTE( "br.8b",		  0x60000, 0x10000, CRC(d8de78ff) SHA1(110661ab8008543b47629722b98d0470f73a48c5) )
  1466: 
  1467: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1468: 	ROM_LOAD( "epr12459.a10", 0x00000, 0x08000, CRC(3e1d29d0) SHA1(fe3d985983e5132e8a26a02a3f2d8d420cbf1a49) )
  1469: 	ROM_LOAD( "mpr12460.a11", 0x10000, 0x20000, CRC(0bae570d) SHA1(05fa4a3405666342ab66e696a7344cca97569f19) )
  1470: 	ROM_LOAD( "mpr12461.a12", 0x30000, 0x20000, CRC(b03b8b46) SHA1(b0283ac377d464f3d9374a992192ec6c515a3c2f) )
  1471: ROM_END
  1472: 
  1473: ROM_START( bayrouta )
  1474: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1475: // custom cpu 317-0116
  1476: 	ROM_LOAD16_BYTE( "epr12517.a7", 0x000000, 0x20000, CRC(436728a9) SHA1(0f6753493ad2c1776880862b462f10ef936a9ee5) )
  1477: 	ROM_LOAD16_BYTE( "epr12516.a5", 0x000001, 0x20000, CRC(4ff0353f) SHA1(f5960f9e80e42d0a3f82d6670b1f2e39b51ffcef) )
  1478: 	/* empty 0x40000-0x80000*/
  1479: 	ROM_LOAD16_BYTE( "epr12458.a8", 0x080000, 0x20000, CRC(e7c7476a) SHA1(7b724d76bdc1978ddf78489edfda14533905a360) )
  1480: 	ROM_LOAD16_BYTE( "epr12456.a6", 0x080001, 0x20000, CRC(25dc2eaf) SHA1(dda300840b9a90bcce7be16ff1904a7a0456c396) )
  1481: 
  1482: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1483: 	ROM_LOAD( "opr12462.a14", 0x00000, 0x10000, CRC(a19943b5) SHA1(95cd95223ea76677227b807a7c4eff120e690d37) )
  1484: 	ROM_LOAD( "opr12463.a15", 0x10000, 0x10000, CRC(62f8200d) SHA1(a5a0035249f339396b33f8a908d393777e8951c4) )
  1485: 	ROM_LOAD( "opr12464.a16", 0x20000, 0x10000, CRC(c8c59703) SHA1(3a4f45b88990d27c55ddfde5fc93496954868200) )
  1486: 
  1487: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  1488: 	ROM_LOAD16_BYTE( "mpr12465.b1", 0x00001, 0x20000, CRC(11d61b45) SHA1(01678e07ffcafb8c161b52763f2183dc281c7578) )
  1489: 	ROM_LOAD16_BYTE( "mpr12467.b5", 0x00000, 0x20000, CRC(c3b4e4c0) SHA1(2d8dbea5278b3fac03c7ad8749f931d36cc8f341) )
  1490: 	ROM_LOAD16_BYTE( "mpr12466.b2", 0x40001, 0x20000, CRC(a57f236f) SHA1(c83219cdfcee10a4fdffcbf410808f161a2b1aef) )
  1491: 	ROM_LOAD16_BYTE( "mpr12468.b6", 0x40000, 0x20000, CRC(d89c77de) SHA1(0e903bf57a7515291dda7e11bdef982a1417043a) )
  1492: 
  1493: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1494: 	ROM_LOAD( "epr12459.a10", 0x00000, 0x08000, CRC(3e1d29d0) SHA1(fe3d985983e5132e8a26a02a3f2d8d420cbf1a49) )
  1495: 	ROM_LOAD( "mpr12460.a11", 0x10000, 0x20000, CRC(0bae570d) SHA1(05fa4a3405666342ab66e696a7344cca97569f19) )
  1496: 	ROM_LOAD( "mpr12461.a12", 0x30000, 0x20000, CRC(b03b8b46) SHA1(b0283ac377d464f3d9374a992192ec6c515a3c2f) )
  1497: ROM_END
  1498: 
  1499: ROM_START( bayrtbl1 )
  1500: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1501: 	ROM_LOAD16_BYTE( "b4.bin", 0x000000, 0x10000, CRC(eb6646ae) SHA1(073bc0a3868e70785f44e497a949cd9e3b591a33) )
  1502: 	ROM_LOAD16_BYTE( "b2.bin", 0x000001, 0x10000, CRC(ecd9cd0e) SHA1(177c38ca02c4e87d6adcae77ce4e9237938d23a9) )
  1503: 	/* empty 0x20000-0x80000*/
  1504: 	ROM_LOAD16_BYTE( "br.5a",  0x080000, 0x10000, CRC(9d6fd183) SHA1(5ae78d33c0e929886d84a25c0fbd62ab45dcbff4) )
  1505: 	ROM_LOAD16_BYTE( "br.2a",  0x080001, 0x10000, CRC(5ca1e3d2) SHA1(51ce67ed0a0054f9c9c4ac56c5775716c44d74b1) )
  1506: 	ROM_LOAD16_BYTE( "b8.bin", 0x0a0000, 0x10000, CRC(e7ca0331) SHA1(b255939576a84f4d266f31a7fde818e04ff35b24) )
  1507: 	ROM_LOAD16_BYTE( "b6.bin", 0x0a0001, 0x10000, CRC(2bc748a6) SHA1(9ab760377fde24cecb703726ee3e59ee23d60a3a) )
  1508: 
  1509: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1510: 	ROM_LOAD( "bs16.bin", 0x00000, 0x10000, CRC(a8a5b310) SHA1(8883e1ed48a3e0f7b4c36d83579f93e84e28568c) )
  1511: 	ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) )
  1512: 	ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
  1513: 
  1514: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  1515: 	ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
  1516: 	ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
  1517: 	ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
  1518: 	ROM_LOAD16_BYTE( "br_obj1e.6b", 0x20000, 0x10000, CRC(d3123315) SHA1(16a87caed1cabb080d4f35935910b38797344ca5) )
  1519: 	ROM_LOAD16_BYTE( "br_obj2o.3b", 0x40001, 0x10000, CRC(84efac1f) SHA1(41c43d70dc7ae7e361d6fa12c5790ea7ebf13ca8) )
  1520: 	ROM_LOAD16_BYTE( "br_obj2e.7b", 0x40000, 0x10000, CRC(b73b12cb) SHA1(e8265ae90aabf1ee0522dbc6541a0f82fec97c7a) )
  1521: 	ROM_LOAD16_BYTE( "br_obj3o.4b", 0x60001, 0x10000, CRC(a2e238ac) SHA1(c854774c0ffd1ccf6e46591a8fa3c80a4630e007) )
  1522: 	ROM_LOAD16_BYTE( "bs7.bin",     0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
  1523: 
  1524: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1525: 	ROM_LOAD( "epr12459.a10", 0x00000, 0x08000, CRC(3e1d29d0) SHA1(fe3d985983e5132e8a26a02a3f2d8d420cbf1a49) )
  1526: 	ROM_LOAD( "mpr12460.a11", 0x10000, 0x20000, CRC(0bae570d) SHA1(05fa4a3405666342ab66e696a7344cca97569f19) )
  1527: 	ROM_LOAD( "mpr12461.a12", 0x30000, 0x20000, CRC(b03b8b46) SHA1(b0283ac377d464f3d9374a992192ec6c515a3c2f) )
  1528: ROM_END
  1529: 
  1530: ROM_START( bayrtbl2 )
  1531: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  1532: 	ROM_LOAD16_BYTE( "br_04", 0x000000, 0x10000, CRC(2e33ebfc) SHA1(f6b5a4bd28d302abd6b1e5a9ec6f2a8b57ff213e) )
  1533: 	ROM_LOAD16_BYTE( "br_06", 0x000001, 0x10000, CRC(3db42313) SHA1(e1c874ebf83e1a458cefaa038fbe89a9804ca30d) )
  1534: 	/* empty 0x20000-0x80000*/
  1535: 	ROM_LOAD16_BYTE( "br_03", 0x080000, 0x20000, CRC(285d256b) SHA1(73eac0131d14f0d7fe2a06cb2e0e57dcf4779cf9) )
  1536: 	ROM_LOAD16_BYTE( "br_05", 0x080001, 0x20000, CRC(552e6384) SHA1(2770b0c9d961671576e09ada2ebd7bb486f24547) )
  1537: 
  1538: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1539: 	ROM_LOAD( "br_15",    0x00000, 0x10000, CRC(050079a9) SHA1(4b356eddec2f500fb0dcc20af6b7aed2f9ef0c02) )
  1540: 	ROM_LOAD( "br_16",    0x10000, 0x10000, CRC(fc371928) SHA1(b36866c95bdc440aae999a90ecf3bbaed11d4351) )
  1541: 	ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
  1542: 
  1543: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
  1544: 	ROM_LOAD16_BYTE( "br_11",       0x00001, 0x10000, CRC(65232905) SHA1(cb195a0ce8bff9d1d3e31678060b3aaccfefcd2d) )
  1545: 	ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
  1546: 	ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
  1547: 	ROM_LOAD16_BYTE( "br_obj1e.6b", 0x20000, 0x10000, CRC(d3123315) SHA1(16a87caed1cabb080d4f35935910b38797344ca5) )
  1548: 	ROM_LOAD16_BYTE( "br_obj2o.3b", 0x40001, 0x10000, CRC(84efac1f) SHA1(41c43d70dc7ae7e361d6fa12c5790ea7ebf13ca8) )
  1549: 	ROM_LOAD16_BYTE( "br_09",       0x40000, 0x10000, CRC(05e9b840) SHA1(7cc1c9ac7b85f1e1bdb68215b5e83eae3ee5ba2a) )
  1550: 	ROM_LOAD16_BYTE( "br_14",       0x60001, 0x10000, CRC(4c4a177b) SHA1(a9dfd7e56b0a21a0f7750d8ec4631901ad182609) )
  1551: 	ROM_LOAD16_BYTE( "bs7.bin",     0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
  1552: 
  1553: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  1554: 	ROM_LOAD( "br_01", 0x00000, 0x10000, CRC(b87156ec) SHA1(bdfef2ab5a4d3cac4077c92ce1ef4604b4c11cf8) )
  1555: 	ROM_LOAD( "br_02", 0x10000, 0x10000, CRC(ef63991b) SHA1(4221741780f88c80b3213ddca949bee7d4c1469a) )
  1556: ROM_END
  1557: 
  1558: /***************************************************************************/
  1559: 
  1560: static MEMORY_READ16_START( bayroute_readmem )
  1561: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  1562: 	{ 0x500000, 0x503fff, SYS16_MRA16_EXTRAM3 },
  1563: 	{ 0x600000, 0x600fff, SYS16_MRA16_SPRITERAM },
  1564: 	{ 0x700000, 0x70ffff, SYS16_MRA16_TILERAM },
  1565: 	{ 0x710000, 0x710fff, SYS16_MRA16_TEXTRAM },
  1566: 	{ 0x800000, 0x800fff, SYS16_MRA16_PALETTERAM },
  1567: 	{ 0x901002, 0x901003, input_port_0_word_r }, // player1
  1568: 	{ 0x901006, 0x901007, input_port_1_word_r }, // player2
  1569: 	{ 0x901000, 0x901001, input_port_2_word_r }, // service
  1570: 	{ 0x902002, 0x902003, input_port_3_word_r }, // dip1
  1571: 	{ 0x902000, 0x902001, input_port_4_word_r }, // dip2
  1572: MEMORY_END
  1573: 
  1574: static MEMORY_WRITE16_START( bayroute_writemem )
  1575: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  1576: 	{ 0x500000, 0x503fff, SYS16_MWA16_EXTRAM3 },
  1577: 	{ 0x600000, 0x600fff, SYS16_MWA16_SPRITERAM },
  1578: 	{ 0x700000, 0x70ffff, SYS16_MWA16_TILERAM },
  1579: 	{ 0x710000, 0x710fff, SYS16_MWA16_TEXTRAM },
  1580: 	{ 0x800000, 0x800fff, SYS16_MWA16_PALETTERAM },
  1581: 	{ 0x900000, 0x900001, sys16_coinctrl_w },
  1582: 	{ 0xff0006, 0xff0007, sound_command_w },
  1583: MEMORY_END
  1584: 
  1585: /***************************************************************************/
  1586: 
  1587: static void bayroute_update_proc( void ){
  1588: 	set_fg_page( sys16_textram[0x740] );
  1589: 	set_bg_page( sys16_textram[0x741] );
  1590: 	sys16_fg_scrolly = sys16_textram[0x748];
  1591: 	sys16_bg_scrolly = sys16_textram[0x749];
  1592: 	sys16_fg_scrollx = sys16_textram[0x74c];
  1593: 	sys16_bg_scrollx = sys16_textram[0x74d];
  1594: }
  1595: 
  1596: static MACHINE_INIT( bayroute ){
  1597: 	static int bank[16] = {
  1598: 		0,0,0,0,
  1599: 		0,0,0,3,
  1600: 		0,0,0,2,
  1601: 		0,1,0,0
  1602: 	};
  1603: 	sys16_obj_bank = bank;
  1604: 	sys16_update_proc = bayroute_update_proc;
  1605: 	sys16_spritesystem = sys16_sprite_aurail;
  1606: 	sys16_spritelist_end=0xc000;
  1607: }
  1608: 
  1609: static DRIVER_INIT( bayroute ){
  1610: 	machine_init_sys16_onetime();
  1611: }
  1612: 
  1613: static DRIVER_INIT( bayrouta ){
  1614: 	machine_init_sys16_onetime();
  1615: }
  1616: 
  1617: static DRIVER_INIT( bayrtbl1 ){
  1618: 	int i;
  1619: 	machine_init_sys16_onetime();
  1620: 	/* invert the graphics bits on the tiles */
  1621: 	for (i = 0; i < 0x30000; i++)
  1622: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  1623: }
  1624: /***************************************************************************/
  1625: 
  1626: INPUT_PORTS_START( bayroute )
  1627: 	SYS16_JOY1
  1628: 	SYS16_JOY2
  1629: 	SYS16_SERVICE
  1630: 	SYS16_COINAGE
  1631: 
  1632: PORT_START
  1633: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  1634: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1635: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1636: 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  1637: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1638: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1639: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  1640: 	PORT_DIPSETTING(    0x04, "1" )
  1641: 	PORT_DIPSETTING(    0x0c, "3" )
  1642: 	PORT_DIPSETTING(    0x08, "5" )
  1643: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Unlimited", IP_KEY_NONE, IP_JOY_NONE )
  1644: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )
  1645: 	PORT_DIPSETTING(    0x30, "10000" )
  1646: 	PORT_DIPSETTING(    0x20, "15000" )
  1647: 	PORT_DIPSETTING(    0x10, "20000" )
  1648: 	PORT_DIPSETTING(    0x00, "None" )
  1649: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Unknown ) )
  1650: 	PORT_DIPSETTING(    0xc0, "A" )
  1651: 	PORT_DIPSETTING(    0x80, "B" )
  1652: 	PORT_DIPSETTING(    0x40, "C" )
  1653: 	PORT_DIPSETTING(    0x00, "D" )
  1654: 
  1655: INPUT_PORTS_END
  1656: 
  1657: /***************************************************************************/
  1658: 
  1659: static MACHINE_DRIVER_START( bayroute )
  1660: 
  1661: 	/* basic machine hardware */
  1662: 	MDRV_IMPORT_FROM(system16_7759)
  1663: 	MDRV_CPU_MODIFY("main")
  1664: 	MDRV_CPU_MEMORY(bayroute_readmem,bayroute_writemem)
  1665: 
  1666: 	MDRV_MACHINE_INIT(bayroute)
  1667: MACHINE_DRIVER_END
  1668: 
  1669: /***************************************************************************
  1670: 
  1671:    Body Slam
  1672: 
  1673: ***************************************************************************/
  1674: // pre16
  1675: ROM_START( bodyslam )
  1676: 	ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 68000 code */
  1677: 	ROM_LOAD16_BYTE( "epr10066.b9", 0x000000, 0x8000, CRC(6cd53290) SHA1(68ef83ad99a26a507d9bc4cd715462169f4ac41f) )
  1678: 	ROM_LOAD16_BYTE( "epr10063.b6", 0x000001, 0x8000, CRC(dd849a16) SHA1(b8cb9f2685a739698a3ed18f76617fd4ac9cb424) )
  1679: 	ROM_LOAD16_BYTE( "epr10067.b10",0x010000, 0x8000, CRC(db22a5ce) SHA1(95c37d4913fa31d5edf02661681bc83deec731d9) )
  1680: 	ROM_LOAD16_BYTE( "epr10064.b7", 0x010001, 0x8000, CRC(53d6b7e0) SHA1(00bfa1487479629f60e1cc1b98ced47e4cb07964) )
  1681: 	ROM_LOAD16_BYTE( "epr10068.b11",0x020000, 0x8000, CRC(15ccc665) SHA1(b088a9bcb1499854794b2dbf4c689f3ae3ce2808) )
  1682: 	ROM_LOAD16_BYTE( "epr10065.b8", 0x020001, 0x8000, CRC(0e5fa314) SHA1(44e36fde102ba6aef2c3b4374ddc21690f2fe527) )
  1683: 
  1684: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1685: 	ROM_LOAD( "epr10321.c9",  0x00000, 0x8000, CRC(cd3e7cba) SHA1(4d3cfc7346c6e63e2221193601f949162d0e4f90) ) /* plane 1 */
  1686: 	ROM_LOAD( "epr10322.c10", 0x08000, 0x8000, CRC(b53d3217) SHA1(baebf20925e9f8ab6660f041a24721716d5b7d92) ) /* plane 2 */
  1687: 	ROM_LOAD( "epr10323.c11", 0x10000, 0x8000, CRC(915a3e61) SHA1(6504a8b26b7b4880971cd69ac2c8aae30dcfa18c) ) /* plane 3 */
  1688: 
  1689: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites */
  1690: 	ROM_LOAD16_BYTE( "epr10012.c5",  0x00001, 0x08000, CRC(990824e8) SHA1(bd45f75d07cb4e17583c2d76050e5f819f4b7efe) )
  1691: 	ROM_LOAD16_BYTE( "epr10016.b2",  0x00000, 0x08000, CRC(af5dc72f) SHA1(97bbb76940c702e642d8222dda71447b8f60b616) )
  1692: 	ROM_LOAD16_BYTE( "epr10013.c6",  0x10001, 0x08000, CRC(9a0919c5) SHA1(e39e60c1e834b3b46bf2ef1c5952841bebe66ade) )
  1693: 	ROM_LOAD16_BYTE( "epr10017.b3",  0x10000, 0x08000, CRC(62aafd95) SHA1(e1e3a95fd11cabf81f44ac2dd3f951d3094725e6) )
  1694: 	ROM_LOAD16_BYTE( "epr10027.c7",  0x20001, 0x08000, CRC(3f1c57c7) SHA1(1336da8dc167a323f09534a2f62ae6f9c62290e4) )
  1695: 	ROM_LOAD16_BYTE( "epr10028.b4",  0x20000, 0x08000, CRC(80d4946d) SHA1(d4c96a18ef6c2ac6bd9d153d8862a3af894642e8) )
  1696: 	ROM_LOAD16_BYTE( "epr10015.c8",  0x30001, 0x08000, CRC(582d3b6a) SHA1(4f1d0060682e3fc1147082286e00e6a296a95da2) )
  1697: 	ROM_LOAD16_BYTE( "epr10019.b5",  0x30000, 0x08000, CRC(e020c38b) SHA1(d13d38a64f2afa7df3cbccef2fe505a4421b73ad) )
  1698: 
  1699: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  1700: 	ROM_LOAD( "epr10026.b1", 0x00000, 0x8000, CRC(123b69b8) SHA1(c0614a8c822991e257f7218908247df278056de8) )
  1701: 
  1702: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  1703: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  1704: 
  1705: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  1706: 	ROM_LOAD( "epr10029.c1", 0x00000, 0x8000, CRC(7e4aca83) SHA1(703486b96d493941ee87267e8363220a851f008e) )
  1707: 	ROM_LOAD( "epr10030.c2", 0x08000, 0x8000, CRC(dcc1df0b) SHA1(a82a557fa48f4b3e1ab38f61b84d749cd417e80f) )
  1708: 	ROM_LOAD( "epr10031.c3", 0x10000, 0x8000, CRC(ea3c4472) SHA1(ad8eac2d3d14fd6aba713f4d624861c17aabf757) )
  1709: 	ROM_LOAD( "epr10032.c4", 0x18000, 0x8000, CRC(0aabebce) SHA1(fab12df8f4eab270be491c6c025d832c338e1e83) )
  1710: 
  1711: ROM_END
  1712: 
  1713: ROM_START( dumpmtmt )
  1714: 	ROM_REGION( 0x30000, REGION_CPU1, 0 ) /* 68000 code */
  1715: 	ROM_LOAD16_BYTE( "7704a.bin", 0x000000, 0x8000, CRC(96de6c7b) SHA1(f23edf86c5044c151a8502957af7ca0de420d55e) )
  1716: 	ROM_LOAD16_BYTE( "7701a.bin", 0x000001, 0x8000, CRC(786d1009) SHA1(c56ebd169c2792cde610a7130cffdc0363fca871) )
  1717: 	ROM_LOAD16_BYTE( "7705a.bin", 0x010000, 0x8000, CRC(fc584391) SHA1(27238408fba2dda67f29094a6700b634b6fdaa58) )
  1718: 	ROM_LOAD16_BYTE( "7702a.bin", 0x010001, 0x8000, CRC(2241a8fd) SHA1(d968ab57aa228dbb7ae6f17d7bf22991291e75ae) )
  1719: 	ROM_LOAD16_BYTE( "7706a.bin", 0x020000, 0x8000, CRC(6bbcc9d0) SHA1(e8e0b85867f11eec6b280f3ad9e2746d3d97ab28) )
  1720: 	ROM_LOAD16_BYTE( "7703a.bin", 0x020001, 0x8000, CRC(fcb0cd40) SHA1(999e107fe08fcb52729ddebc7714a85c47e748b1) )
  1721: 
  1722: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1723: 	ROM_LOAD( "7707a.bin",  0x00000, 0x8000, CRC(45318738) SHA1(6885347321aec8c4829a71e4518d1742f939ea9c) ) /* plane 1 */
  1724: 	ROM_LOAD( "7708a.bin",  0x08000, 0x8000, CRC(411be9a4) SHA1(808a9c941d353f34c3491ca2cde984e73cc7a87d) ) /* plane 2 */
  1725: 	ROM_LOAD( "7709a.bin",  0x10000, 0x8000, CRC(74ceb5a8) SHA1(93ed6bb4a3c820f3a7ee5e9b2c2ce35d2bed8529) ) /* plane 3 */
  1726: 
  1727: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites */
  1728: 	ROM_LOAD16_BYTE( "7715.bin",  	0x000001, 0x08000, CRC(bf47e040) SHA1(5aa1b9adaa2095844c10993402a0597bb5768efb) )
  1729: 	ROM_LOAD16_BYTE( "7719.bin",  	0x000000, 0x08000, CRC(fa5c5d6c) SHA1(6cac5d3fd705d1365348d57a18bbeb1eb9e412b8) )
  1730: 	ROM_LOAD16_BYTE( "epr10013.c6",	0x010001, 0x08000, CRC(9a0919c5) SHA1(e39e60c1e834b3b46bf2ef1c5952841bebe66ade) )	/* 7716 */
  1731: 	ROM_LOAD16_BYTE( "epr10017.b3",	0x010000, 0x08000, CRC(62aafd95) SHA1(e1e3a95fd11cabf81f44ac2dd3f951d3094725e6) )	/* 7720 */
  1732: 	ROM_LOAD16_BYTE( "7717.bin",  	0x020001, 0x08000, CRC(fa64c86d) SHA1(ada722dd6efbf466a719ee1fe34a36ce1ea20184) )
  1733: 	ROM_LOAD16_BYTE( "7721.bin",  	0x020000, 0x08000, CRC(62a9143e) SHA1(28f0dc0329163f0a6505dd34a24a843b35118c5e) )
  1734: 	ROM_LOAD16_BYTE( "epr10015.c8",	0x030001, 0x08000, CRC(582d3b6a) SHA1(4f1d0060682e3fc1147082286e00e6a296a95da2) )	/* 7718 */
  1735: 	ROM_LOAD16_BYTE( "epr10019.b5",	0x030000, 0x08000, CRC(e020c38b) SHA1(d13d38a64f2afa7df3cbccef2fe505a4421b73ad) )	/* 7722 */
  1736: 
  1737: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  1738: 	ROM_LOAD( "7710a.bin", 0x00000, 0x8000, CRC(a19b8ba8) SHA1(21b628d4ecbe38a6d96a39ca4252ff1cb728343f) )
  1739: 
  1740: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  1741: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  1742: 
  1743: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  1744: 	ROM_LOAD( "7711.bin", 0x00000, 0x8000, CRC(efa9aabd) SHA1(b0928313b98159b95f3a6784c6279924774b9253) )
  1745: 	ROM_LOAD( "7712.bin", 0x08000, 0x8000, CRC(7bcd85cf) SHA1(9acba6998327e1074d7311a9b6d06da9baf69aa0) )
  1746: 	ROM_LOAD( "7713.bin", 0x10000, 0x8000, CRC(33f292e7) SHA1(4358cd3922a0dcbf109d2d697c7b8c4e090c3d52) )
  1747: 	ROM_LOAD( "7714.bin", 0x18000, 0x8000, CRC(8fd48c47) SHA1(1cba63a9e7e0b477683b7758d124f4949558ba7a) )
  1748: 
  1749: ROM_END
  1750: 
  1751: /***************************************************************************/
  1752: 
  1753: static MEMORY_READ16_START( bodyslam_readmem )
  1754: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  1755: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  1756: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  1757: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  1758: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  1759: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  1760: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  1761: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  1762: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  1763: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  1764: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  1765: MEMORY_END
  1766: 
  1767: static MEMORY_WRITE16_START( bodyslam_writemem )
  1768: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  1769: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  1770: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  1771: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  1772: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  1773: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  1774: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  1775: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  1776: MEMORY_END
  1777: 
  1778: /***************************************************************************/
  1779: 
  1780: static void bodyslam_update_proc (void){
  1781: 	sys16_fg_scrollx = sys16_textram[0x0ffa/2] & 0x01ff;
  1782: 	sys16_bg_scrollx = sys16_textram[0x0ff8/2] & 0x01ff;
  1783: 	sys16_fg_scrolly = sys16_textram[0x0f26/2] & 0x00ff;
  1784: 	sys16_bg_scrolly = sys16_textram[0x0f24/2] & 0x01ff;
  1785: 
  1786: 	set_fg_page1( sys16_textram[0x0e9e/2] );
  1787: 	set_bg_page1( sys16_textram[0x0e9c/2] );
  1788: }
  1789: 
  1790: static MACHINE_INIT( bodyslam ){
  1791: 	sys16_textmode=1;
  1792: 	sys16_spritesystem = sys16_sprite_quartet2;
  1793: 	sys16_sprxoffset = -0xbc;
  1794: 	sys16_fgxoffset = sys16_bgxoffset = 7;
  1795: 	sys16_bg_priority_mode = 2;
  1796: 	sys16_bg_priority_value=0x0e00;
  1797: 
  1798: 	sys16_textlayer_lo_min=0;
  1799: 	sys16_textlayer_lo_max=0x1f;
  1800: 	sys16_textlayer_hi_min=0x20;
  1801: 	sys16_textlayer_hi_max=0xff;
  1802: 
  1803: 	sys16_update_proc = bodyslam_update_proc;
  1804: }
  1805: 
  1806: // I have no idea if this is needed, but I cannot find any code for the countdown
  1807: // timer in the code and this seems to work ok.
  1808: static void bodyslam_irq_timer(void)
  1809: {
  1810: 	int flag=(*(UINT16 *)(&sys16_workingram[0x200/2]))>>8;
  1811: 	int tick=(*(UINT16 *)(&sys16_workingram[0x200/2]))&0xff;
  1812: 	int sec=(*(UINT16 *)(&sys16_workingram[0x202/2]))>>8;
  1813: 	int min=(*(UINT16 *)(&sys16_workingram[0x202/2]))&0xff;
  1814: 
  1815: 	if(tick == 0 && sec == 0 && min == 0)
  1816: 		flag=1;
  1817: 	else
  1818: 	{
  1819: 		if(tick==0)
  1820: 		{
  1821: 			tick=0x40;	// The game initialise this to 0x40
  1822: 			if(sec==0)
  1823: 			{
  1824: 				sec=0x59;
  1825: 				if(min==0)
  1826: 				{
  1827: 					flag=1;
  1828: 					tick=sec=min=0;
  1829: 				}
  1830: 				else
  1831: 					min--;
  1832: 			}
  1833: 			else
  1834: 			{
  1835: 				if((sec&0xf)==0)
  1836: 				{
  1837: 					sec-=0x10;
  1838: 					sec|=9;
  1839: 				}
  1840: 				else
  1841: 					sec--;
  1842: 
  1843: 			}
  1844: 		}
  1845: 		else
  1846: 			tick--;
  1847: 	}
  1848: 	sys16_workingram[0x200/2] = (flag<<8)+tick;
  1849: 	sys16_workingram[0x202/2] = (sec<<8)+min;
  1850: }
  1851: 
  1852: static DRIVER_INIT( bodyslam ){
  1853: 	machine_init_sys16_onetime();
  1854: 	sys16_bg1_trans=1;
  1855: 	sys16_custom_irq=bodyslam_irq_timer;
  1856: }
  1857: 
  1858: /***************************************************************************/
  1859: 
  1860: INPUT_PORTS_START( bodyslam )
  1861: 	SYS16_JOY1
  1862: 	SYS16_JOY2
  1863: 	SYS16_SERVICE
  1864: 	SYS16_COINAGE
  1865: 
  1866: PORT_START	/* DSW1 */
  1867: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
  1868: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  1869: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1870: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  1871: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  1872: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1873: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  1874: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  1875: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1876: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  1877: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  1878: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1879: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  1880: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  1881: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1882: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  1883: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  1884: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1885: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  1886: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  1887: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1888: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  1889: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  1890: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  1891: 
  1892: INPUT_PORTS_END
  1893: 
  1894: /***************************************************************************/
  1895: 
  1896: static MACHINE_DRIVER_START( bodyslam )
  1897: 
  1898: 	/* basic machine hardware */
  1899: 	MDRV_IMPORT_FROM(system16_7751)
  1900: 	MDRV_CPU_MODIFY("main")
  1901: 	MDRV_CPU_MEMORY(bodyslam_readmem,bodyslam_writemem)
  1902: 
  1903: 	MDRV_MACHINE_INIT(bodyslam)
  1904: MACHINE_DRIVER_END
  1905: 
  1906: /***************************************************************************/
  1907: // sys16B
  1908: ROM_START( dduxbl )
  1909: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  1910: 	ROM_LOAD16_BYTE( "dduxb03.bin", 0x000000, 0x20000, CRC(e7526012) SHA1(a1798008bfa1ce9b87dc330f3817b1978052fcfd) )
  1911: 	ROM_LOAD16_BYTE( "dduxb05.bin", 0x000001, 0x20000, CRC(459d1237) SHA1(55e9c0dc341c919d58cc789203642c397d7ac65e) )
  1912: 	/* empty 0x40000 - 0x80000 */
  1913: 	ROM_LOAD16_BYTE( "dduxb02.bin", 0x080000, 0x20000, CRC(d8ed3132) SHA1(a9d5ad8f79fb635cc234a99fad398688a5f15926) )
  1914: 	ROM_LOAD16_BYTE( "dduxb04.bin", 0x080001, 0x20000, CRC(30c6cb92) SHA1(2e17c74eeb37c9731fc2e365cc0114f7383c0106) )
  1915: 
  1916: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  1917: 	ROM_LOAD( "dduxb14.bin", 0x00000, 0x10000, CRC(664bd135) SHA1(674b06e01c2c8f5b8057dd24d470330c3f140473) )
  1918: 	ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) )
  1919: 	ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) )
  1920: 
  1921: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  1922: 	ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) )
  1923: 	ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) )
  1924: 	ROM_LOAD16_BYTE( "dduxb11.bin", 0x20001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) )
  1925: 	ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) )
  1926: 	ROM_LOAD16_BYTE( "dduxb12.bin", 0x40001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) )
  1927: 	ROM_LOAD16_BYTE( "dduxb08.bin", 0x40000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) )
  1928: 	ROM_LOAD16_BYTE( "dduxb13.bin", 0x60001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) )
  1929: 	ROM_LOAD16_BYTE( "dduxb09.bin", 0x60000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) )
  1930: 
  1931: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  1932: 	ROM_LOAD( "dduxb01.bin", 0x0000, 0x8000, CRC(0dbef0d7) SHA1(8b9afb2fcb946cec467b1e691c267194b503f841) )
  1933: ROM_END
  1934: 
  1935: /***************************************************************************/
  1936: static READ16_HANDLER( dduxbl_skip_r ){
  1937: 	if (activecpu_get_pc()==0x502) {cpu_spinuntil_int(); return 0xffff;}
  1938: 	return sys16_workingram[0x36e0/2];
  1939: }
  1940: 
  1941: static MEMORY_READ16_START( dduxbl_readmem )
  1942: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  1943: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  1944: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  1945: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  1946: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  1947: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  1948: 	{ 0xc41004, 0xc41005, input_port_1_word_r }, // player2
  1949: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  1950: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  1951: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  1952: 	{ 0xfff6e0, 0xfff6e1, dduxbl_skip_r },
  1953: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  1954: MEMORY_END
  1955: 
  1956: static MEMORY_WRITE16_START( dduxbl_writemem )
  1957: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  1958: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  1959: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  1960: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  1961: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  1962: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  1963: 	{ 0xc40006, 0xc40007, sound_command_w },
  1964: 	{ 0xc46000, 0xc4603f, SYS16_MWA16_EXTRAM2 },
  1965: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  1966: MEMORY_END
  1967: 
  1968: /***************************************************************************/
  1969: 
  1970: static void dduxbl_update_proc( void ){
  1971: 	sys16_fg_scrollx = (sys16_extraram2[0x0018/2] ^ 0xffff) & 0x01ff;
  1972: 	sys16_bg_scrollx = (sys16_extraram2[0x0008/2] ^ 0xffff) & 0x01ff;
  1973: 	sys16_fg_scrolly = sys16_extraram2[0x0010/2] & 0x00ff;
  1974: 	sys16_bg_scrolly = sys16_extraram2[0x0000/2];
  1975: 
  1976: 	{
  1977: 		unsigned char lu = sys16_extraram2[0x0020/2] & 0xff;
  1978: 		unsigned char ru = sys16_extraram2[0x0022/2] & 0xff;
  1979: 		unsigned char ld = sys16_extraram2[0x0024/2] & 0xff;
  1980: 		unsigned char rd = sys16_extraram2[0x0026/2] & 0xff;
  1981: 
  1982: 		if (lu==4 && ld==4 && ru==5 && rd==5)
  1983: 		{ // fix a bug in chicago round (un-tested in MAME)
  1984: 			int vs=(*(UINT16 *)(&sys16_workingram[0x36ec]));
  1985: 			sys16_bg_scrolly = vs & 0xff;
  1986: 			sys16_fg_scrolly = vs & 0xff;
  1987: 			if (vs >= 0x100)
  1988: 			{
  1989: 				lu=0x26; ru=0x37;
  1990: 				ld=0x04; rd=0x15;
  1991: 			} else {
  1992: 				ld=0x26; rd=0x37;
  1993: 				lu=0x04; ru=0x15;
  1994: 			}
  1995: 		}
  1996: 		sys16_fg_page[0] = ld&0xf;
  1997: 		sys16_fg_page[1] = rd&0xf;
  1998: 		sys16_fg_page[2] = lu&0xf;
  1999: 		sys16_fg_page[3] = ru&0xf;
  2000: 
  2001: 		sys16_bg_page[0] = ld>>4;
  2002: 		sys16_bg_page[1] = rd>>4;
  2003: 		sys16_bg_page[2] = lu>>4;
  2004: 		sys16_bg_page[3] = ru>>4;
  2005: 	}
  2006: }
  2007: 
  2008: static MACHINE_INIT( dduxbl ){
  2009: 	static int bank[16] = {
  2010: 		0,0,0,0,
  2011: 		0,0,0,3,
  2012: 		0,0,0,2,
  2013: 		0,1,0,0
  2014: 	};
  2015: 	sys16_obj_bank = bank;
  2016: 
  2017: 	sys16_patch_code( 0x1eb2e, 0x01 );
  2018: 	sys16_patch_code( 0x1eb2f, 0x01 );
  2019: 	sys16_patch_code( 0x1eb3c, 0x00 );
  2020: 	sys16_patch_code( 0x1eb3d, 0x00 );
  2021: 	sys16_patch_code( 0x23132, 0x01 );
  2022: 	sys16_patch_code( 0x23133, 0x01 );
  2023: 	sys16_patch_code( 0x23140, 0x00 );
  2024: 	sys16_patch_code( 0x23141, 0x00 );
  2025: 	sys16_patch_code( 0x24a9a, 0x01 );
  2026: 	sys16_patch_code( 0x24a9b, 0x01 );
  2027: 	sys16_patch_code( 0x24aa8, 0x00 );
  2028: 	sys16_patch_code( 0x24aa9, 0x00 );
  2029: 
  2030: 	sys16_update_proc = dduxbl_update_proc;
  2031: 	sys16_sprxoffset = -0x48;
  2032: }
  2033: 
  2034: static DRIVER_INIT( dduxbl )
  2035: {
  2036: 	int i;
  2037: 
  2038: 	machine_init_sys16_onetime();
  2039: 
  2040: 	/* invert the graphics bits on the tiles */
  2041: 	for (i = 0; i < 0x30000; i++)
  2042: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  2043: }
  2044: /***************************************************************************/
  2045: 
  2046: INPUT_PORTS_START( dduxbl )
  2047: 	SYS16_JOY1
  2048: 	SYS16_JOY2
  2049: 	SYS16_SERVICE
  2050: 	SYS16_COINAGE
  2051: 
  2052: PORT_START	/* DSW1 */
  2053: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  2054: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2055: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2056: 	PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) )
  2057: 	PORT_DIPSETTING(    0x04, "Easy" )
  2058: 	PORT_DIPSETTING(    0x06, "Normal" )
  2059: 	PORT_DIPSETTING(    0x02, "Hard" )
  2060: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2061: 	PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) )
  2062: 	PORT_DIPSETTING(    0x10, "2" )
  2063: 	PORT_DIPSETTING(    0x18, "3" )
  2064: 	PORT_DIPSETTING(    0x08, "4" )
  2065: 	PORT_DIPSETTING(    0x00, "5" )
  2066: 	PORT_DIPNAME( 0x60, 0x60, DEF_STR( Bonus_Life ) )
  2067: 	PORT_DIPSETTING(    0x40, "150000" )
  2068: 	PORT_DIPSETTING(    0x60, "200000" )
  2069: 	PORT_DIPSETTING(    0x20, "300000" )
  2070: 	PORT_DIPSETTING(    0x00, "400000" )
  2071: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  2072: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2073: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2074: 
  2075: INPUT_PORTS_END
  2076: 
  2077: /***************************************************************************/
  2078: 
  2079: static MACHINE_DRIVER_START( dduxbl )
  2080: 
  2081: 	/* basic machine hardware */
  2082: 	MDRV_IMPORT_FROM(system16)
  2083: 	MDRV_CPU_MODIFY("main")
  2084: 	MDRV_CPU_MEMORY(dduxbl_readmem,dduxbl_writemem)
  2085: 
  2086: 	MDRV_MACHINE_INIT(dduxbl)
  2087: MACHINE_DRIVER_END
  2088: 
  2089: /***************************************************************************/
  2090: // sys16B
  2091: ROM_START( eswat )
  2092: 	ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 code */
  2093: 	ROM_LOAD16_BYTE( "12657", 0x000000, 0x40000, CRC(cfb935e9) SHA1(c2ff4566f5f6cd6229323fac4f9d1881fc86ac62) )
  2094: 	ROM_LOAD16_BYTE( "12656", 0x000001, 0x40000, CRC(be3f9d28) SHA1(3e93da0746e064c3406c378b1cf6be82f999b282) )
  2095: 
  2096: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2097: 	ROM_LOAD( "e12624r", 0x00000, 0x40000, CRC(e7b8545e) SHA1(1eee07ae29b791851a5b3761e731ceee6e5c24a8) )
  2098: 	ROM_LOAD( "e12625r", 0x40000, 0x40000, CRC(b418582c) SHA1(06120c58e4873474eef8ee1339b01b9a71d08a1a) )
  2099: 	ROM_LOAD( "e12626r", 0x80000, 0x40000, CRC(ba65789b) SHA1(3603a229756b02bfa89df97d36b27d55bf0fd82b) )
  2100: 
  2101: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  2102: 	ROM_LOAD16_BYTE( "e12618r", 0x000001, 0x40000, CRC(2d9ae975) SHA1(3d2f80f3393bac0dfee37ac8d3c96ab8b0869411) )
  2103: 	ROM_LOAD16_BYTE( "e12621r", 0x000000, 0x40000, CRC(1e6c4cf7) SHA1(21c87769c2a2410b8c451e08099a4e5e70381408) )
  2104: 	ROM_LOAD16_BYTE( "e12619r", 0x080001, 0x40000, CRC(5f7ee6f6) SHA1(1a9d0ecc00586ec1ee9250579957cf095066fd44) )
  2105: 	ROM_LOAD16_BYTE( "e12622r", 0x080000, 0x40000, CRC(33251fde) SHA1(bbfc0f69a5b92c9d6fc25fdfbf652e30627106ab) )
  2106: 	ROM_LOAD16_BYTE( "e12620r", 0x100001, 0x40000, CRC(905f9be2) SHA1(3a3d0f6392263b67011d6b9d9d79c79d69f68bd6) )
  2107: 	ROM_LOAD16_BYTE( "e12623r", 0x100000, 0x40000, CRC(a25ea1fc) SHA1(4ab4b9c8698e0b630bb6f363070f28a300ab9ee6) )
  2108: 
  2109: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  2110: 	ROM_LOAD( "e12617", 0x00000, 0x08000, CRC(537930cb) SHA1(da3d50aff3cbe1587809e804f840fa5138fb6811) )
  2111: 	ROM_LOAD( "e12616r",0x10000, 0x20000, CRC(f213fa4a) SHA1(a4cb8a52b358a075177f73699eae525884aba1ec) )
  2112: ROM_END
  2113: 
  2114: ROM_START( eswatbl )
  2115: 	ROM_REGION( 0x080000, REGION_CPU1, 0 ) /* 68000 code */
  2116: 	ROM_LOAD16_BYTE( "eswat_c.rom", 0x000000, 0x10000, CRC(1028cc81) SHA1(24b4cd182419a44f3d6afa1c4273353024eb278f) )
  2117: 	ROM_LOAD16_BYTE( "eswat_f.rom", 0x000001, 0x10000, CRC(f7b2d388) SHA1(8131ba8f4fa01751b9993c3c6c218c9bd3adb328) )
  2118: 	ROM_LOAD16_BYTE( "eswat_b.rom", 0x020000, 0x10000, CRC(87c6b1b5) SHA1(a9f29e29a9c0e3daf272dce263a5fd7866642c77) )
  2119: 	ROM_LOAD16_BYTE( "eswat_e.rom", 0x020001, 0x10000, CRC(937ddf9a) SHA1(9fc73f93e9c4221a4dc778593edc02cb405b2f78) )
  2120: 	ROM_LOAD16_BYTE( "eswat_a.rom", 0x040000, 0x08000, CRC(2af4fc62) SHA1(f7b1539a5ab9560bd49dfecf44699abccfb649be) )
  2121: 	ROM_LOAD16_BYTE( "eswat_d.rom", 0x040001, 0x08000, CRC(b4751e19) SHA1(57c9687dc864c163d13dbb89057cd42684a199cd) )
  2122: 
  2123: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2124: 	ROM_LOAD( "ic19.bin", 0x00000, 0x40000, CRC(375a5ec4) SHA1(42b9116bdc0e0a5b1dd667ac1856b4c2252829ba) )
  2125: 	ROM_LOAD( "ic20.bin", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) )
  2126: 	ROM_LOAD( "ic21.bin", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) )
  2127: 
  2128: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  2129: 	ROM_LOAD16_BYTE( "ic9.bin",  0x000001, 0x040000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) )
  2130: 	ROM_LOAD16_BYTE( "ic12.bin", 0x000000, 0x040000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) )
  2131: 	ROM_LOAD16_BYTE( "ic10.bin", 0x080001, 0x040000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) )
  2132: 	ROM_LOAD16_BYTE( "ic13.bin", 0x080000, 0x040000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) )
  2133: 	ROM_LOAD16_BYTE( "ic11.bin", 0x100001, 0x040000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) )
  2134: 	ROM_LOAD16_BYTE( "ic14.bin", 0x100000, 0x040000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) )
  2135: 
  2136: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  2137: 	ROM_LOAD( "ic8.bin", 0x0000, 0x8000, CRC(7efecf23) SHA1(2b87af7cfaab5942a3f7b38c987fcba01d3475ab) )
  2138: 	ROM_LOAD( "ic6.bin", 0x10000, 0x40000, CRC(254347c2) SHA1(bf2d83a69a5be375c7e42e9f7d6e65c1095a354c) )
  2139: ROM_END
  2140: /***************************************************************************/
  2141: 
  2142: static READ16_HANDLER( eswatbl_skip_r ){
  2143: 	if (activecpu_get_pc()==0x65c) {cpu_spinuntil_int(); return 0xffff;}
  2144: 	return sys16_workingram[0x0454/2];
  2145: }
  2146: 
  2147: static MEMORY_READ16_START( eswat_readmem )
  2148: 	{ 0x000000, 0x07ffff, MRA16_ROM },
  2149: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  2150: 	{ 0x410000, 0x418fff, SYS16_MRA16_TEXTRAM },
  2151: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  2152: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  2153: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  2154: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  2155: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  2156: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  2157: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  2158: 	{ 0xffc454, 0xffc455, eswatbl_skip_r },
  2159: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  2160: MEMORY_END
  2161: 
  2162: static int eswat_tilebank0;
  2163: 
  2164: static WRITE16_HANDLER( eswat_tilebank0_w ){
  2165: 	if( ACCESSING_LSB ){
  2166: 		eswat_tilebank0 = data&0xff;
  2167: 	}
  2168: }
  2169: 
  2170: static MEMORY_WRITE16_START( eswat_writemem )
  2171: 	{ 0x000000, 0x07ffff, MWA16_ROM },
  2172: 	{ 0x3e2000, 0x3e2001, eswat_tilebank0_w },
  2173: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  2174: 	{ 0x410000, 0x418fff, SYS16_MWA16_TEXTRAM },
  2175: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  2176: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  2177: 	{ 0xc42006, 0xc42007, sound_command_w },
  2178: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  2179: 	{ 0xc80000, 0xc80001, MWA16_NOP },
  2180: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  2181: MEMORY_END
  2182: 
  2183: /***************************************************************************/
  2184: 
  2185: static void eswat_update_proc( void ){
  2186: 	sys16_fg_scrollx = sys16_textram[0x8008/2] ^ 0xffff;
  2187: 	sys16_bg_scrollx = sys16_textram[0x8018/2] ^ 0xffff;
  2188: 	sys16_fg_scrolly = sys16_textram[0x8000/2];
  2189: 	sys16_bg_scrolly = sys16_textram[0x8010/2];
  2190: 
  2191: 	set_fg_page( sys16_textram[0x8020/2] );
  2192: 	set_bg_page( sys16_textram[0x8028/2] );
  2193: 
  2194: 	sys16_tile_bank1 = (sys16_textram[0x8030/2])&0xf;
  2195: 	sys16_tile_bank0 = eswat_tilebank0;
  2196: }
  2197: 
  2198: static MACHINE_INIT( eswat ){
  2199: 	static int bank[] = {
  2200: 		0,1,	4,5,
  2201: 		8,9,	12,13,
  2202: 		2,3,	6,7,
  2203: 		10,11,	14,15
  2204: 	};
  2205: 	sys16_obj_bank = bank;
  2206: 	sys16_sprxoffset = -0x23c;
  2207: 
  2208: 	sys16_patch_code( 0x3897, 0x11 );
  2209: 
  2210: 	sys16_update_proc = eswat_update_proc;
  2211: }
  2212: 
  2213: static DRIVER_INIT( eswat ){
  2214: 	machine_init_sys16_onetime();
  2215: 	sys16_rowscroll_scroll=0x8000;
  2216: 	sys18_splittab_fg_x=&sys16_textram[0x0f80];
  2217: }
  2218: 
  2219: /***************************************************************************/
  2220: 
  2221: INPUT_PORTS_START( eswat )
  2222: 	SYS16_JOY1
  2223: 	SYS16_JOY2
  2224: 	SYS16_SERVICE
  2225: 	SYS16_COINAGE
  2226: 
  2227: PORT_START	/* DSW1 */
  2228: 	PORT_DIPNAME( 0x01, 0x01, "2 Credits to Start" )
  2229: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2230: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2231: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2232: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2233: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2234: 	PORT_DIPNAME( 0x04, 0x04, "Display Flip" )
  2235: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2236: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2237: 	PORT_DIPNAME( 0x08, 0x08, "Time" )
  2238: 	PORT_DIPSETTING(    0x08, "Normal" )
  2239: 	PORT_DIPSETTING(    0x00, "Hard" )
  2240: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  2241: 	PORT_DIPSETTING(    0x20, "Easy" )
  2242: 	PORT_DIPSETTING(    0x30, "Normal" )
  2243: 	PORT_DIPSETTING(    0x10, "Hard" )
  2244: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2245: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
  2246: 	PORT_DIPSETTING(    0x00, "1" )
  2247: 	PORT_DIPSETTING(    0x40, "2" )
  2248: 	PORT_DIPSETTING(    0xc0, "3" )
  2249: 	PORT_DIPSETTING(    0x80, "4" )
  2250: INPUT_PORTS_END
  2251: 
  2252: /***************************************************************************/
  2253: 
  2254: static MACHINE_DRIVER_START( eswat )
  2255: 
  2256: 	/* basic machine hardware */
  2257: 	MDRV_IMPORT_FROM(system16_7759)
  2258: 	MDRV_CPU_MODIFY("main")
  2259: 	MDRV_CPU_MEMORY(eswat_readmem,eswat_writemem)
  2260: 
  2261: 	MDRV_MACHINE_INIT(eswat)
  2262: MACHINE_DRIVER_END
  2263: 
  2264: /***************************************************************************/
  2265: // sys16A
  2266: ROM_START( fantzono )
  2267: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  2268: 	ROM_LOAD16_BYTE( "7385.43", 0x000000, 0x8000, CRC(5cb64450) SHA1(5831405359975dd7d8c6614b20fd9b18a5d6410d) )
  2269: 	ROM_LOAD16_BYTE( "7382.26", 0x000001, 0x8000, CRC(3fda7416) SHA1(91f34cc8afb4ad8bc783c31d25781a1359c44cfe) )
  2270: 	ROM_LOAD16_BYTE( "7386.42", 0x010000, 0x8000, CRC(15810ace) SHA1(e61a258ab6601d359f6ad1f37a2b2801bf777d26) )
  2271: 	ROM_LOAD16_BYTE( "7383.25", 0x010001, 0x8000, CRC(a001e10a) SHA1(04ebb012b10817db36997d0ee877104d512decf8) )
  2272: 	ROM_LOAD16_BYTE( "7387.41", 0x020000, 0x8000, CRC(0acd335d) SHA1(f39566a2069eefa7682c57c6521ea7a328738d06) )
  2273: 	ROM_LOAD16_BYTE( "7384.24", 0x020001, 0x8000, CRC(fd909341) SHA1(2f1e01eb7d7b330c9c0dd98e5f8ed4973f0e93fb) )
  2274: 
  2275: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2276: 	ROM_LOAD( "7388.95", 0x00000, 0x08000, CRC(8eb02f6b) SHA1(80511b944b57541669010bd5a0ca52bc98eabd62) )
  2277: 	ROM_LOAD( "7389.94", 0x08000, 0x08000, CRC(2f4f71b8) SHA1(ceb39e95cd43904b8e4f89c7227491e139fb3ca6) )
  2278: 	ROM_LOAD( "7390.93", 0x10000, 0x08000, CRC(d90609c6) SHA1(4232f6ecb21f242c0c8d81e06b88bc742668609f) )
  2279: 
  2280: 	ROM_REGION( 0x30000, REGION_GFX2, 0 ) /* sprites */
  2281: 	ROM_LOAD16_BYTE( "7392.10", 0x00001, 0x8000, CRC(5bb7c8b6) SHA1(eaa0ed63ac4f66ee285757e842bdd7b005292600) )
  2282: 	ROM_LOAD16_BYTE( "7396.11", 0x00000, 0x8000, CRC(74ae4b57) SHA1(1f24b1faea765994b85f0e7ac8e944c8da22103f) )
  2283: 	ROM_LOAD16_BYTE( "7393.17", 0x10001, 0x8000, CRC(14fc7e82) SHA1(ca7caca989a3577dd30ad4f66b0fcce712a454ef) )
  2284: 	ROM_LOAD16_BYTE( "7397.18", 0x10000, 0x8000, CRC(e05a1e25) SHA1(9691d9f0763b7483ee6912437902f22ab4b78a05) )
  2285: 	ROM_LOAD16_BYTE( "7394.23", 0x20001, 0x8000, CRC(531ca13f) SHA1(19e68bc515f6021e1145cff4f3f0e083839ee8f3) )
  2286: 	ROM_LOAD16_BYTE( "7398.24", 0x20000, 0x8000, CRC(68807b49) SHA1(0a189da8cdd2090e76d6d06c55b478abce60542d) )
  2287: 
  2288: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  2289: 	ROM_LOAD( "7535.12", 0x0000, 0x8000, CRC(0cb2126a) SHA1(42b18a81bed58ef59eaad929007eef89ad273dbb) )
  2290: ROM_END
  2291: 
  2292: ROM_START( fantzone )
  2293: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  2294: 	ROM_LOAD16_BYTE( "epr7385a.43", 0x000000, 0x8000, CRC(4091af42) SHA1(1d4fdd32db9f75e5ccaab5766a50249ad71a60af) )
  2295: 	ROM_LOAD16_BYTE( "epr7382a.26", 0x000001, 0x8000, CRC(77d67bfd) SHA1(886ce4c2d779cedd81f85737ef55fce3c94baa18) )
  2296: 	ROM_LOAD16_BYTE( "epr7386a.42", 0x010000, 0x8000, CRC(b0a67cd0) SHA1(2e2bf2b7306fc567f7d13f89977543b368c19027) )
  2297: 	ROM_LOAD16_BYTE( "epr7383a.25", 0x010001, 0x8000, CRC(5f79b2a9) SHA1(de3125bbd0a126fc5a67ba3134cd3f4608ebdfce) )
  2298: 	ROM_LOAD16_BYTE( "7387.41", 0x020000, 0x8000, CRC(0acd335d) SHA1(f39566a2069eefa7682c57c6521ea7a328738d06) )
  2299: 	ROM_LOAD16_BYTE( "7384.24", 0x020001, 0x8000, CRC(fd909341) SHA1(2f1e01eb7d7b330c9c0dd98e5f8ed4973f0e93fb) )
  2300: 
  2301: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2302: 	ROM_LOAD( "7388.95", 0x00000, 0x08000, CRC(8eb02f6b) SHA1(80511b944b57541669010bd5a0ca52bc98eabd62) )
  2303: 	ROM_LOAD( "7389.94", 0x08000, 0x08000, CRC(2f4f71b8) SHA1(ceb39e95cd43904b8e4f89c7227491e139fb3ca6) )
  2304: 	ROM_LOAD( "7390.93", 0x10000, 0x08000, CRC(d90609c6) SHA1(4232f6ecb21f242c0c8d81e06b88bc742668609f) )
  2305: 
  2306: 	ROM_REGION( 0x30000, REGION_GFX2, 0 ) /* sprites */
  2307: 	ROM_LOAD16_BYTE( "7392.10", 0x00001, 0x8000, CRC(5bb7c8b6) SHA1(eaa0ed63ac4f66ee285757e842bdd7b005292600) )
  2308: 	ROM_LOAD16_BYTE( "7396.11", 0x00000, 0x8000, CRC(74ae4b57) SHA1(1f24b1faea765994b85f0e7ac8e944c8da22103f) )
  2309: 	ROM_LOAD16_BYTE( "7393.17", 0x10001, 0x8000, CRC(14fc7e82) SHA1(ca7caca989a3577dd30ad4f66b0fcce712a454ef) )
  2310: 	ROM_LOAD16_BYTE( "7397.18", 0x10000, 0x8000, CRC(e05a1e25) SHA1(9691d9f0763b7483ee6912437902f22ab4b78a05) )
  2311: 	ROM_LOAD16_BYTE( "7394.23", 0x20001, 0x8000, CRC(531ca13f) SHA1(19e68bc515f6021e1145cff4f3f0e083839ee8f3) )
  2312: 	ROM_LOAD16_BYTE( "7398.24", 0x20000, 0x8000, CRC(68807b49) SHA1(0a189da8cdd2090e76d6d06c55b478abce60542d) )
  2313: 
  2314: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  2315: 	ROM_LOAD( "epr7535a.12", 0x0000, 0x8000, CRC(bc1374fa) SHA1(ed2c87ae024dc251e175239f1bccc728fc096548) )
  2316: ROM_END
  2317: 
  2318: 
  2319: /***************************************************************************/
  2320: 
  2321: static READ16_HANDLER( fantzone_skip_r ){
  2322: 	if (activecpu_get_pc()==0x91b2) {cpu_spinuntil_int(); return 0xffff;}
  2323: 	return sys16_workingram[0x022a/2];
  2324: }
  2325: 
  2326: static MEMORY_READ16_START( fantzono_readmem )
  2327: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  2328: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  2329: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  2330: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  2331: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  2332: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  2333: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  2334: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  2335: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  2336: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  2337: 	{ 0xc40000, 0xc40003, SYS16_MRA16_EXTRAM2 },
  2338: 	{ 0xffc22a, 0xffc22b, fantzone_skip_r },
  2339: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  2340: MEMORY_END
  2341: 
  2342: static MEMORY_WRITE16_START( fantzono_writemem )
  2343: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  2344: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  2345: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  2346: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  2347: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  2348: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  2349: 	{ 0xc40000, 0xc40003, SYS16_MWA16_EXTRAM2 },
  2350: 	{ 0xc60000, 0xc60003, MWA16_NOP },
  2351: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  2352: MEMORY_END
  2353: 
  2354: static MEMORY_READ16_START( fantzone_readmem )
  2355: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  2356: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  2357: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  2358: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  2359: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  2360: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  2361: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  2362: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  2363: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  2364: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  2365: 	{ 0xffc22a, 0xffc22b, fantzone_skip_r },
  2366: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  2367: MEMORY_END
  2368: 
  2369: static MEMORY_WRITE16_START( fantzone_writemem )
  2370: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  2371: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  2372: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  2373: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  2374: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  2375: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  2376: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  2377: 	{ 0xc60000, 0xc60003, MWA16_NOP },
  2378: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  2379: MEMORY_END
  2380: 
  2381: /***************************************************************************/
  2382: 
  2383: static void fantzone_update_proc( void ){
  2384: 	set_bg_page1( sys16_textram[0x74e] );
  2385: 	set_fg_page1( sys16_textram[0x74f] );
  2386: 	sys16_fg_scrollx = sys16_textram[0x7fc] & 0x01ff;
  2387: 	sys16_bg_scrollx = sys16_textram[0x7fd] & 0x01ff;
  2388: 	sys16_fg_scrolly = sys16_textram[0x792] & 0x00ff;
  2389: 	sys16_bg_scrolly = sys16_textram[0x793] & 0x01ff;
  2390: }
  2391: 
  2392: static MACHINE_INIT( fantzono ){
  2393: 	sys16_textmode=1;
  2394: 	sys16_spritesystem = sys16_sprite_fantzone;
  2395: 	sys16_sprxoffset = -0xbe;
  2396: //	sys16_fgxoffset = sys16_bgxoffset = 8;
  2397: 	sys16_fg_priority_mode=3;				// fixes end of game priority
  2398: 	sys16_fg_priority_value=0xd000;
  2399: 
  2400: 	sys16_patch_code( 0x20e7, 0x16 );
  2401: 	sys16_patch_code( 0x30ef, 0x16 );
  2402: 
  2403: 	// solving Fantasy Zone scrolling bug
  2404: 	sys16_patch_code(0x308f,0x00);
  2405: 
  2406: 	// invincible
  2407: /*	sys16_patch_code(0x224e,0x4e);
  2408: 	sys16_patch_code(0x224f,0x71);
  2409: 	sys16_patch_code(0x2250,0x4e);
  2410: 	sys16_patch_code(0x2251,0x71);
  2411: 
  2412: 	sys16_patch_code(0x2666,0x4e);
  2413: 	sys16_patch_code(0x2667,0x71);
  2414: 	sys16_patch_code(0x2668,0x4e);
  2415: 	sys16_patch_code(0x2669,0x71);
  2416: 
  2417: 	sys16_patch_code(0x25c0,0x4e);
  2418: 	sys16_patch_code(0x25c1,0x71);
  2419: 	sys16_patch_code(0x25c2,0x4e);
  2420: 	sys16_patch_code(0x25c3,0x71);
  2421: */
  2422: 
  2423: 	sys16_update_proc = fantzone_update_proc;
  2424: }
  2425: 
  2426: static MACHINE_INIT( fantzone ){
  2427: 	sys16_textmode=1;
  2428: 	sys16_spritesystem = sys16_sprite_fantzone;
  2429: 	sys16_sprxoffset = -0xbe;
  2430: 	sys16_fg_priority_mode=3;				// fixes end of game priority
  2431: 	sys16_fg_priority_value=0xd000;
  2432: 
  2433: 	sys16_patch_code( 0x2135, 0x16 );
  2434: 	sys16_patch_code( 0x3649, 0x16 );
  2435: 
  2436: 	// hack? solving Fantasy Zone scrolling bug
  2437: 	sys16_patch_code(0x35e9,0x00);
  2438: 
  2439: 	sys16_update_proc = fantzone_update_proc;
  2440: }
  2441: 
  2442: static DRIVER_INIT( fantzone )
  2443: {
  2444: 	machine_init_sys16_onetime();
  2445: }
  2446: /***************************************************************************/
  2447: 
  2448: INPUT_PORTS_START( fantzone )
  2449: 	SYS16_JOY1
  2450: 	SYS16_JOY2
  2451: 	SYS16_SERVICE
  2452: 	SYS16_COINAGE
  2453: 
  2454: PORT_START	/* DSW1 */
  2455: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) )
  2456: 	PORT_DIPSETTING(    0x01, DEF_STR( Upright ) )
  2457: 	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  2458: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2459: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2460: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2461: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  2462: 	PORT_DIPSETTING(    0x08, "2" )
  2463: 	PORT_DIPSETTING(    0x0c, "3" )
  2464: 	PORT_DIPSETTING(    0x04, "4" )
  2465: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "240", IP_KEY_NONE, IP_JOY_NONE )
  2466: 	PORT_DIPNAME( 0x30, 0x30, "Extra Ship Cost" )
  2467: 	PORT_DIPSETTING(    0x30, "5000" )
  2468: 	PORT_DIPSETTING(    0x20, "10000" )
  2469: 	PORT_DIPSETTING(    0x10, "15000" )
  2470: 	PORT_DIPSETTING(    0x00, "20000" )
  2471: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  2472: 	PORT_DIPSETTING(    0x80, "Easy" )
  2473: 	PORT_DIPSETTING(    0xc0, "Normal" )
  2474: 	PORT_DIPSETTING(    0x40, "Hard" )
  2475: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2476: 
  2477: INPUT_PORTS_END
  2478: 
  2479: /***************************************************************************/
  2480: 
  2481: static MACHINE_DRIVER_START( fantzono )
  2482: 
  2483: 	/* basic machine hardware */
  2484: 	MDRV_IMPORT_FROM(system16)
  2485: 	MDRV_CPU_MODIFY("main")
  2486: 	MDRV_CPU_MEMORY(fantzono_readmem,fantzono_writemem)
  2487: 
  2488: 	MDRV_MACHINE_INIT(fantzono)
  2489: MACHINE_DRIVER_END
  2490: 
  2491: 
  2492: static MACHINE_DRIVER_START( fantzone )
  2493: 
  2494: 	/* basic machine hardware */
  2495: 	MDRV_IMPORT_FROM(system16)
  2496: 	MDRV_CPU_MODIFY("main")
  2497: 	MDRV_CPU_MEMORY(fantzone_readmem,fantzone_writemem)
  2498: 
  2499: 	MDRV_MACHINE_INIT(fantzone)
  2500: MACHINE_DRIVER_END
  2501: 
  2502: /***************************************************************************/
  2503: // sys16B
  2504: ROM_START( fpoint )
  2505: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  2506: 	ROM_LOAD16_BYTE( "12591b.bin", 0x000000, 0x10000, CRC(248b3e1b) SHA1(b473c2a057a61896596ac4761e875d72c4f91529) )
  2507: 	ROM_LOAD16_BYTE( "12590b.bin", 0x000001, 0x10000, CRC(75256e3d) SHA1(87a7d9952f29e49958c135906ac2fd19bdc29b67) )
  2508: 
  2509: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2510: 	ROM_LOAD( "12595.bin", 0x00000, 0x10000, CRC(5b18d60b) SHA1(8e9c81635dcefa52d1cf53c2937ae560191b5202) )
  2511: 	ROM_LOAD( "12594.bin", 0x10000, 0x10000, CRC(8bfc4815) SHA1(08d28b65e5024c592a9a289b270774ef5c553cbf) )
  2512: 	ROM_LOAD( "12593.bin", 0x20000, 0x10000, CRC(cc0582d8) SHA1(92c7d125a6dcb9c5e6e7bd92a5bf3008385ed487) )
  2513: 
  2514: 	ROM_REGION( 0x20000, REGION_GFX2, 0 ) /* sprites */
  2515: 	ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x10000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
  2516: 	ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x10000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
  2517: 
  2518: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  2519: 	ROM_LOAD( "12592.bin", 0x0000, 0x8000, CRC(9a8c11bb) SHA1(399f8e9bdd7aaa4d25817fa9cd4bbf413e5baebe) )
  2520: ROM_END
  2521: 
  2522: ROM_START( fpointbl )
  2523: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  2524: 	ROM_LOAD16_BYTE( "flpoint.003", 0x000000, 0x10000, CRC(4d6df514) SHA1(168aa1629ab7152ba1984605155406b236954a2c) )
  2525: 	ROM_LOAD16_BYTE( "flpoint.002", 0x000001, 0x10000, CRC(4dff2ee8) SHA1(bd157d8c168d45e7490a05d5e1e901d9bdda9599) )
  2526: 
  2527: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2528: 	ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) )
  2529: 	ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
  2530: 	ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
  2531: 
  2532: 	ROM_REGION( 0x20000, REGION_GFX2, 0 ) /* sprites */
  2533: 	ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
  2534: 	ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
  2535: 
  2536: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  2537: 	ROM_LOAD( "flpoint.001", 0x0000, 0x8000, CRC(c5b8e0fe) SHA1(6cf8c67151d8604326fc6dbf976c0635b452a844) )	// bootleg rom doesn't work, but should be correct!
  2538: 	/* the below rom is from the original, sound doesn't work with the bootleg rom but the bootleg rom is correct */
  2539: 	ROM_LOAD( "12592.bin",   0x0000, 0x8000, CRC(9a8c11bb) SHA1(399f8e9bdd7aaa4d25817fa9cd4bbf413e5baebe) )	// wrong sound rom? (this ones from the original)
  2540: ROM_END
  2541: 
  2542: 
  2543: ROM_START( fpointbj )
  2544: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  2545: 	ROM_LOAD16_BYTE( "boot2.003", 0x000000, 0x10000, CRC(6c00d1b0) SHA1(fd0c47b8ca010a64d3ef91980f93854ebc98fbda) )
  2546: 	ROM_LOAD16_BYTE( "boot2.002", 0x000001, 0x10000, CRC(c1fcd704) SHA1(697bef464e53fb9891ed15ee2d6210107b693b20) )
  2547: 
  2548: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2549: 	ROM_LOAD( "flpoint.006", 0x00000, 0x10000, CRC(c539727d) SHA1(56674effe1d273128dddd2ff9e02974ec10f3fff) )
  2550: 	ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
  2551: 	ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
  2552: 
  2553: 	ROM_REGION( 0x20000, REGION_GFX2, 0 ) /* sprites */
  2554: 	ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
  2555: 	ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
  2556: 
  2557: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  2558: 	ROM_LOAD( "flpoint.001", 0x0000, 0x8000, CRC(c5b8e0fe) SHA1(6cf8c67151d8604326fc6dbf976c0635b452a844) )	// bootleg rom doesn't work, but should be correct!
  2559: 	/* the below rom is from the original, sound doesn't work with the bootleg rom but the bootleg rom is correct */
  2560: 	ROM_LOAD( "12592.bin",   0x0000, 0x8000, CRC(9a8c11bb) SHA1(399f8e9bdd7aaa4d25817fa9cd4bbf413e5baebe) )	// wrong sound rom? (this ones from the original)
  2561: 
  2562: 	/* stuff below isn't used but loaded because it was on the board .. */
  2563: 	ROM_REGION( 0x0120, REGION_PROMS, 0 )
  2564: 	ROM_LOAD( "82s129.1",  0x0000, 0x0100, CRC(a7c22d96) SHA1(160deae8053b09c09328325246598b3518c7e20b) )
  2565: 	ROM_LOAD( "82s123.2",  0x0100, 0x0020, CRC(58bcf8bd) SHA1(e4d3d179b08c0f3424a6bec0f15058fb1b56f8d8) )
  2566: 
  2567: 	ROM_REGION( 0x800, REGION_USER1, 0 )
  2568: 	ROM_LOAD( "d2716.rom",  0x0000, 0x0800, CRC(d7fd8ac4) SHA1(87e5f1c24350adab129ad79a1f68af402580f8f0) )
  2569: ROM_END
  2570: 
  2571: /***************************************************************************/
  2572: 
  2573: static READ16_HANDLER( fp_io_service_dummy_r ){
  2574: 	int data = readinputport( 2 ) & 0xff;
  2575: 	return (data << 8) + data;
  2576: }
  2577: 
  2578: static MEMORY_READ16_START( fpoint_readmem )
  2579: 	{ 0x000000, 0x01ffff, MRA16_ROM },
  2580: 	{ 0x02002e, 0x020049, fp_io_service_dummy_r },
  2581: 	{ 0x601002, 0x601003, input_port_0_word_r }, // player1
  2582: 	{ 0x601004, 0x601005, input_port_1_word_r }, // player2
  2583: 	{ 0x601000, 0x601001, input_port_2_word_r }, // service
  2584: 	{ 0x600000, 0x600001, input_port_4_word_r }, // dip2
  2585: 	{ 0x600002, 0x600003, input_port_3_word_r }, // dip1
  2586: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  2587: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  2588: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  2589: 	{ 0x44302a, 0x44304d, fp_io_service_dummy_r },
  2590: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  2591: 	{ 0xfe003e, 0xfe003f, fp_io_service_dummy_r },
  2592: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  2593: MEMORY_END
  2594: 
  2595: static MEMORY_WRITE16_START( fpoint_writemem )
  2596: 	{ 0x000000, 0x01ffff, MWA16_ROM },
  2597: 	{ 0x600006, 0x600007, sound_command_w },
  2598: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  2599: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  2600: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  2601: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  2602: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  2603: MEMORY_END
  2604: 
  2605: /***************************************************************************/
  2606: 
  2607: static void fpoint_update_proc( void ){
  2608: 	set_fg_page( sys16_textram[0x740] );
  2609: 	set_bg_page( sys16_textram[0x741] );
  2610: 	sys16_fg_scrolly = sys16_textram[0x748];
  2611: 	sys16_bg_scrolly = sys16_textram[0x749];
  2612: 	sys16_fg_scrollx = sys16_textram[0x74c];
  2613: 	sys16_bg_scrollx = sys16_textram[0x74d];
  2614: }
  2615: 
  2616: static MACHINE_INIT( fpoint ){
  2617: 	sys16_patch_code( 0x454, 0x33 );
  2618: 	sys16_patch_code( 0x455, 0xf8 );
  2619: 	sys16_patch_code( 0x456, 0xe0 );
  2620: 	sys16_patch_code( 0x457, 0xe2 );
  2621: 	sys16_patch_code( 0x8ce8, 0x16 );
  2622: 	sys16_patch_code( 0x8ce9, 0x66 );
  2623: 	sys16_patch_code( 0x17687, 0x00 );
  2624: 	sys16_patch_code( 0x7bed, 0x04 );
  2625: 
  2626: 	sys16_patch_code( 0x7ea8, 0x61 );
  2627: 	sys16_patch_code( 0x7ea9, 0x00 );
  2628: 	sys16_patch_code( 0x7eaa, 0x84 );
  2629: 	sys16_patch_code( 0x7eab, 0x16 );
  2630: 	sys16_patch_code( 0x2c0, 0xe7 );
  2631: 	sys16_patch_code( 0x2c1, 0x48 );
  2632: 	sys16_patch_code( 0x2c2, 0xe7 );
  2633: 	sys16_patch_code( 0x2c3, 0x49 );
  2634: 	sys16_patch_code( 0x2c4, 0x04 );
  2635: 	sys16_patch_code( 0x2c5, 0x40 );
  2636: 	sys16_patch_code( 0x2c6, 0x00 );
  2637: 	sys16_patch_code( 0x2c7, 0x10 );
  2638: 	sys16_patch_code( 0x2c8, 0x4e );
  2639: 	sys16_patch_code( 0x2c9, 0x75 );
  2640: 
  2641: 	sys16_update_proc = fpoint_update_proc;
  2642: }
  2643: 
  2644: static DRIVER_INIT( fpoint ){
  2645: 	machine_init_sys16_onetime();
  2646: }
  2647: 
  2648: static DRIVER_INIT( fpointbl ){
  2649: 	int i;
  2650: 
  2651: 	machine_init_sys16_onetime();
  2652: 
  2653: 	/* invert the graphics bits on the tiles */
  2654: 	for (i = 0; i < 0x30000; i++)
  2655: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  2656: }
  2657: /***************************************************************************/
  2658: 
  2659: INPUT_PORTS_START( fpoint )
  2660: PORT_START
  2661: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
  2662: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 )
  2663: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
  2664: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2665: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  2666: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  2667: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  2668: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  2669: 
  2670: PORT_START
  2671: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  2672: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  2673: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  2674: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2675: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  2676: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  2677: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  2678: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  2679: 
  2680: 	SYS16_SERVICE
  2681: 	SYS16_COINAGE
  2682: 
  2683: PORT_START	/* DSW1 */
  2684: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  2685: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2686: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2687: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2688: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2689: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2690: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  2691: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2692: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2693: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  2694: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2695: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2696: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  2697: 	PORT_DIPSETTING(    0x20, "Easy" )
  2698: 	PORT_DIPSETTING(    0x30, "Normal" )
  2699: 	PORT_DIPSETTING(    0x10, "Hard" )
  2700: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2701: 	PORT_DIPNAME( 0x40, 0x40, "Clear round allowed" ) /* Use button 3 */
  2702: 	PORT_DIPSETTING(    0x00, "1" )
  2703: 	PORT_DIPSETTING(    0x40, "2" )
  2704: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  2705: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  2706: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2707: 
  2708: INPUT_PORTS_END
  2709: 
  2710: INPUT_PORTS_START( fpointbj )
  2711: 	PORT_START
  2712: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
  2713: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 )
  2714: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
  2715: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2716: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  2717: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  2718: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  2719: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  2720: 
  2721: 	PORT_START
  2722: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  2723: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  2724: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  2725: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  2726: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  2727: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  2728: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  2729: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  2730: 
  2731: 	SYS16_SERVICE
  2732: 	SYS16_COINAGE
  2733: 
  2734: 	PORT_START	/* DSW1 */
  2735: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) /* not used according to manual */
  2736: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  2737: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2738: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2739: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2740: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2741: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* not used according to manual */
  2742: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  2743: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2744: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* not used according to manual */
  2745: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  2746: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2747: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  2748: 	PORT_DIPSETTING(    0x20, "Easy" )
  2749: 	PORT_DIPSETTING(    0x30, "Normal" )
  2750: 	PORT_DIPSETTING(    0x10, "Hard" )
  2751: 	PORT_DIPSETTING(    0x00, "Hardest" )
  2752: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) /* not used according to manual */
  2753: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  2754: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2755: 	PORT_DIPNAME( 0x80, 0x80, "2 Cell Move Mode" )
  2756: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  2757: 	PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  2758: 
  2759: INPUT_PORTS_END
  2760: 
  2761: /***************************************************************************/
  2762: 
  2763: static MACHINE_DRIVER_START( fpoint )
  2764: 
  2765: 	/* basic machine hardware */
  2766: 	MDRV_IMPORT_FROM(system16)
  2767: 	MDRV_CPU_MODIFY("main")
  2768: 	MDRV_CPU_MEMORY(fpoint_readmem,fpoint_writemem)
  2769: 
  2770: 	MDRV_MACHINE_INIT(fpoint)
  2771: MACHINE_DRIVER_END
  2772: 
  2773: /***************************************************************************/
  2774: // sys16B
  2775: ROM_START( goldnaxe )
  2776: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  2777: 	ROM_LOAD16_BYTE( "epr12523.a7", 0x00000, 0x20000, CRC(8e6128d7) SHA1(b8de216f4ca08815ca98d39a773024d191d21b4d) )
  2778: 	ROM_LOAD16_BYTE( "epr12522.a5", 0x00001, 0x20000, CRC(b6c35160) SHA1(88015d0a486f56911360362c96a82f36a13de886) )
  2779: 	/* empty 0x40000 - 0x80000 */
  2780: 	ROM_LOAD16_BYTE( "epr12521.a8", 0x80000, 0x20000, CRC(5001d713) SHA1(68cf3f48d6e440e5b800503a211adda02107d956) )
  2781: 	ROM_LOAD16_BYTE( "epr12519.a6", 0x80001, 0x20000, CRC(4438ca8e) SHA1(0af53d64f06abf41f4c46540d28d5f008a4835a3) )
  2782: 
  2783: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2784: 	ROM_LOAD( "epr12385", 0x00000, 0x20000, CRC(b8a4e7e0) SHA1(9b36f50209d45a835ded53eb045f63c649b02fc9) )
  2785: 	ROM_LOAD( "epr12386", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) )
  2786: 	ROM_LOAD( "epr12387", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) )
  2787: 
  2788: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  2789: 	ROM_LOAD16_BYTE( "mpr12378.b1", 0x000001, 0x40000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) )
  2790: 	ROM_LOAD16_BYTE( "mpr12379.b4", 0x000000, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  2791: 	ROM_LOAD16_BYTE( "mpr12380.b2", 0x080001, 0x40000, CRC(bb2c0853) SHA1(3f3b546d078f22d787c93ee74d9ad3a6e84383ac) )
  2792: 	ROM_LOAD16_BYTE( "mpr12381.b5", 0x080000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  2793: 	ROM_LOAD16_BYTE( "mpr12382.b3", 0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  2794: 	ROM_LOAD16_BYTE( "mpr12383.b6", 0x100000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  2795: 
  2796: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  2797: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  2798: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  2799: ROM_END
  2800: 
  2801: ROM_START( goldnaxj )
  2802: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  2803: // Custom cpu 317-0121
  2804: 	ROM_LOAD16_BYTE( "epr12540.a7", 0x00000, 0x20000, CRC(0c7ccc6d) SHA1(25bc29eee731befc665472c2c1998cac8447cc21) )
  2805: 	ROM_LOAD16_BYTE( "epr12539.a5", 0x00001, 0x20000, CRC(1f24f7d0) SHA1(a09cdf394c03069707f7ed400b8fbdc13674fa74) )
  2806: 	/* emtpy 0x40000 - 0x80000 */
  2807: 	ROM_LOAD16_BYTE( "epr12521.a8", 0x80000, 0x20000, CRC(5001d713) SHA1(68cf3f48d6e440e5b800503a211adda02107d956) )
  2808: 	ROM_LOAD16_BYTE( "epr12519.a6", 0x80001, 0x20000, CRC(4438ca8e) SHA1(0af53d64f06abf41f4c46540d28d5f008a4835a3) )
  2809: 
  2810: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2811: 	ROM_LOAD( "epr12385", 0x00000, 0x20000, CRC(b8a4e7e0) SHA1(9b36f50209d45a835ded53eb045f63c649b02fc9) )
  2812: 	ROM_LOAD( "epr12386", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) )
  2813: 	ROM_LOAD( "epr12387", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) )
  2814: 
  2815: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  2816: 	ROM_LOAD16_BYTE( "mpr12378.b1", 0x000001, 0x40000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) )
  2817: 	ROM_LOAD16_BYTE( "mpr12379.b4", 0x000000, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  2818: 	ROM_LOAD16_BYTE( "mpr12380.b2", 0x080001, 0x40000, CRC(bb2c0853) SHA1(3f3b546d078f22d787c93ee74d9ad3a6e84383ac) )
  2819: 	ROM_LOAD16_BYTE( "mpr12381.b5", 0x080000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  2820: 	ROM_LOAD16_BYTE( "mpr12382.b3", 0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  2821: 	ROM_LOAD16_BYTE( "mpr12383.b6", 0x100000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  2822: 
  2823: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  2824: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  2825: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  2826: ROM_END
  2827: 
  2828: 
  2829: ROM_START( goldnabl )
  2830: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  2831: // protected code
  2832: 	ROM_LOAD16_BYTE( "ga6.a22", 0x00000, 0x10000, CRC(f95b459f) SHA1(dadf66d63454ed62fefa521d4fed249d28c63778) )
  2833: 	ROM_LOAD16_BYTE( "ga4.a20", 0x00001, 0x10000, CRC(83eabdf5) SHA1(1effef966f513fbdec2026d535658e17ef7dea51) )
  2834: 	ROM_LOAD16_BYTE( "ga11.a27",0x20000, 0x10000, CRC(f4ef9349) SHA1(3ffa335e74ffbc10f80387268da659643c566897) )
  2835: 	ROM_LOAD16_BYTE( "ga8.a24", 0x20001, 0x10000, CRC(37a65839) SHA1(6e8055d91b840afd8526041d3752c0a55eaebe0c) )
  2836: 	/* emtpy 0x40000 - 0x80000 */
  2837: 	ROM_LOAD16_BYTE( "epr12521.a8", 0x80000, 0x20000, CRC(5001d713) SHA1(68cf3f48d6e440e5b800503a211adda02107d956) )
  2838: 	ROM_LOAD16_BYTE( "epr12519.a6", 0x80001, 0x20000, CRC(4438ca8e) SHA1(0af53d64f06abf41f4c46540d28d5f008a4835a3) )
  2839: 
  2840: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  2841: 	ROM_LOAD( "ga33.b16", 0x00000, 0x10000, CRC(84587263) SHA1(3a88c8578a477a487a0a214a367042b9739f39eb) )
  2842: 	ROM_LOAD( "ga32.b15", 0x10000, 0x10000, CRC(63d72388) SHA1(ba0a582b1daf3a1e316237efbad17fcc0381643f) )
  2843: 	ROM_LOAD( "ga31.b14", 0x20000, 0x10000, CRC(f8b6ae4f) SHA1(55132c98955107e4b247992f7917a6ce588460a7) )
  2844: 	ROM_LOAD( "ga30.b13", 0x30000, 0x10000, CRC(e29baf4f) SHA1(3761cb2217599fe3f2f860f9395930b96ec52f47) )
  2845: 	ROM_LOAD( "ga29.b12", 0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) )
  2846: 	ROM_LOAD( "ga28.b11", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) )
  2847: 
  2848: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  2849: 	/* wrong! */
  2850: 	ROM_LOAD16_BYTE( "ga34.b17", 		0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) )
  2851: 	ROM_LOAD16_BYTE( "ga35.b18", 		0x010000, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) )
  2852: 	ROM_LOAD16_BYTE( "ga23.a14", 		0x020001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) )
  2853: 	ROM_LOAD16_BYTE( "ga18.a9",  		0x030000, 0x10000, CRC(de346006) SHA1(65aa489373b6d2cccbb024f13fc190a7cae86274) )
  2854: 	ROM_LOAD16_BYTE( "mpr12379.b4", 	0x040001, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  2855: 	ROM_LOAD16_BYTE( "ga36.b19", 		0x080000, 0x10000, CRC(101d2fff) SHA1(1de1390c5f55f192491053c8aac31be3389aab2b) )
  2856: 	ROM_LOAD16_BYTE( "ga37.b20", 		0x090001, 0x10000, CRC(677e64a6) SHA1(e3d0d31097017c6cb1a7f41292783f18ce13b41c) )
  2857: 	ROM_LOAD16_BYTE( "ga19.a10", 		0x0a0000, 0x10000, CRC(11794d05) SHA1(eef52d7a644dbcc5f983222f163445a725286a32) )
  2858: 	ROM_LOAD16_BYTE( "ga20.a11", 		0x0b0001, 0x10000, CRC(ad1c1c90) SHA1(155f17593cfab1a117bb755b1edd0c473d455f91) )
  2859: 	ROM_LOAD16_BYTE( "mpr12381.b5",	0x0c0000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  2860: 	ROM_LOAD16_BYTE( "mpr12382.b3",	0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  2861: 	ROM_LOAD16_BYTE( "mpr12383.b6",	0x140000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  2862: 
  2863: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  2864: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  2865: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  2866: ROM_END
  2867: 
  2868: 
  2869: /***************************************************************************/
  2870: 
  2871: static READ16_HANDLER( goldnaxe_skip_r ){
  2872: 	if (activecpu_get_pc()==0x3cb0) {cpu_spinuntil_int(); return 0xffff;}
  2873: 	return sys16_workingram[0x2c1c/2];
  2874: }
  2875: 
  2876: static READ16_HANDLER( ga_io_players_r ) {
  2877: 	return (readinputport(0) << 8) | readinputport(1);
  2878: }
  2879: static READ16_HANDLER( ga_io_service_r ){
  2880: 	return (input_port_2_word_r(0,0) << 8) | (sys16_workingram[0x2c96/2] & 0x00ff);
  2881: }
  2882: 
  2883: static MEMORY_READ16_START( goldnaxe_readmem )
  2884: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  2885: 	{ 0x100000, 0x10ffff, SYS16_MRA16_TILERAM },
  2886: 	{ 0x110000, 0x110fff, SYS16_MRA16_TEXTRAM },
  2887: 	{ 0x140000, 0x140fff, SYS16_MRA16_PALETTERAM },
  2888: 	{ 0x1f0000, 0x1f0003, SYS16_MRA16_EXTRAM },
  2889: 	{ 0x200000, 0x200fff, SYS16_MRA16_SPRITERAM },
  2890: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  2891: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  2892: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  2893: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  2894: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  2895: 	{ 0xffecd0, 0xffecd1, ga_io_players_r },
  2896: 	{ 0xffec96, 0xffec97, ga_io_service_r },
  2897: 	{ 0xffec1c, 0xffec1d, goldnaxe_skip_r },
  2898: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  2899: MEMORY_END
  2900: 
  2901: static WRITE16_HANDLER( ga_sound_command_w ){
  2902: 	COMBINE_DATA( &sys16_workingram[(0xecfc-0xc000)/2] );
  2903: 	if( ACCESSING_MSB ){
  2904: 		soundlatch_w( 0,data>>8 );
  2905: 		cpu_set_irq_line( 1, 0, HOLD_LINE );
  2906: 	}
  2907: }
  2908: 
  2909: static WRITE16_HANDLER( goldnaxe_prot_w ){
  2910: 	sys16_workingram[(0xecd8 - 0xc000)/2] = 0x048c;
  2911: 	sys16_workingram[(0xecda - 0xc000)/2] = 0x159d;
  2912: 	sys16_workingram[(0xecdc - 0xc000)/2] = 0x26ae;
  2913: 	sys16_workingram[(0xecde - 0xc000)/2] = 0x37bf;
  2914: 	COMBINE_DATA( &sys16_workingram[(0xec1c-0xc000)/2] );
  2915: }
  2916: 
  2917: static MEMORY_WRITE16_START( goldnaxe_writemem )
  2918: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  2919: 	{ 0x100000, 0x10ffff, SYS16_MWA16_TILERAM },
  2920: 	{ 0x110000, 0x110fff, SYS16_MWA16_TEXTRAM },
  2921: 	{ 0x140000, 0x140fff, SYS16_MWA16_PALETTERAM },
  2922: 	{ 0x1f0000, 0x1f0003, SYS16_MWA16_EXTRAM },
  2923: 	{ 0x200000, 0x200fff, SYS16_MWA16_SPRITERAM },
  2924: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  2925: 	{ 0xc43000, 0xc43001, MWA16_NOP }, // ?
  2926: //	{ 0xfe0006, 0xfe0007, MWA16_NOP }, I think this is the real sound out
  2927: 	{ 0xffec1c, 0xffec1d, goldnaxe_prot_w },// how does this really work?
  2928: 	{ 0xffecfc, 0xffecfd, ga_sound_command_w },// probably just a buffer
  2929: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM }, /* fails SCRATCH RAM test because of hacks */
  2930: //	{ 0xfffc00, 0xffffff, MWA15_NOP }, /* 0x400 bytes; battery backed up */
  2931: MEMORY_END
  2932: 
  2933: /***************************************************************************/
  2934: 
  2935: static void goldnaxe_update_proc( void ){
  2936: 	set_fg_page( sys16_textram[0x740] );
  2937: 	set_bg_page( sys16_textram[0x741] );
  2938: 	sys16_fg_scrolly = sys16_textram[0x748];
  2939: 	sys16_bg_scrolly = sys16_textram[0x749];
  2940: 	sys16_fg_scrollx = sys16_textram[0x74c];
  2941: 	sys16_bg_scrollx = sys16_textram[0x74d];
  2942: 
  2943: 	set_tile_bank( sys16_workingram[0x2c94/2] );
  2944: }
  2945: 
  2946: static MACHINE_INIT( goldnaxe ){
  2947: 	static int bank[16] = {
  2948: 		0,1,4,5,
  2949: 		8,9,0,0,
  2950: 		2,3,6,7,
  2951: 		10,11,0,0
  2952: 	};
  2953: 	sys16_obj_bank = bank;
  2954: 
  2955: // protection patch; no longer needed
  2956: //	sys16_patch_code( 0x3CB2, 0x60 );
  2957: //	sys16_patch_code( 0x3CB3, 0x1e );
  2958: 
  2959: 	sys16_sprxoffset = -0xb8;
  2960: 	sys16_update_proc = goldnaxe_update_proc;
  2961: }
  2962: 
  2963: static DRIVER_INIT( goldnaxe ){
  2964: 	machine_init_sys16_onetime();
  2965: }
  2966: 
  2967: static DRIVER_INIT( goldnabl ){
  2968: 	int i;
  2969: 
  2970: 	machine_init_sys16_onetime();
  2971: 
  2972: 	/* invert the graphics bits on the tiles */
  2973: 	for (i = 0; i < 0x60000; i++)
  2974: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  2975: }
  2976: 
  2977: /***************************************************************************/
  2978: 
  2979: INPUT_PORTS_START( goldnaxe )
  2980: 	SYS16_JOY1
  2981: 	SYS16_JOY2
  2982: 	SYS16_SERVICE
  2983: 	SYS16_COINAGE
  2984: 
  2985: PORT_START	/* DSW1 */
  2986: 	PORT_DIPNAME( 0x01, 0x01, "Credits needed" )
  2987: 	PORT_DIPSETTING(    0x01, "1 to start, 1 to continue" )
  2988: 	PORT_DIPSETTING(    0x00, "2 to start, 1 to continue" )
  2989: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  2990: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  2991: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  2992: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  2993: 	PORT_DIPSETTING(    0x08, "1" )
  2994: 	PORT_DIPSETTING(    0x0c, "2" )
  2995: 	PORT_DIPSETTING(    0x04, "3" )
  2996: 	PORT_DIPSETTING(    0x00, "5" )
  2997: 	PORT_DIPNAME( 0x30, 0x30, "Energy Meter" )
  2998: 	PORT_DIPSETTING(    0x20, "2" )
  2999: 	PORT_DIPSETTING(    0x30, "3" )
  3000: 	PORT_DIPSETTING(    0x10, "4" )
  3001: 	PORT_DIPSETTING(    0x00, "5" )
  3002: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  3003: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  3004: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3005: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  3006: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  3007: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3008: INPUT_PORTS_END
  3009: 
  3010: /***************************************************************************/
  3011: 
  3012: static MACHINE_DRIVER_START( goldnaxe )
  3013: 
  3014: 	/* basic machine hardware */
  3015: 	MDRV_IMPORT_FROM(system16_7759)
  3016: 	MDRV_CPU_MODIFY("main")
  3017: 	MDRV_CPU_MEMORY(goldnaxe_readmem,goldnaxe_writemem)
  3018: 
  3019: 	MDRV_MACHINE_INIT(goldnaxe)
  3020: MACHINE_DRIVER_END
  3021: 
  3022: /***************************************************************************/
  3023: // sys16B
  3024: ROM_START( goldnaxa )
  3025: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  3026: 	ROM_LOAD16_BYTE( "epr12545.a2", 0x00000, 0x40000, CRC(a97c4e4d) SHA1(41cda15ae56185725233db669d9f8c4a8c1eb1c3) )
  3027: 	ROM_LOAD16_BYTE( "epr12544.a1", 0x00001, 0x40000, CRC(5e38f668) SHA1(3b15a9a30adde6e852c439c8e6e45875b66252cb) )
  3028: 
  3029: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3030: 	ROM_LOAD( "epr12385", 0x00000, 0x20000, CRC(b8a4e7e0) SHA1(9b36f50209d45a835ded53eb045f63c649b02fc9) )
  3031: 	ROM_LOAD( "epr12386", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) )
  3032: 	ROM_LOAD( "epr12387", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) )
  3033: 
  3034: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  3035: 	ROM_LOAD16_BYTE( "mpr12378.b1", 0x000001, 0x40000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) )
  3036: 	ROM_LOAD16_BYTE( "mpr12379.b4", 0x000000, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  3037: 	ROM_LOAD16_BYTE( "mpr12380.b2", 0x080001, 0x40000, CRC(bb2c0853) SHA1(3f3b546d078f22d787c93ee74d9ad3a6e84383ac) )
  3038: 	ROM_LOAD16_BYTE( "mpr12381.b5", 0x080000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  3039: 	ROM_LOAD16_BYTE( "mpr12382.b3", 0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  3040: 	ROM_LOAD16_BYTE( "mpr12383.b6", 0x100000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  3041: 
  3042: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  3043: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  3044: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  3045: ROM_END
  3046: 
  3047: ROM_START( goldnaxb )
  3048: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  3049: // Custom 68000 ver 317-0110
  3050: 	ROM_LOAD16_BYTE( "epr12389.a2", 0x00000, 0x40000, CRC(35d5fa77) SHA1(b16b312eb1c91c412fee61002599812e30e321ee) )
  3051: 	ROM_LOAD16_BYTE( "epr12388.a1", 0x00001, 0x40000, CRC(72952a93) SHA1(b31888429ad81388a96333dc0b2c7e2223134834) )
  3052: 
  3053: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3054: 	ROM_LOAD( "epr12385", 0x00000, 0x20000, CRC(b8a4e7e0) SHA1(9b36f50209d45a835ded53eb045f63c649b02fc9) )
  3055: 	ROM_LOAD( "epr12386", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) )
  3056: 	ROM_LOAD( "epr12387", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) )
  3057: 
  3058: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  3059: 	ROM_LOAD16_BYTE( "mpr12378.b1", 0x000001, 0x40000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) )
  3060: 	ROM_LOAD16_BYTE( "mpr12379.b4", 0x000000, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  3061: 	ROM_LOAD16_BYTE( "mpr12380.b2", 0x080001, 0x40000, CRC(bb2c0853) SHA1(3f3b546d078f22d787c93ee74d9ad3a6e84383ac) )
  3062: 	ROM_LOAD16_BYTE( "mpr12381.b5", 0x080000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  3063: 	ROM_LOAD16_BYTE( "mpr12382.b3", 0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  3064: 	ROM_LOAD16_BYTE( "mpr12383.b6", 0x100000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  3065: 
  3066: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  3067: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  3068: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  3069: ROM_END
  3070: 
  3071: ROM_START( goldnaxc )
  3072: 	ROM_REGION( 0x0c0000, REGION_CPU1, 0 ) /* 68000 code */
  3073: // Custom 68000 ver 317-0122
  3074: 	ROM_LOAD16_BYTE( "epr12543.a2", 0x00000, 0x40000, CRC(b0df9ca4) SHA1(240f3c2998f969569d992f796e006f5ea4434e55) )
  3075: 	ROM_LOAD16_BYTE( "epr12542.a1", 0x00001, 0x40000, CRC(b7994d3c) SHA1(87570f23826922fca465c69df6b892c59f14e103) )
  3076: 
  3077: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3078: 	ROM_LOAD( "epr12385", 0x00000, 0x20000, CRC(b8a4e7e0) SHA1(9b36f50209d45a835ded53eb045f63c649b02fc9) )
  3079: 	ROM_LOAD( "epr12386", 0x20000, 0x20000, CRC(25d7d779) SHA1(2de14a76a5176d5abc7e7f7f723146c620927610) )
  3080: 	ROM_LOAD( "epr12387", 0x40000, 0x20000, CRC(c7fcadf3) SHA1(5f0fd600a75a02749935af21e1e0d2c714c6417e) )
  3081: 
  3082: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  3083: 	ROM_LOAD16_BYTE( "mpr12378.b1", 0x000001, 0x40000, CRC(119e5a82) SHA1(261ed2bc4ebac7142e2ecca9f03c91242e792a98) )
  3084: 	ROM_LOAD16_BYTE( "mpr12379.b4", 0x000000, 0x40000, CRC(1a0e8c57) SHA1(674f1ae7db632876fff346e76786801ae19d9799) )
  3085: 	ROM_LOAD16_BYTE( "mpr12380.b2", 0x080001, 0x40000, CRC(bb2c0853) SHA1(3f3b546d078f22d787c93ee74d9ad3a6e84383ac) )
  3086: 	ROM_LOAD16_BYTE( "mpr12381.b5", 0x080000, 0x40000, CRC(81ba6ecc) SHA1(7f59e4d86a192b97e92729371b78c3f1c784a0b5) )
  3087: 	ROM_LOAD16_BYTE( "mpr12382.b3", 0x100001, 0x40000, CRC(81601c6f) SHA1(604bc5613c6c734a06860303ba36d61bb54508a0) )
  3088: 	ROM_LOAD16_BYTE( "mpr12383.b6", 0x100000, 0x40000, CRC(5dbacf7a) SHA1(236866fb94672b13cbb2cb479324e61de87eeb34) )
  3089: 
  3090: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  3091: 	ROM_LOAD( "epr12390",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
  3092: 	ROM_LOAD( "mpr12384.a11", 0x10000, 0x20000, CRC(6218d8e7) SHA1(5a745c750efb4a61716f99befb7ed14cc84e9973) )
  3093: ROM_END
  3094: 
  3095: 
  3096: /***************************************************************************/
  3097: 
  3098: static READ16_HANDLER( goldnaxa_skip_r ){
  3099: 	if (activecpu_get_pc()==0x3ca0) {cpu_spinuntil_int(); return 0xffff;}
  3100: 	return sys16_workingram[0x2c1c/2];
  3101: }
  3102: 
  3103: // This version has somekind of hardware comparitor for collision detection,
  3104: // and a hardware multiplier.
  3105: static data16_t ga_hardware_collision_data[5];
  3106: static WRITE16_HANDLER( ga_hardware_collision_w )
  3107: {
  3108: 	static int bit=1;
  3109: //TBA
  3110: //	COMBINE_DATA( &ga_hardware_collision_data );
  3111: 	if( offset==4/2 ){
  3112: 		if( ga_hardware_collision_data[2] <= ga_hardware_collision_data[0] &&
  3113: 			ga_hardware_collision_data[2] >= ga_hardware_collision_data[1])
  3114: 		{
  3115: 			ga_hardware_collision_data[4] |=bit;
  3116: 		}
  3117: 		bit=bit<<1;
  3118: 	}
  3119: 	else if( offset==8/2 ) bit=1;
  3120: }
  3121: 
  3122: static READ16_HANDLER( ga_hardware_collision_r ){
  3123: 	return ga_hardware_collision_data[4];
  3124: }
  3125: 
  3126: static int ga_hardware_multiplier_data[4];
  3127: static WRITE16_HANDLER( ga_hardware_multiplier_w ){
  3128: //TBA
  3129: //	COMBINE_DATA( &ga_hardware_multiplier_data );
  3130: }
  3131: 
  3132: static READ16_HANDLER( ga_hardware_multiplier_r ){
  3133: 	if(offset==6/2)
  3134: 		return ga_hardware_multiplier_data[0] * ga_hardware_multiplier_data[1];
  3135: 	else
  3136: 		return ga_hardware_multiplier_data[offset];
  3137: }
  3138: 
  3139: static MEMORY_READ16_START( goldnaxa_readmem )
  3140: 	{ 0x000000, 0x07ffff, MRA16_ROM },
  3141: 	{ 0x100000, 0x10ffff, SYS16_MRA16_TILERAM },
  3142: 	{ 0x110000, 0x110fff, SYS16_MRA16_TEXTRAM },
  3143: 	{ 0x140000, 0x140fff, SYS16_MRA16_PALETTERAM },
  3144: 	{ 0x1e0008, 0x1e0009, ga_hardware_collision_r },
  3145: 	{ 0x1f0000, 0x1f0007, ga_hardware_multiplier_r },
  3146: 	{ 0x1f1008, 0x1f1009, ga_hardware_collision_r },
  3147: 	{ 0x1f2000, 0x1f2003, SYS16_MRA16_EXTRAM },
  3148: 	{ 0x200000, 0x200fff, SYS16_MRA16_SPRITERAM },
  3149: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  3150: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  3151: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  3152: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  3153: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  3154: 	{ 0xffecd0, 0xffecd1, ga_io_players_r },
  3155: 	{ 0xffec96, 0xffec97, ga_io_service_r },
  3156: 	{ 0xffec1c, 0xffec1d, goldnaxa_skip_r },
  3157: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  3158: MEMORY_END
  3159: 
  3160: static MEMORY_WRITE16_START( goldnaxa_writemem )
  3161: 	{ 0x000000, 0x07ffff, MWA16_ROM },
  3162: 	{ 0x100000, 0x10ffff, SYS16_MWA16_TILERAM },
  3163: 	{ 0x110000, 0x110fff, SYS16_MWA16_TEXTRAM },
  3164: 	{ 0x140000, 0x140fff, SYS16_MWA16_PALETTERAM },
  3165: 	{ 0x1e0000, 0x1e0009, ga_hardware_collision_w },
  3166: 	{ 0x1f0000, 0x1f0003, ga_hardware_multiplier_w },
  3167: 	{ 0x1f1000, 0x1f1009, ga_hardware_collision_w },
  3168: 	{ 0x1f2000, 0x1f2003, SYS16_MWA16_EXTRAM },
  3169: 	{ 0x200000, 0x200fff, SYS16_MWA16_SPRITERAM },
  3170: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  3171: 	{ 0xffecfc, 0xffecfd, ga_sound_command_w },
  3172: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  3173: MEMORY_END
  3174: 
  3175: /***************************************************************************/
  3176: 
  3177: static void goldnaxa_update_proc( void ){
  3178: 	set_fg_page( sys16_textram[0x740] );
  3179: 	set_bg_page( sys16_textram[0x741] );
  3180: 	sys16_fg_scrolly = sys16_textram[0x748];
  3181: 	sys16_bg_scrolly = sys16_textram[0x749];
  3182: 	sys16_fg_scrollx = sys16_textram[0x74c];
  3183: 	sys16_bg_scrollx = sys16_textram[0x74d];
  3184: 
  3185: 	set_tile_bank( sys16_workingram[0x2c94/2] );
  3186: }
  3187: 
  3188: static MACHINE_INIT( goldnaxa ){
  3189: 	static int bank[16] = {
  3190: 		0,1,4,5,
  3191: 		8,9,0,0,
  3192: 		2,3,6,7,
  3193: 		10,11,0,0
  3194: 	};
  3195: 	sys16_obj_bank = bank;
  3196: 	//?
  3197: 	sys16_patch_code( 0x3CA2, 0x60 );
  3198: 	sys16_patch_code( 0x3CA3, 0x1e );
  3199: 	sys16_sprxoffset = -0xb8;
  3200: 	sys16_update_proc = goldnaxa_update_proc;
  3201: }
  3202: 
  3203: /***************************************************************************/
  3204: 
  3205: static MACHINE_DRIVER_START( goldnaxa )
  3206: 
  3207: 	/* basic machine hardware */
  3208: 	MDRV_IMPORT_FROM(system16_7759)
  3209: 	MDRV_CPU_MODIFY("main")
  3210: 	MDRV_CPU_MEMORY(goldnaxa_readmem,goldnaxa_writemem)
  3211: 
  3212: 	MDRV_MACHINE_INIT(goldnaxa)
  3213: MACHINE_DRIVER_END
  3214: 
  3215: /***************************************************************************/
  3216: // sys16B
  3217: ROM_START( hwchamp )
  3218: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
  3219: 	ROM_LOAD16_BYTE( "rom0-e.bin", 0x000000, 0x20000, CRC(e5abfed7) SHA1(1f875dbaf8665c1dbfe336470580361b18a8ed4e) )
  3220: 	ROM_LOAD16_BYTE( "rom0-o.bin", 0x000001, 0x20000, CRC(25180124) SHA1(77b414f8cd88270713c57bddadec5d8dca490e86) )
  3221: 
  3222: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3223: 	ROM_LOAD( "scr01.bin", 0x00000, 0x20000, CRC(fc586a86) SHA1(2c26ef3ab94089940add3be9952804a6e62f5113) )
  3224: 	ROM_LOAD( "scr11.bin", 0x20000, 0x20000, CRC(aeaaa9d8) SHA1(6b7e5320f515c1c35445d3320b3edaef911191e1) )
  3225: 	ROM_LOAD( "scr02.bin", 0x40000, 0x20000, CRC(7715a742) SHA1(e6040ff0e9c68f3f502e5f6d7e7ca04b14059752) )
  3226: 	ROM_LOAD( "scr12.bin", 0x60000, 0x20000, CRC(63a82afa) SHA1(a02bbb6dd84cdf7cdab8e738c6927f5b1e3fcad5) )
  3227: 	ROM_LOAD( "scr03.bin", 0x80000, 0x20000, CRC(f30cd5fd) SHA1(df6118ca4b724c37b11e18d9f2ea18e9591ae7aa) )
  3228: 	ROM_LOAD( "scr13.bin", 0xA0000, 0x20000, CRC(5b8494a8) SHA1(9e3f09f4037a007b6a188dd81ec8f9c635e87650) )
  3229: 
  3230: 	ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* sprites */
  3231: 	ROM_LOAD16_BYTE( "obj0-o.bin", 0x000001, 0x020000, CRC(fc098a13) SHA1(b4a6e00d4765265bad170dabf0b2a4a58e063b16) )
  3232: 	ROM_LOAD16_BYTE( "obj0-e.bin", 0x000000, 0x020000, CRC(5db934a8) SHA1(ba7cc93025af71ad2674b1376b61afbb7ae910ff) )
  3233: 	ROM_LOAD16_BYTE( "obj1-o.bin", 0x040001, 0x020000, CRC(1f27ee74) SHA1(a60d50a4f501623187c067a3c17bff49151ca3b2) )
  3234: 	ROM_LOAD16_BYTE( "obj1-e.bin", 0x040000, 0x020000, CRC(8a6a5cf1) SHA1(28b22aa326682ef3b54891dda7aa9a432da12a4d) )
  3235: 	ROM_LOAD16_BYTE( "obj2-o.bin", 0x080001, 0x020000, CRC(c0b2ba82) SHA1(30349c86a99bbe3dfb423027ad534a9333e27679) )
  3236: 	ROM_LOAD16_BYTE( "obj2-e.bin", 0x080000, 0x020000, CRC(d6c7917b) SHA1(8b313a5634c14f4c90bfa9f9616d600283f72768) )
  3237: 	ROM_LOAD16_BYTE( "obj3-o.bin", 0x0c0001, 0x020000, CRC(52fa3a49) SHA1(c2331af630d86a111cdaf21556d9df23d1471f53) )
  3238: 	ROM_LOAD16_BYTE( "obj3-e.bin", 0x0c0000, 0x020000, CRC(57e8f9d2) SHA1(1804677820d05a421120660f91e3a5f1df1e6a8d) )
  3239: 
  3240: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  3241: 	ROM_LOAD( "s-prog.bin", 0x0000, 0x8000, CRC(96a12d9d) SHA1(f4ba70c3b5d80a1b6a187c940b922d5182d5ab12) )
  3242: 
  3243: 	ROM_LOAD( "speech0.bin", 0x10000, 0x20000, CRC(4191c03d) SHA1(40809fb80527980015d3b5c4ca7cf159bc09cf5a) )
  3244: 	ROM_LOAD( "speech1.bin", 0x30000, 0x20000, CRC(a4d53f7b) SHA1(71123a8ecfa093897c6f2bb7312e6c755be14521) )
  3245: ROM_END
  3246: 
  3247: /***************************************************************************/
  3248: 
  3249: static int hwc_handles_shifts[3];
  3250: 
  3251: static WRITE16_HANDLER( hwc_io_handles_w ){
  3252: 	hwc_handles_shifts[offset]=7;
  3253: }
  3254: 
  3255: static READ16_HANDLER( hwc_io_handles_r ){
  3256: 	static int dodge_toggle=0;
  3257: 	int data=0,ret;
  3258: 	if(offset==0){
  3259: 		// monitor
  3260: 		data=input_port_0_r( offset );
  3261: 		if(input_port_1_r( offset ) & 4){
  3262: 			if(dodge_toggle) data=0x38; else data=0x60;
  3263: 		}
  3264: 		if(input_port_1_r( offset ) & 8){
  3265: 			if(dodge_toggle) data=0xc8; else data=0xa0;
  3266: 		}
  3267: 		if(input_port_1_r( offset ) & 0x10){
  3268: 			if(dodge_toggle) data=0xff; else data=0xe0;
  3269: 		}
  3270: 		if(input_port_1_r( offset ) & 0x20){
  3271: 			if(dodge_toggle) data=0x0; else data=0x20;
  3272: 		}
  3273: 		if( hwc_handles_shifts[offset]==0) dodge_toggle^=1;
  3274: 	}
  3275: 	else if(offset==1){
  3276: 		// left handle
  3277: 		if(input_port_1_r( offset ) & 1) data=0xff;
  3278: 	}
  3279: 	else {
  3280: 		// right handle
  3281: 		if(input_port_1_r( offset ) & 2) data=0xff;
  3282: 	}
  3283: 
  3284: 	ret = data>>hwc_handles_shifts[offset];
  3285: 	hwc_handles_shifts[offset]--;
  3286: 	return ret;
  3287: }
  3288: 
  3289: static WRITE16_HANDLER( hwc_ctrl1_w ){
  3290: 	if( ACCESSING_LSB ){
  3291: 		sys16_refreshenable = data & 0x20;
  3292: 		coin_counter_w(0,data & 0x01);
  3293: 		set_led_status(0,data & 0x04);
  3294: 		/* bit 6 is also used (always 1?) */
  3295: 	}
  3296: }
  3297: 
  3298: static WRITE16_HANDLER( hwc_ctrl2_w ){
  3299: 	if( ACCESSING_LSB ){
  3300: 		/* bit 4 is GONG */
  3301: //		if (data & 0x10) usrintf_showmessage("GONG");
  3302: 		/* are the following really lamps? */
  3303: //		set_led_status(1,data & 0x20);
  3304: //		set_led_status(2,data & 0x40);
  3305: //		set_led_status(3,data & 0x80);
  3306: 	}
  3307: }
  3308: 
  3309: static MEMORY_READ16_START( hwchamp_readmem )
  3310: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  3311: 	{ 0x3f0000, 0x3fffff, SYS16_MRA16_EXTRAM },
  3312: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  3313: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  3314: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  3315: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  3316: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  3317: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  3318: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  3319: 	{ 0xc43020, 0xc43025, hwc_io_handles_r },
  3320: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  3321: MEMORY_END
  3322: 
  3323: static MEMORY_WRITE16_START( hwchamp_writemem )
  3324: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  3325: 	{ 0x3f0000, 0x3fffff, SYS16_MWA16_EXTRAM },
  3326: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  3327: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  3328: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  3329: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  3330: 	{ 0xc40000, 0xc40001, hwc_ctrl1_w },
  3331: 	{ 0xc43020, 0xc43025, hwc_io_handles_w },
  3332: 	{ 0xc43034, 0xc43035, hwc_ctrl2_w },
  3333: 	{ 0xfe0006, 0xfe0007, sound_command_w },
  3334: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  3335: MEMORY_END
  3336: 
  3337: /***************************************************************************/
  3338: 
  3339: static void hwchamp_update_proc( void ){
  3340: 	set_fg_page( sys16_textram[0x740] );
  3341: 	set_bg_page( sys16_textram[0x741] );
  3342: 	sys16_fg_scrolly = sys16_textram[0x748];
  3343: 	sys16_bg_scrolly = sys16_textram[0x749];
  3344: 	sys16_fg_scrollx = sys16_textram[0x74c];
  3345: 	sys16_bg_scrollx = sys16_textram[0x74d];
  3346: 
  3347: 	sys16_tile_bank0 = sys16_extraram[0]&0xf;
  3348: 	sys16_tile_bank1 = sys16_extraram[1]&0xf;
  3349: }
  3350: 
  3351: static MACHINE_INIT( hwchamp ){
  3352: 	sys16_spritelist_end=0xc000;
  3353: 	sys16_update_proc = hwchamp_update_proc;
  3354: }
  3355: 
  3356: static DRIVER_INIT( hwchamp )
  3357: {
  3358: 	machine_init_sys16_onetime();
  3359: }
  3360: /***************************************************************************/
  3361: 
  3362: INPUT_PORTS_START( hwchamp )
  3363: 
  3364: PORT_START	/* Monitor */
  3365: 	PORT_ANALOG( 0xff, 0x80, IPT_PADDLE  , 70, 4, 0x0, 0xff )
  3366: 
  3367: PORT_START	/* Handles (Fake) */
  3368: 	PORT_BITX(0x01, 0, IPT_BUTTON1, IP_NAME_DEFAULT, KEYCODE_F, IP_JOY_NONE ) // right hit
  3369: 	PORT_BITX(0x02, 0, IPT_BUTTON2, IP_NAME_DEFAULT, KEYCODE_D, IP_JOY_NONE ) // left hit
  3370: 	PORT_BITX(0x04, 0, IPT_BUTTON3, IP_NAME_DEFAULT, KEYCODE_B, IP_JOY_NONE ) // right dodge
  3371: 	PORT_BITX(0x08, 0, IPT_BUTTON4, IP_NAME_DEFAULT, KEYCODE_Z, IP_JOY_NONE ) // left dodge
  3372: 	PORT_BITX(0x10, 0, IPT_BUTTON5, IP_NAME_DEFAULT, KEYCODE_V, IP_JOY_NONE ) // right sway
  3373: 	PORT_BITX(0x20, 0, IPT_BUTTON6, IP_NAME_DEFAULT, KEYCODE_X, IP_JOY_NONE ) // left swat
  3374: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  3375: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  3376: 
  3377: 	SYS16_SERVICE
  3378: 	SYS16_COINAGE
  3379: 
  3380: PORT_START	/* DSW1 */
  3381: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )	// Not Used
  3382: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  3383: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3384: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  3385: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  3386: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3387: 	PORT_DIPNAME( 0x04, 0x00, "Start Level Select" )
  3388: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  3389: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3390: 	PORT_DIPNAME( 0x08, 0x08, "Continue Mode" )
  3391: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  3392: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3393: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  3394: 	PORT_DIPSETTING(    0x20, "Easy" )
  3395: 	PORT_DIPSETTING(    0x30, "Normal" )
  3396: 	PORT_DIPSETTING(    0x10, "Hard" )
  3397: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3398: 	PORT_DIPNAME( 0xc0, 0xc0, "Time Adjust"  )
  3399: 	PORT_DIPSETTING(    0x80, "Easy" )
  3400: 	PORT_DIPSETTING(    0xc0, "Normal" )
  3401: 	PORT_DIPSETTING(    0x40, "Hard" )
  3402: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3403: 
  3404: INPUT_PORTS_END
  3405: 
  3406: /***************************************************************************/
  3407: 
  3408: static MACHINE_DRIVER_START( hwchamp )
  3409: 
  3410: 	/* basic machine hardware */
  3411: 	MDRV_IMPORT_FROM(system16_7759)
  3412: 	MDRV_CPU_MODIFY("main")
  3413: 	MDRV_CPU_MEMORY(hwchamp_readmem,hwchamp_writemem)
  3414: 
  3415: 	MDRV_MACHINE_INIT(hwchamp)
  3416: MACHINE_DRIVER_END
  3417: 
  3418: /***************************************************************************/
  3419: // pre16
  3420: ROM_START( mjleague )
  3421: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  3422: 	ROM_LOAD16_BYTE( "epr-7404.09b", 0x000000, 0x8000, CRC(ec1655b5) SHA1(5c1df364fa9733daa4478c5f88298089e4963c33) )
  3423: 	ROM_LOAD16_BYTE( "epr-7401.06b", 0x000001, 0x8000, CRC(2befa5e0) SHA1(0a1681a4c7d62a5754ba6f3845436b4d08324246) )
  3424: 	ROM_LOAD16_BYTE( "epr-7405.10b", 0x010000, 0x8000, CRC(7a4f4e38) SHA1(65a22097dd933e83f326bd64b3863915897780a6) )
  3425: 	ROM_LOAD16_BYTE( "epr-7402.07b", 0x010001, 0x8000, CRC(b7bef762) SHA1(214450e0b094f99ef38dec2a3e5cbdb0b30e917d) )
  3426: 	ROM_LOAD16_BYTE( "epra7406.11b", 0x020000, 0x8000, CRC(bb743639) SHA1(5d99638a79f02ce14374d3b1f3d9fbfc5c13c6e1) )
  3427: 	ROM_LOAD16_BYTE( "epra7403.08b", 0x020001, 0x8000, CRC(d86250cf) SHA1(fb5dabb7b9b9fe0bbe93e28c60311c7b3256107a) )	// Fails memory test. Bad rom?
  3428: 
  3429: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3430: 	ROM_LOAD( "epr-7051.09a", 0x00000, 0x08000, CRC(10ca255a) SHA1(ccf58ffcac2f7fbdbfbdf32601a1b97f359cbd91) )
  3431: 	ROM_LOAD( "epr-7052.10a", 0x08000, 0x08000, CRC(2550db0e) SHA1(28f8d68f43d26f12793fe295c205cc86adc4e96a) )
  3432: 	ROM_LOAD( "epr-7053.11a", 0x10000, 0x08000, CRC(5bfea038) SHA1(01dc6e14cc7bba9f7930e68573c441fa2841f49a) )
  3433: 
  3434: 	ROM_REGION( 0x50000, REGION_GFX2, 0 ) /* sprites */
  3435: 	ROM_LOAD16_BYTE( "epr-7055.05a", 0x000001, 0x8000, CRC(1fb860bd) SHA1(4a4155d0352dfae9e402a2b2f1558ef17b1303b4) )
  3436: 	ROM_LOAD16_BYTE( "epr-7059.02b", 0x000000, 0x8000, CRC(3d14091d) SHA1(36208415b2012b6e948fefa15b0f7041748066be) )
  3437: 	ROM_LOAD16_BYTE( "epr-7056.06a", 0x010001, 0x8000, CRC(b35dd968) SHA1(e306b5e38acf583d7b2089302622ad25ae5564b0) )
  3438: 	ROM_LOAD16_BYTE( "epr-7060.03b", 0x010000, 0x8000, CRC(61bb3757) SHA1(5c87cf23be22b84e3dae746527ca057d870d6397) )
  3439: 	ROM_LOAD16_BYTE( "epr-7057.07a", 0x020001, 0x8000, CRC(3e5a2b6f) SHA1(d3dbafb4acb916e02c978a156008bd75ba122fb7) )
  3440: 	ROM_LOAD16_BYTE( "epr-7061.04b", 0x020000, 0x8000, CRC(c808dad5) SHA1(9b65acc8dc23b16e56327298188d1a6ab48b2b5d) )
  3441: 	ROM_LOAD16_BYTE( "epr-7058.08a", 0x030001, 0x8000, CRC(b543675f) SHA1(35ffc9295a8849a18fabe156fdbc9801ea2179cd) )
  3442: 	ROM_LOAD16_BYTE( "epr-7062.05b", 0x030000, 0x8000, CRC(9168eb47) SHA1(daaa7836e627a0679e65373d8f20a9383ba4c905) )
  3443: //	ROM_LOAD16_BYTE( "epr-7055.05a", 0x040001, 0x8000, CRC(1fb860bd) SHA1(4a4155d0352dfae9e402a2b2f1558ef17b1303b4) ) loaded twice??
  3444: //	ROM_LOAD16_BYTE( "epr-7059.02b", 0x040000, 0x8000, CRC(3d14091d) SHA1(36208415b2012b6e948fefa15b0f7041748066be) ) loaded twice??
  3445: 
  3446: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  3447: 	ROM_LOAD( "eprc7054.01b", 0x00000, 0x8000, CRC(4443b744) SHA1(73359a6e9d62b382dee47fea31b9e17eb26a0321) )
  3448: 
  3449: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  3450: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  3451: 
  3452: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  3453: 	ROM_LOAD( "epr-7063.01a", 0x00000, 0x8000, CRC(45d8908a) SHA1(e61f81f953c1a744ded36fed3b55774e4747af29) )
  3454: 	ROM_LOAD( "epr-7065.02a", 0x08000, 0x8000, CRC(8c8f8cff) SHA1(fca5a916a8b25800ee5e8771e2ced0ed9bd737f4) )
  3455: 	ROM_LOAD( "epr-7064.03a", 0x10000, 0x8000, CRC(159f6636) SHA1(66fa3f3e95a6ef3d3ff4ded09c05ab1131d9fbbb) )
  3456: 	ROM_LOAD( "epr-7066.04a", 0x18000, 0x8000, CRC(f5cfa91f) SHA1(c85d68cbcd03fe1436bed12235c033610acc11ee) )
  3457: ROM_END
  3458: 
  3459: /***************************************************************************/
  3460: 
  3461: static READ16_HANDLER( mjl_io_player1_r ){
  3462: 	data16_t data=input_port_0_r( offset ) & 0x80;
  3463: 
  3464: 	if( sys16_extraram2[2/2] & 0x4 )
  3465: 		data|=(input_port_5_r( offset ) & 0x3f) << 1;
  3466: 	else
  3467: 		data|=(input_port_6_r( offset ) & 0x3f) << 1;
  3468: 
  3469: 	return data;
  3470: }
  3471: 
  3472: static READ16_HANDLER( mjl_io_service_r ){
  3473: 	data16_t data=input_port_2_r( offset ) & 0x3f;
  3474: 
  3475: 	if(sys16_extraram2[2/2] & 0x4){
  3476: 		data|=(input_port_5_r( offset ) & 0x40);
  3477: 		data|=(input_port_7_r( offset ) & 0x40) << 1;
  3478: 	}
  3479: 	else {
  3480: 		data|=(input_port_6_r( offset ) & 0x40);
  3481: 		data|=(input_port_8_r( offset ) & 0x40) << 1;
  3482: 	}
  3483: 
  3484: 	return data;
  3485: }
  3486: 
  3487: static READ16_HANDLER( mjl_io_player2_r )
  3488: {
  3489: 	data16_t data=input_port_1_r( offset ) & 0x80;
  3490: 	if(sys16_extraram2[2/2] & 0x4)
  3491: 		data|=(input_port_7_r( offset ) & 0x3f) << 1;
  3492: 	else
  3493: 		data|=(input_port_8_r( offset ) & 0x3f) << 1;
  3494: 	return data;
  3495: }
  3496: 
  3497: static READ16_HANDLER( mjl_io_bat_r )
  3498: {
  3499: 	int data1=input_port_0_r( offset );
  3500: 	int data2=input_port_1_r( offset );
  3501: 	int ret=0;
  3502: 
  3503: 	// Hitting has 8 values, but for easy of playing, I've only added 3
  3504: 
  3505: 	if(data1 &1) ret=0x00;
  3506: 	else if(data1 &2) ret=0x03;
  3507: 	else if(data1 &4) ret=0x07;
  3508: 	else ret=0x0f;
  3509: 
  3510: 	if(data2 &1) ret|=0x00;
  3511: 	else if(data2 &2) ret|=0x30;
  3512: 	else if(data2 &4) ret|=0x70;
  3513: 	else ret|=0xf0;
  3514: 
  3515: 	return ret;
  3516: }
  3517: 
  3518: static MEMORY_READ16_START( mjleague_readmem )
  3519: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  3520: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  3521: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  3522: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  3523: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  3524: 
  3525: 	{ 0xc40002, 0xc40003, sys16_coinctrl_r },
  3526: 	{ 0xc41000, 0xc41001, mjl_io_service_r },
  3527: 	{ 0xc41002, 0xc41003, mjl_io_player1_r },
  3528: 	{ 0xc41006, 0xc41007, mjl_io_player2_r },
  3529: 	{ 0xc41004, 0xc41005, mjl_io_bat_r },
  3530: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  3531: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  3532: 	{ 0xc60000, 0xc60001, MRA16_NOP }, /* What is this? Watchdog? */
  3533: 
  3534: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  3535: MEMORY_END
  3536: 
  3537: static MEMORY_WRITE16_START( mjleague_writemem )
  3538: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  3539: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  3540: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  3541: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  3542: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  3543: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  3544: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  3545: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  3546: MEMORY_END
  3547: 
  3548: /***************************************************************************/
  3549: 
  3550: static void mjleague_update_proc( void ){
  3551: 	set_bg_page1( sys16_textram[0x746] );
  3552: 	set_fg_page1( sys16_textram[0x747] );
  3553: 
  3554: 	sys16_fg_scrollx = sys16_textram[0x7fc] & 0x01ff;
  3555: 	sys16_bg_scrollx = sys16_textram[0x7fd] & 0x01ff;
  3556: 	sys16_fg_scrolly = sys16_textram[0x792] & 0x00ff;
  3557: 	sys16_bg_scrolly = sys16_textram[0x793] & 0x01ff;
  3558: }
  3559: 
  3560: static MACHINE_INIT( mjleague ){
  3561: 	sys16_textmode=1;
  3562: 	sys16_spritesystem = sys16_sprite_quartet2;
  3563: 	sys16_sprxoffset = -0xbd;
  3564: 	sys16_fgxoffset = sys16_bgxoffset = 7;
  3565: 
  3566: 	// remove memory test because it fails.
  3567: 	sys16_patch_code( 0xBD42, 0x66 );
  3568: 
  3569: 	sys16_update_proc = mjleague_update_proc;
  3570: }
  3571: 
  3572: static DRIVER_INIT( mjleague )
  3573: {
  3574: 	machine_init_sys16_onetime();
  3575: }
  3576: 
  3577: /***************************************************************************/
  3578: 
  3579: INPUT_PORTS_START( mjleague )
  3580: 
  3581: PORT_START /* player 1 button fake */
  3582: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
  3583: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 )
  3584: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 )
  3585: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 )
  3586: 
  3587: PORT_START /* player 1 button fake */
  3588: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  3589: 	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2 )
  3590: 	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2 )
  3591: 	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 | IPF_PLAYER2 )
  3592: 
  3593: PORT_START  /* Service */
  3594: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  3595: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  3596: 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  3597: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
  3598: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  3599: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  3600: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  3601: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  3602: 
  3603: 	SYS16_COINAGE
  3604: 
  3605: PORT_START	/* DSW1 */
  3606: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
  3607: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  3608: 	PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
  3609: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  3610: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  3611: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3612: 	PORT_DIPNAME( 0x0c, 0x00, "Starting Points" )
  3613: 	PORT_DIPSETTING(    0x0c, "2000" )
  3614: 	PORT_DIPSETTING(    0x08, "3000" )
  3615: 	PORT_DIPSETTING(    0x04, "5000" )
  3616: 	PORT_DIPSETTING(    0x00, "10000" )
  3617: 	PORT_DIPNAME( 0x10, 0x10, "Team Select" )
  3618: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  3619: 	PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  3620: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )	//??? something to do with cocktail mode?
  3621: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  3622: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3623: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  3624: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  3625: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3626: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  3627: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  3628: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3629: 
  3630: PORT_START	/* IN5 */
  3631: 	PORT_ANALOG( 0x7f, 0x40, IPT_TRACKBALL_Y, 70, 30, 0, 127 )
  3632: 
  3633: PORT_START	/* IN6 */
  3634: 	PORT_ANALOG( 0x7f, 0x40, IPT_TRACKBALL_X /*| IPF_REVERSE*/, 50, 30, 0, 127 )
  3635: 
  3636: PORT_START	/* IN7 */
  3637: 	PORT_ANALOG( 0x7f, 0x40, IPT_TRACKBALL_Y | IPF_PLAYER2, 70, 30, 0, 127 )
  3638: 
  3639: PORT_START	/* IN8 */
  3640: 	PORT_ANALOG( 0x7f, 0x40, IPT_TRACKBALL_X | IPF_PLAYER2 | IPF_REVERSE, 50, 30, 0, 127 )
  3641: 
  3642: INPUT_PORTS_END
  3643: 
  3644: /***************************************************************************/
  3645: 
  3646: static MACHINE_DRIVER_START( mjleague )
  3647: 
  3648: 	/* basic machine hardware */
  3649: 	MDRV_IMPORT_FROM(system16_7751)
  3650: 	MDRV_CPU_MODIFY("main")
  3651: 	MDRV_CPU_MEMORY(mjleague_readmem,mjleague_writemem)
  3652: 
  3653: 	MDRV_MACHINE_INIT(mjleague)
  3654: MACHINE_DRIVER_END
  3655: 
  3656: /***************************************************************************/
  3657: // sys16B
  3658: ROM_START( passsht )
  3659: 	ROM_REGION( 0x20000, REGION_CPU1, 0 ) /* 68000 code */
  3660: 	ROM_LOAD16_BYTE( "epr11871.a4", 0x000000, 0x10000, CRC(0f9ccea5) SHA1(515a2721a35332df0303f4b9616122194b5c7170) )
  3661: 	ROM_LOAD16_BYTE( "epr11870.a1", 0x000001, 0x10000, CRC(df43ebcf) SHA1(3ca11a25819e1e8d5162f7b36cccc928d8efe150) )
  3662: 
  3663: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3664: 	ROM_LOAD( "opr11854.b9",  0x00000, 0x10000, CRC(d31c0b6c) SHA1(610d04988da70c30300cc5614817eda9d2204f39) )
  3665: 	ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) )
  3666: 	ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) )
  3667: 
  3668: 	ROM_REGION( 0x60000, REGION_GFX2, 0 ) /* sprites */
  3669: 	ROM_LOAD16_BYTE( "opr11862.b1",  0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
  3670: 	ROM_LOAD16_BYTE( "opr11865.b5",  0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
  3671: 	ROM_LOAD16_BYTE( "opr11863.b2",  0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
  3672: 	ROM_LOAD16_BYTE( "opr11866.b6",  0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) )
  3673: 	ROM_LOAD16_BYTE( "opr11864.b3",  0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) )
  3674: 	ROM_LOAD16_BYTE( "opr11867.b7",  0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) )
  3675: 
  3676: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  3677: 	ROM_LOAD( "epr11857.a7",  0x00000, 0x08000, CRC(789edc06) SHA1(8c89c94e503513c287807d187de78a7fbd75a7cf) )
  3678: 	ROM_LOAD( "epr11858.a8",  0x10000, 0x08000, CRC(08ab0018) SHA1(0685f80a7d403208c9cfffea3f2035324f3924fe) )
  3679: 	ROM_LOAD( "epr11859.a9",  0x18000, 0x08000, CRC(8673e01b) SHA1(e79183ab30e683fdf61ced2e9dbe010567c324cb) )
  3680: 	ROM_LOAD( "epr11860.a10", 0x20000, 0x08000, CRC(10263746) SHA1(1f981fb185c6a9795208ecdcfba36cf892a99ed5) )
  3681: 	ROM_LOAD( "epr11861.a11", 0x28000, 0x08000, CRC(38b54a71) SHA1(68ec4ef5b115844214ff2213be1ce6678904fbd2) )
  3682: ROM_END
  3683: 
  3684: ROM_START( passht4b )
  3685: 	ROM_REGION( 0x20000, REGION_CPU1, 0 ) /* 68000 code */
  3686: 	ROM_LOAD16_BYTE( "pas4p.3", 0x000000, 0x10000, CRC(2d8bc946) SHA1(35d3e529d4815543d9876fd0545c3d686467abaa) )
  3687: 	ROM_LOAD16_BYTE( "pas4p.4", 0x000001, 0x10000, CRC(e759e831) SHA1(dd5727dc28010cb988e4951723171171eb645ce8) )
  3688: 
  3689: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3690: 	ROM_LOAD( "pas4p.11", 0x00000, 0x10000, CRC(da20fbc9) SHA1(21dc8143f4d1cebae4f86e83495fa84e5293ba48) )
  3691: 	ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) )
  3692: 	ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) )
  3693: 
  3694: 	ROM_REGION( 0x60000, REGION_GFX2, 0 ) /* sprites */
  3695: 	ROM_LOAD16_BYTE( "opr11862.b1",  0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
  3696: 	ROM_LOAD16_BYTE( "opr11865.b5",  0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
  3697: 	ROM_LOAD16_BYTE( "opr11863.b2",  0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
  3698: 	ROM_LOAD16_BYTE( "opr11866.b6",  0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) )
  3699: 	ROM_LOAD16_BYTE( "opr11864.b3",  0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) )
  3700: 	ROM_LOAD16_BYTE( "opr11867.b7",  0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) )
  3701: 
  3702: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  3703: 	ROM_LOAD( "pas4p.1",  0x00000, 0x08000, CRC(e60fb017) SHA1(21298036eab55c74427f1c2e3a9623d41bca4849) )
  3704: 	ROM_LOAD( "pas4p.2",  0x10000, 0x10000, CRC(092e016e) SHA1(713638749efa9dce19c547b84308236110bc85fe) )
  3705: ROM_END
  3706: 
  3707: ROM_START( passshtb )
  3708: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  3709: 	ROM_LOAD16_BYTE( "pass3_2p.bin", 0x000000, 0x10000, CRC(26bb9299) SHA1(11bacf86dfdd8bcfbfb61f0ebc59890325c48adc) )
  3710: 	ROM_LOAD16_BYTE( "pass4_2p.bin", 0x000001, 0x10000, CRC(06ac6d5d) SHA1(2dd71a8a956404326797de8beed7bca016c9919e) )
  3711: 
  3712: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  3713: 	ROM_LOAD( "opr11854.b9",  0x00000, 0x10000, CRC(d31c0b6c) SHA1(610d04988da70c30300cc5614817eda9d2204f39) )
  3714: 	ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) )
  3715: 	ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) )
  3716: 
  3717: 	ROM_REGION( 0x60000, REGION_GFX2, 0 ) /* sprites */
  3718: 	ROM_LOAD16_BYTE( "opr11862.b1",  0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
  3719: 	ROM_LOAD16_BYTE( "opr11865.b5",  0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
  3720: 	ROM_LOAD16_BYTE( "opr11863.b2",  0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
  3721: 	ROM_LOAD16_BYTE( "opr11866.b6",  0x20000, 0x10000, CRC(50eb71cc) SHA1(463b4917ca19c7f4ad2c2845caa104d5e4a2dda3) )
  3722: 	ROM_LOAD16_BYTE( "opr11864.b3",  0x40001, 0x10000, CRC(05733ca8) SHA1(1dbc7c99450ebe6a9fd8c0244fd3cb38b74984ef) )
  3723: 	ROM_LOAD16_BYTE( "opr11867.b7",  0x40000, 0x10000, CRC(81e49697) SHA1(a70fa409e3555ad6c8f28930a7026fdf2deb8c65) )
  3724: 
  3725: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  3726: 	ROM_LOAD( "epr11857.a7",  0x00000, 0x08000, CRC(789edc06) SHA1(8c89c94e503513c287807d187de78a7fbd75a7cf) )
  3727: 	ROM_LOAD( "epr11858.a8",  0x10000, 0x08000, CRC(08ab0018) SHA1(0685f80a7d403208c9cfffea3f2035324f3924fe) )
  3728: 	ROM_LOAD( "epr11859.a9",  0x18000, 0x08000, CRC(8673e01b) SHA1(e79183ab30e683fdf61ced2e9dbe010567c324cb) )
  3729: 	ROM_LOAD( "epr11860.a10", 0x20000, 0x08000, CRC(10263746) SHA1(1f981fb185c6a9795208ecdcfba36cf892a99ed5) )
  3730: 	ROM_LOAD( "epr11861.a11", 0x28000, 0x08000, CRC(38b54a71) SHA1(68ec4ef5b115844214ff2213be1ce6678904fbd2) )
  3731: ROM_END
  3732: /***************************************************************************/
  3733: 
  3734: static MEMORY_READ16_START( passsht_readmem )
  3735: 	{ 0x000000, 0x01ffff, MRA16_ROM },
  3736: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  3737: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  3738: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  3739: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  3740: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  3741: 	{ 0xc41004, 0xc41005, input_port_1_word_r }, // player2
  3742: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  3743: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  3744: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  3745: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  3746: MEMORY_END
  3747: 
  3748: static MEMORY_WRITE16_START( passsht_writemem )
  3749: 	{ 0x000000, 0x01ffff, MWA16_ROM },
  3750: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  3751: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  3752: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  3753: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  3754: 	{ 0xc42006, 0xc42007, sound_command_w },
  3755: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  3756: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  3757: MEMORY_END
  3758: 
  3759: static int passht4b_io1_val;
  3760: static int passht4b_io2_val;
  3761: static int passht4b_io3_val;
  3762: 
  3763: static READ16_HANDLER( passht4b_service_r ){
  3764: 	data16_t val=input_port_2_word_r(offset,0);
  3765: 	if(!(readinputport(0) & 0x40)) val&=0xef;
  3766: 	if(!(readinputport(1) & 0x40)) val&=0xdf;
  3767: 	if(!(readinputport(5) & 0x40)) val&=0xbf;
  3768: 	if(!(readinputport(6) & 0x40)) val&=0x7f;
  3769: 
  3770: 	passht4b_io3_val=(readinputport(0)<<4) | (readinputport(5)&0xf);
  3771: 	passht4b_io2_val=(readinputport(1)<<4) | (readinputport(6)&0xf);
  3772: 
  3773: 	passht4b_io1_val=0xff;
  3774: 
  3775: 	// player 1 buttons
  3776: 	if(!(readinputport(0) & 0x10)) passht4b_io1_val &=0xfe;
  3777: 	if(!(readinputport(0) & 0x20)) passht4b_io1_val &=0xfd;
  3778: 	if(!(readinputport(0) & 0x80)) passht4b_io1_val &=0xfc;
  3779: 
  3780: 	// player 2 buttons
  3781: 	if(!(readinputport(1) & 0x10)) passht4b_io1_val &=0xfb;
  3782: 	if(!(readinputport(1) & 0x20)) passht4b_io1_val &=0xf7;
  3783: 	if(!(readinputport(1) & 0x80)) passht4b_io1_val &=0xf3;
  3784: 
  3785: 	// player 3 buttons
  3786: 	if(!(readinputport(5) & 0x10)) passht4b_io1_val &=0xef;
  3787: 	if(!(readinputport(5) & 0x20)) passht4b_io1_val &=0xdf;
  3788: 	if(!(readinputport(5) & 0x80)) passht4b_io1_val &=0xcf;
  3789: 
  3790: 	// player 4 buttons
  3791: 	if(!(readinputport(6) & 0x10)) passht4b_io1_val &=0xbf;
  3792: 	if(!(readinputport(6) & 0x20)) passht4b_io1_val &=0x7f;
  3793: 	if(!(readinputport(6) & 0x80)) passht4b_io1_val &=0x3f;
  3794: 
  3795: 	return val;
  3796: }
  3797: 
  3798: static READ16_HANDLER( passht4b_io1_r ) {	return passht4b_io1_val;}
  3799: static READ16_HANDLER( passht4b_io2_r ) {	return passht4b_io2_val;}
  3800: static READ16_HANDLER( passht4b_io3_r ) {	return passht4b_io3_val;}
  3801: 
  3802: static MEMORY_READ16_START( passht4b_readmem )
  3803: 	{ 0x000000, 0x01ffff, MRA16_ROM },
  3804: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  3805: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  3806: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  3807: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  3808: 	{ 0xc41000, 0xc41001, passht4b_service_r },
  3809: 	{ 0xc41002, 0xc41003, passht4b_io1_r },
  3810: 	{ 0xc41004, 0xc41005, passht4b_io2_r },
  3811: 	{ 0xc41006, 0xc41007, passht4b_io3_r },
  3812: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  3813: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  3814: 	{ 0xc43000, 0xc43001, input_port_0_word_r }, // player1		// test mode only
  3815: 	{ 0xc43002, 0xc43003, input_port_1_word_r }, // player2
  3816: 	{ 0xc43004, 0xc43005, input_port_5_word_r }, // player3
  3817: 	{ 0xc43006, 0xc43007, input_port_6_word_r }, // player4
  3818: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  3819: MEMORY_END
  3820: 
  3821: static MEMORY_WRITE16_START( passht4b_writemem )
  3822: 	{ 0x000000, 0x01ffff, MWA16_ROM },
  3823: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  3824: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  3825: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  3826: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  3827: 	{ 0xc42006, 0xc42007, sound_command_w },
  3828: 	{ 0xc4600a, 0xc4600b, sys16_coinctrl_w },	/* coin counter doesn't work */
  3829: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  3830: MEMORY_END
  3831: 
  3832: /***************************************************************************/
  3833: 
  3834: static void passsht_update_proc( void ){
  3835: 	sys16_fg_scrollx = sys16_workingram[0x34be/2];
  3836: 	sys16_bg_scrollx = sys16_workingram[0x34c2/2];
  3837: 	sys16_fg_scrolly = sys16_workingram[0x34bc/2];
  3838: 	sys16_bg_scrolly = sys16_workingram[0x34c0/2];
  3839: 
  3840: 	set_fg_page( sys16_textram[0x0ff6/2] );
  3841: 	set_bg_page( sys16_textram[0x0ff4/2] );
  3842: }
  3843: 
  3844: static void passht4b_update_proc( void ){
  3845: 	sys16_fg_scrollx = sys16_workingram[0x34ce/2];
  3846: 	sys16_bg_scrollx = sys16_workingram[0x34d2/2];
  3847: 	sys16_fg_scrolly = sys16_workingram[0x34cc/2];
  3848: 	sys16_bg_scrolly = sys16_workingram[0x34d0/2];
  3849: 
  3850: 	set_fg_page( sys16_textram[0x0ff6/2] );
  3851: 	set_bg_page( sys16_textram[0x0ff4/2] );
  3852: }
  3853: 
  3854: static MACHINE_INIT( passsht ){
  3855: 	sys16_sprxoffset = -0x48;
  3856: 	sys16_spritesystem = sys16_sprite_passshot;
  3857: 
  3858: 	// fix name entry
  3859: 	sys16_patch_code( 0x13a8,0xc0);
  3860: 
  3861: 	sys16_update_proc = passsht_update_proc;
  3862: }
  3863: 
  3864: static MACHINE_INIT( passht4b ){
  3865: 	sys16_sprxoffset = -0xb8;
  3866: 	sys16_spritesystem = sys16_sprite_passshot;
  3867: 
  3868: 	// fix name entry
  3869: 	sys16_patch_code( 0x138a,0xc0);
  3870: 
  3871: 	sys16_update_proc = passht4b_update_proc;
  3872: }
  3873: 
  3874: static DRIVER_INIT( passsht )
  3875: {
  3876: 	machine_init_sys16_onetime();
  3877: }
  3878: 
  3879: static DRIVER_INIT( passht4b ){
  3880: 	int i;
  3881: 
  3882: 	machine_init_sys16_onetime();
  3883: 
  3884: 	/* invert the graphics bits on the tiles */
  3885: 	for (i = 0; i < 0x30000; i++)
  3886: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  3887: }
  3888: 
  3889: /***************************************************************************/
  3890: 
  3891: INPUT_PORTS_START( passsht )
  3892: PORT_START /* joy 1 */
  3893: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
  3894: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
  3895: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 )
  3896: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
  3897: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  3898: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  3899: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  3900: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  3901: 
  3902: PORT_START /* joy 2 */
  3903: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  3904: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  3905: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  3906: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_COCKTAIL )
  3907: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  3908: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  3909: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  3910: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  3911: 
  3912: 	SYS16_SERVICE
  3913: 	SYS16_COINAGE
  3914: 
  3915: PORT_START	/* DSW1 */
  3916: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  3917: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  3918: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3919: 	PORT_DIPNAME( 0x0e, 0x0e, "Initial Point" )
  3920: 	PORT_DIPSETTING(    0x06, "2000" )
  3921: 	PORT_DIPSETTING(    0x0a, "3000" )
  3922: 	PORT_DIPSETTING(    0x0c, "4000" )
  3923: 	PORT_DIPSETTING(    0x0e, "5000" )
  3924: 	PORT_DIPSETTING(    0x08, "6000" )
  3925: 	PORT_DIPSETTING(    0x04, "7000" )
  3926: 	PORT_DIPSETTING(    0x02, "8000" )
  3927: 	PORT_DIPSETTING(    0x00, "9000" )
  3928: 	PORT_DIPNAME( 0x30, 0x30, "Point Table" )
  3929: 	PORT_DIPSETTING(    0x20, "Easy" )
  3930: 	PORT_DIPSETTING(    0x30, "Normal" )
  3931: 	PORT_DIPSETTING(    0x10, "Hard" )
  3932: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3933: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  3934: 	PORT_DIPSETTING(    0x80, "Easy" )
  3935: 	PORT_DIPSETTING(    0xc0, "Normal" )
  3936: 	PORT_DIPSETTING(    0x40, "Hard" )
  3937: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3938: INPUT_PORTS_END
  3939: 
  3940: INPUT_PORTS_START( passht4b )
  3941: PORT_START /* joy 1 */
  3942: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  3943: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  3944: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  3945: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  3946: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  3947: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  3948: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  3949: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
  3950: 
  3951: PORT_START /* joy 2 */
  3952: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  3953: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  3954: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  3955: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  3956: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  3957: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  3958: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  3959: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_COCKTAIL )
  3960: 
  3961: PORT_START /* service */
  3962: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  3963: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  3964: 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  3965: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
  3966: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  3967: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  3968: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3 )
  3969: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4 )
  3970: 
  3971: 	SYS16_COINAGE
  3972: 
  3973: PORT_START	/* DSW1 */
  3974: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  3975: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  3976: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  3977: 	PORT_DIPNAME( 0x0e, 0x0e, "Initial Point" )
  3978: 	PORT_DIPSETTING(    0x06, "2000" )
  3979: 	PORT_DIPSETTING(    0x0a, "3000" )
  3980: 	PORT_DIPSETTING(    0x0c, "4000" )
  3981: 	PORT_DIPSETTING(    0x0e, "5000" )
  3982: 	PORT_DIPSETTING(    0x08, "6000" )
  3983: 	PORT_DIPSETTING(    0x04, "7000" )
  3984: 	PORT_DIPSETTING(    0x02, "8000" )
  3985: 	PORT_DIPSETTING(    0x00, "9000" )
  3986: 	PORT_DIPNAME( 0x30, 0x30, "Point Table" )
  3987: 	PORT_DIPSETTING(    0x20, "Easy" )
  3988: 	PORT_DIPSETTING(    0x30, "Normal" )
  3989: 	PORT_DIPSETTING(    0x10, "Hard" )
  3990: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3991: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  3992: 	PORT_DIPSETTING(    0x80, "Easy" )
  3993: 	PORT_DIPSETTING(    0xc0, "Normal" )
  3994: 	PORT_DIPSETTING(    0x40, "Hard" )
  3995: 	PORT_DIPSETTING(    0x00, "Hardest" )
  3996: 
  3997: PORT_START /* joy 3 */
  3998: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3 )
  3999: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER3 )
  4000: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  4001: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER3 )
  4002: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  4003: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  4004: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
  4005: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 )
  4006: 
  4007: PORT_START /* joy 4 */
  4008: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER4 )
  4009: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER4 )
  4010: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4 )
  4011: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER4 )
  4012: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
  4013: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
  4014: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
  4015: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER4 )
  4016: 
  4017: INPUT_PORTS_END
  4018: 
  4019: /***************************************************************************/
  4020: 
  4021: static MACHINE_DRIVER_START( passsht )
  4022: 
  4023: 	/* basic machine hardware */
  4024: 	MDRV_IMPORT_FROM(system16_7759)
  4025: 	MDRV_CPU_MODIFY("main")
  4026: 	MDRV_CPU_MEMORY(passsht_readmem,passsht_writemem)
  4027: 
  4028: 	MDRV_MACHINE_INIT(passsht)
  4029: MACHINE_DRIVER_END
  4030: 
  4031: 
  4032: static MACHINE_DRIVER_START( passht4b )
  4033: 
  4034: 	/* basic machine hardware */
  4035: 	MDRV_IMPORT_FROM(system16_7759)
  4036: 	MDRV_CPU_MODIFY("main")
  4037: 	MDRV_CPU_MEMORY(passht4b_readmem,passht4b_writemem)
  4038: 
  4039: 	MDRV_MACHINE_INIT(passht4b)
  4040: MACHINE_DRIVER_END
  4041: 
  4042: /***************************************************************************/
  4043: // pre16
  4044: ROM_START( quartet )
  4045: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4046: 	ROM_LOAD16_BYTE( "epr7458a.9b",  0x000000, 0x8000, CRC(42e7b23e) SHA1(9df3b1b915723f9a927ef03d80ae7983a8c91a21) )
  4047: 	ROM_LOAD16_BYTE( "epr7455a.6b",  0x000001, 0x8000, CRC(01631ab2) SHA1(2d613d23fe79072f850ccc9020830dea54312b23) )
  4048: 	ROM_LOAD16_BYTE( "epr7459a.10b", 0x010000, 0x8000, CRC(6b540637) SHA1(4b2e9ba06b80f8fb502310ab770805f8c6a47567) )
  4049: 	ROM_LOAD16_BYTE( "epr7456a.7b",  0x010001, 0x8000, CRC(31ca583e) SHA1(8ade8f7e42ae3e171b138410374e4c090fdc4ecb) )
  4050: 	ROM_LOAD16_BYTE( "epr7460.11b",  0x020000, 0x8000, CRC(a444ea13) SHA1(884ed22d606e3bd30d8401fe1750687e54674e82) )
  4051: 	ROM_LOAD16_BYTE( "epr7457.8b",   0x020001, 0x8000, CRC(3b282c23) SHA1(95de41a97f50f6169887c6d9724d5c42a41bb264) )
  4052: 
  4053: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4054: 	ROM_LOAD( "epr7461.9c",  0x00000, 0x08000, CRC(f6af07f2) SHA1(546fabbda936d61a90d2395d033fd4d6bb0bc38a) )
  4055: 	ROM_LOAD( "epr7462.10c", 0x08000, 0x08000, CRC(7914af28) SHA1(4bf59fe4a0b0aa5d4cc0b6f9375ffab3c96e8a2b) )
  4056: 	ROM_LOAD( "epr7463.11c", 0x10000, 0x08000, CRC(827c5603) SHA1(8db3bd6eae5aeeb229e017471049ef5347974df5) )
  4057: 
  4058: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites  - the same as quartet 2 */
  4059: 	ROM_LOAD16_BYTE( "epr7465.5c",  0x000001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) )
  4060: 	ROM_LOAD16_BYTE( "epr-7469.2b", 0x000000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) )
  4061: 	ROM_LOAD16_BYTE( "epr7466.6c",  0x010001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) )
  4062: 	ROM_LOAD16_BYTE( "epr-7470.3b", 0x010000, 0x8000, CRC(16fc67b1) SHA1(788fe2878c5c9faea43c2f166f32c22ee51c7d09) )
  4063: 	ROM_LOAD16_BYTE( "epr7467.7c",  0x020001, 0x8000, CRC(0af68de2) SHA1(81163baf3f0e45bac950a6d9c24b3a886db1509c) )
  4064: 	ROM_LOAD16_BYTE( "epr-7471.4b", 0x020000, 0x8000, CRC(13fad5ac) SHA1(75b480083fbb14cbef969126989bf9b2235fd31e) )
  4065: 	ROM_LOAD16_BYTE( "epr7468.8c",  0x030001, 0x8000, CRC(ddfd40c0) SHA1(6c12ad668cd0c82e7d7d46bfbdcee8b9d46ebd09) )
  4066: 	ROM_LOAD16_BYTE( "epr-7472.5b", 0x030000, 0x8000, CRC(8e2762ec) SHA1(872e19a6aab81d7a2472367d0e31dc1295da7182) )
  4067: 
  4068: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4069: 	ROM_LOAD( "epr-7464.1b", 0x0000, 0x8000, CRC(9f291306) SHA1(96a09542a863ccf2ded43e2df6f913722b3f97b1) )
  4070: 
  4071: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  4072: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  4073: 
  4074: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  4075: 	ROM_LOAD( "epr7473.1c", 0x00000, 0x8000, CRC(06ec75fa) SHA1(5f14bc887449122700c46ad22c0379a1682e0bdb) )
  4076: 	ROM_LOAD( "epr7475.2c", 0x08000, 0x8000, CRC(7abd1206) SHA1(54d52dc0b9c245cd2df647e714310a71b803cbcf) )
  4077: 	ROM_LOAD( "epr7474.3c", 0x10000, 0x8000, CRC(dbf853b8) SHA1(e82f497e1144f23f3233b5c45ef182bfc7923715) )
  4078: 	ROM_LOAD( "epr7476.4c", 0x18000, 0x8000, CRC(5eba655a) SHA1(6713ef12037cba3139d0f469c82bd90b44bae8ce) )
  4079: ROM_END
  4080: 
  4081: ROM_START( quartetj )
  4082: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4083: 	ROM_LOAD16_BYTE( "epr-7458.43",  0x000000, 0x8000, CRC(0096499f) SHA1(dcf8e33513ce7c6660ea546c8e1c574fde629a22) )
  4084: 	ROM_LOAD16_BYTE( "epr-7455.26",  0x000001, 0x8000, CRC(da934390) SHA1(d40eb65b6a36a4c1ebeadb76e47a61bd8b2e4b89) )
  4085: 	ROM_LOAD16_BYTE( "epr-7459.42",  0x010000, 0x8000, CRC(d130cf61) SHA1(3a065f5c296b10b97c78d49aa285ae7afb16e881) )
  4086: 	ROM_LOAD16_BYTE( "epr-7456.25",  0x010001, 0x8000, CRC(7847149f) SHA1(fc8ad669f2bc426cb7af78d92ea147cbd1e181af) )
  4087: 	ROM_LOAD16_BYTE( "epr7460.11b",  0x020000, 0x8000, CRC(a444ea13) SHA1(884ed22d606e3bd30d8401fe1750687e54674e82) )
  4088: 	ROM_LOAD16_BYTE( "epr7457.8b",   0x020001, 0x8000, CRC(3b282c23) SHA1(95de41a97f50f6169887c6d9724d5c42a41bb264) )
  4089: 
  4090: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4091: 	ROM_LOAD( "epr7461.9c",  0x00000, 0x08000, CRC(f6af07f2) SHA1(546fabbda936d61a90d2395d033fd4d6bb0bc38a) )
  4092: 	ROM_LOAD( "epr7462.10c", 0x08000, 0x08000, CRC(7914af28) SHA1(4bf59fe4a0b0aa5d4cc0b6f9375ffab3c96e8a2b) )
  4093: 	ROM_LOAD( "epr7463.11c", 0x10000, 0x08000, CRC(827c5603) SHA1(8db3bd6eae5aeeb229e017471049ef5347974df5) )
  4094: 
  4095: 	ROM_REGION( 0x040000, REGION_GFX2, 0 ) /* sprites  - the same as quartet 2 */
  4096: 	ROM_LOAD16_BYTE( "epr7465.5c",  0x000001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) )
  4097: 	ROM_LOAD16_BYTE( "epr-7469.2b", 0x000000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) )
  4098: 	ROM_LOAD16_BYTE( "epr7466.6c",  0x010001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) )
  4099: 	ROM_LOAD16_BYTE( "epr-7470.3b", 0x010000, 0x8000, CRC(16fc67b1) SHA1(788fe2878c5c9faea43c2f166f32c22ee51c7d09) )
  4100: 	ROM_LOAD16_BYTE( "epr7467.7c",  0x020001, 0x8000, CRC(0af68de2) SHA1(81163baf3f0e45bac950a6d9c24b3a886db1509c) )
  4101: 	ROM_LOAD16_BYTE( "epr-7471.4b", 0x020000, 0x8000, CRC(13fad5ac) SHA1(75b480083fbb14cbef969126989bf9b2235fd31e) )
  4102: 	ROM_LOAD16_BYTE( "epr7468.8c",  0x030001, 0x8000, CRC(ddfd40c0) SHA1(6c12ad668cd0c82e7d7d46bfbdcee8b9d46ebd09) )
  4103: 	ROM_LOAD16_BYTE( "epr-7472.5b", 0x030000, 0x8000, CRC(8e2762ec) SHA1(872e19a6aab81d7a2472367d0e31dc1295da7182) )
  4104: 
  4105: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4106: 	ROM_LOAD( "epr-7464.1b", 0x0000, 0x8000, CRC(9f291306) SHA1(96a09542a863ccf2ded43e2df6f913722b3f97b1) )
  4107: 
  4108: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  4109: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  4110: 
  4111: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  4112: 	ROM_LOAD( "epr7473.1c", 0x00000, 0x8000, CRC(06ec75fa) SHA1(5f14bc887449122700c46ad22c0379a1682e0bdb) )
  4113: 	ROM_LOAD( "epr7475.2c", 0x08000, 0x8000, CRC(7abd1206) SHA1(54d52dc0b9c245cd2df647e714310a71b803cbcf) )
  4114: 	ROM_LOAD( "epr7474.3c", 0x10000, 0x8000, CRC(dbf853b8) SHA1(e82f497e1144f23f3233b5c45ef182bfc7923715) )
  4115: 	ROM_LOAD( "epr7476.4c", 0x18000, 0x8000, CRC(5eba655a) SHA1(6713ef12037cba3139d0f469c82bd90b44bae8ce) )
  4116: ROM_END
  4117: 
  4118: 
  4119: /***************************************************************************/
  4120: 
  4121: #if 0 
  4122: static READ16_HANDLER( quartet_skip_r ){
  4123: 	if (activecpu_get_pc()==0x89b2) {cpu_spinuntil_int(); return 0xffff;}
  4124: 	return sys16_workingram[0x0800/2];
  4125: }
  4126: #endif 
  4127: 
  4128: static MEMORY_READ16_START( quartet_readmem )
  4129: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  4130: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  4131: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  4132: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  4133: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  4134: 	{ 0xc40002, 0xc40003, sys16_coinctrl_r },
  4135: 	{ 0xc41000, 0xc41001, input_port_0_word_r }, // p1
  4136: 	{ 0xc41002, 0xc41003, input_port_1_word_r }, // p2
  4137: 	{ 0xc41004, 0xc41005, input_port_2_word_r }, // p3
  4138: 	{ 0xc41006, 0xc41007, input_port_3_word_r }, // p4
  4139: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  4140: 	{ 0xc42002, 0xc42003, input_port_5_word_r }, // dip2
  4141: //	{ 0xffc800, 0xffc801, quartet_skip_r },
  4142: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  4143: MEMORY_END
  4144: 
  4145: static MEMORY_WRITE16_START( quartet_writemem )
  4146: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  4147: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  4148: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  4149: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  4150: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  4151: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  4152: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  4153: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  4154: MEMORY_END
  4155: 
  4156: /***************************************************************************/
  4157: 
  4158: static void quartet_update_proc( void ){
  4159: 	sys16_fg_scrollx = sys16_workingram[0x0d14/2] & 0x01ff;
  4160: 	sys16_bg_scrollx = sys16_workingram[0x0d18/2] & 0x01ff;
  4161: 	sys16_fg_scrolly = sys16_textram[0x0f24/2] & 0x00ff;
  4162: 	sys16_bg_scrolly = sys16_textram[0x0f26/2] & 0x01ff;
  4163: 
  4164: //	if(((*(UINT16 *)(&sys16_extraram[4])) & 0xff) == 1)
  4165: //		\=1;
  4166: //	else
  4167: 		sys16_quartet_title_kludge=0;
  4168: 
  4169: 	set_fg_page1( sys16_workingram[0x0d1c/2] );
  4170: 	set_bg_page1( sys16_workingram[0x0d1e/2] );
  4171: }
  4172: 
  4173: static MACHINE_INIT( quartet ){
  4174: 	sys16_textmode=1;
  4175: 	sys16_spritesystem = sys16_sprite_quartet2;
  4176: 	sys16_sprxoffset = -0xbc;
  4177: 	sys16_fgxoffset = sys16_bgxoffset = 7;
  4178: 
  4179: 	sys16_update_proc = quartet_update_proc;
  4180: }
  4181: 
  4182: static DRIVER_INIT( quartet )
  4183: {
  4184: 	machine_init_sys16_onetime();
  4185: }
  4186: /***************************************************************************/
  4187: 
  4188: INPUT_PORTS_START( quartet )
  4189: 	// Player 1
  4190: 	PORT_START
  4191: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY  )
  4192: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP  | IPF_8WAY  )
  4193: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  4194: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  4195: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  4196: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  4197: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  4198: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
  4199: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* player 1 coin 2 really */
  4200: 	// Player 2
  4201: 	PORT_START
  4202: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY  | IPF_PLAYER2 )
  4203: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP  | IPF_8WAY  | IPF_PLAYER2 )
  4204: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2)
  4205: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2)
  4206: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2)
  4207: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  4208: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2)
  4209: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
  4210: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* player 2 coin 2 really */
  4211: 	// Player 3
  4212: 	PORT_START
  4213: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER3  )
  4214: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP  | IPF_8WAY  | IPF_PLAYER3 )
  4215: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER3 )
  4216: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER3 )
  4217: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
  4218: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START3 )
  4219: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
  4220: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 )
  4221: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* player 3 coin 2 really */
  4222: 	// Player 4
  4223: 	PORT_START
  4224: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY  | IPF_PLAYER4 )
  4225: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP  | IPF_8WAY  | IPF_PLAYER4 )
  4226: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER4)
  4227: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER4)
  4228: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4)
  4229: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START4 )
  4230: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4)
  4231: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN4 )
  4232: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* player 4 coin 2 really */
  4233: 
  4234: 	SYS16_COINAGE
  4235: 
  4236: 	PORT_START	/* DSW1 */
  4237: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  4238: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  4239: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4240: 	PORT_DIPNAME( 0x06, 0x00, "Credit Power" )
  4241: 	PORT_DIPSETTING(    0x04, "500" )
  4242: 	PORT_DIPSETTING(    0x06, "1000" )
  4243: 	PORT_DIPSETTING(    0x02, "2000" )
  4244: 	PORT_DIPSETTING(    0x00, "9000" )
  4245: 	PORT_DIPNAME( 0x18, 0x00, DEF_STR( Difficulty ) )
  4246: 	PORT_DIPSETTING(    0x10, "Easy" )
  4247: 	PORT_DIPSETTING(    0x18, "Normal" )
  4248: 	PORT_DIPSETTING(    0x08, "Hard" )
  4249: 	PORT_DIPSETTING(    0x00, "Hardest" )
  4250: 	PORT_DIPNAME( 0x20, 0x20, "Coin During Game" )
  4251: 	PORT_DIPSETTING(    0x20, "Power" )
  4252: 	PORT_DIPSETTING(    0x00, "Credit" )
  4253: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) )
  4254: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  4255: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4256: 	PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
  4257: INPUT_PORTS_END
  4258: 
  4259: /***************************************************************************/
  4260: 
  4261: static MACHINE_DRIVER_START( quartet )
  4262: 
  4263: 	/* basic machine hardware */
  4264: 	MDRV_IMPORT_FROM(system16_7751)
  4265: 	MDRV_CPU_MODIFY("main")
  4266: 	MDRV_CPU_MEMORY(quartet_readmem,quartet_writemem)
  4267: 
  4268: 	MDRV_MACHINE_INIT(quartet)
  4269: MACHINE_DRIVER_END
  4270: 
  4271: /***************************************************************************/
  4272: // pre16
  4273: ROM_START( quartet2 )
  4274: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4275: 	ROM_LOAD16_BYTE( "quartet2.b9",  0x000000, 0x8000, CRC(67177cd8) SHA1(c4ea001dfbeeb29a09d597fb50d71f54e4e9572a) )
  4276: 	ROM_LOAD16_BYTE( "quartet2.b6",  0x000001, 0x8000, CRC(50f50b08) SHA1(646c0d545150b95e5d8d47bf63360f7326add08f) )
  4277: 	ROM_LOAD16_BYTE( "quartet2.b10", 0x010000, 0x8000, CRC(4273c3b7) SHA1(4cae221678a6d2b7806487becd4ba09b520f9fa0) )
  4278: 	ROM_LOAD16_BYTE( "quartet2.b7",  0x010001, 0x8000, CRC(0aa337bb) SHA1(f31f8f294fccd866eadebfafee067bfae44b3184) )
  4279: 	ROM_LOAD16_BYTE( "quartet2.b11", 0x020000, 0x8000, CRC(3a6a375d) SHA1(8ebea6b7f1208438b47e887b46cb569725c4042a) )
  4280: 	ROM_LOAD16_BYTE( "quartet2.b8",  0x020001, 0x8000, CRC(d87b2ca2) SHA1(58adf0900e41036b1b78a931ab94b30ce601909d) )
  4281: 
  4282: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4283: 	ROM_LOAD( "quartet2.c9",  0x00000, 0x08000, CRC(547a6058) SHA1(5248e974c8d12183c996b1fc8fda09e8a4bf0d2d) )
  4284: 	ROM_LOAD( "quartet2.c10", 0x08000, 0x08000, CRC(77ec901d) SHA1(b5961895473c16a8f4a111185cce48b05ab66885) )
  4285: 	ROM_LOAD( "quartet2.c11", 0x10000, 0x08000, CRC(7e348cce) SHA1(82bba65280faaf3280208c85caef48ec8baeade8) )
  4286: 
  4287: 	ROM_REGION( 0x040000, REGION_GFX2, 0 ) /* sprites */
  4288: 	ROM_LOAD16_BYTE( "epr7465.5c",  0x000001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) )
  4289: 	ROM_LOAD16_BYTE( "epr-7469.2b", 0x000000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) )
  4290: 	ROM_LOAD16_BYTE( "epr7466.6c",  0x010001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) )
  4291: 	ROM_LOAD16_BYTE( "epr-7470.3b", 0x010000, 0x8000, CRC(16fc67b1) SHA1(788fe2878c5c9faea43c2f166f32c22ee51c7d09) )
  4292: 	ROM_LOAD16_BYTE( "epr7467.7c",  0x020001, 0x8000, CRC(0af68de2) SHA1(81163baf3f0e45bac950a6d9c24b3a886db1509c) )
  4293: 	ROM_LOAD16_BYTE( "epr-7471.4b", 0x020000, 0x8000, CRC(13fad5ac) SHA1(75b480083fbb14cbef969126989bf9b2235fd31e) )
  4294: 	ROM_LOAD16_BYTE( "epr7468.8c",  0x030001, 0x8000, CRC(ddfd40c0) SHA1(6c12ad668cd0c82e7d7d46bfbdcee8b9d46ebd09) )
  4295: 	ROM_LOAD16_BYTE( "epr-7472.5b", 0x030000, 0x8000, CRC(8e2762ec) SHA1(872e19a6aab81d7a2472367d0e31dc1295da7182) )
  4296: 
  4297: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4298: 	ROM_LOAD( "epr-7464.1b", 0x0000, 0x8000, CRC(9f291306) SHA1(96a09542a863ccf2ded43e2df6f913722b3f97b1) )
  4299: 
  4300: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  4301: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  4302: 
  4303: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  4304: 	ROM_LOAD( "epr7473.1c", 0x00000, 0x8000, CRC(06ec75fa) SHA1(5f14bc887449122700c46ad22c0379a1682e0bdb) )
  4305: 	ROM_LOAD( "epr7475.2c", 0x08000, 0x8000, CRC(7abd1206) SHA1(54d52dc0b9c245cd2df647e714310a71b803cbcf) )
  4306: 	ROM_LOAD( "epr7474.3c", 0x10000, 0x8000, CRC(dbf853b8) SHA1(e82f497e1144f23f3233b5c45ef182bfc7923715) )
  4307: 	ROM_LOAD( "epr7476.4c", 0x18000, 0x8000, CRC(5eba655a) SHA1(6713ef12037cba3139d0f469c82bd90b44bae8ce) )
  4308: ROM_END
  4309: 
  4310: ROM_START( quartt2j )
  4311: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4312: 	ROM_LOAD16_BYTE( "epr-7728.43",  0x000000, 0x8000, CRC(56a8c88e) SHA1(33eaca5272f3588058952ca0b1fa298b89418e81) )
  4313: 	ROM_LOAD16_BYTE( "epr-7725.26",  0x000001, 0x8000, CRC(ee15fcc9) SHA1(70d9755145245537f6aeb0d39abeda7811749b8c) )
  4314: 	ROM_LOAD16_BYTE( "epr-7729.42",  0x010000, 0x8000, CRC(bc242123) SHA1(8e58dd89b70ba06d12437010a7375464647262f5) )
  4315: 	ROM_LOAD16_BYTE( "epr-7726.25",  0x010001, 0x8000, CRC(9d1c48e7) SHA1(e11a358895c7809cdf7241ff9317c2b162e4040e) )
  4316: 	ROM_LOAD16_BYTE( "quartet2.b11", 0x020000, 0x8000, CRC(3a6a375d) SHA1(8ebea6b7f1208438b47e887b46cb569725c4042a) )
  4317: 	ROM_LOAD16_BYTE( "quartet2.b8",  0x020001, 0x8000, CRC(d87b2ca2) SHA1(58adf0900e41036b1b78a931ab94b30ce601909d) )
  4318: 
  4319: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4320: 	ROM_LOAD( "quartet2.c9",  0x00000, 0x08000, CRC(547a6058) SHA1(5248e974c8d12183c996b1fc8fda09e8a4bf0d2d) )
  4321: 	ROM_LOAD( "quartet2.c10", 0x08000, 0x08000, CRC(77ec901d) SHA1(b5961895473c16a8f4a111185cce48b05ab66885) )
  4322: 	ROM_LOAD( "quartet2.c11", 0x10000, 0x08000, CRC(7e348cce) SHA1(82bba65280faaf3280208c85caef48ec8baeade8) )
  4323: 
  4324: 	ROM_REGION( 0x040000, REGION_GFX2, 0 ) /* sprites */
  4325: 	ROM_LOAD16_BYTE( "epr7465.5c",  0x000001, 0x8000, CRC(8a1ab7d7) SHA1(a2f317538c70a1603b65d795223407cbaaf88524) )
  4326: 	ROM_LOAD16_BYTE( "epr-7469.2b", 0x000000, 0x8000, CRC(cb65ae4f) SHA1(3ee7b3b4cce113a6f394e8dfd317cdb6ffae64f7) )
  4327: 	ROM_LOAD16_BYTE( "epr7466.6c",  0x010001, 0x8000, CRC(b2d3f4f3) SHA1(65e654fde10bee4cb5eee8234d0babb78fe41cfb) )
  4328: 	ROM_LOAD16_BYTE( "epr-7470.3b", 0x010000, 0x8000, CRC(16fc67b1) SHA1(788fe2878c5c9faea43c2f166f32c22ee51c7d09) )
  4329: 	ROM_LOAD16_BYTE( "epr7467.7c",  0x020001, 0x8000, CRC(0af68de2) SHA1(81163baf3f0e45bac950a6d9c24b3a886db1509c) )
  4330: 	ROM_LOAD16_BYTE( "epr-7471.4b", 0x020000, 0x8000, CRC(13fad5ac) SHA1(75b480083fbb14cbef969126989bf9b2235fd31e) )
  4331: 	ROM_LOAD16_BYTE( "epr7468.8c",  0x030001, 0x8000, CRC(ddfd40c0) SHA1(6c12ad668cd0c82e7d7d46bfbdcee8b9d46ebd09) )
  4332: 	ROM_LOAD16_BYTE( "epr-7472.5b", 0x030000, 0x8000, CRC(8e2762ec) SHA1(872e19a6aab81d7a2472367d0e31dc1295da7182) )
  4333: 
  4334: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4335: 	ROM_LOAD( "epr-7464.1b", 0x0000, 0x8000, CRC(9f291306) SHA1(96a09542a863ccf2ded43e2df6f913722b3f97b1) )
  4336: 
  4337: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  4338: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  4339: 
  4340: 	ROM_REGION( 0x20000, REGION_SOUND1, 0 ) /* 7751 sound data */
  4341: 	ROM_LOAD( "epr7473.1c", 0x00000, 0x8000, CRC(06ec75fa) SHA1(5f14bc887449122700c46ad22c0379a1682e0bdb) )
  4342: 	ROM_LOAD( "epr7475.2c", 0x08000, 0x8000, CRC(7abd1206) SHA1(54d52dc0b9c245cd2df647e714310a71b803cbcf) )
  4343: 	ROM_LOAD( "epr7474.3c", 0x10000, 0x8000, CRC(dbf853b8) SHA1(e82f497e1144f23f3233b5c45ef182bfc7923715) )
  4344: 	ROM_LOAD( "epr7476.4c", 0x18000, 0x8000, CRC(5eba655a) SHA1(6713ef12037cba3139d0f469c82bd90b44bae8ce) )
  4345: ROM_END
  4346: 
  4347: /***************************************************************************/
  4348: 
  4349: #if 0 
  4350: static READ16_HANDLER( quartet2_skip_r ){
  4351: 	if (activecpu_get_pc()==0x8f6c) {cpu_spinuntil_int(); return 0xffff;}
  4352: 	return sys16_workingram[0x0800/2];
  4353: }
  4354: #endif 
  4355: 
  4356: static MEMORY_READ16_START( quartet2_readmem )
  4357: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  4358: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  4359: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  4360: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  4361: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  4362: 	{ 0xc40002, 0xc40003, sys16_coinctrl_r },
  4363: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  4364: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  4365: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  4366: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  4367: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  4368: //	{ 0xffc800, 0xffc801, quartet2_skip_r },
  4369: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  4370: MEMORY_END
  4371: 
  4372: static MEMORY_WRITE16_START( quartet2_writemem )
  4373: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  4374: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  4375: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  4376: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  4377: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  4378: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  4379: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  4380: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  4381: MEMORY_END
  4382: 
  4383: /***************************************************************************/
  4384: 
  4385: static void quartet2_update_proc( void ){
  4386: 	sys16_fg_scrollx = sys16_workingram[0x0d14/2] & 0x01ff;
  4387: 	sys16_bg_scrollx = sys16_workingram[0x0d18/2] & 0x01ff;
  4388: 	sys16_fg_scrolly = sys16_textram[0x792] & 0x00ff;
  4389: 	sys16_bg_scrolly = sys16_textram[0x793] & 0x01ff;
  4390: 
  4391: //let's fix this properly
  4392: //	if(((*(UINT16 *)(&sys16_extraram[4])) & 0xff) == 1)
  4393: //		sys16_quartet_title_kludge=1;
  4394: //	else
  4395: 		sys16_quartet_title_kludge=0;
  4396: 
  4397: 	set_fg_page1( sys16_workingram[0x0d1c/2] );
  4398: 	set_bg_page1( sys16_workingram[0x0d1e/2] );
  4399: }
  4400: 
  4401: static MACHINE_INIT( quartet2 ){
  4402: 	sys16_textmode=1;
  4403: 	sys16_spritesystem = sys16_sprite_quartet2;
  4404: 	sys16_sprxoffset = -0xbc;
  4405: 	sys16_fgxoffset = sys16_bgxoffset = 7;
  4406: 
  4407: 	sys16_update_proc = quartet2_update_proc;
  4408: }
  4409: 
  4410: static DRIVER_INIT( quartet2 ){
  4411: 	machine_init_sys16_onetime();
  4412: }
  4413: /***************************************************************************/
  4414: 
  4415: INPUT_PORTS_START( quartet2 )
  4416: 	SYS16_JOY1_SWAPPEDBUTTONS
  4417: 	SYS16_JOY2_SWAPPEDBUTTONS
  4418: 	SYS16_SERVICE
  4419: 	SYS16_COINAGE
  4420: 
  4421: PORT_START	/* DSW1 */
  4422: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  4423: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  4424: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4425: 	PORT_DIPNAME( 0x06, 0x00, "Credit Power" )
  4426: 	PORT_DIPSETTING(    0x04, "500" )
  4427: 	PORT_DIPSETTING(    0x06, "1000" )
  4428: 	PORT_DIPSETTING(    0x02, "2000" )
  4429: 	PORT_DIPSETTING(    0x00, "9000" )
  4430: 	PORT_DIPNAME( 0x18, 0x00, DEF_STR( Difficulty ) )
  4431: 	PORT_DIPSETTING(    0x10, "Easy" )
  4432: 	PORT_DIPSETTING(    0x18, "Normal" )
  4433: 	PORT_DIPSETTING(    0x08, "Hard" )
  4434: 	PORT_DIPSETTING(    0x00, "Hardest" )
  4435: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  4436: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  4437: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4438: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  4439: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  4440: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4441: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  4442: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  4443: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4444: 
  4445: INPUT_PORTS_END
  4446: 
  4447: /***************************************************************************/
  4448: 
  4449: static MACHINE_DRIVER_START( quartet2 )
  4450: 
  4451: 	/* basic machine hardware */
  4452: 	MDRV_IMPORT_FROM(system16_7751)
  4453: 	MDRV_CPU_MODIFY("main")
  4454: 	MDRV_CPU_MEMORY(quartet2_readmem,quartet2_writemem)
  4455: 
  4456: 	MDRV_MACHINE_INIT(quartet2)
  4457: MACHINE_DRIVER_END
  4458: 
  4459: /***************************************************************************
  4460: 
  4461:    Riot City
  4462: 
  4463: ***************************************************************************/
  4464: // sys16B
  4465: ROM_START( riotcity )
  4466: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  4467: 	ROM_LOAD16_BYTE( "epr14612.bin", 0x000000, 0x20000, CRC(a1b331ec) SHA1(49136ffed35ecc9e5e9a6ea7acbe534e6ccc9dd8) )
  4468: 	ROM_LOAD16_BYTE( "epr14610.bin", 0x000001, 0x20000, CRC(cd4f2c50) SHA1(c7a7e95901c664a72195c202b50a159db8d5981d) )
  4469: 	/* empty 0x40000 - 0x80000 */
  4470: 	ROM_LOAD16_BYTE( "epr14613.bin", 0x080000, 0x20000, CRC(0659df4c) SHA1(a24005ce354113732306c318de373c818400a9c8) )
  4471: 	ROM_LOAD16_BYTE( "epr14611.bin", 0x080001, 0x20000, CRC(d9e6f80b) SHA1(5ac56b3685bb121a4f07be3d81209807436e76ec) )
  4472: 
  4473: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4474: 	ROM_LOAD( "epr14616.bin", 0x00000, 0x20000, CRC(46d30368) SHA1(a791ef0e881345b6be0b28f32af17127edb5b590) ) /* plane 1 */
  4475: 	ROM_LOAD( "epr14625.bin", 0x20000, 0x20000, CRC(abfb80fe) SHA1(5f0d61d55f27e8f776b573e3193164c4d70ec12b) )
  4476: 	ROM_LOAD( "epr14617.bin", 0x40000, 0x20000, CRC(884e40f9) SHA1(f7eeae57544e7d95139588137605986732937d38) ) /* plane 2 */
  4477: 	ROM_LOAD( "epr14626.bin", 0x60000, 0x20000, CRC(4ef55846) SHA1(2f23474e7d1d8880dc251ada55c5fca2fc19256a) )
  4478: 	ROM_LOAD( "epr14618.bin", 0x80000, 0x20000, CRC(00eb260e) SHA1(f293180fb9a053c98022ef086bf4002563752f61) ) /* plane 3 */
  4479: 	ROM_LOAD( "epr14627.bin", 0xa0000, 0x20000, CRC(961e5f82) SHA1(dc88b511dff6cdebf96fe8bf388bf76098296b0f) )
  4480: 
  4481: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  4482: 	ROM_LOAD16_BYTE( "epr14619.bin",  0x000001, 0x040000, CRC(6f2b5ef7) SHA1(a0186fcc5b12c31b65b84355f88bcb10b1434135) )
  4483: 	ROM_LOAD16_BYTE( "epr14622.bin",  0x000000, 0x040000, CRC(7ca7e40d) SHA1(57d26cc1b530cb867b2a4779bb5108ac457b2154) )
  4484: 	ROM_LOAD16_BYTE( "epr14620.bin",  0x080001, 0x040000, CRC(66183333) SHA1(44bb9d57cd0308c0d7b6a10ba9bd95763ceea775) )
  4485: 	ROM_LOAD16_BYTE( "epr14623.bin",  0x080000, 0x040000, CRC(98630049) SHA1(216ae0b4a59f306b51bd50dfcbf831c3186a4d2a) )
  4486: 	ROM_LOAD16_BYTE( "epr14621.bin",  0x100001, 0x040000, CRC(c0f2820e) SHA1(ae433f6c5065ed495f5f57f50d6abe5ff98b041e) )
  4487: 	ROM_LOAD16_BYTE( "epr14624.bin",  0x100000, 0x040000, CRC(d1a68448) SHA1(7591f0476e899a11042d9b7e93f99b64de48b0ef) )
  4488: 
  4489: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  4490: 	ROM_LOAD( "epr14614.bin", 0x00000, 0x10000, CRC(c65cc69a) SHA1(28a75dd2085b8e1447fe4e6af210a54a6666fcb1) )
  4491: 	ROM_LOAD( "epr14615.bin", 0x10000, 0x20000, CRC(46653db1) SHA1(7a43d8742ee451d93bb5f1b0f4f261b274c3f0ef) )
  4492: ROM_END
  4493: 
  4494: /***************************************************************************/
  4495: 
  4496: static READ16_HANDLER( riotcity_skip_r ){
  4497: 	if (activecpu_get_pc()==0x3ce) {cpu_spinuntil_int(); return 0;}
  4498: 	return sys16_workingram[0x2cde/2];
  4499: }
  4500: 
  4501: static MEMORY_READ16_START( riotcity_readmem )
  4502: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  4503: 	{ 0x3f0000, 0x3fffff, SYS16_MRA16_EXTRAM },
  4504: 	{ 0xf20000, 0xf20fff, SYS16_MRA16_EXTRAM3 },
  4505: 	{ 0xf40000, 0xf40fff, SYS16_MRA16_SPRITERAM },
  4506: 	{ 0xf60000, 0xf60fff, SYS16_MRA16_PALETTERAM },
  4507: 	{ 0xf81002, 0xf81003, input_port_0_word_r }, // player1
  4508: 	{ 0xf81006, 0xf81007, input_port_1_word_r }, // player2
  4509: 	{ 0xf81000, 0xf81001, input_port_2_word_r }, // service
  4510: 	{ 0xf82002, 0xf82003, input_port_3_word_r }, // dip1
  4511: 	{ 0xf82000, 0xf82001, input_port_4_word_r }, // dip2
  4512: 	{ 0xfa0000, 0xfaffff, SYS16_MRA16_TILERAM },
  4513: 	{ 0xfb0000, 0xfb0fff, SYS16_MRA16_TEXTRAM },
  4514: 	{ 0xffecde, 0xffecdf, riotcity_skip_r },
  4515: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  4516: MEMORY_END
  4517: 
  4518: static MEMORY_WRITE16_START( riotcity_writemem )
  4519: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  4520: 	{ 0x3f0000, 0x3fffff, SYS16_MWA16_EXTRAM },
  4521: 	{ 0xf00006, 0xf00007, sound_command_w },
  4522: 	{ 0xf20000, 0xf20fff, SYS16_MWA16_EXTRAM3 },
  4523: 	{ 0xf40000, 0xf40fff, SYS16_MWA16_SPRITERAM },
  4524: 	{ 0xf60000, 0xf60fff, SYS16_MWA16_PALETTERAM },
  4525: 	{ 0xf80000, 0xf80001, sys16_coinctrl_w },
  4526: 	{ 0xfa0000, 0xfaffff, SYS16_MWA16_TILERAM },
  4527: 	{ 0xfb0000, 0xfb0fff, SYS16_MWA16_TEXTRAM },
  4528: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  4529: MEMORY_END
  4530: 
  4531: /***************************************************************************/
  4532: 
  4533: static void riotcity_update_proc (void)
  4534: {
  4535: 	sys16_fg_scrollx = sys16_textram[0x0e98/2];
  4536: 	sys16_bg_scrollx = sys16_textram[0x0e9a/2];
  4537: 	sys16_fg_scrolly = sys16_textram[0x0e90/2];
  4538: 	sys16_bg_scrolly = sys16_textram[0x0e92/2];
  4539: 
  4540: 	set_fg_page( sys16_textram[0x0e80/2] );
  4541: 	set_bg_page( sys16_textram[0x0e82/2] );
  4542: 
  4543: 	sys16_tile_bank1 = sys16_extraram3[0x0002/2] & 0xf;
  4544: 	sys16_tile_bank0 = sys16_extraram3[0x0000/2] & 0xf;
  4545: }
  4546: 
  4547: static MACHINE_INIT( riotcity ){
  4548: 	static int bank[16] = {
  4549: 		0x0,0x1,0x4,0x5,
  4550: 		0x8,0x9,0x0,0x0,
  4551: 		0x2,0x3,0x6,0x7,
  4552: 		0xa,0xb,0x0,0x0
  4553: 	};
  4554: 	sys16_obj_bank = bank;
  4555: 	sys16_spritesystem = sys16_sprite_aurail;
  4556: 	sys16_spritelist_end=0x8000;
  4557: 	sys16_bg_priority_mode=1;
  4558: 
  4559: 	sys16_update_proc = riotcity_update_proc;
  4560: }
  4561: 
  4562: static DRIVER_INIT( riotcity )
  4563: {
  4564: 	machine_init_sys16_onetime();
  4565: }
  4566: 
  4567: /***************************************************************************/
  4568: 
  4569: INPUT_PORTS_START( riotcity )
  4570: 	SYS16_JOY1
  4571: 	SYS16_JOY2
  4572: 	SYS16_SERVICE
  4573: 	SYS16_COINAGE
  4574: 
  4575: PORT_START	/* DSW1 */
  4576: 	PORT_DIPNAME( 0x01, 0x01, "2 Credits to Start" )
  4577: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  4578: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4579: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  4580: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  4581: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4582: 	PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Lives ) )
  4583: 	PORT_DIPSETTING(    0x00, "1" )
  4584: 	PORT_DIPSETTING(    0x0c, "2" )
  4585: 	PORT_DIPSETTING(    0x08, "3" )
  4586: 	PORT_DIPSETTING(    0x04, "4" )
  4587: 	PORT_DIPNAME( 0x30, 0x00, DEF_STR( Bonus_Life ) )
  4588: 	PORT_DIPSETTING(    0x20, "Easy" )
  4589: 	PORT_DIPSETTING(    0x30, "Normal" )
  4590: 	PORT_DIPSETTING(    0x10, "Hard" )
  4591: 	PORT_DIPSETTING(    0x00, "Hardest" )
  4592: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficulty ) )
  4593: 	PORT_DIPSETTING(    0x40, "Normal" )
  4594: 	PORT_DIPSETTING(    0x00, "Hard" )
  4595: 	PORT_DIPNAME( 0x80, 0x80, "Attack Button to Start" )
  4596: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  4597: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4598: INPUT_PORTS_END
  4599: 
  4600: /***************************************************************************/
  4601: 
  4602: static MACHINE_DRIVER_START( riotcity )
  4603: 
  4604: 	/* basic machine hardware */
  4605: 	MDRV_IMPORT_FROM(system16_7759)
  4606: 	MDRV_CPU_MODIFY("main")
  4607: 	MDRV_CPU_MEMORY(riotcity_readmem,riotcity_writemem)
  4608: 
  4609: 	MDRV_MACHINE_INIT(riotcity)
  4610: MACHINE_DRIVER_END
  4611: 
  4612: /***************************************************************************/
  4613: // sys16B
  4614: ROM_START( sdi )
  4615: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4616: 	ROM_LOAD16_BYTE( "a4.rom", 0x000000, 0x8000, CRC(f2c41dd6) SHA1(7fdbf819e42c7af0efe3976ffd919ee142efe1bc) )
  4617: 	ROM_LOAD16_BYTE( "a1.rom", 0x000001, 0x8000, CRC(a9f816ef) SHA1(5ccab14b088d2249f83ff5e80591eccb4afb6e20) )
  4618: 	ROM_LOAD16_BYTE( "a5.rom", 0x010000, 0x8000, CRC(7952e27e) SHA1(caead75724a6744fc6fc7fbbc9894932a7a22eed) )
  4619: 	ROM_LOAD16_BYTE( "a2.rom", 0x010001, 0x8000, CRC(369af326) SHA1(d6517c38f3a386e8f23b058fe8fa0607918ba215) )
  4620: 	ROM_LOAD16_BYTE( "a6.rom", 0x020000, 0x8000, CRC(8ee2c287) SHA1(8ed98334dab51c2eab8e1ff0724abc1f819dc8c2) )
  4621: 	ROM_LOAD16_BYTE( "a3.rom", 0x020001, 0x8000, CRC(193e4231) SHA1(14fecfab010641b83e5b24d0e8003bc0de35e1c8) )
  4622: 
  4623: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4624: 	ROM_LOAD( "b9.rom",  0x00000, 0x10000, CRC(182b6301) SHA1(bb6f1174f82611c801d2b4b7d3596bf71619e8a1) )
  4625: 	ROM_LOAD( "b10.rom", 0x10000, 0x10000, CRC(8f7129a2) SHA1(094a4065597d8d51fb2232546df1de9043fea731) )
  4626: 	ROM_LOAD( "b11.rom", 0x20000, 0x10000, CRC(4409411f) SHA1(84fd7128e8440d96b0384ae3c391a59bd37ecf9d) )
  4627: 
  4628: 	ROM_REGION( 0x60000, REGION_GFX2, 0 ) /* sprites */
  4629: 	ROM_LOAD16_BYTE( "b1.rom", 0x00001, 0x010000, CRC(30e2c50a) SHA1(1fb9e69d4cb97fdcb0f98c2a7ede246aaa4ac382) )
  4630: 	ROM_LOAD16_BYTE( "b5.rom", 0x00000, 0x010000, CRC(794e3e8b) SHA1(91ca1cb9aabf99adc8426feed4494a992afb8c4a) )
  4631: 	ROM_LOAD16_BYTE( "b2.rom", 0x20001, 0x010000, CRC(6a8b3fd0) SHA1(a122d3cb0b3263714f026e57d85b0dbf6cb110d7) )
  4632: 	ROM_LOAD16_BYTE( "b6.rom", 0x20000, 0x010000, CRC(602da5d5) SHA1(d32cdde7d86c4561e7bfa547d7d7995ce9a43c24) )
  4633: 	ROM_LOAD16_BYTE( "b3.rom", 0x40001, 0x010000, CRC(b9de3aeb) SHA1(2f7a55a8377e831338a884f8962d6ab2757e8c9b) )
  4634: 	ROM_LOAD16_BYTE( "b7.rom", 0x40000, 0x010000, CRC(0a73a057) SHA1(7f31124c67541a245e069e5b6aac59935d99a9a9) )
  4635: 
  4636: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4637: 	ROM_LOAD( "a7.rom", 0x0000, 0x8000, CRC(793f9f7f) SHA1(9e4fde376db9e99a83eb2fc734c6721c122ba9af) )
  4638: ROM_END
  4639: 
  4640: // sys16A
  4641: ROM_START( sdioj )
  4642: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  4643: // Custom cpu 317-0027
  4644: 	ROM_LOAD16_BYTE( "epr10970.43", 0x000000, 0x8000, CRC(b8fa4a2c) SHA1(06b448bbee0a2b2809d9af7a2a22c5847343c079) )
  4645: 	ROM_LOAD16_BYTE( "epr10968.26", 0x000001, 0x8000, CRC(a3f97793) SHA1(0f924fae0d13b3387a0e5171482f6d413432ddb3) )
  4646: 	ROM_LOAD16_BYTE( "epr10971.42", 0x010000, 0x8000, CRC(c44a0328) SHA1(3736bb83e728bb0e15ea58bc2a6c2fe66a1a4885) )
  4647: 	ROM_LOAD16_BYTE( "epr10969.25", 0x010001, 0x8000, CRC(455d15bd) SHA1(be679ecb1687b0675614ad27973c20808ad53797) )
  4648: 	ROM_LOAD16_BYTE( "epr10755.41", 0x020000, 0x8000, CRC(405e3969) SHA1(6d8c3bd06d35c971f7db005dffa2e83cae1378f8) )
  4649: 	ROM_LOAD16_BYTE( "epr10752.24", 0x020001, 0x8000, CRC(77453740) SHA1(9032463e5e14c3c610c31e2eb6e2c962df9adf46) )
  4650: 
  4651: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4652: 	ROM_LOAD( "epr10756.95", 0x00000, 0x10000, CRC(44d8a506) SHA1(363d49dcb65ac0093f3ed3b259b1bc45f0291e9d) )
  4653: 	ROM_LOAD( "epr10757.94", 0x10000, 0x10000, CRC(497e1740) SHA1(95b166a9db46a27087e417c1b2cbb76bee2e64a7) )
  4654: 	ROM_LOAD( "epr10758.93", 0x20000, 0x10000, CRC(61d61486) SHA1(d48ff87216947b78903cd98a10436babdf8b75a0) )
  4655: 
  4656: 	ROM_REGION( 0x60000, REGION_GFX2, 0 ) /* sprites */
  4657: 	ROM_LOAD16_BYTE( "b1.rom", 0x00001, 0x10000, CRC(30e2c50a) SHA1(1fb9e69d4cb97fdcb0f98c2a7ede246aaa4ac382) )
  4658: 	ROM_LOAD16_BYTE( "b5.rom", 0x00000, 0x10000, CRC(794e3e8b) SHA1(91ca1cb9aabf99adc8426feed4494a992afb8c4a) )
  4659: 	ROM_LOAD16_BYTE( "b2.rom", 0x20001, 0x10000, CRC(6a8b3fd0) SHA1(a122d3cb0b3263714f026e57d85b0dbf6cb110d7) )
  4660: 	ROM_LOAD16_BYTE( "b6.rom", 0x20000, 0x10000, CRC(602da5d5) SHA1(d32cdde7d86c4561e7bfa547d7d7995ce9a43c24) )
  4661: 	ROM_LOAD16_BYTE( "b3.rom", 0x40001, 0x10000, CRC(b9de3aeb) SHA1(2f7a55a8377e831338a884f8962d6ab2757e8c9b) )
  4662: 	ROM_LOAD16_BYTE( "b7.rom", 0x40000, 0x10000, CRC(0a73a057) SHA1(7f31124c67541a245e069e5b6aac59935d99a9a9) )
  4663: 
  4664: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  4665: 	ROM_LOAD( "epr10759.12", 0x0000, 0x8000, CRC(d7f9649f) SHA1(ce4abe7dd7e33da048569d7817063345fab75ea7) )
  4666: ROM_END
  4667: 
  4668: 
  4669: /***************************************************************************/
  4670: 
  4671: static READ16_HANDLER( io_p1mousex_r ){ return 0xff-input_port_5_r( offset ); }
  4672: static READ16_HANDLER( io_p1mousey_r ){ return input_port_6_r( offset ); }
  4673: 
  4674: static READ16_HANDLER( io_p2mousex_r ){ return input_port_7_r( offset ); }
  4675: static READ16_HANDLER( io_p2mousey_r ){ return input_port_8_r( offset ); }
  4676: 
  4677: static READ16_HANDLER( sdi_skip_r ){
  4678: 	if (activecpu_get_pc()==0x5326) {cpu_spinuntil_int(); return 0xffff;}
  4679: 	return sys16_workingram[0x0400/2];
  4680: }
  4681: 
  4682: static MEMORY_READ16_START( sdi_readmem )
  4683: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  4684: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  4685: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  4686: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  4687: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  4688: 	{ 0xc41004, 0xc41005, input_port_0_word_r }, // player1
  4689: 	{ 0xc41002, 0xc41003, input_port_1_word_r }, // player2
  4690: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  4691: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  4692: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  4693: 	{ 0xc42004, 0xc42005, input_port_4_word_r }, // dip2
  4694: 	{ 0xc43000, 0xc43001, io_p1mousex_r },
  4695: 	{ 0xc43004, 0xc43005, io_p1mousey_r },
  4696: 	{ 0xc43008, 0xc43009, io_p2mousex_r },
  4697: 	{ 0xc4300c, 0xc4300d, io_p2mousey_r },
  4698: //	{ 0xc42000, 0xc42001, MRA16_NOP }, /* What is this? */
  4699: 	{ 0xc60000, 0xc60001, MRA16_NOP }, /* What is this? */
  4700: 	{ 0xffc400, 0xffc401, sdi_skip_r },
  4701: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  4702: MEMORY_END
  4703: 
  4704: static MEMORY_WRITE16_START( sdi_writemem )
  4705: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  4706: 	{ 0x123406, 0x123407, sound_command_w },
  4707: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  4708: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  4709: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  4710: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  4711: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  4712: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  4713: MEMORY_END
  4714: 
  4715: /***************************************************************************/
  4716: 
  4717: static void sdi_update_proc( void ){
  4718: 	set_fg_page( sys16_textram[0x740] );
  4719: 	set_bg_page( sys16_textram[0x741] );
  4720: 	sys16_fg_scrolly = sys16_textram[0x748];
  4721: 	sys16_bg_scrolly = sys16_textram[0x749];
  4722: 	sys16_fg_scrollx = sys16_textram[0x74c];
  4723: 	sys16_bg_scrollx = sys16_textram[0x74d];
  4724: }
  4725: 
  4726: static MACHINE_INIT( sdi ){
  4727: 	static int bank[16] = {
  4728: 		0,0,0,0,
  4729: 		0,0,0,3,
  4730: 		0,0,0,2,
  4731: 		0,1,0,0
  4732: 	};
  4733: 	sys16_obj_bank = bank;
  4734: 
  4735: 	sys16_patch_code( 0x102f2, 0x00 );
  4736: 	sys16_patch_code( 0x102f3, 0x02 );
  4737: 
  4738: 	sys16_update_proc = sdi_update_proc;
  4739: }
  4740: 
  4741: static DRIVER_INIT( sdi ){
  4742: 	machine_init_sys16_onetime();
  4743: 	sys18_splittab_bg_x=&sys16_textram[0x0fc0];
  4744: 	sys16_rowscroll_scroll=0xff00;
  4745: }
  4746: 
  4747: /***************************************************************************/
  4748: 
  4749: INPUT_PORTS_START( sdi )
  4750: PORT_START	/* DSW1 */
  4751: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN  | IPF_8WAY )
  4752: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP    | IPF_8WAY )
  4753: 	PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY )
  4754: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT  | IPF_8WAY )
  4755: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN  | IPF_8WAY | IPF_PLAYER2)
  4756: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP    | IPF_8WAY | IPF_PLAYER2)
  4757: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT | IPF_8WAY | IPF_PLAYER2)
  4758: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT  | IPF_8WAY | IPF_PLAYER2)
  4759: 
  4760: 	SYS16_JOY2
  4761: 
  4762: PORT_START /* Service */
  4763: 	PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  4764: 	PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  4765: 	PORT_BITX(0x04, IP_ACTIVE_LOW, IPT_SERVICE, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  4766: 	PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
  4767: 	PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
  4768: 	PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
  4769: 	PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
  4770: 	PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2)
  4771: 
  4772: 	SYS16_COINAGE
  4773: 
  4774: PORT_START	/* DSW1 */
  4775: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
  4776: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  4777: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4778: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  4779: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  4780: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4781: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  4782: 	PORT_DIPSETTING(    0x08, "2" )
  4783: 	PORT_DIPSETTING(    0x0c, "3" )
  4784: 	PORT_DIPSETTING(    0x04, "4" )
  4785: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "240?", IP_KEY_NONE, IP_JOY_NONE )
  4786: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  4787: 	PORT_DIPSETTING(    0x20, "Easy" )
  4788: 	PORT_DIPSETTING(    0x30, "Normal" )
  4789: 	PORT_DIPSETTING(    0x10, "Hard" )
  4790: 	PORT_DIPSETTING(    0x00, "Hardest" )
  4791: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Bonus_Life ) )
  4792: 	PORT_DIPSETTING(    0x80, "Every 50000" )
  4793: 	PORT_DIPSETTING(    0xc0, "50000" )
  4794: 	PORT_DIPSETTING(    0x40, "100000" )
  4795: 	PORT_DIPSETTING(    0x00, "None" )
  4796: 
  4797: 	PORT_START				/* fake analog X */
  4798: 	PORT_ANALOG( 0xff, 0x80, IPT_TRACKBALL_X, 75, 1, 0, 255 )
  4799: 
  4800: 	PORT_START				/* fake analog Y */
  4801: 	PORT_ANALOG( 0xff, 0x80, IPT_TRACKBALL_Y, 75, 1, 0, 255 )
  4802: 
  4803: 	PORT_START				/* fake analog X */
  4804: 	PORT_ANALOG( 0xff, 0x80, IPT_TRACKBALL_X | IPF_PLAYER2 , 75, 1, 0, 255 )
  4805: 
  4806: 	PORT_START				/* fake analog Y */
  4807: 	PORT_ANALOG( 0xff, 0x80, IPT_TRACKBALL_Y | IPF_PLAYER2, 75, 1, 0, 255 )
  4808: 
  4809: INPUT_PORTS_END
  4810: 
  4811: /***************************************************************************/
  4812: 
  4813: static MACHINE_DRIVER_START( sdi )
  4814: 
  4815: 	/* basic machine hardware */
  4816: 	MDRV_IMPORT_FROM(system16)
  4817: 	MDRV_CPU_MODIFY("main")
  4818: 	MDRV_CPU_MEMORY(sdi_readmem,sdi_writemem)
  4819: 
  4820: 	MDRV_MACHINE_INIT(sdi)
  4821: MACHINE_DRIVER_END
  4822: 
  4823: /***************************************************************************/
  4824: 
  4825: 
  4826: /***************************************************************************/
  4827: // sys16B
  4828: ROM_START( shinobi )
  4829: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  4830: 	ROM_LOAD16_BYTE( "shinobi.a4", 0x00000, 0x10000, CRC(b930399d) SHA1(955ff2948e1990463631b0bc5c7f5275384236cc) )
  4831: 	ROM_LOAD16_BYTE( "shinobi.a1", 0x00001, 0x10000, CRC(343f4c46) SHA1(2cf5d00462ad85ae9a2e16d59171c8ab85e10f49) )
  4832: 	ROM_LOAD16_BYTE( "epr11283",   0x20000, 0x10000, CRC(9d46e707) SHA1(37ab25b3b37365c9f45837bfb6ec80652691dd4c) )
  4833: 	ROM_LOAD16_BYTE( "epr11281",   0x20001, 0x10000, CRC(7961d07e) SHA1(38cbdab35f901532c0ad99ad0083513abd2ff182) )
  4834: 
  4835: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4836: 	ROM_LOAD( "shinobi.b9",  0x00000, 0x10000, CRC(5f62e163) SHA1(03f008745a1af84142ada647acf3601049f43ad5) )
  4837: 	ROM_LOAD( "shinobi.b10", 0x10000, 0x10000, CRC(75f8fbc9) SHA1(29072edcd583af60ec66b4c8bb82b179a3751edf) )
  4838: 	ROM_LOAD( "shinobi.b11", 0x20000, 0x10000, CRC(06508bb9) SHA1(57c9036123ec8e35d0275ab6eaff25a16aa203d4) )
  4839: 
  4840: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  4841: 	ROM_LOAD16_BYTE( "epr11290.10", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
  4842: 	ROM_LOAD16_BYTE( "epr11294.11", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
  4843: 	ROM_LOAD16_BYTE( "epr11291.17", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
  4844: 	ROM_LOAD16_BYTE( "epr11295.18", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
  4845: 	ROM_LOAD16_BYTE( "epr11292.23", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
  4846: 	ROM_LOAD16_BYTE( "epr11296.24", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
  4847: 	ROM_LOAD16_BYTE( "epr11293.29", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
  4848: 	ROM_LOAD16_BYTE( "epr11297.30", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
  4849: 
  4850: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  4851: 	ROM_LOAD( "shinobi.a7", 0x00000, 0x8000, CRC(2457a7cf) SHA1(ddfac640e442537acb015de8bb088659f5a217ee) )
  4852: 	ROM_LOAD( "shinobi.a8", 0x10000, 0x8000, CRC(c8df8460) SHA1(0aeb41a493df155edb5f600f53ec43b798927dff) )
  4853: 	ROM_LOAD( "shinobi.a9", 0x18000, 0x8000, CRC(e5a4cf30) SHA1(d1982da7a550c11ab2253f5d64ac6ab847da0a04) )
  4854: ROM_END
  4855: 
  4856: ROM_START( shinobib )
  4857: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  4858: // Custom cpu 317-0049
  4859: 	ROM_LOAD16_BYTE( "epr11282", 0x00000, 0x10000, CRC(5f2e5524) SHA1(9e5fcabb95abbe6c8178e82f4971abdbc92bff73) )
  4860: 	ROM_LOAD16_BYTE( "epr11280", 0x00001, 0x10000, CRC(bdfe5c38) SHA1(65f537e38b74c66576d57c770d182dc13302cca6) )
  4861: 	ROM_LOAD16_BYTE( "epr11283", 0x20000, 0x10000, CRC(9d46e707) SHA1(37ab25b3b37365c9f45837bfb6ec80652691dd4c) )
  4862: 	ROM_LOAD16_BYTE( "epr11281", 0x20001, 0x10000, CRC(7961d07e) SHA1(38cbdab35f901532c0ad99ad0083513abd2ff182) )
  4863: 
  4864: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  4865: 	ROM_LOAD( "shinobi.b9",  0x00000, 0x10000, CRC(5f62e163) SHA1(03f008745a1af84142ada647acf3601049f43ad5) )
  4866: 	ROM_LOAD( "shinobi.b10", 0x10000, 0x10000, CRC(75f8fbc9) SHA1(29072edcd583af60ec66b4c8bb82b179a3751edf) )
  4867: 	ROM_LOAD( "shinobi.b11", 0x20000, 0x10000, CRC(06508bb9) SHA1(57c9036123ec8e35d0275ab6eaff25a16aa203d4) )
  4868: 
  4869: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  4870: 	ROM_LOAD16_BYTE( "epr11290.10", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
  4871: 	ROM_LOAD16_BYTE( "epr11294.11", 0x10000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
  4872: 	ROM_LOAD16_BYTE( "epr11291.17", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
  4873: 	ROM_LOAD16_BYTE( "epr11295.18", 0x30000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
  4874: 	ROM_LOAD16_BYTE( "epr11292.23", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
  4875: 	ROM_LOAD16_BYTE( "epr11296.24", 0x50000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
  4876: 	ROM_LOAD16_BYTE( "epr11293.29", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
  4877: 	ROM_LOAD16_BYTE( "epr11297.30", 0x70000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
  4878: 
  4879: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  4880: 	ROM_LOAD( "shinobi.a7", 0x00000, 0x8000, CRC(2457a7cf) SHA1(ddfac640e442537acb015de8bb088659f5a217ee) )
  4881: 	ROM_LOAD( "shinobi.a8", 0x10000, 0x8000, CRC(c8df8460) SHA1(0aeb41a493df155edb5f600f53ec43b798927dff) )
  4882: 	ROM_LOAD( "shinobi.a9", 0x18000, 0x8000, CRC(e5a4cf30) SHA1(d1982da7a550c11ab2253f5d64ac6ab847da0a04) )
  4883: 
  4884: ROM_END
  4885: 
  4886: /***************************************************************************/
  4887: 
  4888: static READ16_HANDLER( shinobi_skip_r ){
  4889: 	if (activecpu_get_pc()==0x32e0) {cpu_spinuntil_int(); return 1<<8;}
  4890: 	return sys16_workingram[0x301c/2];
  4891: }
  4892: 
  4893: static MEMORY_READ16_START( shinobi_readmem )
  4894: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  4895: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  4896: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  4897: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  4898: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  4899: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  4900: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  4901: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  4902: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  4903: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  4904: 	{ 0xc43000, 0xc43001, MRA16_NOP },
  4905: 	{ 0xfff01c, 0xfff01d, shinobi_skip_r },
  4906: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  4907: MEMORY_END
  4908: 
  4909: static MEMORY_WRITE16_START( shinobi_writemem )
  4910: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  4911: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  4912: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  4913: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  4914: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  4915: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  4916: 	{ 0xc43000, 0xc43001, MWA16_NOP },
  4917: 	{ 0xfe0006, 0xfe0007, sound_command_w },
  4918: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  4919: MEMORY_END
  4920: 
  4921: /***************************************************************************/
  4922: 
  4923: static void shinobi_update_proc( void ){
  4924: 	set_fg_page( sys16_textram[0x740] );
  4925: 	set_bg_page( sys16_textram[0x741] );
  4926: 	sys16_fg_scrolly = sys16_textram[0x748];
  4927: 	sys16_bg_scrolly = sys16_textram[0x749];
  4928: 	sys16_fg_scrollx = sys16_textram[0x74c];
  4929: 	sys16_bg_scrollx = sys16_textram[0x74d];
  4930: }
  4931: 
  4932: static MACHINE_INIT( shinobi ){
  4933: 	static int bank[16] = {
  4934: 		0,0,0,0,
  4935: 		0,0,0,3,
  4936: 		0,0,0,2,
  4937: 		0,1,0,0
  4938: 	};
  4939: 	sys16_obj_bank = bank;
  4940: 	sys16_dactype = 1;
  4941: 	sys16_update_proc = shinobi_update_proc;
  4942: }
  4943: 
  4944: static DRIVER_INIT( shinobi )
  4945: {
  4946: 	machine_init_sys16_onetime();
  4947: }
  4948: 
  4949: /***************************************************************************/
  4950: 
  4951: INPUT_PORTS_START( shinobi )
  4952: 	SYS16_JOY1
  4953: 	SYS16_JOY2
  4954: 	SYS16_SERVICE
  4955: 	SYS16_COINAGE
  4956: 
  4957: PORT_START
  4958: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )
  4959: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  4960: 	PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
  4961: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  4962: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  4963: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  4964: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  4965: 	PORT_DIPSETTING(    0x08, "2" )
  4966: 	PORT_DIPSETTING(    0x0c, "3" )
  4967: 	PORT_DIPSETTING(    0x04, "5" )
  4968: 	PORT_BITX( 0,       0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "240", IP_KEY_NONE, IP_JOY_NONE )
  4969: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  4970: 	PORT_DIPSETTING(    0x20, "Easy" )
  4971: 	PORT_DIPSETTING(    0x30, "Normal" )
  4972: 	PORT_DIPSETTING(    0x10, "Hard" )
  4973: 	PORT_DIPSETTING(    0x00, "Hardest" )
  4974: 	PORT_DIPNAME( 0x40, 0x40, "Enemy's Bullet Speed" )
  4975: 	PORT_DIPSETTING(    0x40, "Slow" )
  4976: 	PORT_DIPSETTING(    0x00, "Fast" )
  4977: 	PORT_DIPNAME( 0x80, 0x80, "Language" )
  4978: 	PORT_DIPSETTING(    0x80, "Japanese" )
  4979: 	PORT_DIPSETTING(    0x00, "English" )
  4980: 
  4981: INPUT_PORTS_END
  4982: 
  4983: /***************************************************************************/
  4984: 
  4985: static MACHINE_DRIVER_START( shinobi )
  4986: 
  4987: 	/* basic machine hardware */
  4988: 	MDRV_IMPORT_FROM(system16_7759)
  4989: 	MDRV_CPU_MODIFY("main")
  4990: 	MDRV_CPU_MEMORY(shinobi_readmem,shinobi_writemem)
  4991: 
  4992: 	MDRV_MACHINE_INIT(shinobi)
  4993: MACHINE_DRIVER_END
  4994: 
  4995: /***************************************************************************/
  4996: // sys16A
  4997: ROM_START( shinobia )
  4998: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
  4999: // custom cpu 317-0050
  5000: 	ROM_LOAD16_BYTE( "epr11262.42", 0x000000, 0x10000, CRC(d4b8df12) SHA1(64bfa2dd8a3d99728d9eeb114887272d9590d0b8) )
  5001: 	ROM_LOAD16_BYTE( "epr11260.27", 0x000001, 0x10000, CRC(2835c95d) SHA1(b5b42af265d3a16183e02d58b053ec2894072679) )
  5002: 	ROM_LOAD16_BYTE( "epr11263.43", 0x020000, 0x10000, CRC(a2a620bd) SHA1(f8b135ce14d6c5eac5e40ddfd5ad2f1e6f2bc7a6) )
  5003: 	ROM_LOAD16_BYTE( "epr11261.25", 0x020001, 0x10000, CRC(a3ceda52) SHA1(97a1c52a162fb1d43b3f8f16613b70ce582a8d26) )
  5004: 
  5005: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5006: 	ROM_LOAD( "epr11264.95", 0x00000, 0x10000, CRC(46627e7d) SHA1(66bb5b22a2100e7b9df303007a837bc2d52cf7ba) )
  5007: 	ROM_LOAD( "epr11265.94", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) )
  5008: 	ROM_LOAD( "epr11266.93", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) )
  5009: 
  5010: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
  5011: 	ROM_LOAD16_BYTE( "epr11290.10", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
  5012: 	ROM_LOAD16_BYTE( "epr11294.11", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
  5013: 	ROM_LOAD16_BYTE( "epr11291.17", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
  5014: 	ROM_LOAD16_BYTE( "epr11295.18", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
  5015: 	ROM_LOAD16_BYTE( "epr11292.23", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
  5016: 	ROM_LOAD16_BYTE( "epr11296.24", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
  5017: 	ROM_LOAD16_BYTE( "epr11293.29", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
  5018: 	ROM_LOAD16_BYTE( "epr11297.30", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
  5019: 
  5020: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  5021: 	ROM_LOAD( "epr11267.12", 0x0000, 0x8000, CRC(dd50b745) SHA1(52e1977569d3713ad864d607170c9a61cd059a65) )
  5022: 
  5023: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  5024: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  5025: 
  5026: 	ROM_REGION( 0x08000, REGION_SOUND1, 0 ) /* 7751 sound data */
  5027: 	ROM_LOAD( "epr11268.1", 0x0000, 0x8000, CRC(6d7966da) SHA1(90f55a99f784c21d7c135e630f4e8b1d4d043d66) )
  5028: ROM_END
  5029: 
  5030: 
  5031: ROM_START( shinobl )
  5032: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
  5033: // Star Bootleg
  5034: 	ROM_LOAD16_BYTE( "b3",          0x000000, 0x10000, CRC(38e59646) SHA1(6a13015a93260ab99811b95950bb122eade01c27) )
  5035: 	ROM_LOAD16_BYTE( "b1",          0x000001, 0x10000, CRC(8529d192) SHA1(202b912d20a2d82abe055b4a5e8c509ab7d69ff8) )
  5036: 	ROM_LOAD16_BYTE( "epr11263.43", 0x020000, 0x10000, CRC(a2a620bd) SHA1(f8b135ce14d6c5eac5e40ddfd5ad2f1e6f2bc7a6) )
  5037: 	ROM_LOAD16_BYTE( "epr11261.25", 0x020001, 0x10000, CRC(a3ceda52) SHA1(97a1c52a162fb1d43b3f8f16613b70ce582a8d26) )
  5038: 
  5039: // Beta Bootleg
  5040: //	ROM_LOAD16_BYTE( "4",           0x000000, 0x10000, CRC(c178a39c) )
  5041: //	ROM_LOAD16_BYTE( "2",           0x000001, 0x10000, CRC(5ad8ebf2) )
  5042: //	ROM_LOAD16_BYTE( "epr11263.43", 0x020000, 0x10000, CRC(a2a620bd) SHA1(f8b135ce14d6c5eac5e40ddfd5ad2f1e6f2bc7a6) )
  5043: //	ROM_LOAD16_BYTE( "epr11261.25", 0x020001, 0x10000, CRC(a3ceda52) SHA1(97a1c52a162fb1d43b3f8f16613b70ce582a8d26) )
  5044: 
  5045: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5046: 	ROM_LOAD( "epr11264.95", 0x00000, 0x10000, CRC(46627e7d) SHA1(66bb5b22a2100e7b9df303007a837bc2d52cf7ba) )
  5047: 	ROM_LOAD( "epr11265.94", 0x10000, 0x10000, CRC(87d0f321) SHA1(885b38eaff2dcaeab4eeaa20cc8a2885d520abd6) )
  5048: 	ROM_LOAD( "epr11266.93", 0x20000, 0x10000, CRC(efb4af87) SHA1(0b8a905023e1bc808fd2b1c3cfa3778cde79e659) )
  5049: 
  5050: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
  5051: 	ROM_LOAD16_BYTE( "epr11290.10", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
  5052: 	ROM_LOAD16_BYTE( "epr11294.11", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
  5053: 	ROM_LOAD16_BYTE( "epr11291.17", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
  5054: 	ROM_LOAD16_BYTE( "epr11295.18", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
  5055: 	ROM_LOAD16_BYTE( "epr11292.23", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
  5056: 	ROM_LOAD16_BYTE( "epr11296.24", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
  5057: 	ROM_LOAD16_BYTE( "epr11293.29", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
  5058: //	ROM_LOAD16_BYTE( "epr11297.30", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
  5059: 	ROM_LOAD16_BYTE( "b17",         0x60000, 0x10000, CRC(0315cf42) SHA1(2d129171aece883cb9c2805f894b3867ec98332b) )	// Beta bootleg uses the rom above.
  5060: 
  5061: 	ROM_REGION( 0x20000, REGION_CPU2, 0 ) /* sound CPU */
  5062: 	ROM_LOAD( "epr11267.12", 0x0000, 0x8000, CRC(dd50b745) SHA1(52e1977569d3713ad864d607170c9a61cd059a65) )
  5063: 
  5064: 	ROM_REGION( 0x1000, REGION_CPU3, 0 )      /* 4k for 7751 onboard ROM */
  5065: 	ROM_LOAD( "7751.bin",     0x0000, 0x0400, CRC(6a9534fc) SHA1(67ad94674db5c2aab75785668f610f6f4eccd158) ) /* 7751 - U34 */
  5066: 
  5067: 	ROM_REGION( 0x08000, REGION_SOUND1, 0 ) /* 7751 sound data */
  5068: 	ROM_LOAD( "epr11268.1", 0x0000, 0x8000, CRC(6d7966da) SHA1(90f55a99f784c21d7c135e630f4e8b1d4d043d66) )
  5069: ROM_END
  5070: 
  5071: /***************************************************************************/
  5072: 
  5073: static MEMORY_READ16_START( shinobl_readmem )
  5074: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  5075: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5076: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5077: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  5078: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  5079: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  5080: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  5081: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  5082: 	{ 0xc42000, 0xc42001, input_port_3_word_r }, // dip1
  5083: 	{ 0xc42002, 0xc42003, input_port_4_word_r }, // dip2
  5084: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  5085: MEMORY_END
  5086: 
  5087: static MEMORY_WRITE16_START( shinobl_writemem )
  5088: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  5089: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5090: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5091: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  5092: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  5093: 	{ 0xc40000, 0xc40001, sound_command_nmi_w },
  5094: 	{ 0xc40002, 0xc40003, sys16_3d_coinctrl_w },
  5095: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  5096: MEMORY_END
  5097: 
  5098: /***************************************************************************/
  5099: 
  5100: static void shinobl_update_proc( void ){
  5101: 	set_bg_page( sys16_textram[0x74e] );
  5102: 	set_fg_page( sys16_textram[0x74f] );
  5103: 	sys16_fg_scrolly = sys16_textram[0x792] & 0x00ff;
  5104: 	sys16_bg_scrolly = sys16_textram[0x793] & 0x01ff;
  5105: 	sys16_fg_scrollx = sys16_textram[0x7fc] & 0x01ff;
  5106: 	sys16_bg_scrollx = sys16_textram[0x7fd] & 0x01ff;
  5107: }
  5108: 
  5109: static MACHINE_INIT( shinobl ){
  5110: 	static int bank[] = {
  5111: 		0,2,4,6,
  5112: 		1,3,5,7
  5113: 	};
  5114: 	sys16_obj_bank = bank;
  5115: 	sys16_textmode=1;
  5116: 	sys16_spritesystem = sys16_sprite_quartet2;
  5117: 	sys16_sprxoffset = -0xbc;
  5118: 	sys16_fgxoffset = sys16_bgxoffset = 7;
  5119: 	sys16_tilebank_switch=0x2000;
  5120: 
  5121: 	sys16_dactype = 1;
  5122: 	sys16_update_proc = shinobl_update_proc;
  5123: }
  5124: 
  5125: 
  5126: 
  5127: /***************************************************************************/
  5128: 
  5129: static MACHINE_DRIVER_START( shinobl )
  5130: 
  5131: 	/* basic machine hardware */
  5132: 	MDRV_IMPORT_FROM(system16_7751)
  5133: 	MDRV_CPU_MODIFY("main")
  5134: 	MDRV_CPU_MEMORY(shinobl_readmem,shinobl_writemem)
  5135: 
  5136: 	MDRV_MACHINE_INIT(shinobl)
  5137: MACHINE_DRIVER_END
  5138: 
  5139: /***************************************************************************/
  5140: 
  5141: // sys16A custom
  5142: ROM_START( tetris )
  5143: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  5144: 	ROM_LOAD16_BYTE( "epr12201.rom", 0x000000, 0x8000, CRC(338e9b51) SHA1(f56a1124c963d4ad72a806b26f9aa906aaa37d2b) )
  5145: 	ROM_LOAD16_BYTE( "epr12200.rom", 0x000001, 0x8000, CRC(fb058779) SHA1(0045985ea943ebc7e44bd95127c5e5212c2821e8) )
  5146: 
  5147: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5148: 	ROM_LOAD( "epr12202.rom", 0x00000, 0x10000, CRC(2f7da741) SHA1(51a685673b4a57a13818eca65d122230f20bd9a0) )
  5149: 	ROM_LOAD( "epr12203.rom", 0x10000, 0x10000, CRC(a6e58ec5) SHA1(5a6c43c989768270e0ab61cfaa5ef86d4607fe20) )
  5150: 	ROM_LOAD( "epr12204.rom", 0x20000, 0x10000, CRC(0ae98e23) SHA1(f067b81b85f9e03a6373c7c53ff52d5395b8a985) )
  5151: 
  5152: 	ROM_REGION( 0x10000, REGION_GFX2, 0 ) /* sprites */
  5153: 	ROM_LOAD16_BYTE( "epr12169.rom", 0x0001, 0x8000, CRC(dacc6165) SHA1(87b1a7643e3630ff73b2b117752496e1ea5da23d) )
  5154: 	ROM_LOAD16_BYTE( "epr12170.rom", 0x0000, 0x8000, CRC(87354e42) SHA1(e7fd55aee59b51d82cb9b619fbb815ad6839560c) )
  5155: 
  5156: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  5157: 	ROM_LOAD( "epr12205.rom", 0x0000, 0x8000, CRC(6695dc99) SHA1(08123aa24c302bc9243329384bd9c2545a4d50c3) )
  5158: ROM_END
  5159: 
  5160: // sys16B
  5161: ROM_START( tetrisbl )
  5162: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  5163: 	ROM_LOAD16_BYTE( "rom2.bin", 0x000000, 0x10000, CRC(4d165c38) SHA1(04706b1977ae18bd09bafaf8ea65f8e5f32e04b8) )
  5164: 	ROM_LOAD16_BYTE( "rom1.bin", 0x000001, 0x10000, CRC(1e912131) SHA1(8f53504ac08942ee340489d84eab825e654d0a2c) )
  5165: 
  5166: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5167: 	ROM_LOAD( "scr01.rom", 0x00000, 0x10000, CRC(62640221) SHA1(c311d3847a981d0e1609f9b3d80481565d32d78c) )
  5168: 	ROM_LOAD( "scr02.rom", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) )
  5169: 	ROM_LOAD( "scr03.rom", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) )
  5170: 
  5171: 	ROM_REGION( 0x020000, REGION_GFX2, 0 ) /* sprites */
  5172: 	ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) )
  5173: 	ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) )
  5174: 
  5175: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  5176: 	ROM_LOAD( "s-prog.rom", 0x0000, 0x8000, CRC(bd9ba01b) SHA1(fafa7dc36cc057a50ae4cdf7a35f3594292336f4) )
  5177: ROM_END
  5178: 
  5179: // sys16B
  5180: ROM_START( tetrisa )
  5181: 	ROM_REGION( 0x020000, REGION_CPU1, 0 ) /* 68000 code */
  5182: // Custom Cpu 317-0092
  5183: 	ROM_LOAD16_BYTE( "tetris.a7", 0x000000, 0x10000, CRC(9ce15ac9) SHA1(0fdbd3ca37e4c0efa7c66415714bfc10637ced6c) )
  5184: 	ROM_LOAD16_BYTE( "tetris.a5", 0x000001, 0x10000, CRC(98d590ca) SHA1(4d18409c0b5734d0adcea5646d13f65b687dd05d) )
  5185: 
  5186: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5187: 	ROM_LOAD( "scr01.rom", 0x00000, 0x10000, CRC(62640221) SHA1(c311d3847a981d0e1609f9b3d80481565d32d78c) )
  5188: 	ROM_LOAD( "scr02.rom", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) )
  5189: 	ROM_LOAD( "scr03.rom", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) )
  5190: 
  5191: 	ROM_REGION( 0x020000, REGION_GFX2, 0 ) /* sprites */
  5192: 	ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) )
  5193: 	ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) )
  5194: 
  5195: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  5196: 	ROM_LOAD( "s-prog.rom", 0x0000, 0x8000, CRC(bd9ba01b) SHA1(fafa7dc36cc057a50ae4cdf7a35f3594292336f4) )
  5197: ROM_END
  5198: 
  5199: /***************************************************************************/
  5200: 
  5201: static MEMORY_READ16_START( tetris_readmem )
  5202: 	{ 0x000000, 0x01ffff, MRA16_ROM },
  5203: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5204: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5205: 	{ 0x418000, 0x41803f, SYS16_MRA16_EXTRAM2 },
  5206: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  5207: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  5208: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  5209: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  5210: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  5211: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  5212: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  5213: 	{ 0xc80000, 0xc80001, MRA16_NOP },
  5214: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  5215: MEMORY_END
  5216: 
  5217: static MEMORY_WRITE16_START( tetris_writemem )
  5218: 	{ 0x000000, 0x01ffff, MWA16_ROM },
  5219: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5220: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5221: 	{ 0x418000, 0x41803f, SYS16_MWA16_EXTRAM2 },
  5222: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  5223: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  5224: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  5225: 	{ 0xc42006, 0xc42007, sound_command_w },
  5226: 	{ 0xc43034, 0xc43035, MWA16_NOP },
  5227: 	{ 0xc80000, 0xc80001, MWA16_NOP },
  5228: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  5229: MEMORY_END
  5230: 
  5231: /***************************************************************************/
  5232: 
  5233: static void tetris_update_proc( void ){
  5234: 	sys16_fg_scrolly = sys16_textram[0x748];
  5235: 	sys16_bg_scrolly = sys16_textram[0x749];
  5236: 	sys16_fg_scrollx = sys16_textram[0x74c];
  5237: 	sys16_bg_scrollx = sys16_textram[0x74d];
  5238: 
  5239: 	set_fg_page( sys16_extraram2[0x38/2] );
  5240: 	set_bg_page( sys16_extraram2[0x28/2] );
  5241: }
  5242: 
  5243: static MACHINE_INIT( tetris ){
  5244: 	sys16_patch_code( 0xba6, 0x4e );
  5245: 	sys16_patch_code( 0xba7, 0x71 );
  5246: 
  5247: 	sys16_sprxoffset = -0x40;
  5248: 	sys16_update_proc = tetris_update_proc;
  5249: }
  5250: 
  5251: static DRIVER_INIT( tetris )
  5252: {
  5253: 	machine_init_sys16_onetime();
  5254: }
  5255: 
  5256: static DRIVER_INIT( tetrisbl )
  5257: {
  5258: 	machine_init_sys16_onetime();
  5259: }
  5260: /***************************************************************************/
  5261: 
  5262: INPUT_PORTS_START( tetris )
  5263: 	SYS16_JOY1
  5264: 	SYS16_JOY2
  5265: 	SYS16_SERVICE
  5266: 	SYS16_COINAGE /* unconfirmed */
  5267: 
  5268: PORT_START	/* DSW1 */
  5269: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  5270: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  5271: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5272: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  5273: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  5274: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5275: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Unknown ) )	// from the code it looks like some kind of difficulty
  5276: 	PORT_DIPSETTING(    0x0c, "A" )					// level, but all 4 levels points to the same place
  5277: 	PORT_DIPSETTING(    0x08, "B" )					// so it doesn't actually change anything!!
  5278: 	PORT_DIPSETTING(    0x04, "C" )
  5279: 	PORT_DIPSETTING(    0x00, "D" )
  5280: 	PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
  5281: 	PORT_DIPSETTING(    0x20, "Easy" )
  5282: 	PORT_DIPSETTING(    0x30, "Normal" )
  5283: 	PORT_DIPSETTING(    0x10, "Hard" )
  5284: 	PORT_DIPSETTING(    0x00, "Hardest" )
  5285: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  5286: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  5287: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5288: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  5289: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  5290: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5291: INPUT_PORTS_END
  5292: 
  5293: /***************************************************************************/
  5294: 
  5295: static MACHINE_DRIVER_START( tetris )
  5296: 
  5297: 	/* basic machine hardware */
  5298: 	MDRV_IMPORT_FROM(system16)
  5299: 	MDRV_CPU_MODIFY("main")
  5300: 	MDRV_CPU_MEMORY(tetris_readmem,tetris_writemem)
  5301: 
  5302: 	MDRV_MACHINE_INIT(tetris)
  5303: MACHINE_DRIVER_END
  5304: 
  5305: /***************************************************************************/
  5306: // sys16B
  5307: ROM_START( timscanr )
  5308: 	ROM_REGION( 0x030000, REGION_CPU1, 0 ) /* 68000 code */
  5309: 	ROM_LOAD16_BYTE( "ts10853.bin", 0x00000, 0x8000, CRC(24d7c5fb) SHA1(b1796e77cf968f9bdae7a47c5c02b93aaec10ade) )
  5310: 	ROM_LOAD16_BYTE( "ts10850.bin", 0x00001, 0x8000, CRC(f1575732) SHA1(d0c8fc42171c436cc1cd55a33295bd019a474d47) )
  5311: 	ROM_LOAD16_BYTE( "ts10854.bin", 0x10000, 0x8000, CRC(82d0b237) SHA1(c1defda4785014ccd7164f49f53f77e36fcb3a8d) )
  5312: 	ROM_LOAD16_BYTE( "ts10851.bin", 0x10001, 0x8000, CRC(f5ce271b) SHA1(8b4f1178c87e657d8d5805d908100f0d5fb030da) )
  5313: 	ROM_LOAD16_BYTE( "ts10855.bin", 0x20000, 0x8000, CRC(63e95a53) SHA1(60c42bbb1c316deb493a237990a7938551f8bc2e) )
  5314: 	ROM_LOAD16_BYTE( "ts10852.bin", 0x20001, 0x8000, CRC(7cd1382b) SHA1(6263cc863cbf0ef66a7ba8cc1c98212917d7c131) )
  5315: 
  5316: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5317: 	ROM_LOAD( "timscanr.b9",  0x00000, 0x8000, CRC(07dccc37) SHA1(544cc6a3b3ef64727ecf5098b84ade2dd5330614) )
  5318: 	ROM_LOAD( "timscanr.b10", 0x08000, 0x8000, CRC(84fb9a3a) SHA1(efde54cc9582f68e58cae05f717a4fc8f620c0fc) )
  5319: 	ROM_LOAD( "timscanr.b11", 0x10000, 0x8000, CRC(c8694bc0) SHA1(e48fc349ef454ded86141937f70b006e64da6b6b) )
  5320: 
  5321: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites */
  5322: 	ROM_LOAD16_BYTE( "ts10548.bin", 0x00001, 0x8000, CRC(aa150735) SHA1(b6e6ff9229c641e196fc7a0a2cf7aa362f554676) )
  5323: 	ROM_LOAD16_BYTE( "ts10552.bin", 0x00000, 0x8000, CRC(6fcbb9f7) SHA1(0a0fab930477d8b79e500263bbc80d3bf73778f8) )
  5324: 	ROM_LOAD16_BYTE( "ts10549.bin", 0x10001, 0x8000, CRC(2f59f067) SHA1(1fb64cce2f98ddcb5ecb662e63ea636a8da08bcd) )
  5325: 	ROM_LOAD16_BYTE( "ts10553.bin", 0x10000, 0x8000, CRC(8a220a9f) SHA1(c17547d85721fa19e5f445b5be30b3fbf5e8cc6e) )
  5326: 	ROM_LOAD16_BYTE( "ts10550.bin", 0x20001, 0x8000, CRC(f05069ff) SHA1(bd95761036c2fad8ddf4e169d899b173822ee4b0) )
  5327: 	ROM_LOAD16_BYTE( "ts10554.bin", 0x20000, 0x8000, CRC(dc64f809) SHA1(ea85eefa98ec55e9e872940821a959ff4eb1bd1c) )
  5328: 	ROM_LOAD16_BYTE( "ts10551.bin", 0x30001, 0x8000, CRC(435d811f) SHA1(b28eb09620113cd7578387c4d96029f2acb8ec06) )
  5329: 	ROM_LOAD16_BYTE( "ts10555.bin", 0x30000, 0x8000, CRC(2143c471) SHA1(d413aa216349ddf773a39d2826c3a940b4149229) )
  5330: 
  5331: 	ROM_REGION( 0x18000, REGION_CPU2, 0 ) /* sound CPU */
  5332: 	ROM_LOAD( "ts10562.bin", 0x0000, 0x8000, CRC(3f5028bf) SHA1(02081569a5f4dc64771e97651a9902a98d54a952) )
  5333: 	ROM_LOAD( "ts10563.bin", 0x10000, 0x8000, CRC(9db7eddf) SHA1(8b9a27442a623bee6b9b5b06275226734d132e17) )
  5334: ROM_END
  5335: 
  5336: /***************************************************************************/
  5337: 
  5338: static READ16_HANDLER( timscanr_skip_r ){
  5339: 	if (activecpu_get_pc()==0x1044c) {cpu_spinuntil_int(); return 0;}
  5340: 	return sys16_workingram[0x000c/2];
  5341: }
  5342: 
  5343: static MEMORY_READ16_START( timscanr_readmem )
  5344: 	{ 0x000000, 0x02ffff, MRA16_ROM },
  5345: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5346: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5347: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  5348: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  5349: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  5350: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  5351: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  5352: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  5353: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  5354: 	{ 0xc41004, 0xc41005, input_port_5_word_r }, // dip3
  5355: 	{ 0xffc00c, 0xffc00d, timscanr_skip_r },
  5356: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  5357: MEMORY_END
  5358: 
  5359: static MEMORY_WRITE16_START( timscanr_writemem )
  5360: 	{ 0x000000, 0x02ffff, MWA16_ROM },
  5361: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5362: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5363: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  5364: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  5365: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  5366: 	{ 0xfe0006, 0xfe0007, sound_command_w },
  5367: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  5368: MEMORY_END
  5369: 
  5370: /***************************************************************************/
  5371: 
  5372: static void timscanr_update_proc( void ){
  5373: 	set_fg_page( sys16_textram[0x740] );
  5374: 	set_bg_page( sys16_textram[0x741] );
  5375: 	sys16_fg_scrolly = sys16_textram[0x748];
  5376: 	sys16_bg_scrolly = sys16_textram[0x749];
  5377: 	sys16_fg_scrollx = sys16_textram[0x74c];
  5378: 	sys16_bg_scrollx = sys16_textram[0x74d];
  5379: }
  5380: 
  5381: static MACHINE_INIT( timscanr ){
  5382: 	static int bank[16] = {
  5383: 		0,0,0,0,
  5384: 		0,0,0,3,
  5385: 		0,0,0,2,
  5386: 		0,1,0,0
  5387: 	};
  5388: 	sys16_obj_bank = bank;
  5389: 
  5390: 	sys16_textmode=1;
  5391: 	sys16_update_proc = timscanr_update_proc;
  5392: }
  5393: 
  5394: static DRIVER_INIT( timscanr ){
  5395: 	machine_init_sys16_onetime();
  5396: }
  5397: /***************************************************************************/
  5398: 
  5399: INPUT_PORTS_START( timscanr )
  5400: 	SYS16_JOY1
  5401: 	SYS16_JOY2
  5402: 	SYS16_SERVICE
  5403: 	SYS16_COINAGE
  5404: 
  5405: PORT_START	/* DSW2 */
  5406: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) )		//??
  5407: 	PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  5408: 	PORT_DIPSETTING(    0x01, DEF_STR( Cocktail ) )
  5409: 	PORT_DIPNAME( 0x1e, 0x14, "Bonus" )
  5410: 	PORT_DIPSETTING(    0x16, "Replay 1000000/2000000" )
  5411: 	PORT_DIPSETTING(    0x14, "Replay 1200000/2500000" )
  5412: 	PORT_DIPSETTING(    0x12, "Replay 1500000/3000000" )
  5413: 	PORT_DIPSETTING(    0x10, "Replay 2000000/4000000" )
  5414: 	PORT_DIPSETTING(    0x1c, "Replay 1000000" )
  5415: 	PORT_DIPSETTING(    0x1e, "Replay 1200000" )
  5416: 	PORT_DIPSETTING(    0x1a, "Replay 1500000" )
  5417: 	PORT_DIPSETTING(    0x18, "Replay 1800000" )
  5418: 	PORT_DIPSETTING(    0x0e, "ExtraBall 100000" )
  5419: 	PORT_DIPSETTING(    0x0c, "ExtraBall 200000" )
  5420: 	PORT_DIPSETTING(    0x0a, "ExtraBall 300000" )
  5421: 	PORT_DIPSETTING(    0x08, "ExtraBall 400000" )
  5422: 	PORT_DIPSETTING(    0x06, "ExtraBall 500000" )
  5423: 	PORT_DIPSETTING(    0x04, "ExtraBall 600000" )
  5424: 	PORT_DIPSETTING(    0x02, "ExtraBall 700000" )
  5425: 	PORT_DIPSETTING(    0x00, "None" )
  5426: 
  5427: 	PORT_DIPNAME( 0x20, 0x20, "Match" )
  5428: 	PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  5429: 	PORT_DIPSETTING(    0x20, DEF_STR( On ) )
  5430: 	PORT_DIPNAME( 0x40, 0x40, "Pin rebound" )
  5431: 	PORT_DIPSETTING(    0x40, "Well" )
  5432: 	PORT_DIPSETTING(    0x00, "A little" )
  5433: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Lives ) )
  5434: 	PORT_DIPSETTING(    0x80, "3" )
  5435: 	PORT_DIPSETTING(    0x00, "5" )
  5436: 
  5437: PORT_START	/* DSW3 */
  5438: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )		//??
  5439: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  5440: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5441: 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
  5442: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  5443: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5444: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Unknown ) )
  5445: 	PORT_DIPSETTING(    0x04, "1" )
  5446: 	PORT_DIPSETTING(    0x0c, "2" )
  5447: 	PORT_DIPSETTING(    0x08, "3" )
  5448: 	PORT_DIPSETTING(    0x00, "None" )
  5449: 	PORT_DIPNAME( 0x10, 0x10, "Allow Continue" )
  5450: 	PORT_DIPSETTING(    0x00, DEF_STR( No ) )
  5451: 	PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
  5452: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
  5453: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  5454: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5455: 	PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
  5456: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  5457: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5458: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  5459: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  5460: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5461: 
  5462: INPUT_PORTS_END
  5463: 
  5464: /***************************************************************************/
  5465: 
  5466: static MACHINE_DRIVER_START( timscanr )
  5467: 
  5468: 	/* basic machine hardware */
  5469: 	MDRV_IMPORT_FROM(system16_7759)
  5470: 	MDRV_CPU_MODIFY("main")
  5471: 	MDRV_CPU_MEMORY(timscanr_readmem,timscanr_writemem)
  5472: 
  5473: 	MDRV_MACHINE_INIT(timscanr)
  5474: MACHINE_DRIVER_END
  5475: 
  5476: /***************************************************************************/
  5477: 
  5478: // sys16B
  5479: ROM_START( toryumon )
  5480: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5481: 	ROM_LOAD16_BYTE( "17689",  0x00000, 0x20000, CRC(4f0dee19) SHA1(efb5bf29e27029e9ea3fdd57ad7af54b4e1e9a97) )
  5482: 	ROM_LOAD16_BYTE( "17688",  0x00001, 0x20000, CRC(717d81c7) SHA1(293cd9859a2a3aad89c47fdad2ca6aa48e9f74cb) )
  5483: 
  5484: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5485: 	ROM_LOAD( "17700", 0x00000, 0x40000, CRC(8f288b37) SHA1(f0c1bb60ace8078566b51ab91fc35d2981c9f32c) )
  5486: 	ROM_LOAD( "17701", 0x40000, 0x40000, CRC(6dfb025b) SHA1(502c16f650596a791fae1834f9bce6f3aa25c45f) )
  5487: 	ROM_LOAD( "17702", 0x80000, 0x40000, CRC(ae0b7eab) SHA1(403ca2b50913a744e2c5e1cd0d59c69df5464836) )
  5488: 
  5489: 	ROM_REGION( 0x100000, REGION_GFX2, 0 ) /* sprites */
  5490: 	ROM_LOAD16_BYTE( "17692", 0x00001, 0x20000, CRC(543c4327) SHA1(9f40163aaf165f5e4f5aefd8ce083d5f72ded125) )
  5491: 	ROM_LOAD16_BYTE( "17695", 0x00000, 0x20000, CRC(ee60f244) SHA1(21b912e12f6a56ea6b9e5e0be117b447d1ecda43) )
  5492: 	ROM_LOAD16_BYTE( "17693", 0x40001, 0x20000, CRC(4a350b3e) SHA1(70181bf713106475cdf684f86d593ee323ded2ca) )
  5493: 	ROM_LOAD16_BYTE( "17696", 0x40000, 0x20000, CRC(6edb54f1) SHA1(8188d76db16bcf2f6bbfd0d61499e0d0a128bb27) )
  5494: 	ROM_LOAD16_BYTE( "17694", 0x80001, 0x20000, CRC(b296d71d) SHA1(28f55fa451c4856f6fd6d4d9b16b4c3ef963ee5b) )
  5495: 	ROM_LOAD16_BYTE( "17697", 0x80000, 0x20000, CRC(6ccb7b28) SHA1(7a82230b575bfabb150141183d3c37c44a0d41ad) )
  5496: 	ROM_LOAD16_BYTE( "17698", 0xc0001, 0x20000, CRC(cd4dfb82) SHA1(def5847a94cd7da96f5434b62b22925fbb8da151) )
  5497: 	ROM_LOAD16_BYTE( "17699", 0xc0000, 0x20000, CRC(2694ecce) SHA1(85d7ab89d4fd0aa0ca942485f94c5737deaa8eff) )
  5498: 
  5499: 
  5500: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  5501: 	ROM_LOAD( "17691", 0x00000,  0x08000, CRC(14205388) SHA1(0b580d4ef52eab2d71541d44fbd32676b2277aa1) )
  5502: 	ROM_LOAD( "17690", 0x10000,  0x40000, CRC(4f9ba4e4) SHA1(450d821ef12dbb24cf85ac10c77e9b31c03112b1) )
  5503: ROM_END
  5504: 
  5505: /***************************************************************************/
  5506: 
  5507: static MEMORY_READ16_START( toryumon_readmem )
  5508: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  5509: 	{ 0x3e2000, 0x3e2003, SYS16_MRA16_EXTRAM },
  5510: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5511: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5512: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  5513: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  5514: 	{ 0xe41002, 0xe41003, input_port_0_word_r }, // player1
  5515: 	{ 0xe41004, 0xe41005, MRA16_NOP },
  5516: 	{ 0xe41006, 0xe41007, input_port_1_word_r }, // player2
  5517: 	{ 0xe41000, 0xe41001, input_port_2_word_r }, // service
  5518: 	{ 0xe42002, 0xe42003, input_port_3_word_r }, // dip1
  5519: 	{ 0xe42000, 0xe42001, input_port_4_word_r }, // dip2
  5520: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  5521: MEMORY_END
  5522: 
  5523: static MEMORY_WRITE16_START( toryumon_writemem )
  5524: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  5525: 	{ 0x3e2000, 0x3e2003, SYS16_MWA16_EXTRAM },
  5526: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5527: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5528: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  5529: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  5530: 	{ 0xe40000, 0xe40001, sys16_coinctrl_w },
  5531: 	{ 0xfe0006, 0xfe0007, sound_command_w },
  5532: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  5533: MEMORY_END
  5534: 
  5535: /***************************************************************************/
  5536: 
  5537: static void toryumon_update_proc( void ){
  5538: 	set_fg_page( sys16_textram[0x740] );
  5539: 	set_bg_page( sys16_textram[0x741] );
  5540: 	sys16_fg_scrolly = sys16_textram[0x748];
  5541: 	sys16_bg_scrolly = sys16_textram[0x749];
  5542: 	sys16_fg_scrollx = sys16_textram[0x74c];
  5543: 	sys16_bg_scrollx = sys16_textram[0x74d];
  5544: 
  5545: 	sys16_tile_bank0 = sys16_extraram[0]&0xf;
  5546: 	sys16_tile_bank1 = sys16_extraram[1]&0xf;
  5547: }
  5548: 
  5549: static MACHINE_INIT( toryumon ){
  5550: 	sys16_update_proc = toryumon_update_proc;
  5551: }
  5552: 
  5553: static DRIVER_INIT( toryumon )
  5554: {
  5555: 	machine_init_sys16_onetime();
  5556: }
  5557: /***************************************************************************/
  5558: 
  5559: INPUT_PORTS_START( toryumon )
  5560: 	SYS16_JOY1
  5561: 	SYS16_JOY2
  5562: 	SYS16_SERVICE
  5563: 	SYS16_COINAGE
  5564: 
  5565: PORT_START	/* DSW1 */
  5566: 	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  5567: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  5568: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5569: 	PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
  5570: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  5571: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5572: 	PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
  5573: 	PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  5574: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5575: 	PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
  5576: 	PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  5577: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5578: 	PORT_DIPNAME( 0x10, 0x10, "VS-Mode Battle" )
  5579: 	PORT_DIPSETTING(    0x10, "1" )
  5580: 	PORT_DIPSETTING(    0x00, "3" )
  5581: 	PORT_DIPNAME( 0xe0, 0xe0, DEF_STR( Difficulty ) )
  5582: 	PORT_DIPSETTING(    0xc0, "Easy" )
  5583: 	PORT_DIPSETTING(    0xe0, "Normal" )
  5584: 	PORT_DIPSETTING(    0xa0, "Hard" )
  5585: 	PORT_DIPSETTING(    0x80, "Hard+1" )
  5586: 	PORT_DIPSETTING(    0x60, "Hard+2" )
  5587: 	PORT_DIPSETTING(    0x40, "Hard+3" )
  5588: 	PORT_DIPSETTING(    0x20, "Hard+4" )
  5589: 	PORT_DIPSETTING(    0x00, "Hard+5" )
  5590: INPUT_PORTS_END
  5591: 
  5592: /***************************************************************************/
  5593: 
  5594: static MACHINE_DRIVER_START( toryumon )
  5595: 
  5596: 	/* basic machine hardware */
  5597: 	MDRV_IMPORT_FROM(system16_7759)
  5598: 	MDRV_CPU_MODIFY("main")
  5599: 	MDRV_CPU_MEMORY(toryumon_readmem,toryumon_writemem)
  5600: 
  5601: 	MDRV_MACHINE_INIT(toryumon)
  5602: MACHINE_DRIVER_END
  5603: 
  5604: /***************************************************************************/
  5605: 
  5606: // sys16B
  5607: ROM_START( tturf )
  5608: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5609: 	ROM_LOAD16_BYTE( "12327.7a",  0x00000, 0x20000, CRC(0376c593) SHA1(3057828b16ee3b7cbb57a76047eecf74d1d8b465) )
  5610: 	ROM_LOAD16_BYTE( "12326.5a",  0x00001, 0x20000, CRC(f998862b) SHA1(69902ab0162eb42e1d6a9792651a5d41cb77477d) )
  5611: 
  5612: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5613: 	ROM_LOAD( "12268.14a", 0x00000, 0x10000, CRC(e0dac07f) SHA1(c7f6de42eb93a8f34afdc300628735b5f40a34c2) )
  5614: 	ROM_LOAD( "12269.15a", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) )
  5615: 	ROM_LOAD( "12270.16a", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) )
  5616: 
  5617: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  5618: 	ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )
  5619: 	ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )
  5620: 	ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )
  5621: 	ROM_LOAD16_BYTE( "12282.6b", 0x20000, 0x10000, CRC(e8671ee1) SHA1(a3732938c370f1936d867aae9c3d1e9bbfb57ede) )
  5622: 	ROM_LOAD16_BYTE( "12277.3b", 0x40001, 0x10000, CRC(f16b6ba2) SHA1(00cc04c7b5aad82d51d2d252e1e57bcdc5e2c9e3) )
  5623: 	ROM_LOAD16_BYTE( "12281.7b", 0x40000, 0x10000, CRC(1ef1077f) SHA1(8ce6fd7d32a20b93b3f91aaa43fe22720da7236f) )
  5624: 	ROM_LOAD16_BYTE( "12276.4b", 0x60001, 0x10000, CRC(838bd71f) SHA1(82d9d127438f5e1906b1cf40bf3b4727f2ee5685) )
  5625: 	ROM_LOAD16_BYTE( "12280.8b", 0x60000, 0x10000, CRC(639a57cb) SHA1(84fd8b96758d38f9e1ba1a3c2cf8099ec0452784) )
  5626: 
  5627: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  5628: 	ROM_LOAD( "12328.10a", 0x0000, 0x8000, NO_DUMP )
  5629: 	ROM_LOAD( "12329.11a", 0x10000, 0x10000, CRC(ed9a686d) SHA1(da433033d501ee871429ee676b3972b14179df9f) )		// speech
  5630: 	ROM_LOAD( "12330.12a", 0x20000, 0x10000, CRC(fb762bca) SHA1(ff9191c5ec38c711ebb7c2ad043f62b6d7e2203c) )
  5631: 
  5632: ROM_END
  5633: 
  5634: // sys16B
  5635: ROM_START( tturfu )
  5636: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5637: 	ROM_LOAD16_BYTE( "epr12266.bin",  0x00000, 0x10000, CRC(f549def8) SHA1(9e913509d46274bd192455321904ec9884b5f629) )
  5638: 	ROM_LOAD16_BYTE( "epr12264.bin",  0x00001, 0x10000, CRC(f7cdb289) SHA1(9c386cf33a96a977c623c2f243db38fda2c41ba4) )
  5639: 	ROM_LOAD16_BYTE( "epr12267.bin",  0x20000, 0x10000, CRC(3c3ce191) SHA1(036ece2be585a85e05c047fe4a1ab3b6814c3490) )
  5640: 	ROM_LOAD16_BYTE( "epr12265.bin",  0x20001, 0x10000, CRC(8cdadd9a) SHA1(a17852f0eb8f63a82ff44cbeb100da72fe5890e0) )
  5641: 
  5642: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5643: 	ROM_LOAD( "12268.14a", 0x00000, 0x10000, CRC(e0dac07f) SHA1(c7f6de42eb93a8f34afdc300628735b5f40a34c2) )
  5644: 	ROM_LOAD( "12269.15a", 0x10000, 0x10000, CRC(457a8790) SHA1(b701e1a1745cefb31083c8a3daa3b23181f89576) )
  5645: 	ROM_LOAD( "12270.16a", 0x20000, 0x10000, CRC(69fc025b) SHA1(20be1242de27f1b997d43890051cc5d5ac8a127a) )
  5646: 
  5647: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  5648: 	ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )
  5649: 	ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )
  5650: 	ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )
  5651: 	ROM_LOAD16_BYTE( "12282.6b", 0x20000, 0x10000, CRC(e8671ee1) SHA1(a3732938c370f1936d867aae9c3d1e9bbfb57ede) )
  5652: 	ROM_LOAD16_BYTE( "12277.3b", 0x40001, 0x10000, CRC(f16b6ba2) SHA1(00cc04c7b5aad82d51d2d252e1e57bcdc5e2c9e3) )
  5653: 	ROM_LOAD16_BYTE( "12281.7b", 0x40000, 0x10000, CRC(1ef1077f) SHA1(8ce6fd7d32a20b93b3f91aaa43fe22720da7236f) )
  5654: 	ROM_LOAD16_BYTE( "12276.4b", 0x60001, 0x10000, CRC(838bd71f) SHA1(82d9d127438f5e1906b1cf40bf3b4727f2ee5685) )
  5655: 	ROM_LOAD16_BYTE( "12280.8b", 0x60000, 0x10000, CRC(639a57cb) SHA1(84fd8b96758d38f9e1ba1a3c2cf8099ec0452784) )
  5656: 
  5657: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  5658: 	ROM_LOAD( "epr12271.bin", 0x00000,  0x8000, CRC(99671e52) SHA1(ab21b7e7a449c8081b5db1fdb579071e31b6852c) )
  5659: 	ROM_LOAD( "epr12272.bin", 0x10000, 0x8000, CRC(7cf7e69f) SHA1(62c9f75db8e2b4ece517167ba5c0712bac5f1d95) )
  5660: 	ROM_LOAD( "epr12273.bin", 0x18000, 0x8000, CRC(28f0bb8b) SHA1(d99aff57d213b10ac10c37ceff2f125875816488) )
  5661: 	ROM_LOAD( "epr12274.bin", 0x20000, 0x8000, CRC(8207f0c4) SHA1(169914861a52fa731a305e1ee2d230aa0d0d97fe) )
  5662: 	ROM_LOAD( "epr12275.bin", 0x28000, 0x8000, CRC(182f3c3d) SHA1(1482fe08a05a721e315b1a3aa5bef4dddc72e26e) )
  5663: 
  5664: ROM_END
  5665: 
  5666: /***************************************************************************/
  5667: static READ16_HANDLER( tt_io_player1_r ){ return input_port_0_r( offset ) << 8; }
  5668: static READ16_HANDLER( tt_io_player2_r ){ return input_port_1_r( offset ) << 8; }
  5669: static READ16_HANDLER( tt_io_service_r ){ return input_port_2_r( offset ) << 8; }
  5670: 
  5671: static MEMORY_READ16_START( tturf_readmem )
  5672: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  5673: 	{ 0x2001e6, 0x2001e7, tt_io_service_r },
  5674: 	{ 0x2001e8, 0x2001e9, tt_io_player1_r },
  5675: 	{ 0x2001ea, 0x2001eb, tt_io_player2_r },
  5676: 	{ 0x200000, 0x203fff, SYS16_MRA16_EXTRAM },
  5677: 	{ 0x300000, 0x300fff, SYS16_MRA16_SPRITERAM },
  5678: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5679: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5680: 	{ 0x500000, 0x500fff, SYS16_MRA16_PALETTERAM },
  5681: 	{ 0x602002, 0x602003, input_port_3_word_r }, // dip1
  5682: 	{ 0x602000, 0x602001, input_port_4_word_r }, // dip2
  5683: MEMORY_END
  5684: 
  5685: static MEMORY_WRITE16_START( tturf_writemem )
  5686: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  5687: 	{ 0x200000, 0x203fff, SYS16_MWA16_EXTRAM },
  5688: 	{ 0x300000, 0x300fff, SYS16_MWA16_SPRITERAM },
  5689: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5690: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5691: 	{ 0x500000, 0x500fff, SYS16_MWA16_PALETTERAM },
  5692: 	{ 0x600000, 0x600001, sys16_coinctrl_w },
  5693: //	{ 0x600006, 0x600007, sound_command_w },
  5694: MEMORY_END
  5695: 
  5696: /***************************************************************************/
  5697: static void tturf_update_proc( void ){
  5698: 	set_fg_page( sys16_textram[0x740] );
  5699: 	set_bg_page( sys16_textram[0x741] );
  5700: 	sys16_fg_scrolly = sys16_textram[0x748];
  5701: 	sys16_bg_scrolly = sys16_textram[0x749];
  5702: 	sys16_fg_scrollx = sys16_textram[0x74c];
  5703: 	sys16_bg_scrollx = sys16_textram[0x74d];
  5704: }
  5705: 
  5706: static MACHINE_INIT( tturf ){
  5707: 	static int bank[16] = { 0,0,1,0,2,0,3,0 };
  5708: 	sys16_obj_bank = bank;
  5709: 	sys16_spritelist_end=0xc000;
  5710: 	sys16_update_proc = tturf_update_proc;
  5711: }
  5712: 
  5713: static MACHINE_INIT( tturfu ){
  5714: 	static int bank[16] = {
  5715: 		0,0,0,0,
  5716: 		0,0,0,0,
  5717: 		0,0,0,1,
  5718: 		0,2,3,0
  5719: 	};
  5720: 	sys16_obj_bank = bank;
  5721: 	sys16_spritelist_end=0xc000;
  5722: 
  5723: 	sys16_update_proc = tturf_update_proc;
  5724: }
  5725: 
  5726: static DRIVER_INIT( tturf ){
  5727: 	machine_init_sys16_onetime();
  5728: }
  5729: /***************************************************************************/
  5730: 
  5731: INPUT_PORTS_START( tturf )
  5732: 	SYS16_JOY1
  5733: 	SYS16_JOY2
  5734: 	SYS16_SERVICE
  5735: 	SYS16_COINAGE
  5736: 
  5737: PORT_START	/* DSW1 */
  5738: 	PORT_DIPNAME( 0x03, 0x00, "Continues" )
  5739: 	PORT_DIPSETTING(    0x00, "None" )
  5740: 	PORT_DIPSETTING(    0x01, "3" )
  5741: 	PORT_DIPSETTING(    0x02, "Unlimited" )
  5742: 	PORT_DIPSETTING(    0x03, "Unlimited" )
  5743: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
  5744: 	PORT_DIPSETTING(    0x08, "Easy" )
  5745: 	PORT_DIPSETTING(    0x0c, "Normal" )
  5746: 	PORT_DIPSETTING(    0x04, "Hard" )
  5747: 	PORT_DIPSETTING(    0x00, "Hardest" )
  5748: 	PORT_DIPNAME( 0x30, 0x20, "Starting Energy" )
  5749: 	PORT_DIPSETTING(    0x00, "3" )
  5750: 	PORT_DIPSETTING(    0x10, "4" )
  5751: 	PORT_DIPSETTING(    0x20, "6" )
  5752: 	PORT_DIPSETTING(    0x30, "8" )
  5753: 	PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )
  5754: 	PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  5755: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  5756: 	PORT_DIPNAME( 0x80, 0x00, "Bonus Energy" )
  5757: 	PORT_DIPSETTING(    0x80, "1" )
  5758: 	PORT_DIPSETTING(    0x00, "2" )
  5759: INPUT_PORTS_END
  5760: 
  5761: /***************************************************************************/
  5762: 
  5763: static MACHINE_DRIVER_START( tturf )
  5764: 
  5765: 	/* basic machine hardware */
  5766: 	MDRV_IMPORT_FROM(system16_7759)
  5767: 	MDRV_CPU_MODIFY("main")
  5768: 	MDRV_CPU_MEMORY(tturf_readmem,tturf_writemem)
  5769: 
  5770: 	MDRV_MACHINE_INIT(tturf)
  5771: MACHINE_DRIVER_END
  5772: 
  5773: 
  5774: static MACHINE_DRIVER_START( tturfu )
  5775: 
  5776: 	/* basic machine hardware */
  5777: 	MDRV_IMPORT_FROM(tturf)
  5778: 	MDRV_MACHINE_INIT(tturfu)
  5779: MACHINE_DRIVER_END
  5780: 
  5781: /***************************************************************************/
  5782: // sys16B
  5783: ROM_START( tturfbl )
  5784: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5785: 	ROM_LOAD16_BYTE( "tt042197.rom", 0x00000, 0x10000, CRC(deee5af1) SHA1(0caba775021dc7e28ac6b7af8eac4f49d3102c83) )
  5786: 	ROM_LOAD16_BYTE( "tt06c794.rom", 0x00001, 0x10000, CRC(90e6a95a) SHA1(014a0ae5cebcba9cc99e6ccde4ad5d938fab915c) )
  5787: 	ROM_LOAD16_BYTE( "tt030be3.rom", 0x20000, 0x10000, CRC(100264a2) SHA1(d1ea4bf93f5472901ce95200f546ce9b58936aea) )
  5788: 	ROM_LOAD16_BYTE( "tt05ef8a.rom", 0x20001, 0x10000, CRC(f787a948) SHA1(512b8cb2f5e9795171951e02c07cae957db41334) )
  5789: 
  5790: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5791: 	ROM_LOAD( "tt1574b3.rom", 0x00000, 0x10000, CRC(e9e630da) SHA1(e8471dedbb25475e4814d78b56f579fe9110461e) )
  5792: 	ROM_LOAD( "tt16cf44.rom", 0x10000, 0x10000, CRC(4c467735) SHA1(8338b6605cbe2e076da0b3e3a47630409a79f002) )
  5793: 	ROM_LOAD( "tt17d59e.rom", 0x20000, 0x10000, CRC(60c0f2fe) SHA1(3fea4ed757d47628f59ff940e40cb86b3b5b443b) )
  5794: 
  5795: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  5796: 	ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )
  5797: 	ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )
  5798: 	ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )
  5799: 	ROM_LOAD16_BYTE( "12282.6b", 0x20000, 0x10000, CRC(e8671ee1) SHA1(a3732938c370f1936d867aae9c3d1e9bbfb57ede) )
  5800: 	ROM_LOAD16_BYTE( "12277.3b", 0x40001, 0x10000, CRC(f16b6ba2) SHA1(00cc04c7b5aad82d51d2d252e1e57bcdc5e2c9e3) )
  5801: 	ROM_LOAD16_BYTE( "12281.7b", 0x40000, 0x10000, CRC(1ef1077f) SHA1(8ce6fd7d32a20b93b3f91aaa43fe22720da7236f) )
  5802: 	ROM_LOAD16_BYTE( "12276.4b", 0x60001, 0x10000, CRC(838bd71f) SHA1(82d9d127438f5e1906b1cf40bf3b4727f2ee5685) )
  5803: 	ROM_LOAD16_BYTE( "12280.8b", 0x60000, 0x10000, CRC(639a57cb) SHA1(84fd8b96758d38f9e1ba1a3c2cf8099ec0452784) )
  5804: 
  5805: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
  5806: 	ROM_LOAD( "tt014d68.rom", 0x00000, 0x08000, CRC(d4aab1d9) SHA1(94885896d59da1ecabe2377a194fcf61eaae3765) )
  5807: 	ROM_CONTINUE(             0x10000, 0x08000 )
  5808: 	ROM_LOAD( "tt0246ff.rom", 0x18000, 0x10000, CRC(bb4bba8f) SHA1(b182a7e1d0425e93c2c1b93472aafd30a6af6907) )
  5809: ROM_END
  5810: 
  5811: /***************************************************************************/
  5812: 
  5813: static MEMORY_READ16_START( tturfbl_readmem )
  5814: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  5815: 	{ 0x2001e6, 0x2001e7, tt_io_service_r },
  5816: 	{ 0x2001e8, 0x2001e9, tt_io_player1_r },
  5817: 	{ 0x2001ea, 0x2001eb, tt_io_player2_r },
  5818: 	{ 0x200000, 0x203fff, SYS16_MRA16_EXTRAM },
  5819: 	{ 0x300000, 0x300fff, SYS16_MRA16_SPRITERAM },
  5820: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5821: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5822: 	{ 0x500000, 0x500fff, SYS16_MRA16_PALETTERAM },
  5823: 	{ 0x600002, 0x600003, input_port_3_word_r }, // dip1
  5824: 	{ 0x600000, 0x600001, input_port_4_word_r }, // dip2
  5825: 	{ 0x601002, 0x601003, input_port_0_word_r }, // player1
  5826: 	{ 0x601004, 0x601005, input_port_1_word_r }, // player2
  5827: 	{ 0x601000, 0x601001, input_port_2_word_r }, // service
  5828: 	{ 0x602002, 0x602003, input_port_3_word_r }, // dip1
  5829: 	{ 0x602000, 0x602001, input_port_4_word_r }, // dip2
  5830: 	{ 0xc46000, 0xc4601f, SYS16_MRA16_EXTRAM3 },
  5831: MEMORY_END
  5832: 
  5833: static MEMORY_WRITE16_START( tturfbl_writemem )
  5834: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  5835: 	{ 0x200000, 0x203fff, SYS16_MWA16_EXTRAM },
  5836: 	{ 0x300000, 0x300fff, SYS16_MWA16_SPRITERAM },
  5837: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5838: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5839: 	{ 0x500000, 0x500fff, SYS16_MWA16_PALETTERAM },
  5840: 	{ 0x600000, 0x600001, sys16_coinctrl_w },
  5841: 	{ 0x600006, 0x600007, sound_command_w },
  5842: 	{ 0xc44000, 0xc44001, MWA16_NOP },
  5843: 	{ 0xc46000, 0xc4601f, SYS16_MWA16_EXTRAM3 },
  5844: MEMORY_END
  5845: 
  5846: /***************************************************************************/
  5847: 
  5848: static void tturfbl_update_proc( void ){
  5849: 	sys16_fg_scrollx = sys16_textram[0x74c] & 0x01ff;
  5850: 	sys16_bg_scrollx = sys16_textram[0x74d/2] & 0x01ff;
  5851: 	sys16_fg_scrolly = sys16_textram[0x748];
  5852: 	sys16_bg_scrolly = sys16_textram[0x749];
  5853: 
  5854: 
  5855: 	{
  5856: 		int data1,data2;
  5857: 
  5858: 		data1 = sys16_textram[0x740];
  5859: 		data2 = sys16_textram[0x741];
  5860: 
  5861: 		sys16_fg_page[3] = data1>>12;
  5862: 		sys16_bg_page[3] = (data1>>8)&0xf;
  5863: 		sys16_fg_page[1] = (data1>>4)&0xf;
  5864: 		sys16_bg_page[1] = data1&0xf;
  5865: 
  5866: 		sys16_fg_page[2] = data2>>12;
  5867: 		sys16_bg_page[2] = (data2>>8)&0xf;
  5868: 		sys16_fg_page[0] = (data2>>4)&0xf;
  5869: 		sys16_bg_page[0] = data2&0xf;
  5870: 	}
  5871: }
  5872: 
  5873: static MACHINE_INIT( tturfbl ){
  5874: 	static int bank[16] = {
  5875: 		0,0,0,0,
  5876: 		0,0,0,3,
  5877: 		0,0,0,2,
  5878: 		0,1,0,0
  5879: 	};
  5880: 	sys16_obj_bank = bank;
  5881: 	sys16_sprxoffset = -0x48;
  5882: 	sys16_spritelist_end=0xc000;
  5883: 
  5884: 	sys16_update_proc = tturfbl_update_proc;
  5885: }
  5886: 
  5887: static DRIVER_INIT( tturfbl )
  5888: {
  5889: 	int i;
  5890: 
  5891: 	machine_init_sys16_onetime();
  5892: 
  5893: 	/* invert the graphics bits on the tiles */
  5894: 	for (i = 0; i < 0x30000; i++)
  5895: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  5896: }
  5897: /***************************************************************************/
  5898: // sound ??
  5899: static MACHINE_DRIVER_START( tturfbl )
  5900: 
  5901: 	/* basic machine hardware */
  5902: 	MDRV_IMPORT_FROM(system16_7759)
  5903: 	MDRV_CPU_MODIFY("main")
  5904: 	MDRV_CPU_MEMORY(tturfbl_readmem,tturfbl_writemem)
  5905: 
  5906: 	MDRV_MACHINE_INIT(tturfbl)
  5907: MACHINE_DRIVER_END
  5908: 
  5909: /***************************************************************************/
  5910: // sys16B
  5911: ROM_START( wb3 )
  5912: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5913: 	ROM_LOAD16_BYTE( "epr12259.a7", 0x000000, 0x20000, CRC(54927c7e) SHA1(09a4c25b40aba2056c79b5c2e6e8cb7e6c05bc16) )
  5914: 	ROM_LOAD16_BYTE( "epr12258.a5", 0x000001, 0x20000, CRC(01f5898c) SHA1(2422b4199ce5b63482f7fa1c790c90fc70a2b872) )
  5915: 
  5916: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5917: 	ROM_LOAD( "epr12124.a14", 0x00000, 0x10000, CRC(dacefb6f) SHA1(789a5a99ad9419aee9da5397bcea34452ea8b4b3) )
  5918: 	ROM_LOAD( "epr12125.a15", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) )
  5919: 	ROM_LOAD( "epr12126.a16", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) )
  5920: 
  5921: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  5922: 	ROM_LOAD16_BYTE( "epr12093.b4", 0x00001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
  5923: 	ROM_LOAD16_BYTE( "epr12097.b8", 0x00000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
  5924: 	ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
  5925: 	ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
  5926: 	ROM_LOAD16_BYTE( "epr12090.b1", 0x40001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
  5927: 	ROM_LOAD16_BYTE( "epr12094.b5", 0x40000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
  5928: 	ROM_LOAD16_BYTE( "epr12092.b3", 0x60001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
  5929: 	ROM_LOAD16_BYTE( "epr12096.b7", 0x60000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
  5930: 
  5931: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  5932: 	ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) )
  5933: ROM_END
  5934: 
  5935: ROM_START( wb3a )
  5936: 	ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
  5937: // Custom CPU 317-0089
  5938: 	ROM_LOAD16_BYTE( "epr12137.a7", 0x000000, 0x20000, CRC(6f81238e) SHA1(b578165c1624f8a112e9eea098fb4551cc38faa1) )
  5939: 	ROM_LOAD16_BYTE( "epr12136.a5", 0x000001, 0x20000, CRC(4cf05003) SHA1(bd4c64c327e53143aa94062f91946eda0a7146c2) )
  5940: 
  5941: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  5942: 	ROM_LOAD( "epr12124.a14", 0x00000, 0x10000, CRC(dacefb6f) SHA1(789a5a99ad9419aee9da5397bcea34452ea8b4b3) )
  5943: 	ROM_LOAD( "epr12125.a15", 0x10000, 0x10000, CRC(9fc36df7) SHA1(b39ccc687489e9781181197505fc78aa5cf7ea55) )
  5944: 	ROM_LOAD( "epr12126.a16", 0x20000, 0x10000, CRC(a693fd94) SHA1(38e5446f41b6793a8e4134fdd92b02b86e3589f7) )
  5945: 
  5946: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  5947: 	ROM_LOAD16_BYTE( "epr12093.b4", 0x00001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
  5948: 	ROM_LOAD16_BYTE( "epr12097.b8", 0x00000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
  5949: 	ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
  5950: 	ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
  5951: 	ROM_LOAD16_BYTE( "epr12090.b1", 0x40001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
  5952: 	ROM_LOAD16_BYTE( "epr12094.b5", 0x40000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
  5953: 	ROM_LOAD16_BYTE( "epr12092.b3", 0x60001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
  5954: 	ROM_LOAD16_BYTE( "epr12096.b7", 0x60000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
  5955: 
  5956: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  5957: 	ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) )
  5958: ROM_END
  5959: 
  5960: /***************************************************************************/
  5961: 
  5962: static MEMORY_READ16_START( wb3_readmem )
  5963: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  5964: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  5965: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  5966: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  5967: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  5968: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  5969: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  5970: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  5971: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  5972: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  5973: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  5974: MEMORY_END
  5975: 
  5976: static WRITE16_HANDLER( wb3_sound_command_w ){
  5977: //	if( ACCESSING_MSB ) sound_command_w(offset,data>>8 );
  5978: }
  5979: 
  5980: static MEMORY_WRITE16_START( wb3_writemem )
  5981: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  5982: 	{ 0x3f0000, 0x3f0003, MWA16_NOP },
  5983: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  5984: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  5985: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  5986: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  5987: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  5988: 	{ 0xffc008, 0xffc009, wb3_sound_command_w },
  5989: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  5990: MEMORY_END
  5991: 
  5992: /***************************************************************************/
  5993: 
  5994: static void wb3_update_proc( void ){
  5995: 	set_fg_page( sys16_textram[0x740] );
  5996: 	set_bg_page( sys16_textram[0x741] );
  5997: 	sys16_fg_scrolly = sys16_textram[0x748];
  5998: 	sys16_bg_scrolly = sys16_textram[0x749];
  5999: 	sys16_fg_scrollx = sys16_textram[0x74c];
  6000: 	sys16_bg_scrollx = sys16_textram[0x74d];
  6001: }
  6002: 
  6003: static MACHINE_INIT( wb3 ){
  6004: 	static int bank[16] = {
  6005: 		2,0,
  6006: 		1,0,
  6007: 		3,0,
  6008: 		0,3,
  6009: 		0,0,
  6010: 		0,2,
  6011: 		0,1,
  6012: 		0,0
  6013: 	};
  6014: 	sys16_obj_bank = bank;
  6015: 	sys16_update_proc = wb3_update_proc;
  6016: }
  6017: 
  6018: static DRIVER_INIT( wb3 ){
  6019: 	machine_init_sys16_onetime();
  6020: }
  6021: 
  6022: /***************************************************************************/
  6023: 
  6024: INPUT_PORTS_START( wb3 )
  6025: 	SYS16_JOY1
  6026: 	SYS16_JOY2
  6027: 	SYS16_SERVICE
  6028: 	SYS16_COINAGE
  6029: 
  6030: PORT_START	/* DSW1 */
  6031: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  6032: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  6033: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6034: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  6035: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  6036: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6037: 	PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
  6038: 	PORT_DIPSETTING(    0x00, "2" )
  6039: 	PORT_DIPSETTING(    0x0c, "3" )
  6040: 	PORT_DIPSETTING(    0x08, "4" )
  6041: 	PORT_DIPSETTING(    0x04, "5" )
  6042: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) )		//??
  6043: 	PORT_DIPSETTING(    0x10, "5000/10000/18000/30000" )
  6044: 	PORT_DIPSETTING(    0x00, "5000/15000/30000" )
  6045: 	PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  6046: 	PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  6047: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6048: 	PORT_DIPNAME( 0x40, 0x40, "Allow Round Select" )
  6049: 	PORT_DIPSETTING(    0x40, DEF_STR( No ) )
  6050: 	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )			// no collision though
  6051: 	PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
  6052: 	PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  6053: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6054: INPUT_PORTS_END
  6055: 
  6056: /***************************************************************************/
  6057: 
  6058: static MACHINE_DRIVER_START( wb3 )
  6059: 
  6060: 	/* basic machine hardware */
  6061: 	MDRV_IMPORT_FROM(system16)
  6062: 	MDRV_CPU_MODIFY("main")
  6063: 	MDRV_CPU_MEMORY(wb3_readmem,wb3_writemem)
  6064: 
  6065: 	MDRV_MACHINE_INIT(wb3)
  6066: MACHINE_DRIVER_END
  6067: 
  6068: /***************************************************************************/
  6069: // sys16B
  6070: ROM_START( wb3bl )
  6071: 	ROM_REGION( 0x040000, REGION_CPU1, 0 ) /* 68000 code */
  6072: 	ROM_LOAD16_BYTE( "wb3_03", 0x000000, 0x10000, CRC(0019ab3b) SHA1(89d49a437690fa6e0c35bb9f1450042f89504714) )
  6073: 	ROM_LOAD16_BYTE( "wb3_05", 0x000001, 0x10000, CRC(196e17ee) SHA1(71e4345b2c3d1612a3d424c9310fad1e23c8a9f7) )
  6074: 	ROM_LOAD16_BYTE( "wb3_02", 0x020000, 0x10000, CRC(c87350cb) SHA1(55a8cb68d70b6060dd9a55e281e216ce3917ea5b) )
  6075: 	ROM_LOAD16_BYTE( "wb3_04", 0x020001, 0x10000, CRC(565d5035) SHA1(e28a132f1a4ce9466945e231c54502178748af98) )
  6076: 
  6077: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6078: 	ROM_LOAD( "wb3_14", 0x00000, 0x10000, CRC(d3f20bca) SHA1(0a87f709f8e2a913473512ede408e2cbc535443f) )
  6079: 	ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) )
  6080: 	ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) )
  6081: 
  6082: 	ROM_REGION( 0x080000, REGION_GFX2, 0 ) /* sprites */
  6083: 	ROM_LOAD16_BYTE( "epr12093.b4", 0x000001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
  6084: 	ROM_LOAD16_BYTE( "epr12097.b8", 0x000000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
  6085: 	ROM_LOAD16_BYTE( "epr12091.b2", 0x020001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
  6086: 	ROM_LOAD16_BYTE( "epr12095.b6", 0x020000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
  6087: 	ROM_LOAD16_BYTE( "epr12090.b1", 0x040001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
  6088: 	ROM_LOAD16_BYTE( "epr12094.b5", 0x040000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
  6089: 	ROM_LOAD16_BYTE( "epr12092.b3", 0x060001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
  6090: 	ROM_LOAD16_BYTE( "epr12096.b7", 0x060000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
  6091: 
  6092: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  6093: 	ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) )
  6094: ROM_END
  6095: 
  6096: /***************************************************************************/
  6097: 
  6098: static MEMORY_READ16_START( wb3bl_readmem )
  6099: 	{ 0x000000, 0x03ffff, MRA16_ROM },
  6100: 	{ 0x400000, 0x40ffff, SYS16_MRA16_TILERAM },
  6101: 	{ 0x410000, 0x410fff, SYS16_MRA16_TEXTRAM },
  6102: 	{ 0x440000, 0x440fff, SYS16_MRA16_SPRITERAM },
  6103: 	{ 0x840000, 0x840fff, SYS16_MRA16_PALETTERAM },
  6104: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  6105: 	{ 0xc41004, 0xc41005, input_port_1_word_r }, // player2
  6106: 	{ 0xc41000, 0xc41001, input_port_2_word_r }, // service
  6107: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  6108: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  6109: 	{ 0xc46000, 0xc4601f, SYS16_MRA16_EXTRAM3 },
  6110: 	{ 0xff0000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  6111: MEMORY_END
  6112: 
  6113: static MEMORY_WRITE16_START( wb3bl_writemem )
  6114: 	{ 0x000000, 0x03ffff, MWA16_ROM },
  6115: 	{ 0x3f0000, 0x3f0003, MWA16_NOP },
  6116: 	{ 0x400000, 0x40ffff, SYS16_MWA16_TILERAM },
  6117: 	{ 0x410000, 0x410fff, SYS16_MWA16_TEXTRAM },
  6118: 	{ 0x440000, 0x440fff, SYS16_MWA16_SPRITERAM },
  6119: 	{ 0x840000, 0x840fff, SYS16_MWA16_PALETTERAM },
  6120: 	{ 0xc42006, 0xc42007, sound_command_w },
  6121: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  6122: 	{ 0xc44000, 0xc44001, MWA16_NOP },
  6123: 	{ 0xc46000, 0xc4601f, SYS16_MWA16_EXTRAM3 },
  6124: 	{ 0xff0000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  6125: MEMORY_END
  6126: 
  6127: /***************************************************************************/
  6128: 
  6129: static void wb3bl_update_proc( void ){
  6130: 	sys16_fg_scrollx = sys16_workingram[0xc030/2];
  6131: 	sys16_bg_scrollx = sys16_workingram[0xc038/2];
  6132: 	sys16_fg_scrolly = sys16_workingram[0xc032/2];
  6133: 	sys16_bg_scrolly = sys16_workingram[0xc03c/2];
  6134: 
  6135: 	set_fg_page( sys16_textram[0x0ff6/2] );
  6136: 	set_bg_page( sys16_textram[0x0ff4/2] );
  6137: }
  6138: 
  6139: static MACHINE_INIT( wb3bl ){
  6140: 	static int bank[16] = {
  6141: 		2,0,
  6142: 		1,0,
  6143: 		3,0,
  6144: 		0,3,
  6145: 		0,0,
  6146: 		0,2,
  6147: 		0,1,
  6148: 		0,0
  6149: 	};
  6150: 	sys16_obj_bank = bank;
  6151: 
  6152: 	sys16_patch_code( 0x17058, 0x4e );
  6153: 	sys16_patch_code( 0x17059, 0xb9 );
  6154: 	sys16_patch_code( 0x1705a, 0x00 );
  6155: 	sys16_patch_code( 0x1705b, 0x00 );
  6156: 	sys16_patch_code( 0x1705c, 0x09 );
  6157: 	sys16_patch_code( 0x1705d, 0xdc );
  6158: 	sys16_patch_code( 0x1705e, 0x4e );
  6159: 	sys16_patch_code( 0x1705f, 0xf9 );
  6160: 	sys16_patch_code( 0x17060, 0x00 );
  6161: 	sys16_patch_code( 0x17061, 0x01 );
  6162: 	sys16_patch_code( 0x17062, 0x70 );
  6163: 	sys16_patch_code( 0x17063, 0xe0 );
  6164: 	sys16_patch_code( 0x1a3a, 0x31 );
  6165: 	sys16_patch_code( 0x1a3b, 0x7c );
  6166: 	sys16_patch_code( 0x1a3c, 0x80 );
  6167: 	sys16_patch_code( 0x1a3d, 0x00 );
  6168: 	sys16_patch_code( 0x23df8, 0x14 );
  6169: 	sys16_patch_code( 0x23df9, 0x41 );
  6170: 	sys16_patch_code( 0x23dfa, 0x10 );
  6171: 	sys16_patch_code( 0x23dfd, 0x14 );
  6172: 	sys16_patch_code( 0x23dff, 0x1c );
  6173: 
  6174: 	sys16_update_proc = wb3bl_update_proc;
  6175: }
  6176: 
  6177: static DRIVER_INIT( wb3bl )
  6178: {
  6179: 	int i;
  6180: 
  6181: 	machine_init_sys16_onetime();
  6182: 
  6183: 	/* invert the graphics bits on the tiles */
  6184: 	for (i = 0; i < 0x30000; i++)
  6185: 		memory_region(REGION_GFX1)[i] ^= 0xff;
  6186: }
  6187: 
  6188: /***************************************************************************/
  6189: 
  6190: static MACHINE_DRIVER_START( wb3bl )
  6191: 
  6192: 	/* basic machine hardware */
  6193: 	MDRV_IMPORT_FROM(system16)
  6194: 	MDRV_CPU_MODIFY("main")
  6195: 	MDRV_CPU_MEMORY(wb3bl_readmem,wb3bl_writemem)
  6196: 
  6197: 	MDRV_MACHINE_INIT(wb3bl)
  6198: MACHINE_DRIVER_END
  6199: 
  6200: /***************************************************************************/
  6201: // sys16B
  6202: ROM_START( wrestwar )
  6203: 	ROM_REGION( 0xc0000, REGION_CPU1, 0 ) /* 68000 code */
  6204: 	ROM_LOAD16_BYTE( "ww.a7", 0x00000, 0x20000, CRC(eeaba126) SHA1(ca1f630ff0cfc301205d2b8226d7614eadc117b7) )
  6205: 	ROM_LOAD16_BYTE( "ww.a5", 0x00001, 0x20000, CRC(6714600a) SHA1(8b04347f39bb8a8bc52b1bbfa367d42ea7c61bc9) )
  6206: 	/* empty 0x40000 - 0x80000 */
  6207: 	ROM_LOAD16_BYTE( "ww.a8", 0x80000, 0x20000, CRC(b77ba665) SHA1(b6a01ca857b5127ebb763f18cd4123185a7765a6) )
  6208: 	ROM_LOAD16_BYTE( "ww.a6", 0x80001, 0x20000, CRC(ddf075cb) SHA1(5d887f0d5786fa62757c593d937bba6f150c1b12) )
  6209: 
  6210: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6211: 	ROM_LOAD( "ww.a14", 0x00000, 0x20000, CRC(6a821ab9) SHA1(e69f7e534835d4c820746ffc3ad76c3b7bb9b02e) )
  6212: 	ROM_LOAD( "ww.a15", 0x20000, 0x20000, CRC(2b1a0751) SHA1(8cb1027ef3728f5bdfdb5e2df0f0421f743cdc0a) )
  6213: 	ROM_LOAD( "ww.a16", 0x40000, 0x20000, CRC(f6e190fe) SHA1(4c8b334fb22c449d8d00c8f49f5eccbe008e244f) )
  6214: 
  6215: 	ROM_REGION( 0x180000, REGION_GFX2, 0 ) /* sprites */
  6216: 	ROM_LOAD16_BYTE( "ww.b1",  0x000001, 0x20000, CRC(ffa7d368) SHA1(e5663ef1cbe8ab27be0919a3cd78d9a7747bbac6) )
  6217: 	ROM_LOAD16_BYTE( "ww.b5",  0x000000, 0x20000, CRC(8d7794c1) SHA1(ace87970cfa02ab8200173622633d0d70ef7aa9e) )
  6218: 	ROM_LOAD16_BYTE( "ww.b2",  0x040001, 0x20000, CRC(0ed343f2) SHA1(951bd616e63c5fe0aa3f387c9c12153b4f29675f) )
  6219: 	ROM_LOAD16_BYTE( "ww.b6",  0x040000, 0x20000, CRC(99458d58) SHA1(87020267610c5784e066bb4e3551852d27b4cf61) )
  6220: 	ROM_LOAD16_BYTE( "ww.b3",  0x080001, 0x20000, CRC(3087104d) SHA1(9ad0ea2b580820443c576cbb95d57467e32ea7b5) )
  6221: 	ROM_LOAD16_BYTE( "ww.b7",  0x080000, 0x20000, CRC(abcf9bed) SHA1(4f755cfd0304e877b798c31de50e15995f8c4edf) )
  6222: 	ROM_LOAD16_BYTE( "ww.b4",  0x0c0001, 0x20000, CRC(41b6068b) SHA1(c1f1f51c4e0f4320cef7821bccac5b0c9e915d9b) )
  6223: 	ROM_LOAD16_BYTE( "ww.b8",  0x0c0000, 0x20000, CRC(97eac164) SHA1(2bb62e6d8b2d662e9b31aa8d238a51af7c7905e8) )
  6224: 	ROM_LOAD16_BYTE( "ww.a1",  0x100001, 0x20000, CRC(260311c5) SHA1(6b52b671252aef992c0546468c44b722bdb6a649) )
  6225: 	ROM_LOAD16_BYTE( "ww.b10", 0x100000, 0x20000, CRC(35a4b1b1) SHA1(c3b8ba708f9f2822e48e52ea74d7e96f08182ac4) )
  6226: 	ROM_LOAD16_BYTE( "ww.a2",  0x140001, 0x10000, CRC(12e38a5c) SHA1(05558a370b4e8100d2fa5e700a5ab76771ff7729) )
  6227: 	ROM_LOAD16_BYTE( "ww.b11", 0x140000, 0x10000, CRC(fa06fd24) SHA1(20a578b82a75fe96a230c91645108fdc8b5bae21) )
  6228: 
  6229: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  6230: 	ROM_LOAD( "ww.a10", 0x0000, 0x08000, CRC(c3609607) SHA1(2e0acb775c60851bf0b2037b91b07ead061d5862) )
  6231: 	ROM_LOAD( "ww.a11", 0x10000, 0x20000, CRC(fb9a7f29) SHA1(7ba79c18ab4e586be2deccd78e4479d55eb75a7e) )
  6232: 	ROM_LOAD( "ww.a12", 0x30000, 0x20000, CRC(d6617b19) SHA1(aa36d257eaa52c8c871a39aaa2f29c203525dbaf) )
  6233: ROM_END
  6234: 
  6235: /***************************************************************************/
  6236: 
  6237: static READ16_HANDLER( ww_io_service_r ){
  6238: 	return input_port_2_word_r(offset,0) | (sys16_workingram[0x2082/2] & 0xff00);
  6239: }
  6240: 
  6241: static MEMORY_READ16_START( wrestwar_readmem )
  6242: 	{ 0x000000, 0x0bffff, MRA16_ROM },
  6243: 	{ 0x100000, 0x10ffff, SYS16_MRA16_TILERAM },
  6244: 	{ 0x110000, 0x110fff, SYS16_MRA16_TEXTRAM },
  6245: 	{ 0x200000, 0x200fff, SYS16_MRA16_SPRITERAM },
  6246: 	{ 0x300000, 0x300fff, SYS16_MRA16_PALETTERAM },
  6247: 	{ 0x400000, 0x400003, SYS16_MRA16_EXTRAM },
  6248: 	{ 0xc41002, 0xc41003, input_port_0_word_r }, // player1
  6249: 	{ 0xc41006, 0xc41007, input_port_1_word_r }, // player2
  6250: 	{ 0xc42002, 0xc42003, input_port_3_word_r }, // dip1
  6251: 	{ 0xc42000, 0xc42001, input_port_4_word_r }, // dip2
  6252: 	{ 0xffe082, 0xffe083, ww_io_service_r },
  6253: 	{ 0xffc000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  6254: MEMORY_END
  6255: 
  6256: static MEMORY_WRITE16_START( wrestwar_writemem )
  6257: 	{ 0x000000, 0x0bffff, MWA16_ROM },
  6258: 	{ 0x100000, 0x10ffff, SYS16_MWA16_TILERAM },
  6259: 	{ 0x110000, 0x110fff, SYS16_MWA16_TEXTRAM },
  6260: 	{ 0x200000, 0x200fff, SYS16_MWA16_SPRITERAM },
  6261: 	{ 0x300000, 0x300fff, SYS16_MWA16_PALETTERAM },
  6262: 	{ 0x400000, 0x400003, SYS16_MWA16_EXTRAM },
  6263: 	{ 0xc40000, 0xc40001, sys16_coinctrl_w },
  6264: 	{ 0xc43034, 0xc43035, MWA16_NOP },
  6265: 	{ 0xffe08e, 0xffe08f, sound_command_w },
  6266: 	{ 0xffc000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  6267: MEMORY_END
  6268: 
  6269: /***************************************************************************/
  6270: 
  6271: static void wrestwar_update_proc( void ){
  6272: 	set_fg_page( sys16_textram[0x740] );
  6273: 	set_bg_page( sys16_textram[0x741] );
  6274: 	sys16_fg_scrolly = sys16_textram[0x748];
  6275: 	sys16_bg_scrolly = sys16_textram[0x749];
  6276: 	sys16_fg_scrollx = sys16_textram[0x74c];
  6277: 	sys16_bg_scrollx = sys16_textram[0x74d];
  6278: 
  6279: 	set_tile_bank( sys16_extraram[1] );
  6280: }
  6281: 
  6282: static MACHINE_INIT( wrestwar ){
  6283: 	sys16_bg_priority_mode=2;
  6284: 	sys16_bg_priority_value=0x0a00;
  6285: 	sys16_update_proc = wrestwar_update_proc;
  6286: }
  6287: 
  6288: static DRIVER_INIT( wrestwar ){
  6289: 	machine_init_sys16_onetime();
  6290: 	sys16_bg1_trans=1;
  6291: 	sys16_MaxShadowColors=16;
  6292: 	sys18_splittab_bg_y=&sys16_textram[0x0f40];
  6293: 	sys18_splittab_fg_y=&sys16_textram[0x0f00];
  6294: 	sys16_rowscroll_scroll=0x8000;
  6295: }
  6296: /***************************************************************************/
  6297: 
  6298: INPUT_PORTS_START( wrestwar )
  6299: 	SYS16_JOY1
  6300: 	SYS16_JOY2
  6301: 	SYS16_SERVICE
  6302: 	SYS16_COINAGE
  6303: 
  6304: PORT_START	/* DSW1 */
  6305: 	PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  6306: 	PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  6307: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6308: 	PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
  6309: 	PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  6310: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6311: 	PORT_DIPNAME( 0x0c, 0x0c, "Round Time" )
  6312: 	PORT_DIPSETTING(    0x00, "100" )
  6313: 	PORT_DIPSETTING(    0x0c, "110" )
  6314: 	PORT_DIPSETTING(    0x08, "120" )
  6315: 	PORT_DIPSETTING(    0x04, "130" )
  6316: 	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  6317: 	PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  6318: 	PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  6319: 	PORT_DIPNAME( 0x20, 0x20, "Continuation" )
  6320: 	PORT_DIPSETTING(    0x20, "Continue" )
  6321: 	PORT_DIPSETTING(    0x00, "No Continue" )
  6322: 	PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) )
  6323: 	PORT_DIPSETTING(    0x80, "Easy" )
  6324: 	PORT_DIPSETTING(    0xc0, "Normal" )
  6325: 	PORT_DIPSETTING(    0x40, "Hard" )
  6326: 	PORT_DIPSETTING(    0x00, "Hardest" )
  6327: 
  6328: INPUT_PORTS_END
  6329: 
  6330: /***************************************************************************/
  6331: 
  6332: static MACHINE_DRIVER_START( wrestwar )
  6333: 
  6334: 	/* basic machine hardware */
  6335: 	MDRV_IMPORT_FROM(system16_7759)
  6336: 	MDRV_CPU_MODIFY("main")
  6337: 	MDRV_CPU_MEMORY(wrestwar_readmem,wrestwar_writemem)
  6338: 
  6339: 	MDRV_MACHINE_INIT(wrestwar)
  6340: MACHINE_DRIVER_END
  6341: 
  6342: /*****************************************************************************/
  6343: /* Dummy drivers for games that don't have a working clone and are protected */
  6344: /*****************************************************************************/
  6345: 
  6346: static MEMORY_READ16_START( sys16_dummy_readmem )
  6347: 	{ 0x000000, 0x0fffff, MRA16_ROM },
  6348: 	{ 0xff0000, 0xffffff, SYS16_MRA16_WORKINGRAM },
  6349: MEMORY_END
  6350: 
  6351: static MEMORY_WRITE16_START( sys16_dummy_writemem )
  6352: 	{ 0x000000, 0x0fffff, MWA16_ROM },
  6353: 	{ 0xff0000, 0xffffff, SYS16_MWA16_WORKINGRAM },
  6354: MEMORY_END
  6355: 
  6356: static MACHINE_INIT( sys16_dummy ){
  6357: }
  6358: 
  6359: static DRIVER_INIT( s16dummy )
  6360: {
  6361: 	machine_init_sys16_onetime();
  6362: }
  6363: 
  6364: INPUT_PORTS_START( s16dummy )
  6365: INPUT_PORTS_END
  6366: 
  6367: static MACHINE_DRIVER_START( s16dummy )
  6368: 
  6369: 	/* basic machine hardware */
  6370: 	MDRV_IMPORT_FROM(system16)
  6371: 	MDRV_CPU_MODIFY("main")
  6372: 	MDRV_CPU_MEMORY(sys16_dummy_readmem,sys16_dummy_writemem)
  6373: 
  6374: 	MDRV_MACHINE_INIT(sys16_dummy)
  6375: MACHINE_DRIVER_END
  6376: 
  6377: /*****************************************************************************/
  6378: // Cotton
  6379: 
  6380: ROM_START( cotton )
  6381: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6382: // custom cpu 317-?????
  6383: 	ROM_LOAD16_BYTE( "epr13858.a7", 0x000000, 0x20000, CRC(276f42fe) )
  6384: 	ROM_LOAD16_BYTE( "epr13856.a5", 0x000001, 0x20000, CRC(14e6b5e7) )
  6385: 	ROM_LOAD16_BYTE( "epr13859.a8", 0x040000, 0x20000, CRC(4703ef9d) )
  6386: 	ROM_LOAD16_BYTE( "epr13857.a6", 0x040001, 0x20000, CRC(de37e527) )
  6387: 
  6388: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6389: 	ROM_LOAD( "scr01.rom", 0x00000, 0x20000, CRC(a47354b6) )
  6390: 	ROM_LOAD( "scr11.rom", 0x20000, 0x20000, CRC(d38424b5) )
  6391: 	ROM_LOAD( "scr02.rom", 0x40000, 0x20000, CRC(8c990026) )
  6392: 	ROM_LOAD( "scr12.rom", 0x60000, 0x20000, CRC(21c15b8a) )
  6393: 	ROM_LOAD( "scr03.rom", 0x80000, 0x20000, CRC(d2b175bf) )
  6394: 	ROM_LOAD( "scr13.rom", 0xa0000, 0x20000, CRC(b9d62531) )
  6395: 
  6396: 	ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */
  6397: 	ROM_LOAD16_BYTE( "obj0-e.rom", 0x000001, 0x20000, CRC(ab4b3468) )
  6398: 	ROM_LOAD16_BYTE( "obj0-o.rom", 0x000000, 0x20000, CRC(7024f404) )
  6399: 	ROM_LOAD16_BYTE( "obj1-e.rom", 0x040001, 0x20000, CRC(69b41ac3) )
  6400: 	ROM_LOAD16_BYTE( "obj1-o.rom", 0x040000, 0x20000, CRC(6169bba4) )
  6401: 	ROM_LOAD16_BYTE( "obj2-e.rom", 0x080001, 0x20000, CRC(0801cf02) )
  6402: 	ROM_LOAD16_BYTE( "obj2-o.rom", 0x080000, 0x20000, CRC(b014f02d) )
  6403: 	ROM_LOAD16_BYTE( "obj3-e.rom", 0x0c0001, 0x20000, CRC(f066f315) )
  6404: 	ROM_LOAD16_BYTE( "obj3-o.rom", 0x0c0000, 0x20000, CRC(e62a7cd6) )
  6405: 	ROM_LOAD16_BYTE( "obj4-e.rom", 0x100001, 0x20000, CRC(1bd145f3) )
  6406: 	ROM_LOAD16_BYTE( "obj4-o.rom", 0x100000, 0x20000, CRC(943aba8b) )
  6407: 	ROM_LOAD16_BYTE( "obj5-e.rom", 0x140001, 0x20000, CRC(4fd59bff) )
  6408: 	ROM_LOAD16_BYTE( "obj5-o.rom", 0x140000, 0x20000, CRC(7ea93200) )
  6409: 	ROM_LOAD16_BYTE( "obj6-e.rom", 0x180001, 0x20000, CRC(6a66868d) )
  6410: 	ROM_LOAD16_BYTE( "obj6-o.rom", 0x180000, 0x20000, CRC(1c942190) )
  6411: 	ROM_LOAD16_BYTE( "obj7-e.rom", 0x1c0001, 0x20000, CRC(1c5ffad8) )
  6412: 	ROM_LOAD16_BYTE( "obj7-o.rom", 0x1c0000, 0x20000, CRC(856f3ee2) )
  6413: 
  6414: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  6415: 	ROM_LOAD( "s-prog.rom",	 0x00000, 0x08000, CRC(6a57b027) )
  6416: 	ROM_LOAD( "speech0.rom", 0x10000, 0x20000, CRC(4d21153f) )
  6417: ROM_END
  6418: 
  6419: 
  6420: ROM_START( cottona )
  6421: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6422: // custom cpu 317-0181a
  6423: 	ROM_LOAD16_BYTE( "ep13921a.a7", 0x000000, 0x20000, CRC(f047a037) )
  6424: 	ROM_LOAD16_BYTE( "ep13919a.a5", 0x000001, 0x20000, CRC(651108b1) )
  6425: 	ROM_LOAD16_BYTE( "ep13922a.a8", 0x040000, 0x20000, CRC(1ca248c5) )
  6426: 	ROM_LOAD16_BYTE( "ep13920a.a6", 0x040001, 0x20000, CRC(fa3610f9) )
  6427: 
  6428: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6429: 	ROM_LOAD( "scr01.rom", 0x00000, 0x20000, CRC(a47354b6) )
  6430: 	ROM_LOAD( "scr11.rom", 0x20000, 0x20000, CRC(d38424b5) )
  6431: 	ROM_LOAD( "scr02.rom", 0x40000, 0x20000, CRC(8c990026) )
  6432: 	ROM_LOAD( "scr12.rom", 0x60000, 0x20000, CRC(21c15b8a) )
  6433: 	ROM_LOAD( "scr03.rom", 0x80000, 0x20000, CRC(d2b175bf) )
  6434: 	ROM_LOAD( "scr13.rom", 0xa0000, 0x20000, CRC(b9d62531) )
  6435: 
  6436: 	ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */
  6437: 	ROM_LOAD16_BYTE( "obj0-e.rom", 0x000001, 0x20000, CRC(ab4b3468) )
  6438: 	ROM_LOAD16_BYTE( "obj0-o.rom", 0x000000, 0x20000, CRC(7024f404) )
  6439: 	ROM_LOAD16_BYTE( "obj1-e.rom", 0x040001, 0x20000, CRC(69b41ac3) )
  6440: 	ROM_LOAD16_BYTE( "obj1-o.rom", 0x040000, 0x20000, CRC(6169bba4) )
  6441: 	ROM_LOAD16_BYTE( "obj2-e.rom", 0x080001, 0x20000, CRC(0801cf02) )
  6442: 	ROM_LOAD16_BYTE( "obj2-o.rom", 0x080000, 0x20000, CRC(b014f02d) )
  6443: 	ROM_LOAD16_BYTE( "obj3-e.rom", 0x0c0001, 0x20000, CRC(f066f315) )
  6444: 	ROM_LOAD16_BYTE( "obj3-o.rom", 0x0c0000, 0x20000, CRC(e62a7cd6) )
  6445: 	ROM_LOAD16_BYTE( "obj4-e.rom", 0x100001, 0x20000, CRC(1bd145f3) )
  6446: 	ROM_LOAD16_BYTE( "obj4-o.rom", 0x100000, 0x20000, CRC(943aba8b) )
  6447: 	ROM_LOAD16_BYTE( "obj5-e.rom", 0x140001, 0x20000, CRC(4fd59bff) )
  6448: 	ROM_LOAD16_BYTE( "obj5-o.rom", 0x140000, 0x20000, CRC(7ea93200) )
  6449: 	ROM_LOAD16_BYTE( "obj6-e.rom", 0x180001, 0x20000, CRC(6a66868d) )
  6450: 	ROM_LOAD16_BYTE( "obj6-o.rom", 0x180000, 0x20000, CRC(1c942190) )
  6451: 	ROM_LOAD16_BYTE( "obj7-e.rom", 0x1c0001, 0x20000, CRC(1c5ffad8) )
  6452: 	ROM_LOAD16_BYTE( "obj7-o.rom", 0x1c0000, 0x20000, CRC(856f3ee2) )
  6453: 
  6454: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  6455: 	ROM_LOAD( "s-prog.rom",	 0x00000, 0x08000, CRC(6a57b027) )
  6456: 	ROM_LOAD( "speech0.rom", 0x10000, 0x20000, CRC(4d21153f) )
  6457: ROM_END
  6458: 
  6459: 
  6460: /*****************************************************************************/
  6461: // Dunk Shot
  6462: 
  6463: ROM_START( dunkshot )
  6464: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6465: 	ROM_LOAD16_BYTE( "10468.bin", 0x000000, 0x8000, CRC(e2d5f97a) )
  6466: 	ROM_LOAD16_BYTE( "10467.bin", 0x000001, 0x8000, CRC(29774114) )
  6467: 	ROM_LOAD16_BYTE( "10470.bin", 0x010000, 0x8000, CRC(8c60761f) )
  6468: 	ROM_LOAD16_BYTE( "10469.bin", 0x010001, 0x8000, CRC(aa442b81) )
  6469: 	ROM_LOAD16_BYTE( "10472.bin", 0x020000, 0x8000, CRC(206027a6) )
  6470: 	ROM_LOAD16_BYTE( "10471.bin", 0x020001, 0x8000, CRC(22777314) )
  6471: 
  6472: 	ROM_REGION( 0x18000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6473: 	ROM_LOAD( "10485.bin", 0x00000, 0x8000, CRC(f16dda29) )
  6474: 	ROM_LOAD( "10486.bin", 0x08000, 0x8000, CRC(311d973c) )
  6475: 	ROM_LOAD( "10487.bin", 0x10000, 0x8000, CRC(a8fb179f) )
  6476: 
  6477: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites */
  6478: 	ROM_LOAD16_BYTE( "10481.bin", 0x00001, 0x8000, CRC(feb04bc9) )
  6479: 	ROM_LOAD16_BYTE( "10477.bin", 0x00000, 0x8000, CRC(f9d3b2cb) )
  6480: 	ROM_LOAD16_BYTE( "10482.bin", 0x10001, 0x8000, CRC(5bc07618) )
  6481: 	ROM_LOAD16_BYTE( "10478.bin", 0x10000, 0x8000, CRC(5b5c5c92) )
  6482: 	ROM_LOAD16_BYTE( "10483.bin", 0x20001, 0x8000, CRC(7cab4f9e) )
  6483: 	ROM_LOAD16_BYTE( "10479.bin", 0x20000, 0x8000, CRC(e84190a0) )
  6484: 	ROM_LOAD16_BYTE( "10484.bin", 0x30001, 0x8000, CRC(bcb5fcc9) )
  6485: 	ROM_LOAD16_BYTE( "10480.bin", 0x30000, 0x8000, CRC(5dffd9dd) )
  6486: 
  6487: 	ROM_REGION( 0x28000, REGION_CPU2, 0 ) /* sound CPU */
  6488: 	ROM_LOAD( "10473.bin",	 0x00000, 0x08000, CRC(7f1f5a27) )
  6489: 	ROM_LOAD( "10474.bin",   0x10000, 0x08000, CRC(419a656e) )
  6490: 	ROM_LOAD( "10475.bin",   0x18000, 0x08000, CRC(17d55e85) )
  6491: 	ROM_LOAD( "10476.bin",   0x20000, 0x08000, CRC(a6be0956) )
  6492: ROM_END
  6493: 
  6494: /*****************************************************************************/
  6495: // MVP
  6496: 
  6497: ROM_START( mvp )
  6498: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6499: 	ROM_LOAD16_BYTE( "13000.rom", 0x000000, 0x40000, CRC(2e0e21ec) )
  6500: 	ROM_LOAD16_BYTE( "12999.rom", 0x000001, 0x40000, CRC(fd213d28) )
  6501: 
  6502: 	ROM_REGION( 0xc0000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6503: 	ROM_LOAD( "13011.rom", 0x00000, 0x40000, CRC(1cb871fc) )
  6504: 	ROM_LOAD( "13012.rom", 0x40000, 0x40000, CRC(b75e6821) )
  6505: 	ROM_LOAD( "13013.rom", 0x80000, 0x40000, CRC(f1944a3c) )
  6506: 
  6507: 	ROM_REGION( 0x200000, REGION_GFX2, 0 ) /* sprites */
  6508: 	ROM_LOAD16_BYTE( "13010.rom", 0x000001, 0x40000, CRC(df37c567) )
  6509: 	ROM_LOAD16_BYTE( "13009.rom", 0x000000, 0x40000, CRC(126d2e37) )
  6510: 	ROM_LOAD16_BYTE( "13006.rom", 0x080001, 0x40000, CRC(2e9afd2f) )
  6511: 	ROM_LOAD16_BYTE( "13003.rom", 0x080000, 0x40000, CRC(21424151) )
  6512: 	ROM_LOAD16_BYTE( "13007.rom", 0x100001, 0x40000, CRC(55c8605b) )
  6513: 	ROM_LOAD16_BYTE( "13004.rom", 0x100000, 0x40000, CRC(0aa09dd3) )
  6514: 	ROM_LOAD16_BYTE( "13008.rom", 0x180001, 0x40000, CRC(b3d46dfc) )
  6515: 	ROM_LOAD16_BYTE( "13005.rom", 0x180000, 0x40000, CRC(c899c810) )
  6516: 
  6517: 	ROM_REGION( 0x50000, REGION_CPU2, 0 ) /* sound CPU */
  6518: 	ROM_LOAD( "13002.rom",	 0x00000, 0x08000, CRC(1b6e1515) )
  6519: 	ROM_LOAD( "13001.rom",   0x10000, 0x40000, CRC(e8cace8c) )
  6520: ROM_END
  6521: 
  6522: /*****************************************************************************/
  6523: // Excite League
  6524: 
  6525: ROM_START( exctleag )
  6526: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6527: 	ROM_LOAD16_BYTE( "epr11937.a02",0x00000,0x10000, CRC(4ebda367) )
  6528: 	ROM_LOAD16_BYTE( "epr11936.a01",0x00001,0x10000, CRC(0863de60) )
  6529: 	ROM_LOAD16_BYTE( "epr11939.a04",0x20000,0x10000, CRC(117dd98f) )
  6530: 	ROM_LOAD16_BYTE( "epr11938.a03",0x20001,0x10000, CRC(07c08d47) )
  6531: 	ROM_LOAD16_BYTE( "epr11941.a06",0x40000,0x10000, CRC(4df2d451) )
  6532: 	ROM_LOAD16_BYTE( "epr11940.a05",0x40001,0x10000, CRC(dec83274) )
  6533: 
  6534: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6535: 	ROM_LOAD( "epr11942.b09",0x00000,0x10000, CRC(eb70e827) )
  6536: 	ROM_LOAD( "epr11943.b10",0x10000,0x10000, CRC(d97c8982) )
  6537: 	ROM_LOAD( "epr11944.b11",0x20000,0x10000, CRC(a75cae80) )
  6538: 
  6539: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  6540: 	ROM_LOAD16_BYTE( "epr11950.b01",0x00001,0x10000, CRC(af497849) )
  6541: 	ROM_LOAD16_BYTE( "epr11951.b02",0x00000,0x10000, CRC(c04fa974) )
  6542: 	ROM_LOAD16_BYTE( "epr11952.b03",0x20001,0x10000, CRC(e64a9761) )
  6543: 	ROM_LOAD16_BYTE( "epr11953.b04",0x20000,0x10000, CRC(4cae3999) )
  6544: 	ROM_LOAD16_BYTE( "epr11954.b05",0x40001,0x10000, CRC(5fa2106c) )
  6545: 	ROM_LOAD16_BYTE( "epr11955.b06",0x40000,0x10000, CRC(86a0c368) )
  6546: 	ROM_LOAD16_BYTE( "epr11956.b07",0x60001,0x10000, CRC(aff5c2fa) )
  6547: 	ROM_LOAD16_BYTE( "epr11957.b08",0x60000,0x10000, CRC(218f835b) )
  6548: 
  6549: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  6550: 	ROM_LOAD( "epr11945.a07",0x00000,0x8000, CRC(c2a83012) )
  6551: 	ROM_LOAD( "epr11140.a08",0x10000,0x8000, CRC(b297371b) )
  6552: 	ROM_LOAD( "epr11141.a09",0x18000,0x8000, CRC(19756aa6) )
  6553: 	ROM_LOAD( "epr11142.a10",0x20000,0x8000, CRC(25d26c66) )
  6554: 	ROM_LOAD( "epr11143.a11",0x28000,0x8000, CRC(848b7b77) )
  6555: 
  6556: ROM_END
  6557: 
  6558: 
  6559: 
  6560: /*****************************************************************************/
  6561: // Super League
  6562: 
  6563: ROM_START( suprleag )
  6564: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6565: 	ROM_LOAD16_BYTE( "epr11131.a02",0x00000,0x10000, CRC(9b78c2cc) )
  6566: 	ROM_LOAD16_BYTE( "epr11130.a01",0x00001,0x10000, CRC(e2451676) )
  6567: 	ROM_LOAD16_BYTE( "epr11133.a04",0x20000,0x10000, CRC(eed72f37) )
  6568: 	ROM_LOAD16_BYTE( "epr11132.a03",0x20001,0x10000, CRC(ff199325) )
  6569: 	ROM_LOAD16_BYTE( "epr11135.a06",0x40000,0x10000, CRC(3735e0e1) )
  6570: 	ROM_LOAD16_BYTE( "epr11134.a05",0x40001,0x10000, CRC(ccd857f5) )
  6571: 
  6572: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6573: 	ROM_LOAD( "epr11136.b09",0x00000,0x10000, CRC(c3860ce4) )
  6574: 	ROM_LOAD( "epr11137.b10",0x10000,0x10000, CRC(92d96187) )
  6575: 	ROM_LOAD( "epr11138.b11",0x20000,0x10000, CRC(c01dc773) )
  6576: 
  6577: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  6578: 	ROM_LOAD16_BYTE( "epr11144.b01",0x00001,0x10000, CRC(b31de51c) )
  6579: 	ROM_LOAD16_BYTE( "epr11145.b02",0x00000,0x10000, CRC(4223d2c3) )
  6580: 	ROM_LOAD16_BYTE( "epr11146.b03",0x20001,0x10000, CRC(bf0359b6) )
  6581: 	ROM_LOAD16_BYTE( "epr11147.b04",0x20000,0x10000, CRC(3e592772) )
  6582: 	ROM_LOAD16_BYTE( "epr11148.b05",0x40001,0x10000, CRC(126e1309) )
  6583: 	ROM_LOAD16_BYTE( "epr11149.b06",0x40000,0x10000, CRC(694d3765) )
  6584: 	ROM_LOAD16_BYTE( "epr11150.b07",0x60001,0x10000, CRC(9fc0aded) )
  6585: 	ROM_LOAD16_BYTE( "epr11151.b08",0x60000,0x10000, CRC(9de95169) )
  6586: 
  6587: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  6588: 	ROM_LOAD( "epr11139.a07",0x00000,0x08000, CRC(9cbd99da) )
  6589: 	ROM_LOAD( "epr11140.a08",0x10000,0x08000, CRC(b297371b) )
  6590: 	ROM_LOAD( "epr11141.a09",0x18000,0x08000, CRC(19756aa6) )
  6591: 	ROM_LOAD( "epr11142.a10",0x20000,0x08000, CRC(25d26c66) )
  6592: 	ROM_LOAD( "epr11143.a11",0x28000,0x08000, CRC(848b7b77) )
  6593: 
  6594: ROM_END
  6595: 
  6596: /*****************************************************************************/
  6597: // Action Fighter
  6598: 
  6599: ROM_START( afighter )
  6600: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6601: // cpu 317-0018
  6602: 	ROM_LOAD16_BYTE( "10348",0x00000,0x08000, CRC(e51e3012) )
  6603: 	ROM_LOAD16_BYTE( "10349",0x00001,0x08000, CRC(4b434c37) )
  6604: 	ROM_LOAD16_BYTE( "10350",0x20000,0x08000, CRC(f2cd6b3f) )
  6605: 	ROM_LOAD16_BYTE( "10351",0x20001,0x08000, CRC(ede21d8d) )
  6606: 	ROM_LOAD16_BYTE( "10352",0x40000,0x08000, CRC(f8abb143) )
  6607: 	ROM_LOAD16_BYTE( "10353",0x40001,0x08000, CRC(5a757dc9) )
  6608: 
  6609: 	ROM_REGION( 0x30000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6610: 	ROM_LOAD( "10281",0x00000,0x10000, CRC(30e92cda) )
  6611: 	ROM_LOAD( "10282",0x10000,0x10000, CRC(b67b8910) )
  6612: 	ROM_LOAD( "10283",0x20000,0x10000, CRC(e7dbfd2d) )
  6613: 
  6614: 	ROM_REGION( 0x40000, REGION_GFX2, 0 ) /* sprites */
  6615: 	ROM_LOAD16_BYTE( "10285",0x00001,0x08000, CRC(98aa3d04) )
  6616: 	ROM_LOAD16_BYTE( "10286",0x00000,0x08000, CRC(8da050cf) )
  6617: 	ROM_LOAD16_BYTE( "10287",0x10001,0x08000, CRC(7989b74a) )
  6618: 	ROM_LOAD16_BYTE( "10288",0x10000,0x08000, CRC(d3ce551a) )
  6619: 	ROM_LOAD16_BYTE( "10289",0x20001,0x08000, CRC(c59d1b98) )
  6620: 	ROM_LOAD16_BYTE( "10290",0x20000,0x08000, CRC(39354223) )
  6621: 	ROM_LOAD16_BYTE( "10291",0x30001,0x08000, CRC(6e4b245c) )
  6622: 	ROM_LOAD16_BYTE( "10292",0x30000,0x08000, CRC(cef289a3) )
  6623: 
  6624: 	ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* sound CPU */
  6625: 	ROM_LOAD( "10284",0x00000,0x8000, CRC(8ff09116) )
  6626: 
  6627: ROM_END
  6628: 
  6629: /*****************************************************************************/
  6630: // Ryukyu
  6631: 
  6632: ROM_START( ryukyu )
  6633: 	ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 code */
  6634: // cpu 317-5023
  6635: 	ROM_LOAD16_BYTE( "13347",0x00000,0x10000, CRC(398031fa) )
  6636: 	ROM_LOAD16_BYTE( "13348",0x00001,0x10000, CRC(5f0e0c86) )
  6637: 
  6638: 	ROM_REGION( 0x60000, REGION_GFX1, ROMREGION_DISPOSE ) /* tiles */
  6639: 	ROM_LOAD( "13351",0x00000,0x20000, CRC(a68a4e6d) )
  6640: 	ROM_LOAD( "13352",0x20000,0x20000, CRC(5e5531e4) )
  6641: 	ROM_LOAD( "13353",0x40000,0x20000, CRC(6d23dfd8) )
  6642: 
  6643: 	ROM_REGION( 0x80000, REGION_GFX2, 0 ) /* sprites */
  6644: 	ROM_LOAD16_BYTE( "13354",0x00001,0x20000, CRC(f07aad99) )
  6645: 	ROM_LOAD16_BYTE( "13355",0x00000,0x20000, CRC(67890019) )
  6646: 	ROM_LOAD16_BYTE( "13356",0x40001,0x20000, CRC(5498290b) )
  6647: 	ROM_LOAD16_BYTE( "13357",0x40000,0x20000, CRC(f9e7cf03) )
  6648: 
  6649: 	ROM_REGION( 0x30000, REGION_CPU2, 0 ) /* sound CPU */
  6650: 	ROM_LOAD( "13349",0x00000,0x08000, CRC(b83183f8) )
  6651: 	ROM_LOAD( "13350",0x10000,0x20000, CRC(3c59a658) )
  6652: ROM_END
  6653: 
  6654: /***************************************************************************/
  6655: 
  6656: /* pre-System16 */
  6657: /*          rom       parent    machine   inp       init */
  6658: /* Alien Syndrome */
  6659: GAME( 1985, mjleague, 0,        mjleague, mjleague, mjleague, ROT270, "Sega",    "Major League" )
  6660: GAME( 1986, bodyslam, 0,        bodyslam, bodyslam, bodyslam, ROT0,   "Sega",    "Body Slam" )
  6661: GAME( 1986, dumpmtmt, bodyslam, bodyslam, bodyslam, bodyslam, ROT0,   "Sega",    "Dump Matsumoto (Japan)" )
  6662: GAME( 1986, quartet,  0,        quartet,  quartet,  quartet,  ROT0,   "Sega",    "Quartet" )
  6663: GAME( 1986, quartetj, quartet,  quartet,  quartet,  quartet,  ROT0,   "Sega",    "Quartet (Japan)" )
  6664: GAME( 1986, quartet2, quartet,  quartet2, quartet2, quartet2, ROT0,   "Sega",    "Quartet 2" )
  6665: GAME( 1986, quartt2j, quartet,  quartet2, quartet2, quartet2, ROT0,   "Sega",    "Quartet 2 (Japan)" )
  6666: 
  6667: /* System16A */
  6668: /*          rom       parent    machine   inp       init */
  6669: GAMEX(19??, afighter, 0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Action Fighter", GAME_NOT_WORKING )
  6670: GAMEX(1986, alexkidd, 0,        alexkidd, alexkidd, alexkidd, ROT0,   "Sega",    "Alex Kidd: The Lost Stars (set 1)", GAME_NOT_WORKING )
  6671: GAME( 1986, alexkida, alexkidd, alexkidd, alexkidd, alexkidd, ROT0,   "Sega",    "Alex Kidd: The Lost Stars (set 2)" )
  6672: GAME( 1986, fantzone, 0,        fantzone, fantzone, fantzone, ROT0,   "Sega",    "Fantasy Zone (Japan New Ver.)" )
  6673: GAME( 1986, fantzono, fantzone, fantzono, fantzone, fantzone, ROT0,   "Sega",    "Fantasy Zone (Old Ver.)" )
  6674: GAMEX(19??, ryukyu  , 0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Ryukyu", GAME_NOT_WORKING )
  6675: GAME( 1987, shinobi,  0,        shinobi,  shinobi,  shinobi,  ROT0,   "Sega",    "Shinobi (set 1)" )
  6676: GAMEX(1987, shinobib, shinobi,  shinobi,  shinobi,  shinobi,  ROT0,   "Sega",    "Shinobi (set 3)", GAME_NOT_WORKING )
  6677: GAMEX(1987, shinobia, shinobi,  shinobl,  shinobi,  shinobi,  ROT0,   "Sega",    "Shinobi (set 2)", GAME_NOT_WORKING )
  6678: GAME( 1987, shinobl,  shinobi,  shinobl,  shinobi,  shinobi,  ROT0,   "bootleg", "Shinobi (bootleg)" )
  6679: GAME( 1987, sdi,      0,        sdi,      sdi,      sdi,      ROT0,   "Sega",    "SDI - Strategic Defense Initiative" )
  6680: GAMEX(1987, sdioj,    sdi,      sdi,      sdi,      sdi,      ROT0,   "Sega",    "SDI - Strategic Defense Initiative (Japan)", GAME_NOT_WORKING )
  6681: GAMEX(1988, tetris,   0,        tetris,   tetris,   tetris,   ROT0,   "Sega",    "Tetris (Sega Set 1)", GAME_NOT_WORKING )
  6682: GAME( 1988, tetrisbl, tetris,   tetris,   tetris,   tetrisbl, ROT0,   "bootleg", "Tetris (Sega bootleg)" )
  6683: GAMEX(1988, tetrisa,  tetris,   tetris,   tetris,   tetrisbl, ROT0,   "Sega",    "Tetris (Sega Set 2)", GAME_NOT_WORKING )
  6684: 
  6685: /* System16B */
  6686: /*          rom       parent    machine   inp       init */
  6687: GAMEX(1990, atomicp,  0,        atomicp,  atomicp,  atomicp,  ROT0,   "Philko",  "Atomic Point", GAME_NO_SOUND )
  6688: GAME( 1987, aliensyn, 0,        aliensyn, aliensyn, aliensyn, ROT0,   "Sega",    "Alien Syndrome (set 1)" )
  6689: GAMEX(1987, aliensya, aliensyn, aliensyn, aliensyn, aliensyn, ROT0,   "Sega",    "Alien Syndrome (set 2)", GAME_NOT_WORKING )
  6690: GAMEX(1987, aliensyj, aliensyn, aliensyn, aliensyn, aliensyn, ROT0,   "Sega",    "Alien Syndrome (Japan)", GAME_NOT_WORKING )
  6691: GAMEX(1987, aliensyb, aliensyn, aliensyn, aliensyn, aliensyn, ROT0,   "Sega",    "Alien Syndrome (set 3)", GAME_NOT_WORKING )
  6692: GAME( 1988, altbeast, 0,        altbeast, altbeast, altbeast, ROT0,   "Sega",    "Altered Beast (Version 1)" )
  6693: GAMEX(1988, altbeas2, altbeast, altbeas2, altbeast, altbeast, ROT0,   "Sega",    "Altered Beast (Version 2)", GAME_NO_SOUND )
  6694: GAMEX(1988, jyuohki,  altbeast, altbeast, altbeast, altbeast, ROT0,   "Sega",    "Jyuohki (Japan)",           GAME_NOT_WORKING )
  6695: GAME( 1990, aurail,   0,        aurail,   aurail,   aurail,   ROT0,   "Sega / Westone", "Aurail (set 1)" )
  6696: GAME( 1990, auraila,  aurail,   aurail,   aurail,   auraila,  ROT0,   "Sega / Westone", "Aurail (set 2)" )
  6697: GAME( 1989, bayroute, 0,        bayroute, bayroute, bayroute, ROT0,   "Sunsoft / Sega", "Bay Route (set 1)" )
  6698: GAMEX(1989, bayrouta, bayroute, bayroute, bayroute, bayrouta, ROT0,   "Sunsoft / Sega", "Bay Route (set 2)", GAME_NOT_WORKING )
  6699: GAMEX(1989, bayrtbl1, bayroute, bayroute, bayroute, bayrtbl1, ROT0,   "bootleg", "Bay Route (bootleg set 1)", GAME_NOT_WORKING )
  6700: GAMEX(1989, bayrtbl2, bayroute, bayroute, bayroute, bayrtbl1, ROT0,   "bootleg", "Bay Route (bootleg set 2)", GAME_NOT_WORKING )
  6701: /* Bullet */
  6702: /* Charon */
  6703: GAMEX(19??, cotton,   0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Cotton (Japan)", GAME_NOT_WORKING )
  6704: GAMEX(19??, cottona,  cotton,   s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Cotton", GAME_NOT_WORKING )
  6705: GAMEX(19??, dunkshot, 0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Dunk Shot", GAME_NOT_WORKING )
  6706: GAME( 1989, dduxbl,   0,        dduxbl,   dduxbl,   dduxbl,   ROT0,   "bootleg", "Dynamite Dux (bootleg)" )
  6707: GAMEX(1989, eswat,    0,        eswat,    eswat,    eswat,    ROT0,   "Sega",    "E-Swat - Cyber Police", GAME_NOT_WORKING )
  6708: GAME( 1989, eswatbl,  eswat,    eswat,    eswat,    eswat,    ROT0,   "bootleg", "E-Swat - Cyber Police (bootleg)" )
  6709: GAMEX(19??, exctleag, 0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "Excite League", GAME_NOT_WORKING )
  6710: GAMEX(1989, fpoint,   0,        fpoint,   fpoint,   fpoint,   ROT0,   "Sega",    "Flash Point", GAME_NOT_WORKING )
  6711: GAME( 1989, fpointbl, fpoint,   fpoint,   fpoint,   fpointbl, ROT0,   "bootleg", "Flash Point (World, bootleg)" )
  6712: GAMEX(1989, fpointbj, fpoint,   fpoint,   fpointbj, fpointbl, ROT0,   "bootleg", "Flash Point (Japan, bootleg)", GAME_NO_SOUND )
  6713: GAME( 1989, goldnaxe, 0,        goldnaxe, goldnaxe, goldnaxe, ROT0,   "Sega",    "Golden Axe (Version 1)" )
  6714: GAMEX(1989, goldnaxj, goldnaxe, goldnaxe, goldnaxe, goldnaxe, ROT0,   "Sega",    "Golden Axe (Version 1, Japan)", GAME_NOT_WORKING )
  6715: GAMEX(1989, goldnabl, goldnaxe, goldnaxe, goldnaxe, goldnabl, ROT0,   "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING )
  6716: GAME( 1989, goldnaxa, goldnaxe, goldnaxa, goldnaxe, goldnaxe, ROT0,   "Sega",    "Golden Axe (Version 2)" )
  6717: GAMEX(1989, goldnaxb, goldnaxe, goldnaxa, goldnaxe, goldnaxe, ROT0,   "Sega",    "Golden Axe (Version 2 317-0110)", GAME_NOT_WORKING )
  6718: GAMEX(1989, goldnaxc, goldnaxe, goldnaxa, goldnaxe, goldnaxe, ROT0,   "Sega",    "Golden Axe (Version 2 317-0122)", GAME_NOT_WORKING )
  6719: GAME( 1987, hwchamp,  0,        hwchamp,  hwchamp,  hwchamp,  ROT0,   "Sega",    "Heavyweight Champ" )
  6720: GAMEX(19??, mvp,      0,        s16dummy, s16dummy, s16dummy, ROT0,   "Sega", "MVP", GAME_NOT_WORKING )
  6721: GAMEX(1988, passsht,  0,        passsht,  passsht,  passsht,  ROT270, "Sega",    "Passing Shot (2 Players)", GAME_NOT_WORKING )
  6722: GAME( 1988, passshtb, passsht,  passsht,  passsht,  passsht,  ROT270, "bootleg", "Passing Shot (2 Players) (bootleg)" )
  6723: GAMEX(1988, passht4b, passsht,  passht4b, passht4b, passht4b, ROT270, "bootleg", "Passing Shot (4 Players) (bootleg)", GAME_NO_SOUND )
  6724: GAME( 1991, riotcity, 0,        riotcity, riotcity, riotcity, ROT0,   "Sega / Westone", "Riot City" )
  6725: /* Ryukyu */
  6726: /* Shinobi */
  6727: /* Sonic Boom */
  6728: /* SDI */
  6729: /* Sukeban Jansi Ryuko */
  6730: GAMEX(19??, suprleag, 0,        s16dummy, s16dummy, s16dummy, ROT0,         "Sega", "Super League", GAME_NOT_WORKING )
  6731: /* Tetris */
  6732: GAME( 1987, timscanr, 0,        timscanr, timscanr, timscanr, ROT270, "Sega",    "Time Scanner" )
  6733: GAME (1994, toryumon, 0,        toryumon, toryumon, toryumon, ROT0,   "Sega",    "Toryumon" )
  6734: GAMEX(1989, tturf,    0,        tturf,    tturf,    tturf,    ROT0,   "Sega / Sunsoft", "Tough Turf (Japan)", GAME_NO_SOUND )
  6735: GAMEX(1989, tturfu,   tturf,    tturfu,   tturf,    tturf,    ROT0,   "Sega / Sunsoft", "Tough Turf (US)", GAME_NO_SOUND )
  6736: GAMEX(1989, tturfbl,  tturf,    tturfbl,  tturf,    tturfbl,  ROT0,   "bootleg", "Tough Turf (bootleg)", GAME_IMPERFECT_SOUND)
  6737: GAMEX(1988, wb3,      0,        wb3,      wb3,      wb3,      ROT0,   "Sega / Westone", "Wonder Boy III - Monster Lair (set 1)", GAME_NO_SOUND )
  6738: GAMEX(1988, wb3a,     wb3,      wb3,      wb3,      wb3,      ROT0,   "Sega / Westone", "Wonder Boy III - Monster Lair (set 2)", GAME_NOT_WORKING )
  6739: GAME( 1988, wb3bl,    wb3,      wb3bl,    wb3,      wb3bl,    ROT0,   "bootleg", "Wonder Boy III - Monster Lair (bootleg)" )
  6740: GAME( 1989, wrestwar, 0,        wrestwar, wrestwar, wrestwar, ROT270, "Sega",    "Wrestle War" )
  6741: 




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