summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/freekick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/freekick.cpp')
-rw-r--r--src/mame/drivers/freekick.cpp57
1 files changed, 28 insertions, 29 deletions
diff --git a/src/mame/drivers/freekick.cpp b/src/mame/drivers/freekick.cpp
index 0f4c46d3b89..b8386e62032 100644
--- a/src/mame/drivers/freekick.cpp
+++ b/src/mame/drivers/freekick.cpp
@@ -48,7 +48,6 @@ TODO:
#include "includes/freekick.h"
#include "cpu/z80/z80.h"
-#include "machine/74259.h"
#include "machine/i8255.h"
#include "machine/mc8123.h"
#include "sound/sn76496.h"
@@ -203,7 +202,7 @@ void freekick_state::omega_map(address_map &map)
map(0xd800, 0xd8ff).ram().share("spriteram");
map(0xd900, 0xdfff).ram();
map(0xe000, 0xe000).portr("IN0");
- map(0xe000, 0xe007).w("outlatch", FUNC(ls259_device::write_d0));
+ map(0xe000, 0xe007).w(m_outlatch, FUNC(ls259_device::write_d0));
map(0xe800, 0xe800).portr("IN1");
map(0xf000, 0xf000).portr("DSW1").nopw(); //bankswitch ?
map(0xf800, 0xf800).portr("DSW2");
@@ -222,7 +221,7 @@ void freekick_state::pbillrd_map(address_map &map)
map(0xd800, 0xd8ff).ram().share("spriteram");
map(0xd900, 0xdfff).ram();
map(0xe000, 0xe000).portr("IN0");
- map(0xe000, 0xe007).w("outlatch", FUNC(ls259_device::write_d0));
+ map(0xe000, 0xe007).w(m_outlatch, FUNC(ls259_device::write_d0));
map(0xe800, 0xe800).portr("IN1");
map(0xf000, 0xf000).portr("DSW1").w(FUNC(freekick_state::pbillrd_bankswitch_w));
map(0xf800, 0xf800).portr("DSW2");
@@ -250,7 +249,7 @@ void freekick_state::freekick_map(address_map &map)
map(0xf801, 0xf801).portr("IN1");
map(0xf802, 0xf802).nopr(); //MUST return bit 0 = 0, otherwise game resets
map(0xf803, 0xf803).r(FUNC(freekick_state::spinner_r));
- map(0xf800, 0xf807).w("outlatch", FUNC(ls259_device::write_d0));
+ map(0xf800, 0xf807).w(m_outlatch, FUNC(ls259_device::write_d0));
map(0xfc00, 0xfc00).w("sn1", FUNC(sn76489a_device::command_w));
map(0xfc01, 0xfc01).w("sn2", FUNC(sn76489a_device::command_w));
map(0xfc02, 0xfc02).w("sn3", FUNC(sn76489a_device::command_w));
@@ -265,7 +264,7 @@ void freekick_state::gigas_map(address_map &map)
map(0xd800, 0xd8ff).ram().share("spriteram");
map(0xd900, 0xdfff).ram();
map(0xe000, 0xe000).portr("IN0");
- map(0xe000, 0xe007).w("outlatch", FUNC(ls259_device::write_d0));
+ map(0xe000, 0xe007).w(m_outlatch, FUNC(ls259_device::write_d0));
map(0xe800, 0xe800).portr("IN1");
map(0xf000, 0xf000).portr("DSW1").nopw(); //bankswitch ?
map(0xf800, 0xf800).portr("DSW2");
@@ -738,12 +737,12 @@ MACHINE_CONFIG_START(freekick_state::omega)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(freekick_state, irq0_line_hold, 120) // measured on PCB
- MCFG_DEVICE_ADD("outlatch", LS259, 0) // 3M
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_w))
- MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, freekick_state, coin1_w))
- MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, freekick_state, coin2_w))
- MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, freekick_state, nmi_enable_w))
- MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(NOOP) // ???
+ LS259(config, m_outlatch); // 3M
+ m_outlatch->q_out_cb<0>().set(FUNC(freekick_state::flipscreen_w));
+ m_outlatch->q_out_cb<2>().set(FUNC(freekick_state::coin1_w));
+ m_outlatch->q_out_cb<3>().set(FUNC(freekick_state::coin2_w));
+ m_outlatch->q_out_cb<4>().set(FUNC(freekick_state::nmi_enable_w));
+ m_outlatch->q_out_cb<5>().set_nop(); // ???
// video hardware
MCFG_SCREEN_ADD("screen", RASTER)
@@ -778,10 +777,10 @@ MACHINE_CONFIG_START(freekick_state::base)
MCFG_DEVICE_PROGRAM_MAP(pbillrd_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(freekick_state, irq0_line_hold, 120) // measured on PCB
- MCFG_DEVICE_ADD("outlatch", LS259, 0)
- MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, freekick_state, coin1_w))
- MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, freekick_state, coin2_w))
- MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, freekick_state, nmi_enable_w))
+ LS259(config, m_outlatch);
+ m_outlatch->q_out_cb<2>().set(FUNC(freekick_state::coin1_w));
+ m_outlatch->q_out_cb<3>().set(FUNC(freekick_state::coin2_w));
+ m_outlatch->q_out_cb<4>().set(FUNC(freekick_state::nmi_enable_w));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -809,16 +808,18 @@ MACHINE_CONFIG_START(freekick_state::base)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(freekick_state::pbillrd)
+void freekick_state::pbillrd(machine_config &config)
+{
base(config);
- MCFG_DEVICE_MODIFY("outlatch") // 10K
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_x_w))
- MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_y_w))
+
+ // 10K
+ m_outlatch->q_out_cb<0>().set(FUNC(freekick_state::flipscreen_x_w));
+ m_outlatch->q_out_cb<1>().set(FUNC(freekick_state::flipscreen_y_w));
/* flip Y/X could be the other way round... */
MCFG_MACHINE_START_OVERRIDE(freekick_state,pbillrd)
MCFG_MACHINE_RESET_OVERRIDE(freekick_state,freekick)
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(freekick_state::pbillrdm)
pbillrd(config);
@@ -836,9 +837,9 @@ MACHINE_CONFIG_START(freekick_state::freekick)
MCFG_DEVICE_PROGRAM_MAP(freekick_map)
MCFG_DEVICE_IO_MAP(freekick_io_map)
- MCFG_DEVICE_MODIFY("outlatch") // 5C
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_w))
- MCFG_ADDRESSABLE_LATCH_Q6_OUT_CB(WRITELINE(*this, freekick_state, spinner_select_w))
+ // 5C
+ m_outlatch->q_out_cb<0>().set(FUNC(freekick_state::flipscreen_w));
+ m_outlatch->q_out_cb<6>().set(FUNC(freekick_state::spinner_select_w));
MCFG_MACHINE_START_OVERRIDE(freekick_state,freekick)
MCFG_MACHINE_RESET_OVERRIDE(freekick_state,freekick)
@@ -867,9 +868,8 @@ MACHINE_CONFIG_START(freekick_state::gigas)
MCFG_DEVICE_IO_MAP(gigas_io_map)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
- MCFG_DEVICE_MODIFY("outlatch")
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_w))
- MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(NOOP) // ???
+ m_outlatch->q_out_cb<0>().set(FUNC(freekick_state::flipscreen_w));
+ m_outlatch->q_out_cb<5>().set_nop(); // ???
MCFG_MACHINE_START_OVERRIDE(freekick_state,freekick)
MCFG_MACHINE_RESET_OVERRIDE(freekick_state,freekick)
@@ -889,9 +889,8 @@ MACHINE_CONFIG_START(freekick_state::gigasm)
MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(freekick_state, irq0_line_hold, 120) // measured on PCB
- MCFG_DEVICE_MODIFY("outlatch")
- MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, freekick_state, flipscreen_w))
- MCFG_ADDRESSABLE_LATCH_Q5_OUT_CB(NOOP) // ???
+ m_outlatch->q_out_cb<0>().set(FUNC(freekick_state::flipscreen_w));
+ m_outlatch->q_out_cb<5>().set_nop(); // ???
MCFG_MACHINE_START_OVERRIDE(freekick_state,freekick)
MCFG_MACHINE_RESET_OVERRIDE(freekick_state,freekick)