diff options
Diffstat (limited to 'src/mame/drivers/pacman.cpp')
-rw-r--r-- | src/mame/drivers/pacman.cpp | 279 |
1 files changed, 130 insertions, 149 deletions
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp index ed05527b38f..a7f551473d0 100644 --- a/src/mame/drivers/pacman.cpp +++ b/src/mame/drivers/pacman.cpp @@ -1376,8 +1376,8 @@ void pacman_state::writeport(address_map &map) void pacman_state::vanvan_portmap(address_map &map) { map.global_mask(0xff); - map(0x01, 0x01).w("sn1", FUNC(sn76496_device::write)); - map(0x02, 0x02).w("sn2", FUNC(sn76496_device::write)); + map(0x01, 0x01).w("sn1", FUNC(sn76496_device::command_w)); + map(0x02, 0x02).w("sn2", FUNC(sn76496_device::command_w)); } void pacman_state::dremshpr_portmap(address_map &map) @@ -1417,7 +1417,7 @@ void pacman_state::bigbucks_portmap(address_map &map) void pacman_state::s2650games_dataport(address_map &map) { - map(S2650_DATA_PORT, S2650_DATA_PORT).w("sn1", FUNC(sn76496_device::write)); + map(S2650_DATA_PORT, S2650_DATA_PORT).w("sn1", FUNC(sn76496_device::command_w)); } void pacman_state::drivfrcp_portmap(address_map &map) @@ -3564,33 +3564,31 @@ void pacman_state::pacman(machine_config &config, bool latch) m_namco_sound->add_route(ALL_OUTPUTS, "mono", 1.0); } -void pacman_state::maketrax(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::maketrax) pacman(config); MCFG_MACHINE_RESET_OVERRIDE(pacman_state,maketrax) -} +MACHINE_CONFIG_END -void pacman_state::korosuke(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::korosuke) maketrax(config); // 8K on original boards m_mainlatch->q_out_cb<7>().set_nop(); // outputs 4-7 go to protection chip at 6P -} +MACHINE_CONFIG_END -void pacman_state::pengojpm(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::pengojpm) pacman(config); - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::pengojpm_map); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(pengojpm_map) +MACHINE_CONFIG_END -void pacman_state::birdiy(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::birdiy) pacman(config); /* basic machine hardware */ - Z80(config.replace(), m_maincpu, MASTER_CLOCK/6); - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::birdiy_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(birdiy_map) + MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_IO) // 74LS259 at 8K or 4099 at 7K m_mainlatch->q_out_cb<0>().set_nop(); @@ -3599,56 +3597,58 @@ void pacman_state::birdiy(machine_config &config) m_mainlatch->q_out_cb<7>().set(FUNC(pacman_state::coin_counter_w)); MCFG_VIDEO_START_OVERRIDE(pacman_state,birdiy) -} +MACHINE_CONFIG_END -void pacman_state::piranha(machine_config &config) -{ + + +MACHINE_CONFIG_START(pacman_state::piranha) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_IO, &pacman_state::piranha_portmap); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_IO_MAP(piranha_portmap) +MACHINE_CONFIG_END -void pacman_state::nmouse(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::nmouse) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_IO, &pacman_state::nmouse_portmap); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_IO_MAP(nmouse_portmap) +MACHINE_CONFIG_END -void pacman_state::mspacman(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::mspacman) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::mspacman_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(mspacman_map) m_mainlatch->q_out_cb<6>().set(FUNC(pacman_state::coin_lockout_global_w)); -} +MACHINE_CONFIG_END -void pacman_state::woodpek(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::woodpek) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::woodpek_map); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(woodpek_map) +MACHINE_CONFIG_END -void pacman_state::numcrash(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::numcrash) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::numcrash_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(numcrash_map) m_mainlatch->q_out_cb<3>().set_nop(); // ??? m_mainlatch->q_out_cb<7>().set_nop(); // ??? -} +MACHINE_CONFIG_END void pacman_state::alibaba(machine_config &config) { @@ -3669,104 +3669,107 @@ void pacman_state::alibaba(machine_config &config) latch2.q_out_cb<2>().set(FUNC(pacman_state::irq_mask_w)); } -void pacman_state::dremshpr(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::dremshpr) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::dremshpr_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::dremshpr_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(dremshpr_map) + MCFG_DEVICE_IO_MAP(dremshpr_portmap) - subdevice<screen_device>("screen")->screen_vblank().set(FUNC(pacman_state::vblank_nmi)); + MCFG_DEVICE_MODIFY("screen") + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pacman_state, vblank_nmi)) /* sound hardware */ config.device_remove("namco"); AY8910(config, "ay8910", 14318000/8).add_route(ALL_OUTPUTS, "mono", 0.50); m_mainlatch->q_out_cb<1>().set_nop(); -} +MACHINE_CONFIG_END -void pacman_state::theglobp(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::theglobp) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::epos_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::epos_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(epos_map) + MCFG_DEVICE_IO_MAP(epos_portmap) MCFG_MACHINE_START_OVERRIDE(pacman_state,theglobp) MCFG_MACHINE_RESET_OVERRIDE(pacman_state,theglobp) -} +MACHINE_CONFIG_END -void pacman_state::acitya(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::acitya) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::epos_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::epos_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(epos_map) + MCFG_DEVICE_IO_MAP(epos_portmap) MCFG_MACHINE_START_OVERRIDE(pacman_state,acitya) MCFG_MACHINE_RESET_OVERRIDE(pacman_state,acitya) -} +MACHINE_CONFIG_END -void pacman_state::eeekk(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::eeekk) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::epos_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::epos_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(epos_map) + MCFG_DEVICE_IO_MAP(epos_portmap) MCFG_MACHINE_START_OVERRIDE(pacman_state,eeekk) MCFG_MACHINE_RESET_OVERRIDE(pacman_state,eeekk) -} +MACHINE_CONFIG_END -void pacman_state::vanvan(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::vanvan) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::dremshpr_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::vanvan_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(dremshpr_map) + MCFG_DEVICE_IO_MAP(vanvan_portmap) /* video hardware */ - screen_device &screen(*subdevice<screen_device>("screen")); - screen.set_visarea(2*8, 34*8-1, 0*8, 28*8-1); - screen.screen_vblank().set(FUNC(pacman_state::vblank_nmi)); + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_VISIBLE_AREA(2*8, 34*8-1, 0*8, 28*8-1) + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pacman_state, vblank_nmi)) /* sound hardware */ - config.device_remove("namco"); + MCFG_DEVICE_REMOVE("namco") + MCFG_DEVICE_ADD("sn1", SN76496, 1789750) - SN76496(config, "sn1", 1789750).add_route(ALL_OUTPUTS, "mono", 0.75); + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) + MCFG_DEVICE_ADD("sn2", SN76496, 1789750) - SN76496(config, "sn2", 1789750).add_route(ALL_OUTPUTS, "mono", 0.75); + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) m_mainlatch->q_out_cb<1>().set_nop(); -} +MACHINE_CONFIG_END -void pacman_state::bigbucks(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::bigbucks) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::bigbucks_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::bigbucks_portmap); - m_maincpu->set_periodic_int(FUNC(pacman_state::periodic_irq), attotime::from_hz(20*60)); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(bigbucks_map) + MCFG_DEVICE_IO_MAP(bigbucks_portmap) + MCFG_DEVICE_PERIODIC_INT_DRIVER(pacman_state, periodic_irq, 20*60) - subdevice<screen_device>("screen")->set_visarea(0*8, 36*8-1, 0*8, 28*8-1); + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) m_mainlatch->q_out_cb<7>().set_nop(); /*?*/ -} +MACHINE_CONFIG_END -void pacman_state::s2650games(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::s2650games) pacman(config); /* basic machine hardware */ @@ -3784,110 +3787,110 @@ void pacman_state::s2650games(machine_config &config) m_mainlatch->q_out_cb<6>().set_nop(); m_mainlatch->q_out_cb<7>().set(FUNC(pacman_state::coin_counter_w)); - m_gfxdecode->set_info(gfx_s2650games); + MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_s2650games) - screen_device &screen(*subdevice<screen_device>("screen")); - screen.set_size(32*8, 32*8); - screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_screen_update(FUNC(pacman_state::screen_update_s2650games)); - screen.screen_vblank().set(FUNC(pacman_state::s2650_interrupt)); + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_SIZE(32*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) + MCFG_SCREEN_UPDATE_DRIVER(pacman_state, screen_update_s2650games) + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pacman_state, s2650_interrupt)) MCFG_VIDEO_START_OVERRIDE(pacman_state,s2650games) /* sound hardware */ - config.device_remove("namco"); - SN76496(config, "sn1", MASTER_CLOCK/6).add_route(ALL_OUTPUTS, "mono", 0.75); /* 1H */ -} + MCFG_DEVICE_REMOVE("namco") + MCFG_DEVICE_ADD("sn1", SN76496, MASTER_CLOCK/6) /* 1H */ + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) +MACHINE_CONFIG_END -void pacman_state::drivfrcp(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::drivfrcp) s2650games(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_IO, &pacman_state::drivfrcp_portmap); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_IO_MAP(drivfrcp_portmap) +MACHINE_CONFIG_END -void pacman_state::_8bpm(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::_8bpm ) s2650games(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_IO, &pacman_state::_8bpm_portmap); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_IO_MAP(_8bpm_portmap) +MACHINE_CONFIG_END -void pacman_state::porky(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::porky) s2650games(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_IO, &pacman_state::porky_portmap); -} + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_IO_MAP(porky_portmap) +MACHINE_CONFIG_END -void pacman_state::rocktrv2(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::rocktrv2) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::rocktrv2_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(rocktrv2_map) - screen_device &screen(*subdevice<screen_device>("screen")); - screen.set_visarea(0*8, 36*8-1, 0*8, 28*8-1); - screen.screen_vblank().set(FUNC(pacman_state::rocktrv2_vblank_irq)); -} + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pacman_state, rocktrv2_vblank_irq)) +MACHINE_CONFIG_END -void pacman_state::mschamp(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::mschamp) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::mschamp_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::mschamp_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(mschamp_map) + MCFG_DEVICE_IO_MAP(mschamp_portmap) MCFG_MACHINE_RESET_OVERRIDE(pacman_state,mschamp) -} +MACHINE_CONFIG_END -void pacman_state::superabc(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::superabc) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::superabc_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(superabc_map) NVRAM(config, "28c16.u17", nvram_device::DEFAULT_ALL_0); MCFG_MACHINE_RESET_OVERRIDE(pacman_state,superabc) /* video hardware */ - m_gfxdecode->set_info(gfx_superabc); -} + MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_superabc) +MACHINE_CONFIG_END -void pacman_state::crush4(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::crush4) mschamp(config); /* basic machine hardware */ - m_gfxdecode->set_info(gfx_crush4); -} + MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_crush4) +MACHINE_CONFIG_END -void pacman_state::crushs(machine_config &config) -{ +MACHINE_CONFIG_START(pacman_state::crushs) pacman(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::crushs_map); - m_maincpu->set_addrmap(AS_IO, &pacman_state::crushs_portmap); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(crushs_map) + MCFG_DEVICE_IO_MAP(crushs_portmap) /* sound hardware */ AY8912(config, "ay8912", 1789750).add_route(ALL_OUTPUTS, "mono", 0.75); -} +MACHINE_CONFIG_END @@ -6334,27 +6337,6 @@ ROM_START( sprglbpg ) ROM_END -// 2 PCB set (G-GA-2 and G-GB-2). It was modified to use one 27128 instead of eight 2716 for the program ROMs. -ROM_START( theglobme ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "globo_1-8_a.6e", 0x0000, 0x4000, CRC(57252220) SHA1(ee02a1f8817cb5c55d67653391f4509bb5a30403) ) - - ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "globo-10_b.5e", 0x0000, 0x0800, CRC(36408c76) SHA1(f5bb18e38de57adc2aed6211048d9f0ee0e58df7) ) - ROM_LOAD( "globo-12_b.5h", 0x0800, 0x0800, CRC(b8ba069c) SHA1(f8d8e40afd8214a6d951af8de2761703b0651f79) ) - ROM_LOAD( "globo-11_b.5f", 0x1000, 0x0800, CRC(890b8ebf) SHA1(1bf64f4ca1fca8efd35ac3d414d2bb755c5e44cc) ) - ROM_LOAD( "globo-13_b.5j", 0x1800, 0x0800, CRC(7c4456a4) SHA1(74f55ae921cdf8f1f7a866d75a63244187426f17) ) - - ROM_REGION( 0x0120, "proms", 0 ) - ROM_LOAD( "n82s123an_a.7f", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) - ROM_LOAD( "n82s129n_b.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - - ROM_REGION( 0x0200, "namco", 0 ) /* sound PROMs, Harris 63S141J */ - ROM_LOAD( "63s141_b.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "63s141_b.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) /* timing - not used */ -ROM_END - - ROM_START( beastfp ) ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "bf-u2.bin", 0x0000, 0x2000, CRC(3afc517b) SHA1(5b74bca9e9cd4d8bcf94a340f8f0e53fe1dcfc1d) ) @@ -7654,7 +7636,6 @@ GAME( 1983, acitya, bwcasino, acitya, acitya, pacman_state, empty_init, GAME( 1983, theglobp, suprglob, theglobp, theglobp, pacman_state, empty_init, ROT90, "Epos Corporation", "The Glob (Pac-Man hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, sprglobp, suprglob, theglobp, theglobp, pacman_state, empty_init, ROT90, "Epos Corporation", "Super Glob (Pac-Man hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, sprglbpg, suprglob, pacman, theglobp, pacman_state, empty_init, ROT90, "bootleg (Software Labor)", "Super Glob (Pac-Man hardware) (German bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, theglobme,suprglob, woodpek, theglobp, pacman_state, empty_init, ROT90, "Magic Electronics Inc.", "The Glob (Pacman hardware, Magic Electronics Inc. license)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, beastfp, suprglob, theglobp, theglobp, pacman_state, empty_init, ROT90, "Epos Corporation", "Beastie Feastie (conversion kit)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, eeekk, 0, eeekk, eeekk, pacman_state, empty_init, ROT90, "Epos Corporation", "Eeekk!", MACHINE_SUPPORTS_SAVE ) |