summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2018-10-25 18:34:17 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2018-10-25 18:34:17 +0200
commite30cf871e9b5968026622abae34ba8fd6be1e80a (patch)
tree2aa9a75f5611ad21b4cec4342163a22b16bfd992
parentc9a3b21a9912f4cd3e3beac7a2ca43727fd08ddb (diff)
steppers, tc009xlvc, te7750, tmp68301, tms1024, tms6100, bfm_dm01: removed MCFG macros (nw)
-rw-r--r--src/devices/machine/steppers.h6
-rw-r--r--src/devices/machine/tc009xlvc.h6
-rw-r--r--src/devices/machine/te7750.h58
-rw-r--r--src/devices/machine/tmp68301.h20
-rw-r--r--src/devices/machine/tms1024.h6
-rw-r--r--src/devices/machine/tms6100.h4
-rw-r--r--src/mame/audio/dkong.cpp2
-rw-r--r--src/mame/drivers/aces1.cpp21
-rw-r--r--src/mame/drivers/bfm_sc1.cpp24
-rw-r--r--src/mame/drivers/bfm_sc2.cpp57
-rw-r--r--src/mame/drivers/bfm_sc4.cpp563
-rw-r--r--src/mame/drivers/bfmsys85.cpp47
-rw-r--r--src/mame/drivers/bingowav.cpp14
-rw-r--r--src/mame/drivers/capr1.cpp22
-rw-r--r--src/mame/drivers/csplayh5.cpp8
-rw-r--r--src/mame/drivers/dfruit.cpp4
-rw-r--r--src/mame/drivers/ecoinf2.cpp33
-rw-r--r--src/mame/drivers/ecoinf3.cpp32
-rw-r--r--src/mame/drivers/ecoinfr.cpp63
-rw-r--r--src/mame/drivers/eva.cpp14
-rw-r--r--src/mame/drivers/gokidetor.cpp24
-rw-r--r--src/mame/drivers/hh_tms1k.cpp28
-rw-r--r--src/mame/drivers/joystand.cpp10
-rw-r--r--src/mame/drivers/jpmimpct.cpp48
-rw-r--r--src/mame/drivers/k28.cpp2
-rw-r--r--src/mame/drivers/krz2000.cpp15
-rw-r--r--src/mame/drivers/lastbank.cpp4
-rw-r--r--src/mame/drivers/maygay1b.cpp24
-rw-r--r--src/mame/drivers/mpu3.cpp16
-rw-r--r--src/mame/drivers/niyanpai.cpp8
-rw-r--r--src/mame/drivers/realbrk.cpp11
-rw-r--r--src/mame/drivers/seta.cpp8
-rw-r--r--src/mame/drivers/seta2.cpp26
-rw-r--r--src/mame/drivers/taito_f2.cpp42
-rw-r--r--src/mame/drivers/tispeak.cpp18
-rw-r--r--src/mame/drivers/tispellb.cpp8
-rw-r--r--src/mame/includes/bfm_sc4.h22
-rw-r--r--src/mame/includes/jpmimpct.h21
-rw-r--r--src/mame/includes/mpu4.h18
-rw-r--r--src/mame/machine/mpu4.cpp753
-rw-r--r--src/mame/video/bfm_dm01.h5
41 files changed, 999 insertions, 1116 deletions
diff --git a/src/devices/machine/steppers.h b/src/devices/machine/steppers.h
index 9674948d409..fac2a8e129c 100644
--- a/src/devices/machine/steppers.h
+++ b/src/devices/machine/steppers.h
@@ -2,7 +2,7 @@
// copyright-holders:James Wallace
///////////////////////////////////////////////////////////////////////////
// //
-// steppers.c steppermotor emulation //
+// steppers.cpp steppermotor emulation //
// //
// Emulates : stepper motors driven with full step or half step //
// also emulates the index optic //
@@ -33,8 +33,6 @@
#define PROJECT_48STEP_REEL 10
-#define MCFG_STEPPER_OPTIC_CALLBACK(_write) \
- downcast<stepper_device &>(*device).set_optic_handler(DEVCB_##_write);
class stepper_device : public device_t
{
@@ -47,7 +45,7 @@ public:
stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <class Object> devcb_base &set_optic_handler(Object &&cb) { return m_optic_cb.set_callback(std::forward<Object>(cb)); }
+ auto optic_handler() { return m_optic_cb.bind(); }
/* total size of reel (in half steps) */
void set_max_steps(int16_t steps) { m_max_steps = steps; }
diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h
index 17273249baa..296ebd92349 100644
--- a/src/devices/machine/tc009xlvc.h
+++ b/src/devices/machine/tc009xlvc.h
@@ -18,7 +18,7 @@ public:
tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); }
+ template <typename T> void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
DECLARE_READ8_MEMBER( vregs_r );
DECLARE_WRITE8_MEMBER( vregs_w );
@@ -83,8 +83,4 @@ private:
DECLARE_DEVICE_TYPE(TC0091LVC, tc0091lvc_device)
-
-#define MCFG_TC0091LVC_GFXDECODE(gfxtag) \
- downcast<tc0091lvc_device &>(*device).set_gfxdecode_tag(gfxtag);
-
#endif // MAME_MACHINE_TL009XLVC_H
diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h
index 4c4b3328346..8dc914817d1 100644
--- a/src/devices/machine/te7750.h
+++ b/src/devices/machine/te7750.h
@@ -11,50 +11,6 @@
#pragma once
-//**************************************************************************
-// CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_TE7750_IN_PORT1_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(0, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT2_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(1, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT3_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(2, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT4_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(3, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT5_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(4, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT6_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(5, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT7_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(6, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT8_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(7, DEVCB_##_devcb);
-#define MCFG_TE7750_IN_PORT9_CB(_devcb) \
- downcast<te7750_device &>(*device).set_input_cb(8, DEVCB_##_devcb);
-
-#define MCFG_TE7750_OUT_PORT1_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(0, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT2_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(1, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT3_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(2, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT4_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(3, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT5_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(4, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT6_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(5, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT7_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(6, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT8_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(7, DEVCB_##_devcb);
-#define MCFG_TE7750_OUT_PORT9_CB(_devcb) \
- downcast<te7750_device &>(*device).set_output_cb(8, DEVCB_##_devcb);
-
-#define MCFG_TE7750_IOS_CB(_devcb) \
- downcast<te7750_device &>(*device).set_ios_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -69,20 +25,6 @@ public:
te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// configuration
- template<class Object> devcb_base &set_input_cb(int port, Object &&obj)
- {
- assert(port >= 0 && port < 9);
- return m_input_cb[port].set_callback(std::forward<Object>(obj));
- }
- template<class Object> devcb_base &set_output_cb(int port, Object &&obj)
- {
- assert(port >= 0 && port < 9);
- return m_output_cb[port].set_callback(std::forward<Object>(obj));
- }
- template<class Object> devcb_base &set_ios_cb(Object &&obj)
- {
- return m_ios_cb.set_callback(std::forward<Object>(obj));
- }
auto in_port1_cb() { return m_input_cb[0].bind(); }
auto in_port2_cb() { return m_input_cb[1].bind(); }
auto in_port3_cb() { return m_input_cb[2].bind(); }
diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h
index eae1cd69a48..5b936ebc88b 100644
--- a/src/devices/machine/tmp68301.h
+++ b/src/devices/machine/tmp68301.h
@@ -7,22 +7,8 @@
#include "cpu/m68000/m68000.h"
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
/* TODO: serial ports, frequency & hook it up with m68k */
-// FIXME: M68000 ought to be a parent class, not an external object
-#define MCFG_TMP68301_CPU(_tag) \
- downcast<tmp68301_device &>(*device).set_cpu_tag(_tag);
-
-#define MCFG_TMP68301_IN_PARALLEL_CB(cb) \
- downcast<tmp68301_device &>(*device).set_in_parallel_callback((DEVCB_##cb));
-
-#define MCFG_TMP68301_OUT_PARALLEL_CB(cb) \
- downcast<tmp68301_device &>(*device).set_out_parallel_callback((DEVCB_##cb));
-
//**************************************************************************
// TYPE DEFINITIONS
@@ -36,9 +22,9 @@ class tmp68301_device : public device_t,
public:
tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); }
- template <class Object> devcb_base &set_in_parallel_callback(Object &&cb) { return m_in_parallel_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_parallel_callback(Object &&cb) { return m_out_parallel_cb.set_callback(std::forward<Object>(cb)); }
+ template <typename T> void set_cputag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } // FIXME: M68000 ought to be a parent class, not an external object
+ auto in_parallel_callback() { return m_in_parallel_cb.bind(); }
+ auto out_parallel_callback() { return m_out_parallel_cb.bind(); }
// Hardware Registers
DECLARE_READ16_MEMBER( regs_r );
diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h
index 6c11a50eafa..3fde3baa634 100644
--- a/src/devices/machine/tms1024.h
+++ b/src/devices/machine/tms1024.h
@@ -17,10 +17,6 @@
// 4-bit ports (3210 = DCBA)
// valid ports: 4-7 for TMS1024, 1-7 for TMS1025
-#define MCFG_TMS1025_READ_PORT_CB(X, cb) \
- downcast<tms1024_device &>(*device).set_read_port_callback<(tms1024_device::X)>((DEVCB_##cb));
-#define MCFG_TMS1025_WRITE_PORT_CB(X, cb) \
- downcast<tms1024_device &>(*device).set_write_port_callback<(tms1024_device::X)>((DEVCB_##cb));
// pinout reference
@@ -69,8 +65,6 @@ public:
tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// configuration helpers
- template <unsigned N, class Object> devcb_base &set_read_port_callback(Object &&cb) { return m_read_port[N].set_callback(std::forward<Object>(cb)); }
- template <unsigned N, class Object> devcb_base &set_write_port_callback(Object &&cb) { return m_write_port[N].set_callback(std::forward<Object>(cb)); }
auto read_port4_callback() { return m_read_port[3].bind(); }
auto read_port5_callback() { return m_read_port[4].bind(); }
auto read_port6_callback() { return m_read_port[5].bind(); }
diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h
index d9e34634279..d678829bda7 100644
--- a/src/devices/machine/tms6100.h
+++ b/src/devices/machine/tms6100.h
@@ -20,10 +20,6 @@
// 4-bit mode (mask option)
// note: in 4-bit mode, use data_r, otherwise use data_line_r
-#define MCFG_TMS6100_4BIT_MODE() \
- downcast<tms6100_device &>(*device).enable_4bit_mode(true);
-
-
// pinout reference
/*
diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp
index bf990751411..0d1080e8098 100644
--- a/src/mame/audio/dkong.cpp
+++ b/src/mame/audio/dkong.cpp
@@ -1378,7 +1378,7 @@ MACHINE_CONFIG_START(dkong_state::radarscp1_audio)
vp1.read_cb<6>().set("tms", FUNC(m58817_device::status_r));
/* tms memory controller */
- MCFG_DEVICE_ADD("m58819", M58819, 0)
+ M58819(config, "m58819", 0);
MCFG_DEVICE_ADD("tms", M58817, XTAL(640'000))
MCFG_TMS5110_M0_CB(WRITELINE("m58819", tms6100_device, m0_w))
diff --git a/src/mame/drivers/aces1.cpp b/src/mame/drivers/aces1.cpp
index 6d461fc62d1..bf2b291152a 100644
--- a/src/mame/drivers/aces1.cpp
+++ b/src/mame/drivers/aces1.cpp
@@ -78,10 +78,7 @@ private:
int m_reel_count[4];
int m_optic_pattern;
- DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
DECLARE_READ8_MEMBER( aces1_unk_r )
{
@@ -486,14 +483,14 @@ MACHINE_CONFIG_START(aces1_state::aces1)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* steppers */
- MCFG_DEVICE_ADD(m_reel[0], REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, aces1_state, reel0_optic_cb))
- MCFG_DEVICE_ADD(m_reel[1], REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, aces1_state, reel1_optic_cb))
- MCFG_DEVICE_ADD(m_reel[2], REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, aces1_state, reel2_optic_cb))
- MCFG_DEVICE_ADD(m_reel[3], REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, aces1_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[0]->optic_handler().set(FUNC(aces1_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[1]->optic_handler().set(FUNC(aces1_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[2]->optic_handler().set(FUNC(aces1_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(aces1_state::reel_optic_cb<3>));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bfm_sc1.cpp b/src/mame/drivers/bfm_sc1.cpp
index 59a8df53daa..2d821e531d3 100644
--- a/src/mame/drivers/bfm_sc1.cpp
+++ b/src/mame/drivers/bfm_sc1.cpp
@@ -1090,18 +1090,18 @@ MACHINE_CONFIG_START(bfm_sc1_state::scorpion1)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
config.set_default_layout(layout_sc1_vfd);
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc1_state, reel_optic_cb<5>))
+ REEL(config, m_reels[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[0]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<0>));
+ REEL(config, m_reels[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[1]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<1>));
+ REEL(config, m_reels[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[2]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<2>));
+ REEL(config, m_reels[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[3]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<3>));
+ REEL(config, m_reels[4], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[4]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<4>));
+ REEL(config, m_reels[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[5]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<5>));
MCFG_DEVICE_ADD("meters", METERS, 0)
MCFG_METERS_NUMBER(8)
diff --git a/src/mame/drivers/bfm_sc2.cpp b/src/mame/drivers/bfm_sc2.cpp
index cbdaf1301dc..f2a4dfb596c 100644
--- a/src/mame/drivers/bfm_sc2.cpp
+++ b/src/mame/drivers/bfm_sc2.cpp
@@ -375,10 +375,9 @@ protected:
void memmap_no_vid(address_map &map);
optional_device<bfm_dm01_device> m_dm01;
-
-private:
optional_device_array<stepper_device, 6> m_reel;
+private:
int m_optic_pattern;
int m_reels;
};
@@ -3771,18 +3770,18 @@ MACHINE_CONFIG_START(bfm_sc2_awp_state::scorpion2)
/* video hardware */
config.set_default_layout(layout_sc2_vfd);
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_awp_state, reel_optic_cb<5>))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[0]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[1]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[2]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[4]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[5]->optic_handler().set(FUNC(bfm_sc2_awp_state::reel_optic_cb<5>));
_8meters(config);
MACHINE_CONFIG_END
@@ -3826,21 +3825,21 @@ MACHINE_CONFIG_START(bfm_sc2_dmd_state::scorpion2_dm01)
/* video hardware */
config.set_default_layout(layout_sc2_dmd);
- MCFG_DEVICE_ADD("dm01", BFM_DM01, 0)
- MCFG_BFM_DM01_BUSY_CB(WRITELINE(*this, bfm_sc2_dmd_state, bfmdm01_busy))
-
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfm_sc2_dmd_state, reel_optic_cb<5>))
+ BFM_DM01(config, m_dm01, 0);
+ m_dm01->busy_callback().set(FUNC(bfm_sc2_dmd_state::bfmdm01_busy));
+
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[0]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[1]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[2]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[4]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[5]->optic_handler().set(FUNC(bfm_sc2_dmd_state::reel_optic_cb<5>));
_8meters(config);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bfm_sc4.cpp b/src/mame/drivers/bfm_sc4.cpp
index a2b76aa8766..bb27a646049 100644
--- a/src/mame/drivers/bfm_sc4.cpp
+++ b/src/mame/drivers/bfm_sc4.cpp
@@ -733,16 +733,16 @@ void sc4_state::bfm_sc4_68307_porta_w(address_space &space, bool dedicated, uint
{
m_reel12_latch = data;
- if(m_reel1)
+ if(m_reel[0])
{
- m_reel1->update( data &0x0f);
- awp_draw_reel(machine(),"reel1", *m_reel1);
+ m_reel[0]->update( data &0x0f);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
}
- if (m_reel2)
+ if (m_reel[1])
{
- m_reel2->update((data>>4)&0x0f);
- awp_draw_reel(machine(),"reel2", *m_reel2);
+ m_reel[1]->update((data>>4)&0x0f);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
}
}
@@ -750,10 +750,10 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel3_w )
{
m_reel3_latch = data;
- if(m_reel3)
+ if(m_reel[2])
{
- m_reel3->update( data &0x0f);
- awp_draw_reel(machine(),"reel3", *m_reel3);
+ m_reel[2]->update( data &0x0f);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
}
}
@@ -761,10 +761,10 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel4_w )
{
m_reel4_latch = data;
- if(m_reel4)
+ if(m_reel[3])
{
- m_reel4->update( data &0x0f);
- awp_draw_reel(machine(),"reel4", *m_reel4);
+ m_reel[3]->update( data &0x0f);
+ awp_draw_reel(machine(),"reel4", *m_reel[3]);
}
}
@@ -856,16 +856,16 @@ WRITE8_MEMBER(sc4_state::bfm_sc4_duart_output_w)
// logerror("bfm_sc4_duart_output_w\n");
m_reel56_latch = data;
- if(m_reel5)
+ if(m_reel[4])
{
- m_reel5->update( data &0x0f);
- awp_draw_reel(machine(),"reel5", *m_reel5);
+ m_reel[4]->update( data &0x0f);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
}
- if (m_reel6)
+ if (m_reel[5])
{
- m_reel6->update((data>>4)&0x0f);
- awp_draw_reel(machine(),"reel6", *m_reel6);
+ m_reel[5]->update((data>>4)&0x0f);
+ awp_draw_reel(machine(),"reel6", *m_reel[5]);
}
}
@@ -920,329 +920,350 @@ MACHINE_CONFIG_START(sc4_state::sc4_common)
MACHINE_CONFIG_END
//Standard 6 reels all connected
-MACHINE_CONFIG_START(sc4_state::sc4)
+void sc4_state::sc4(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//Standard 3 reels
-MACHINE_CONFIG_START(sc4_state::sc4_3reel)
+void sc4_state::sc4_3reel(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
-MACHINE_CONFIG_END
+}
//Standard 4 reels
-MACHINE_CONFIG_START(sc4_state::sc4_4reel)
+void sc4_state::sc4_4reel(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+}
//4 reels, with the last connected to RL4 not RL3
-MACHINE_CONFIG_START(sc4_state::sc4_4reel_alt)
+void sc4_state::sc4_4reel_alt(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+}
//Standard 5 reels
-MACHINE_CONFIG_START(sc4_state::sc4_5reel)
+void sc4_state::sc4_5reel(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+}
//5 reels, with RL4 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_5reel_alt)
+void sc4_state::sc4_5reel_alt(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
-MACHINE_CONFIG_END
+}
//6 reels, last 200 steps
-MACHINE_CONFIG_START(sc4_state::sc4_200_std)
+void sc4_state::sc4_200_std(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//6 reels, last 200 steps
-MACHINE_CONFIG_START(sc4_state::sc4_200_alt)
+void sc4_state::sc4_200_alt(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//6 reels, RL4 200 steps
-MACHINE_CONFIG_START(sc4_state::sc4_200_alta)
+void sc4_state::sc4_200_alta(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//6 reels, 3 48 step, 3 200 step
-MACHINE_CONFIG_START(sc4_state::sc4_200_altb)
+void sc4_state::sc4_200_altb(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//5 reels, last one 200 steps
-MACHINE_CONFIG_START(sc4_state::sc4_200_5r)
+void sc4_state::sc4_200_5r(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+}
//5 reels, last one 200 steps, RL4 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_200_5ra)
+void sc4_state::sc4_200_5ra(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
-
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//5 reels, last one 200 steps, RL5 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_200_5rb)
+void sc4_state::sc4_200_5rb(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
-
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+
+ REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//5 reels, RL5 200 steps, RL4 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_200_5rc)
+void sc4_state::sc4_200_5rc(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
-
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+
+ REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
//4 reels, last one 200 steps
-MACHINE_CONFIG_START(sc4_state::sc4_200_4r)
+void sc4_state::sc4_200_4r(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+}
//4 reels, last one 200 steps, RL4 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_200_4ra)
+void sc4_state::sc4_200_4ra(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+}
//4 reels, last one 200 steps, RL4,5 skipped
-MACHINE_CONFIG_START(sc4_state::sc4_200_4rb)
+void sc4_state::sc4_200_4rb(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
- MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>));
+}
-MACHINE_CONFIG_START(sc4_state::sc4_4reel_200)
+void sc4_state::sc4_4reel_200(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(sc4_state::sc4_3reel_200)
+void sc4_state::sc4_3reel_200(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+}
-MACHINE_CONFIG_START(sc4_state::sc4_3reel_200_48)
+void sc4_state::sc4_3reel_200_48(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
-MACHINE_CONFIG_END
+ REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(sc4_state::sc4_no_reels)
+void sc4_state::sc4_no_reels(machine_config &config)
+{
sc4_common(config);
-MACHINE_CONFIG_END
+}
void sc4_adder4_state::machine_start()
{
@@ -1251,32 +1272,34 @@ void sc4_adder4_state::machine_start()
m_adder4ram = make_unique_clear<uint32_t[]>(0x10000);
}
-MACHINE_CONFIG_START(sc4_adder4_state::sc4_adder4)
+void sc4_adder4_state::sc4_adder4(machine_config &config)
+{
sc4_common(config);
- MCFG_DEVICE_ADD("adder4", M68340, 25175000) // 68340 (CPU32 core)
- MCFG_DEVICE_PROGRAM_MAP(sc4_adder4_map)
-MACHINE_CONFIG_END
+ M68340(config, m_adder4cpu, 25175000); // 68340 (CPU32 core)
+ m_adder4cpu->set_addrmap(AS_PROGRAM, &sc4_adder4_state::sc4_adder4_map);
+}
-MACHINE_CONFIG_START(sc4_state::sc4dmd)
+void sc4_state::sc4dmd(machine_config &config)
+{
sc4_common(config);
/* video hardware */
//config.set_default_layout(layout_sc4_dmd);
- MCFG_DEVICE_ADD("dm01", BFM_DM01, 0)
- MCFG_BFM_DM01_BUSY_CB(WRITELINE(*this, sc4_state, bfmdm01_busy))
-
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb))
-MACHINE_CONFIG_END
+ BFM_DM01(config, m_dm01, 0);
+ m_dm01->busy_callback().set(FUNC(sc4_state::bfmdm01_busy));
+
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7);
+ m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>));
+}
INPUT_PORTS_START( sc4_raw ) // completley unmapped, but named inputs for all the ports, used for testing.
PORT_START("IN-0")
diff --git a/src/mame/drivers/bfmsys85.cpp b/src/mame/drivers/bfmsys85.cpp
index f2f2b292a51..02a1735bc65 100644
--- a/src/mame/drivers/bfmsys85.cpp
+++ b/src/mame/drivers/bfmsys85.cpp
@@ -78,10 +78,7 @@ public:
driver_device(mconfig, type, tag),
m_vfd(*this, "vfd"),
m_maincpu(*this, "maincpu"),
- m_reel0(*this, "reel0"),
- m_reel1(*this, "reel1"),
- m_reel2(*this, "reel2"),
- m_reel3(*this, "reel3"),
+ m_reel(*this, "reel%u", 0U),
m_acia6850_0(*this, "acia6850_0"),
m_meters(*this, "meters"),
m_lamps(*this, "lamp%u", 0U)
@@ -116,18 +113,12 @@ private:
uint8_t m_sys85_data_line_t; // never read
optional_device<rocvfd_device> m_vfd;
required_device<cpu_device> m_maincpu;
- required_device<stepper_device> m_reel0;
- required_device<stepper_device> m_reel1;
- required_device<stepper_device> m_reel2;
- required_device<stepper_device> m_reel3;
+ required_device_array<stepper_device, 4> m_reel;
required_device<acia6850_device> m_acia6850_0;
required_device<meters_device> m_meters;
output_finder<256> m_lamps;
- DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
DECLARE_WRITE8_MEMBER(watchdog_w);
DECLARE_READ8_MEMBER(irqlatch_r);
DECLARE_WRITE8_MEMBER(reel12_w);
@@ -220,22 +211,22 @@ READ8_MEMBER(bfmsys85_state::irqlatch_r)
WRITE8_MEMBER(bfmsys85_state::reel12_w)
{
- m_reel0->update((data>>4)&0x0f);
- m_reel1->update( data &0x0f);
+ m_reel[0]->update((data>>4)&0x0f);
+ m_reel[1]->update( data &0x0f);
- awp_draw_reel(machine(),"reel1", *m_reel0);
- awp_draw_reel(machine(),"reel2", *m_reel1);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
}
///////////////////////////////////////////////////////////////////////////
WRITE8_MEMBER(bfmsys85_state::reel34_w)
{
- m_reel2->update((data>>4)&0x0f);
- m_reel3->update( data &0x0f);
+ m_reel[2]->update((data>>4)&0x0f);
+ m_reel[3]->update( data &0x0f);
- awp_draw_reel(machine(),"reel3", *m_reel2);
- awp_draw_reel(machine(),"reel4", *m_reel3);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
+ awp_draw_reel(machine(),"reel4", *m_reel[3]);
}
///////////////////////////////////////////////////////////////////////////
@@ -427,14 +418,14 @@ MACHINE_CONFIG_START(bfmsys85_state::bfmsys85)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // load/save nv RAM
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfmsys85_state, reel0_optic_cb))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfmsys85_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfmsys85_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, bfmsys85_state, reel3_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[0]->optic_handler().set(FUNC(bfmsys85_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[1]->optic_handler().set(FUNC(bfmsys85_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[2]->optic_handler().set(FUNC(bfmsys85_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(bfmsys85_state::reel_optic_cb<3>));
MCFG_DEVICE_ADD("meters", METERS, 0)
MCFG_METERS_NUMBER(8)
diff --git a/src/mame/drivers/bingowav.cpp b/src/mame/drivers/bingowav.cpp
index 6fe4015f57a..49b22a99176 100644
--- a/src/mame/drivers/bingowav.cpp
+++ b/src/mame/drivers/bingowav.cpp
@@ -113,17 +113,17 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(bingowav_state::bingowav)
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000) // actually TMP63803F-16
+ MCFG_DEVICE_ADD(m_maincpu, M68000, 12000000) // actually TMP63803F-16
MCFG_DEVICE_PROGRAM_MAP(bingowav_main_map)
- MCFG_DEVICE_ADD("maintmp", TMP68301, 0) // wrong
- MCFG_TMP68301_CPU("maincpu")
+ tmp68301_device &tmp68301(TMP68301(config, "maintmp", 0)); // wrong
+ tmp68301.set_cputag(m_maincpu);
- MCFG_DEVICE_ADD("mainioh", TE7750, 0)
- MCFG_TE7750_IOS_CB(CONSTANT(5))
+ te7750_device &mainioh(TE7750(config, "mainioh", 0));
+ mainioh.ios_cb().set_constant(5);
- MCFG_DEVICE_ADD("mainiol", TE7750, 0)
- MCFG_TE7750_IOS_CB(CONSTANT(4))
+ te7750_device &mainiol(TE7750(config, "mainiol", 0));
+ mainiol.ios_cb().set_constant(4);
MCFG_DEVICE_ADD("audiocpu", Z80, 4000000)
MCFG_DEVICE_PROGRAM_MAP(bingowav_audio_map)
diff --git a/src/mame/drivers/capr1.cpp b/src/mame/drivers/capr1.cpp
index a2804b01bf1..5e0e6d9f757 100644
--- a/src/mame/drivers/capr1.cpp
+++ b/src/mame/drivers/capr1.cpp
@@ -205,17 +205,17 @@ MACHINE_CONFIG_START(capr1_state::cspin2)
MCFG_DEVICE_PROGRAM_MAP(cspin2_map)
//MCFG_DEVICE_PERIODIC_INT_DRIVER(capr1_state, nmi_line_pulse, 20)
- MCFG_DEVICE_ADD("te7750", TE7750, 0) // guess
- MCFG_TE7750_IOS_CB(CONSTANT(7))
- MCFG_TE7750_IN_PORT1_CB(IOPORT("IN1"))
- MCFG_TE7750_IN_PORT2_CB(IOPORT("IN2"))
- MCFG_TE7750_IN_PORT3_CB(IOPORT("IN3"))
- MCFG_TE7750_IN_PORT4_CB(IOPORT("IN4"))
- MCFG_TE7750_IN_PORT5_CB(IOPORT("IN5"))
- MCFG_TE7750_IN_PORT6_CB(IOPORT("IN6"))
- MCFG_TE7750_IN_PORT7_CB(IOPORT("IN7"))
- MCFG_TE7750_IN_PORT8_CB(IOPORT("IN8"))
- MCFG_TE7750_OUT_PORT9_CB(WRITE8(*this, capr1_state, output_w))
+ te7750_device &te7750(TE7750(config, "te7750", 0)); // guess
+ te7750.ios_cb().set_constant(7);
+ te7750.in_port1_cb().set_ioport("IN1");
+ te7750.in_port2_cb().set_ioport("IN2");
+ te7750.in_port3_cb().set_ioport("IN3");
+ te7750.in_port4_cb().set_ioport("IN4");
+ te7750.in_port5_cb().set_ioport("IN5");
+ te7750.in_port6_cb().set_ioport("IN6");
+ te7750.in_port7_cb().set_ioport("IN7");
+ te7750.in_port8_cb().set_ioport("IN8");
+ te7750.out_port9_cb().set(FUNC(capr1_state::output_w));
/* no video! */
diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp
index f233c1b8dd6..5cd9cff8a47 100644
--- a/src/mame/drivers/csplayh5.cpp
+++ b/src/mame/drivers/csplayh5.cpp
@@ -361,15 +361,15 @@ WRITE16_MEMBER(csplayh5_state::tmp68301_parallel_port_w)
MACHINE_CONFIG_START(csplayh5_state::csplayh5)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M68000,16000000) /* TMP68301-16 */
+ MCFG_DEVICE_ADD(m_maincpu,M68000,16000000) /* TMP68301-16 */
MCFG_DEVICE_PROGRAM_MAP(csplayh5_map)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301", tmp68301_device, irq_callback)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", csplayh5_state, csplayh5_irq, "screen", 0, 1)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, csplayh5_state, tmp68301_parallel_port_w))
+ TMP68301(config, m_tmp68301, 0);
+ m_tmp68301->set_cputag(m_maincpu);
+ m_tmp68301->out_parallel_callback().set(FUNC(csplayh5_state::tmp68301_parallel_port_w));
#if USE_H8
MCFG_DEVICE_ADD("subcpu", H83002, DVD_CLOCK/2) /* unknown divider */
diff --git a/src/mame/drivers/dfruit.cpp b/src/mame/drivers/dfruit.cpp
index 49b9884d593..59d9707773a 100644
--- a/src/mame/drivers/dfruit.cpp
+++ b/src/mame/drivers/dfruit.cpp
@@ -394,8 +394,8 @@ MACHINE_CONFIG_START(dfruit_state::dfruit)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dfruit )
MCFG_PALETTE_ADD("palette", 0x100)
- MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
- MCFG_TC0091LVC_GFXDECODE("gfxdecode")
+ TC0091LVC(config, m_vdp, 0);
+ m_vdp->set_gfxdecode_tag("gfxdecode");
i8255_device &ppi(I8255A(config, "ppi8255_0"));
ppi.in_pa_callback().set_ioport("IN0");
diff --git a/src/mame/drivers/ecoinf2.cpp b/src/mame/drivers/ecoinf2.cpp
index 04d62472bc0..fef7051f799 100644
--- a/src/mame/drivers/ecoinf2.cpp
+++ b/src/mame/drivers/ecoinf2.cpp
@@ -497,11 +497,12 @@ static INPUT_PORTS_START( ecoinf2 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(ecoinf2_state::ecoinf2_oxo)
+void ecoinf2_state::ecoinf2_oxo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z180,4000000) // some of these hit invalid opcodes with a plain z80, some don't?
- MCFG_DEVICE_PROGRAM_MAP(oxo_memmap)
- MCFG_DEVICE_IO_MAP(oxo_portmap)
+ Z180(config, m_maincpu, 4000000); // some of these hit invalid opcodes with a plain z80, some don't?
+ m_maincpu->set_addrmap(AS_PROGRAM, &ecoinf2_state::oxo_memmap);
+ m_maincpu->set_addrmap(AS_IO, &ecoinf2_state::oxo_portmap);
config.set_default_layout(layout_ecoinf2);
@@ -531,20 +532,20 @@ MACHINE_CONFIG_START(ecoinf2_state::ecoinf2_oxo)
ic13_leds.out_pb_callback().set(FUNC(ecoinf2_state::ppi8255_ic13_write_b_strobedat1));
ic13_leds.in_pc_callback().set(FUNC(ecoinf2_state::ppi8255_ic13_read_c_panel));
- MCFG_DEVICE_ADD("reel0", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf2_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf2_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf2_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf2_state, reel_optic_cb<3>))
+ REEL(config, m_reels[0], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[0]->optic_handler().set(FUNC(ecoinf2_state::reel_optic_cb<0>));
+ REEL(config, m_reels[1], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[1]->optic_handler().set(FUNC(ecoinf2_state::reel_optic_cb<1>));
+ REEL(config, m_reels[2], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[2]->optic_handler().set(FUNC(ecoinf2_state::reel_optic_cb<2>));
+ REEL(config, m_reels[3], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[3]->optic_handler().set(FUNC(ecoinf2_state::reel_optic_cb<3>));
- MCFG_DEVICE_ADD("meters", METERS, 0)
- MCFG_METERS_NUMBER(8)
+ METERS(config, m_meters, 0);
+ m_meters->set_number_meters(8);
-// MCFG_DEVICE_ADD("ic25_dips", I8255, 0)
-MACHINE_CONFIG_END
+// I8255(config, "ic25_dips", 0);
+}
diff --git a/src/mame/drivers/ecoinf3.cpp b/src/mame/drivers/ecoinf3.cpp
index e5207424b26..13f690573ad 100644
--- a/src/mame/drivers/ecoinf3.cpp
+++ b/src/mame/drivers/ecoinf3.cpp
@@ -660,20 +660,18 @@ static INPUT_PORTS_START( ecoinf3 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(ecoinf3_state::ecoinf3_pyramid)
+void ecoinf3_state::ecoinf3_pyramid(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z180,8000000) // certainly not a plain z80 at least, invalid opcodes for that
-
- MCFG_DEVICE_PROGRAM_MAP(pyramid_memmap)
- MCFG_DEVICE_IO_MAP(pyramid_portmap)
+ Z180(config, m_maincpu, 8000000); // certainly not a plain z80 at least, invalid opcodes for that
+ m_maincpu->set_addrmap(AS_PROGRAM, &ecoinf3_state::pyramid_memmap);
+ m_maincpu->set_addrmap(AS_IO, &ecoinf3_state::pyramid_portmap);
config.set_default_layout(layout_ecoinf3);
SPEAKER(config, "mono").front_center();
-
- MCFG_DEVICE_ADD("sn1", SN76489, 4000000) // no idea what the sound chip is, this sounds terrible
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 0.30); // no idea what the sound chip is, this sounds terrible
i8255_device &ppia(I8255(config, "ppi8255_a"));
ppia.in_pa_callback().set(FUNC(ecoinf3_state::ppi8255_intf_a_read_a));
@@ -739,15 +737,15 @@ MACHINE_CONFIG_START(ecoinf3_state::ecoinf3_pyramid)
ppih.in_pc_callback().set(FUNC(ecoinf3_state::ppi8255_intf_h_read_c));
ppih.out_pc_callback().set(FUNC(ecoinf3_state::ppi8255_intf_h_write_c));
- MCFG_DEVICE_ADD("reel0", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf3_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf3_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf3_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinf3_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
+ REEL(config, m_reels[0], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[0]->optic_handler().set(FUNC(ecoinf3_state::reel_optic_cb<0>));
+ REEL(config, m_reels[1], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[1]->optic_handler().set(FUNC(ecoinf3_state::reel_optic_cb<1>));
+ REEL(config, m_reels[2], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[2]->optic_handler().set(FUNC(ecoinf3_state::reel_optic_cb<2>));
+ REEL(config, m_reels[3], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reels[3]->optic_handler().set(FUNC(ecoinf3_state::reel_optic_cb<3>));
+}
/********************************************************************************************************************
diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp
index 18cc6751b29..5905124d6a1 100644
--- a/src/mame/drivers/ecoinfr.cpp
+++ b/src/mame/drivers/ecoinfr.cpp
@@ -57,10 +57,7 @@ public:
ecoinfr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_reel0(*this, "reel0"),
- m_reel1(*this, "reel1"),
- m_reel2(*this, "reel2"),
- m_reel3(*this, "reel3"),
+ m_reel(*this, "reel%u", 0U),
m_digits(*this, "digit%u", 0U)
{ }
@@ -77,10 +74,6 @@ public:
private:
int irq_toggle;
int m_optic_pattern;
- DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
uint8_t port09_value;
uint8_t port10_value;
@@ -92,6 +85,7 @@ private:
uint8_t port16_value;
uint8_t port17_value;
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
DECLARE_WRITE8_MEMBER(ec_port00_out_w);
DECLARE_WRITE8_MEMBER(ec_port01_out_w);
DECLARE_WRITE8_MEMBER(ec_port02_out_w);
@@ -126,10 +120,7 @@ private:
uint8_t m_credsel;
required_device<cpu_device> m_maincpu;
- required_device<stepper_device> m_reel0;
- required_device<stepper_device> m_reel1;
- required_device<stepper_device> m_reel2;
- required_device<stepper_device> m_reel3;
+ required_device_array<stepper_device, 4> m_reel;
output_finder<16> m_digits;
void memmap(address_map &map);
void portmap(address_map &map);
@@ -176,9 +167,9 @@ WRITE8_MEMBER(ecoinfr_state::ec_port00_out_w)
printf("ec_port0a_out_w (reel 1 port) unk bits used %02x\n", data);
}
- m_reel0->update(data&0x0f);
+ m_reel[0]->update(data&0x0f);
- awp_draw_reel(machine(),"reel1", *m_reel0);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
}
WRITE8_MEMBER(ecoinfr_state::ec_port01_out_w)
@@ -188,9 +179,9 @@ WRITE8_MEMBER(ecoinfr_state::ec_port01_out_w)
printf("ec_port01_out_w (reel 2 port) unk bits used %02x\n", data);
}
- m_reel1->update(data&0x0f);
+ m_reel[1]->update(data&0x0f);
- awp_draw_reel(machine(),"reel2", *m_reel1);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
}
WRITE8_MEMBER(ecoinfr_state::ec_port02_out_w)
@@ -200,9 +191,9 @@ WRITE8_MEMBER(ecoinfr_state::ec_port02_out_w)
printf("ec_port02_out_w (reel 3 port) unk bits used %02x\n", data);
}
- m_reel2->update(data&0x0f);
+ m_reel[2]->update(data&0x0f);
- awp_draw_reel(machine(),"reel3", *m_reel2);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
}
@@ -781,32 +772,28 @@ void ecoinfr_state::machine_reset()
}
-MACHINE_CONFIG_START(ecoinfr_state::ecoinfr)
+void ecoinfr_state::ecoinfr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,4000000)
- MCFG_DEVICE_PROGRAM_MAP(memmap)
- MCFG_DEVICE_IO_MAP(portmap)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("ectimer", ecoinfr_state, ecoinfr_irq_timer, attotime::from_hz(250))
+ Z80(config, m_maincpu, 4000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ecoinfr_state::memmap);
+ m_maincpu->set_addrmap(AS_IO, &ecoinfr_state::portmap);
+ TIMER(config , "ectimer" , 0).configure_periodic(timer_device::expired_delegate(FUNC(ecoinfr_state::ecoinfr_irq_timer) , this) , attotime::from_hz(250));
config.set_default_layout(layout_ecoinfr);
- MCFG_DEVICE_ADD(UPD8251_TAG, I8251, 0)
-
- MCFG_DEVICE_ADD("reel0", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinfr_state, reel0_optic_cb))
- MCFG_DEVICE_ADD("reel1", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinfr_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinfr_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, ecoinfr_state, reel3_optic_cb))
-MACHINE_CONFIG_END
-
-
-
-
+ I8251(config, UPD8251_TAG, 0);
+ REEL(config, m_reel[0], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[0]->optic_handler().set(FUNC(ecoinfr_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[1]->optic_handler().set(FUNC(ecoinfr_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[2]->optic_handler().set(FUNC(ecoinfr_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2);
+ m_reel[3]->optic_handler().set(FUNC(ecoinfr_state::reel_optic_cb<3>));
+}
/********************************************************************************************************************
diff --git a/src/mame/drivers/eva.cpp b/src/mame/drivers/eva.cpp
index f60feaba058..eca2245ce3d 100644
--- a/src/mame/drivers/eva.cpp
+++ b/src/mame/drivers/eva.cpp
@@ -161,11 +161,11 @@ MACHINE_CONFIG_START(eva_state::tms5110_route)
/* sound hardware */
MCFG_DEVICE_MODIFY("tms5100")
- MCFG_TMS5110_M0_CB(WRITELINE("tms6100", tms6100_device, m0_w))
- MCFG_TMS5110_M1_CB(WRITELINE("tms6100", tms6100_device, m1_w))
- MCFG_TMS5110_ADDR_CB(WRITE8("tms6100", tms6100_device, add_w))
- MCFG_TMS5110_DATA_CB(READLINE("tms6100", tms6100_device, data_line_r))
- MCFG_TMS5110_ROMCLK_CB(WRITELINE("tms6100", tms6100_device, clk_w))
+ MCFG_TMS5110_M0_CB(WRITELINE(m_tms6100, tms6100_device, m0_w))
+ MCFG_TMS5110_M1_CB(WRITELINE(m_tms6100, tms6100_device, m1_w))
+ MCFG_TMS5110_ADDR_CB(WRITE8(m_tms6100, tms6100_device, add_w))
+ MCFG_TMS5110_DATA_CB(READLINE(m_tms6100, tms6100_device, data_line_r))
+ MCFG_TMS5110_ROMCLK_CB(WRITELINE(m_tms6100, tms6100_device, clk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
@@ -179,7 +179,7 @@ MACHINE_CONFIG_START(eva_state::eva24)
MCFG_COP400_READ_G_CB(READ8(*this, eva_state, eva24_read_g))
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, 640_kHz_XTAL/4)
+ TMS6100(config, m_tms6100, 640_kHz_XTAL/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", TMS5110A, 640_kHz_XTAL)
@@ -195,7 +195,7 @@ MACHINE_CONFIG_START(eva_state::eva11)
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, eva_state, eva11_write_r))
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, 640_kHz_XTAL/4)
+ TMS6100(config, m_tms6100, 640_kHz_XTAL/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", TMS5110A, 640_kHz_XTAL)
diff --git a/src/mame/drivers/gokidetor.cpp b/src/mame/drivers/gokidetor.cpp
index 0c7d663bbf0..11ec0179f47 100644
--- a/src/mame/drivers/gokidetor.cpp
+++ b/src/mame/drivers/gokidetor.cpp
@@ -127,18 +127,18 @@ MACHINE_CONFIG_START(gokidetor_state::gokidetor)
// IRQ from ???
// NMI related to E002 input and TE7750 port 7
- MCFG_DEVICE_ADD("te7750", TE7750, 0)
- MCFG_TE7750_IOS_CB(CONSTANT(3))
- MCFG_TE7750_IN_PORT1_CB(IOPORT("IN1"))
- MCFG_TE7750_IN_PORT2_CB(IOPORT("IN2"))
- MCFG_TE7750_IN_PORT3_CB(IOPORT("IN3"))
- MCFG_TE7750_OUT_PORT4_CB(WRITE8(*this, gokidetor_state, out4_w))
- MCFG_TE7750_OUT_PORT5_CB(WRITE8(*this, gokidetor_state, out5_w))
- MCFG_TE7750_OUT_PORT6_CB(WRITE8(*this, gokidetor_state, out6_w))
- MCFG_TE7750_OUT_PORT7_CB(WRITE8(*this, gokidetor_state, out7_w))
- MCFG_TE7750_IN_PORT8_CB(IOPORT("IN8"))
- MCFG_TE7750_OUT_PORT8_CB(WRITE8(*this, gokidetor_state, out8_w))
- MCFG_TE7750_OUT_PORT9_CB(WRITE8(*this, gokidetor_state, out9_w))
+ te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750.ios_cb().set_constant(3);
+ te7750.in_port1_cb().set_ioport("IN1");
+ te7750.in_port2_cb().set_ioport("IN2");
+ te7750.in_port3_cb().set_ioport("IN3");
+ te7750.out_port4_cb().set(FUNC(gokidetor_state::out4_w));
+ te7750.out_port5_cb().set(FUNC(gokidetor_state::out5_w));
+ te7750.out_port6_cb().set(FUNC(gokidetor_state::out6_w));
+ te7750.out_port7_cb().set(FUNC(gokidetor_state::out7_w));
+ te7750.in_port8_cb().set_ioport("IN8");
+ te7750.out_port8_cb().set(FUNC(gokidetor_state::out8_w));
+ te7750.out_port9_cb().set(FUNC(gokidetor_state::out9_w));
MCFG_DEVICE_ADD("soundcpu", Z80, 4000000)
MCFG_DEVICE_PROGRAM_MAP(sound_map)
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 2adcbe11a10..a284b3b7d33 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -4726,11 +4726,11 @@ MACHINE_CONFIG_START(ginv2000_state::ginv2000)
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, ginv2000_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, ginv2000_state, write_o))
- MCFG_DEVICE_ADD("expander", TMS1024, 0)
- MCFG_TMS1025_WRITE_PORT_CB(PORT4, WRITE8(*this, ginv2000_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT5, WRITE8(*this, ginv2000_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT6, WRITE8(*this, ginv2000_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT7, WRITE8(*this, ginv2000_state, expander_w))
+ TMS1024(config, m_expander);
+ m_expander->write_port4_callback().set(FUNC(ginv2000_state::expander_w));
+ m_expander->write_port5_callback().set(FUNC(ginv2000_state::expander_w));
+ m_expander->write_port6_callback().set(FUNC(ginv2000_state::expander_w));
+ m_expander->write_port7_callback().set(FUNC(ginv2000_state::expander_w));
/* video hardware */
MCFG_SCREEN_SVG_ADD("screen", "svg")
@@ -8883,7 +8883,7 @@ public:
m_expander(*this, "expander")
{ }
- required_device<tms1024_device> m_expander;
+ required_device<tms1025_device> m_expander;
u8 m_exp_port[7];
DECLARE_WRITE8_MEMBER(expander_w);
@@ -9020,14 +9020,14 @@ MACHINE_CONFIG_START(tbreakup_state::tbreakup)
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tbreakup_state, write_r))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tbreakup_state, write_o))
- MCFG_DEVICE_ADD("expander", TMS1025, 0)
- MCFG_TMS1025_WRITE_PORT_CB(PORT1, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT2, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT3, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT4, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT5, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT6, WRITE8(*this, tbreakup_state, expander_w))
- MCFG_TMS1025_WRITE_PORT_CB(PORT7, WRITE8(*this, tbreakup_state, expander_w))
+ TMS1025(config, m_expander);
+ m_expander->write_port1_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port2_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port3_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port4_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port5_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port6_callback().set(FUNC(tbreakup_state::expander_w));
+ m_expander->write_port7_callback().set(FUNC(tbreakup_state::expander_w));
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_tbreakup);
diff --git a/src/mame/drivers/joystand.cpp b/src/mame/drivers/joystand.cpp
index 349b845e2ca..74011f91287 100644
--- a/src/mame/drivers/joystand.cpp
+++ b/src/mame/drivers/joystand.cpp
@@ -588,15 +588,15 @@ INTERRUPT_GEN_MEMBER(joystand_state::joystand_interrupt)
MACHINE_CONFIG_START(joystand_state::joystand)
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)) // !! TMP68301 !!
+ MCFG_DEVICE_ADD(m_maincpu, M68000, XTAL(16'000'000)) // !! TMP68301 !!
MCFG_DEVICE_PROGRAM_MAP(joystand_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", joystand_state, joystand_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
- MCFG_TMP68301_IN_PARALLEL_CB(READ16(*this, joystand_state, eeprom_r))
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, joystand_state, eeprom_w))
+ TMP68301(config, m_tmp68301, 0);
+ m_tmp68301->set_cputag(m_maincpu);
+ m_tmp68301->in_parallel_callback().set(FUNC(joystand_state::eeprom_r));
+ m_tmp68301->out_parallel_callback().set(FUNC(joystand_state::eeprom_w));
// video hardware
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/jpmimpct.cpp b/src/mame/drivers/jpmimpct.cpp
index 5b2199a561d..e14304caa38 100644
--- a/src/mame/drivers/jpmimpct.cpp
+++ b/src/mame/drivers/jpmimpct.cpp
@@ -1092,22 +1092,22 @@ WRITE16_MEMBER(jpmimpct_state::jpmioawp_w)
case 0x02:
{
- m_reel0->update((data >> 0)& 0x0F);
- m_reel1->update((data >> 1)& 0x0F);
- m_reel2->update((data >> 2)& 0x0F);
- m_reel3->update((data >> 3)& 0x0F);
- awp_draw_reel(machine(),"reel1", *m_reel0);
- awp_draw_reel(machine(),"reel2", *m_reel1);
- awp_draw_reel(machine(),"reel3", *m_reel2);
- awp_draw_reel(machine(),"reel4", *m_reel3);
+ m_reel[0]->update((data >> 0)& 0x0F);
+ m_reel[1]->update((data >> 1)& 0x0F);
+ m_reel[2]->update((data >> 2)& 0x0F);
+ m_reel[3]->update((data >> 3)& 0x0F);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
+ awp_draw_reel(machine(),"reel4", *m_reel[3]);
break;
}
case 0x04:
{
- m_reel4->update((data >> 4)& 0x0F);
- m_reel5->update((data >> 5)& 0x0F);
- awp_draw_reel(machine(),"reel5", *m_reel4);
- awp_draw_reel(machine(),"reel6", *m_reel5);
+ m_reel[4]->update((data >> 4)& 0x0F);
+ m_reel[5]->update((data >> 5)& 0x0F);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
+ awp_draw_reel(machine(),"reel6", *m_reel[5]);
break;
}
case 0x06:
@@ -1335,18 +1335,18 @@ MACHINE_CONFIG_START(jpmimpct_state::impctawp)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
config.set_default_layout(layout_jpmimpct);
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel0_optic_cb))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel1_optic_cb))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel2_optic_cb))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel3_optic_cb))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel4_optic_cb))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, jpmimpct_state, reel5_optic_cb))
+ REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[0]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[1]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[2]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[3]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[4]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reel[5]->optic_handler().set(FUNC(jpmimpct_state::reel_optic_cb<5>));
MCFG_DEVICE_ADD("meters", METERS, 0)
MCFG_METERS_NUMBER(5)
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp
index 81326e65422..d1652dde306 100644
--- a/src/mame/drivers/k28.cpp
+++ b/src/mame/drivers/k28.cpp
@@ -459,7 +459,7 @@ MACHINE_CONFIG_START(k28_state::k28)
MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, k28_state, mcu_prog_w))
MCFG_MCS48_PORT_T1_IN_CB(READLINE("speech", votrax_sc01_device, request)) // SC-01 A/R pin
- MCFG_DEVICE_ADD("tms6100", TMS6100, 3.579545_MHz_XTAL) // CLK tied to 8021 ALE pin
+ TMS6100(config, m_tms6100, 3.579545_MHz_XTAL); // CLK tied to 8021 ALE pin
MCFG_TIMER_ADD_NONE("on_button")
diff --git a/src/mame/drivers/krz2000.cpp b/src/mame/drivers/krz2000.cpp
index 81e75cd0e3e..fe2b785a0be 100644
--- a/src/mame/drivers/krz2000.cpp
+++ b/src/mame/drivers/krz2000.cpp
@@ -68,17 +68,18 @@ void k2000_state::k2000_map(address_map &map)
map(0xfffc00, 0xffffff).rw("tmp68301", FUNC(tmp68301_device::regs_r), FUNC(tmp68301_device::regs_w)); // TMP68301 Registers
}
-MACHINE_CONFIG_START(k2000_state::k2000)
- MCFG_DEVICE_ADD("maincpu", M68301, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(k2000_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
+void k2000_state::k2000(machine_config &config)
+{
+ M68301(config, m_maincpu, XTAL(12'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &k2000_state::k2000_map);
+ m_maincpu->set_irq_acknowledge_callback("tmp68301", FUNC(tmp68301_device::irq_callback));
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
+ tmp68301_device &tmp68301(TMP68301(config, "tmp68301", 0));
+ tmp68301.set_cputag(m_maincpu);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
-MACHINE_CONFIG_END
+}
static INPUT_PORTS_START( k2000 )
INPUT_PORTS_END
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index 9e1328e563f..3327a59a2c8 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -544,8 +544,8 @@ MACHINE_CONFIG_START(lastbank_state::lastbank)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lastbank )
MCFG_PALETTE_ADD("palette", 0x100)
- MCFG_DEVICE_ADD("tc0091lvc", TC0091LVC, 0)
- MCFG_TC0091LVC_GFXDECODE("gfxdecode")
+ TC0091LVC(config, m_vdp, 0);
+ m_vdp->set_gfxdecode_tag("gfxdecode");
// MCFG_VIDEO_START_OVERRIDE(lastbank_state,lastbank)
diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp
index aea38b6aac5..5b0e7bf3fbc 100644
--- a/src/mame/drivers/maygay1b.cpp
+++ b/src/mame/drivers/maygay1b.cpp
@@ -823,18 +823,18 @@ MACHINE_CONFIG_START(maygay1b_state::maygay_m1)
kbdc2.out_disp_callback().set(FUNC(maygay1b_state::lamp_data_2_w)); // display A&B
#endif
- MCFG_DEVICE_ADD("reel0", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, maygay1b_state, reel_optic_cb<5>))
+ REEL(config, m_reels[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[0]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<0>));
+ REEL(config, m_reels[1], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[1]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<1>));
+ REEL(config, m_reels[2], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[2]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<2>));
+ REEL(config, m_reels[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[3]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<3>));
+ REEL(config, m_reels[4], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[4]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<4>));
+ REEL(config, m_reels[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4);
+ m_reels[5]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<5>));
MCFG_DEVICE_ADD("meters", METERS, 0)
MCFG_METERS_NUMBER(8)
diff --git a/src/mame/drivers/mpu3.cpp b/src/mame/drivers/mpu3.cpp
index 7b84c41ad9a..c9b00c771e6 100644
--- a/src/mame/drivers/mpu3.cpp
+++ b/src/mame/drivers/mpu3.cpp
@@ -883,14 +883,14 @@ MACHINE_CONFIG_START(mpu3_state::mpu3base)
m_pia6->irqa_handler().set(FUNC(mpu3_state::cpu0_irq));
m_pia6->irqb_handler().set(FUNC(mpu3_state::cpu0_irq));
- MCFG_DEVICE_ADD("reel0", REEL, MPU3_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu3_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, MPU3_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu3_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, MPU3_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu3_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, MPU3_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu3_state, reel_optic_cb<3>))
+ REEL(config, m_reels[0], MPU3_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reels[0]->optic_handler().set(FUNC(mpu3_state::reel_optic_cb<0>));
+ REEL(config, m_reels[1], MPU3_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reels[1]->optic_handler().set(FUNC(mpu3_state::reel_optic_cb<1>));
+ REEL(config, m_reels[2], MPU3_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reels[2]->optic_handler().set(FUNC(mpu3_state::reel_optic_cb<2>));
+ REEL(config, m_reels[3], MPU3_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reels[3]->optic_handler().set(FUNC(mpu3_state::reel_optic_cb<3>));
MCFG_DEVICE_ADD("meters", METERS, 0)
MCFG_METERS_NUMBER(8)
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index 4193618958e..c086914e2c9 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -694,13 +694,13 @@ WRITE_LINE_MEMBER(niyanpai_state::vblank_irq)
MACHINE_CONFIG_START(niyanpai_state::niyanpai)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12288000/2) /* TMP68301, 6.144 MHz */
+ MCFG_DEVICE_ADD(m_maincpu, M68000, 12288000/2) /* TMP68301, 6.144 MHz */
MCFG_DEVICE_PROGRAM_MAP(niyanpai_map)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, niyanpai_state, tmp68301_parallel_port_w))
+ TMP68301(config, m_tmp68301, 0);
+ m_tmp68301->set_cputag(m_maincpu);
+ m_tmp68301->out_parallel_callback().set(FUNC(niyanpai_state::tmp68301_parallel_port_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/realbrk.cpp b/src/mame/drivers/realbrk.cpp
index 8e49ab1b27d..22a747e78fb 100644
--- a/src/mame/drivers/realbrk.cpp
+++ b/src/mame/drivers/realbrk.cpp
@@ -770,13 +770,13 @@ WRITE_LINE_MEMBER(realbrk_state::vblank_irq)
MACHINE_CONFIG_START(realbrk_state::realbrk)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M68000, XTAL(32'000'000) / 2) /* !! TMP68301 !! */
+ MCFG_DEVICE_ADD(m_maincpu, M68000, XTAL(32'000'000) / 2) /* !! TMP68301 !! */
MCFG_DEVICE_PROGRAM_MAP(realbrk_mem)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, realbrk_state,realbrk_flipscreen_w))
+ TMP68301(config, m_tmp68301, 0);
+ m_tmp68301->set_cputag(m_maincpu);
+ m_tmp68301->out_parallel_callback().set(FUNC(realbrk_state::realbrk_flipscreen_w));
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -810,8 +810,7 @@ MACHINE_CONFIG_START(realbrk_state::pkgnsh)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pkgnsh_mem)
- MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_OUT_PARALLEL_CB(NOOP)
+ m_tmp68301->out_parallel_callback().set_nop();
MACHINE_CONFIG_END
MACHINE_CONFIG_START(realbrk_state::pkgnshdx)
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index ee2e4bc44e0..8777d9b3f41 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -9256,13 +9256,13 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(seta_state::kiwame)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */
+ MCFG_DEVICE_ADD(m_maincpu, M68000, 16000000) /* 16 MHz */
MCFG_DEVICE_PROGRAM_MAP(kiwame_map)
/* lev 1-7 are the same. WARNING: the interrupt table is written to. */
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq1_line_hold)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, seta_state, kiwame_row_select_w))
+ tmp68301_device &tmp68301(TMP68301(config, "tmp68301", 0));
+ tmp68301.set_cputag(m_maincpu);
+ tmp68301.out_parallel_callback().set(FUNC(seta_state::kiwame_row_select_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index 80906cf3c07..2bacc6a2453 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2575,13 +2575,13 @@ INTERRUPT_GEN_MEMBER(seta2_state::samshoot_interrupt)
}
MACHINE_CONFIG_START(seta2_state::seta2)
- MCFG_DEVICE_ADD("maincpu", M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
+ MCFG_DEVICE_ADD(m_maincpu, M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
MCFG_DEVICE_PROGRAM_MAP(mj4simai_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0)
- MCFG_TMP68301_CPU("maincpu")
+ TMP68301(config, m_tmp68301, 0);
+ m_tmp68301->set_cputag(m_maincpu);
WATCHDOG_TIMER(config, "watchdog");
@@ -2613,9 +2613,8 @@ MACHINE_CONFIG_START(seta2_state::gundamex)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(gundamex_map)
- MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_IN_PARALLEL_CB(READ16(*this, seta2_state, gundamex_eeprom_r))
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, seta2_state, gundamex_eeprom_w))
+ m_tmp68301->in_parallel_callback().set(FUNC(seta2_state::gundamex_eeprom_r));
+ m_tmp68301->out_parallel_callback().set(FUNC(seta2_state::gundamex_eeprom_w));
EEPROM_93C46_16BIT(config, "eeprom");
@@ -2697,8 +2696,7 @@ MACHINE_CONFIG_START(seta2_state::reelquak)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(reelquak_map)
- MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_OUT_PARALLEL_CB(WRITE16(*this, seta2_state, reelquak_leds_w))
+ m_tmp68301->out_parallel_callback().set(FUNC(seta2_state::reelquak_leds_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MCFG_TICKET_DISPENSER_ADD("dispenser", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
@@ -2717,8 +2715,7 @@ MACHINE_CONFIG_START(seta2_state::samshoot)
MCFG_DEVICE_PROGRAM_MAP(samshoot_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(seta2_state, samshoot_interrupt, 60)
- MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_IN_PARALLEL_CB(IOPORT("DSW2"))
+ m_tmp68301->in_parallel_callback().set_ioport("DSW2");
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -2750,8 +2747,7 @@ MACHINE_CONFIG_START(seta2_state::telpacfl)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(telpacfl_map)
- MCFG_DEVICE_MODIFY("tmp68301")
- MCFG_TMP68301_IN_PARALLEL_CB(IOPORT("KNOB"))
+ m_tmp68301->in_parallel_callback().set_ioport("KNOB");
EEPROM_93C46_16BIT(config, "eeprom"); // not hooked up, seems unused
@@ -2859,13 +2855,13 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(seta2_state::namcostr)
- MCFG_DEVICE_ADD("maincpu", M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
+ MCFG_DEVICE_ADD(m_maincpu, M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
MCFG_DEVICE_PROGRAM_MAP(namcostr_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
- MCFG_DEVICE_ADD("tmp68301", TMP68301, 0) // does this have a ticket dispenser?
- MCFG_TMP68301_CPU("maincpu")
+ TMP68301(config, m_tmp68301, 0); // does this have a ticket dispenser?
+ m_tmp68301->set_cputag(m_maincpu);
// video hardware
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index 0d26a8117d6..286dd244515 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -2924,18 +2924,20 @@ MACHINE_CONFIG_START(taitof2_state::taito_f2_tc0510nio )
MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(taitof2_state::taito_f2_te7750 )
+void taitof2_state::taito_f2_te7750(machine_config &config)
+{
taito_f2(config);
- MCFG_DEVICE_ADD("te7750", TE7750, 0)
- MCFG_TE7750_IN_PORT1_CB(IOPORT("DSWA"))
- MCFG_TE7750_IN_PORT2_CB(IOPORT("DSWB"))
- MCFG_TE7750_IN_PORT3_CB(IOPORT("IN2"))
- MCFG_TE7750_OUT_PORT4_CB(WRITE8(*this, taitof2_state, taitof2_4p_coin_word_w))
- MCFG_TE7750_IN_PORT6_CB(IOPORT("IN0"))
- MCFG_TE7750_IN_PORT7_CB(IOPORT("IN1"))
- MCFG_TE7750_IN_PORT8_CB(IOPORT("IN3"))
- MCFG_TE7750_IN_PORT9_CB(IOPORT("IN4"))
-MACHINE_CONFIG_END
+
+ te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750.in_port1_cb().set_ioport("DSWA");
+ te7750.in_port2_cb().set_ioport("DSWB");
+ te7750.in_port3_cb().set_ioport("IN2");
+ te7750.out_port4_cb().set(FUNC(taitof2_state::taitof2_4p_coin_word_w));
+ te7750.in_port6_cb().set_ioport("IN0");
+ te7750.in_port7_cb().set_ioport("IN1");
+ te7750.in_port8_cb().set_ioport("IN3");
+ te7750.in_port9_cb().set_ioport("IN4");
+}
MACHINE_CONFIG_START(taitof2_state::finalb)
@@ -3370,15 +3372,15 @@ MACHINE_CONFIG_START(taitof2_state::ninjak)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ninjak_map)
- MCFG_DEVICE_ADD("te7750", TE7750, 0)
- MCFG_TE7750_IN_PORT1_CB(IOPORT("DSWA"))
- MCFG_TE7750_IN_PORT2_CB(IOPORT("DSWB"))
- MCFG_TE7750_IN_PORT3_CB(IOPORT("IN0"))
- MCFG_TE7750_IN_PORT4_CB(IOPORT("IN1"))
- MCFG_TE7750_IN_PORT5_CB(IOPORT("IN3"))
- MCFG_TE7750_IN_PORT6_CB(IOPORT("IN4"))
- MCFG_TE7750_IN_PORT7_CB(IOPORT("IN2"))
- MCFG_TE7750_OUT_PORT8_CB(WRITE8(*this, taitof2_state, taitof2_4p_coin_word_w))
+ te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750.in_port1_cb().set_ioport("DSWA");
+ te7750.in_port2_cb().set_ioport("DSWB");
+ te7750.in_port3_cb().set_ioport("IN0");
+ te7750.in_port4_cb().set_ioport("IN1");
+ te7750.in_port5_cb().set_ioport("IN3");
+ te7750.in_port6_cb().set_ioport("IN4");
+ te7750.in_port7_cb().set_ioport("IN2");
+ te7750.out_port8_cb().set(FUNC(taitof2_state::taitof2_4p_coin_word_w));
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_ninjak)
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 70761a18d92..7ee95c29cd0 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -1272,11 +1272,11 @@ MACHINE_CONFIG_START(tispeak_state::tms5110_route)
/* sound hardware */
MCFG_DEVICE_MODIFY("tms5100")
- MCFG_TMS5110_M0_CB(WRITELINE("tms6100", tms6100_device, m0_w))
- MCFG_TMS5110_M1_CB(WRITELINE("tms6100", tms6100_device, m1_w))
- MCFG_TMS5110_ADDR_CB(WRITE8("tms6100", tms6100_device, add_w))
- MCFG_TMS5110_DATA_CB(READLINE("tms6100", tms6100_device, data_line_r))
- MCFG_TMS5110_ROMCLK_CB(WRITELINE("tms6100", tms6100_device, clk_w))
+ MCFG_TMS5110_M0_CB(WRITELINE(m_tms6100, tms6100_device, m0_w))
+ MCFG_TMS5110_M1_CB(WRITELINE(m_tms6100, tms6100_device, m1_w))
+ MCFG_TMS5110_ADDR_CB(WRITE8(m_tms6100, tms6100_device, add_w))
+ MCFG_TMS5110_DATA_CB(READLINE(m_tms6100, tms6100_device, data_line_r))
+ MCFG_TMS5110_ROMCLK_CB(WRITELINE(m_tms6100, tms6100_device, clk_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
MACHINE_CONFIG_END
@@ -1296,7 +1296,7 @@ MACHINE_CONFIG_START(tispeak_state::snmath)
config.set_default_layout(layout_snmath);
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
+ TMS6100(config, m_tms6100, MASTER_CLOCK/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", CD2801, MASTER_CLOCK)
@@ -1401,7 +1401,7 @@ MACHINE_CONFIG_START(tispeak_state::snspellc)
/* no visual feedback! */
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
+ TMS6100(config, m_tms6100, MASTER_CLOCK/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", TMC0281D, MASTER_CLOCK)
@@ -1437,7 +1437,7 @@ MACHINE_CONFIG_START(tispeak_state::vocaid)
config.set_default_layout(layout_tntell);
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
+ TMS6100(config, m_tms6100, MASTER_CLOCK/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", CD2802, MASTER_CLOCK)
@@ -1468,7 +1468,7 @@ MACHINE_CONFIG_START(tispeak_state::k28m2)
config.set_default_layout(layout_k28m2);
/* sound hardware */
- MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4)
+ TMS6100(config, m_tms6100, MASTER_CLOCK/4);
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("tms5100", TMS5110A, MASTER_CLOCK)
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index 5905d4ad82d..aa41f86b7f9 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -376,11 +376,11 @@ MACHINE_CONFIG_START(tispellb_state::rev2)
MCFG_TMS1XXX_READ_K_CB(READ8(*this, tispellb_state, main_read_k))
MCFG_TMS1XXX_WRITE_O_CB(WRITE16(*this, tispellb_state, rev2_write_o))
MCFG_TMS1XXX_WRITE_R_CB(WRITE16(*this, tispellb_state, rev2_write_r))
- MCFG_TMS0270_READ_CTL_CB(READ8("tms6100", tms6100_device, data_r))
- MCFG_TMS0270_WRITE_CTL_CB(WRITE8("tms6100", tms6100_device, add_w))
+ MCFG_TMS0270_READ_CTL_CB(READ8(m_tms6100, tms6100_device, data_r))
+ MCFG_TMS0270_WRITE_CTL_CB(WRITE8(m_tms6100, tms6100_device, add_w))
- MCFG_DEVICE_ADD("tms6100", TMS6100, 350000)
- MCFG_TMS6100_4BIT_MODE()
+ TMS6100(config, m_tms6100, 350000);
+ m_tms6100->enable_4bit_mode(true);
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_spellb);
diff --git a/src/mame/includes/bfm_sc4.h b/src/mame/includes/bfm_sc4.h
index 07a4924c2be..8c8d045691d 100644
--- a/src/mame/includes/bfm_sc4.h
+++ b/src/mame/includes/bfm_sc4.h
@@ -137,12 +137,7 @@ public:
, m_maincpu(*this, "maincpu")
, m_cpuregion(*this, "maincpu")
, m_nvram(*this, "nvram")
- , m_reel1(*this, "reel1")
- , m_reel2(*this, "reel2")
- , m_reel3(*this, "reel3")
- , m_reel4(*this, "reel4")
- , m_reel5(*this, "reel5")
- , m_reel6(*this, "reel6")
+ , m_reel(*this, "reel%u", 1U)
, m_io_ports(*this, "IN-%u", 0)
{
m_chk41addr = -1;
@@ -153,25 +148,14 @@ public:
required_memory_region m_cpuregion;
// devices
required_device<nvram_device> m_nvram;
- optional_device<stepper_device> m_reel1;
- optional_device<stepper_device> m_reel2;
- optional_device<stepper_device> m_reel3;
- optional_device<stepper_device> m_reel4;
- optional_device<stepper_device> m_reel5;
- optional_device<stepper_device> m_reel6;
-
+ optional_device_array<stepper_device, 6> m_reel;
int m_reel12_latch;
int m_reel3_latch;
int m_reel4_latch;
int m_reel56_latch;
int m_optic_pattern;
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel4_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
- DECLARE_WRITE_LINE_MEMBER(reel5_optic_cb) { if (state) m_optic_pattern |= 0x10; else m_optic_pattern &= ~0x10; }
- DECLARE_WRITE_LINE_MEMBER(reel6_optic_cb) { if (state) m_optic_pattern |= 0x20; else m_optic_pattern &= ~0x20; }
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
SEC sec;
int m_meterstatus;
diff --git a/src/mame/includes/jpmimpct.h b/src/mame/includes/jpmimpct.h
index 425e0edf9e0..cbfec3351f3 100644
--- a/src/mame/includes/jpmimpct.h
+++ b/src/mame/includes/jpmimpct.h
@@ -70,12 +70,7 @@ public:
, m_upd7759(*this, "upd")
, m_palette(*this, "palette")
, m_dsp(*this, "dsp")
- , m_reel0(*this, "reel0")
- , m_reel1(*this, "reel1")
- , m_reel2(*this, "reel2")
- , m_reel3(*this, "reel3")
- , m_reel4(*this, "reel4")
- , m_reel5(*this, "reel5")
+ , m_reel(*this, "reel%u", 0U)
, m_meters(*this, "meters")
, m_digits(*this, "digit%u", 0U)
, m_lamp_output(*this, "lamp%u", 0U)
@@ -85,12 +80,7 @@ public:
void jpmimpct(machine_config &config);
private:
- DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
- DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
- DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
- DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
- DECLARE_WRITE_LINE_MEMBER(reel4_optic_cb) { if (state) m_optic_pattern |= 0x10; else m_optic_pattern &= ~0x10; }
- DECLARE_WRITE_LINE_MEMBER(reel5_optic_cb) { if (state) m_optic_pattern |= 0x20; else m_optic_pattern &= ~0x20; }
+ template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
DECLARE_READ16_MEMBER(duart_1_r);
DECLARE_WRITE16_MEMBER(duart_1_w);
DECLARE_READ16_MEMBER(duart_2_r);
@@ -154,12 +144,7 @@ private:
required_device<upd7759_device> m_upd7759;
optional_device<palette_device> m_palette;
optional_device<tms34010_device> m_dsp;
- optional_device<stepper_device> m_reel0;
- optional_device<stepper_device> m_reel1;
- optional_device<stepper_device> m_reel2;
- optional_device<stepper_device> m_reel3;
- optional_device<stepper_device> m_reel4;
- optional_device<stepper_device> m_reel5;
+ optional_device_array<stepper_device, 6> m_reel;
required_device<meters_device> m_meters;
output_finder<300> m_digits;
output_finder<256> m_lamp_output;
diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h
index 2a61486536a..0fc99573837 100644
--- a/src/mame/includes/mpu4.h
+++ b/src/mame/includes/mpu4.h
@@ -117,14 +117,7 @@ public:
, m_aux2_port(*this, "AUX2")
, m_bank1(*this, "bank1")
, m_msm6376(*this, "msm6376")
- , m_reel0(*this, "reel0")
- , m_reel1(*this, "reel1")
- , m_reel2(*this, "reel2")
- , m_reel3(*this, "reel3")
- , m_reel4(*this, "reel4")
- , m_reel5(*this, "reel5")
- , m_reel6(*this, "reel6")
- , m_reel7(*this, "reel7")
+ , m_reel(*this, "reel%u", 0U)
, m_palette(*this, "palette")
, m_meters(*this, "meters")
, m_ym2413(*this, "ym2413")
@@ -331,14 +324,7 @@ protected:
required_ioport m_aux2_port;
optional_memory_bank m_bank1;
optional_device<okim6376_device> m_msm6376;
- optional_device<stepper_device> m_reel0;
- optional_device<stepper_device> m_reel1;
- optional_device<stepper_device> m_reel2;
- optional_device<stepper_device> m_reel3;
- optional_device<stepper_device> m_reel4;
- optional_device<stepper_device> m_reel5;
- optional_device<stepper_device> m_reel6;
- optional_device<stepper_device> m_reel7;
+ optional_device_array<stepper_device, 8> m_reel;
optional_device<palette_device> m_palette;
required_device<meters_device> m_meters;
optional_device<ym2413_device> m_ym2413;
diff --git a/src/mame/machine/mpu4.cpp b/src/mame/machine/mpu4.cpp
index dda816b5ebb..418d061de36 100644
--- a/src/mame/machine/mpu4.cpp
+++ b/src/mame/machine/mpu4.cpp
@@ -384,41 +384,41 @@ void mpu4_state::update_meters()
break;
case FIVE_REEL_5TO8:
- m_reel4->update(((data >> 4) & 0x0f));
+ m_reel[4]->update(((data >> 4) & 0x0f));
data = (data & 0x0F); //Strip reel data from meter drives, leaving active elements
- awp_draw_reel(machine(),"reel5", *m_reel4);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
break;
case FIVE_REEL_8TO5:
- m_reel4->update((((data & 0x01) + ((data & 0x08) >> 2) + ((data & 0x20) >> 3) + ((data & 0x80) >> 4)) & 0x0f)) ;
+ m_reel[4]->update((((data & 0x01) + ((data & 0x08) >> 2) + ((data & 0x20) >> 3) + ((data & 0x80) >> 4)) & 0x0f)) ;
data = 0x00; //Strip all reel data from meter drives, nothing is connected
- awp_draw_reel(machine(),"reel5", *m_reel4);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
break;
case FIVE_REEL_3TO6:
- m_reel4->update(((data >> 2) & 0x0f));
+ m_reel[4]->update(((data >> 2) & 0x0f));
data = 0x00; //Strip all reel data from meter drives
- awp_draw_reel(machine(),"reel5", *m_reel4);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
break;
case SIX_REEL_1TO8:
- m_reel4->update( data & 0x0f);
- m_reel5->update((data >> 4) & 0x0f);
+ m_reel[4]->update( data & 0x0f);
+ m_reel[5]->update((data >> 4) & 0x0f);
data = 0x00; //Strip all reel data from meter drives
- awp_draw_reel(machine(),"reel5", *m_reel4);
- awp_draw_reel(machine(),"reel6", *m_reel5);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
+ awp_draw_reel(machine(),"reel6", *m_reel[5]);
break;
case SIX_REEL_5TO8:
- m_reel4->update(((data >> 4) & 0x0f));
+ m_reel[4]->update(((data >> 4) & 0x0f));
data = 0x00; //Strip all reel data from meter drives
- awp_draw_reel(machine(),"reel5", *m_reel4);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
break;
case SEVEN_REEL:
- m_reel0->update((((data & 0x01) + ((data & 0x08) >> 2) + ((data & 0x20) >> 3) + ((data & 0x80) >> 4)) & 0x0f)) ;
+ m_reel[0]->update((((data & 0x01) + ((data & 0x08) >> 2) + ((data & 0x20) >> 3) + ((data & 0x80) >> 4)) & 0x0f)) ;
data = 0x00; //Strip all reel data from meter drives
- awp_draw_reel(machine(),"reel1", *m_reel0);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
break;
case FLUTTERBOX: //The backbox fan assembly fits in a reel unit sized box, wired to the remote meter pin, so we can handle it here
@@ -914,18 +914,18 @@ WRITE8_MEMBER(mpu4_state::pia_ic5_porta_w)
}
if (m_reel_mux == SIX_REEL_5TO8)
{
- m_reel4->update( data &0x0F);
- m_reel5->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel5", *m_reel4);
- awp_draw_reel(machine(),"reel6", *m_reel5);
+ m_reel[4]->update( data &0x0F);
+ m_reel[5]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
+ awp_draw_reel(machine(),"reel6", *m_reel[5]);
}
else
if (m_reel_mux == SEVEN_REEL)
{
- m_reel1->update( data &0x0F);
- m_reel2->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel2", *m_reel1);
- awp_draw_reel(machine(),"reel3", *m_reel2);
+ m_reel[1]->update( data &0x0F);
+ m_reel[2]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
}
if (core_stricmp(machine().system().name, "m4gambal") == 0)
@@ -1146,17 +1146,17 @@ WRITE8_MEMBER(mpu4_state::pia_ic6_portb_w)
if (m_reel_mux == SEVEN_REEL)
{
- m_reel3->update( data &0x0F);
- m_reel4->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel4", *m_reel3);
- awp_draw_reel(machine(),"reel5", *m_reel4);
+ m_reel[3]->update( data &0x0F);
+ m_reel[4]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel4", *m_reel[3]);
+ awp_draw_reel(machine(),"reel5", *m_reel[4]);
}
else if (m_reels)
{
- m_reel0->update( data &0x0F);
- m_reel1->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel1", *m_reel0);
- awp_draw_reel(machine(),"reel2", *m_reel1);
+ m_reel[0]->update( data &0x0F);
+ m_reel[1]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel1", *m_reel[0]);
+ awp_draw_reel(machine(),"reel2", *m_reel[1]);
}
}
@@ -1202,17 +1202,17 @@ WRITE8_MEMBER(mpu4_state::pia_ic7_porta_w)
LOG(("%s: IC7 PIA Port A Set to %2x (Reel C and D)\n", machine().describe_context(),data));
if (m_reel_mux == SEVEN_REEL)
{
- m_reel5->update( data &0x0F);
- m_reel6->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel6", *m_reel5);
- awp_draw_reel(machine(),"reel7", *m_reel7);
+ m_reel[5]->update( data &0x0F);
+ m_reel[6]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel6", *m_reel[5]);
+ awp_draw_reel(machine(),"reel7", *m_reel[7]);
}
else if (m_reels)
{
- m_reel2->update( data &0x0F);
- m_reel3->update((data >> 4)&0x0F);
- awp_draw_reel(machine(),"reel3", *m_reel2);
- awp_draw_reel(machine(),"reel4", *m_reel3);
+ m_reel[2]->update( data &0x0F);
+ m_reel[3]->update((data >> 4)&0x0F);
+ awp_draw_reel(machine(),"reel3", *m_reel[2]);
+ awp_draw_reel(machine(),"reel4", *m_reel[3]);
}
}
@@ -2620,341 +2620,366 @@ void mpu4_state::mpu4_memmap(address_map &map)
map(0x1000, 0xffff).bankr("bank1"); /* 64k paged ROM (4 pages) */
}
-MACHINE_CONFIG_START(mpu4_state::mpu4_std_3reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type2_3reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type3_3reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type4_3reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_bwb_3reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_std_4reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type2_4reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type3_4reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type4_4reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_bwb_4reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_std_5reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type2_5reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type3_5reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type4_5reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_bwb_5reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_std_6reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mpu4_state::mpu4_type2_6reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_std_3reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_type3_6reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type2_3reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_type4_6reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type3_3reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_bwb_6reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type4_3reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+}
+void mpu4_state::mpu4_bwb_3reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_std_7reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
- MCFG_DEVICE_ADD("reel6", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<6>))
- MCFG_DEVICE_ADD("reel7", REEL, BARCREST_48STEP_REEL, 1, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<7>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_std_4reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_type2_7reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
- MCFG_DEVICE_ADD("reel6", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<6>))
- MCFG_DEVICE_ADD("reel7", REEL, BARCREST_48STEP_REEL, 4, 12, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<7>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type2_4reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_type3_7reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
- MCFG_DEVICE_ADD("reel6", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<6>))
- MCFG_DEVICE_ADD("reel7", REEL, BARCREST_48STEP_REEL, 92, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<7>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type3_4reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_type4_7reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
- MCFG_DEVICE_ADD("reel6", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<6>))
- MCFG_DEVICE_ADD("reel7", REEL, BARCREST_48STEP_REEL, 93, 2, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<7>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_type4_4reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+}
-MACHINE_CONFIG_START(mpu4_state::mpu4_bwb_7reel)
- MCFG_DEVICE_ADD("reel0", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<0>))
- MCFG_DEVICE_ADD("reel1", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<1>))
- MCFG_DEVICE_ADD("reel2", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<2>))
- MCFG_DEVICE_ADD("reel3", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<3>))
- MCFG_DEVICE_ADD("reel4", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<4>))
- MCFG_DEVICE_ADD("reel5", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<5>))
- MCFG_DEVICE_ADD("reel6", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<6>))
- MCFG_DEVICE_ADD("reel7", REEL, BARCREST_48STEP_REEL, 96, 3, 0x00, 2)
- MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, mpu4_state, reel_optic_cb<7>))
-MACHINE_CONFIG_END
+void mpu4_state::mpu4_bwb_4reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+}
+
+void mpu4_state::mpu4_std_5reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_type2_5reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_type3_5reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_type4_5reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_bwb_5reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_std_6reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+}
+
+void mpu4_state::mpu4_type2_6reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+}
+
+void mpu4_state::mpu4_type3_6reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+}
+
+void mpu4_state::mpu4_type4_6reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+}
+
+void mpu4_state::mpu4_bwb_6reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+}
+
+
+void mpu4_state::mpu4_std_7reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+ REEL(config, m_reel[6], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[6]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<6>));
+ REEL(config, m_reel[7], BARCREST_48STEP_REEL, 1, 3, 0x00, 2);
+ m_reel[7]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<7>));
+}
+
+void mpu4_state::mpu4_type2_7reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+ REEL(config, m_reel[6], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[6]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<6>));
+ REEL(config, m_reel[7], BARCREST_48STEP_REEL, 4, 12, 0x00, 2);
+ m_reel[7]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<7>));
+}
+
+void mpu4_state::mpu4_type3_7reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+ REEL(config, m_reel[6], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[6]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<6>));
+ REEL(config, m_reel[7], BARCREST_48STEP_REEL, 92, 3, 0x00, 2);
+ m_reel[7]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<7>));
+}
+
+void mpu4_state::mpu4_type4_7reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+ REEL(config, m_reel[6], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[6]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<6>));
+ REEL(config, m_reel[7], BARCREST_48STEP_REEL, 93, 2, 0x00, 2);
+ m_reel[7]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<7>));
+}
+
+void mpu4_state::mpu4_bwb_7reel(machine_config &config)
+{
+ REEL(config, m_reel[0], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[0]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<0>));
+ REEL(config, m_reel[1], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[1]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<1>));
+ REEL(config, m_reel[2], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[2]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<2>));
+ REEL(config, m_reel[3], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[3]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<3>));
+ REEL(config, m_reel[4], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[4]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<4>));
+ REEL(config, m_reel[5], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[5]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<5>));
+ REEL(config, m_reel[6], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[6]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<6>));
+ REEL(config, m_reel[7], BARCREST_48STEP_REEL, 96, 3, 0x00, 2);
+ m_reel[7]->optic_handler().set(FUNC(mpu4_state::reel_optic_cb<7>));
+}
MACHINE_CONFIG_START(mpu4_state::mpu4_common)
MCFG_TIMER_DRIVER_ADD_PERIODIC("50hz", mpu4_state, gen_50hz, attotime::from_hz(100))
diff --git a/src/mame/video/bfm_dm01.h b/src/mame/video/bfm_dm01.h
index 93205a92a7a..2435b1f5c50 100644
--- a/src/mame/video/bfm_dm01.h
+++ b/src/mame/video/bfm_dm01.h
@@ -13,16 +13,13 @@
#include "emupal.h"
#include "screen.h"
-#define MCFG_BFM_DM01_BUSY_CB(_devcb) \
- downcast<bfm_dm01_device &>(*device).set_busy_callback(DEVCB_##_devcb);
-
class bfm_dm01_device : public device_t
{
public:
bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~bfm_dm01_device() {}
- template <class Object> devcb_base &set_busy_callback(Object &&cb) { return m_busy_cb.set_callback(std::forward<Object>(cb)); }
+ auto busy_callback() { return m_busy_cb.bind(); }
DECLARE_READ8_MEMBER( control_r );
DECLARE_WRITE8_MEMBER( control_w );