diff -Nru old/src/mame/drivers/galaxian.c new/src/mame/drivers/galaxian.c --- old/src/mame/drivers/galaxian.c 2010-03-04 16:06:12.000000000 +0100 +++ new/src/mame/drivers/galaxian.c 2010-03-10 23:42:16.000000000 +0100 @@ -212,8 +212,6 @@ - smooncrs : fix read/writes at/to unmapped memory (when player 2, "cocktail" mode) fix the ?#! bug with "bullets" (when player 2, "cocktail" mode) - - zigzag : full Dip Switches and Inputs - - zigzag2 : full Dip Switches and Inputs - jumpbug : full Dip Switches and Inputs - jumpbugb : full Dip Switches and Inputs - levers : full Dip Switches and Inputs @@ -250,7 +248,6 @@ *************************************/ static UINT8 gmgalax_selected_game; -static UINT8 zigzag_ay8910_latch; static UINT8 kingball_speech_dip; static UINT8 kingball_sound; static UINT8 mshuttle_ay8910_cs; @@ -863,44 +860,6 @@ /************************************* * - * Zig Zag I/O - * - *************************************/ - -static WRITE8_HANDLER( zigzag_bankswap_w ) -{ - memory_set_bank(space->machine, "bank1", data & 1); - memory_set_bank(space->machine, "bank2", ~data & 1); -} - - -static WRITE8_HANDLER( zigzag_ay8910_w ) -{ - switch (offset & 0x300) - { - case 0x000: - /* control lines */ - /* bit 0 = WRITE */ - /* bit 1 = C/D */ - if ((offset & 1) != 0) - ay8910_data_address_w(devtag_get_device(space->machine, "aysnd"), offset >> 1, zigzag_ay8910_latch); - break; - - case 0x100: - /* data latch */ - zigzag_ay8910_latch = offset & 0xff; - break; - - case 0x200: - /* unknown */ - break; - } -} - - - -/************************************* - * * Azurian I/O * *************************************/ @@ -1901,22 +1860,6 @@ MDRV_GFXDECODE(tenspot) MACHINE_DRIVER_END -static MACHINE_DRIVER_START( zigzag ) - MDRV_IMPORT_FROM(galaxian_base) - - /* separate tile/sprite ROMs */ - MDRV_GFXDECODE(pacmanbl) - - /* basic machine hardware */ - MDRV_CPU_MODIFY("maincpu") - MDRV_CPU_PROGRAM_MAP(galaxian_map_base) /* no discrete sound */ - - /* sound hardware */ - MDRV_SOUND_ADD("aysnd", AY8910, 1789750) - - MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_DRIVER_END - static MACHINE_DRIVER_START( gmgalax ) MDRV_IMPORT_FROM(galaxian) @@ -2425,17 +2368,6 @@ } -static void unmap_galaxian_sound(running_machine *machine, offs_t base) -{ - const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - - memory_unmap_write(space, base + 0x0004, base + 0x0007, 0, 0x07f8); - memory_unmap_write(space, base + 0x0800, base + 0x0807, 0, 0x07f8); - memory_unmap_write(space, base + 0x1800, base + 0x1800, 0, 0x07ff); -} - - - /************************************* * * Galaxian-derived games @@ -2682,39 +2614,6 @@ } -static DRIVER_INIT( zigzag ) -{ - const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); - - /* video extensions */ - common_init(machine, NULL, galaxian_draw_background, NULL, NULL); - - /* make ROMs 2 & 3 swappable */ - memory_install_read_bank(space, 0x2000, 0x2fff, 0, 0, "bank1"); - memory_install_read_bank(space, 0x3000, 0x3fff, 0, 0, "bank2"); - memory_configure_bank(machine, "bank1", 0, 2, memory_region(machine, "maincpu") + 0x2000, 0x1000); - memory_configure_bank(machine, "bank2", 0, 2, memory_region(machine, "maincpu") + 0x2000, 0x1000); - - /* also re-install the fixed ROM area as a bank in order to inform the memory system that - the fixed area only extends to 0x1fff */ - memory_install_read_bank(space, 0x0000, 0x1fff, 0, 0, "bank3"); - memory_set_bankptr(machine, "bank3", memory_region(machine, "maincpu") + 0x0000); - - /* handler for doing the swaps */ - memory_install_write8_handler(space, 0x7002, 0x7002, 0, 0x07f8, zigzag_bankswap_w); - zigzag_bankswap_w(space, 0, 0); - - /* coin lockout disabled */ - memory_unmap_write(space, 0x6002, 0x6002, 0, 0x7f8); - - /* remove the galaxian sound hardware */ - unmap_galaxian_sound(machine, 0x6000); - - /* install our AY-8910 handler */ - memory_install_write8_handler(space, 0x4800, 0x4fff, 0, 0, zigzag_ay8910_w); -} - - static DRIVER_INIT( jumpbug ) { /* video extensions */ diff -Nru old/src/mame/drivers/galaxold.c new/src/mame/drivers/galaxold.c --- old/src/mame/drivers/galaxold.c 2010-02-14 22:40:38.000000000 +0100 +++ new/src/mame/drivers/galaxold.c 2010-03-10 23:45:34.000000000 +0100 @@ -29,6 +29,8 @@ - $4800-4bff in Streaking/Ghost Muncher +- zigzag : full Dip Switches and Inputs +- zigzag2 : full Dip Switches and Inputs Moon Cresta versions supported: @@ -395,6 +397,38 @@ +/************************************* + * + * Zig Zag I/O + * + *************************************/ + +UINT8 zigzag_ay8910_latch; + +WRITE8_HANDLER( zigzag_ay8910_w ) +{ + switch (offset & 0x300) + { + case 0x000: + /* control lines */ + /* bit 0 = WRITE */ + /* bit 1 = C/D */ + if ((offset & 1) != 0) + ay8910_data_address_w(devtag_get_device(space->machine, "aysnd"), offset >> 1, zigzag_ay8910_latch); + break; + + case 0x100: + /* data latch */ + zigzag_ay8910_latch = offset & 0xff; + break; + + case 0x200: + /* unknown */ + break; + } +} + + /* Send sound data to the sound cpu and cause an nmi */ static READ8_HANDLER( drivfrcg_port0_r ) { @@ -438,6 +472,23 @@ ADDRESS_MAP_END +static ADDRESS_MAP_START( zigzag_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_ROM + AM_RANGE(0x4000, 0x47ff) AM_RAM + AM_RANGE(0x5000, 0x53ff) AM_RAM_WRITE(galaxold_videoram_w) AM_BASE(&galaxold_videoram) + AM_RANGE(0x5800, 0x583f) AM_RAM_WRITE(galaxold_attributesram_w) AM_BASE(&galaxold_attributesram) + AM_RANGE(0x5840, 0x587f) AM_RAM AM_BASE(&galaxold_spriteram) AM_SIZE(&galaxold_spriteram_size) + AM_RANGE(0x5880, 0x58ff) AM_RAM + AM_RANGE(0x6000, 0x6000) AM_READ_PORT("IN0") + AM_RANGE(0x6800, 0x6800) AM_READ_PORT("IN1") + AM_RANGE(0x7000, 0x7000) AM_READ_PORT("IN2") + AM_RANGE(0x7001, 0x7001) AM_WRITE(galaxold_nmi_enable_w) + AM_RANGE(0x7006, 0x7006) AM_WRITE(galaxold_flip_screen_x_w) + AM_RANGE(0x7007, 0x7007) AM_WRITE(galaxold_flip_screen_y_w) + AM_RANGE(0x7800, 0x7800) AM_READ(watchdog_reset_r) +ADDRESS_MAP_END + + static ADDRESS_MAP_START( mooncrst_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM @@ -1745,6 +1796,46 @@ INPUT_PORTS_END +static INPUT_PORTS_START( zigzag ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL + PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) + + PORT_START("IN2") + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, "10000 60000" ) + PORT_DIPSETTING( 0x04, "20000 60000" ) + PORT_DIPSETTING( 0x08, "30000 60000" ) + PORT_DIPSETTING( 0x0c, "40000 60000" ) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + + static INPUT_PORTS_START( hunchbkg ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) @@ -2028,6 +2119,17 @@ 32*8 }; +static const gfx_layout zigzag_charlayout = +{ + 8,8, + 256, + 2, + { 0, 256*8*8 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, + 8*8 +}; + static const gfx_layout pacmanbl_spritelayout = { 16,16, @@ -2106,6 +2208,11 @@ GFXDECODE_END /* separate character and sprite ROMs */ +static GFXDECODE_START( zigzag ) + GFXDECODE_ENTRY( "gfx1", 0x0000, zigzag_charlayout, 0, 8 ) + GFXDECODE_ENTRY( "gfx1", 0x1000, pacmanbl_spritelayout, 0, 8 ) +GFXDECODE_END + static GFXDECODE_START( bagmanmc ) GFXDECODE_ENTRY( "gfx1", 0x0000, bagmanmc_charlayout, 0, 8 ) GFXDECODE_ENTRY( "gfx1", 0x2000, pacmanbl_spritelayout, 0, 8 ) @@ -2393,6 +2500,21 @@ MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33/3) MACHINE_DRIVER_END +static MACHINE_DRIVER_START( zigzag ) + + /* basic machine hardware */ + MDRV_IMPORT_FROM(galaxold_base) + MDRV_CPU_MODIFY("maincpu") + MDRV_CPU_PROGRAM_MAP(zigzag_map) + + /* video hardware */ + MDRV_GFXDECODE(zigzag) + + /* sound hardware */ + MDRV_SOUND_ADD("aysnd", AY8910, 1789750) + MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) +MACHINE_DRIVER_END + static MACHINE_DRIVER_START( tazzmang ) /* basic machine hardware */ MDRV_IMPORT_FROM(galaxian) @@ -2798,6 +2920,40 @@ ROM_LOAD( "prom.6l", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) ROM_END +ROM_START( zigzag ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "zz_d1.bin", 0x0000, 0x1000, CRC(8cc08d81) SHA1(be671192ef06dc3ed6963dc39e6bdce3275300e9) ) + ROM_LOAD( "zz_d2.bin", 0x1000, 0x1000, CRC(326d8d45) SHA1(563b9fc64c34e36cfadffb107ce30d3a04d62d9c) ) + ROM_LOAD( "zz_d4.bin", 0x2000, 0x1000, CRC(a94ed92a) SHA1(d56f32fc2b3f0f7affe658b7726682c60d09bc16) ) + ROM_LOAD( "zz_d3.bin", 0x3000, 0x1000, CRC(ce5e7a00) SHA1(93c47d22698a016cb0f0b654ade9ccab0cd1c88b) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) + ROM_CONTINUE( 0x1000, 0x0800 ) + ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) + ROM_CONTINUE( 0x1800, 0x0800 ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "zzbp_e9.bin", 0x0000, 0x0020, CRC(aa486dd0) SHA1(b845b52715bf6361ceee8c1ac541733963bd47af) ) +ROM_END + +ROM_START( zigzag2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "z1", 0x0000, 0x1000, CRC(4c28349a) SHA1(646134ce506deaee88cc2ec5a973f8fedaddb66b) ) + ROM_LOAD( "zz_d2.bin", 0x1000, 0x1000, CRC(326d8d45) SHA1(563b9fc64c34e36cfadffb107ce30d3a04d62d9c) ) + ROM_LOAD( "zz_d4.bin", 0x2000, 0x1000, CRC(a94ed92a) SHA1(d56f32fc2b3f0f7affe658b7726682c60d09bc16) ) + ROM_LOAD( "zz_d3.bin", 0x3000, 0x1000, CRC(ce5e7a00) SHA1(93c47d22698a016cb0f0b654ade9ccab0cd1c88b) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) + ROM_CONTINUE( 0x1000, 0x0800 ) + ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) + ROM_CONTINUE( 0x1800, 0x0800 ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "zzbp_e9.bin", 0x0000, 0x0020, CRC(aa486dd0) SHA1(b845b52715bf6361ceee8c1ac541733963bd47af) ) +ROM_END + ROM_START( bongo ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "bg1.bin", 0x0000, 0x1000, CRC(de9a8ec6) SHA1(b5ee99b26d1a39e31b643ad0f5723ee8e364023e) ) @@ -3109,6 +3265,8 @@ GAME( 1982, dkongjrm, dkongjr, dkongjrm, dkongjrm, 0, ROT90, "bootleg", "Donkey Kong Jr. (bootleg on Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1982, porter, dockman, mooncrst, porter, 0, ROT90, "bootleg", "Port Man (bootleg on Moon Cresta hardware)", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL ) // missing GFX bank switch! GAME( 1982, tazzmang, tazmania, tazzmang, tazzmang, 0, ROT90, "bootleg", "Tazz-Mania (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1982, zigzag, 0, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1982, zigzag2, zigzag, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 2)", GAME_SUPPORTS_SAVE ) GAME( 1983, bongo, 0, bongo, bongo, 0, ROT90, "Jetsoft", "Bongo", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1983, ozon1, 0, ozon1, ozon1, 0, ROT90, "Proma", "Ozon I", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1983, ladybugg, ladybug, batman2, ladybugg, ladybugg, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) diff -Nru old/src/mame/drivers/galdrvr.c new/src/mame/drivers/galdrvr.c --- old/src/mame/drivers/galdrvr.c 2010-03-04 16:06:12.000000000 +0100 +++ new/src/mame/drivers/galdrvr.c 2010-03-10 23:42:26.000000000 +0100 @@ -847,46 +847,6 @@ INPUT_PORTS_END -static INPUT_PORTS_START( zigzag ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL - - PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL - PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( Free_Play ) ) - - PORT_START("IN2") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "10000 60000" ) - PORT_DIPSETTING( 0x04, "20000 60000" ) - PORT_DIPSETTING( 0x08, "30000 60000" ) - PORT_DIPSETTING( 0x0c, "40000 60000" ) - PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) -INPUT_PORTS_END - - static INPUT_PORTS_START( gmgalax ) PORT_START("IN0") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(gmgalax_port_r, "GMIN0\0GLIN0") @@ -3473,53 +3433,6 @@ ROM_END -ROM_START( zigzag ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "zz_d1.bin", 0x0000, 0x1000, CRC(8cc08d81) SHA1(be671192ef06dc3ed6963dc39e6bdce3275300e9) ) - ROM_LOAD( "zz_d2.bin", 0x1000, 0x1000, CRC(326d8d45) SHA1(563b9fc64c34e36cfadffb107ce30d3a04d62d9c) ) - ROM_LOAD( "zz_d4.bin", 0x2000, 0x1000, CRC(a94ed92a) SHA1(d56f32fc2b3f0f7affe658b7726682c60d09bc16) ) - ROM_LOAD( "zz_d3.bin", 0x3000, 0x1000, CRC(ce5e7a00) SHA1(93c47d22698a016cb0f0b654ade9ccab0cd1c88b) ) - - ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) - ROM_IGNORE( 0x0800 ) - ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) - ROM_IGNORE( 0x0800 ) - - ROM_REGION( 0x1000, "gfx2", 0 ) - ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) - ROM_CONTINUE( 0x0000, 0x0800 ) - ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) - ROM_CONTINUE( 0x0800, 0x0800 ) - - ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "zzbp_e9.bin", 0x0000, 0x0020, CRC(aa486dd0) SHA1(b845b52715bf6361ceee8c1ac541733963bd47af) ) -ROM_END - -ROM_START( zigzag2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "z1", 0x0000, 0x1000, CRC(4c28349a) SHA1(646134ce506deaee88cc2ec5a973f8fedaddb66b) ) - ROM_LOAD( "zz_d2.bin", 0x1000, 0x1000, CRC(326d8d45) SHA1(563b9fc64c34e36cfadffb107ce30d3a04d62d9c) ) - ROM_LOAD( "zz_d4.bin", 0x2000, 0x1000, CRC(a94ed92a) SHA1(d56f32fc2b3f0f7affe658b7726682c60d09bc16) ) - ROM_LOAD( "zz_d3.bin", 0x3000, 0x1000, CRC(ce5e7a00) SHA1(93c47d22698a016cb0f0b654ade9ccab0cd1c88b) ) - - ROM_REGION( 0x1000, "gfx1", 0 ) - ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) - ROM_IGNORE( 0x0800 ) - ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) - ROM_IGNORE( 0x0800 ) - - ROM_REGION( 0x1000, "gfx2", 0 ) - ROM_LOAD( "zz_6_h1.bin", 0x0000, 0x0800, CRC(780c162a) SHA1(b0cac68258281917bcada52ce26e0ce38721d633) ) - ROM_CONTINUE( 0x0000, 0x0800 ) - ROM_LOAD( "zz_5.bin", 0x0800, 0x0800, CRC(f3cdfec5) SHA1(798d631c72d8e6b2e372b4b3ab0c10d8365a1359) ) - ROM_CONTINUE( 0x0800, 0x0800 ) - - ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "zzbp_e9.bin", 0x0000, 0x0020, CRC(aa486dd0) SHA1(b845b52715bf6361ceee8c1ac541733963bd47af) ) -ROM_END - - ROM_START( gmgalax ) ROM_REGION( 0x18000, "maincpu", 0 ) /* 64k for code + 32k for banked code */ ROM_LOAD( "pcb1_pm1.bin", 0x10000, 0x1000, CRC(19338c70) SHA1(cc2665b7d534d324627d12025ee099ff415d4214) ) @@ -5882,10 +5795,6 @@ /* separate tile/sprite ROMs, plus INT instead of NMI */ GAME( 1984, devilfsg, devilfsh, pacmanbl, devilfsg, devilfsg, ROT270, "Vision / Artic", "Devil Fish (Galaxian hardware, bootleg?)", GAME_SUPPORTS_SAVE ) -/* sound hardware replaced with AY8910 */ -GAME( 1982, zigzag, 0, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 1)", GAME_SUPPORTS_SAVE ) -GAME( 1982, zigzag2, zigzag, zigzag, zigzag, zigzag, ROT90, "LAX", "Zig Zag (Galaxian hardware, set 2)", GAME_SUPPORTS_SAVE ) - /* multi-game select via external switch */ GAME( 1981, gmgalax, 0, gmgalax, gmgalax, gmgalax, ROT90, "bootleg", "Ghostmuncher Galaxian (bootleg)", GAME_SUPPORTS_SAVE ) diff -Nru old/src/mame/includes/galaxold.h new/src/mame/includes/galaxold.h --- old/src/mame/includes/galaxold.h 2010-01-28 13:23:04.000000000 +0100 +++ new/src/mame/includes/galaxold.h 2010-03-10 23:42:32.000000000 +0100 @@ -156,6 +156,7 @@ DRIVER_INIT( mrkougar ); DRIVER_INIT( mrkougb ); DRIVER_INIT( ad2083 ); +DRIVER_INIT( zigzag ); MACHINE_RESET( scramble ); MACHINE_RESET( explorer ); @@ -185,6 +186,7 @@ WRITE8_DEVICE_HANDLER( scramble_sh_irqtrigger_w ); WRITE8_DEVICE_HANDLER( mrkougar_sh_irqtrigger_w ); WRITE8_HANDLER( hotshock_sh_irqtrigger_w ); +WRITE8_HANDLER( zigzag_ay8910_w ); MACHINE_DRIVER_EXTERN( ad2083_audio ); diff -Nru old/src/mame/machine/galaxold.c new/src/mame/machine/galaxold.c --- old/src/mame/machine/galaxold.c 2010-01-28 13:23:04.000000000 +0100 +++ new/src/mame/machine/galaxold.c 2010-03-10 23:42:36.000000000 +0100 @@ -134,33 +134,6 @@ } -/* Zig Zag can swap ROMs 2 and 3 as a form of copy protection */ -WRITE8_HANDLER( zigzag_sillyprotection_w ) -{ - if (data) - { - /* swap ROM 2 and 3! */ - memory_set_bank(space->machine, "bank1", 1); - memory_set_bank(space->machine, "bank2", 0); - } - else - { - memory_set_bank(space->machine, "bank1", 0); - memory_set_bank(space->machine, "bank2", 1); - } -} - -DRIVER_INIT( zigzag ) -{ - UINT8 *RAM = memory_region(machine, "maincpu"); - memory_configure_bank(machine, "bank1", 0, 2, &RAM[0x2000], 0x1000); - memory_configure_bank(machine, "bank2", 0, 2, &RAM[0x2000], 0x1000); - memory_set_bank(machine, "bank1", 0); - memory_set_bank(machine, "bank2", 1); -} - - - static READ8_HANDLER( dingo_3000_r ) { return 0xaa; @@ -409,3 +382,28 @@ /* Doesn't actually use the bank, but it mustn't have a coin lock! */ memory_install_write8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x6002, 0x6002, 0, 0, galaxold_gfxbank_w); } + + +static WRITE8_HANDLER( zigzag_bankswap_w ) +{ + memory_set_bank(space->machine, "bank1", data & 1); + memory_set_bank(space->machine, "bank2", ~data & 1); +} + +DRIVER_INIT( zigzag ) +{ + const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); + + /* make ROMs 2 & 3 swappable */ + memory_install_read_bank(space, 0x2000, 0x2fff, 0, 0, "bank1"); + memory_install_read_bank(space, 0x3000, 0x3fff, 0, 0, "bank2"); + memory_configure_bank(machine, "bank1", 0, 2, memory_region(machine, "maincpu") + 0x2000, 0x1000); + memory_configure_bank(machine, "bank2", 0, 2, memory_region(machine, "maincpu") + 0x2000, 0x1000); + + /* handler for doing the swaps */ + memory_install_write8_handler(space, 0x7002, 0x7002, 0, 0x07f8, zigzag_bankswap_w); + zigzag_bankswap_w(space, 0, 0); + + /* install our AY-8910 handler */ + memory_install_write8_handler(space, 0x4800, 0x4fff, 0, 0, zigzag_ay8910_w); +}