summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2019-01-10 18:59:34 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2019-01-10 18:59:34 +0100
commit180ae17f5deea20bd3e816882c2f41e5dcfb4a36 (patch)
tree67c3d981bd5e2fb8506e604fee86dfaf7f75b685
parent952a17fc12fba54f54994cbd6485bdb91dd2de83 (diff)
src/devices: more MCFG macros removal (nw)
-rw-r--r--src/devices/bus/cbm2/hrg.cpp24
-rw-r--r--src/devices/bus/cbm2/hrg.h3
-rw-r--r--src/devices/bus/isa/ega.cpp20
-rw-r--r--src/devices/bus/isa/ega.h2
-rw-r--r--src/devices/bus/isa/pc1640_iga.cpp4
-rw-r--r--src/devices/bus/pet/hsg.cpp24
-rw-r--r--src/devices/bus/pet/hsg.h3
-rw-r--r--src/devices/machine/7474.h15
-rw-r--r--src/devices/machine/8364_paula.h14
-rw-r--r--src/devices/machine/aicartc.h7
-rw-r--r--src/devices/machine/nmc9306.h11
-rw-r--r--src/devices/video/315_5124.h53
-rw-r--r--src/devices/video/315_5313.h49
-rw-r--r--src/devices/video/cesblit.h24
-rw-r--r--src/devices/video/crt9021.h6
-rw-r--r--src/devices/video/crtc_ega.h42
-rw-r--r--src/devices/video/dl1416.h12
-rw-r--r--src/devices/video/dm9368.h15
-rw-r--r--src/devices/video/ef9340_1.h12
-rw-r--r--src/devices/video/ef9345.h2
-rw-r--r--src/devices/video/ef9364.h8
-rw-r--r--src/devices/video/ef9365.h13
-rw-r--r--src/devices/video/epic12.h6
-rw-r--r--src/devices/video/gba_lcd.h33
-rw-r--r--src/devices/video/hd44102.h8
-rw-r--r--src/devices/video/hd44780.h12
-rw-r--r--src/devices/video/hd61830.h13
-rw-r--r--src/devices/video/hd63484.h24
-rw-r--r--src/devices/video/huc6202.h61
-rw-r--r--src/devices/video/huc6260.h17
-rw-r--r--src/devices/video/huc6261.h10
-rw-r--r--src/devices/video/huc6270.h7
-rw-r--r--src/devices/video/huc6272.h13
-rw-r--r--src/devices/video/m50458.h17
-rw-r--r--src/devices/video/nt7534.h5
-rw-r--r--src/devices/video/pcd8544.h8
-rw-r--r--src/devices/video/sda5708.h7
-rw-r--r--src/mame/drivers/abc1600.cpp2
-rw-r--r--src/mame/drivers/adp.cpp11
-rw-r--r--src/mame/drivers/aim65.cpp20
-rw-r--r--src/mame/drivers/alesis.cpp9
-rw-r--r--src/mame/drivers/alphasma.cpp8
-rw-r--r--src/mame/drivers/aquarius.cpp2
-rw-r--r--src/mame/drivers/calcune.cpp42
-rw-r--r--src/mame/drivers/cc40.cpp6
-rw-r--r--src/mame/drivers/cmi.cpp12
-rw-r--r--src/mame/drivers/cosmicos.cpp2
-rw-r--r--src/mame/drivers/cz101.cpp6
-rw-r--r--src/mame/drivers/dbox.cpp2
-rw-r--r--src/mame/drivers/didact.cpp40
-rw-r--r--src/mame/drivers/elf.cpp6
-rw-r--r--src/mame/drivers/fb01.cpp6
-rw-r--r--src/mame/drivers/galgames.cpp8
-rw-r--r--src/mame/drivers/gba.cpp12
-rw-r--r--src/mame/drivers/ggconnie.cpp51
-rw-r--r--src/mame/drivers/hprot1.cpp6
-rw-r--r--src/mame/drivers/hunter2.cpp4
-rw-r--r--src/mame/drivers/icatel.cpp6
-rw-r--r--src/mame/drivers/kyocera.cpp38
-rw-r--r--src/mame/drivers/lcmate2.cpp4
-rw-r--r--src/mame/drivers/magnum.cpp14
-rw-r--r--src/mame/drivers/mc10.cpp4
-rw-r--r--src/mame/drivers/megadriv.cpp39
-rw-r--r--src/mame/drivers/megaplay.cpp8
-rw-r--r--src/mame/drivers/megatech.cpp11
-rw-r--r--src/mame/drivers/micronic.cpp2
-rw-r--r--src/mame/drivers/nbmj8688.cpp8
-rw-r--r--src/mame/drivers/nokia_3310.cpp4
-rw-r--r--src/mame/drivers/novag6502.cpp6
-rw-r--r--src/mame/drivers/novag68k.cpp6
-rw-r--r--src/mame/drivers/nss.cpp2
-rw-r--r--src/mame/drivers/odyssey2.cpp4
-rw-r--r--src/mame/drivers/paranoia.cpp17
-rw-r--r--src/mame/drivers/pce.cpp67
-rw-r--r--src/mame/drivers/pcfx.cpp28
-rw-r--r--src/mame/drivers/pofo.cpp8
-rw-r--r--src/mame/drivers/psion.cpp14
-rw-r--r--src/mame/drivers/segae.cpp16
-rw-r--r--src/mame/drivers/shanghai.cpp9
-rw-r--r--src/mame/drivers/sigmab52.cpp2
-rw-r--r--src/mame/drivers/sms.cpp96
-rw-r--r--src/mame/drivers/sms_bootleg.cpp10
-rw-r--r--src/mame/drivers/squale.cpp8
-rw-r--r--src/mame/drivers/testconsole.cpp29
-rw-r--r--src/mame/drivers/ti74.cpp12
-rw-r--r--src/mame/drivers/tmaster.cpp6
-rw-r--r--src/mame/drivers/tourvis.cpp17
-rw-r--r--src/mame/drivers/uapce.cpp17
-rw-r--r--src/mame/drivers/vg5k.cpp4
-rw-r--r--src/mame/drivers/wildpkr.cpp4
-rw-r--r--src/mame/includes/kyocera.h32
-rw-r--r--src/mame/machine/megadriv.cpp32
-rw-r--r--src/mame/machine/mmboard.cpp4
-rw-r--r--src/mame/video/kyocera.cpp38
94 files changed, 512 insertions, 973 deletions
diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp
index 4956b0a708b..1d0e4fc6191 100644
--- a/src/devices/bus/cbm2/hrg.cpp
+++ b/src/devices/bus/cbm2/hrg.cpp
@@ -96,12 +96,12 @@ MACHINE_CONFIG_START(cbm2_hrg_a_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(25)
PALETTE(config, "palette", palette_device::MONOCHROME);
- MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(0, hrg_a_map)
- MCFG_EF936X_PALETTE("palette")
- MCFG_EF936X_BITPLANES_CNT(1);
- MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
+ EF9365(config, m_gdc, 1750000);
+ m_gdc->set_screen(SCREEN_TAG);
+ m_gdc->set_addrmap(0, &cbm2_hrg_a_device::hrg_a_map);
+ m_gdc->set_palette_tag("palette");
+ m_gdc->set_nb_bitplanes(1);
+ m_gdc->set_display_mode(ef9365_device::DISPLAY_MODE_512x512);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(cbm2_hrg_b_device::device_add_mconfig)
@@ -112,12 +112,12 @@ MACHINE_CONFIG_START(cbm2_hrg_b_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(50)
PALETTE(config, "palette", palette_device::MONOCHROME);
- MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(0, hrg_b_map)
- MCFG_EF936X_PALETTE("palette")
- MCFG_EF936X_BITPLANES_CNT(1);
- MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
+ EF9365(config, m_gdc, 1750000); //EF9366
+ m_gdc->set_screen(SCREEN_TAG);
+ m_gdc->set_addrmap(0, &cbm2_hrg_b_device::hrg_b_map);
+ m_gdc->set_palette_tag("palette");
+ m_gdc->set_nb_bitplanes(1);
+ m_gdc->set_display_mode(ef9365_device::DISPLAY_MODE_512x256);
MACHINE_CONFIG_END
diff --git a/src/devices/bus/cbm2/hrg.h b/src/devices/bus/cbm2/hrg.h
index ccd16dc1b05..b7ae9273dcf 100644
--- a/src/devices/bus/cbm2/hrg.h
+++ b/src/devices/bus/cbm2/hrg.h
@@ -41,8 +41,9 @@ protected:
virtual uint8_t cbm2_bd_r(address_space &space, offs_t offset, uint8_t data, int csbank1, int csbank2, int csbank3) override;
virtual void cbm2_bd_w(address_space &space, offs_t offset, uint8_t data, int csbank1, int csbank2, int csbank3) override;
-private:
required_device<ef9365_device> m_gdc;
+
+private:
required_memory_region m_bank3;
};
diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp
index 01c73066088..4bc1983b12e 100644
--- a/src/devices/bus/isa/ega.cpp
+++ b/src/devices/bus/isa/ega.cpp
@@ -536,14 +536,14 @@ MACHINE_CONFIG_START(isa8_ega_device::device_add_mconfig)
MCFG_PALETTE_ADD( "palette", 64 )
- MCFG_DEVICE_ADD(EGA_CRTC_NAME, CRTC_EGA, 16257000/8)
- MCFG_CRTC_EGA_SET_SCREEN(EGA_SCREEN_NAME)
- MCFG_CRTC_EGA_HPIXELS_PER_COLUMN(8)
- MCFG_CRTC_EGA_ROW_UPDATE_CB(isa8_ega_device, ega_update_row)
- MCFG_CRTC_EGA_RES_OUT_DE_CB(WRITELINE(*this, isa8_ega_device, de_changed))
- MCFG_CRTC_EGA_RES_OUT_HSYNC_CB(WRITELINE(*this, isa8_ega_device, hsync_changed))
- MCFG_CRTC_EGA_RES_OUT_VSYNC_CB(WRITELINE(*this, isa8_ega_device, vsync_changed))
- MCFG_CRTC_EGA_RES_OUT_VBLANK_CB(WRITELINE(*this, isa8_ega_device, vblank_changed))
+ CRTC_EGA(config, m_crtc_ega, 16257000/8);
+ m_crtc_ega->set_screen(EGA_SCREEN_NAME);
+ m_crtc_ega->config_set_hpixels_per_column(8);
+ m_crtc_ega->set_row_update_callback(FUNC(isa8_ega_device::ega_update_row), this);
+ m_crtc_ega->res_out_de_callback().set(FUNC(isa8_ega_device::de_changed));
+ m_crtc_ega->res_out_hsync_callback().set(FUNC(isa8_ega_device::hsync_changed));
+ m_crtc_ega->res_out_vsync_callback().set(FUNC(isa8_ega_device::vsync_changed));
+ m_crtc_ega->res_out_vblank_callback().set(FUNC(isa8_ega_device::vblank_changed));
MACHINE_CONFIG_END
//-------------------------------------------------
@@ -576,7 +576,7 @@ isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag,
isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
device_isa8_card_interface(mconfig, *this),
- m_crtc_ega(nullptr), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr),
+ m_crtc_ega(*this, EGA_CRTC_NAME), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr),
m_misc_output(0), m_feature_control(0), m_frame_cnt(0), m_hsync(0), m_vsync(0), m_vblank(0), m_display_enable(0), m_video_mode(0),
m_palette(*this, "palette")
{
@@ -626,8 +626,6 @@ void isa8_ega_device::device_start()
m_plane[2] = m_videoram + 0x20000;
m_plane[3] = m_videoram + 0x30000;
- m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME);
-
m_isa->install_rom(this, 0xc0000, 0xc3fff, "ega", "user2");
m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this));
m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this));
diff --git a/src/devices/bus/isa/ega.h b/src/devices/bus/isa/ega.h
index 4e7bc4394a3..4334604b9a8 100644
--- a/src/devices/bus/isa/ega.h
+++ b/src/devices/bus/isa/ega.h
@@ -58,7 +58,7 @@ private:
CRTC_EGA_ROW_UPDATE(ega_update_row);
public:
- crtc_ega_device *m_crtc_ega;
+ required_device<crtc_ega_device> m_crtc_ega;
void install_banks();
void change_mode();
diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp
index 04ef54c2d42..dfab59f2e76 100644
--- a/src/devices/bus/isa/pc1640_iga.cpp
+++ b/src/devices/bus/isa/pc1640_iga.cpp
@@ -28,8 +28,6 @@
//**************************************************************************
#define PEGA1A_TAG "ic910"
-#define EGA_CRTC_NAME "crtc_ega_ega"
-
//**************************************************************************
@@ -103,8 +101,6 @@ void isa8_pc1640_iga_device::device_start()
m_plane[2] = m_videoram + 0x20000;
m_plane[3] = m_videoram + 0x30000;
- m_crtc_ega = subdevice<crtc_ega_device>(EGA_CRTC_NAME);
-
m_isa->install_rom(this, 0xc0000, 0xc7fff, "ega", "iga");
m_isa->install_device(0x3b0, 0x3bf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3b0_w), this));
m_isa->install_device(0x3c0, 0x3cf, read8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_r), this), write8_delegate(FUNC(isa8_ega_device::pc_ega8_3c0_w), this));
diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp
index 5288b632174..fe51ba28bd9 100644
--- a/src/devices/bus/pet/hsg.cpp
+++ b/src/devices/bus/pet/hsg.cpp
@@ -99,12 +99,12 @@ MACHINE_CONFIG_START(cbm8000_hsg_a_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(25)
PALETTE(config, "palette", palette_device::MONOCHROME);
- MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(0, hsg_a_map)
- MCFG_EF936X_PALETTE("palette")
- MCFG_EF936X_BITPLANES_CNT(1);
- MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
+ EF9365(config, m_gdc, 1750000);
+ m_gdc->set_screen(SCREEN_TAG);
+ m_gdc->set_addrmap(0, &cbm8000_hsg_a_device::hsg_a_map);
+ m_gdc->set_palette_tag("palette");
+ m_gdc->set_nb_bitplanes(1);
+ m_gdc->set_display_mode(ef9365_device::DISPLAY_MODE_512x512);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(cbm8000_hsg_b_device::device_add_mconfig)
@@ -115,12 +115,12 @@ MACHINE_CONFIG_START(cbm8000_hsg_b_device::device_add_mconfig)
MCFG_SCREEN_REFRESH_RATE(50)
PALETTE(config, "palette", palette_device::MONOCHROME);
- MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(0, hsg_b_map)
- MCFG_EF936X_PALETTE("palette")
- MCFG_EF936X_BITPLANES_CNT(1);
- MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
+ EF9365(config, m_gdc, 1750000); //EF9366
+ m_gdc->set_screen(SCREEN_TAG);
+ m_gdc->set_addrmap(0, &cbm8000_hsg_b_device::hsg_b_map);
+ m_gdc->set_palette_tag("palette");
+ m_gdc->set_nb_bitplanes(1);
+ m_gdc->set_display_mode(ef9365_device::DISPLAY_MODE_512x256);
MACHINE_CONFIG_END
diff --git a/src/devices/bus/pet/hsg.h b/src/devices/bus/pet/hsg.h
index 44abebbf9ef..406fe27ce57 100644
--- a/src/devices/bus/pet/hsg.h
+++ b/src/devices/bus/pet/hsg.h
@@ -40,8 +40,9 @@ protected:
virtual uint8_t pet_bd_r(address_space &space, offs_t offset, uint8_t data, int &sel) override;
virtual void pet_bd_w(address_space &space, offs_t offset, uint8_t data, int &sel) override;
-private:
required_device<ef9365_device> m_gdc;
+
+private:
required_memory_region m_9000;
required_memory_region m_a000;
};
diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h
index 0a6a678ddfb..0f9d87fa5bf 100644
--- a/src/devices/machine/7474.h
+++ b/src/devices/machine/7474.h
@@ -45,19 +45,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_7474_OUTPUT_CB(_devcb) \
- downcast<ttl7474_device &>(*device).set_output_cb(DEVCB_##_devcb);
-
-#define MCFG_7474_COMP_OUTPUT_CB(_devcb) \
- downcast<ttl7474_device &>(*device).set_comp_output_cb(DEVCB_##_devcb);
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -71,8 +58,6 @@ public:
ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// static configuration helpers
- template <class Object> devcb_base &set_output_cb(Object &&cb) { return m_output_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_comp_output_cb(Object &&cb) { return m_comp_output_func.set_callback(std::forward<Object>(cb)); }
auto output_cb() { return m_output_func.bind(); }
auto comp_output_cb() { return m_comp_output_func.bind(); }
diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h
index c889a831b67..412fe7679e6 100644
--- a/src/devices/machine/8364_paula.h
+++ b/src/devices/machine/8364_paula.h
@@ -43,18 +43,6 @@
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_PAULA_MEM_READ_CB(_devcb) \
- downcast<paula_8364_device &>(*device).set_mem_r_callback(DEVCB_##_devcb);
-
-#define MCFG_PAULA_INT_CB(_devcb) \
- downcast<paula_8364_device &>(*device).set_int_w_callback(DEVCB_##_devcb);
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -67,8 +55,6 @@ public:
paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- template <class Object> devcb_base &set_mem_r_callback(Object &&cb) { return m_mem_r.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_int_w_callback(Object &&cb) { return m_int_w.set_callback(std::forward<Object>(cb)); }
auto mem_read_cb() { return m_mem_r.bind(); }
auto int_cb() { return m_int_w.bind(); }
diff --git a/src/devices/machine/aicartc.h b/src/devices/machine/aicartc.h
index 757c0a58c1d..71c8cdd55ad 100644
--- a/src/devices/machine/aicartc.h
+++ b/src/devices/machine/aicartc.h
@@ -9,13 +9,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_AICARTC_ADD(_tag,_freq) \
- MCFG_DEVICE_ADD(_tag, AICARTC, _freq)
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/machine/nmc9306.h b/src/devices/machine/nmc9306.h
index 097742685aa..07aa6b36db0 100644
--- a/src/devices/machine/nmc9306.h
+++ b/src/devices/machine/nmc9306.h
@@ -19,17 +19,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_NMC9306_ADD(tag) \
- MCFG_DEVICE_ADD((tag), NMC9306, 0)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h
index 3ff7b5165a1..29fadde2a82 100644
--- a/src/devices/video/315_5124.h
+++ b/src/devices/video/315_5124.h
@@ -55,9 +55,6 @@ public:
void set_is_pal(bool is_pal) { m_is_pal = is_pal; }
- template <class Object> devcb_base &set_int_callback(Object &&cb) { return m_int_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_csync_callback(Object &&cb) { return m_csync_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_pause_callback(Object &&cb) { return m_pause_cb.set_callback(std::forward<Object>(cb)); }
auto irq() { return m_int_cb.bind(); }
auto csync() { return m_csync_cb.bind(); }
auto pause() { return m_pause_cb.bind(); }
@@ -254,54 +251,4 @@ protected:
virtual void draw_leftmost_pixels_mode4(int *line_buffer, int *priority_selected, int fine_x_scroll, int palette_selected, int tile_line) override;
};
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_SEGA315_5124_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
-#define MCFG_SEGA315_5124_IS_PAL(_bool) \
- downcast<sega315_5124_device &>(*device).set_is_pal(_bool);
-
-#define MCFG_SEGA315_5124_INT_CB(_devcb) \
- downcast<sega315_5124_device &>(*device).set_int_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5124_CSYNC_CB(_devcb) \
- downcast<sega315_5124_device &>(*device).set_csync_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5124_PAUSE_CB(_devcb) \
- downcast<sega315_5124_device &>(*device).set_pause_callback(DEVCB_##_devcb);
-
-
-#define MCFG_SEGA315_5246_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
-#define MCFG_SEGA315_5246_IS_PAL(_bool) \
- downcast<sega315_5246_device &>(*device).set_is_pal(_bool);
-
-#define MCFG_SEGA315_5246_INT_CB(_devcb) \
- downcast<sega315_5246_device &>(*device).set_int_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5246_CSYNC_CB(_devcb) \
- downcast<sega315_5246_device &>(*device).set_csync_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5246_PAUSE_CB(_devcb) \
- downcast<sega315_5246_device &>(*device).set_pause_callback(DEVCB_##_devcb);
-
-
-#define MCFG_SEGA315_5377_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
-#define MCFG_SEGA315_5377_IS_PAL(_bool) \
- downcast<sega315_5377_device &>(*device).set_is_pal(_bool);
-
-#define MCFG_SEGA315_5377_INT_CB(_devcb) \
- downcast<sega315_5377_device &>(*device).set_int_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5377_CSYNC_CB(_devcb) \
- downcast<sega315_5377_device &>(*device).set_csync_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5377_PAUSE_CB(_devcb) \
- downcast<sega315_5377_device &>(*device).set_pause_callback(DEVCB_##_devcb);
-
-
#endif // MAME_VIDEO_315_5124_H
diff --git a/src/devices/video/315_5313.h b/src/devices/video/315_5313.h
index f2aae550f8b..95e88b2c88f 100644
--- a/src/devices/video/315_5313.h
+++ b/src/devices/video/315_5313.h
@@ -12,45 +12,6 @@
#include "sound/sn76496.h"
-#define MCFG_SEGA315_5313_IS_PAL(_bool) \
- downcast<sega315_5313_device &>(*device).set_is_pal(_bool);
-
-#define MCFG_SEGA315_5313_INT_CB(_devcb) \
- downcast<sega315_5313_device &>(*device).set_int_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5313_PAUSE_CB(_devcb) \
- downcast<sega315_5313_device &>(*device).set_pause_callback(DEVCB_##_devcb);
-
-#define MCFG_SEGA315_5313_SND_IRQ_CALLBACK(_write) \
- downcast<sega315_5313_device &>(*device).set_sndirqline_callback(DEVCB_##_write);
-
-#define MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(_write) \
- downcast<sega315_5313_device &>(*device).set_lv6irqline_callback(DEVCB_##_write);
-
-#define MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(_write) \
- downcast<sega315_5313_device &>(*device).set_lv4irqline_callback(DEVCB_##_write);
-
-#define MCFG_SEGA315_5313_ALT_TIMING(_data) \
- downcast<sega315_5313_device &>(*device).set_alt_timing(_data);
-
-#define MCFG_SEGA315_5313_PAL_WRITE_BASE(_data) \
- downcast<sega315_5313_device &>(*device).set_pal_write_base(_data);
-
-#define MCFG_SEGA315_5313_PALETTE(_palette_tag) \
- downcast<sega315_5313_device &>(*device).set_palette(_palette_tag);
-
-
-// Temporary solution while 32x VDP mixing and scanline interrupting is moved outside MD VDP
-#define MCFG_SEGA315_5313_32X_SCANLINE_CB(_class, _method) \
- downcast<sega315_5313_device &>(*device).set_md_32x_scanline(sega315_5313_device::md_32x_scanline_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_SEGA315_5313_32X_INTERRUPT_CB(_class, _method) \
- downcast<sega315_5313_device &>(*device).set_md_32x_interrupt(sega315_5313_device::md_32x_interrupt_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_SEGA315_5313_32X_SCANLINE_HELPER_CB(_class, _method) \
- downcast<sega315_5313_device &>(*device).set_md_32x_scanline_helper(sega315_5313_device::md_32x_scanline_helper_delegate(&_class::_method, #_class "::" #_method, this));
-
-
class sega315_5313_device : public sega315_5313_mode4_device, public device_mixer_interface
{
public:
@@ -67,9 +28,6 @@ public:
typedef device_delegate<void (int scanline, int irq6)> md_32x_interrupt_delegate;
typedef device_delegate<void (int scanline)> md_32x_scanline_helper_delegate;
- template <class Object> devcb_base &set_sndirqline_callback(Object &&cb) { return m_sndirqline_callback.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_lv6irqline_callback(Object &&cb) { return m_lv6irqline_callback.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_lv4irqline_callback(Object &&cb) { return m_lv4irqline_callback.set_callback(std::forward<Object>(cb)); }
auto snd_irq() { return m_sndirqline_callback.bind(); }
auto lv6_irq() { return m_lv6irqline_callback.bind(); }
auto lv4_irq() { return m_lv4irqline_callback.bind(); }
@@ -78,9 +36,10 @@ public:
void set_pal_write_base(int palwrite_base) { m_palwrite_base = palwrite_base; }
template <typename T> void set_palette(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
- template <typename Object> void set_md_32x_scanline(Object &&cb) { m_32x_scanline_func = std::forward<Object>(cb); }
- template <typename Object> void set_md_32x_interrupt(Object &&cb) { m_32x_interrupt_func = std::forward<Object>(cb); }
- template <typename Object> void set_md_32x_scanline_helper(Object &&cb) { m_32x_scanline_helper_func = std::forward<Object>(cb); }
+ // Temporary solution while 32x VDP mixing and scanline interrupting is moved outside MD VDP
+ template <typename... T> void set_md_32x_scanline(T &&... args) { m_32x_scanline_func = md_32x_scanline_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_md_32x_interrupt(T &&... args) { m_32x_interrupt_func = md_32x_interrupt_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_md_32x_scanline_helper(T &&... args) { m_32x_scanline_helper_func = md_32x_scanline_helper_delegate(std::forward<T>(args)...); }
int m_use_alt_timing; // use MAME scanline timer instead, render only one scanline to a single line buffer, to be rendered by a partial update call.. experimental
diff --git a/src/devices/video/cesblit.h b/src/devices/video/cesblit.h
index f22f16df260..d535921ef6b 100644
--- a/src/devices/video/cesblit.h
+++ b/src/devices/video/cesblit.h
@@ -11,21 +11,6 @@
#pragma once
-/***************************************************************************
- INTERFACE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_CESBLIT_ADD(_tag, _screen, _clock) \
- MCFG_DEVICE_ADD(_tag, CESBLIT, _clock) \
- MCFG_VIDEO_SET_SCREEN(_screen)
-
-#define MCFG_CESBLIT_MAP MCFG_DEVICE_PROGRAM_MAP
-
-#define MCFG_CESBLIT_COMPUTE_ADDR(_compute_addr) \
- downcast<cesblit_device &>(*device).set_compute_addr(_compute_addr);
-
-#define MCFG_CESBLIT_IRQ_CB(_devcb) \
- downcast<cesblit_device &>(*device).set_irq_callback(DEVCB_##_devcb);
/***************************************************************************
TYPE DEFINITIONS
@@ -41,11 +26,18 @@ public:
typedef int (*compute_addr_t) (uint16_t reg_low, uint16_t reg_mid, uint16_t reg_high);
// construction/destruction
+ template <typename T>
+ cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
+ : cesblit_device(mconfig, tag, owner, clock)
+ {
+ set_screen(std::forward<T>(screen_tag));
+ }
+
cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
void set_compute_addr(compute_addr_t compute_addr) { m_compute_addr = compute_addr; }
- template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq_callback() { return m_blit_irq_cb.bind(); }
DECLARE_WRITE16_MEMBER(color_w);
DECLARE_WRITE16_MEMBER(addr_hi_w);
diff --git a/src/devices/video/crt9021.h b/src/devices/video/crt9021.h
index 2a7e513fdf2..65de1032a64 100644
--- a/src/devices/video/crt9021.h
+++ b/src/devices/video/crt9021.h
@@ -38,10 +38,6 @@
#define CRT9021_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int y, int x, uint8_t video, int intout)
-#define MCFG_CRT9021_DRAW_CHARACTER_CALLBACK_OWNER(_class, _method) \
- downcast<crt9021_device &>(*device).set_display_callback(crt9021_device::draw_character_delegate(&_class::_method, #_class "::" #_method, this));
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -57,7 +53,7 @@ public:
// construction/destruction
crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
+ template <typename... T> void set_display_callback(T &&... args) { m_display_cb = draw_character_delegate(std::forward<T>(args)...); }
void write(uint8_t data) { m_data = data; }
DECLARE_WRITE8_MEMBER( write ) { write(data); }
diff --git a/src/devices/video/crtc_ega.h b/src/devices/video/crtc_ega.h
index e995cdf8a30..c79b4709ef4 100644
--- a/src/devices/video/crtc_ega.h
+++ b/src/devices/video/crtc_ega.h
@@ -17,34 +17,6 @@
#define CRTC_EGA_END_UPDATE(_name) void _name(bitmap_ind16 &bitmap, const rectangle &cliprect)
-
-#define MCFG_CRTC_EGA_SET_SCREEN MCFG_VIDEO_SET_SCREEN
-
-#define MCFG_CRTC_EGA_BEGIN_UPDATE_CB(_class, _method) \
- downcast<crtc_ega_device &>(*device).set_begin_update_callback(crtc_ega_device::begin_update_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_CRTC_EGA_ROW_UPDATE_CB(_class, _method) \
- downcast<crtc_ega_device &>(*device).set_row_update_callback(crtc_ega_device::row_update_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_CRTC_EGA_END_UPDATE_CB(_class, _method) \
- downcast<crtc_ega_device &>(*device).set_end_update_callback(crtc_ega_device::end_update_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_CRTC_EGA_HPIXELS_PER_COLUMN(_pix) \
- downcast<crtc_ega_device &>(*device).config_set_hpixels_per_column(_pix);
-
-#define MCFG_CRTC_EGA_RES_OUT_DE_CB(_devcb) \
- downcast<crtc_ega_device &>(*device).set_res_out_de_callback(DEVCB_##_devcb);
-
-#define MCFG_CRTC_EGA_RES_OUT_HSYNC_CB(_devcb) \
- downcast<crtc_ega_device &>(*device).set_res_out_hsync_callback(DEVCB_##_devcb);
-
-#define MCFG_CRTC_EGA_RES_OUT_VSYNC_CB(_devcb) \
- downcast<crtc_ega_device &>(*device).set_res_out_vsync_callback(DEVCB_##_devcb);
-
-#define MCFG_CRTC_EGA_RES_OUT_VBLANK_CB(_devcb) \
- downcast<crtc_ega_device &>(*device).set_res_out_vblank_callback(DEVCB_##_devcb);
-
-
class crtc_ega_device : public device_t,
public device_video_interface
{
@@ -57,14 +29,14 @@ public:
crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_res_out_de_callback(Object &&cb) { return m_res_out_de_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_res_out_hsync_callback(Object &&cb) { return m_res_out_hsync_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_res_out_vsync_callback(Object &&cb) { return m_res_out_vsync_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_res_out_vblank_callback(Object &&cb) { return m_res_out_vblank_cb.set_callback(std::forward<Object>(cb)); }
+ auto res_out_de_callback() { return m_res_out_de_cb.bind(); }
+ auto res_out_hsync_callback() { return m_res_out_hsync_cb.bind(); }
+ auto res_out_vsync_callback() { return m_res_out_vsync_cb.bind(); }
+ auto res_out_vblank_callback() { return m_res_out_vblank_cb.bind(); }
- template <typename Object> void set_begin_update_callback(Object &&cb) { m_begin_update_cb = std::forward<Object>(cb); }
- template <typename Object> void set_row_update_callback(Object &&cb) { m_row_update_cb = std::forward<Object>(cb); }
- template <typename Object> void set_end_update_callback(Object &&cb) { m_end_update_cb = std::forward<Object>(cb); }
+ template <typename... T> void set_begin_update_callback(T &&... args) { m_begin_update_cb = begin_update_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_row_update_callback(T &&... args) { m_row_update_cb = row_update_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_end_update_callback(T &&... args) { m_end_update_cb = end_update_delegate(std::forward<T>(args)...); }
void config_set_hpixels_per_column(int hpixels_per_column) { m_hpixels_per_column = hpixels_per_column; }
/* select one of the registers for reading or writing */
diff --git a/src/devices/video/dl1416.h b/src/devices/video/dl1416.h
index 2f98355b95d..446e37201dd 100644
--- a/src/devices/video/dl1416.h
+++ b/src/devices/video/dl1416.h
@@ -27,24 +27,12 @@ DECLARE_DEVICE_TYPE(DL1416T, dl1416_device)
/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_DL1414_UPDATE_HANDLER(_devcb) \
- downcast<dl1414_device &>(*device).set_update_handler(DEVCB_##_devcb);
-
-#define MCFG_DL1416_UPDATE_HANDLER(_devcb) \
- downcast<dl1414_device &>(*device).set_update_handler(DEVCB_##_devcb);
-
-
-/***************************************************************************
TYPE DECLARATIONS
***************************************************************************/
class dl1414_device : public device_t
{
public:
- template <typename Object> devcb_base &set_update_handler(Object &&cb) { return m_update_cb.set_callback(std::forward<Object>(cb)); }
auto update() { return m_update_cb.bind(); }
// signal-level interface
diff --git a/src/devices/video/dm9368.h b/src/devices/video/dm9368.h
index ae9956de30b..fb376541a07 100644
--- a/src/devices/video/dm9368.h
+++ b/src/devices/video/dm9368.h
@@ -23,19 +23,6 @@
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_DM9368_UPDATE_CALLBACK(cb) \
- downcast<dm9368_device &>(*device).set_update_callback(DEVCB_##cb);
-
-#define MCFG_DM9368_RBO_CALLBACK(cb) \
- downcast<dm9368_device &>(*device).set_rbo_callback(DEVCB_##cb);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -45,8 +32,6 @@
class dm9368_device : public device_t
{
public:
- template <typename Obj> devcb_base &set_update_callback(Obj &&cb) { return m_update_cb.set_callback(std::forward<Obj>(cb)); }
- template <typename Obj> devcb_base &set_rbo_callback(Obj &&cb) { return m_rbo_cb.set_callback(std::forward<Obj>(cb)); }
auto update_cb() { return m_update_cb.bind(); }
auto rbo_cb() { return m_rbo_cb.bind(); }
diff --git a/src/devices/video/ef9340_1.h b/src/devices/video/ef9340_1.h
index 88b1d91a163..4d687d227d6 100644
--- a/src/devices/video/ef9340_1.h
+++ b/src/devices/video/ef9340_1.h
@@ -15,16 +15,18 @@
#pragma once
-
-#define MCFG_EF9340_1_ADD(_tag, _clock, _screen_tag) \
- MCFG_DEVICE_ADD(_tag, EF9340_1, _clock) \
- MCFG_VIDEO_SET_SCREEN(_screen_tag)
-
class ef9340_1_device : public device_t,
public device_video_interface
{
public:
// construction/destruction
+ template <typename T>
+ ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
+ : ef9340_1_device(mconfig, tag, owner, clock)
+ {
+ set_screen(std::forward<T>(screen_tag));
+ }
+
ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; }
diff --git a/src/devices/video/ef9345.h b/src/devices/video/ef9345.h
index dfec7d080f2..befa96f60c2 100644
--- a/src/devices/video/ef9345.h
+++ b/src/devices/video/ef9345.h
@@ -15,8 +15,6 @@
#include "emupal.h"
-#define MCFG_EF9345_PALETTE(_palette_tag) \
- downcast<ef9345_device &>(*device).set_palette_tag(_palette_tag);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h
index 1082173733c..290ab8464df 100644
--- a/src/devices/video/ef9364.h
+++ b/src/devices/video/ef9364.h
@@ -15,14 +15,6 @@
#include "emupal.h"
-#define MCFG_EF9364_PALETTE(_palette_tag) \
- downcast<ef9364_device &>(*device).set_palette_tag(_palette_tag);
-
-#define MCFG_EF9364_PAGES_CNT(_pages_number) \
- downcast<ef9364_device &>(*device).set_nb_of_pages(_pages_number);
-
-#define MCFG_EF9364_IRQ_HANDLER(_devcb) \
- downcast<ef9364_device &>(*device).set_irq_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h
index 762989e6a03..369b1fb8209 100644
--- a/src/devices/video/ef9365.h
+++ b/src/devices/video/ef9365.h
@@ -15,17 +15,6 @@
#include "emupal.h"
-#define MCFG_EF936X_PALETTE(palette_tag) \
- downcast<ef9365_device &>(*device).set_palette_tag(palette_tag);
-
-#define MCFG_EF936X_BITPLANES_CNT(bitplanes_number) \
- downcast<ef9365_device &>(*device).set_nb_bitplanes((bitplanes_number));
-
-#define MCFG_EF936X_DISPLAYMODE(display_mode) \
- downcast<ef9365_device &>(*device).set_display_mode((ef9365_device::display_mode));
-
-#define MCFG_EF936X_IRQ_HANDLER(cb) \
- downcast<ef9365_device &>(*device).set_irq_handler((DEVCB_##cb));
//**************************************************************************
// TYPE DEFINITIONS
@@ -54,7 +43,7 @@ public:
template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
void set_nb_bitplanes(int nb_bitplanes );
void set_display_mode(int display_mode );
- template<class Object> devcb_base &set_irq_handler(Object object) { return m_irq_handler.set_callback(std::forward<Object>(object)); }
+ auto irq_handler() { return m_irq_handler.bind(); }
// device interface
DECLARE_READ8_MEMBER( data_r );
diff --git a/src/devices/video/epic12.h b/src/devices/video/epic12.h
index a8fe41b069f..287dc08ebb3 100644
--- a/src/devices/video/epic12.h
+++ b/src/devices/video/epic12.h
@@ -6,12 +6,6 @@
#pragma once
-#define MCFG_EPIC12_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, EPIC12, 0)
-
-#define MCFG_EPIC12_SET_MAINRAMSIZE( _rgn ) \
- downcast<epic12_device &>(*device).set_mainramsize(_rgn);
-
class epic12_device : public device_t, public device_video_interface
{
diff --git a/src/devices/video/gba_lcd.h b/src/devices/video/gba_lcd.h
index 1332340e175..ed4c258acad 100644
--- a/src/devices/video/gba_lcd.h
+++ b/src/devices/video/gba_lcd.h
@@ -26,29 +26,6 @@ DECLARE_DEVICE_TYPE(GBA_LCD, gba_lcd_device)
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_GBA_LCD_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, GBA_LCD, 0)
-
-#define MCFG_GBA_LCD_INT_HBLANK(_devcb) \
- downcast<gba_lcd_device &>(*device).set_int_hblank_callback(DEVCB_##_devcb);
-
-#define MCFG_GBA_LCD_INT_VBLANK(_devcb) \
- downcast<gba_lcd_device &>(*device).set_int_vblank_callback(DEVCB_##_devcb);
-
-#define MCFG_GBA_LCD_INT_VCOUNT(_devcb) \
- downcast<gba_lcd_device &>(*device).set_int_vcount_callback(DEVCB_##_devcb);
-
-#define MCFG_GBA_LCD_DMA_HBLANK(_devcb) \
- downcast<gba_lcd_device &>(*device).set_dma_hblank_callback(DEVCB_##_devcb);
-
-#define MCFG_GBA_LCD_DMA_VBLANK(_devcb) \
- downcast<gba_lcd_device &>(*device).set_dma_vblank_callback(DEVCB_##_devcb);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -99,11 +76,11 @@ public:
TIMER_CALLBACK_MEMBER(perform_hbl);
TIMER_CALLBACK_MEMBER(perform_scan);
- template <class Object> devcb_base &set_int_hblank_callback(Object &&cb) { return m_int_hblank_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_int_vblank_callback(Object &&cb) { return m_int_vblank_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_int_vcount_callback(Object &&cb) { return m_int_vcount_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma_hblank_callback(Object &&cb) { return m_dma_hblank_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_dma_vblank_callback(Object &&cb) { return m_dma_vblank_cb.set_callback(std::forward<Object>(cb)); }
+ auto int_hblank_callback() { return m_int_hblank_cb.bind(); }
+ auto int_vblank_callback() { return m_int_vblank_cb.bind(); }
+ auto int_vcount_callback() { return m_int_vcount_cb.bind(); }
+ auto dma_hblank_callback() { return m_dma_hblank_cb.bind(); }
+ auto dma_vblank_callback() { return m_dma_vblank_cb.bind(); }
protected:
// device-level overrides
diff --git a/src/devices/video/hd44102.h b/src/devices/video/hd44102.h
index a484ce77478..f383094f127 100644
--- a/src/devices/video/hd44102.h
+++ b/src/devices/video/hd44102.h
@@ -36,6 +36,14 @@ class hd44102_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag, int sx, int sy)
+ :hd44102_device(mconfig, tag, owner, clock)
+ {
+ set_screen(std::forward<T>(screen_tag));
+ set_offsets(sx, sy);
+ }
+
hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration helpers
diff --git a/src/devices/video/hd44780.h b/src/devices/video/hd44780.h
index 65544ef6828..a6572536cf1 100644
--- a/src/devices/video/hd44780.h
+++ b/src/devices/video/hd44780.h
@@ -12,18 +12,6 @@
#pragma once
-#define MCFG_HD44780_ADD( _tag ) \
- MCFG_DEVICE_ADD( _tag, HD44780, 0 )
-
-#define MCFG_KS0066_F05_ADD( _tag ) \
- MCFG_DEVICE_ADD( _tag, KS0066_F05, 0 )
-
-#define MCFG_HD44780_LCD_SIZE(_lines, _chars) \
- downcast<hd44780_device &>(*device).set_lcd_size(_lines, _chars);
-
-#define MCFG_HD44780_PIXEL_UPDATE_CB(_class, _method) \
- downcast<hd44780_device &>(*device).set_pixel_update_cb(&_class::_method, #_class "::" #_method, this);
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h
index ab4278f9d89..f8579081ac1 100644
--- a/src/devices/video/hd61830.h
+++ b/src/devices/video/hd61830.h
@@ -12,17 +12,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_HD61830_RD_CALLBACK(_read) \
- downcast<hd61830_device &>(*device).set_rd_rd_callback(DEVCB_##_read);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -37,7 +26,7 @@ public:
// construction/destruction
hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_rd_rd_callback(Object &&cb) { return m_read_rd.set_callback(std::forward<Object>(cb)); }
+ auto rd_rd_callback() { return m_read_rd.bind(); }
DECLARE_READ8_MEMBER( status_r );
DECLARE_WRITE8_MEMBER( control_w );
diff --git a/src/devices/video/hd63484.h b/src/devices/video/hd63484.h
index 885761d211b..73a321fc117 100644
--- a/src/devices/video/hd63484.h
+++ b/src/devices/video/hd63484.h
@@ -13,30 +13,8 @@
#pragma once
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_HD63484_ADD(_tag, _clock, _map) \
- MCFG_DEVICE_ADD(_tag, HD63484, _clock) \
- MCFG_DEVICE_ADDRESS_MAP(0, _map)
-
-#define MCFG_HD63484_ADDRESS_MAP(_map) \
- MCFG_DEVICE_ADDRESS_MAP(0, _map)
-
-#define MCFG_HD63484_DISPLAY_CALLBACK_OWNER(_class, _method) \
- downcast<hd63484_device &>(*device).set_display_callback(hd63484_device::display_delegate(&_class::_method, #_class "::" #_method, this));
-
-#define MCFG_HD63484_AUTO_CONFIGURE_SCREEN(_val) \
- downcast<hd63484_device &>(*device).set_auto_configure_screen(_val);
-
#define HD63484_DISPLAY_PIXELS_MEMBER(_name) void _name(bitmap_ind16 &bitmap, const rectangle &cliprect, int y, int x, uint16_t data)
-#define MCFG_HD63484_EXTERNAL_SKEW(_val) \
- downcast<hd63484_device &>(*device).set_external_skew(_val);
-
-
// ======================> hd63484_device
class hd63484_device : public device_t,
@@ -49,7 +27,7 @@ public:
// construction/destruction
hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <typename Object> void set_display_callback(Object &&cb) { m_display_cb = std::forward<Object>(cb); }
+ template <typename... T> void set_display_callback(T &&... args) { m_display_cb = display_delegate(std::forward<T>(args)...); }
void set_auto_configure_screen(bool auto_configure_screen) { m_auto_configure_screen = auto_configure_screen; }
void set_external_skew(int skew) { m_external_skew = skew; }
diff --git a/src/devices/video/huc6202.h b/src/devices/video/huc6202.h
index a3e1a47b519..3ff175f0ece 100644
--- a/src/devices/video/huc6202.h
+++ b/src/devices/video/huc6202.h
@@ -12,61 +12,24 @@
#pragma once
-#define MCFG_HUC6202_NEXT_PIXEL_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_next_pixel_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_time_til_next_event_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_VSYNC_CHANGED_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_vsync_changed_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_HSYNC_CHANGED_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_hsync_changed_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_READ_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_read_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_WRITE_0_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_write_0_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_NEXT_PIXEL_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_next_pixel_1_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_time_til_next_event_1_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_VSYNC_CHANGED_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_vsync_changed_1_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_HSYNC_CHANGED_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_hsync_changed_1_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_READ_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_read_1_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6202_WRITE_1_CB(_devcb) \
- downcast<huc6202_device &>(*device).set_write_1_callback(DEVCB_##_devcb);
-
-
class huc6202_device : public device_t
{
public:
// construction/destruction
huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_next_pixel_0_callback(Object &&cb) { return m_next_pixel_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_time_til_next_event_0_callback(Object &&cb) { return m_time_til_next_event_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vsync_changed_0_callback(Object &&cb) { return m_vsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_hsync_changed_0_callback(Object &&cb) { return m_hsync_changed_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_read_0_callback(Object &&cb) { return m_read_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_0_callback(Object &&cb) { return m_write_0_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_next_pixel_1_callback(Object &&cb) { return m_next_pixel_1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_time_til_next_event_1_callback(Object &&cb) { return m_time_til_next_event_1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vsync_changed_1_callback(Object &&cb) { return m_vsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_hsync_changed_1_callback(Object &&cb) { return m_hsync_changed_1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_read_1_callback(Object &&cb) { return m_read_1_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_write_1_callback(Object &&cb) { return m_write_1_cb.set_callback(std::forward<Object>(cb)); }
+ auto next_pixel_0_callback() { return m_next_pixel_0_cb.bind(); }
+ auto time_til_next_event_0_callback() { return m_time_til_next_event_0_cb.bind(); }
+ auto vsync_changed_0_callback() { return m_vsync_changed_0_cb.bind(); }
+ auto hsync_changed_0_callback() { return m_hsync_changed_0_cb.bind(); }
+ auto read_0_callback() { return m_read_0_cb.bind(); }
+ auto write_0_callback() { return m_write_0_cb.bind(); }
+ auto next_pixel_1_callback() { return m_next_pixel_1_cb.bind(); }
+ auto time_til_next_event_1_callback() { return m_time_til_next_event_1_cb.bind(); }
+ auto vsync_changed_1_callback() { return m_vsync_changed_1_cb.bind(); }
+ auto hsync_changed_1_callback() { return m_hsync_changed_1_cb.bind(); }
+ auto read_1_callback() { return m_read_1_cb.bind(); }
+ auto write_1_callback() { return m_write_1_cb.bind(); }
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/video/huc6260.h b/src/devices/video/huc6260.h
index 8737d0432cf..695f60c9a05 100644
--- a/src/devices/video/huc6260.h
+++ b/src/devices/video/huc6260.h
@@ -12,19 +12,6 @@
#pragma once
-#define MCFG_HUC6260_NEXT_PIXEL_DATA_CB(_devcb) \
- downcast<huc6260_device &>(*device).set_next_pixel_data_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(_devcb) \
- downcast<huc6260_device &>(*device).set_time_til_next_event_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6260_VSYNC_CHANGED_CB(_devcb) \
- downcast<huc6260_device &>(*device).set_vsync_changed_callback(DEVCB_##_devcb);
-
-#define MCFG_HUC6260_HSYNC_CHANGED_CB(_devcb) \
- downcast<huc6260_device &>(*device).set_hsync_changed_callback(DEVCB_##_devcb);
-
-
class huc6260_device : public device_t,
public device_palette_interface,
public device_video_interface
@@ -40,10 +27,6 @@ public:
// construction/destruction
huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_next_pixel_data_callback(Object &&cb) { return m_next_pixel_data_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_time_til_next_event_callback(Object &&cb) { return m_time_til_next_event_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_vsync_changed_callback(Object &&cb) { return m_vsync_changed_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_hsync_changed_callback(Object &&cb) { return m_hsync_changed_cb.set_callback(std::forward<Object>(cb)); }
auto next_pixel_data() { return m_next_pixel_data_cb.bind(); }
auto time_til_next_event() { return m_time_til_next_event_cb.bind(); }
auto vsync_changed() { return m_vsync_changed_cb.bind(); }
diff --git a/src/devices/video/huc6261.h b/src/devices/video/huc6261.h
index 721ef88cc3a..33efd71fcd9 100644
--- a/src/devices/video/huc6261.h
+++ b/src/devices/video/huc6261.h
@@ -15,16 +15,6 @@
#include "video/huc6272.h"
-#define MCFG_HUC6261_VDC1(_tag) \
- downcast<huc6261_device &>(*device).set_vdc1_tag(_tag);
-
-#define MCFG_HUC6261_VDC2(_tag) \
- downcast<huc6261_device &>(*device).set_vdc2_tag(_tag);
-
-#define MCFG_HUC6261_KING(_tag) \
- downcast<huc6261_device &>(*device).set_king_tag(_tag);
-
-
class huc6261_device : public device_t,
public device_video_interface
{
diff --git a/src/devices/video/huc6270.h b/src/devices/video/huc6270.h
index 2ee9e0d6259..cd3a9f7acee 100644
--- a/src/devices/video/huc6270.h
+++ b/src/devices/video/huc6270.h
@@ -12,12 +12,6 @@
#pragma once
-#define MCFG_HUC6270_VRAM_SIZE(_size) \
- downcast<huc6270_device &>(*device).set_vram_size(_size);
-
-#define MCFG_HUC6270_IRQ_CHANGED_CB(_devcb) \
- downcast<huc6270_device &>(*device).set_irq_changed_callback(DEVCB_##_devcb);
-
class huc6270_device : public device_t
{
public:
@@ -25,7 +19,6 @@ public:
huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_vram_size(uint32_t vram_size) { m_vram_size = vram_size; }
- template <class Object> devcb_base &set_irq_changed_callback(Object &&cb) { return m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
auto irq() { return m_irq_changed_cb.bind(); }
DECLARE_READ8_MEMBER( read );
diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h
index cd931a1dae9..8d7f0583600 100644
--- a/src/devices/video/huc6272.h
+++ b/src/devices/video/huc6272.h
@@ -18,17 +18,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_HUC6272_IRQ_CHANGED_CB(cb) \
- downcast<huc6272_device &>(*device).set_irq_changed_callback((DEVCB_##cb));
-
-#define MCFG_HUC6272_RAINBOW(tag) \
- downcast<huc6272_device &>(*device).set_rainbow_tag((tag));
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -41,7 +30,7 @@ public:
// construction/destruction
huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_irq_changed_callback(Object &&cb) { return m_irq_changed_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq_changed_callback() { return m_irq_changed_cb.bind(); }
template <typename T> void set_rainbow_tag(T &&tag) { m_huc6271.set_tag(std::forward<T>(tag)); }
// I/O operations
diff --git a/src/devices/video/m50458.h b/src/devices/video/m50458.h
index 5be6ceaf08c..07113a93afe 100644
--- a/src/devices/video/m50458.h
+++ b/src/devices/video/m50458.h
@@ -12,16 +12,6 @@ Mitsubishi M50458 OSD chip
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_M50458_ADD(_tag,_freq,_screen) \
- MCFG_DEVICE_ADD(_tag, M50458,_freq) \
- MCFG_VIDEO_SET_SCREEN(_screen)
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -34,6 +24,13 @@ class m50458_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag)
+ : m50458_device(mconfig, tag, owner, clock)
+ {
+ set_screen(std::forward<T>(screen_tag));
+ }
+
m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
diff --git a/src/devices/video/nt7534.h b/src/devices/video/nt7534.h
index 06e37d2bd26..75390f8acaa 100644
--- a/src/devices/video/nt7534.h
+++ b/src/devices/video/nt7534.h
@@ -12,9 +12,6 @@
#pragma once
-#define MCFG_NT7534_PIXEL_UPDATE_CB(_class, _method) \
- downcast<nt7534_device &>(*device).set_pixel_update_cb(nt7534_device::pixel_update_delegate(&_class::_method, #_class "::" #_method, this));
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -32,7 +29,7 @@ public:
// construction/destruction
nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <typename Object> void set_pixel_update_cb(Object &&cb) { m_pixel_update_cb = std::forward<Object>(cb); }
+ template <typename... T> void set_pixel_update_cb(T &&... args) { m_pixel_update_cb = pixel_update_delegate(std::forward<T>(args)...); }
// device interface
virtual DECLARE_WRITE8_MEMBER(write);
diff --git a/src/devices/video/pcd8544.h b/src/devices/video/pcd8544.h
index fee6fad00d8..069984e9483 100644
--- a/src/devices/video/pcd8544.h
+++ b/src/devices/video/pcd8544.h
@@ -18,12 +18,6 @@
#define PCD8544_SCREEN_UPDATE(name) void name(device_t &device, bitmap_ind16 &bitmap, const rectangle &cliprect , uint8_t *vram, int inv)
-#define MCFG_PCD8544_ADD( _tag ) \
- MCFG_DEVICE_ADD( _tag, PCD8544, 0 )
-
-#define MCFG_PCD8544_SCREEN_UPDATE_CALLBACK(_class, _method) \
- downcast<pcd8544_device &>(*device).set_screen_update_cb(pcd8544_device::screen_update_delegate(&_class::_method, #_class "::" #_method, this));
-
// ======================> pcd8544_device
@@ -34,7 +28,7 @@ public:
// construction/destruction
pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <typename Object> void set_screen_update_cb(Object &&cb) { m_screen_update_cb = std::forward<Object>(cb); }
+ template <typename... T> void set_screen_update_cb(T &&... args) { m_screen_update_cb = screen_update_delegate(std::forward<T>(args)...); }
// device interface
DECLARE_WRITE_LINE_MEMBER(sdin_w);
diff --git a/src/devices/video/sda5708.h b/src/devices/video/sda5708.h
index eecb36e032c..4237675b95e 100644
--- a/src/devices/video/sda5708.h
+++ b/src/devices/video/sda5708.h
@@ -41,13 +41,6 @@
*
*/
-///*************************************************************************
-// INTERFACE CONFIGURATION MACROS
-///*************************************************************************
-
-#define MCFG_SDA5708_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, SDA5708, 0)
-
///*************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index 7506685b3ac..6c07edd8d8b 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -931,7 +931,7 @@ MACHINE_CONFIG_START(abc1600_state::abc1600)
m_cio->pc_rd_cb().set(FUNC(abc1600_state::cio_pc_r));
m_cio->pc_wr_cb().set(FUNC(abc1600_state::cio_pc_w));
- MCFG_NMC9306_ADD(NMC9306_TAG)
+ NMC9306(config, m_nvram, 0);
E0516(config, E050_C16PC_TAG, 32.768_kHz_XTAL);
diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp
index 0c5317b7b0f..36882843780 100644
--- a/src/mame/drivers/adp.cpp
+++ b/src/mame/drivers/adp.cpp
@@ -604,19 +604,18 @@ void adp_state::ramdac_map(address_map &map)
map(0x000, 0x3ff).rw("ramdac", FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb666_w));
}
-MACHINE_CONFIG_START(adp_state::funland)
+void adp_state::funland(machine_config &config)
+{
quickjac(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(funland_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &adp_state::funland_mem);
PALETTE(config.replace(), m_palette, palette_device::BLACK, 0x100);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &adp_state::ramdac_map);
- MCFG_DEVICE_MODIFY("acrtc")
- MCFG_HD63484_ADDRESS_MAP(fstation_hd63484_map)
-MACHINE_CONFIG_END
+ m_acrtc->set_addrmap(0, &adp_state::fstation_hd63484_map);
+}
MACHINE_CONFIG_START(adp_state::fstation)
funland(config);
diff --git a/src/mame/drivers/aim65.cpp b/src/mame/drivers/aim65.cpp
index d292923be37..09ad442ec2c 100644
--- a/src/mame/drivers/aim65.cpp
+++ b/src/mame/drivers/aim65.cpp
@@ -194,16 +194,16 @@ MACHINE_CONFIG_START(aim65_state::aim65)
config.set_default_layout(layout_aim65);
/* alpha-numeric display */
- MCFG_DEVICE_ADD("ds1", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, aim65_state, aim65_update_ds<1>))
- MCFG_DEVICE_ADD("ds2", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, aim65_state, aim65_update_ds<2>))
- MCFG_DEVICE_ADD("ds3", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, aim65_state, aim65_update_ds<3>))
- MCFG_DEVICE_ADD("ds4", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, aim65_state, aim65_update_ds<4>))
- MCFG_DEVICE_ADD("ds5", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, aim65_state, aim65_update_ds<5>))
+ DL1416T(config, m_ds[0], u32(0));
+ m_ds[0]->update().set(FUNC(aim65_state::aim65_update_ds<1>));
+ DL1416T(config, m_ds[1], u32(0));
+ m_ds[1]->update().set(FUNC(aim65_state::aim65_update_ds<2>));
+ DL1416T(config, m_ds[2], u32(0));
+ m_ds[2]->update().set(FUNC(aim65_state::aim65_update_ds<3>));
+ DL1416T(config, m_ds[3], u32(0));
+ m_ds[3]->update().set(FUNC(aim65_state::aim65_update_ds<4>));
+ DL1416T(config, m_ds[4], u32(0));
+ m_ds[4]->update().set(FUNC(aim65_state::aim65_update_ds<5>));
/* Sound - wave sound only */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/alesis.cpp b/src/mame/drivers/alesis.cpp
index 33da94d7999..d85571609a4 100644
--- a/src/mame/drivers/alesis.cpp
+++ b/src/mame/drivers/alesis.cpp
@@ -438,8 +438,8 @@ MACHINE_CONFIG_START(alesis_state::hr16)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED)
MCFG_CASSETTE_INTERFACE("hr16_cass")
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 16);
/* sound hardware */
ALESIS_DM3AG(config, "dm3ag", 12_MHz_XTAL/2);
@@ -461,9 +461,8 @@ MACHINE_CONFIG_START(alesis_state::sr16)
MCFG_SCREEN_VISIBLE_AREA(0, 6*8-1, 0, 9*2-1)
config.set_default_layout(layout_sr16);
- MCFG_DEVICE_MODIFY("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 8)
- MCFG_HD44780_PIXEL_UPDATE_CB(alesis_state, sr16_pixel_update)
+ m_lcdc->set_lcd_size(2, 8);
+ m_lcdc->set_pixel_update_cb(FUNC(alesis_state::sr16_pixel_update), this);
MACHINE_CONFIG_END
void alesis_state::mmt8(machine_config &config)
diff --git a/src/mame/drivers/alphasma.cpp b/src/mame/drivers/alphasma.cpp
index 3487869370d..4e89daeaa2f 100644
--- a/src/mame/drivers/alphasma.cpp
+++ b/src/mame/drivers/alphasma.cpp
@@ -438,10 +438,10 @@ MACHINE_CONFIG_START(alphasmart_state::alphasmart)
m_maincpu->set_addrmap(AS_IO, &alphasmart_state::alphasmart_io);
m_maincpu->set_config(0, 192, 0x00);
- MCFG_KS0066_F05_ADD("ks0066_0")
- MCFG_HD44780_LCD_SIZE(2, 40)
- MCFG_KS0066_F05_ADD("ks0066_1")
- MCFG_HD44780_LCD_SIZE(2, 40)
+ KS0066_F05(config, m_lcdc0, 0);
+ m_lcdc0->set_lcd_size(2, 40);
+ KS0066_F05(config, m_lcdc1, 0);
+ m_lcdc1->set_lcd_size(2, 40);
RAM(config, RAM_TAG).set_default_size("128K");
diff --git a/src/mame/drivers/aquarius.cpp b/src/mame/drivers/aquarius.cpp
index e7eb7728d4f..3440fc65931 100644
--- a/src/mame/drivers/aquarius.cpp
+++ b/src/mame/drivers/aquarius.cpp
@@ -366,7 +366,7 @@ MACHINE_CONFIG_START(aquarius_state::aquarius)
MCFG_SCREEN_PALETTE(m_palette)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_aquarius);
- MCFG_TEA1002_ADD("encoder", XTAL(8'867'238))
+ TEA1002(config, m_tea1002, XTAL(8'867'238));
PALETTE(config, m_palette, FUNC(aquarius_state::aquarius_palette), 512, 16);
/* sound hardware */
diff --git a/src/mame/drivers/calcune.cpp b/src/mame/drivers/calcune.cpp
index d2a544c0fbd..f76512a9929 100644
--- a/src/mame/drivers/calcune.cpp
+++ b/src/mame/drivers/calcune.cpp
@@ -267,28 +267,28 @@ MACHINE_CONFIG_START(calcune_state::calcune)
MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(calcune_state, screen_update_calcune)
- MCFG_DEVICE_ADD("gen_vdp", SEGA315_5313, MASTER_CLOCK_NTSC, "maincpu")
- MCFG_SEGA315_5313_IS_PAL(false)
- MCFG_SEGA315_5313_SND_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_sndirqline_callback_genesis_z80));
- MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_lv6irqline_callback_genesis_68k));
- MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_lv4irqline_callback_genesis_68k));
- MCFG_SEGA315_5313_ALT_TIMING(1);
- MCFG_SEGA315_5313_PAL_WRITE_BASE(0x0000);
- MCFG_SEGA315_5313_PALETTE("palette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25)
-
- MCFG_DEVICE_ADD("gen_vdp2", SEGA315_5313, MASTER_CLOCK_NTSC, "maincpu")
- MCFG_SEGA315_5313_IS_PAL(false)
+ SEGA315_5313(config, m_vdp, MASTER_CLOCK_NTSC, m_maincpu);
+ m_vdp->set_is_pal(false);
+ m_vdp->snd_irq().set(FUNC(calcune_state::vdp_sndirqline_callback_genesis_z80));
+ m_vdp->lv6_irq().set(FUNC(calcune_state::vdp_lv6irqline_callback_genesis_68k));
+ m_vdp->lv4_irq().set(FUNC(calcune_state::vdp_lv4irqline_callback_genesis_68k));
+ m_vdp->set_alt_timing(1);
+ m_vdp->set_pal_write_base(0x0000);
+ m_vdp->set_palette(m_palette);
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
+
+ SEGA315_5313(config, m_vdp2, MASTER_CLOCK_NTSC, m_maincpu);
+ m_vdp2->set_is_pal(false);
// are these not hooked up or should they OR with the other lines?
-// MCFG_SEGA315_5313_SND_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_sndirqline_callback_genesis_z80));
-// MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_lv6irqline_callback_genesis_68k));
-// MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(WRITELINE(*this, calcune_state, vdp_lv4irqline_callback_genesis_68k));
- MCFG_SEGA315_5313_ALT_TIMING(1);
- MCFG_SEGA315_5313_PAL_WRITE_BASE(0x0c0);
- MCFG_SEGA315_5313_PALETTE("palette")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25)
+// m_vdp2->snd_irq().set(FUNC(calcune_state::vdp_sndirqline_callback_genesis_z80));
+// m_vdp2->lv6_irq().set(FUNC(calcune_state::vdp_lv6irqline_callback_genesis_68k));
+// m_vdp2->lv4_irq().set(FUNC(calcune_state::vdp_lv4irqline_callback_genesis_68k));
+ m_vdp2->set_alt_timing(1);
+ m_vdp2->set_pal_write_base(0x0c0);
+ m_vdp2->set_palette(m_palette);
+ m_vdp2->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_vdp2->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
MCFG_TIMER_DEVICE_ADD_SCANLINE("scantimer", "gen_vdp", sega315_5313_device, megadriv_scanline_timer_callback_alt_timing, "megadriv", 0, 1)
MCFG_TIMER_DEVICE_ADD_SCANLINE("scantimer2", "gen_vdp2", sega315_5313_device, megadriv_scanline_timer_callback_alt_timing, "megadriv", 0, 1)
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index 9440d942c8a..9742bd4996d 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -609,9 +609,9 @@ MACHINE_CONFIG_START(cc40_state::cc40)
PALETTE(config, "palette", FUNC(cc40_state::cc40_palette), 3);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16) // 2*16 internal
- MCFG_HD44780_PIXEL_UPDATE_CB(cc40_state, cc40_pixel_update)
+ hd44780_device &hd44780(HD44780(config, "hd44780", 0));
+ hd44780.set_lcd_size(2, 16); // 2*16 internal
+ hd44780.set_pixel_update_cb(FUNC(cc40_state::cc40_pixel_update), this);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp
index cb7cbc5eca0..3b75ead0147 100644
--- a/src/mame/drivers/cmi.cpp
+++ b/src/mame/drivers/cmi.cpp
@@ -2183,12 +2183,12 @@ MACHINE_CONFIG_START(cmi_state::cmi2x)
MCFG_DEVICE_PROGRAM_MAP(cmi07cpu_map)
/* alpha-numeric display */
- MCFG_DEVICE_ADD("dp1", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, cmi_state, cmi_iix_update_dp<0>))
- MCFG_DEVICE_ADD("dp2", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, cmi_state, cmi_iix_update_dp<1>))
- MCFG_DEVICE_ADD("dp3", DL1416T, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, cmi_state, cmi_iix_update_dp<2>))
+ DL1416T(config, m_dp1, u32(0));
+ m_dp1->update().set(FUNC(cmi_state::cmi_iix_update_dp<0>));
+ DL1416T(config, m_dp2, u32(0));
+ m_dp2->update().set(FUNC(cmi_state::cmi_iix_update_dp<1>));
+ DL1416T(config, m_dp3, u32(0));
+ m_dp3->update().set(FUNC(cmi_state::cmi_iix_update_dp<2>));
/* video hardware */
MCFG_SCREEN_ADD_MONOCHROME("screen", RASTER, rgb_t::green())
diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp
index f3aa02eba41..cc3929e4cdc 100644
--- a/src/mame/drivers/cosmicos.cpp
+++ b/src/mame/drivers/cosmicos.cpp
@@ -524,7 +524,7 @@ MACHINE_CONFIG_START(cosmicos_state::cosmicos)
/* video hardware */
config.set_default_layout(layout_cosmicos);
- MCFG_DEVICE_ADD(DM9368_TAG, DM9368, 0)
+ DM9368(config, m_led, 0);
MCFG_TIMER_DRIVER_ADD_PERIODIC("digit", cosmicos_state, digit_tick, attotime::from_hz(100))
MCFG_TIMER_DRIVER_ADD_PERIODIC("interrupt", cosmicos_state, int_tick, attotime::from_hz(1000))
diff --git a/src/mame/drivers/cz101.cpp b/src/mame/drivers/cz101.cpp
index 93268c9dba6..8c4de1be0fd 100644
--- a/src/mame/drivers/cz101.cpp
+++ b/src/mame/drivers/cz101.cpp
@@ -402,9 +402,9 @@ MACHINE_CONFIG_START( cz101_state::cz101 )
PALETTE(config, "palette", FUNC(cz101_state::cz101_palette), 3);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
- MCFG_HD44780_PIXEL_UPDATE_CB(cz101_state, lcd_pixel_update)
+ HD44780(config, m_hd44780, 0);
+ m_hd44780->set_lcd_size(2, 16);
+ m_hd44780->set_pixel_update_cb(FUNC(cz101_state::lcd_pixel_update), this);
config.set_default_layout(layout_cz101);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dbox.cpp b/src/mame/drivers/dbox.cpp
index 88e8b5e7bf4..456745e235e 100644
--- a/src/mame/drivers/dbox.cpp
+++ b/src/mame/drivers/dbox.cpp
@@ -626,7 +626,7 @@ MACHINE_CONFIG_START(dbox_state::dbox)
AMD_29F800B_16BIT(config, "flash");
/* LED Matrix Display */
- MCFG_SDA5708_ADD("display")
+ SDA5708(config, m_display, 0);
config.set_default_layout(layout_sda5708);
/* IP16 74256 8 bit latch */
diff --git a/src/mame/drivers/didact.cpp b/src/mame/drivers/didact.cpp
index 5e2651d8be7..22b99afa01e 100644
--- a/src/mame/drivers/didact.cpp
+++ b/src/mame/drivers/didact.cpp
@@ -581,9 +581,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(didact_state::scan_artwork)
}
}
-MACHINE_CONFIG_START(md6802_state::md6802)
- MCFG_DEVICE_ADD("maincpu", M6802, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(md6802_map)
+void md6802_state::md6802(machine_config &config)
+{
+ M6802(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &md6802_state::md6802_map);
config.set_default_layout(layout_md6802);
/* Devices */
@@ -610,16 +611,17 @@ MACHINE_CONFIG_START(md6802_state::md6802)
m_pia2->readpb_handler().set(FUNC(md6802_state::pia2_kbB_r));
m_pia2->ca2_handler().set(FUNC(md6802_state::pia2_ca2_w));
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", md6802_state, scan_artwork, attotime::from_hz(10))
+ TIMER(config, "artwork_timer").configure_periodic(FUNC(md6802_state::scan_artwork), attotime::from_hz(10));
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(mp68a_state::mp68a)
+void mp68a_state::mp68a(machine_config &config)
+{
// Clock source is based on a N9602N Dual Retriggerable Resettable Monostable Multivibrator oscillator at aprox 505KHz.
// Trimpot seems broken/stuck at 5K Ohm thu. ROM code 1Ms delay loops suggest 1MHz+
- MCFG_DEVICE_ADD("maincpu", M6800, 505000)
- MCFG_DEVICE_PROGRAM_MAP(mp68a_map)
+ M6800(config, m_maincpu, 505000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mp68a_state::mp68a_map);
config.set_default_layout(layout_mp68a);
/* Devices */
@@ -660,21 +662,15 @@ MACHINE_CONFIG_START(mp68a_state::mp68a)
/* 0x086B 0x600 (Port A) = 0x70 */
/* 0x086B 0x600 (Port A) = 0x50 */
/* 0x086B 0x600 (Port A) = 0x70 */
- MCFG_DEVICE_ADD("digit0", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<0>))
- MCFG_DEVICE_ADD("digit1", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<1>))
- MCFG_DEVICE_ADD("digit2", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<2>))
- MCFG_DEVICE_ADD("digit3", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<3>))
- MCFG_DEVICE_ADD("digit4", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<4>))
- MCFG_DEVICE_ADD("digit5", DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, mp68a_state, digit_w<5>))
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mp68a_state, scan_artwork, attotime::from_hz(10))
-MACHINE_CONFIG_END
+ DM9368(config, m_digits[0], 0).update_cb().set(FUNC(mp68a_state::digit_w<0>));
+ DM9368(config, m_digits[1], 0).update_cb().set(FUNC(mp68a_state::digit_w<1>));
+ DM9368(config, m_digits[2], 0).update_cb().set(FUNC(mp68a_state::digit_w<2>));
+ DM9368(config, m_digits[3], 0).update_cb().set(FUNC(mp68a_state::digit_w<3>));
+ DM9368(config, m_digits[4], 0).update_cb().set(FUNC(mp68a_state::digit_w<4>));
+ DM9368(config, m_digits[5], 0).update_cb().set(FUNC(mp68a_state::digit_w<5>));
+
+ TIMER(config, "artwork_timer").configure_periodic(FUNC(mp68a_state::scan_artwork), attotime::from_hz(10));
+}
// TODO split ROM image into proper ROM set
ROM_START( md6802 ) // ROM image from http://elektronikforumet.com/forum/viewtopic.php?f=2&t=79576&start=135#p1203640
diff --git a/src/mame/drivers/elf.cpp b/src/mame/drivers/elf.cpp
index f9ce8358370..3d1815f241b 100644
--- a/src/mame/drivers/elf.cpp
+++ b/src/mame/drivers/elf.cpp
@@ -268,10 +268,8 @@ MACHINE_CONFIG_START(elf2_state::elf2)
MCFG_MM74C922_X3_CALLBACK(IOPORT("X3"))
MCFG_MM74C922_X4_CALLBACK(IOPORT("X4"))
- MCFG_DEVICE_ADD(DM9368_H_TAG, DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, elf2_state, digit_w<0>))
- MCFG_DEVICE_ADD(DM9368_L_TAG, DM9368, 0)
- MCFG_DM9368_UPDATE_CALLBACK(WRITE8(*this, elf2_state, digit_w<1>))
+ DM9368(config, m_led_h, 0).update_cb().set(FUNC(elf2_state::digit_w<0>));
+ DM9368(config, m_led_l, 0).update_cb().set(FUNC(elf2_state::digit_w<1>));
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
diff --git a/src/mame/drivers/fb01.cpp b/src/mame/drivers/fb01.cpp
index 0cae2c6467a..1a9b62a6628 100644
--- a/src/mame/drivers/fb01.cpp
+++ b/src/mame/drivers/fb01.cpp
@@ -198,9 +198,9 @@ MACHINE_CONFIG_START(fb01_state::fb01)
PALETTE(config, "palette", FUNC(fb01_state::fb01_palette), 2);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 8) // 2x8 displayed as 1x16
- MCFG_HD44780_PIXEL_UPDATE_CB(fb01_state,fb01_pixel_update)
+ hd44780_device &hd44780(HD44780(config, "hd44780", 0));
+ hd44780.set_lcd_size(2, 8); // 2x8 displayed as 1x16
+ hd44780.set_pixel_update_cb(FUNC(fb01_state::fb01_pixel_update), this);
I8251(config, m_upd71051, XTAL(4'000'000));
m_upd71051->rxrdy_handler().set(FUNC(fb01_state::upd71051_rxrdy_w));
diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp
index 58b8c7f7aaf..e3f3c81f960 100644
--- a/src/mame/drivers/galgames.cpp
+++ b/src/mame/drivers/galgames.cpp
@@ -999,10 +999,10 @@ MACHINE_CONFIG_START(galgames_state::galgames_base)
MCFG_SCREEN_UPDATE_DRIVER(galgames_state, screen_update)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_CESBLIT_ADD("blitter", "screen", XTAL(24'000'000))
- MCFG_CESBLIT_MAP(blitter_map)
- MCFG_CESBLIT_COMPUTE_ADDR(galgames_compute_addr)
- MCFG_CESBLIT_IRQ_CB(WRITELINE(*this, galgames_state, blitter_irq_callback))
+ CESBLIT(config, m_blitter, XTAL(24'000'000), m_screen);
+ m_blitter->set_addrmap(AS_PROGRAM, &galgames_state::blitter_map);
+ m_blitter->set_compute_addr(galgames_compute_addr);
+ m_blitter->irq_callback().set(FUNC(galgames_state::blitter_irq_callback));
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x1000); // only 0x100 used
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index e1cfdf6f537..26a549efcd5 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -1435,12 +1435,12 @@ MACHINE_CONFIG_START(gba_state::gbadv)
MCFG_DEVICE_ADD("maincpu", ARM7, XTAL(16'777'216))
MCFG_DEVICE_PROGRAM_MAP(gba_map)
- MCFG_GBA_LCD_ADD("lcd")
- MCFG_GBA_LCD_INT_HBLANK(WRITELINE(*this, gba_state, int_hblank_callback))
- MCFG_GBA_LCD_INT_VBLANK(WRITELINE(*this, gba_state, int_vblank_callback))
- MCFG_GBA_LCD_INT_VCOUNT(WRITELINE(*this, gba_state, int_vcount_callback))
- MCFG_GBA_LCD_DMA_HBLANK(WRITELINE(*this, gba_state, dma_hblank_callback))
- MCFG_GBA_LCD_DMA_VBLANK(WRITELINE(*this, gba_state, dma_vblank_callback))
+ gba_lcd_device &lcd(GBA_LCD(config, "lcd", 0));
+ lcd.int_hblank_callback().set(FUNC(gba_state::int_hblank_callback));
+ lcd.int_vblank_callback().set(FUNC(gba_state::int_vblank_callback));
+ lcd.int_vcount_callback().set(FUNC(gba_state::int_vcount_callback));
+ lcd.dma_hblank_callback().set(FUNC(gba_state::dma_hblank_callback));
+ lcd.dma_vblank_callback().set(FUNC(gba_state::dma_vblank_callback));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/ggconnie.cpp b/src/mame/drivers/ggconnie.cpp
index 4507667f359..f640532dbfc 100644
--- a/src/mame/drivers/ggconnie.cpp
+++ b/src/mame/drivers/ggconnie.cpp
@@ -278,30 +278,33 @@ MACHINE_CONFIG_START(ggconnie_state::ggconnie)
MCFG_SCREEN_UPDATE_DRIVER( ggconnie_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD("huc6260", HUC6260, PCE_MAIN_CLOCK/3)
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6202", huc6202_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6202", huc6202_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6202", huc6202_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6202", huc6202_device, hsync_changed))
- MCFG_DEVICE_ADD( "huc6270_0", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADD( "huc6270_1", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADD( "huc6202", HUC6202, 0 )
- MCFG_HUC6202_NEXT_PIXEL_0_CB(READ16("huc6270_0", huc6270_device, next_pixel))
- MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(READ16("huc6270_0", huc6270_device, time_until_next_event))
- MCFG_HUC6202_VSYNC_CHANGED_0_CB(WRITELINE("huc6270_0", huc6270_device, vsync_changed))
- MCFG_HUC6202_HSYNC_CHANGED_0_CB(WRITELINE("huc6270_0", huc6270_device, hsync_changed))
- MCFG_HUC6202_READ_0_CB(READ8("huc6270_0", huc6270_device, read))
- MCFG_HUC6202_WRITE_0_CB(WRITE8("huc6270_0", huc6270_device, write))
- MCFG_HUC6202_NEXT_PIXEL_1_CB(READ16("huc6270_1", huc6270_device, next_pixel))
- MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(READ16("huc6270_1", huc6270_device, time_until_next_event))
- MCFG_HUC6202_VSYNC_CHANGED_1_CB(WRITELINE("huc6270_1", huc6270_device, vsync_changed))
- MCFG_HUC6202_HSYNC_CHANGED_1_CB(WRITELINE("huc6270_1", huc6270_device, hsync_changed))
- MCFG_HUC6202_READ_1_CB(READ8("huc6270_1", huc6270_device, read))
- MCFG_HUC6202_WRITE_1_CB(WRITE8("huc6270_1", huc6270_device, write))
+ HUC6260(config, m_huc6260, PCE_MAIN_CLOCK/3);
+ m_huc6260->next_pixel_data().set("huc6202", FUNC(huc6202_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6202", FUNC(huc6202_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6202", FUNC(huc6202_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6202", FUNC(huc6202_device::hsync_changed));
+
+ huc6270_device &huc6270_0(HUC6270(config, "huc6270_0", 0));
+ huc6270_0.set_vram_size(0x10000);
+ huc6270_0.irq().set_inputline(m_maincpu, 0);
+
+ huc6270_device &huc6270_1(HUC6270(config, "huc6270_1", 0));
+ huc6270_1.set_vram_size(0x10000);
+ huc6270_1.irq().set_inputline(m_maincpu, 0);
+
+ huc6202_device &huc6202(HUC6202(config, "huc6202", 0 ));
+ huc6202.next_pixel_0_callback().set("huc6270_0", FUNC(huc6270_device::next_pixel));
+ huc6202.time_til_next_event_0_callback().set("huc6270_0", FUNC(huc6270_device::time_until_next_event));
+ huc6202.vsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::vsync_changed));
+ huc6202.hsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::hsync_changed));
+ huc6202.read_0_callback().set("huc6270_0", FUNC(huc6270_device::read));
+ huc6202.write_0_callback().set("huc6270_0", FUNC(huc6270_device::write));
+ huc6202.next_pixel_1_callback().set("huc6270_1", FUNC(huc6270_device::next_pixel));
+ huc6202.time_til_next_event_1_callback().set("huc6270_1", FUNC(huc6270_device::time_until_next_event));
+ huc6202.vsync_changed_1_callback().set("huc6270_1", FUNC(huc6270_device::vsync_changed));
+ huc6202.hsync_changed_1_callback().set("huc6270_1", FUNC(huc6270_device::hsync_changed));
+ huc6202.read_1_callback().set("huc6270_1", FUNC(huc6270_device::read));
+ huc6202.write_1_callback().set("huc6270_1", FUNC(huc6270_device::write));
MCFG_DEVICE_ADD("rtc", MSM6242, XTAL(32'768))
diff --git a/src/mame/drivers/hprot1.cpp b/src/mame/drivers/hprot1.cpp
index 1e3891954a6..a0839725314 100644
--- a/src/mame/drivers/hprot1.cpp
+++ b/src/mame/drivers/hprot1.cpp
@@ -266,9 +266,9 @@ MACHINE_CONFIG_START(hprot1_state::hprot1)
PALETTE(config, "palette", FUNC(hprot1_state::hprot1_palette), 2);
GFXDECODE(config, "gfxdecode", "palette", gfx_hprot1);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
- MCFG_HD44780_PIXEL_UPDATE_CB(hprot1_state,hprot1_pixel_update)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 16);
+ m_lcdc->set_pixel_update_cb(FUNC(hprot1_state::hprot1_pixel_update), this);
/* TODO: figure out which RTC chip is in use. */
diff --git a/src/mame/drivers/hunter2.cpp b/src/mame/drivers/hunter2.cpp
index 713f03d4914..3e46632323a 100644
--- a/src/mame/drivers/hunter2.cpp
+++ b/src/mame/drivers/hunter2.cpp
@@ -393,8 +393,8 @@ MACHINE_CONFIG_START(hunter2_state::hunter2)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(hunter2_state::hunter2_palette), 2);
- MCFG_DEVICE_ADD("lcdc", HD61830, XTAL(4'915'200)/2/2) // unknown clock
- MCFG_VIDEO_SET_SCREEN("screen")
+ hd61830_device &hd61830(HD61830(config, "lcdc", XTAL(4'915'200)/2/2)); // unknown clock
+ hd61830.set_screen("screen");
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/icatel.cpp b/src/mame/drivers/icatel.cpp
index 2c46896b84d..f097e8a4f02 100644
--- a/src/mame/drivers/icatel.cpp
+++ b/src/mame/drivers/icatel.cpp
@@ -277,9 +277,9 @@ MACHINE_CONFIG_START(icatel_state::icatel)
PALETTE(config, "palette", FUNC(icatel_state::icatel_palette), 2);
GFXDECODE(config, "gfxdecode", "palette", gfx_icatel);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
- MCFG_HD44780_PIXEL_UPDATE_CB(icatel_state, icatel_pixel_update)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 16);
+ m_lcdc->set_pixel_update_cb(FUNC(icatel_state::icatel_pixel_update), this);
MACHINE_CONFIG_END
ROM_START( icatel )
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index 701fffaa459..ebd4338b44f 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -533,32 +533,16 @@ READ8_MEMBER( kc85_state::lcd_r )
{
uint8_t data = 0;
- data |= m_lcdc0->read(space, offset);
- data |= m_lcdc1->read(space, offset);
- data |= m_lcdc2->read(space, offset);
- data |= m_lcdc3->read(space, offset);
- data |= m_lcdc4->read(space, offset);
- data |= m_lcdc5->read(space, offset);
- data |= m_lcdc6->read(space, offset);
- data |= m_lcdc7->read(space, offset);
- data |= m_lcdc8->read(space, offset);
- data |= m_lcdc9->read(space, offset);
+ for (uint8_t i = 0; i < 10; i++)
+ data |= m_lcdc[i]->read(space, offset);
return data;
}
WRITE8_MEMBER( kc85_state::lcd_w )
{
- m_lcdc0->write(space, offset, data);
- m_lcdc1->write(space, offset, data);
- m_lcdc2->write(space, offset, data);
- m_lcdc3->write(space, offset, data);
- m_lcdc4->write(space, offset, data);
- m_lcdc5->write(space, offset, data);
- m_lcdc6->write(space, offset, data);
- m_lcdc7->write(space, offset, data);
- m_lcdc8->write(space, offset, data);
- m_lcdc9->write(space, offset, data);
+ for (uint8_t i = 0; i < 10; i++)
+ m_lcdc[i]->write(space, offset, data);
}
/* Memory Maps */
@@ -963,14 +947,8 @@ WRITE8_MEMBER( kc85_state::i8155_pa_w )
m_keylatch = (m_keylatch & 0x100) | data;
/* LCD */
- m_lcdc0->cs2_w(BIT(data, 0));
- m_lcdc1->cs2_w(BIT(data, 1));
- m_lcdc2->cs2_w(BIT(data, 2));
- m_lcdc3->cs2_w(BIT(data, 3));
- m_lcdc4->cs2_w(BIT(data, 4));
- m_lcdc5->cs2_w(BIT(data, 5));
- m_lcdc6->cs2_w(BIT(data, 6));
- m_lcdc7->cs2_w(BIT(data, 7));
+ for (uint8_t i = 0; i < 8; i++)
+ m_lcdc[i]->cs2_w(BIT(data, i));
/* RTC */
m_rtc->c0_w(BIT(data, 0));
@@ -1001,8 +979,8 @@ WRITE8_MEMBER( kc85_state::i8155_pb_w )
m_keylatch = (BIT(data, 0) << 8) | (m_keylatch & 0xff);
/* LCD */
- m_lcdc8->cs2_w(BIT(data, 0));
- m_lcdc9->cs2_w(BIT(data, 1));
+ m_lcdc[8]->cs2_w(BIT(data, 0));
+ m_lcdc[9]->cs2_w(BIT(data, 1));
/* beeper */
m_buzzer = BIT(data, 2);
diff --git a/src/mame/drivers/lcmate2.cpp b/src/mame/drivers/lcmate2.cpp
index f390aefa0d2..2492ce640e0 100644
--- a/src/mame/drivers/lcmate2.cpp
+++ b/src/mame/drivers/lcmate2.cpp
@@ -247,8 +247,8 @@ MACHINE_CONFIG_START(lcmate2_state::lcmate2)
PALETTE(config, "palette", FUNC(lcmate2_state::lcmate2_palette), 2);
GFXDECODE(config, "gfxdecode", "palette", gfx_lcmate2);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 20)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 20);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/magnum.cpp b/src/mame/drivers/magnum.cpp
index b1eb9b3c016..3e177c899ff 100644
--- a/src/mame/drivers/magnum.cpp
+++ b/src/mame/drivers/magnum.cpp
@@ -300,15 +300,15 @@ MACHINE_CONFIG_START(magnum_state::magnum)
MCFG_SCREEN_VISIBLE_AREA(0, 6*40-1, 0, 8*16-1)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("lcdc1", HD61830, 1000000) // unknown clock
- MCFG_DEVICE_ADDRESS_MAP(0, magnum_lcdc)
- MCFG_VIDEO_SET_SCREEN("screen1")
+ hd61830_device &lcdc1(HD61830(config, "lcdc1", 1000000)); // unknown clock
+ lcdc1.set_addrmap(0, &magnum_state::magnum_lcdc);
+ lcdc1.set_screen("screen1");
- MCFG_DEVICE_ADD("lcdc2", HD61830, 1000000) // unknown clock
- MCFG_DEVICE_ADDRESS_MAP(0, magnum_lcdc)
- MCFG_VIDEO_SET_SCREEN("screen2")
+ hd61830_device &lcdc2(HD61830(config, "lcdc2", 1000000)); // unknown clock
+ lcdc2.set_addrmap(0, &magnum_state::magnum_lcdc);
+ lcdc2.set_screen("screen2");
- //MCFG_DEVICE_ADD("crtc", I8275, 3000000) // unknown clock
+ //I8275(config, "crtc", 3000000); // unknown clock
//WD1793(config, "fdc", 1000000); // nothing known, type or if any disks even exist, port 0x44 is possibly motor control
diff --git a/src/mame/drivers/mc10.cpp b/src/mame/drivers/mc10.cpp
index 1982fa29054..deef688e36a 100644
--- a/src/mame/drivers/mc10.cpp
+++ b/src/mame/drivers/mc10.cpp
@@ -556,8 +556,8 @@ MACHINE_CONFIG_START(mc10_state::alice32)
MCFG_SCREEN_VISIBLE_AREA(00, 336-1, 00, 270-1)
MCFG_PALETTE_ADD("palette", 8)
- MCFG_DEVICE_ADD("ef9345", EF9345, 0)
- MCFG_EF9345_PALETTE("palette")
+ EF9345(config, m_ef9345, 0);
+ m_ef9345->set_palette_tag("palette");
MCFG_TIMER_DRIVER_ADD_SCANLINE("alice32_sl", mc10_state, alice32_scanline, "screen", 0, 10)
/* sound hardware */
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index a3ad9daf15d..59845722dd5 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -604,13 +604,12 @@ MACHINE_CONFIG_START(md_cons_state::genesis_32x)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_DEVICE_MODIFY("gen_vdp")
- MCFG_SEGA315_5313_32X_SCANLINE_CB(md_cons_state, _32x_scanline_callback);
- MCFG_SEGA315_5313_32X_SCANLINE_HELPER_CB(md_cons_state, _32x_scanline_helper_callback);
- MCFG_SEGA315_5313_32X_INTERRUPT_CB(md_cons_state, _32x_interrupt_callback);
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
+ m_vdp->set_md_32x_scanline(FUNC(md_cons_state::_32x_scanline_callback), this);
+ m_vdp->set_md_32x_scanline_helper(FUNC(md_cons_state::_32x_scanline_helper_callback), this);
+ m_vdp->set_md_32x_interrupt(FUNC(md_cons_state::_32x_interrupt_callback), this);
+ m_vdp->reset_routes();
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", (0.25)/2);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", (0.25)/2);
SEGA_32X_NTSC(config, m_32x, (MASTER_CLOCK_NTSC * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
@@ -642,13 +641,12 @@ MACHINE_CONFIG_START(md_cons_state::mdj_32x)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_DEVICE_MODIFY("gen_vdp")
- MCFG_SEGA315_5313_32X_SCANLINE_CB(md_cons_state, _32x_scanline_callback);
- MCFG_SEGA315_5313_32X_SCANLINE_HELPER_CB(md_cons_state, _32x_scanline_helper_callback);
- MCFG_SEGA315_5313_32X_INTERRUPT_CB(md_cons_state, _32x_interrupt_callback);
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
+ m_vdp->set_md_32x_scanline(FUNC(md_cons_state::_32x_scanline_callback), this);
+ m_vdp->set_md_32x_scanline_helper(FUNC(md_cons_state::_32x_scanline_helper_callback), this);
+ m_vdp->set_md_32x_interrupt(FUNC(md_cons_state::_32x_interrupt_callback), this);
+ m_vdp->reset_routes();
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", (0.25)/2);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", (0.25)/2);
SEGA_32X_NTSC(config, m_32x, (MASTER_CLOCK_NTSC * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
@@ -680,13 +678,12 @@ MACHINE_CONFIG_START(md_cons_state::md_32x)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_DEVICE_MODIFY("gen_vdp")
- MCFG_SEGA315_5313_32X_SCANLINE_CB(md_cons_state, _32x_scanline_callback);
- MCFG_SEGA315_5313_32X_SCANLINE_HELPER_CB(md_cons_state, _32x_scanline_helper_callback);
- MCFG_SEGA315_5313_32X_INTERRUPT_CB(md_cons_state, _32x_interrupt_callback);
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", (0.25)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", (0.25)/2)
+ m_vdp->set_md_32x_scanline(FUNC(md_cons_state::_32x_scanline_callback), this);
+ m_vdp->set_md_32x_scanline_helper(FUNC(md_cons_state::_32x_scanline_helper_callback), this);
+ m_vdp->set_md_32x_interrupt(FUNC(md_cons_state::_32x_interrupt_callback), this);
+ m_vdp->reset_routes();
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", (0.25)/2);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", (0.25)/2);
SEGA_32X_PAL(config, m_32x, (MASTER_CLOCK_PAL * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
diff --git a/src/mame/drivers/megaplay.cpp b/src/mame/drivers/megaplay.cpp
index 9822a1ec776..90569c1d9cb 100644
--- a/src/mame/drivers/megaplay.cpp
+++ b/src/mame/drivers/megaplay.cpp
@@ -704,10 +704,10 @@ MACHINE_CONFIG_START(mplay_state::megaplay)
MCFG_SCREEN_UPDATE_DRIVER(mplay_state, screen_update_megplay)
// Megaplay has an additional SMS VDP as an overlay
- MCFG_DEVICE_ADD("vdp1", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("megadriv")
- MCFG_SEGA315_5246_IS_PAL(false)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("mtbios", 0))
+ SEGA315_5246(config, m_vdp1, 0);
+ m_vdp1->set_screen("megadriv");
+ m_vdp1->set_is_pal(false);
+ m_vdp1->irq().set_inputline(m_bioscpu, 0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/megatech.cpp b/src/mame/drivers/megatech.cpp
index fb671437177..cda8e68ef8d 100644
--- a/src/mame/drivers/megatech.cpp
+++ b/src/mame/drivers/megatech.cpp
@@ -724,8 +724,7 @@ MACHINE_CONFIG_START(mtech_state::megatech)
MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_main)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mtech_state, screen_vblank_main))
- MCFG_DEVICE_MODIFY("gen_vdp")
- MCFG_SEGA315_5313_INT_CB(INPUTLINE("genesis_snd_z80", 0))
+ m_vdp->irq().set_inputline(m_z80snd, 0);
MCFG_SCREEN_ADD("menu", RASTER)
// check frq
@@ -734,10 +733,10 @@ MACHINE_CONFIG_START(mtech_state::megatech)
sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224)
MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_menu)
- MCFG_DEVICE_ADD("vdp1", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("menu")
- MCFG_SEGA315_5246_IS_PAL(false)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("mtbios", 0))
+ SEGA315_5246(config, m_vdp1, 0);
+ m_vdp1->set_screen("menu");
+ m_vdp1->set_is_pal(false);
+ m_vdp1->irq().set_inputline(m_bioscpu, 0);
/* sound hardware */
MCFG_DEVICE_ADD("sn2", SN76496, MASTER_CLOCK/15)
diff --git a/src/mame/drivers/micronic.cpp b/src/mame/drivers/micronic.cpp
index 0a89a68fb01..db29b94f986 100644
--- a/src/mame/drivers/micronic.cpp
+++ b/src/mame/drivers/micronic.cpp
@@ -365,7 +365,7 @@ MACHINE_CONFIG_START(micronic_state::micronic)
PALETTE(config, "palette", FUNC(micronic_state::micronic_palette), 2);
- MCFG_DEVICE_ADD(HD61830_TAG, HD61830, 4.9152_MHz_XTAL / 2 / 2)
+ HD61830(config, m_lcdc, 4.9152_MHz_XTAL / 2 / 2);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index d4ebe4c45ed..27e903fcd6d 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -2645,8 +2645,8 @@ MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit_LCD)
lcd0.set_visarea(0, 480-1, 0, 64-1);
lcd0.set_screen_update("lcdc0", FUNC(hd61830_device::screen_update));
lcd0.set_palette("palette_lcd");
- MCFG_DEVICE_ADD("lcdc0", HD61830B, 5000000/2) // ???
- MCFG_VIDEO_SET_SCREEN("lcd0")
+ HD61830B(config, m_lcdc0, 5000000/2); // ???
+ m_lcdc0->set_screen("lcd0");
screen_device &lcd1(SCREEN(config, "lcd1", SCREEN_TYPE_LCD));
lcd1.set_physical_aspect(15, 3);
@@ -2657,8 +2657,8 @@ MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit_LCD)
lcd1.set_visarea(0, 480-1, 0, 64-1);
lcd1.set_screen_update("lcdc1", FUNC(hd61830_device::screen_update));
lcd1.set_palette("palette_lcd");
- MCFG_DEVICE_ADD("lcdc1", HD61830B, 5000000/2) // ???
- MCFG_VIDEO_SET_SCREEN("lcd1")
+ HD61830B(config, m_lcdc1, 5000000/2); // ???
+ m_lcdc1->set_screen("lcd1");
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_pure_16bit_LCD)
diff --git a/src/mame/drivers/nokia_3310.cpp b/src/mame/drivers/nokia_3310.cpp
index 2d0cb615762..92f5b474371 100644
--- a/src/mame/drivers/nokia_3310.cpp
+++ b/src/mame/drivers/nokia_3310.cpp
@@ -717,8 +717,8 @@ MACHINE_CONFIG_START(noki3310_state::noki3310)
PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED);
- MCFG_PCD8544_ADD("pcd8544")
- MCFG_PCD8544_SCREEN_UPDATE_CALLBACK(noki3310_state, pcd8544_screen_update)
+ PCD8544(config, m_pcd8544, 0);
+ m_pcd8544->set_screen_update_cb(FUNC(noki3310_state::pcd8544_screen_update), this);
INTEL_TE28F160(config, "flash");
diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp
index 0b01b43c99d..efcdc10cff5 100644
--- a/src/mame/drivers/novag6502.cpp
+++ b/src/mame/drivers/novag6502.cpp
@@ -947,9 +947,9 @@ MACHINE_CONFIG_START(novag6502_state::sexpert)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(novag6502_state::novag_lcd_palette), 3);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 8)
- MCFG_HD44780_PIXEL_UPDATE_CB(novag6502_state, novag_lcd_pixel_update)
+ HD44780(config, m_lcd, 0);
+ m_lcd->set_lcd_size(2, 8);
+ m_lcd->set_pixel_update_cb(FUNC(novag6502_state::novag_lcd_pixel_update), this);
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", novag6502_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_novag_sexpert);
diff --git a/src/mame/drivers/novag68k.cpp b/src/mame/drivers/novag68k.cpp
index 358e41755d6..5af1d566b54 100644
--- a/src/mame/drivers/novag68k.cpp
+++ b/src/mame/drivers/novag68k.cpp
@@ -259,9 +259,9 @@ MACHINE_CONFIG_START(novag68k_state::diablo68k)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(novag68k_state::novag_lcd_palette), 3);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 8)
- MCFG_HD44780_PIXEL_UPDATE_CB(novag68k_state, novag_lcd_pixel_update)
+ HD44780(config, m_lcd, 0);
+ m_lcd->set_lcd_size(2, 8);
+ m_lcd->set_pixel_update_cb(FUNC(novag68k_state::novag_lcd_pixel_update), this);
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", novag68k_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_novag_diablo68k);
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 2071ad6b0cc..6ee7da0d2ba 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -849,7 +849,7 @@ MACHINE_CONFIG_START(nss_state::nss)
MCFG_DEVICE_PROGRAM_MAP(bios_map)
MCFG_DEVICE_IO_MAP(bios_io_map)
- MCFG_M50458_ADD("m50458", 4000000, "osd") /* TODO: correct clock */
+ M50458(config, m_m50458, 4000000, "osd"); /* TODO: correct clock */
S3520CF(config, m_s3520cf); /* RTC */
RP5H01(config, m_rp5h01, 0);
M6M80011AP(config, "m6m80011ap");
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index 514a9ec6228..72c9c88bf16 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -772,7 +772,7 @@ MACHINE_CONFIG_START(g7400_state::g7400)
m_i8243->p6_out_cb().set(FUNC(g7400_state::i8243_p6_w));
m_i8243->p7_out_cb().set(FUNC(g7400_state::i8243_p7_w));
- MCFG_EF9340_1_ADD("ef9340_1", 3540000, "screen")
+ EF9340_1(config, m_ef9340_1, 3540000, "screen");
SPEAKER(config, "mono").front_center();
MCFG_I8245_ADD("i8244", 3540000 * 2, "screen", INPUTLINE("maincpu", 0), WRITE16(*this, g7400_state, scanline_postprocess))
@@ -817,7 +817,7 @@ MACHINE_CONFIG_START(g7400_state::odyssey3)
m_i8243->p6_out_cb().set(FUNC(g7400_state::i8243_p6_w));
m_i8243->p7_out_cb().set(FUNC(g7400_state::i8243_p7_w));
- MCFG_EF9340_1_ADD("ef9340_1", 3540000, "screen")
+ EF9340_1(config, m_ef9340_1, 3540000, "screen");
SPEAKER(config, "mono").front_center();
MCFG_I8244_ADD("i8244", 3540000 * 2, "screen", INPUTLINE("maincpu", 0), WRITE16(*this, g7400_state, scanline_postprocess))
diff --git a/src/mame/drivers/paranoia.cpp b/src/mame/drivers/paranoia.cpp
index e51b1d7e0bd..0274e6a3360 100644
--- a/src/mame/drivers/paranoia.cpp
+++ b/src/mame/drivers/paranoia.cpp
@@ -197,14 +197,15 @@ MACHINE_CONFIG_START(paranoia_state::paranoia)
MCFG_SCREEN_UPDATE_DRIVER( pce_common_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD( "huc6260", HUC6260, PCE_MAIN_CLOCK )
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6270", huc6270_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6270", huc6270_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, hsync_changed))
- MCFG_DEVICE_ADD( "huc6270", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
+ HUC6260(config, m_huc6260, PCE_MAIN_CLOCK);
+ m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6270", FUNC(huc6270_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed));
+
+ huc6270_device &huc6270(HUC6270(config, "huc6270", 0));
+ huc6270.set_vram_size(0x10000);
+ huc6270.irq().set_inputline(m_maincpu, 0);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/pce.cpp b/src/mame/drivers/pce.cpp
index 36d86941249..cabbcd58cf9 100644
--- a/src/mame/drivers/pce.cpp
+++ b/src/mame/drivers/pce.cpp
@@ -326,15 +326,15 @@ MACHINE_CONFIG_START(pce_state::pce_common)
MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD( "huc6260", HUC6260, MAIN_CLOCK )
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6270", huc6270_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6270", huc6270_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, hsync_changed))
+ HUC6260(config, m_huc6260, MAIN_CLOCK);
+ m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6270", FUNC(huc6270_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed));
- MCFG_DEVICE_ADD( "huc6270", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
+ huc6270_device &huc6270(HUC6270(config, "huc6270", 0));
+ huc6270.set_vram_size(0x10000);
+ huc6270.irq().set_inputline(m_maincpu, 0);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -380,30 +380,33 @@ MACHINE_CONFIG_START(pce_state::sgx)
MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD( "huc6260", HUC6260, MAIN_CLOCK )
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6202", huc6202_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6202", huc6202_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6202", huc6202_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6202", huc6202_device, hsync_changed))
- MCFG_DEVICE_ADD( "huc6270_0", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADD( "huc6270_1", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADD( "huc6202", HUC6202, 0 )
- MCFG_HUC6202_NEXT_PIXEL_0_CB(READ16("huc6270_0", huc6270_device, next_pixel))
- MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(READ16("huc6270_0", huc6270_device, time_until_next_event))
- MCFG_HUC6202_VSYNC_CHANGED_0_CB(WRITELINE("huc6270_0", huc6270_device, vsync_changed))
- MCFG_HUC6202_HSYNC_CHANGED_0_CB(WRITELINE("huc6270_0", huc6270_device, hsync_changed))
- MCFG_HUC6202_READ_0_CB(READ8("huc6270_0", huc6270_device, read))
- MCFG_HUC6202_WRITE_0_CB(WRITE8("huc6270_0", huc6270_device, write))
- MCFG_HUC6202_NEXT_PIXEL_1_CB(READ16("huc6270_1", huc6270_device, next_pixel))
- MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(READ16("huc6270_1", huc6270_device, time_until_next_event))
- MCFG_HUC6202_VSYNC_CHANGED_1_CB(WRITELINE("huc6270_1", huc6270_device, vsync_changed))
- MCFG_HUC6202_HSYNC_CHANGED_1_CB(WRITELINE("huc6270_1", huc6270_device, hsync_changed))
- MCFG_HUC6202_READ_1_CB(READ8("huc6270_1", huc6270_device, read))
- MCFG_HUC6202_WRITE_1_CB(WRITE8("huc6270_1", huc6270_device, write))
+ HUC6260(config, m_huc6260, MAIN_CLOCK);
+ m_huc6260->next_pixel_data().set("huc6202", FUNC(huc6202_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6202", FUNC(huc6202_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6202", FUNC(huc6202_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6202", FUNC(huc6202_device::hsync_changed));
+
+ huc6270_device &huc6270_0(HUC6270(config, "huc6270_0", 0));
+ huc6270_0.set_vram_size(0x10000);
+ huc6270_0.irq().set_inputline(m_maincpu, 0);
+
+ huc6270_device &huc6270_1(HUC6270(config, "huc6270_1", 0));
+ huc6270_1.set_vram_size(0x10000);
+ huc6270_1.irq().set_inputline(m_maincpu, 0);
+
+ huc6202_device &huc6202(HUC6202(config, "huc6202", 0 ));
+ huc6202.next_pixel_0_callback().set("huc6270_0", FUNC(huc6270_device::next_pixel));
+ huc6202.time_til_next_event_0_callback().set("huc6270_0", FUNC(huc6270_device::time_until_next_event));
+ huc6202.vsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::vsync_changed));
+ huc6202.hsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::hsync_changed));
+ huc6202.read_0_callback().set("huc6270_0", FUNC(huc6270_device::read));
+ huc6202.write_0_callback().set("huc6270_0", FUNC(huc6270_device::write));
+ huc6202.next_pixel_1_callback().set("huc6270_1", FUNC(huc6270_device::next_pixel));
+ huc6202.time_til_next_event_1_callback().set("huc6270_1", FUNC(huc6270_device::time_until_next_event));
+ huc6202.vsync_changed_1_callback().set("huc6270_1", FUNC(huc6270_device::vsync_changed));
+ huc6202.hsync_changed_1_callback().set("huc6270_1", FUNC(huc6270_device::hsync_changed));
+ huc6202.read_1_callback().set("huc6270_1", FUNC(huc6270_device::read));
+ huc6202.write_1_callback().set("huc6270_1", FUNC(huc6270_device::write));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/pcfx.cpp b/src/mame/drivers/pcfx.cpp
index 4562f434752..99e37dfe759 100644
--- a/src/mame/drivers/pcfx.cpp
+++ b/src/mame/drivers/pcfx.cpp
@@ -426,24 +426,24 @@ MACHINE_CONFIG_START(pcfx_state::pcfx)
MCFG_SCREEN_UPDATE_DRIVER(pcfx_state, screen_update)
MCFG_SCREEN_RAW_PARAMS(XTAL(21'477'272), huc6261_device::WPF, 64, 64 + 1024 + 64, huc6261_device::LPF, 18, 18 + 242)
- MCFG_DEVICE_ADD( "huc6270_a", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x20000)
- MCFG_HUC6270_IRQ_CHANGED_CB(WRITELINE(*this, pcfx_state, irq12_w))
+ huc6270_device &huc6270_a(HUC6270(config, "huc6270_a", 0));
+ huc6270_a.set_vram_size(0x20000);
+ huc6270_a.irq().set(FUNC(pcfx_state::irq12_w));
- MCFG_DEVICE_ADD( "huc6270_b", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x20000)
- MCFG_HUC6270_IRQ_CHANGED_CB(WRITELINE(*this, pcfx_state, irq14_w))
+ huc6270_device &huc6270_b(HUC6270(config, "huc6270_b", 0));
+ huc6270_b.set_vram_size(0x20000);
+ huc6270_b.irq().set(FUNC(pcfx_state::irq14_w));
- MCFG_DEVICE_ADD("huc6261", HUC6261, XTAL(21'477'272))
- MCFG_HUC6261_VDC1("huc6270_a")
- MCFG_HUC6261_VDC2("huc6270_b")
- MCFG_HUC6261_KING("huc6272")
+ HUC6261(config, m_huc6261, XTAL(21'477'272));
+ m_huc6261->set_vdc1_tag("huc6270_a");
+ m_huc6261->set_vdc2_tag("huc6270_b");
+ m_huc6261->set_king_tag("huc6272");
- MCFG_DEVICE_ADD( "huc6272", HUC6272, XTAL(21'477'272) )
- MCFG_HUC6272_IRQ_CHANGED_CB(WRITELINE(*this, pcfx_state, irq13_w))
- MCFG_HUC6272_RAINBOW("huc6271")
+ huc6272_device &huc6272(HUC6272(config, "huc6272", XTAL(21'477'272)));
+ huc6272.irq_changed_callback().set(FUNC(pcfx_state::irq13_w));
+ huc6272.set_rainbow_tag("huc6271");
- MCFG_DEVICE_ADD( "huc6271", HUC6271, XTAL(21'477'272) )
+ HUC6271(config, "huc6271", XTAL(21'477'272));
MCFG_SOFTWARE_LIST_ADD("cd_list", "pcfx")
diff --git a/src/mame/drivers/pofo.cpp b/src/mame/drivers/pofo.cpp
index 582d7baaaf8..55c0a21f919 100644
--- a/src/mame/drivers/pofo.cpp
+++ b/src/mame/drivers/pofo.cpp
@@ -1033,10 +1033,10 @@ MACHINE_CONFIG_START(portfolio_state::portfolio)
GFXDECODE(config, "gfxdecode", "palette", gfx_portfolio);
- MCFG_DEVICE_ADD(HD61830_TAG, HD61830, XTAL(4'915'200)/2/2)
- MCFG_DEVICE_ADDRESS_MAP(0, portfolio_lcdc)
- MCFG_HD61830_RD_CALLBACK(READ8(*this, portfolio_state, hd61830_rd_r))
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
+ HD61830(config, m_lcdc, XTAL(4'915'200)/2/2);
+ m_lcdc->set_addrmap(0, &portfolio_state::portfolio_lcdc);
+ m_lcdc->rd_rd_callback().set(FUNC(portfolio_state::hd61830_rd_r));
+ m_lcdc->set_screen(SCREEN_TAG);
// sound hardware
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/psion.cpp b/src/mame/drivers/psion.cpp
index 7396377a534..09119c03684 100644
--- a/src/mame/drivers/psion.cpp
+++ b/src/mame/drivers/psion.cpp
@@ -585,8 +585,8 @@ MACHINE_CONFIG_START(psion_state::psion_2lines)
PALETTE(config, "palette", FUNC(psion_state::psion_palette), 2);
GFXDECODE(config, "gfxdecode", "palette", gfx_psion);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 16);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -613,9 +613,8 @@ MACHINE_CONFIG_START(psion_state::psion_4lines)
MCFG_SCREEN_SIZE(6*20, 9*4)
MCFG_SCREEN_VISIBLE_AREA(0, 6*20-1, 0, 9*4-1)
- MCFG_DEVICE_MODIFY("hd44780")
- MCFG_HD44780_LCD_SIZE(4, 20)
- MCFG_HD44780_PIXEL_UPDATE_CB(psion_state,lz_pixel_update)
+ m_lcdc->set_lcd_size(4, 20);
+ m_lcdc->set_pixel_update_cb(FUNC(psion_state::lz_pixel_update), this);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(psion1_state::psion1)
@@ -630,9 +629,8 @@ MACHINE_CONFIG_START(psion1_state::psion1)
MCFG_SCREEN_SIZE(6*16, 1*8)
MCFG_SCREEN_VISIBLE_AREA(0, 6*16-1, 0, 8*1-1)
- MCFG_DEVICE_MODIFY("hd44780")
- MCFG_HD44780_LCD_SIZE(1, 16)
- MCFG_HD44780_PIXEL_UPDATE_CB(psion1_state,psion1_pixel_update)
+ m_lcdc->set_lcd_size(1, 16);
+ m_lcdc->set_pixel_update_cb(FUNC(psion1_state::psion1_pixel_update), this);
/* Software lists */
MCFG_SOFTWARE_LIST_REMOVE("pack_list")
diff --git a/src/mame/drivers/segae.cpp b/src/mame/drivers/segae.cpp
index 9fd3d468b2b..afa016e5a39 100644
--- a/src/mame/drivers/segae.cpp
+++ b/src/mame/drivers/segae.cpp
@@ -901,14 +901,14 @@ MACHINE_CONFIG_START(systeme_state::systeme)
sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT + 192)
MCFG_SCREEN_UPDATE_DRIVER(systeme_state, screen_update)
- MCFG_DEVICE_ADD("vdp1", SEGA315_5124, 0)
- MCFG_SEGA315_5124_IS_PAL(false)
- MCFG_DEVICE_ADDRESS_MAP(0, vdp1_map)
-
- MCFG_DEVICE_ADD("vdp2", SEGA315_5124, 0)
- MCFG_SEGA315_5124_IS_PAL(false)
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_DEVICE_ADDRESS_MAP(0, vdp2_map)
+ SEGA315_5124(config, m_vdp1, 0);
+ m_vdp1->set_is_pal(false);
+ m_vdp1->set_addrmap(0, &systeme_state::vdp1_map);
+
+ SEGA315_5124(config, m_vdp2, 0);
+ m_vdp2->set_is_pal(false);
+ m_vdp2->irq().set_inputline(m_maincpu, 0);
+ m_vdp2->set_addrmap(0, &systeme_state::vdp2_map);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/shanghai.cpp b/src/mame/drivers/shanghai.cpp
index f60a2c932fd..767dd146ecb 100644
--- a/src/mame/drivers/shanghai.cpp
+++ b/src/mame/drivers/shanghai.cpp
@@ -417,7 +417,7 @@ MACHINE_CONFIG_START(shanghai_state::shanghai)
PALETTE(config, "palette", FUNC(shanghai_state::shanghai_palette)).set_format(palette_device::xBGR_444, 256);
- MCFG_HD63484_ADD("hd63484", 0, hd63484_map)
+ HD63484(config, "hd63484", 0).set_addrmap(0, &shanghai_state::hd63484_map);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -451,7 +451,7 @@ MACHINE_CONFIG_START(shanghai_state::shangha2)
PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256);
- MCFG_HD63484_ADD("hd63484", 0, hd63484_map)
+ HD63484(config, "hd63484", 0).set_addrmap(0, &shanghai_state::hd63484_map);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -490,8 +490,9 @@ MACHINE_CONFIG_START(shanghai_state::kothello)
PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256);
- MCFG_HD63484_ADD("hd63484", 0, hd63484_map)
- MCFG_HD63484_EXTERNAL_SKEW(2)
+ hd63484_device &hd63484(HD63484(config, "hd63484", 0));
+ hd63484.set_addrmap(0, &shanghai_state::hd63484_map);
+ hd63484.set_external_skew(2);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp
index a41586aeaa8..85355aec66a 100644
--- a/src/mame/drivers/sigmab52.cpp
+++ b/src/mame/drivers/sigmab52.cpp
@@ -600,7 +600,7 @@ MACHINE_CONFIG_START(sigmab52_state::jwildb52)
MCFG_SCREEN_UPDATE_DEVICE("hd63484", hd63484_device, update_screen)
MCFG_SCREEN_PALETTE("palette")
- MCFG_HD63484_ADD("hd63484", XTAL(8'000'000), jwildb52_hd63484_map)
+ HD63484(config, "hd63484", XTAL(8'000'000)).set_addrmap(0, &sigmab52_state::jwildb52_hd63484_map);
MCFG_PALETTE_ADD("palette", 16)
diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp
index df706904160..2f6ef3333d0 100644
--- a/src/mame/drivers/sms.cpp
+++ b/src/mame/drivers/sms.cpp
@@ -578,11 +578,11 @@ MACHINE_CONFIG_START(sms_state::sms2_ntsc)
MCFG_SCREEN_SMS_NTSC_RAW_PARAMS(XTAL(10'738'635)/2)
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("screen")
- MCFG_SEGA315_5246_IS_PAL(false)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5246(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
m_has_bios_full = true;
MACHINE_CONFIG_END
@@ -614,11 +614,11 @@ MACHINE_CONFIG_START(sms_state::sms1_ntsc)
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5124, 0)
- MCFG_SEGA315_5124_SET_SCREEN("screen")
- MCFG_SEGA315_5124_IS_PAL(false)
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5124(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
// card and expansion slots, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
@@ -631,8 +631,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(smssdisp_state::sms_sdisp)
sms1_ntsc(config);
- MCFG_DEVICE_MODIFY("sms_vdp")
- MCFG_SEGA315_5124_INT_CB(WRITELINE(*this, smssdisp_state, sms_store_int_callback))
+ m_vdp->irq().set(FUNC(smssdisp_state::sms_store_int_callback));
MCFG_DEVICE_ADD("control", Z80, XTAL(10'738'635)/3)
MCFG_DEVICE_PROGRAM_MAP(sms_store_mem)
@@ -702,11 +701,11 @@ MACHINE_CONFIG_START(sms_state::sms2_pal)
MCFG_SCREEN_SMS_PAL_RAW_PARAMS(MASTER_CLOCK_PAL/10)
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("screen")
- MCFG_SEGA315_5246_IS_PAL(true)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5246(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(true);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
m_has_bios_full = true;
MACHINE_CONFIG_END
@@ -737,11 +736,11 @@ MACHINE_CONFIG_START(sms_state::sms1_pal)
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5124, 0)
- MCFG_SEGA315_5124_SET_SCREEN("screen")
- MCFG_SEGA315_5124_IS_PAL(true)
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5124(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(true);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
// card and expansion slots, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
@@ -774,11 +773,11 @@ MACHINE_CONFIG_START(sms_state::sms3_paln)
MCFG_SCREEN_SMS_PAL_RAW_PARAMS(MASTER_CLOCK_PALN/2)
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("screen")
- MCFG_SEGA315_5246_IS_PAL(true)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5246(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(true);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
m_has_bios_full = true;
MACHINE_CONFIG_END
@@ -809,11 +808,11 @@ MACHINE_CONFIG_START(sms_state::sms1_paln)
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5124, 0)
- MCFG_SEGA315_5124_SET_SCREEN("screen")
- MCFG_SEGA315_5124_IS_PAL(true)
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5124(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(true);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
// card and expansion slots, not present in Tec Toy Master System III
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
@@ -847,11 +846,11 @@ MACHINE_CONFIG_START(sms_state::sms3_br)
MCFG_SCREEN_SMS_NTSC_RAW_PARAMS(MASTER_CLOCK_PALM/2)
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("screen")
- MCFG_SEGA315_5246_IS_PAL(false) // PAL-M has same line count of NTSC
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5246(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false); // PAL-M has same line count of NTSC
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
m_has_bios_full = true;
MACHINE_CONFIG_END
@@ -883,11 +882,11 @@ MACHINE_CONFIG_START(sms_state::sms1_br)
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5124, 0)
- MCFG_SEGA315_5124_SET_SCREEN("screen")
- MCFG_SEGA315_5124_IS_PAL(false) // PAL-M has same line count of NTSC
- MCFG_SEGA315_5124_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5124(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false); // PAL-M has same line count of NTSC
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
// card and expansion slots, not present in Tec Toy Master System III
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
@@ -927,8 +926,7 @@ MACHINE_CONFIG_START(sms_state::sms1_kr)
MCFG_SOFTWARE_LIST_ADD("cart_list2","sg1000")
- MCFG_DEVICE_MODIFY("sms_vdp")
- MCFG_SEGA315_5124_CSYNC_CB(WRITELINE(*this, sms_state, sms_csync_callback))
+ m_vdp->csync().set(FUNC(sms_state::sms_csync_callback));
m_has_bios_full = false;
m_has_bios_2000 = true;
@@ -993,11 +991,11 @@ MACHINE_CONFIG_START(sms_state::gamegear)
MCFG_VIDEO_RESET_OVERRIDE(sms_state,gamegear)
/* VDP chip of the Gamegear 2 ASIC version */
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5377, 0)
- MCFG_SEGA315_5377_SET_SCREEN("screen")
- MCFG_SEGA315_5377_IS_PAL(false)
- MCFG_SEGA315_5377_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5377_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5377(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/sms_bootleg.cpp b/src/mame/drivers/sms_bootleg.cpp
index bd9dba5a882..3cd6b2deb6e 100644
--- a/src/mame/drivers/sms_bootleg.cpp
+++ b/src/mame/drivers/sms_bootleg.cpp
@@ -294,11 +294,11 @@ MACHINE_CONFIG_START(smsbootleg_state::sms_supergame)
MCFG_SCREEN_REFRESH_RATE(XTAL(10'738'635)/2 / (sega315_5124_device::WIDTH * sega315_5124_device::HEIGHT_NTSC))
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
- MCFG_DEVICE_ADD("sms_vdp", SEGA315_5246, 0)
- MCFG_SEGA315_5246_SET_SCREEN("screen")
- MCFG_SEGA315_5246_IS_PAL(false)
- MCFG_SEGA315_5246_INT_CB(INPUTLINE("maincpu", 0))
- MCFG_SEGA315_5246_PAUSE_CB(WRITELINE(*this, sms_state, sms_pause_callback))
+ SEGA315_5246(config, m_vdp, 0);
+ m_vdp->set_screen(m_main_scr);
+ m_vdp->set_is_pal(false);
+ m_vdp->irq().set_inputline(m_maincpu, 0);
+ m_vdp->pause().set(FUNC(sms_state::sms_pause_callback));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/squale.cpp b/src/mame/drivers/squale.cpp
index b8d71898146..ca6cfd65a0f 100644
--- a/src/mame/drivers/squale.cpp
+++ b/src/mame/drivers/squale.cpp
@@ -824,10 +824,10 @@ MACHINE_CONFIG_START(squale_state::squale)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
MCFG_PALETTE_ADD("palette", 16)
- MCFG_DEVICE_ADD("ef9365", EF9365, VIDEO_CLOCK)
- MCFG_EF936X_PALETTE("palette")
- MCFG_EF936X_BITPLANES_CNT(4);
- MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_256x256);
+ EF9365(config, m_ef9365, VIDEO_CLOCK);
+ m_ef9365->set_palette_tag("palette");
+ m_ef9365->set_nb_bitplanes(4);
+ m_ef9365->set_display_mode(ef9365_device::DISPLAY_MODE_256x256);
MCFG_TIMER_DRIVER_ADD_SCANLINE("squale_sl", squale_state, squale_scanline, "screen", 0, 10)
/* Floppy */
diff --git a/src/mame/drivers/testconsole.cpp b/src/mame/drivers/testconsole.cpp
index f9e118cc6c2..43d2511eb1b 100644
--- a/src/mame/drivers/testconsole.cpp
+++ b/src/mame/drivers/testconsole.cpp
@@ -175,29 +175,30 @@ INPUT_PORTS_START(whousetc)
INPUT_PORTS_END
-MACHINE_CONFIG_START(whouse_testcons_state::whousetc)
- MCFG_DEVICE_ADD("maincpu", I8085A, 6.144_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(program_map)
- MCFG_DEVICE_IO_MAP(io_map)
+void whouse_testcons_state::whousetc(machine_config &config)
+{
+ i8085a_cpu_device &maincpu(I8085A(config, "maincpu", 6.144_MHz_XTAL));
+ maincpu.set_addrmap(AS_PROGRAM, &whouse_testcons_state::program_map);
+ maincpu.set_addrmap(AS_IO, &whouse_testcons_state::io_map);
I8155(config, "i8155", 6.144_MHz_XTAL);
- MCFG_DEVICE_ADD("i8255", I8255, 0)
+ I8255(config, "i8255", 0);
- MCFG_DEVICE_ADD("dsp0", DL1416B, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, whouse_testcons_state, update_dsp<0>))
+ DL1416B(config, m_dsp[0], u32(0));
+ m_dsp[0]->update().set(FUNC(whouse_testcons_state::update_dsp<0>));
- MCFG_DEVICE_ADD("dsp1", DL1416B, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, whouse_testcons_state, update_dsp<1>))
+ DL1416B(config, m_dsp[1], u32(0));
+ m_dsp[1]->update().set(FUNC(whouse_testcons_state::update_dsp<1>));
- MCFG_DEVICE_ADD("dsp2", DL1416B, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, whouse_testcons_state, update_dsp<2>))
+ DL1416B(config, m_dsp[2], u32(0));
+ m_dsp[2]->update().set(FUNC(whouse_testcons_state::update_dsp<2>));
- MCFG_DEVICE_ADD("dsp3", DL1416B, u32(0))
- MCFG_DL1416_UPDATE_HANDLER(WRITE16(*this, whouse_testcons_state, update_dsp<3>))
+ DL1416B(config, m_dsp[3], u32(0));
+ m_dsp[3]->update().set(FUNC(whouse_testcons_state::update_dsp<3>));
config.set_default_layout(layout_whousetc);
-MACHINE_CONFIG_END
+}
ROM_START(whousetc)
diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp
index 4549c705a43..fe052f1d4d2 100644
--- a/src/mame/drivers/ti74.cpp
+++ b/src/mame/drivers/ti74.cpp
@@ -541,9 +541,9 @@ MACHINE_CONFIG_START(ti74_state::ti74)
PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3);
- MCFG_HD44780_ADD("hd44780") // 270kHz
- MCFG_HD44780_LCD_SIZE(2, 16) // 2*16 internal
- MCFG_HD44780_PIXEL_UPDATE_CB(ti74_state,ti74_pixel_update)
+ hd44780_device &hd44780(HD44780(config, "hd44780", 0)); // 270kHz
+ hd44780.set_lcd_size(2, 16); // 2*16 internal
+ hd44780.set_pixel_update_cb(FUNC(ti74_state::ti74_pixel_update), this);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti74_cart")
@@ -576,9 +576,9 @@ MACHINE_CONFIG_START(ti74_state::ti95)
PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
- MCFG_HD44780_PIXEL_UPDATE_CB(ti74_state,ti95_pixel_update)
+ hd44780_device &hd44780(HD44780(config, "hd44780", 0));
+ hd44780.set_lcd_size(2, 16);
+ hd44780.set_pixel_update_cb(FUNC(ti74_state::ti95_pixel_update), this);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti95_cart")
diff --git a/src/mame/drivers/tmaster.cpp b/src/mame/drivers/tmaster.cpp
index fdc9a2b1ecc..9b9f86f11a7 100644
--- a/src/mame/drivers/tmaster.cpp
+++ b/src/mame/drivers/tmaster.cpp
@@ -390,9 +390,9 @@ MACHINE_CONFIG_START(tmaster_state::tm)
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x1000);
- MCFG_CESBLIT_ADD("blitter", "screen", XTAL(32'000'000))
- MCFG_CESBLIT_COMPUTE_ADDR(tmaster_compute_addr)
- MCFG_CESBLIT_IRQ_CB(WRITELINE(*this, tmaster_state, blitter_irq_callback))
+ CESBLIT(config, m_blitter, XTAL(32'000'000), m_screen);
+ m_blitter->set_compute_addr(tmaster_compute_addr);
+ m_blitter->irq_callback().set(FUNC(tmaster_state::blitter_irq_callback));
// sound hardware
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index a9cc593a87f..dc73feee956 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -412,14 +412,15 @@ MACHINE_CONFIG_START(tourvision_state::tourvision)
MCFG_SCREEN_UPDATE_DRIVER( pce_common_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD( "huc6260", HUC6260, PCE_MAIN_CLOCK )
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6270", huc6270_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6270", huc6270_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, hsync_changed))
- MCFG_DEVICE_ADD( "huc6270", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
+ HUC6260(config, m_huc6260, PCE_MAIN_CLOCK);
+ m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6270", FUNC(huc6270_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed));
+
+ huc6270_device &huc6270(HUC6270(config, "huc6270", 0));
+ huc6270.set_vram_size(0x10000);
+ huc6270.irq().set_inputline(m_maincpu, 0);
i8155_device &i8155(I8155(config, "i8155", 1000000 /*?*/));
i8155.out_pa_callback().set(FUNC(tourvision_state::tourvision_i8155_a_w));
diff --git a/src/mame/drivers/uapce.cpp b/src/mame/drivers/uapce.cpp
index dc732bf6709..54df05bba90 100644
--- a/src/mame/drivers/uapce.cpp
+++ b/src/mame/drivers/uapce.cpp
@@ -324,14 +324,15 @@ MACHINE_CONFIG_START(uapce_state::uapce)
MCFG_SCREEN_UPDATE_DRIVER( pce_common_state, screen_update )
MCFG_SCREEN_PALETTE("huc6260")
- MCFG_DEVICE_ADD( "huc6260", HUC6260, PCE_MAIN_CLOCK )
- MCFG_HUC6260_NEXT_PIXEL_DATA_CB(READ16("huc6270", huc6270_device, next_pixel))
- MCFG_HUC6260_TIME_TIL_NEXT_EVENT_CB(READ16("huc6270", huc6270_device, time_until_next_event))
- MCFG_HUC6260_VSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, vsync_changed))
- MCFG_HUC6260_HSYNC_CHANGED_CB(WRITELINE("huc6270", huc6270_device, hsync_changed))
- MCFG_DEVICE_ADD( "huc6270", HUC6270, 0 )
- MCFG_HUC6270_VRAM_SIZE(0x10000)
- MCFG_HUC6270_IRQ_CHANGED_CB(INPUTLINE("maincpu", 0))
+ HUC6260(config, m_huc6260, PCE_MAIN_CLOCK);
+ m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
+ m_huc6260->time_til_next_event().set("huc6270", FUNC(huc6270_device::time_until_next_event));
+ m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed));
+ m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed));
+
+ huc6270_device &huc6270(HUC6270(config, "huc6270", 0));
+ huc6270.set_vram_size(0x10000);
+ huc6270.irq().set_inputline(m_maincpu, 0);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/vg5k.cpp b/src/mame/drivers/vg5k.cpp
index 8f3067b28e5..dcdf054f68a 100644
--- a/src/mame/drivers/vg5k.cpp
+++ b/src/mame/drivers/vg5k.cpp
@@ -377,8 +377,8 @@ MACHINE_CONFIG_START(vg5k_state::vg5k)
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", vg5k_state, z80_irq, attotime::from_msec(20))
- MCFG_DEVICE_ADD("ef9345", EF9345, 0)
- MCFG_EF9345_PALETTE("palette")
+ EF9345(config, m_ef9345, 0);
+ m_ef9345->set_palette_tag("palette");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/wildpkr.cpp b/src/mame/drivers/wildpkr.cpp
index ae85b9f34b2..70627ba4087 100644
--- a/src/mame/drivers/wildpkr.cpp
+++ b/src/mame/drivers/wildpkr.cpp
@@ -482,7 +482,7 @@ MACHINE_CONFIG_START(wildpkr_state::wildpkr)
MCFG_SCREEN_UPDATE_DEVICE("acrtc", hd63484_device, update_screen)
MCFG_SCREEN_PALETTE("palette")
- MCFG_HD63484_ADD("acrtc", 0, hd63484_map)
+ HD63484(config, "acrtc", 0).set_addrmap(0, &wildpkr_state::hd63484_map);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
ramdac.set_addrmap(0, &wildpkr_state::ramdac_map);
@@ -522,7 +522,7 @@ MACHINE_CONFIG_START(wildpkr_state::tabpkr)
MCFG_SCREEN_PALETTE("palette")
MCFG_SCREEN_VBLANK_CALLBACK(ASSERTLINE("maincpu", M68K_IRQ_4))
- MCFG_HD63484_ADD("acrtc", 0, hd63484_map)
+ HD63484(config, "acrtc", 0).set_addrmap(0, &wildpkr_state::hd63484_map);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
ramdac.set_addrmap(0, &wildpkr_state::ramdac_map);
diff --git a/src/mame/includes/kyocera.h b/src/mame/includes/kyocera.h
index 2098f70da08..b3fa4afa3bc 100644
--- a/src/mame/includes/kyocera.h
+++ b/src/mame/includes/kyocera.h
@@ -34,16 +34,6 @@
#define UPD1990A_TAG "m18"
#define IM6402_TAG "m22"
#define MC14412_TAG "m31"
-#define HD44102_0_TAG "m1"
-#define HD44102_1_TAG "m2"
-#define HD44102_2_TAG "m3"
-#define HD44102_3_TAG "m4"
-#define HD44102_4_TAG "m5"
-#define HD44102_5_TAG "m6"
-#define HD44102_6_TAG "m7"
-#define HD44102_7_TAG "m8"
-#define HD44102_8_TAG "m9"
-#define HD44102_9_TAG "m10"
#define CENTRONICS_TAG "centronics"
#define RS232_TAG "rs232"
@@ -63,16 +53,7 @@ public:
m_maincpu(*this, I8085_TAG),
m_rtc(*this, UPD1990A_TAG),
m_uart(*this, IM6402_TAG),
- m_lcdc0(*this, HD44102_0_TAG),
- m_lcdc1(*this, HD44102_1_TAG),
- m_lcdc2(*this, HD44102_2_TAG),
- m_lcdc3(*this, HD44102_3_TAG),
- m_lcdc4(*this, HD44102_4_TAG),
- m_lcdc5(*this, HD44102_5_TAG),
- m_lcdc6(*this, HD44102_6_TAG),
- m_lcdc7(*this, HD44102_7_TAG),
- m_lcdc8(*this, HD44102_8_TAG),
- m_lcdc9(*this, HD44102_9_TAG),
+ m_lcdc(*this, "m%u", 0U),
m_centronics(*this, CENTRONICS_TAG),
m_speaker(*this, "speaker"),
m_cassette(*this, "cassette"),
@@ -102,16 +83,7 @@ protected:
required_device<i8085a_cpu_device> m_maincpu;
required_device<upd1990a_device> m_rtc;
optional_device<im6402_device> m_uart;
- required_device<hd44102_device> m_lcdc0;
- required_device<hd44102_device> m_lcdc1;
- required_device<hd44102_device> m_lcdc2;
- required_device<hd44102_device> m_lcdc3;
- required_device<hd44102_device> m_lcdc4;
- required_device<hd44102_device> m_lcdc5;
- required_device<hd44102_device> m_lcdc6;
- required_device<hd44102_device> m_lcdc7;
- required_device<hd44102_device> m_lcdc8;
- required_device<hd44102_device> m_lcdc9;
+ required_device_array<hd44102_device, 10> m_lcdc;
required_device<centronics_device> m_centronics;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cassette;
diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp
index e322e6c2225..b913863b3e5 100644
--- a/src/mame/machine/megadriv.cpp
+++ b/src/mame/machine/megadriv.cpp
@@ -899,14 +899,14 @@ MACHINE_CONFIG_START(md_base_state::md_ntsc)
megadriv_timers(config);
- MCFG_DEVICE_ADD("gen_vdp", SEGA315_5313, MASTER_CLOCK_NTSC, "maincpu")
- MCFG_SEGA315_5313_IS_PAL(false)
- MCFG_SEGA315_5313_SND_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_sndirqline_callback_genesis_z80));
- MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_lv6irqline_callback_genesis_68k));
- MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_lv4irqline_callback_genesis_68k));
- MCFG_VIDEO_SET_SCREEN("megadriv")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25)
+ SEGA315_5313(config, m_vdp, MASTER_CLOCK_NTSC, m_maincpu);
+ m_vdp->set_is_pal(false);
+ m_vdp->snd_irq().set(FUNC(md_base_state::vdp_sndirqline_callback_genesis_z80));
+ m_vdp->lv6_irq().set(FUNC(md_base_state::vdp_lv6irqline_callback_genesis_68k));
+ m_vdp->lv4_irq().set(FUNC(md_base_state::vdp_lv4irqline_callback_genesis_68k));
+ m_vdp->set_screen("megadriv");
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
MCFG_SCREEN_ADD("megadriv", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@@ -953,14 +953,14 @@ MACHINE_CONFIG_START(md_base_state::md_pal)
megadriv_timers(config);
- MCFG_DEVICE_ADD("gen_vdp", SEGA315_5313, MASTER_CLOCK_PAL, "maincpu")
- MCFG_SEGA315_5313_IS_PAL(true)
- MCFG_SEGA315_5313_SND_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_sndirqline_callback_genesis_z80));
- MCFG_SEGA315_5313_LV6_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_lv6irqline_callback_genesis_68k));
- MCFG_SEGA315_5313_LV4_IRQ_CALLBACK(WRITELINE(*this, md_base_state, vdp_lv4irqline_callback_genesis_68k));
- MCFG_VIDEO_SET_SCREEN("megadriv")
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker",0.25)
+ SEGA315_5313(config, m_vdp, MASTER_CLOCK_PAL, m_maincpu);
+ m_vdp->set_is_pal(true);
+ m_vdp->snd_irq().set(FUNC(md_base_state::vdp_sndirqline_callback_genesis_z80));
+ m_vdp->lv6_irq().set(FUNC(md_base_state::vdp_lv6irqline_callback_genesis_68k));
+ m_vdp->lv4_irq().set(FUNC(md_base_state::vdp_lv4irqline_callback_genesis_68k));
+ m_vdp->set_screen("megadriv");
+ m_vdp->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_vdp->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
MCFG_SCREEN_ADD("megadriv", RASTER)
MCFG_SCREEN_REFRESH_RATE(50)
diff --git a/src/mame/machine/mmboard.cpp b/src/mame/machine/mmboard.cpp
index 30483da163e..67d86c7c260 100644
--- a/src/mame/machine/mmboard.cpp
+++ b/src/mame/machine/mmboard.cpp
@@ -330,8 +330,8 @@ MACHINE_CONFIG_START(mephisto_display_modul_device::device_add_mconfig)
MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(mephisto_display_modul_device::lcd_palette), 2);
- MCFG_HD44780_ADD("hd44780")
- MCFG_HD44780_LCD_SIZE(2, 16)
+ HD44780(config, m_lcdc, 0);
+ m_lcdc->set_lcd_size(2, 16);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/video/kyocera.cpp b/src/mame/video/kyocera.cpp
index eb0659c0683..ac510959eba 100644
--- a/src/mame/video/kyocera.cpp
+++ b/src/mame/video/kyocera.cpp
@@ -20,16 +20,8 @@ void tandy200_state::tandy200_palette(palette_device &palette) const
uint32_t kc85_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- m_lcdc0->screen_update(screen, bitmap, cliprect);
- m_lcdc1->screen_update(screen, bitmap, cliprect);
- m_lcdc2->screen_update(screen, bitmap, cliprect);
- m_lcdc3->screen_update(screen, bitmap, cliprect);
- m_lcdc4->screen_update(screen, bitmap, cliprect);
- m_lcdc5->screen_update(screen, bitmap, cliprect);
- m_lcdc6->screen_update(screen, bitmap, cliprect);
- m_lcdc7->screen_update(screen, bitmap, cliprect);
- m_lcdc8->screen_update(screen, bitmap, cliprect);
- m_lcdc9->screen_update(screen, bitmap, cliprect);
+ for (uint8_t i = 0; i < 10; i++)
+ m_lcdc[i]->screen_update(screen, bitmap, cliprect);
return 0;
}
@@ -57,16 +49,16 @@ MACHINE_CONFIG_START(kc85_state::kc85_video)
PALETTE(config, "palette", FUNC(kc85_state::kc85_palette), 2);
- MCFG_HD44102_ADD(HD44102_0_TAG, SCREEN_TAG, 0, 0)
- MCFG_HD44102_ADD(HD44102_1_TAG, SCREEN_TAG, 50, 0)
- MCFG_HD44102_ADD(HD44102_2_TAG, SCREEN_TAG, 100, 0)
- MCFG_HD44102_ADD(HD44102_3_TAG, SCREEN_TAG, 150, 0)
- MCFG_HD44102_ADD(HD44102_4_TAG, SCREEN_TAG, 200, 0)
- MCFG_HD44102_ADD(HD44102_5_TAG, SCREEN_TAG, 0, 32)
- MCFG_HD44102_ADD(HD44102_6_TAG, SCREEN_TAG, 50, 32)
- MCFG_HD44102_ADD(HD44102_7_TAG, SCREEN_TAG, 100, 32)
- MCFG_HD44102_ADD(HD44102_8_TAG, SCREEN_TAG, 150, 32)
- MCFG_HD44102_ADD(HD44102_9_TAG, SCREEN_TAG, 200, 32)
+ HD44102(config, m_lcdc[0], 0, SCREEN_TAG, 0, 0);
+ HD44102(config, m_lcdc[1], 0, SCREEN_TAG, 50, 0);
+ HD44102(config, m_lcdc[2], 0, SCREEN_TAG, 100, 0);
+ HD44102(config, m_lcdc[3], 0, SCREEN_TAG, 150, 0);
+ HD44102(config, m_lcdc[4], 0, SCREEN_TAG, 200, 0);
+ HD44102(config, m_lcdc[5], 0, SCREEN_TAG, 0, 32);
+ HD44102(config, m_lcdc[6], 0, SCREEN_TAG, 50, 32);
+ HD44102(config, m_lcdc[7], 0, SCREEN_TAG, 100, 32);
+ HD44102(config, m_lcdc[8], 0, SCREEN_TAG, 150, 32);
+ HD44102(config, m_lcdc[9], 0, SCREEN_TAG, 200, 32);
// MCFG_HD44103_MASTER_ADD("m11", SCREEN_TAG, CAP_P(18), RES_K(100), HD44103_FS_HIGH, HD44103_DUTY_1_32)
// MCFG_HD44103_SLAVE_ADD( "m12", "m11", SCREEN_TAG, HD44103_FS_HIGH, HD44103_DUTY_1_32)
@@ -82,7 +74,7 @@ MACHINE_CONFIG_START(tandy200_state::tandy200_video)
PALETTE(config, "palette", FUNC(tandy200_state::tandy200_palette), 2);
- MCFG_DEVICE_ADD(HD61830_TAG, HD61830, XTAL(4'915'200)/2/2)
- MCFG_DEVICE_ADDRESS_MAP(0, tandy200_lcdc)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
+ HD61830(config, m_lcdc, XTAL(4'915'200)/2/2);
+ m_lcdc->set_addrmap(0, &tandy200_state::tandy200_lcdc);
+ m_lcdc->set_screen(SCREEN_TAG);
MACHINE_CONFIG_END