summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-28 14:59:40 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-28 14:59:40 +0100
commit7c1999d4edbc9205dcf8cc3e64a790fbeef4ef63 (patch) (github)
treeed26bfe3702fb7f6ab7a3968e1533c038f0452c1
parentd3368ea66e71824d1891f15c11529b4a6e9a4667 (diff)
downloadmame-7c1999d4edbc9205dcf8cc3e64a790fbeef4ef63.tar.bz2
mame-7c1999d4edbc9205dcf8cc3e64a790fbeef4ef63.zip
mame\drivers: removed most MCFG and MACHINE_CONFIG_MACROS (nw)
-rw-r--r--src/devices/bus/vme/vme.h39
-rw-r--r--src/devices/bus/vme/vme_mzr8105.cpp12
-rw-r--r--src/devices/machine/ldp1000.h7
-rw-r--r--src/devices/machine/ldpr8210.h2
-rw-r--r--src/devices/machine/ldstub.h11
-rw-r--r--src/devices/machine/ldv1000.h6
-rw-r--r--src/devices/machine/ldvp931.h8
-rw-r--r--src/mame/drivers/cliffhgr.cpp22
-rw-r--r--src/mame/drivers/deco_ld.cpp26
-rw-r--r--src/mame/drivers/dlair.cpp30
-rw-r--r--src/mame/drivers/esh.cpp24
-rw-r--r--src/mame/drivers/fccpu20.cpp75
-rw-r--r--src/mame/drivers/fccpu30.cpp15
-rw-r--r--src/mame/drivers/firefox.cpp54
-rw-r--r--src/mame/drivers/force68k.cpp15
-rw-r--r--src/mame/drivers/hk68v10.cpp13
-rw-r--r--src/mame/drivers/konblands.cpp29
-rw-r--r--src/mame/drivers/labyrunr.cpp28
-rw-r--r--src/mame/drivers/ladybug.cpp68
-rw-r--r--src/mame/drivers/laser3k.cpp29
-rw-r--r--src/mame/drivers/lasso.cpp89
-rw-r--r--src/mame/drivers/lastbank.cpp37
-rw-r--r--src/mame/drivers/lastfght.cpp26
-rw-r--r--src/mame/drivers/laz_awetoss.cpp17
-rw-r--r--src/mame/drivers/laz_ribrac.cpp15
-rw-r--r--src/mame/drivers/lazercmd.cpp78
-rw-r--r--src/mame/drivers/lbeach.cpp26
-rw-r--r--src/mame/drivers/lc80.cpp36
-rw-r--r--src/mame/drivers/lckydraw.cpp9
-rw-r--r--src/mame/drivers/lcmate2.cpp25
-rw-r--r--src/mame/drivers/ldplayer.cpp5
-rw-r--r--src/mame/drivers/leapster.cpp16
-rw-r--r--src/mame/drivers/learnwin.cpp14
-rw-r--r--src/mame/drivers/leland.cpp72
-rw-r--r--src/mame/drivers/lemmings.cpp40
-rw-r--r--src/mame/drivers/lethalj.cpp33
-rw-r--r--src/mame/drivers/lg-dvd.cpp9
-rw-r--r--src/mame/drivers/lgp.cpp29
-rw-r--r--src/mame/drivers/liberate.cpp115
-rw-r--r--src/mame/drivers/lilith.cpp5
-rw-r--r--src/mame/drivers/lindbergh.cpp7
-rw-r--r--src/mame/drivers/llc.cpp43
-rw-r--r--src/mame/drivers/lockon.cpp36
-rw-r--r--src/mame/drivers/lsasquad.cpp72
-rw-r--r--src/mame/drivers/ltcasino.cpp25
-rw-r--r--src/mame/drivers/ltd.cpp14
-rw-r--r--src/mame/drivers/luckgrln.cpp40
-rw-r--r--src/mame/drivers/lvcards.cpp43
-rw-r--r--src/mame/drivers/lviv.cpp33
-rw-r--r--src/mame/drivers/lynx.cpp18
-rw-r--r--src/mame/drivers/miniforce.cpp27
-rw-r--r--src/mame/drivers/mvme147.cpp10
-rw-r--r--src/mame/drivers/mzr8105.cpp14
-rw-r--r--src/mame/includes/ladybug.h3
-rw-r--r--src/mame/includes/lvcards.h5
55 files changed, 778 insertions, 821 deletions
diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h
index 7af8d0961c0..edce2cd1246 100644
--- a/src/devices/bus/vme/vme.h
+++ b/src/devices/bus/vme/vme.h
@@ -57,10 +57,6 @@
#define VME_BUS_TAG "vme"
-// Callbacks to the board from the VME bus comes through here
-#define MCFG_VME_J1_CB(_devcb) \
- downcast<vme_slot_device &>(*device).set_vme_j1_callback(DEVCB_##_devcb);
-
//void vme_slot1(device_slot_interface &device); // Disabled until we know how to combine a board driver and a slot device.
void vme_slots(device_slot_interface &device);
@@ -89,9 +85,22 @@ public:
};
// construction/destruction
+ template <typename T>
+ vme_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, uint32_t slot_nbr, char const *bus_tag)
+ : vme_slot_device(mconfig, tag, owner, 0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ set_vme_slot(bus_tag, tag);
+ update_vme_chains(slot_nbr);
+ }
+
vme_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_vme_j1_callback(Object &&cb) { return m_vme_j1_callback.set_callback(std::forward<Object>(cb)); }
+ // Callbacks to the board from the VME bus comes through here
+ auto vme_j1_callback() { return m_vme_j1_callback.bind(); }
void set_vme_slot(const char *tag, const char *slottag);
void update_vme_chains(uint32_t slot_nbr);
@@ -116,18 +125,6 @@ protected:
DECLARE_DEVICE_TYPE(VME, vme_device)
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_VME_DEVICE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, VME, 0)
-
-#define MCFG_VME_CPU(_cputag) \
- downcast<vme_device &>(*device).set_cputag(_cputag);
-
-#define MCFG_VME_BUS_OWNER_SPACES() \
- downcast<vme_device &>(*device).use_owner_spaces();
class vme_card_interface;
@@ -241,12 +238,4 @@ private:
device_vme_card_interface *m_next;
};
-#define MCFG_VME_SLOT_ADD(_tag, _slotnbr, _slot_intf,_def_slot) \
- { std::string stag = "slot" + std::to_string(_slotnbr); \
- MCFG_DEVICE_ADD(stag.c_str(), VME_SLOT, 0); \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false); \
- downcast<vme_slot_device &>(*device).set_vme_slot(_tag, stag.c_str()); \
- downcast<vme_slot_device &>(*device).update_vme_chains(_slotnbr); \
- }
-
#endif // MAME_BUS_VME_VME_H
diff --git a/src/devices/bus/vme/vme_mzr8105.cpp b/src/devices/bus/vme/vme_mzr8105.cpp
index 985f6bad905..fe63e92ee28 100644
--- a/src/devices/bus/vme/vme_mzr8105.cpp
+++ b/src/devices/bus/vme/vme_mzr8105.cpp
@@ -36,13 +36,13 @@ DEFINE_DEVICE_TYPE(VME_MZR8105, vme_mzr8105_card_device, "mzr8105", "Mizar 8105
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(vme_mzr8105_card_device::device_add_mconfig)
+void vme_mzr8105_card_device::device_add_mconfig(machine_config &config)
{
- MCFG_DEVICE_ADD ("maincpu", M68000, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP (mzr8105_mem)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_BUS_OWNER_SPACES()
- MCFG_VME_SLOT_ADD ("vme", 1, mzr8105_vme_cards, "mzr8300")
+ M68000(config, m_maincpu, XTAL(10'000'000))
+ m_maincpu->set_addrmap(AS_PROGRAM, &vme_mzr8105_card_device::mzr8105_mem);
+
+ VME(config, "vme", 0).use_owner_spaces();
+ VME_SLOT(config, "slot1", mzr8105_vme_cards, "mzr8300", 1, "vme");
}
vme_mzr8105_card_device::vme_mzr8105_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h
index 1f3140f14e8..b3f420afb6e 100644
--- a/src/devices/machine/ldp1000.h
+++ b/src/devices/machine/ldp1000.h
@@ -15,13 +15,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_LDP1000_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, SONY_LDP1000, 0)
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h
index f142229314c..fc0a28d6d26 100644
--- a/src/devices/machine/ldpr8210.h
+++ b/src/devices/machine/ldpr8210.h
@@ -23,8 +23,6 @@
#define MCFG_LASERDISC_PR8210_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PIONEER_PR8210, 0)
-#define MCFG_LASERDISC_SIMUTREK_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, SIMUTREK_SPECIAL, 0)
//**************************************************************************
diff --git a/src/devices/machine/ldstub.h b/src/devices/machine/ldstub.h
index 4bf463b897d..8f450d01100 100644
--- a/src/devices/machine/ldstub.h
+++ b/src/devices/machine/ldstub.h
@@ -17,16 +17,6 @@
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_PR7820_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PIONEER_PR7820, 0)
-#define MCFG_LASERDISC_22VP932_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PHILLIPS_22VP932, 0)
-
-
-//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
@@ -35,7 +25,6 @@ DECLARE_DEVICE_TYPE(PIONEER_PR7820, pioneer_pr7820_device)
DECLARE_DEVICE_TYPE(PHILLIPS_22VP932, phillips_22vp932_device)
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h
index 661d0a44f0b..55516da36fe 100644
--- a/src/devices/machine/ldv1000.h
+++ b/src/devices/machine/ldv1000.h
@@ -26,10 +26,6 @@
#define MCFG_LASERDISC_LDV1000_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PIONEER_LDV1000, 0)
-#define MCFG_LASERDISC_LDV1000_COMMAND_STROBE_CB(_cb) \
- downcast<pioneer_ldv1000_device *>(device)->set_command_strobe_callback(DEVCB_##_cb);
-
-
//**************************************************************************
// GLOBAL VARIABLES
@@ -53,7 +49,7 @@ public:
// construction/destruction
pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class cmd_strobe_cb> devcb_base &set_command_strobe_callback(cmd_strobe_cb &&latch) { return m_command_strobe_cb.set_callback(std::forward<cmd_strobe_cb>(latch)); }
+ auto command_strobe_callback() { return m_command_strobe_cb.bind(); }
// input and output
void data_w(uint8_t data);
diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h
index 0bf2e263558..2c961d5a419 100644
--- a/src/devices/machine/ldvp931.h
+++ b/src/devices/machine/ldvp931.h
@@ -18,14 +18,6 @@
//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LASERDISC_22VP931_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PHILLIPS_22VP931, 0)
-
-
-//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
diff --git a/src/mame/drivers/cliffhgr.cpp b/src/mame/drivers/cliffhgr.cpp
index 2096eedf939..688798a3b98 100644
--- a/src/mame/drivers/cliffhgr.cpp
+++ b/src/mame/drivers/cliffhgr.cpp
@@ -689,17 +689,18 @@ INPUT_PORTS_END
*************************************/
MACHINE_CONFIG_START(cliffhgr_state::cliffhgr)
-
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4MHz */
- MCFG_DEVICE_PROGRAM_MAP(mainmem)
- MCFG_DEVICE_IO_MAP(mainport)
+ Z80(config, m_maincpu, 4000000); /* 4MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cliffhgr_state::mainmem);
+ m_maincpu->set_addrmap(AS_IO, &cliffhgr_state::mainport);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_LASERDISC_PR8210_ADD("laserdisc")
- MCFG_LASERDISC_OVERLAY_DEVICE(tms9928a_device::TOTAL_HORZ, tms9928a_device::TOTAL_VERT_NTSC, "tms9928a", tms9928a_device, screen_update)
- MCFG_LASERDISC_OVERLAY_CLIP(tms9928a_device::HORZ_DISPLAY_START-12, tms9928a_device::HORZ_DISPLAY_START+32*8+12-1, tms9928a_device::VERT_DISPLAY_START_NTSC - 12, tms9928a_device::VERT_DISPLAY_START_NTSC+24*8+12-1)
+ PIONEER_PR8210(config, m_laserdisc, 0);
+ m_laserdisc->set_overlay(tms9928a_device::TOTAL_HORZ, tms9928a_device::TOTAL_VERT_NTSC, "tms9928a", FUNC(tms9928a_device::screen_update));
+ m_laserdisc->set_overlay_clip(tms9928a_device::HORZ_DISPLAY_START-12, tms9928a_device::HORZ_DISPLAY_START+32*8+12-1, tms9928a_device::VERT_DISPLAY_START_NTSC - 12, tms9928a_device::VERT_DISPLAY_START_NTSC+24*8+12-1);
+ m_laserdisc->add_route(0, "lspeaker", 1.0);
+ m_laserdisc->add_route(1, "rspeaker", 1.0);
/* start with the TMS9928a video configuration */
tms9128_device &vdp(TMS9128(config, "tms9928a", XTAL(10'738'635))); /* TMS9128NL on the board */
@@ -713,12 +714,7 @@ MACHINE_CONFIG_START(cliffhgr_state::cliffhgr)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-
- MCFG_DEVICE_ADD("discrete", DISCRETE, cliffhgr_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ DISCRETE(config, m_discrete, cliffhgr_discrete).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp
index cad7ecbe2a0..8caa719787b 100644
--- a/src/mame/drivers/deco_ld.cpp
+++ b/src/mame/drivers/deco_ld.cpp
@@ -465,20 +465,22 @@ void deco_ld_state::machine_start()
MACHINE_CONFIG_START(deco_ld_state::rblaster)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M6502,8000000/2)
- MCFG_DEVICE_PROGRAM_MAP(rblaster_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", deco_ld_state, irq0_line_hold)
+ M6502(config, m_maincpu, 8000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &deco_ld_state::rblaster_map);
+ m_maincpu->set_vblank_int("screen", FUNC(deco_ld_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu",M6502,8000000/2)
- MCFG_DEVICE_PROGRAM_MAP(rblaster_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(deco_ld_state, sound_interrupt, 640)
+ M6502(config, m_audiocpu, 8000000/2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &deco_ld_state::rblaster_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(deco_ld_state::sound_interrupt), attotime::from_hz(640));
// config.m_minimum_quantum = attotime::from_hz(6000);
- MCFG_LASERDISC_LDP1000_ADD("laserdisc")
- MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, deco_ld_state, screen_update_rblaster)
- //MCFG_LASERDISC_OVERLAY_CLIP(0, 256-1, 8, 240-1)
- MCFG_LASERDISC_OVERLAY_PALETTE(m_palette)
+ SONY_LDP1000(config, m_laserdisc, 0);
+ m_laserdisc->set_overlay(256, 256, FUNC(deco_ld_state::screen_update_rblaster));
+ //m_laserdisc->set_overlay_clip(0, 256-1, 8, 240-1);
+ m_laserdisc->set_overlay_palette(m_palette);
+ m_laserdisc->add_route(0, "lspeaker", 1.0);
+ m_laserdisc->add_route(1, "rspeaker", 1.0);
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
@@ -500,10 +502,6 @@ MACHINE_CONFIG_START(deco_ld_state::rblaster)
AY8910(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25);
AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25);
-
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp
index 7540a61f0b6..e4db1e43738 100644
--- a/src/mame/drivers/dlair.cpp
+++ b/src/mame/drivers/dlair.cpp
@@ -744,18 +744,18 @@ void dlair_state::dlair_base(machine_config &config)
MACHINE_CONFIG_START(dlair_state::dlair_pr7820)
dlair_base(config);
- MCFG_LASERDISC_PR7820_ADD("ld_pr7820")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ PIONEER_PR7820(config, m_pr7820, 0);
+ m_pr7820->add_route(0, "lspeaker", 1.0);
+ m_pr7820->add_route(1, "rspeaker", 1.0);
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "ld_pr7820")
MACHINE_CONFIG_END
MACHINE_CONFIG_START(dlair_state::dlair_ldv1000)
dlair_base(config);
- MCFG_LASERDISC_LDV1000_ADD("ld_ldv1000")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ PIONEER_LDV1000(config, m_ldv1000, 0);
+ m_ldv1000->add_route(0, "lspeaker", 1.0);
+ m_ldv1000->add_route(1, "rspeaker", 1.0);
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "ld_ldv1000")
MACHINE_CONFIG_END
@@ -778,9 +778,11 @@ MACHINE_CONFIG_START(dlair_state::dleuro)
WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_CLOCK_EURO/(16*16*16*16*16*8)));
- MCFG_LASERDISC_22VP932_ADD("ld_22vp932")
- MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, dlair_state, screen_update_dleuro)
- MCFG_LASERDISC_OVERLAY_PALETTE(m_palette)
+ PHILLIPS_22VP932(config, m_22vp932, 0);
+ m_22vp932->set_overlay(256, 256, FUNC(dlair_state::screen_update_dleuro));
+ m_22vp932->set_overlay_palette(m_palette);
+ m_22vp932->add_route(0, "lspeaker", 1.0);
+ m_22vp932->add_route(1, "rspeaker", 1.0);
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_PAL("screen", "ld_22vp932")
@@ -792,13 +794,9 @@ MACHINE_CONFIG_START(dlair_state::dleuro)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.33)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.33)
-
- MCFG_DEVICE_MODIFY("ld_22vp932")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ SPEAKER_SOUND(config, m_speaker);
+ m_speaker->add_route(ALL_OUTPUTS, "lspeaker", 0.33);
+ m_speaker->add_route(ALL_OUTPUTS, "rspeaker", 0.33);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/esh.cpp b/src/mame/drivers/esh.cpp
index 4137a8e7b12..6fb6c3f2f08 100644
--- a/src/mame/drivers/esh.cpp
+++ b/src/mame/drivers/esh.cpp
@@ -361,17 +361,19 @@ void esh_state::machine_start()
/* DRIVER */
MACHINE_CONFIG_START(esh_state::esh)
/* main cpu */
- MCFG_DEVICE_ADD("maincpu", Z80, PCB_CLOCK/6) /* The denominator is a Daphne guess based on PacMan's hardware */
- MCFG_DEVICE_PROGRAM_MAP(z80_0_mem)
- MCFG_DEVICE_IO_MAP(z80_0_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", esh_state, vblank_callback_esh)
+ Z80(config, m_maincpu, PCB_CLOCK/6); /* The denominator is a Daphne guess based on PacMan's hardware */
+ m_maincpu->set_addrmap(AS_PROGRAM, &esh_state::z80_0_mem);
+ m_maincpu->set_addrmap(AS_IO, &esh_state::z80_0_io);
+ m_maincpu->set_vblank_int("screen", FUNC(esh_state::vblank_callback_esh));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_LASERDISC_LDV1000_ADD("laserdisc")
- MCFG_LASERDISC_LDV1000_COMMAND_STROBE_CB(WRITELINE(*this, esh_state, ld_command_strobe_cb))
- MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, esh_state, screen_update_esh)
- MCFG_LASERDISC_OVERLAY_PALETTE(m_palette)
+ PIONEER_LDV1000(config, m_laserdisc, 0);
+ m_laserdisc->command_strobe_callback().set(FUNC(esh_state::ld_command_strobe_cb));
+ m_laserdisc->set_overlay(256, 256, FUNC(esh_state::screen_update_esh));
+ m_laserdisc->set_overlay_palette(m_palette);
+ m_laserdisc->add_route(0, "lspeaker", 1.0);
+ m_laserdisc->add_route(1, "rspeaker", 1.0);
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
@@ -383,12 +385,8 @@ MACHINE_CONFIG_START(esh_state::esh)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 2000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.25);
MACHINE_CONFIG_END
// we just disable even lines so we can simulate line blinking
diff --git a/src/mame/drivers/fccpu20.cpp b/src/mame/drivers/fccpu20.cpp
index 16cec979f3a..df443f4841f 100644
--- a/src/mame/drivers/fccpu20.cpp
+++ b/src/mame/drivers/fccpu20.cpp
@@ -154,40 +154,47 @@ static void cpu21yb_vme_cards(device_slot_interface &device)
}
/* Machine configurations */
-MACHINE_CONFIG_START(cpu20_state::cpu20)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu20_vme_cards, "fccpu20")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21s)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21s_vme_cards, "fccpu21s")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21_vme_cards, "fccpu21")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21a)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21a_vme_cards, "fccpu21a")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21ya)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21ya_vme_cards, "fccpu21ya")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21b)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21b_vme_cards, "fccpu21b")
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cpu20_state::cpu21yb)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, cpu21yb_vme_cards, "fccpu21yb")
-MACHINE_CONFIG_END
+void cpu20_state::cpu20(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu20_vme_cards, "fccpu20", 1, "vme");
+}
+
+void cpu20_state::cpu21s(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21s_vme_cards, "fccpu21s", 1, "vme");
+}
+
+void cpu20_state::cpu21(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21_vme_cards, "fccpu21", 1, "vme");
+}
+
+void cpu20_state::cpu21a(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21a_vme_cards, "fccpu21a", 1, "vme");
+}
+
+void cpu20_state::cpu21ya(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21ya_vme_cards, "fccpu21ya", 1, "vme");
+}
+
+void cpu20_state::cpu21b(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21b_vme_cards, "fccpu21b", 1, "vme");
+}
+
+void cpu20_state::cpu21yb(machine_config &config)
+{
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", cpu21yb_vme_cards, "fccpu21yb", 1, "vme");
+}
/* ROM configurations */
ROM_START(fccpu20sbc) ROM_END
diff --git a/src/mame/drivers/fccpu30.cpp b/src/mame/drivers/fccpu30.cpp
index b2515727109..c7f5b9081f1 100644
--- a/src/mame/drivers/fccpu30.cpp
+++ b/src/mame/drivers/fccpu30.cpp
@@ -658,15 +658,16 @@ static void fccpu30_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(cpu30_state::cpu30)
+void cpu30_state::cpu30(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68030, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(cpu30_mem)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("fga002", fga002_device, iack)
+ M68030(config, m_maincpu, XTAL(25'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &cpu30_state::cpu30_mem);
+ m_maincpu->set_irq_acknowledge_callback("fga002", FUNC(fga002_device::iack));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD("vme", 1, fccpu30_vme_cards, nullptr)
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", fccpu30_vme_cards, nullptr, 1, "vme");
/* Terminal Port config */
/* Force CPU30 series of boards has up to four serial ports, p1-p4, the FGA boot uses p4 as console and subsequent
firmware uses p1 as console and in an operating system environment there may be user login shells on the other.
@@ -760,7 +761,7 @@ MACHINE_CONFIG_START(cpu30_state::cpu30)
// dual ported ram
RAM(config, m_ram).set_default_size("4M").set_extra_options("8M, 16M, 32M");
-MACHINE_CONFIG_END
+}
/* SYS68K/CPU-30X Part No.1 01300: 16.7 MHz 68030 based CPU board with 68882 FPCP, DMAC, 1 Mbyte Dual Ported RAM capacity and VMEPROM. */
MACHINE_CONFIG_START(cpu30_state::cpu30x)
diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp
index e7759684dcb..46ef9f4e30e 100644
--- a/src/mame/drivers/firefox.cpp
+++ b/src/mame/drivers/firefox.cpp
@@ -650,13 +650,13 @@ GFXDECODE_END
MACHINE_CONFIG_START(firefox_state::firefox)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_XTAL/8) // 68B09E
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ MC6809E(config, m_maincpu, MASTER_XTAL/8); // 68B09E
+ m_maincpu->set_addrmap(AS_PROGRAM, &firefox_state::main_map);
/* interrupts count starting at end of VBLANK, which is 44, so add 44 */
TIMER(config, "32v").configure_scanline(FUNC(firefox_state::video_timer_callback), "screen", 96+44, 128);
- MCFG_DEVICE_ADD("audiocpu", M6502, MASTER_XTAL/8)
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
+ M6502(config, m_audiocpu, MASTER_XTAL/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &firefox_state::audio_map);
config.m_minimum_quantum = attotime::from_hz(60000);
@@ -688,12 +688,14 @@ MACHINE_CONFIG_START(firefox_state::firefox)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_firefox);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, m_palette).set_entries(512);
- MCFG_LASERDISC_22VP931_ADD("laserdisc")
- MCFG_LASERDISC_OVERLAY_DRIVER(64*8, 525, firefox_state, screen_update_firefox)
- MCFG_LASERDISC_OVERLAY_CLIP(7*8, 53*8-1, 44, 480+44)
- MCFG_LASERDISC_OVERLAY_PALETTE("palette")
+ PHILLIPS_22VP931(config, m_laserdisc, 0);
+ m_laserdisc->set_overlay(64*8, 525, FUNC(firefox_state::screen_update_firefox));
+ m_laserdisc->set_overlay_clip(7*8, 53*8-1, 44, 480+44);
+ m_laserdisc->set_overlay_palette(m_palette);
+ m_laserdisc->add_route(0, "lspeaker", 0.50);
+ m_laserdisc->add_route(1, "rspeaker", 0.50);
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
@@ -716,29 +718,25 @@ MACHINE_CONFIG_START(firefox_state::firefox)
GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_DEVICE_ADD("pokey1", POKEY, MASTER_XTAL/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
+ pokey_device &pokey1(POKEY(config, "pokey1", MASTER_XTAL/8));
+ pokey1.add_route(ALL_OUTPUTS, "lspeaker", 0.30);
+ pokey1.add_route(ALL_OUTPUTS, "rspeaker", 0.30);
- MCFG_DEVICE_ADD("pokey2", POKEY, MASTER_XTAL/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
+ pokey_device &pokey2(POKEY(config, "pokey2", MASTER_XTAL/8));
+ pokey2.add_route(ALL_OUTPUTS, "lspeaker", 0.30);
+ pokey2.add_route(ALL_OUTPUTS, "rspeaker", 0.30);
- MCFG_DEVICE_ADD("pokey3", POKEY, MASTER_XTAL/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
+ pokey_device &pokey3(POKEY(config, "pokey3", MASTER_XTAL/8));
+ pokey3.add_route(ALL_OUTPUTS, "lspeaker", 0.30);
+ pokey3.add_route(ALL_OUTPUTS, "rspeaker", 0.30);
- MCFG_DEVICE_ADD("pokey4", POKEY, MASTER_XTAL/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.30)
+ pokey_device &pokey4(POKEY(config, "pokey4", MASTER_XTAL/8));
+ pokey4.add_route(ALL_OUTPUTS, "lspeaker", 0.30);
+ pokey4.add_route(ALL_OUTPUTS, "rspeaker", 0.30);
- MCFG_DEVICE_ADD("tms", TMS5220, MASTER_XTAL/2/11)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
-
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
+ TMS5220(config, m_tms, MASTER_XTAL/2/11);
+ m_tms->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ m_tms->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp
index 974008b452d..d7fe7fd7ada 100644
--- a/src/mame/drivers/force68k.cpp
+++ b/src/mame/drivers/force68k.cpp
@@ -543,15 +543,16 @@ static void fccpu1_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(force68k_state::fccpu1)
+void force68k_state::fccpu1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(force68k_mem)
+ M68000(config, m_maincpu, XTAL(16'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &force68k_state::force68k_mem);
/* P3/Host Port config
* LO command causes ROM monitor to expect S-records on HOST port by default
* Implementation through nullmodem currently does not support handshakes so
- * the ROM momitor is over-run while checking for checksums etc if used with
+ * the ROM monitor is over-run while checking for checksums etc if used with
* UI mount <file> feature.
*/
ACIA6850(config, m_aciahost, 0);
@@ -608,9 +609,9 @@ MACHINE_CONFIG_START(force68k_state::fccpu1)
fccpu1_eprom_sockets(config);
// VME interface
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD("vme", 1, fccpu1_vme_cards, nullptr)
-MACHINE_CONFIG_END
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", fccpu1_vme_cards, nullptr, 1, "vme");
+}
#if 0 /*
* CPU-6 family is device and adressmap compatible with CPU-1 but with additions
diff --git a/src/mame/drivers/hk68v10.cpp b/src/mame/drivers/hk68v10.cpp
index 935d25039c6..2f5598f22ae 100644
--- a/src/mame/drivers/hk68v10.cpp
+++ b/src/mame/drivers/hk68v10.cpp
@@ -337,10 +337,11 @@ static void hk68_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(hk68v10_state::hk68v10)
+void hk68v10_state::hk68v10(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68010, 10_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP (hk68v10_mem)
+ M68010(config, m_maincpu, 10_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &hk68v10_state::hk68v10_mem);
Z8536(config, "cio", SCC_CLOCK);
@@ -354,9 +355,9 @@ MACHINE_CONFIG_START(hk68v10_state::hk68v10)
rs232trm.rxd_handler().set(m_sccterm, FUNC(scc8530_device::rxa_w));
rs232trm.cts_handler().set(m_sccterm, FUNC(scc8530_device::ctsa_w));
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD("vme", 1, hk68_vme_cards, nullptr)
-MACHINE_CONFIG_END
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", hk68_vme_cards, nullptr, 1, "vme");
+}
/* ROM definitions */
ROM_START (hk68v10)
diff --git a/src/mame/drivers/konblands.cpp b/src/mame/drivers/konblands.cpp
index 693e9d80eb0..4edf9ddf888 100644
--- a/src/mame/drivers/konblands.cpp
+++ b/src/mame/drivers/konblands.cpp
@@ -279,17 +279,17 @@ WRITE_LINE_MEMBER(konblands_state::ld_command_strobe_cb)
MACHINE_CONFIG_START(konblands_state::konblands)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",MC6809E,MASTER_CLOCK/12)
- MCFG_DEVICE_PROGRAM_MAP(konblands_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", konblands_state, vblank_irq)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(konblands_state, timer_irq, 8) // 8 times per frame
+ MC6809E(config, m_maincpu, MASTER_CLOCK/12);
+ m_maincpu->set_addrmap(AS_PROGRAM, &konblands_state::konblands_map);
+ m_maincpu->set_vblank_int("screen", FUNC(konblands_state::vblank_irq));
+ m_maincpu->set_periodic_int(FUNC(konblands_state::timer_irq), attotime::from_hz(8)); // 8 times per frame
/* video hardware */
- MCFG_LASERDISC_LDV1000_ADD("laserdisc")
- MCFG_LASERDISC_LDV1000_COMMAND_STROBE_CB(WRITELINE(*this, konblands_state, ld_command_strobe_cb))
+ PIONEER_LDV1000(config, m_laserdisc, 0);
+ m_laserdisc->command_strobe_callback().set(FUNC(konblands_state::ld_command_strobe_cb));
// TODO: might be different
- MCFG_LASERDISC_OVERLAY_DRIVER(512, 256, konblands_state, screen_update)
- MCFG_LASERDISC_OVERLAY_PALETTE("palette")
+ m_laserdisc->set_overlay(512, 256, FUNC(konblands_state::screen_update));
+ m_laserdisc->set_overlay_palette("palette");
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
@@ -300,15 +300,14 @@ MACHINE_CONFIG_START(konblands_state::konblands)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn", SN76496, MASTER_CLOCK/12)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ SN76496(config, "sn", MASTER_CLOCK/12).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
-MACHINE_CONFIG_START(konblands_state::konblandsh)
+void konblands_state::konblandsh(machine_config &config)
+{
konblands(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(konblandsh_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &konblands_state::konblandsh_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/labyrunr.cpp b/src/mame/drivers/labyrunr.cpp
index 41101cb84ec..5309b55a80f 100644
--- a/src/mame/drivers/labyrunr.cpp
+++ b/src/mame/drivers/labyrunr.cpp
@@ -164,24 +164,24 @@ void labyrunr_state::machine_start()
membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x4000);
}
-MACHINE_CONFIG_START(labyrunr_state::labyrunr)
-
+void labyrunr_state::labyrunr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309, 3000000*4) /* 24MHz/8? */
- MCFG_DEVICE_PROGRAM_MAP(labyrunr_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(labyrunr_state, labyrunr_timer_interrupt, 4*60)
+ HD6309(config, m_maincpu, 3000000*4); /* 24MHz/8? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &labyrunr_state::labyrunr_map);
+ m_maincpu->set_periodic_int(FUNC(labyrunr_state::labyrunr_timer_interrupt), attotime::from_hz(4*60));
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(37*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 35*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(labyrunr_state, screen_update_labyrunr)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, labyrunr_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(37*8, 32*8);
+ screen.set_visarea(0*8, 35*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(labyrunr_state::screen_update_labyrunr));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(labyrunr_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_labyrunr);
PALETTE(config, m_palette, FUNC(labyrunr_state::labyrunr_palette));
@@ -209,7 +209,7 @@ MACHINE_CONFIG_START(labyrunr_state::labyrunr)
ym2.add_route(1, "mono", 0.40);
ym2.add_route(2, "mono", 0.40);
ym2.add_route(3, "mono", 0.80);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/ladybug.cpp b/src/mame/drivers/ladybug.cpp
index 55436fab490..14ee602e55d 100644
--- a/src/mame/drivers/ladybug.cpp
+++ b/src/mame/drivers/ladybug.cpp
@@ -721,20 +721,20 @@ void sraider_state::machine_reset()
}
-MACHINE_CONFIG_START(ladybug_state::ladybug)
-
+void ladybug_state::ladybug(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ladybug_map)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &ladybug_state::ladybug_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 4*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(ladybug_state, screen_update_ladybug)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(1*8, 31*8-1, 4*8, 28*8-1);
+ screen.set_screen_update(FUNC(ladybug_state::screen_update_ladybug));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_ladybug);
PALETTE(config, "palette", FUNC(ladybug_state::ladybug_palette), 4*8 + 4*16, 32);
@@ -749,36 +749,36 @@ MACHINE_CONFIG_START(ladybug_state::ladybug)
SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
SN76489(config, "sn2", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(dorodon_state::dorodon)
+void dorodon_state::dorodon(machine_config &config)
+{
ladybug(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sraider_state::sraider)
+ m_maincpu->set_addrmap(AS_OPCODES, &dorodon_state::decrypted_opcodes_map);
+}
+void sraider_state::sraider(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sraider_cpu1_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sraider_state, irq0_line_hold)
+ z80_device &maincpu(Z80(config, "maincpu", 4000000)); /* 4 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &sraider_state::sraider_cpu1_map);
+ maincpu.set_vblank_int("screen", FUNC(sraider_state::irq0_line_hold));
- MCFG_DEVICE_ADD("sub", Z80, 4000000) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sraider_cpu2_map)
- MCFG_DEVICE_IO_MAP(sraider_cpu2_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sraider_state, irq0_line_hold)
+ z80_device &sub(Z80(config, "sub", 4000000)); /* 4 MHz */
+ sub.set_addrmap(AS_PROGRAM, &sraider_state::sraider_cpu2_map);
+ sub.set_addrmap(AS_IO, &sraider_state::sraider_cpu2_io_map);
+ sub.set_vblank_int("screen", FUNC(sraider_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 4*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sraider_state, screen_update_sraider)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sraider_state, screen_vblank_sraider))
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(1*8, 31*8-1, 4*8, 28*8-1);
+ screen.set_screen_update(FUNC(sraider_state::screen_update_sraider));
+ screen.screen_vblank().set(FUNC(sraider_state::screen_vblank_sraider));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sraider);
PALETTE(config, m_palette, FUNC(sraider_state::sraider_palette), 4*8 + 4*16 + 32 + 2, 32 + 32 + 1);
@@ -794,7 +794,7 @@ MACHINE_CONFIG_START(sraider_state::sraider)
SN76489(config, "sn3", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
SN76489(config, "sn4", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
SN76489(config, "sn5", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/laser3k.cpp b/src/mame/drivers/laser3k.cpp
index e2d3d28bd7c..df772f96d27 100644
--- a/src/mame/drivers/laser3k.cpp
+++ b/src/mame/drivers/laser3k.cpp
@@ -972,18 +972,19 @@ void laser3k_state::laser3k_palette(palette_device &palette) const
palette.set_pen_colors(0, laser3k_pens);
}
-MACHINE_CONFIG_START(laser3k_state::laser3k)
+void laser3k_state::laser3k(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 1021800)
- MCFG_DEVICE_PROGRAM_MAP(laser3k_map)
+ M6502(config, m_maincpu, 1021800);
+ m_maincpu->set_addrmap(AS_PROGRAM, &laser3k_state::laser3k_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(300*2, 192)
- MCFG_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1)
- MCFG_SCREEN_UPDATE_DRIVER(laser3k_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(300*2, 192);
+ m_screen->set_visarea(0, (280*2)-1,0,192-1);
+ m_screen->set_screen_update(FUNC(laser3k_state::screen_update));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(laser3k_state::laser3k_palette), ARRAY_LENGTH(laser3k_pens));
@@ -1012,11 +1013,9 @@ MACHINE_CONFIG_START(laser3k_state::laser3k)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_DEVICE_ADD("sn76489", SN76489, 1020484)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
+ SN76489(config, m_sn, 1020484).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
ROM_START(las3000)
ROM_REGION(0x0800,"gfx1",0)
diff --git a/src/mame/drivers/lasso.cpp b/src/mame/drivers/lasso.cpp
index 176400d0b9d..f5ecc749f62 100644
--- a/src/mame/drivers/lasso.cpp
+++ b/src/mame/drivers/lasso.cpp
@@ -491,26 +491,26 @@ MACHINE_RESET_MEMBER(lasso_state,wwjgtin)
m_track_enable = 0;
}
-MACHINE_CONFIG_START(lasso_state::base)
-
+void lasso_state::base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 11289000/16) /* guess */
- MCFG_DEVICE_PROGRAM_MAP(lasso_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lasso_state, irq0_line_hold)
+ M6502(config, m_maincpu, 11289000/16); /* guess */
+ m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lasso_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", M6502, 600000)
- MCFG_DEVICE_PROGRAM_MAP(lasso_audio_map)
+ M6502(config, m_audiocpu, 600000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_audio_map);
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57) /* guess, but avoids glitching of Chameleon's high score table */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lasso_state, screen_update_lasso)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57); /* guess, but avoids glitching of Chameleon's high score table */
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lasso_state::screen_update_lasso));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lasso);
@@ -521,52 +521,49 @@ MACHINE_CONFIG_START(lasso_state::base)
SN76489(config, m_sn_1, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
SN76489(config, m_sn_2, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lasso_state::lasso)
+void lasso_state::lasso(machine_config &config)
+{
base(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("blitter", M6502, 11289000/16) /* guess */
- MCFG_DEVICE_PROGRAM_MAP(lasso_coprocessor_map)
+ m6502_device & blitter(M6502(config, "blitter", 11289000/16)); /* guess */
+ blitter.set_addrmap(AS_PROGRAM, &lasso_state::lasso_coprocessor_map);
PALETTE(config, m_palette, FUNC(lasso_state::lasso_palette), 0x40);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lasso_state::chameleo)
+void lasso_state::chameleo(machine_config &config)
+{
base(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(chameleo_main_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::chameleo_main_map);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(chameleo_audio_map)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::chameleo_audio_map);
/* video hardware */
PALETTE(config, m_palette, FUNC(lasso_state::lasso_palette), 0x40);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(lasso_state, screen_update_chameleo)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(lasso_state::screen_update_chameleo));
+}
-MACHINE_CONFIG_START(lasso_state::wwjgtin)
+void lasso_state::wwjgtin(machine_config &config)
+{
base(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(wwjgtin_main_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::wwjgtin_main_map);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(wwjgtin_audio_map)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::wwjgtin_audio_map);
MCFG_MACHINE_START_OVERRIDE(lasso_state,wwjgtin)
MCFG_MACHINE_RESET_OVERRIDE(lasso_state,wwjgtin)
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lasso_state, screen_update_wwjgtin)
+ subdevice<screen_device>("screen")->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(lasso_state::screen_update_wwjgtin));
m_gfxdecode->set_info(gfx_wwjgtin); // Has 1 additional layer
PALETTE(config, m_palette, FUNC(lasso_state::wwjgtin_palette), 0x40 + 16*16, 64);
@@ -577,27 +574,27 @@ MACHINE_CONFIG_START(lasso_state::wwjgtin)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lasso_state::pinbo)
+void lasso_state::pinbo(machine_config &config)
+{
base(config);
/* basic machine hardware */
- MCFG_DEVICE_REPLACE("maincpu", M6502, XTAL(18'000'000)/24)
- MCFG_DEVICE_PROGRAM_MAP(pinbo_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lasso_state, irq0_line_hold)
+ M6502(config.replace(), m_maincpu, XTAL(18'000'000)/24);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::pinbo_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lasso_state::irq0_line_hold));
- MCFG_DEVICE_REPLACE("audiocpu", Z80, XTAL(18'000'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(pinbo_audio_map)
- MCFG_DEVICE_IO_MAP(pinbo_audio_io_map)
+ Z80(config.replace(), m_audiocpu, XTAL(18'000'000)/6);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::pinbo_audio_map);
+ m_audiocpu->set_addrmap(AS_IO, &lasso_state::pinbo_audio_io_map);
/* video hardware */
m_gfxdecode->set_info(gfx_pinbo);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
MCFG_VIDEO_START_OVERRIDE(lasso_state,pinbo)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(lasso_state, screen_update_chameleo)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(lasso_state::screen_update_chameleo));
/* sound hardware */
config.device_remove("sn76489.1");
@@ -605,7 +602,7 @@ MACHINE_CONFIG_START(lasso_state::pinbo)
AY8910(config, "ay1", XTAL(18'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.55);
AY8910(config, "ay2", XTAL(18'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.55);
-MACHINE_CONFIG_END
+}
ROM_START( lasso )
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index bd40cefdaca..c76837381d7 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -512,18 +512,18 @@ TIMER_DEVICE_CALLBACK_MEMBER(lastbank_state::irq_scanline)
}
}
-MACHINE_CONFIG_START(lastbank_state::lastbank)
-
+void lastbank_state::lastbank(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80,MASTER_CLOCK/4) //!!! TC0091LVC !!!
- MCFG_DEVICE_PROGRAM_MAP(lastbank_map)
+ Z80(config, m_maincpu, MASTER_CLOCK/4); //!!! TC0091LVC !!!
+ m_maincpu->set_addrmap(AS_PROGRAM, &lastbank_state::lastbank_map);
TIMER(config, "scantimer").configure_scanline(FUNC(lastbank_state::irq_scanline), "screen", 0, 1);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_DEVICE_ADD("audiocpu",Z80,MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(lastbank_audio_map)
- MCFG_DEVICE_IO_MAP(lastbank_audio_io)
+ z80_device &audiocpu(Z80(config, "audiocpu", MASTER_CLOCK/4));
+ audiocpu.set_addrmap(AS_PROGRAM, &lastbank_state::lastbank_audio_map);
+ audiocpu.set_addrmap(AS_IO, &lastbank_state::lastbank_audio_io);
// yes, we have no interrupts
config.m_perfect_cpu_quantum = subtag("maincpu");
@@ -532,17 +532,17 @@ MACHINE_CONFIG_START(lastbank_state::lastbank)
//MCFG_MACHINE_RESET_OVERRIDE(lastbank_state,lastbank)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lastbank_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, lastbank_state, screen_vblank))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 40*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lastbank_state::screen_update));
+ screen.screen_vblank().set(FUNC(lastbank_state::screen_vblank));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_lastbank );
- MCFG_PALETTE_ADD("palette", 0x100)
+ PALETTE(config, "palette").set_entries(0x100);
TC0091LVC(config, m_vdp, 0);
m_vdp->set_gfxdecode_tag("gfxdecode");
@@ -555,8 +555,7 @@ MACHINE_CONFIG_START(lastbank_state::lastbank)
GENERIC_LATCH_8(config, "soundlatch1");
GENERIC_LATCH_8(config, "soundlatch2");
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
ES8712(config, m_essnd, 0);
m_essnd->msm_write_handler().set("msm", FUNC(msm6585_device::data_w));
@@ -570,7 +569,7 @@ MACHINE_CONFIG_START(lastbank_state::lastbank)
// A RTC-62421 is present on the Last Bank PCB. However, the code
// that tries to read from it is broken and nonfunctional. The RTC
// is also absent from some other games on the same hardware.
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/lastfght.cpp b/src/mame/drivers/lastfght.cpp
index ba14903c9ee..36b169f41f4 100644
--- a/src/mame/drivers/lastfght.cpp
+++ b/src/mame/drivers/lastfght.cpp
@@ -553,28 +553,28 @@ void lastfght_state::machine_reset()
m_c00006 = 0;
}
-MACHINE_CONFIG_START(lastfght_state::lastfght)
-
+void lastfght_state::lastfght(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", H83044, 32000000/2)
- MCFG_DEVICE_PROGRAM_MAP( lastfght_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lastfght_state, irq0_line_hold)
+ H83044(config, m_maincpu, 32000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lastfght_state::lastfght_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lastfght_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_PALETTE_ADD( "palette", 256 )
+ PALETTE(config, m_palette).set_entries(256);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC
ramdac.set_addrmap(0, &lastfght_state::ramdac_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE( 512, 256 )
- MCFG_SCREEN_VISIBLE_AREA( 0, 512-1, 0, 256-16-1 )
- MCFG_SCREEN_REFRESH_RATE( 60 )
- MCFG_SCREEN_UPDATE_DRIVER(lastfght_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-MACHINE_CONFIG_END
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0, 512-1, 0, 256-16-1);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_screen_update(FUNC(lastfght_state::screen_update));
+ m_screen->set_palette(m_palette);
+}
/***************************************************************************
diff --git a/src/mame/drivers/laz_awetoss.cpp b/src/mame/drivers/laz_awetoss.cpp
index 6de09c4ecbf..8f88516353f 100644
--- a/src/mame/drivers/laz_awetoss.cpp
+++ b/src/mame/drivers/laz_awetoss.cpp
@@ -45,20 +45,19 @@ void awetoss_state::machine_reset()
}
-MACHINE_CONFIG_START(awetoss_state::awetoss)
-
+void awetoss_state::awetoss(machine_config &config)
+{
/* basic machine hardware */
-// MCFG_DEVICE_ADD("maincpu", ??, 8000000) // unknown
-// MCFG_DEVICE_PROGRAM_MAP(awetoss_map)
-// MCFG_DEVICE_IO_MAP(awetoss_io)
-// MCFG_DEVICE_VBLANK_INT_DRIVER("screen", awetoss_state, irq0_line_hold)
+// ??_device &maincpu(??(config, "maincpu", 8000000)); // unknown
+// maincpu.set_addrmap(AS_PROGRAM, &awetoss_state::awetoss_map);
+// maincpu.set_addrmap(AS_IO, &awetoss_state::awetoss_io);
+// maincpu.set_vblank_int("screen", FUNC(awetoss_state::irq0_line_hold));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) // maybe
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // maybe
+}
diff --git a/src/mame/drivers/laz_ribrac.cpp b/src/mame/drivers/laz_ribrac.cpp
index 2003a22860a..7ef91dff45f 100644
--- a/src/mame/drivers/laz_ribrac.cpp
+++ b/src/mame/drivers/laz_ribrac.cpp
@@ -49,19 +49,18 @@ void laz_ribrac_state::machine_reset()
}
-MACHINE_CONFIG_START(laz_ribrac_state::laz_ribrac)
-
+void laz_ribrac_state::laz_ribrac(machine_config &config)
+{
/* basic machine hardware */
-// MCFG_DEVICE_ADD("maincpu", ??, 8000000) // unknown
-// MCFG_DEVICE_PROGRAM_MAP(laz_ribrac_map)
-// MCFG_DEVICE_IO_MAP(laz_ribrac_io)
+// ??_device &maincpu(??(config, "maincpu", 8000000)); // unknown
+// maincpu.set_addrmap(AS_PROGRAM, &laz_ribrac_state::laz_ribrac_map);
+// maincpu.set_addrmap(AS_IO, &laz_ribrac_state::laz_ribrac_io);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) // maybe
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // maybe
+}
diff --git a/src/mame/drivers/lazercmd.cpp b/src/mame/drivers/lazercmd.cpp
index 6f9147c1b09..f5282ebecee 100644
--- a/src/mame/drivers/lazercmd.cpp
+++ b/src/mame/drivers/lazercmd.cpp
@@ -626,26 +626,26 @@ void lazercmd_state::machine_reset()
}
-MACHINE_CONFIG_START(lazercmd_state::lazercmd)
-
+void lazercmd_state::lazercmd(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", S2650, MASTER_CLOCK/12) /* 666 kHz? */
+ S2650(config, m_maincpu, MASTER_CLOCK/12); /* 666 kHz? */
/* Main Clock is 8MHz divided by 12
but memory and IO access is only possible
within the line and frame blanking period
thus requiring an extra loading of approx 3-5 */
- MCFG_DEVICE_PROGRAM_MAP(lazercmd_map)
- MCFG_DEVICE_DATA_MAP(lazercmd_portmap)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lazercmd_state::lazercmd_map);
+ m_maincpu->set_addrmap(AS_DATA, &lazercmd_state::lazercmd_portmap);
TIMER(config, "scantimer").configure_scanline(FUNC(lazercmd_state::lazercmd_timer), "screen", 0, 1);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR + 16)
- MCFG_SCREEN_VISIBLE_AREA(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, (VERT_RES - 1) * VERT_CHR - 1)
- MCFG_SCREEN_UPDATE_DRIVER(lazercmd_state, screen_update_lazercmd)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR + 16);
+ screen.set_visarea(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, (VERT_RES - 1) * VERT_CHR - 1);
+ screen.set_screen_update(FUNC(lazercmd_state::screen_update_lazercmd));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lazercmd);
PALETTE(config, m_palette, FUNC(lazercmd_state::lazercmd_palette), 5);
@@ -661,29 +661,29 @@ MACHINE_CONFIG_START(lazercmd_state::lazercmd)
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(lazercmd_state::medlanes)
+void lazercmd_state::medlanes(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", S2650, MASTER_CLOCK/12) /* 666 kHz */
+ S2650(config, m_maincpu, MASTER_CLOCK/12); /* 666 kHz */
/* Main Clock is 8MHz divided by 12
but memory and IO access is only possible
within the line and frame blanking period
thus requiring an extra loading of approx 3-5 */
- MCFG_DEVICE_PROGRAM_MAP(medlanes_map)
- MCFG_DEVICE_DATA_MAP(lazercmd_portmap)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lazercmd_state::medlanes_map);
+ m_maincpu->set_addrmap(AS_DATA, &lazercmd_state::lazercmd_portmap);
TIMER(config, "scantimer").configure_scanline(FUNC(lazercmd_state::lazercmd_timer), "screen", 0, 1);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR)
- MCFG_SCREEN_VISIBLE_AREA(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, VERT_RES * VERT_CHR - 1)
- MCFG_SCREEN_UPDATE_DRIVER(lazercmd_state, screen_update_lazercmd)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR);
+ screen.set_visarea(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, VERT_RES * VERT_CHR - 1);
+ screen.set_screen_update(FUNC(lazercmd_state::screen_update_lazercmd));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lazercmd);
PALETTE(config, m_palette, FUNC(lazercmd_state::lazercmd_palette), 5);
@@ -695,29 +695,29 @@ MACHINE_CONFIG_START(lazercmd_state::medlanes)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(lazercmd_state::bbonk)
+void lazercmd_state::bbonk(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", S2650, MASTER_CLOCK/12) /* 666 kHz */
+ S2650(config, m_maincpu, MASTER_CLOCK/12); /* 666 kHz */
/* Main Clock is 8MHz divided by 12
but memory and IO access is only possible
within the line and frame blanking period
thus requiring an extra loading of approx 3-5 */
- MCFG_DEVICE_PROGRAM_MAP(bbonk_map)
- MCFG_DEVICE_DATA_MAP(lazercmd_portmap)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lazercmd_state::bbonk_map);
+ m_maincpu->set_addrmap(AS_DATA, &lazercmd_state::lazercmd_portmap);
TIMER(config, "scantimer").configure_scanline(FUNC(lazercmd_state::bbonk_timer), "screen", 0, 1);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR)
- MCFG_SCREEN_VISIBLE_AREA(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, (VERT_RES - 1) * VERT_CHR - 1)
- MCFG_SCREEN_UPDATE_DRIVER(lazercmd_state, screen_update_lazercmd)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(HORZ_RES * HORZ_CHR, VERT_RES * VERT_CHR);
+ screen.set_visarea(0 * HORZ_CHR, HORZ_RES * HORZ_CHR - 1, 0 * VERT_CHR, (VERT_RES - 1) * VERT_CHR - 1);
+ screen.set_screen_update(FUNC(lazercmd_state::screen_update_lazercmd));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lazercmd);
PALETTE(config, m_palette, FUNC(lazercmd_state::lazercmd_palette), 5);
@@ -729,7 +729,7 @@ MACHINE_CONFIG_START(lazercmd_state::bbonk)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/lbeach.cpp b/src/mame/drivers/lbeach.cpp
index 726d7ede5d7..d0f15f067c9 100644
--- a/src/mame/drivers/lbeach.cpp
+++ b/src/mame/drivers/lbeach.cpp
@@ -333,29 +333,29 @@ void lbeach_state::machine_reset()
{
}
-MACHINE_CONFIG_START(lbeach_state::lbeach)
-
+void lbeach_state::lbeach(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, XTAL(16'000'000) / 32) // Motorola MC6800P, 500kHz
- MCFG_DEVICE_PROGRAM_MAP(lbeach_map)
+ M6800(config, m_maincpu, XTAL(16'000'000) / 32); // Motorola MC6800P, 500kHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &lbeach_state::lbeach_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ~60Hz
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 511-32, 0, 255-24)
- MCFG_SCREEN_UPDATE_DRIVER(lbeach_state, screen_update_lbeach)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE) // needed for collision detection
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60); // ~60Hz
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0, 511-32, 0, 255-24);
+ m_screen->set_screen_update(FUNC(lbeach_state::screen_update_lbeach));
+ m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE); // needed for collision detection
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lbeach);
PALETTE(config, m_palette, FUNC(lbeach_state::lbeach_palette), 2 + 8 + 2);
/* sound hardware */
// ...
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/lc80.cpp b/src/mame/drivers/lc80.cpp
index 56027374a61..a785258401f 100644
--- a/src/mame/drivers/lc80.cpp
+++ b/src/mame/drivers/lc80.cpp
@@ -330,19 +330,19 @@ void lc80_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(lc80_state::lc80)
+void lc80_state::lc80(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 900000) /* UD880D */
- MCFG_DEVICE_PROGRAM_MAP(lc80_mem)
- MCFG_DEVICE_IO_MAP(lc80_io)
+ Z80(config, m_maincpu, 900000); /* UD880D */
+ m_maincpu->set_addrmap(AS_PROGRAM, &lc80_state::lc80_mem);
+ m_maincpu->set_addrmap(AS_IO, &lc80_state::lc80_io);
/* video hardware */
config.set_default_layout(layout_lc80);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
z80ctc_device& ctc(Z80CTC(config, Z80CTC_TAG, 900000));
@@ -365,21 +365,21 @@ MACHINE_CONFIG_START(lc80_state::lc80)
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
RAM(config, RAM_TAG).set_default_size("1K").set_extra_options("2K,3K,4K");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lc80_state::lc80_2)
+void lc80_state::lc80_2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 1800000) /* UD880D */
- MCFG_DEVICE_PROGRAM_MAP(lc80_mem)
- MCFG_DEVICE_IO_MAP(lc80_io)
+ Z80(config, m_maincpu, 1800000); /* UD880D */
+ m_maincpu->set_addrmap(AS_PROGRAM, &lc80_state::lc80_mem);
+ m_maincpu->set_addrmap(AS_IO, &lc80_state::lc80_io);
/* video hardware */
config.set_default_layout(layout_lc80);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
z80ctc_device& ctc(Z80CTC(config, Z80CTC_TAG, 900000));
@@ -403,16 +403,16 @@ MACHINE_CONFIG_START(lc80_state::lc80_2)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("4K");
-MACHINE_CONFIG_END
+}
#if 0
-static MACHINE_CONFIG_START( sc80 )
+void lc80_state::sc80(machine_config &config)
+{
lc80_2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY(Z80_TAG)
- MCFG_DEVICE_PROGRAM_MAP(sc80_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &lc80_state::sc80_mem);
+}
#endif
/* ROMs */
diff --git a/src/mame/drivers/lckydraw.cpp b/src/mame/drivers/lckydraw.cpp
index 1ae19f4939e..e97ac6f8b75 100644
--- a/src/mame/drivers/lckydraw.cpp
+++ b/src/mame/drivers/lckydraw.cpp
@@ -35,17 +35,18 @@ void lckydraw_state::maincpu_map(address_map &map)
static INPUT_PORTS_START( lckydraw )
INPUT_PORTS_END
-MACHINE_CONFIG_START(lckydraw_state::lckydraw)
+void lckydraw_state::lckydraw(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8035, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(maincpu_map)
+ I8035(config, m_maincpu, 6000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lckydraw_state::maincpu_map);
/* video hardware */
//config.set_default_layout();
/* sound hardware */
genpin_audio(config);
-MACHINE_CONFIG_END
+}
ROM_START(lckydraw)
diff --git a/src/mame/drivers/lcmate2.cpp b/src/mame/drivers/lcmate2.cpp
index 2492ce640e0..a03cf631c46 100644
--- a/src/mame/drivers/lcmate2.cpp
+++ b/src/mame/drivers/lcmate2.cpp
@@ -229,20 +229,21 @@ static GFXDECODE_START( gfx_lcmate2 )
GFXDECODE_END
-MACHINE_CONFIG_START(lcmate2_state::lcmate2)
+void lcmate2_state::lcmate2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545)) // confirmed
- MCFG_DEVICE_PROGRAM_MAP(lcmate2_mem)
- MCFG_DEVICE_IO_MAP(lcmate2_io)
+ Z80(config, m_maincpu, XTAL(3'579'545)); // confirmed
+ m_maincpu->set_addrmap(AS_PROGRAM, &lcmate2_state::lcmate2_mem);
+ m_maincpu->set_addrmap(AS_IO, &lcmate2_state::lcmate2_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
- MCFG_SCREEN_SIZE(120, 18)
- MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 18-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
+ screen.set_size(120, 18);
+ screen.set_visarea(0, 120-1, 0, 18-1);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(lcmate2_state::lcmate2_palette), 2);
GFXDECODE(config, "gfxdecode", "palette", gfx_lcmate2);
@@ -258,7 +259,7 @@ MACHINE_CONFIG_START(lcmate2_state::lcmate2)
/* Devices */
RP5C15(config, m_rtc, XTAL(32'768));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( lcmate2 )
diff --git a/src/mame/drivers/ldplayer.cpp b/src/mame/drivers/ldplayer.cpp
index 7b3aef786df..c621648f3c1 100644
--- a/src/mame/drivers/ldplayer.cpp
+++ b/src/mame/drivers/ldplayer.cpp
@@ -627,8 +627,9 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(ldplayer_state::ldplayer_ntsc)
-MACHINE_CONFIG_END
+void ldplayer_state::ldplayer_ntsc(machine_config &config)
+{
+}
MACHINE_CONFIG_START(ldv1000_state::ldv1000)
diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp
index 8f57fdd007c..993aa687149 100644
--- a/src/mame/drivers/leapster.cpp
+++ b/src/mame/drivers/leapster.cpp
@@ -311,16 +311,16 @@ void leapster_state::leapster_aux(address_map &map)
MACHINE_CONFIG_START(leapster_state::leapster)
/* basic machine hardware */
// CPU is ArcTangent-A5 '5.1' (ARCompact core)
- MCFG_DEVICE_ADD("maincpu", ARCA5, 96000000/10)
- MCFG_DEVICE_PROGRAM_MAP(leapster_map)
- MCFG_DEVICE_IO_MAP(leapster_aux)
+ ARCA5(config, m_maincpu, 96000000/10);
+ m_maincpu->set_addrmap(AS_PROGRAM, &leapster_state::leapster_map);
+ m_maincpu->set_addrmap(AS_IO, &leapster_state::leapster_aux);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(160, 160)
- MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 160-1)
- MCFG_SCREEN_UPDATE_DRIVER(leapster_state, screen_update_leapster)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_size(160, 160);
+ screen.set_visarea(0, 160-1, 0, 160-1);
+ screen.set_screen_update(FUNC(leapster_state::screen_update_leapster));
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "leapster_cart")
diff --git a/src/mame/drivers/learnwin.cpp b/src/mame/drivers/learnwin.cpp
index 9c84fa6dc3b..0eca6b1414f 100644
--- a/src/mame/drivers/learnwin.cpp
+++ b/src/mame/drivers/learnwin.cpp
@@ -140,17 +140,17 @@ void learnwin_state::machine_reset()
}
-MACHINE_CONFIG_START(learnwin_state::learnwin)
-
+void learnwin_state::learnwin(machine_config &config)
+{
/* video hardware */
-// MCFG_SCREEN_ADD("screen", LCD)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_SIZE(48, 32)
-// MCFG_SCREEN_VISIBLE_AREA(0,47,0,31)
+// screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+// screen.set_refresh_hz(60);
+// screen.set_size(48, 32);
+// screen.set_visarea(0, 47, 0, 31);
/* sound hardware */
SPEAKER(config, "mono").front_center();
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/leland.cpp b/src/mame/drivers/leland.cpp
index 307bc7ef575..2a287d86571 100644
--- a/src/mame/drivers/leland.cpp
+++ b/src/mame/drivers/leland.cpp
@@ -978,17 +978,17 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(leland_state::leland)
-
+void leland_state::leland(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_master, Z80, MASTER_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(master_map_program)
- MCFG_DEVICE_IO_MAP(master_map_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", leland_state, leland_master_interrupt)
+ Z80(config, m_master, MASTER_CLOCK/2);
+ m_master->set_addrmap(AS_PROGRAM, &leland_state::master_map_program);
+ m_master->set_addrmap(AS_IO, &leland_state::master_map_io);
+ m_master->set_vblank_int("screen", FUNC(leland_state::leland_master_interrupt));
- MCFG_DEVICE_ADD(m_slave, Z80, MASTER_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(slave_small_map_program)
- MCFG_DEVICE_IO_MAP(slave_map_io)
+ Z80(config, m_slave, MASTER_CLOCK/2);
+ m_slave->set_addrmap(AS_PROGRAM, &leland_state::slave_small_map_program);
+ m_slave->set_addrmap(AS_IO, &leland_state::slave_map_io);
EEPROM_93C46_16BIT(config, m_eeprom);
NVRAM(config, "battery", nvram_device::DEFAULT_ALL_0);
@@ -1018,48 +1018,49 @@ MACHINE_CONFIG_START(leland_state::leland)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac0", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac0", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(redline_state::redline)
+void redline_state::redline(machine_config &config)
+{
leland(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("master")
- MCFG_DEVICE_IO_MAP(master_redline_map_io)
+ m_master->set_addrmap(AS_IO, &redline_state::master_redline_map_io);
/* sound hardware */
- MCFG_DEVICE_ADD(m_sound, REDLINE_80186, 0)
-MACHINE_CONFIG_END
+ REDLINE_80186(config, m_sound, 0);
+}
-MACHINE_CONFIG_START(redline_state::quarterb)
+void redline_state::quarterb(machine_config &config)
+{
redline(config);
/* sound hardware */
- MCFG_DEVICE_REPLACE(m_sound, LELAND_80186, 0)
-MACHINE_CONFIG_END
+ LELAND_80186(config.replace(), m_sound, 0);
+}
-MACHINE_CONFIG_START(redline_state::lelandi)
+void redline_state::lelandi(machine_config &config)
+{
quarterb(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("slave")
- MCFG_DEVICE_PROGRAM_MAP(slave_large_map_program)
-MACHINE_CONFIG_END
-
+ m_slave->set_addrmap(AS_PROGRAM, &redline_state::slave_large_map_program);
+}
-MACHINE_CONFIG_START(ataxx_state::ataxx)
+void ataxx_state::ataxx(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_master, Z80, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(master_map_program_2)
- MCFG_DEVICE_IO_MAP(master_map_io_2)
+ Z80(config, m_master, 6000000);
+ m_master->set_addrmap(AS_PROGRAM, &ataxx_state::master_map_program_2);
+ m_master->set_addrmap(AS_IO, &ataxx_state::master_map_io_2);
- MCFG_DEVICE_ADD(m_slave, Z80, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(slave_map_program)
- MCFG_DEVICE_IO_MAP(slave_map_io_2)
+ Z80(config, m_slave, 6000000);
+ m_slave->set_addrmap(AS_PROGRAM, &ataxx_state::slave_map_program);
+ m_slave->set_addrmap(AS_IO, &ataxx_state::slave_map_io_2);
EEPROM_93C56_16BIT(config, m_eeprom, eeprom_serial_streaming::ENABLE);
@@ -1069,15 +1070,16 @@ MACHINE_CONFIG_START(ataxx_state::ataxx)
ataxx_video(config);
/* sound hardware */
- MCFG_DEVICE_ADD(m_sound, ATAXX_80186, 0)
-MACHINE_CONFIG_END
+ ATAXX_80186(config, m_sound, 0);
+}
-MACHINE_CONFIG_START(ataxx_state::wsf)
+void ataxx_state::wsf(machine_config &config)
+{
ataxx(config);
- MCFG_DEVICE_REPLACE(m_sound, WSF_80186, 0)
-MACHINE_CONFIG_END
+ WSF_80186(config.replace(), m_sound, 0);
+}
diff --git a/src/mame/drivers/lemmings.cpp b/src/mame/drivers/lemmings.cpp
index 94c53c01a9e..1d845cab76d 100644
--- a/src/mame/drivers/lemmings.cpp
+++ b/src/mame/drivers/lemmings.cpp
@@ -213,27 +213,27 @@ void lemmings_state::machine_start()
{
}
-MACHINE_CONFIG_START(lemmings_state::lemmings)
-
+void lemmings_state::lemmings(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 14000000)
- MCFG_DEVICE_PROGRAM_MAP(lemmings_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lemmings_state, irq6_line_hold)
+ M68000(config, m_maincpu, 14000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lemmings_state::lemmings_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lemmings_state::irq6_line_hold));
- MCFG_DEVICE_ADD("audiocpu", M6809,32220000/8)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ M6809(config, m_audiocpu, 32220000/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lemmings_state::sound_map);
/* video hardware */
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
- MCFG_DEVICE_ADD("spriteram2", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
+ BUFFERED_SPRITERAM16(config, m_spriteram[1]);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lemmings_state, screen_update_lemmings)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, lemmings_state, screen_vblank_lemmings))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(529));
+ screen.set_size(40*8, 32*8);
+ screen.set_visarea(0*8, 40*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lemmings_state::screen_update_lemmings));
+ screen.screen_vblank().set(FUNC(lemmings_state::screen_vblank_lemmings));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lemmings);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 1024);
@@ -264,10 +264,10 @@ MACHINE_CONFIG_START(lemmings_state::lemmings)
ymsnd.add_route(0, "lspeaker", 0.45);
ymsnd.add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki", OKIM6295, 1023924, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", 1023924, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
+ oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+}
/******************************************************************************/
diff --git a/src/mame/drivers/lethalj.cpp b/src/mame/drivers/lethalj.cpp
index 74eb7de823e..01875d251d5 100644
--- a/src/mame/drivers/lethalj.cpp
+++ b/src/mame/drivers/lethalj.cpp
@@ -367,7 +367,7 @@ static INPUT_PORTS_START( eggvntdx )
PORT_INCLUDE(eggventr)
PORT_MODIFY("IN0")
- PORT_DIPUNUSED_DIPLOC( 0x1000, IP_ACTIVE_LOW, "SW3:4" ) // Was "Slot Machine" - The slot machince is present in the code as a 'bonus stage'
+ PORT_DIPUNUSED_DIPLOC( 0x1000, IP_ACTIVE_LOW, "SW3:4" ) // Was "Slot Machine" - The slot machine is present in the code as a 'bonus stage'
// (when the egg reaches Vegas?), but not actually called (EC).
INPUT_PORTS_END
@@ -630,8 +630,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(lethalj_state::gameroom)
-
+void lethalj_state::gameroom(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &lethalj_state::lethalj_map);
@@ -643,35 +643,32 @@ MACHINE_CONFIG_START(lethalj_state::gameroom)
TICKET_DISPENSER(config, m_ticket, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 701, 0, 512, 263, 0, 236)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(VIDEO_CLOCK, 701, 0, 512, 263, 0, 236);
+ m_screen->set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::RGB_555);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki1", OKIM6295, SOUND_CLOCK, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
+ OKIM6295(config, "oki1", SOUND_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.8);
- MCFG_DEVICE_ADD("oki2", OKIM6295, SOUND_CLOCK, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
+ OKIM6295(config, "oki2", SOUND_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.8);
- MCFG_DEVICE_ADD("oki3", OKIM6295, SOUND_CLOCK, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki3", SOUND_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.8);
+}
-MACHINE_CONFIG_START(lethalj_state::lethalj)
+void lethalj_state::lethalj(machine_config &config)
+{
gameroom(config);
m_maincpu->set_pixel_clock(VIDEO_CLOCK_LETHALJ);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK_LETHALJ, 689, 0, 512, 259, 0, 236)
-MACHINE_CONFIG_END
+ m_screen->set_raw(VIDEO_CLOCK_LETHALJ, 689, 0, 512, 259, 0, 236);
+}
diff --git a/src/mame/drivers/lg-dvd.cpp b/src/mame/drivers/lg-dvd.cpp
index 73f29b2c73c..cc685f02016 100644
--- a/src/mame/drivers/lg-dvd.cpp
+++ b/src/mame/drivers/lg-dvd.cpp
@@ -33,10 +33,11 @@ void lg_dvd_state::lg_dvd_map(address_map &map)
map(0x0000, 0x7fff).rom().region("maincpu", 0);
}
-MACHINE_CONFIG_START(lg_dvd_state::lg)
- MCFG_DEVICE_ADD( "maincpu", I80C52, XTAL(16'000'000) )
- MCFG_DEVICE_PROGRAM_MAP( lg_dvd_map )
-MACHINE_CONFIG_END
+void lg_dvd_state::lg(machine_config &config)
+{
+ I80C52(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &lg_dvd_state::lg_dvd_map);
+}
ROM_START( lggp40 )
ROM_REGION( 0x100000, "maincpu", 0 )
diff --git a/src/mame/drivers/lgp.cpp b/src/mame/drivers/lgp.cpp
index 2598595ba1d..2158a992817 100644
--- a/src/mame/drivers/lgp.cpp
+++ b/src/mame/drivers/lgp.cpp
@@ -412,21 +412,22 @@ void lgp_state::lgp_palette(palette_device &palette) const
/* DRIVER */
MACHINE_CONFIG_START(lgp_state::lgp)
/* main cpu */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_PCB_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(main_program_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lgp_state, vblank_callback_lgp)
+ Z80(config, m_maincpu, CPU_PCB_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lgp_state::main_program_map);
+ m_maincpu->set_addrmap(AS_IO, &lgp_state::main_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lgp_state::vblank_callback_lgp));
/* sound cpu */
- MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_PCB_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sound_program_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
+ z80_device &audiocpu(Z80(config, "audiocpu", SOUND_PCB_CLOCK));
+ audiocpu.set_addrmap(AS_PROGRAM, &lgp_state::sound_program_map);
+ audiocpu.set_addrmap(AS_IO, &lgp_state::sound_io_map);
-
- MCFG_LASERDISC_LDV1000_ADD("laserdisc")
- MCFG_LASERDISC_LDV1000_COMMAND_STROBE_CB(WRITELINE(*this, lgp_state, ld_command_strobe_cb))
- MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, lgp_state, screen_update_lgp)
- MCFG_LASERDISC_OVERLAY_PALETTE("palette")
+ PIONEER_LDV1000(config, m_laserdisc, 0);
+ m_laserdisc->command_strobe_callback().set(FUNC(lgp_state::ld_command_strobe_cb));
+ m_laserdisc->set_overlay(256, 256, FUNC(lgp_state::screen_update_lgp));
+ m_laserdisc->set_overlay_palette(m_palette);
+ m_laserdisc->add_route(0, "lspeaker", 1.0);
+ m_laserdisc->add_route(1, "rspeaker", 1.0);
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
@@ -438,10 +439,6 @@ MACHINE_CONFIG_START(lgp_state::lgp)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
-
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/liberate.cpp b/src/mame/drivers/liberate.cpp
index 0a072ebf7ec..245f906e692 100644
--- a/src/mame/drivers/liberate.cpp
+++ b/src/mame/drivers/liberate.cpp
@@ -741,16 +741,16 @@ MACHINE_RESET_MEMBER(liberate_state,liberate)
m_bank = 0;
}
-MACHINE_CONFIG_START(liberate_state::liberate_base)
-
+void liberate_state::liberate_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",DECO16, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(liberate_map)
- MCFG_DEVICE_IO_MAP(deco16_io_map)
+ DECO16(config, m_maincpu, 2000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_map);
+ m_maincpu->set_addrmap(AS_IO, &liberate_state::deco16_io_map);
- MCFG_DEVICE_ADD("audiocpu",DECO_222, 1500000) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
- MCFG_DEVICE_PROGRAM_MAP(liberate_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(liberate_state, nmi_line_pulse, 16*60) /* ??? */
+ DECO_222(config, m_audiocpu, 1500000); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(liberate_state::nmi_line_pulse), attotime::from_hz(16*60)); /* ??? */
config.m_minimum_quantum = attotime::from_hz(12000);
@@ -758,14 +758,14 @@ MACHINE_CONFIG_START(liberate_state::liberate_base)
MCFG_MACHINE_RESET_OVERRIDE(liberate_state,liberate)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 529ms Vblank duration?? */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_liberate)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, liberate_state, deco16_interrupt))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(529) /* 529ms Vblank duration?? */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(liberate_state::screen_update_liberate));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(liberate_state::deco16_interrupt));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_liberate);
PALETTE(config, m_palette, FUNC(liberate_state::liberate_palette), 33);
@@ -780,64 +780,63 @@ MACHINE_CONFIG_START(liberate_state::liberate_base)
AY8912(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.30);
AY8912(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(liberate_state::liberate)
+void liberate_state::liberate(machine_config &config)
+{
liberate_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_OPCODES, &liberate_state::decrypted_opcodes_map);
+}
-MACHINE_CONFIG_START(liberate_state::liberatb)
+void liberate_state::liberatb(machine_config &config)
+{
liberate_base(config);
/* basic machine hardware */
- MCFG_DEVICE_REPLACE("maincpu", M6502, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(liberatb_map)
-MACHINE_CONFIG_END
+ M6502(config.replace(), m_maincpu, 2000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::liberatb_map);
+}
-MACHINE_CONFIG_START(liberate_state::boomrang)
+void liberate_state::boomrang(machine_config &config)
+{
liberate_base(config);
MCFG_VIDEO_START_OVERRIDE(liberate_state,boomrang)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_boomrang)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(liberate_state::screen_update_boomrang));
+}
-MACHINE_CONFIG_START(liberate_state::prosoccr)
+void liberate_state::prosoccr(machine_config &config)
+{
liberate_base(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(10000000/8) //xtal is unknown?
- MCFG_DEVICE_PROGRAM_MAP(prosoccr_map)
- MCFG_DEVICE_IO_MAP(prosoccr_io_map)
+ m_maincpu->set_clock(10000000/8); //xtal is unknown?
+ m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::prosoccr_map);
+ m_maincpu->set_addrmap(AS_IO, &liberate_state::prosoccr_io_map);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_CLOCK(10000000/8) //xtal is 12 Mhz, divider is unknown
- MCFG_DEVICE_PROGRAM_MAP(prosoccr_sound_map)
+ m_audiocpu->set_clock(10000000/8); //xtal is 12 Mhz, divider is unknown
+ m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::prosoccr_sound_map);
config.m_minimum_quantum = attotime::from_hz(12000);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_prosoccr)
+ subdevice<screen_device>("screen")->set_visarea(1*8, 31*8-1, 0*8, 32*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(liberate_state::screen_update_prosoccr));
m_gfxdecode->set_info(gfx_prosoccr);
MCFG_VIDEO_START_OVERRIDE(liberate_state,prosoccr)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(liberate_state::prosport)
+}
+void liberate_state::prosport(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", DECO16, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(prosport_map)
- MCFG_DEVICE_IO_MAP(deco16_io_map)
+ DECO16(config, m_maincpu, 2000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::prosport_map);
+ m_maincpu->set_addrmap(AS_IO, &liberate_state::deco16_io_map);
- MCFG_DEVICE_ADD("audiocpu", DECO_222, 1500000/2) /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
- MCFG_DEVICE_PROGRAM_MAP(liberate_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(liberate_state, nmi_line_pulse, 16*60) /* ??? */
+ DECO_222(config, m_audiocpu, 1500000/2); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(liberate_state::nmi_line_pulse), attotime::from_hz(16*60)); /* ??? */
// config.m_minimum_quantum = attotime::from_hz(12000);
@@ -845,14 +844,14 @@ MACHINE_CONFIG_START(liberate_state::prosport)
MCFG_MACHINE_RESET_OVERRIDE(liberate_state,liberate)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1529) /* 529ms Vblank duration?? */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_prosport)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, liberate_state, deco16_interrupt))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(1529) /* 529ms Vblank duration?? */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(liberate_state::screen_update_prosport));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(liberate_state::deco16_interrupt));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_prosport);
PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 256);
@@ -867,7 +866,7 @@ MACHINE_CONFIG_START(liberate_state::prosport)
AY8912(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.30);
AY8912(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/lilith.cpp b/src/mame/drivers/lilith.cpp
index d909b4b5264..9d9056f7d1f 100644
--- a/src/mame/drivers/lilith.cpp
+++ b/src/mame/drivers/lilith.cpp
@@ -26,8 +26,9 @@ private:
static INPUT_PORTS_START( lilith )
INPUT_PORTS_END
-MACHINE_CONFIG_START(lilith_state::lilith)
-MACHINE_CONFIG_END
+void lilith_state::lilith(machine_config &config)
+{
+}
ROM_START( lilith )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/lindbergh.cpp b/src/mame/drivers/lindbergh.cpp
index 2c3c2172dab..8953bddb2e2 100644
--- a/src/mame/drivers/lindbergh.cpp
+++ b/src/mame/drivers/lindbergh.cpp
@@ -392,8 +392,9 @@ void lindbergh_state::machine_reset()
{
}
-MACHINE_CONFIG_START(lindbergh_state::lindbergh)
- MCFG_DEVICE_ADD("maincpu", PENTIUM4, 28000000U*5) /* Actually Celeron D at 2,8 GHz */
+void lindbergh_state::lindbergh(machine_config &config)
+{
+ PENTIUM4(config, "maincpu", 28000000U*5); /* Actually Celeron D at 2,8 GHz */
PCI_ROOT (config, ":pci", 0);
I82875P_HOST (config, ":pci:00.0", 0, 0x103382c0, "maincpu", 512*1024*1024);
@@ -417,7 +418,7 @@ MACHINE_CONFIG_START(lindbergh_state::lindbergh)
SATA (config, ":pci:1f.2", 0, 0x808625a3, 0x02, 0x103382c0);
SMBUS (config, ":pci:1f.3", 0, 0x808625a4, 0x02, 0x103382c0);
AC97 (config, ":pci:1f.5", 0, 0x808625a6, 0x02, 0x103382c0);
-MACHINE_CONFIG_END
+}
#define LINDBERGH_BIOS \
ROM_REGION32_LE(0x100000, ":pci:1f.0", 0) /* PC bios, location 3j7 */ \
diff --git a/src/mame/drivers/llc.cpp b/src/mame/drivers/llc.cpp
index 92b6bd6ea58..5c3568309d1 100644
--- a/src/mame/drivers/llc.cpp
+++ b/src/mame/drivers/llc.cpp
@@ -200,7 +200,8 @@ static GFXDECODE_START( gfx_llc2 )
GFXDECODE_END
/* Machine driver */
-MACHINE_CONFIG_START(llc_state::llc1)
+void llc_state::llc1(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(3'000'000));
m_maincpu->set_daisy_config(llc1_daisy_chain);
@@ -211,13 +212,13 @@ MACHINE_CONFIG_START(llc_state::llc1)
MCFG_MACHINE_RESET_OVERRIDE(llc_state, llc1 )
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(64*8, 16*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 16*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(llc_state, screen_update_llc1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*8, 16*8);
+ screen.set_visarea(0, 64*8-1, 0, 16*8-1);
+ screen.set_screen_update(FUNC(llc_state::screen_update_llc1));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_llc1);
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -242,9 +243,10 @@ MACHINE_CONFIG_START(llc_state::llc1)
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(llc_state::kbd_put));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(llc_state::llc2)
+void llc_state::llc2(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(3'000'000));
m_maincpu->set_daisy_config(llc2_daisy_chain);
@@ -254,21 +256,20 @@ MACHINE_CONFIG_START(llc_state::llc2)
MCFG_MACHINE_RESET_OVERRIDE(llc_state, llc2 )
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(llc_state, screen_update_llc2)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0, 64*8-1, 0, 32*8-1);
+ screen.set_screen_update(FUNC(llc_state::screen_update_llc2));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_llc2);
PALETTE(config, "palette", palette_device::MONOCHROME);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.15);
z80pio_device& pio1(Z80PIO(config, "z80pio1", XTAL(3'000'000)));
pio1.in_pa_callback().set(K7659_KEYBOARD_TAG, FUNC(k7659_keyboard_device::read));
@@ -278,13 +279,13 @@ MACHINE_CONFIG_START(llc_state::llc2)
z80pio_device& pio2(Z80PIO(config, "z80pio2", XTAL(3'000'000)));
pio2.in_pa_callback().set(FUNC(llc_state::llc2_port2_a_r));
- MCFG_DEVICE_ADD("z80ctc", Z80CTC, XTAL(3'000'000))
+ Z80CTC(config, "z80ctc", XTAL(3'000'000));
K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( llc1 )
diff --git a/src/mame/drivers/lockon.cpp b/src/mame/drivers/lockon.cpp
index 0f5fb97040c..d9474d316a1 100644
--- a/src/mame/drivers/lockon.cpp
+++ b/src/mame/drivers/lockon.cpp
@@ -470,20 +470,20 @@ void lockon_state::machine_reset()
m_main_inten = 0;
}
-MACHINE_CONFIG_START(lockon_state::lockon)
-
- MCFG_DEVICE_ADD("maincpu", V30, 16_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(main_v30)
+void lockon_state::lockon(machine_config &config)
+{
+ V30(config, m_maincpu, 16_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lockon_state::main_v30);
- MCFG_DEVICE_ADD("ground", V30, 16_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(ground_v30)
+ V30(config, m_ground, 16_MHz_XTAL / 2);
+ m_ground->set_addrmap(AS_PROGRAM, &lockon_state::ground_v30);
- MCFG_DEVICE_ADD("object", V30, 16_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(object_v30)
+ V30(config, m_object, 16_MHz_XTAL / 2);
+ m_object->set_addrmap(AS_PROGRAM, &lockon_state::object_v30);
- MCFG_DEVICE_ADD("audiocpu", Z80, 16_MHz_XTAL / 4)
- MCFG_DEVICE_PROGRAM_MAP(sound_prg)
- MCFG_DEVICE_IO_MAP(sound_io)
+ Z80(config, m_audiocpu, 16_MHz_XTAL / 4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lockon_state::sound_prg);
+ m_audiocpu->set_addrmap(AS_IO, &lockon_state::sound_io);
WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_ASTABLE(10000, 4700, 10000e-12) * 4096);
config.m_minimum_quantum = attotime::from_hz(600);
@@ -494,12 +494,12 @@ MACHINE_CONFIG_START(lockon_state::lockon)
adc.in_callback<2>().set_ioport("ADC_MISSILE");
adc.in_callback<3>().set_ioport("ADC_HOVER");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(lockon_state, screen_update_lockon)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, lockon_state, screen_vblank_lockon))
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(lockon_state::screen_update_lockon));
+ m_screen->screen_vblank().set(FUNC(lockon_state::screen_vblank_lockon));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lockon);
PALETTE(config, m_palette, FUNC(lockon_state::lockon_palette), 1024 + 2048);
@@ -526,7 +526,7 @@ MACHINE_CONFIG_START(lockon_state::lockon)
FILTER_VOLUME(config, "f2203.2r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
FILTER_VOLUME(config, "f2203.3l").add_route(ALL_OUTPUTS, "lspeaker", 1.0);
FILTER_VOLUME(config, "f2203.3r").add_route(ALL_OUTPUTS, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/lsasquad.cpp b/src/mame/drivers/lsasquad.cpp
index 8d359da3d8a..08436c78a2d 100644
--- a/src/mame/drivers/lsasquad.cpp
+++ b/src/mame/drivers/lsasquad.cpp
@@ -555,17 +555,17 @@ MACHINE_RESET_MEMBER(lsasquad_state,lsasquad)
}
/* Note: lsasquad clock values are not verified */
-MACHINE_CONFIG_START(lsasquad_state::lsasquad)
-
+void lsasquad_state::lsasquad(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(lsasquad_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, MASTER_CLOCK / 8)
- MCFG_DEVICE_PROGRAM_MAP(lsasquad_sound_map)
+ Z80(config, m_audiocpu, MASTER_CLOCK / 8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_sound_map);
/* IRQs are triggered by the YM2203 */
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, MASTER_CLOCK / 8)
+ TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8);
config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */
@@ -583,13 +583,13 @@ MACHINE_CONFIG_START(lsasquad_state::lsasquad)
GENERIC_LATCH_8(config, m_soundlatch2);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_lsasquad)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lsasquad_state::screen_update_lsasquad));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512);
@@ -607,31 +607,31 @@ MACHINE_CONFIG_START(lsasquad_state::lsasquad)
ymsnd.add_route(1, "mono", 0.12);
ymsnd.add_route(2, "mono", 0.12);
ymsnd.add_route(3, "mono", 0.63);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lsasquad_state::storming)
+void lsasquad_state::storming(machine_config &config)
+{
lsasquad(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(storming_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::storming_map);
config.device_remove("bmcu");
AY8910(config.replace(), "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.12); // AY-3-8910A
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(lsasquad_state::daikaiju)
+}
+void lsasquad_state::daikaiju(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 4)
- MCFG_DEVICE_PROGRAM_MAP(daikaiju_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::daikaiju_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, MASTER_CLOCK / 8)
- MCFG_DEVICE_PROGRAM_MAP(daikaiju_sound_map)
+ Z80(config, m_audiocpu, MASTER_CLOCK / 8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::daikaiju_sound_map);
/* IRQs are triggered by the YM2203 */
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, MASTER_CLOCK / 8)
+ TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8);
config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */
/* synchronization of the CPUs */
@@ -646,13 +646,13 @@ MACHINE_CONFIG_START(lsasquad_state::daikaiju)
INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_daikaiju)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lsasquad_state::screen_update_daikaiju));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512);
@@ -670,7 +670,7 @@ MACHINE_CONFIG_START(lsasquad_state::daikaiju)
ymsnd.add_route(1, "mono", 0.12);
ymsnd.add_route(2, "mono", 0.12);
ymsnd.add_route(3, "mono", 0.63);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/ltcasino.cpp b/src/mame/drivers/ltcasino.cpp
index cbad9040b9f..e6fb14e2898 100644
--- a/src/mame/drivers/ltcasino.cpp
+++ b/src/mame/drivers/ltcasino.cpp
@@ -742,20 +742,21 @@ static GFXDECODE_START( gfx_ltcasino )
GFXDECODE_END
-MACHINE_CONFIG_START(ltcasino_state::ltcasino)
+void ltcasino_state::ltcasino(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M6502, XTAL(18'432'000)/9) /* 2.048MHz ?? (or 18.432MHz/8 = 2.304MHz) - not verified */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ltcasino_state, irq0_line_hold)
+ M6502(config, m_maincpu, XTAL(18'432'000)/9); /* 2.048MHz ?? (or 18.432MHz/8 = 2.304MHz) - not verified */
+ m_maincpu->set_addrmap(AS_PROGRAM, &ltcasino_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(ltcasino_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(6*8, 58*8-1, 0, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(ltcasino_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(6*8, 58*8-1, 0, 32*8-1);
+ screen.set_screen_update(FUNC(ltcasino_state::screen_update));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_ltcasino);
PALETTE(config, "palette", FUNC(ltcasino_state::ltcasino_palette), 2*64);
@@ -768,7 +769,7 @@ MACHINE_CONFIG_START(ltcasino_state::ltcasino)
aysnd.port_b_read_callback().set_ioport("IN6");
//ltcasino -> pc: F3F3 (A in service) and F3FD (B in service)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.4);
-MACHINE_CONFIG_END
+}
ROM_START( ltcasino )
diff --git a/src/mame/drivers/ltd.cpp b/src/mame/drivers/ltd.cpp
index 91987649b08..27f3e4e9500 100644
--- a/src/mame/drivers/ltd.cpp
+++ b/src/mame/drivers/ltd.cpp
@@ -523,10 +523,11 @@ TIMER_DEVICE_CALLBACK_MEMBER( ltd_state::timer_r )
}
}
-MACHINE_CONFIG_START(ltd_state::ltd3)
+void ltd_state::ltd3(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(ltd3_map)
+ M6802(config, m_maincpu, XTAL(3'579'545));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ltd_state::ltd3_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -537,9 +538,10 @@ MACHINE_CONFIG_START(ltd_state::ltd3)
genpin_audio(config);
TIMER(config, "timer_r").configure_periodic(FUNC(ltd_state::timer_r), attotime::from_hz(500));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ltd_state::ltd4)
+void ltd_state::ltd4(machine_config &config)
+{
/* basic machine hardware */
m6803_cpu_device &maincpu(M6803(config, "maincpu", XTAL(3'579'545))); // guess, no details available
maincpu.set_addrmap(AS_PROGRAM, &ltd_state::ltd4_map);
@@ -559,7 +561,7 @@ MACHINE_CONFIG_START(ltd_state::ltd4)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd_0", XTAL(3'579'545)/2).add_route(ALL_OUTPUTS, "mono", 0.3); /* guess */
AY8910(config, "aysnd_1", XTAL(3'579'545)/2).add_route(ALL_OUTPUTS, "mono", 0.3); /* guess */
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------------------------
/ Arizona
diff --git a/src/mame/drivers/luckgrln.cpp b/src/mame/drivers/luckgrln.cpp
index c83d07d8138..a15a16257f7 100644
--- a/src/mame/drivers/luckgrln.cpp
+++ b/src/mame/drivers/luckgrln.cpp
@@ -861,11 +861,12 @@ INTERRUPT_GEN_MEMBER(luckgrln_state::irq)
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-MACHINE_CONFIG_START(luckgrln_state::luckgrln)
- MCFG_DEVICE_ADD(m_maincpu, Z180,8000000)
- MCFG_DEVICE_PROGRAM_MAP(mainmap)
- MCFG_DEVICE_IO_MAP(luckgrln_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", luckgrln_state, irq)
+void luckgrln_state::luckgrln(machine_config &config)
+{
+ Z180(config, m_maincpu, 8000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &luckgrln_state::mainmap);
+ m_maincpu->set_addrmap(AS_IO, &luckgrln_state::luckgrln_io);
+ m_maincpu->set_vblank_int("screen", FUNC(luckgrln_state::irq));
h46505_device &crtc(H46505(config, "crtc", 6000000/4)); /* unknown clock, hand tuned to get ~60 fps */
crtc.set_screen("screen");
@@ -874,29 +875,28 @@ MACHINE_CONFIG_START(luckgrln_state::luckgrln)
MSM6242(config, "rtc", 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(luckgrln_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(luckgrln_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_luckgrln);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
SPEAKER(config, "mono").front_center();
+}
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(luckgrln_state::_7smash)
+void luckgrln_state::_7smash(machine_config &config)
+{
luckgrln(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(_7smash_map)
- MCFG_DEVICE_IO_MAP(_7smash_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &luckgrln_state::_7smash_map);
+ m_maincpu->set_addrmap(AS_IO, &luckgrln_state::_7smash_io);
config.device_remove("rtc");
-MACHINE_CONFIG_END
+}
void luckgrln_state::init_luckgrln()
{
diff --git a/src/mame/drivers/lvcards.cpp b/src/mame/drivers/lvcards.cpp
index cbc54fd9b48..ba00c75d0f3 100644
--- a/src/mame/drivers/lvcards.cpp
+++ b/src/mame/drivers/lvcards.cpp
@@ -459,21 +459,22 @@ GFXDECODE_END
/* Sound Interfaces */
-MACHINE_CONFIG_START(lvcards_state::lvcards)
+void lvcards_state::lvcards(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu",Z80, 18432000/4) // unknown frequency, assume same as tehkanwc.cpp
- MCFG_DEVICE_PROGRAM_MAP(lvcards_map)
- MCFG_DEVICE_IO_MAP(lvcards_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lvcards_state, irq0_line_hold)
+ Z80(config, m_maincpu, 18432000/4); // unknown frequency, assume same as tehkanwc.cpp
+ m_maincpu->set_addrmap(AS_PROGRAM, &lvcards_state::lvcards_map);
+ m_maincpu->set_addrmap(AS_IO, &lvcards_state::lvcards_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(lvcards_state::irq0_line_hold));
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8*0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(lvcards_state, screen_update_lvcards)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(8*0, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(lvcards_state::screen_update_lvcards));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_lvcards);
PALETTE(config, "palette", FUNC(lvcards_state::lvcards_palette), 256);
@@ -485,28 +486,28 @@ MACHINE_CONFIG_START(lvcards_state::lvcards)
aysnd.port_a_read_callback().set_ioport("DSW0");
aysnd.port_b_read_callback().set_ioport("DSW1");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(lvpoker_state::lvpoker)
+void lvpoker_state::lvpoker(machine_config &config)
+{
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(lvpoker_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &lvpoker_state::lvpoker_map);
+}
-MACHINE_CONFIG_START(lvpoker_state::ponttehk)
+void lvpoker_state::ponttehk(machine_config &config)
+{
lvcards(config);
// basic machine hardware
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ponttehk_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &lvpoker_state::ponttehk_map);
// video hardware
PALETTE(config.replace(), "palette", palette_device::RGB_444_PROMS, "proms", 256);
-MACHINE_CONFIG_END
+}
ROM_START( lvpoker )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/lviv.cpp b/src/mame/drivers/lviv.cpp
index 4796b5ab7db..251f3e03dda 100644
--- a/src/mame/drivers/lviv.cpp
+++ b/src/mame/drivers/lviv.cpp
@@ -10,13 +10,13 @@ Dr. Volodimir Mosorov for two Lviv machines.
What's new:
-----------
-28.02.2003 Snapshot veryfing function added.
+28.02.2003 Snapshot verifying function added.
07.01.2003 Support for .SAV snapshots. Joystick support (there are strange
problems with "Doroga (1991)(-)(Ru).lvt".
21.12.2002 Cassette support rewritten, WAVs saving and loading are working now.
08.12.2002 Comments on emulation status updated. Changed 'lvive' to 'lvivp'.
ADC r instruction in I8080 core fixed (Arkanoid works now).
- Orginal keyboard layout added.
+ Original keyboard layout added.
20.07.2002 "Reset" key fixed. I8080 core fixed (all BASIC commands works).
now). Unsupported .lvt files versions aren't now loaded.
xx.07.2002 Improved port and memory mapping (Raphael Nabet).
@@ -34,7 +34,7 @@ Notes on emulation status and to do list:
-----------------------------------------
1. LIMITATION: Printer is not emulated.
2. LIMITATION: Timings are not implemented, due to it emulated machine runs
- twice fast as orginal.
+ twice fast as original.
3. LIMITATION: .RSS files are not supported.
4. LIMITATION: Some usage notes and trivia are needed in sysinfo.dat.
@@ -96,11 +96,11 @@ Ports:
D0-D3 8255 PPI
Port A:
- keyboard scaning
+ keyboard scanning
Port B:
keyboard reading
Port C:
- keyboard scaning/reading
+ keyboard scanning/reading
Keyboard:
---------
@@ -161,7 +161,7 @@ Keyboard:
Video:
-----
Screen resolution is 256x256 pixels. 4 colors at once are possible,
- but there is a posiibility of palette change. Bits 0..6 of port 0xc1
+ but there is a possibility of palette change. Bits 0..6 of port 0xc1
are used for palette setting.
One byte of video-RAM sets 4 pixels. Colors of pixels are corrected
@@ -423,9 +423,9 @@ INPUT_PORTS_END
/* machine definition */
MACHINE_CONFIG_START(lviv_state::lviv)
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8080, 2500000)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ I8080(config, m_maincpu, 2500000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &lviv_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &lviv_state::io_map);
config.m_minimum_quantum = attotime::from_hz(60);
I8255(config, m_ppi[0]);
@@ -444,15 +444,14 @@ MACHINE_CONFIG_START(lviv_state::lviv)
m_ppi[1]->in_pc_callback().set(FUNC(lviv_state::ppi_1_portc_r));
m_ppi[1]->out_pc_callback().set(FUNC(lviv_state::ppi_1_portc_w));
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(0)
-
/* video hardware */
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(lviv_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(0);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 256-1, 0, 256-1);
+ m_screen->set_screen_update(FUNC(lviv_state::screen_update));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, FUNC(lviv_state::lviv_palette), ARRAY_LENGTH(s_palette));
diff --git a/src/mame/drivers/lynx.cpp b/src/mame/drivers/lynx.cpp
index b5aafc332fc..89c207682bf 100644
--- a/src/mame/drivers/lynx.cpp
+++ b/src/mame/drivers/lynx.cpp
@@ -76,23 +76,23 @@ void lynx_state::sound_cb()
MACHINE_CONFIG_START(lynx_state::lynx)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M65SC02, 4000000) /* vti core, integrated in vlsi, stz, but not bbr bbs */
- MCFG_DEVICE_PROGRAM_MAP(lynx_mem)
+ M65SC02(config, m_maincpu, 4000000); /* vti core, integrated in vlsi, stz, but not bbr bbs */
+ m_maincpu->set_addrmap(AS_PROGRAM, &lynx_state::lynx_mem);
config.m_minimum_quantum = attotime::from_hz(60);
ADDRESS_MAP_BANK(config, "bank_fc00").set_map(&lynx_state::lynx_fc00_mem).set_options(ENDIANNESS_LITTLE, 8, 9, 0x100);
ADDRESS_MAP_BANK(config, "bank_fd00").set_map(&lynx_state::lynx_fd00_mem).set_options(ENDIANNESS_LITTLE, 8, 9, 0x100);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(lynx_state, screen_update)
- MCFG_SCREEN_SIZE(160, 102)
- MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 102-1)
+ SCREEN(config, m_screen, SCREEN_TYPE_LCD);
+ m_screen->set_refresh_hz(30);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_screen_update(FUNC(lynx_state::screen_update));
+ m_screen->set_size(160, 102);
+ m_screen->set_visarea(0, 160-1, 0, 102-1);
config.set_default_layout(layout_lynx);
- MCFG_PALETTE_ADD("palette", 0x10)
+ PALETTE(config, m_palette).set_entries(0x10);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/miniforce.cpp b/src/mame/drivers/miniforce.cpp
index 2e9feea1184..ef55e15c2e7 100644
--- a/src/mame/drivers/miniforce.cpp
+++ b/src/mame/drivers/miniforce.cpp
@@ -182,19 +182,20 @@ static void miniforce_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(miniforce_state::miniforce)
-// MCFG_DEVICE_PROGRAM_MAP (miniforce_mem)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD ("vme", 1, miniforce_vme_cards, "fccpu21")
- MCFG_VME_SLOT_ADD ("vme", 2, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 3, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 4, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 5, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 6, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 7, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 8, miniforce_vme_cards, nullptr)
- MCFG_VME_SLOT_ADD ("vme", 9, miniforce_vme_cards, nullptr)
-MACHINE_CONFIG_END
+void miniforce_state::miniforce(machine_config &config)
+{
+// ->set_addrmap(AS_PROGRAM, &miniforce_state::miniforce_mem);
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", miniforce_vme_cards, "fccpu21", 1, "vme");
+ VME_SLOT(config, "slot2", miniforce_vme_cards, nullptr, 2, "vme");
+ VME_SLOT(config, "slot3", miniforce_vme_cards, nullptr, 3, "vme");
+ VME_SLOT(config, "slot4", miniforce_vme_cards, nullptr, 4, "vme");
+ VME_SLOT(config, "slot5", miniforce_vme_cards, nullptr, 5, "vme");
+ VME_SLOT(config, "slot6", miniforce_vme_cards, nullptr, 6, "vme");
+ VME_SLOT(config, "slot7", miniforce_vme_cards, nullptr, 7, "vme");
+ VME_SLOT(config, "slot8", miniforce_vme_cards, nullptr, 8, "vme");
+ VME_SLOT(config, "slot9", miniforce_vme_cards, nullptr, 9, "vme");
+}
ROM_START(miniforce)
ROM_END
diff --git a/src/mame/drivers/mvme147.cpp b/src/mame/drivers/mvme147.cpp
index 9f1f5b89f52..6d3f012d7de 100644
--- a/src/mame/drivers/mvme147.cpp
+++ b/src/mame/drivers/mvme147.cpp
@@ -648,12 +648,14 @@ static void mvme147_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(mvme147_state::mvme147)
+void mvme147_state::mvme147(machine_config &config)
+{
/* basic machine hardware */
M68030(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &mvme147_state::mvme147_mem);
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_SLOT_ADD("vme", 1, mvme147_vme_cards, nullptr)
+
+ VME(config, "vme", 0);
+ VME_SLOT(config, "slot1", mvme147_vme_cards, nullptr, 1, "vme");
M48T02(config, "m48t18", 0); /* t08 differs only in accepted voltage levels compared to t18 */
@@ -668,7 +670,7 @@ MACHINE_CONFIG_START(mvme147_state::mvme147)
rs232trm.cts_handler().set(m_sccterm, FUNC(scc85c30_device::ctsa_w));
SCC85C30(config, m_sccterm2, SCC_CLOCK);
-MACHINE_CONFIG_END
+}
/* ROM definitions */
ROM_START (mvme147)
diff --git a/src/mame/drivers/mzr8105.cpp b/src/mame/drivers/mzr8105.cpp
index a029c2a45c4..76d5fb7af3f 100644
--- a/src/mame/drivers/mzr8105.cpp
+++ b/src/mame/drivers/mzr8105.cpp
@@ -208,13 +208,13 @@ static void mzr8105_vme_cards(device_slot_interface &device)
/*
* Machine configuration
*/
-MACHINE_CONFIG_START(mzr8105_state::mzr8105)
- MCFG_DEVICE_ADD ("maincpu", M68000, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP (mzr8105_mem)
- MCFG_VME_DEVICE_ADD("vme")
- MCFG_VME_BUS_OWNER_SPACES()
- MCFG_VME_SLOT_ADD ("vme", 1, mzr8105_vme_cards, "mzr8300")
-MACHINE_CONFIG_END
+void mzr8105_state::mzr8105(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(10'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mzr8105_state::mzr8105_mem);
+ VME(config, "vme", 0).use_owner_spaces();
+ VME_SLOT(config, "slot1", mzr8105_vme_cards, "mzr8300", 1, "vme");
+}
/* ROM definitions */
/* mzr8300 UPD7201 init sequence
diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h
index 964a994252c..d9924f51948 100644
--- a/src/mame/includes/ladybug.h
+++ b/src/mame/includes/ladybug.h
@@ -53,8 +53,9 @@ protected:
void ladybug_map(address_map &map);
-private:
required_device<cpu_device> m_maincpu;
+
+private:
required_device<ladybug_video_device> m_video;
required_ioport m_port_dsw0;
diff --git a/src/mame/includes/lvcards.h b/src/mame/includes/lvcards.h
index 8bb4cc71061..bf9d07580a1 100644
--- a/src/mame/includes/lvcards.h
+++ b/src/mame/includes/lvcards.h
@@ -12,9 +12,9 @@ class lvcards_state : public driver_device
public:
lvcards_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
- m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode")
{ }
@@ -26,6 +26,8 @@ protected:
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(colorram_w);
+ required_device<cpu_device> m_maincpu;
+
private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
@@ -33,7 +35,6 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
void lvcards_palette(palette_device &palette) const;
uint32_t screen_update_lvcards(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
void lvcards_io_map(address_map &map);
void lvcards_map(address_map &map);