diff options
Diffstat (limited to 'src/mame/drivers/tempest.cpp')
-rw-r--r-- | src/mame/drivers/tempest.cpp | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp index 8626bd2be72..fa19a262031 100644 --- a/src/mame/drivers/tempest.cpp +++ b/src/mame/drivers/tempest.cpp @@ -631,24 +631,24 @@ INPUT_PORTS_END * *************************************/ -MACHINE_CONFIG_START(tempest_state::tempest) - +void tempest_state::tempest(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", M6502, MASTER_CLOCK / 8) - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_PERIODIC_INT_DRIVER(tempest_state, irq0_line_assert, CLOCK_3KHZ / 12) + M6502(config, m_maincpu, MASTER_CLOCK / 8); + m_maincpu->set_addrmap(AS_PROGRAM, &tempest_state::main_map); + m_maincpu->set_periodic_int(FUNC(tempest_state::irq0_line_assert), attotime::from_hz(CLOCK_3KHZ / 12)); WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_hz(CLOCK_3KHZ / 256)); - MCFG_DEVICE_ADD("earom", ER2055) + ER2055(config, m_earom); /* video hardware */ - MCFG_VECTOR_ADD("vector") - MCFG_SCREEN_ADD("screen", VECTOR) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_SIZE(400, 300) - MCFG_SCREEN_VISIBLE_AREA(0, 580, 0, 570) - MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update) + VECTOR(config, "vector"); + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); + screen.set_refresh_hz(60); + screen.set_size(400, 300); + screen.set_visarea(0, 580, 0, 570); + screen.set_screen_update("vector", FUNC(vector_device::screen_update)); AVG_TEMPEST(config, m_avg, 0); m_avg->set_vector_tag("vector"); @@ -659,32 +659,30 @@ MACHINE_CONFIG_START(tempest_state::tempest) /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("pokey1", POKEY, MASTER_CLOCK / 8) - MCFG_POKEY_POT0_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT1_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT2_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT3_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT4_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT5_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT6_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_POT7_R_CB(READ8(*this, tempest_state, input_port_1_bit_r)) - MCFG_POKEY_OUTPUT_RC(RES_K(10), CAP_U(0.015), 5.0) - - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) - - MCFG_DEVICE_ADD("pokey2", POKEY, MASTER_CLOCK / 8) - MCFG_POKEY_POT0_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT1_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT2_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT3_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT4_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT5_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT6_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_POT7_R_CB(READ8(*this, tempest_state, input_port_2_bit_r)) - MCFG_POKEY_OUTPUT_RC(RES_K(10), CAP_U(0.015), 5.0) - - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + pokey_device &pokey1(POKEY(config, "pokey1", MASTER_CLOCK / 8)); + pokey1.pot_r<0>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<1>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<2>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<3>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<4>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<5>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<6>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.pot_r<7>().set(FUNC(tempest_state::input_port_1_bit_r)); + pokey1.set_output_rc(RES_K(10), CAP_U(0.015), 5.0); + pokey1.add_route(ALL_OUTPUTS, "mono", 0.5); + + pokey_device &pokey2(POKEY(config, "pokey2", MASTER_CLOCK / 8)); + pokey2.pot_r<0>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<1>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<2>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<3>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<4>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<5>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<6>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.pot_r<7>().set(FUNC(tempest_state::input_port_2_bit_r)); + pokey2.set_output_rc(RES_K(10), CAP_U(0.015), 5.0); + pokey2.add_route(ALL_OUTPUTS, "mono", 0.5); +} |