summaryrefslogtreecommitdiffstats
path: root/src/devices/sound/tms5110.h
diff options
context:
space:
mode:
authorGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-17 20:22:48 +0100
committerGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-17 20:27:50 +0100
commitd7f75c954fe1bc30007ca7bef063db481e03d8af (patch)
tree4a50795f5c7a7178993864b518c1dd00d549e5be /src/devices/sound/tms5110.h
parentb8aff36f3cb48c753f4bf21399665d2c6a4efba5 (diff)
-bus/a2bus/a2echoii, a800/a800_slot, a8sio: Removed MCFG macros. [Ryan Holtz]
-sound/pokey, sn76477, tms36xx, tms5110, tms5220: Removed MCFG macros. [Ryan Holtz] -audio/astrof, bwidow, bzone, dkong, jedi, mw8080bw, n8080, scramble, segag80r, snk6502, zaccaria: Removed MACHINE_CONFIG macros. [Ryan Holtz] -drivers/asteroid, atari400, atarisy2, bagman, bartop52, bzone, ccastles, centiped, cloak, cloud9, dai3wksi, exelv, foodf, gp_1, hh_tms1k, irobot, liberatr, looping, malzak, maxaflex, mhavoc, missile, mrgame, naughtyb, quantum, rotaryf, route16, runaway, scyclone, spaceg, spectra, tempest, tispeak, toratora, tunhunt: Removed MACHINE_CONFIG macros. [Ryan Holtz]
Diffstat (limited to 'src/devices/sound/tms5110.h')
-rw-r--r--src/devices/sound/tms5110.h58
1 files changed, 2 insertions, 56 deletions
diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h
index 4857326b697..12f279155eb 100644
--- a/src/devices/sound/tms5110.h
+++ b/src/devices/sound/tms5110.h
@@ -13,22 +13,6 @@
/* usually 640000 for 8000 Hz sample rate or */
/* usually 800000 for 10000 Hz sample rate. */
-#define MCFG_TMS5110_M0_CB(_devcb) \
- downcast<tms5110_device &>(*device).set_m0_callback(DEVCB_##_devcb);
-
-#define MCFG_TMS5110_M1_CB(_devcb) \
- downcast<tms5110_device &>(*device).set_m1_callback(DEVCB_##_devcb);
-
-#define MCFG_TMS5110_ADDR_CB(_devcb) \
- downcast<tms5110_device &>(*device).set_addr_callback(DEVCB_##_devcb);
-
-#define MCFG_TMS5110_DATA_CB(_devcb) \
- downcast<tms5110_device &>(*device).set_data_callback(DEVCB_##_devcb);
-
-#define MCFG_TMS5110_ROMCLK_CB(_devcb) \
- downcast<tms5110_device &>(*device).set_romclk_callback(DEVCB_##_devcb);
-
-
class tms5110_device : public device_t, public device_sound_interface
{
public:
@@ -51,11 +35,6 @@ public:
tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_m0_callback(Object &&cb) { return m_m0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_m1_callback(Object &&cb) { return m_m1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_addr_callback(Object &&cb) { return m_addr_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data_callback(Object &&cb) { return m_data_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_romclk_callback(Object &&cb) { return m_romclk_cb.set_callback(std::forward<Object>(cb)); }
auto m0() { return m_m0_cb.bind(); }
auto m1() { return m_m1_cb.bind(); }
auto addr() { return m_addr_cb.bind(); }
@@ -291,8 +270,8 @@ public:
void set_ctl8_bit(uint8_t ctl8_bit) { m_ctl8_bit = ctl8_bit; }
void set_reset_bit(uint8_t reset_bit) { m_reset_bit = reset_bit; }
void set_stop_bit(uint8_t stop_bit) { m_stop_bit = stop_bit; }
- template<class Object> devcb_base &set_pdc_callback(Object object) { return m_pdc_cb.set_callback(std::forward<Object>(object)); }
- template<class Object> devcb_base &set_ctl_callback(Object object) { return m_ctl_cb.set_callback(std::forward<Object>(object)); }
+ auto pdc() { return m_pdc_cb.bind(); }
+ auto ctl() { return m_ctl_cb.bind(); }
DECLARE_WRITE_LINE_MEMBER( m0_w );
DECLARE_READ_LINE_MEMBER( data_r );
@@ -342,37 +321,4 @@ private:
DECLARE_DEVICE_TYPE(TMSPROM, tmsprom_device)
-#define MCFG_TMSPROM_REGION(_region) \
- downcast<tmsprom_device &>(*device).set_region(_region);
-
-#define MCFG_TMSPROM_ROM_SIZE(_size) \
- downcast<tmsprom_device &>(*device).set_rom_size(_size);
-
-#define MCFG_TMSPROM_PDC_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_pdc_bit(_bit);
-
-#define MCFG_TMSPROM_CTL1_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_ctl1_bit(_bit);
-
-#define MCFG_TMSPROM_CTL2_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_ctl2_bit(_bit);
-
-#define MCFG_TMSPROM_CTL4_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_ctl4_bit(_bit);
-
-#define MCFG_TMSPROM_CTL8_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_ctl8_bit(_bit);
-
-#define MCFG_TMSPROM_RESET_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_reset_bit(_bit);
-
-#define MCFG_TMSPROM_STOP_BIT(_bit) \
- downcast<tmsprom_device &>(*device).set_stop_bit(_bit);
-
-#define MCFG_TMSPROM_PDC_CB(_devcb) \
- downcast<tmsprom_device &>(*device).set_pdc_callback(DEVCB_##_devcb);
-
-#define MCFG_TMSPROM_CTL_CB(_devcb) \
- downcast<tmsprom_device &>(*device).set_ctl_callback(DEVCB_##_devcb);
-
#endif // MAME_SOUND_TMS5110_H