diff options
Diffstat (limited to 'src/mame/drivers/thepit.cpp')
-rw-r--r-- | src/mame/drivers/thepit.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/mame/drivers/thepit.cpp b/src/mame/drivers/thepit.cpp index d419c1266ba..8e3f6091b47 100644 --- a/src/mame/drivers/thepit.cpp +++ b/src/mame/drivers/thepit.cpp @@ -156,7 +156,6 @@ Player 2 and Player 1 share the same controls ! #include "includes/thepit.h" #include "cpu/z80/z80.h" -#include "machine/74259.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" #include "sound/ay8910.h" @@ -218,7 +217,7 @@ void thepit_state::thepit_main_map(address_map &map) map(0xa000, 0xa000).r(FUNC(thepit_state::input_port_0_r)).nopw(); // Not hooked up according to the schematics map(0xa800, 0xa800).portr("IN1"); map(0xb000, 0xb000).portr("DSW"); - map(0xb000, 0xb007).w("mainlatch", FUNC(ls259_device::write_d0)); + map(0xb000, 0xb007).w(m_mainlatch, FUNC(ls259_device::write_d0)); map(0xb800, 0xb800).r("watchdog", FUNC(watchdog_timer_device::reset_r)).w("soundlatch", FUNC(generic_latch_8_device::write)); } @@ -234,7 +233,7 @@ void thepit_state::desertdan_main_map(address_map &map) map(0xa000, 0xa000).r(FUNC(thepit_state::input_port_0_r)).nopw(); // Not hooked up according to the schematics map(0xa800, 0xa800).portr("IN1"); map(0xb000, 0xb000).portr("DSW"); - map(0xb000, 0xb007).w("mainlatch", FUNC(ls259_device::write_d0)); + map(0xb000, 0xb007).w(m_mainlatch, FUNC(ls259_device::write_d0)); map(0xb800, 0xb800).r("watchdog", FUNC(watchdog_timer_device::reset_r)).w("soundlatch", FUNC(generic_latch_8_device::write)); } @@ -251,7 +250,7 @@ void thepit_state::intrepid_main_map(address_map &map) map(0xa000, 0xa000).r(FUNC(thepit_state::input_port_0_r)); map(0xa800, 0xa800).portr("IN1"); map(0xb000, 0xb000).portr("DSW"); - map(0xb000, 0xb007).w("mainlatch", FUNC(ls259_device::write_d0)); + map(0xb000, 0xb007).w(m_mainlatch, FUNC(ls259_device::write_d0)); map(0xb800, 0xb800).r("watchdog", FUNC(watchdog_timer_device::reset_r)).w("soundlatch", FUNC(generic_latch_8_device::write)); } @@ -728,12 +727,12 @@ MACHINE_CONFIG_START(thepit_state::thepit) MCFG_DEVICE_IO_MAP(audio_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", thepit_state, irq0_line_hold) - MCFG_DEVICE_ADD("mainlatch", LS259, 0) // IC42 - MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, thepit_state, nmi_mask_w)) - MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(NOOP) // marked "LOCK OUT" on Centuri schematic but never written - MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, thepit_state, sound_enable_w)) - MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, thepit_state, flip_screen_x_w)) - MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, thepit_state, flip_screen_y_w)) + LS259(config, m_mainlatch); // IC42 + m_mainlatch->q_out_cb<0>().set(FUNC(thepit_state::nmi_mask_w)); + m_mainlatch->q_out_cb<2>().set_nop(); // marked "LOCK OUT" on Centuri schematic but never written + m_mainlatch->q_out_cb<3>().set(FUNC(thepit_state::sound_enable_w)); + m_mainlatch->q_out_cb<6>().set(FUNC(thepit_state::flip_screen_x_w)); + m_mainlatch->q_out_cb<7>().set(FUNC(thepit_state::flip_screen_y_w)); MCFG_WATCHDOG_ADD("watchdog") @@ -760,11 +759,11 @@ MACHINE_CONFIG_START(thepit_state::thepit) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END -MACHINE_CONFIG_START(thepit_state::fitter) +void thepit_state::fitter(machine_config &config) +{ thepit(config); - MCFG_DEVICE_MODIFY("mainlatch") // IC42 - MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, thepit_state, coin_lockout_w)) -MACHINE_CONFIG_END + m_mainlatch->q_out_cb<2>().set(FUNC(thepit_state::coin_lockout_w)); +} MACHINE_CONFIG_START(thepit_state::desertdn) fitter(config); @@ -787,8 +786,7 @@ MACHINE_CONFIG_START(thepit_state::intrepid) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(intrepid_main_map) - MCFG_DEVICE_MODIFY("mainlatch") // 2F on Funny Mouse main board; IC46 on Port Man main board - MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(WRITELINE(*this, thepit_state, intrepid_graphics_bank_w)) + m_mainlatch->q_out_cb<5>().set(FUNC(thepit_state::intrepid_graphics_bank_w)); /* video hardware */ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_intrepid) |