summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-12-20 22:28:07 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-12-20 22:28:31 +0100
commit39f209a7e1c8c7d760a44b14688b14d1322707e6 (patch)
treec57b885119621b9413f8f8b7b17aca571373ac70
parenta9e6f19320a9f0c8489c6001b23a72ab232b23a0 (diff)
-devices/sound/aica, flt_rc, ics2115, k007232, k053260, sp0250, upd7759: Removed MCFG macros. [Ryan Holtz]
-drivers/ajax, asterix, bottom9, chqflag, fastlane, flkatck, gradius3, igs_fear, igs011, mainevt, overdriv, pgm, segapico, spy, twin16, wecleman: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-rw-r--r--src/devices/bus/megadrive/md_slot.h28
-rw-r--r--src/devices/sound/aica.h16
-rw-r--r--src/devices/sound/flt_rc.h18
-rw-r--r--src/devices/sound/ics2115.h11
-rw-r--r--src/devices/sound/k007232.h5
-rw-r--r--src/devices/sound/k053260.h15
-rw-r--r--src/devices/sound/sp0250.h4
-rw-r--r--src/devices/sound/upd7759.h7
-rw-r--r--src/mame/drivers/ajax.cpp58
-rw-r--r--src/mame/drivers/asterix.cpp44
-rw-r--r--src/mame/drivers/bottom9.cpp56
-rw-r--r--src/mame/drivers/chqflag.cpp56
-rw-r--r--src/mame/drivers/dccons.cpp12
-rw-r--r--src/mame/drivers/fastlane.cpp54
-rw-r--r--src/mame/drivers/flkatck.cpp54
-rw-r--r--src/mame/drivers/gradius3.cpp62
-rw-r--r--src/mame/drivers/igs011.cpp192
-rw-r--r--src/mame/drivers/igs_fear.cpp34
-rw-r--r--src/mame/drivers/mainevt.cpp104
-rw-r--r--src/mame/drivers/naomi.cpp59
-rw-r--r--src/mame/drivers/overdriv.cpp58
-rw-r--r--src/mame/drivers/pgm.cpp57
-rw-r--r--src/mame/drivers/segapico.cpp72
-rw-r--r--src/mame/drivers/spy.cpp60
-rw-r--r--src/mame/drivers/system16.cpp22
-rw-r--r--src/mame/drivers/twin16.cpp137
-rw-r--r--src/mame/drivers/vgmplay.cpp4
-rw-r--r--src/mame/drivers/wecleman.cpp106
-rw-r--r--src/mame/machine/megadriv.cpp24
29 files changed, 692 insertions, 737 deletions
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index 78388c4dcbd..c9372ada7df 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -222,6 +222,15 @@ class pico_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
+ template <typename T>
+ pico_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : pico_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "pico_cart"; }
virtual const char *file_extensions() const override { return "bin,md"; }
@@ -233,6 +242,15 @@ class copera_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
+ template <typename T>
+ copera_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : copera_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "copera_cart"; }
virtual const char *file_extensions() const override { return "bin,md"; }
@@ -255,16 +273,6 @@ DECLARE_DEVICE_TYPE(COPERA_CART_SLOT, copera_cart_slot_device)
MCFG_DEVICE_ADD(_tag, MD_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-#define MCFG_PICO_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, PICO_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-#define MCFG_COPERA_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, COPERA_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-
#define MCFG_MD_CARTRIDGE_NOT_MANDATORY \
static_cast<md_cart_slot_device *>(device)->set_must_be_loaded(false);
diff --git a/src/devices/sound/aica.h b/src/devices/sound/aica.h
index 957f6a9336f..c2a6a97132c 100644
--- a/src/devices/sound/aica.h
+++ b/src/devices/sound/aica.h
@@ -14,18 +14,6 @@
#include "aicadsp.h"
-#define MCFG_AICA_MASTER \
- downcast<aica_device &>(*device).set_master(true);
-
-#define MCFG_AICA_ROFFSET(offs) \
- downcast<aica_device &>(*device).set_roffset((offs));
-
-#define MCFG_AICA_IRQ_CB(cb) \
- downcast<aica_device &>(*device).set_irq_callback((DEVCB_##cb));
-
-#define MCFG_AICA_MAIN_IRQ_CB(cb) \
- downcast<aica_device &>(*device).set_main_irq_callback((DEVCB_##cb));
-
class aica_device : public device_t, public device_sound_interface
{
public:
@@ -35,8 +23,8 @@ public:
void set_master(bool master) { m_master = master; }
void set_roffset(int roffset) { m_roffset = roffset; }
- template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_main_irq_callback(Object &&cb) { return m_main_irq_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_irq_cb.bind(); }
+ auto main_irq() { return m_main_irq_cb.bind(); }
// AICA register access
DECLARE_READ16_MEMBER( read );
diff --git a/src/devices/sound/flt_rc.h b/src/devices/sound/flt_rc.h
index 3b9748afaaf..8e6057ceed0 100644
--- a/src/devices/sound/flt_rc.h
+++ b/src/devices/sound/flt_rc.h
@@ -33,24 +33,15 @@
* Same as FLT_RC_HIGHPASS, but with standard frequency of 16 HZ
* This filter may be setup just with
*
- * MCFG_FILTER_RC_ADD("tag", 0)
- * MCFG_FILTER_RC_AC()
+ * FILTER_RC(config, "tag", 0).set_ac();
*
* Default behaviour:
*
- * Without MCFG_FILTER_RC_AC, a disabled FLT_RC_LOWPASS is created
+ * Without set_ac(), a disabled FLT_RC_LOWPASS is created
*
*/
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_FILTER_RC_AC() \
- downcast<filter_rc_device &>(*device).set_rc(filter_rc_device::AC, 10000, 0, 0, CAP_U(1));
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -87,6 +78,11 @@ public:
return *this;
}
+ filter_rc_device &set_ac()
+ {
+ return set_rc(filter_rc_device::AC, 10000, 0, 0, CAP_U(1));
+ }
+
protected:
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/sound/ics2115.h b/src/devices/sound/ics2115.h
index 66feda4b48e..57afef9f0c1 100644
--- a/src/devices/sound/ics2115.h
+++ b/src/devices/sound/ics2115.h
@@ -7,16 +7,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ICS2115_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, ICS2115, _clock)
-
-#define MCFG_ICS2115_IRQ_CB(_devcb) \
- downcast<ics2115_device &>(*device).set_irq_callback(DEVCB_##_devcb);
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -29,6 +19,7 @@ public:
ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
+ auto irq() { return m_irq_cb.bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h
index f937641401c..e8034b19a0c 100644
--- a/src/devices/sound/k007232.h
+++ b/src/devices/sound/k007232.h
@@ -9,16 +9,11 @@
#pragma once
-#define MCFG_K007232_PORT_WRITE_HANDLER(_devcb) \
- downcast<k007232_device &>(*device).set_port_write_handler(DEVCB_##_devcb);
-
-
class k007232_device : public device_t, public device_sound_interface
{
public:
k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_port_write_handler(Object &&cb) { return m_port_write_handler.set_callback(std::forward<Object>(cb)); }
auto port_write() { return m_port_write_handler.bind(); }
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h
index 9edb1d522f5..666f0657cd8 100644
--- a/src/devices/sound/k053260.h
+++ b/src/devices/sound/k053260.h
@@ -11,21 +11,6 @@
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_K053260_ADD(tag, clock) \
- MCFG_DEVICE_ADD((tag), K053260, (clock))
-
-#define MCFG_K053260_REPLACE(tag, clock) \
- MCFG_DEVICE_REPLACE((tag), K053260, (clock))
-
-#define MCFG_K053260_REGION(tag) \
- k053260_device::set_region_tag(*device, ("^" tag));
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/sound/sp0250.h b/src/devices/sound/sp0250.h
index 665b719e725..dd1b0aa160b 100644
--- a/src/devices/sound/sp0250.h
+++ b/src/devices/sound/sp0250.h
@@ -10,7 +10,6 @@ class sp0250_device : public device_t, public device_sound_interface
public:
sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_drq_callback(Object &&cb) { return m_drq.set_callback(std::forward<Object>(cb)); }
auto drq() { return m_drq.bind(); }
DECLARE_WRITE8_MEMBER( write );
@@ -50,7 +49,4 @@ private:
DECLARE_DEVICE_TYPE(SP0250, sp0250_device)
-#define MCFG_SP0250_DRQ_CALLBACK(_write) \
- downcast<sp0250_device &>(*device).set_drq_callback(DEVCB_##_write);
-
#endif // MAME_SOUND_SP0250_H
diff --git a/src/devices/sound/upd7759.h b/src/devices/sound/upd7759.h
index 4f119025185..98a37f1a173 100644
--- a/src/devices/sound/upd7759.h
+++ b/src/devices/sound/upd7759.h
@@ -102,7 +102,6 @@ protected:
class upd7759_device : public upd775x_device
{
public:
- template <class Object> devcb_base &set_drq_callback(Object &&cb) { return m_drqcallback.set_callback(std::forward<Object>(cb)); }
auto drq() { return m_drqcallback.bind(); }
upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = STANDARD_CLOCK);
@@ -144,10 +143,4 @@ protected:
DECLARE_DEVICE_TYPE(UPD7759, upd7759_device)
DECLARE_DEVICE_TYPE(UPD7756, upd7756_device)
-#define MCFG_UPD7759_MD(_md) \
- downcast<upd7759_device &>(*device).md_w(_md);
-
-#define MCFG_UPD7759_DRQ_CALLBACK(_write) \
- downcast<upd7759_device &>(*device).set_drq_callback(DEVCB_##_write);
-
#endif // MAME_SOUND_UPD7759_H
diff --git a/src/mame/drivers/ajax.cpp b/src/mame/drivers/ajax.cpp
index 9b287cf63de..7de45bc6e92 100644
--- a/src/mame/drivers/ajax.cpp
+++ b/src/mame/drivers/ajax.cpp
@@ -170,33 +170,33 @@ WRITE8_MEMBER(ajax_state::volume_callback1)
}
-MACHINE_CONFIG_START(ajax_state::ajax)
-
+void ajax_state::ajax(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 052001 12/4 MHz*/
- MCFG_DEVICE_PROGRAM_MAP(ajax_main_map)
+ KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 052001 12/4 MHz*/
+ m_maincpu->set_addrmap(AS_PROGRAM, &ajax_state::ajax_main_map);
- MCFG_DEVICE_ADD("sub", HD6309E, 3000000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(ajax_sub_map)
+ HD6309E(config, m_subcpu, 3000000); /* ? */
+ m_subcpu->set_addrmap(AS_PROGRAM, &ajax_state::ajax_sub_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.58 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ajax_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* 3.58 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &ajax_state::ajax_sound_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(600))
+ config.m_minimum_quantum = attotime::from_hz(600);
WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 108, 412, 256, 16, 240)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(24'000'000)/3, 528, 108, 412, 256, 16, 240);
// 6MHz dotclock is more realistic, however needs drawing updates. replace when ready
-// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240)
- MCFG_SCREEN_UPDATE_DRIVER(ajax_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240);
+ screen.set_screen_update(FUNC(ajax_state::screen_update));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ PALETTE(config, m_palette, 2048);
+ m_palette->enable_shadows();
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
@@ -221,18 +221,18 @@ MACHINE_CONFIG_START(ajax_state::ajax)
YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("k007232_1", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, ajax_state, volume_callback0))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-
- MCFG_DEVICE_ADD("k007232_2", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, ajax_state, volume_callback1))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232_1, 3579545);
+ m_k007232_1->port_write().set(FUNC(ajax_state::volume_callback0));
+ m_k007232_1->add_route(0, "lspeaker", 0.20);
+ m_k007232_1->add_route(0, "rspeaker", 0.20);
+ m_k007232_1->add_route(1, "lspeaker", 0.20);
+ m_k007232_1->add_route(1, "rspeaker", 0.20);
+
+ K007232(config, m_k007232_2, 3579545);
+ m_k007232_2->port_write().set(FUNC(ajax_state::volume_callback1));
+ m_k007232_2->add_route(0, "lspeaker", 0.50);
+ m_k007232_2->add_route(1, "rspeaker", 0.50);
+}
/*
diff --git a/src/mame/drivers/asterix.cpp b/src/mame/drivers/asterix.cpp
index 53173569152..ea2e9b92fe8 100644
--- a/src/mame/drivers/asterix.cpp
+++ b/src/mame/drivers/asterix.cpp
@@ -260,30 +260,30 @@ void asterix_state::machine_reset()
}
}
-MACHINE_CONFIG_START(asterix_state::asterix)
-
+void asterix_state::asterix(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000)/2) // 12MHz
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", asterix_state, asterix_interrupt)
+ M68000(config, m_maincpu, XTAL(24'000'000)/2); // 12MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &asterix_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(asterix_state::asterix_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(32'000'000)/4) // 8MHz Z80E ??
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, XTAL(32'000'000)/4); // 8MHz Z80E ??
+ m_audiocpu->set_addrmap(AS_PROGRAM, &asterix_state::sound_map);
EEPROM_ER5911_8BIT(config, "eeprom");
/* 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(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(asterix_state, screen_update_asterix)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ 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(14*8, (64-14)*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(asterix_state::screen_update_asterix));
+ screen.set_palette("palette");
+
+ palette_device &palette(PALETTE(config, "palette", 2048));
+ palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ palette.enable_shadows();
K056832(config, m_k056832, 0);
m_k056832->set_tile_callback(FUNC(asterix_state::tile_callback), this);
@@ -303,10 +303,10 @@ MACHINE_CONFIG_START(asterix_state::asterix)
YM2151(config, "ymsnd", XTAL(32'000'000)/8).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); // 4MHz
- MCFG_K053260_ADD("k053260", XTAL(32'000'000)/8) // 4MHz
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.75)
-MACHINE_CONFIG_END
+ k053260_device &k053260(K053260(config, "k053260", XTAL(32'000'000)/8)); // 4MHz
+ k053260.add_route(0, "lspeaker", 0.75);
+ k053260.add_route(1, "rspeaker", 0.75);
+}
ROM_START( asterix )
diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp
index fe13cbb240e..fa72a86bbc9 100644
--- a/src/mame/drivers/bottom9.cpp
+++ b/src/mame/drivers/bottom9.cpp
@@ -300,31 +300,31 @@ void bottom9_state::machine_reset()
m_nmienable = 0;
}
-MACHINE_CONFIG_START(bottom9_state::bottom9)
-
+void bottom9_state::bottom9(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309E, XTAL(24'000'000) / 8) // 63C09E
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ HD6309E(config, m_maincpu, XTAL(24'000'000) / 8); // 63C09E
+ m_maincpu->set_addrmap(AS_PROGRAM, &bottom9_state::main_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(bottom9_state, bottom9_sound_interrupt, 8*60) /* irq is triggered by the main CPU */
+ Z80(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &bottom9_state::audio_map);
+ m_audiocpu->set_periodic_int(FUNC(bottom9_state::bottom9_sound_interrupt), attotime::from_hz(8*60)); /* irq is triggered by the main CPU */
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(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(bottom9_state, screen_update_bottom9)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, bottom9_state, vblank_irq))
-
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ 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(14*8, (64-14)*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(bottom9_state::screen_update_bottom9));
+ screen.screen_vblank().set(FUNC(bottom9_state::vblank_irq));
+ screen.set_palette(m_palette);
+
+ PALETTE(config, m_palette, 1024);
+ m_palette->enable_shadows();
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 0); // 051961 on schematics
m_k052109->set_palette(m_palette);
@@ -344,16 +344,16 @@ MACHINE_CONFIG_START(bottom9_state::bottom9)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232_1", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, bottom9_state, volume_callback0))
- MCFG_SOUND_ROUTE(0, "mono", 0.40)
- MCFG_SOUND_ROUTE(1, "mono", 0.40)
+ K007232(config, m_k007232_1, XTAL(3'579'545));
+ m_k007232_1->port_write().set(FUNC(bottom9_state::volume_callback0));
+ m_k007232_1->add_route(0, "mono", 0.40);
+ m_k007232_1->add_route(1, "mono", 0.40);
- MCFG_DEVICE_ADD("k007232_2", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, bottom9_state, volume_callback1))
- MCFG_SOUND_ROUTE(0, "mono", 0.40)
- MCFG_SOUND_ROUTE(1, "mono", 0.40)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232_2, XTAL(3'579'545));
+ m_k007232_2->port_write().set(FUNC(bottom9_state::volume_callback1));
+ m_k007232_2->add_route(0, "mono", 0.40);
+ m_k007232_2->add_route(1, "mono", 0.40);
+}
/***************************************************************************
diff --git a/src/mame/drivers/chqflag.cpp b/src/mame/drivers/chqflag.cpp
index c966363611e..79bb8b0f4ea 100644
--- a/src/mame/drivers/chqflag.cpp
+++ b/src/mame/drivers/chqflag.cpp
@@ -316,32 +316,32 @@ WRITE_LINE_MEMBER(chqflag_state::background_brt_w)
}
}
-MACHINE_CONFIG_START(chqflag_state::chqflag)
-
+void chqflag_state::chqflag(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 052001 (verified on pcb) */
- MCFG_DEVICE_PROGRAM_MAP(chqflag_map)
+ KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 052001 (verified on pcb) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &chqflag_state::chqflag_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(chqflag_sound_map)
+ Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &chqflag_state::chqflag_sound_map);
- ADDRESS_MAP_BANK(config, "bank1000").set_map(&chqflag_state::bank1000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000);
+ ADDRESS_MAP_BANK(config, m_bank1000).set_map(&chqflag_state::bank1000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000);
- MCFG_QUANTUM_TIME(attotime::from_hz(600))
+ config.m_minimum_quantum = attotime::from_hz(600);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 96, 400, 256, 16, 240) // measured Vsync 59.17hz Hsync 15.13 / 15.19khz
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(24'000'000)/3, 528, 96, 400, 256, 16, 240); // measured Vsync 59.17hz Hsync 15.13 / 15.19khz
// 6MHz dotclock is more realistic, however needs drawing updates. replace when ready
-// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240)
- MCFG_SCREEN_UPDATE_DRIVER(chqflag_state, screen_update_chqflag)
- MCFG_SCREEN_PALETTE("palette")
+// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240);
+ screen.set_screen_update(FUNC(chqflag_state::screen_update_chqflag));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ PALETTE(config, m_palette, 1024);
+ m_palette->enable_shadows();
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K051960(config, m_k051960, 0);
m_k051960->set_palette(m_palette);
@@ -377,18 +377,18 @@ MACHINE_CONFIG_START(chqflag_state::chqflag)
ymsnd.add_route(0, "lspeaker", 1.00);
ymsnd.add_route(1, "rspeaker", 1.00);
- MCFG_DEVICE_ADD("k007232_1", K007232, XTAL(3'579'545)) /* verified on pcb */
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, chqflag_state, volume_callback0))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-
- MCFG_DEVICE_ADD("k007232_2", K007232, XTAL(3'579'545)) /* verified on pcb */
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, chqflag_state, volume_callback1))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232[0], XTAL(3'579'545)); /* verified on pcb */
+ m_k007232[0]->port_write().set(FUNC(chqflag_state::volume_callback0));
+ m_k007232[0]->add_route(0, "lspeaker", 0.20);
+ m_k007232[0]->add_route(1, "rspeaker", 0.20);
+
+ K007232(config, m_k007232[1], XTAL(3'579'545)); /* verified on pcb */
+ m_k007232[1]->port_write().set(FUNC(chqflag_state::volume_callback1));
+ m_k007232[1]->add_route(0, "lspeaker", 0.20);
+ m_k007232[1]->add_route(0, "rspeaker", 0.20);
+ m_k007232[1]->add_route(1, "lspeaker", 0.20);
+ m_k007232[1]->add_route(1, "rspeaker", 0.20);
+}
ROM_START( chqflag )
ROM_REGION( 0x50000, "maincpu", 0 ) /* 052001 code */
diff --git a/src/mame/drivers/dccons.cpp b/src/mame/drivers/dccons.cpp
index df01fc36ca5..e9e1be60cba 100644
--- a/src/mame/drivers/dccons.cpp
+++ b/src/mame/drivers/dccons.cpp
@@ -656,12 +656,12 @@ MACHINE_CONFIG_START(dc_cons_state::dc)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("aica", AICA, (XTAL(33'868'800)*2)/3) // 67.7376MHz(2*33.8688MHz), div 3 for audio block
- MCFG_AICA_MASTER
- MCFG_AICA_IRQ_CB(WRITELINE(*this, dc_state, aica_irq))
- MCFG_AICA_MAIN_IRQ_CB(WRITELINE(*this, dc_state, sh4_aica_irq))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ AICA(config, m_aica, (XTAL(33'868'800)*2)/3); // 67.7376MHz(2*33.8688MHz), div 3 for audio block
+ m_aica->set_master(true);
+ m_aica->irq().set(FUNC(dc_state::aica_irq));
+ m_aica->main_irq().set(FUNC(dc_state::sh4_aica_irq));
+ m_aica->add_route(0, "lspeaker", 1.0);
+ m_aica->add_route(1, "rspeaker", 1.0);
AICARTC(config, "aicartc", XTAL(32'768));
diff --git a/src/mame/drivers/fastlane.cpp b/src/mame/drivers/fastlane.cpp
index ad8681fc8df..b3626ab7b95 100644
--- a/src/mame/drivers/fastlane.cpp
+++ b/src/mame/drivers/fastlane.cpp
@@ -199,29 +199,29 @@ void fastlane_state::machine_start()
membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
}
-MACHINE_CONFIG_START(fastlane_state::fastlane)
-
+void fastlane_state::fastlane(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309, XTAL(24'000'000)/2) // 3MHz(XTAL(24'000'000)/8) internally
- MCFG_DEVICE_PROGRAM_MAP(fastlane_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastlane_state, fastlane_scanline, "screen", 0, 1)
+ HD6309(config, m_maincpu, XTAL(24'000'000)/2); // 3MHz(XTAL(24'000'000)/8) internally
+ m_maincpu->set_addrmap(AS_PROGRAM, &fastlane_state::fastlane_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(fastlane_state::fastlane_scanline), "screen", 0, 1);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.17) // measured
- 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(fastlane_state, screen_update_fastlane)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fastlane)
- MCFG_PALETTE_ADD("palette", 1024*16)
- MCFG_PALETTE_INDIRECT_ENTRIES(0x400)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_INIT_OWNER(fastlane_state, fastlane)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(59.17); // measured
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(37*8, 32*8);
+ m_screen->set_visarea(0*8, 35*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(fastlane_state::screen_update_fastlane));
+ m_screen->set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_fastlane);
+ PALETTE(config, m_palette, 1024*16);
+ m_palette->set_indirect_entries(0x400);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_init(FUNC(fastlane_state::palette_init_fastlane));
K007121(config, m_k007121, 0);
m_k007121->set_palette_tag(m_palette);
@@ -231,16 +231,16 @@ MACHINE_CONFIG_START(fastlane_state::fastlane)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("k007232_1", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, fastlane_state, volume_callback0))
- MCFG_SOUND_ROUTE(0, "mono", 0.50)
- MCFG_SOUND_ROUTE(1, "mono", 0.50)
+ K007232(config, m_k007232_1, XTAL(3'579'545));
+ m_k007232_1->port_write().set(FUNC(fastlane_state::volume_callback0));
+ m_k007232_1->add_route(0, "mono", 0.50);
+ m_k007232_1->add_route(1, "mono", 0.50);
- MCFG_DEVICE_ADD("k007232_2", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, fastlane_state, volume_callback1))
- MCFG_SOUND_ROUTE(0, "mono", 0.50)
- MCFG_SOUND_ROUTE(1, "mono", 0.50)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232_2, XTAL(3'579'545));
+ m_k007232_2->port_write().set(FUNC(fastlane_state::volume_callback1));
+ m_k007232_2->add_route(0, "mono", 0.50);
+ m_k007232_2->add_route(1, "mono", 0.50);
+}
/***************************************************************************
diff --git a/src/mame/drivers/flkatck.cpp b/src/mame/drivers/flkatck.cpp
index 52a8e40a441..ece781f3d7e 100644
--- a/src/mame/drivers/flkatck.cpp
+++ b/src/mame/drivers/flkatck.cpp
@@ -211,33 +211,33 @@ void flkatck_state::machine_reset()
m_flipscreen = 0;
}
-MACHINE_CONFIG_START(flkatck_state::flkatck)
-
+void flkatck_state::flkatck(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP, 24/8 MHz */
- MCFG_DEVICE_PROGRAM_MAP(flkatck_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", flkatck_state, flkatck_interrupt)
+ HD6309(config, m_maincpu, 3000000*4); /* HD63C09EP, 24/8 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &flkatck_state::flkatck_map);
+ m_maincpu->set_vblank_int("screen", FUNC(flkatck_state::flkatck_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80,3579545) /* NEC D780C-1, 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(flkatck_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* NEC D780C-1, 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &flkatck_state::flkatck_sound_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(600))
+ config.m_minimum_quantum = attotime::from_hz(600);
WATCHDOG_TIMER(config, m_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(flkatck_state, screen_update_flkatck)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flkatck)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_ENDIANNESS(ENDIANNESS_LITTLE)
+ 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(flkatck_state::screen_update_flkatck));
+ screen.set_palette("palette");
+
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_flkatck);
+ palette_device &palette(PALETTE(config, "palette", 512));
+ palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ palette.set_endianness(ENDIANNESS_LITTLE);
K007121(config, m_k007121, 0);
m_k007121->set_palette_tag("palette");
@@ -250,13 +250,13 @@ MACHINE_CONFIG_START(flkatck_state::flkatck)
YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, flkatck_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(flkatck_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.50);
+ m_k007232->add_route(0, "rspeaker", 0.50);
+ m_k007232->add_route(1, "lspeaker", 0.50);
+ m_k007232->add_route(1, "rspeaker", 0.50);
+}
diff --git a/src/mame/drivers/gradius3.cpp b/src/mame/drivers/gradius3.cpp
index d48e340a86e..19184345d82 100644
--- a/src/mame/drivers/gradius3.cpp
+++ b/src/mame/drivers/gradius3.cpp
@@ -278,38 +278,38 @@ void gradius3_state::machine_reset()
}
-MACHINE_CONFIG_START(gradius3_state::gradius3)
-
+void gradius3_state::gradius3(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP(gradius3_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gradius3_state, cpuA_interrupt)
+ M68000(config, m_maincpu, XTAL(10'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &gradius3_state::gradius3_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gradius3_state::cpuA_interrupt));
- MCFG_DEVICE_ADD("sub", M68000, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP(gradius3_map2)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gradius3_state, gradius3_sub_scanline, "screen", 0, 1)
- /* 4 is triggered by cpu A, the others are unknown but */
- /* required for the game to run. */
+ M68000(config, m_subcpu, XTAL(10'000'000));
+ m_subcpu->set_addrmap(AS_PROGRAM, &gradius3_state::gradius3_map2);
+ TIMER(config, "scantimer").configure_scanline(FUNC(gradius3_state::gradius3_sub_scanline), "screen", 0, 1);
+ /* 4 is triggered by cpu A, the others are unknown but */
+ /* required for the game to run. */
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545)
- MCFG_DEVICE_PROGRAM_MAP(gradius3_s_map)
+ Z80(config, m_audiocpu, 3579545);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &gradius3_state::gradius3_s_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
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(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(gradius3_state, screen_update_gradius3)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
- MCFG_PALETTE_ENABLE_SHADOWS()
+ 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(12*8, (64-12)*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(gradius3_state::screen_update_gradius3));
+ screen.set_palette("palette");
+
+ palette_device &palette(PALETTE(config, "palette", 2048));
+ palette.set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB);
+ palette.enable_shadows();
K052109(config, m_k052109, 0);
m_k052109->set_palette("palette");
@@ -330,13 +330,13 @@ MACHINE_CONFIG_START(gradius3_state::gradius3)
YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, gradius3_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(gradius3_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.20);
+ m_k007232->add_route(0, "rspeaker", 0.20);
+ m_k007232->add_route(1, "lspeaker", 0.20);
+ m_k007232->add_route(1, "rspeaker", 0.20);
+}
diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp
index f218aac94a9..d4596193eeb 100644
--- a/src/mame/drivers/igs011.cpp
+++ b/src/mame/drivers/igs011.cpp
@@ -272,15 +272,15 @@ private:
void drgnwrld_gfx_decrypt();
void prot_mem_range_set();
- void drgnwrld(address_map &map);
- void drgnwrld_igs012(address_map &map);
- void lhb(address_map &map);
- void lhb2(address_map &map);
- void nkishusp(address_map &map);
- void vbowl(address_map &map);
- void vbowlhk(address_map &map);
- void wlcc(address_map &map);
- void xymg(address_map &map);
+ void drgnwrld_mem(address_map &map);
+ void drgnwrld_igs012_mem(address_map &map);
+ void lhb_mem(address_map &map);
+ void lhb2_mem(address_map &map);
+ void nkishusp_mem(address_map &map);
+ void vbowl_mem(address_map &map);
+ void vbowlhk_mem(address_map &map);
+ void wlcc_mem(address_map &map);
+ void xymg_mem(address_map &map);
};
@@ -2547,7 +2547,7 @@ void igs011_state::init_nkishusp()
***************************************************************************/
-void igs011_state::drgnwrld(address_map &map)
+void igs011_state::drgnwrld_mem(address_map &map)
{
// drgnwrld: IGS011 protection dynamically mapped at 1dd7x
// AM_RANGE( 0x01dd70, 0x01dd77 ) AM_WRITE(igs011_prot1_w )
@@ -2583,9 +2583,9 @@ void igs011_state::drgnwrld(address_map &map)
map(0xa88000, 0xa88001).r(FUNC(igs011_state::igs_3_dips_r));
}
-void igs011_state::drgnwrld_igs012(address_map &map)
+void igs011_state::drgnwrld_igs012_mem(address_map &map)
{
- drgnwrld(map);
+ drgnwrld_mem(map);
// IGS012
map(0x001600, 0x00160f).w(FUNC(igs011_state::igs012_prot_swap_w)).mirror(0x01c000); // swap (a5 / 55)
@@ -2627,7 +2627,7 @@ WRITE16_MEMBER(igs011_state::lhb_okibank_w)
// popmessage("oki %04x",data);
}
-void igs011_state::lhb(address_map &map)
+void igs011_state::lhb_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -2670,7 +2670,7 @@ void igs011_state::lhb(address_map &map)
map(0x888000, 0x888001).r(FUNC(igs011_state::igs_5_dips_r));
}
-void igs011_state::xymg(address_map &map)
+void igs011_state::xymg_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -2712,7 +2712,7 @@ void igs011_state::xymg(address_map &map)
map(0x888000, 0x888001).r(FUNC(igs011_state::igs_3_dips_r));
}
-void igs011_state::wlcc(address_map &map)
+void igs011_state::wlcc_mem(address_map &map)
{
// wlcc: IGS011 protection dynamically mapped at 834x
// AM_RANGE( 0x008340, 0x008347 ) AM_WRITE(igs011_prot1_w )
@@ -2753,7 +2753,7 @@ void igs011_state::wlcc(address_map &map)
-void igs011_state::lhb2(address_map &map)
+void igs011_state::lhb2_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -2796,7 +2796,7 @@ void igs011_state::lhb2(address_map &map)
-void igs011_state::nkishusp(address_map &map)
+void igs011_state::nkishusp_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -2900,7 +2900,7 @@ WRITE16_MEMBER(igs011_state::vbowl_link_1_w){ }
WRITE16_MEMBER(igs011_state::vbowl_link_2_w){ }
WRITE16_MEMBER(igs011_state::vbowl_link_3_w){ }
-void igs011_state::vbowl(address_map &map)
+void igs011_state::vbowl_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
@@ -2972,9 +2972,9 @@ void igs011_state::vbowl(address_map &map)
}
-void igs011_state::vbowlhk(address_map &map)
+void igs011_state::vbowlhk_mem(address_map &map)
{
- vbowl(map);
+ vbowl_mem(map);
map(0x800000, 0x800003).w(FUNC(igs011_state::vbowlhk_igs003_w));
map(0x50f600, 0x50f7ff).r(FUNC(igs011_state::vbowlhk_igs011_prot2_r)); // read
}
@@ -4160,53 +4160,52 @@ static GFXDECODE_START( gfx_igs011_hi )
GFXDECODE_END
#endif
-MACHINE_CONFIG_START(igs011_state::igs011_base)
- MCFG_DEVICE_ADD("maincpu",M68000, XTAL(22'000'000)/3)
+void igs011_state::igs011_base(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(22'000'000)/3);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- 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, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(igs011_state, screen_update_igs011)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0, 512-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(igs011_state::screen_update_igs011));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, 0x2000/4);
m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
m_palette->set_membits(8);
-// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011)
+// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(22'000'000)/21, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
+ OKIM6295(config, m_oki, XTAL(22'000'000)/21, okim6295_device::PIN7_HIGH);
+ m_oki->add_route(ALL_OUTPUTS, "mono", 1.0);
+}
TIMER_DEVICE_CALLBACK_MEMBER( igs011_state::lev5_timer_irq_cb )
{
m_maincpu->set_input_line(5, HOLD_LINE);
}
-MACHINE_CONFIG_START(igs011_state::drgnwrld)
+void igs011_state::drgnwrld(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(drgnwrld)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev5_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::drgnwrld_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev5_timer_irq_cb), attotime::from_hz(240)); // lev5 frequency drives the music tempo
- MCFG_DEVICE_ADD("ymsnd", YM3812, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
-MACHINE_CONFIG_END
+ YM3812(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0);
+}
-MACHINE_CONFIG_START(igs011_state::drgnwrld_igs012)
+void igs011_state::drgnwrld_igs012(machine_config &config)
+{
drgnwrld(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(drgnwrld_igs012)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::drgnwrld_igs012_mem);
+}
INTERRUPT_GEN_MEMBER(igs011_state::lhb_vblank_irq)
@@ -4225,67 +4224,65 @@ TIMER_DEVICE_CALLBACK_MEMBER( igs011_state::lhb_timer_irq_cb )
m_maincpu->set_input_line(5, HOLD_LINE);
}
-MACHINE_CONFIG_START(igs011_state::lhb)
+void igs011_state::lhb(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(lhb)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, lhb_vblank_irq)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lhb_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::lhb_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::lhb_vblank_irq));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lhb_timer_irq_cb), attotime::from_hz(240)); // lev5 frequency drives the music tempo
// irq 3 points to an apparently unneeded routine
-MACHINE_CONFIG_END
-
+}
TIMER_DEVICE_CALLBACK_MEMBER( igs011_state::lev3_timer_irq_cb )
{
m_maincpu->set_input_line(3, HOLD_LINE);
}
-MACHINE_CONFIG_START(igs011_state::wlcc)
+
+void igs011_state::wlcc(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(wlcc)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::wlcc_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev3_timer_irq_cb), attotime::from_hz(240)); // lev3 frequency drives the music tempo
+}
-MACHINE_CONFIG_START(igs011_state::xymg)
+void igs011_state::xymg(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(xymg)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::xymg_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev3_timer_irq_cb), attotime::from_hz(240)); // lev3 frequency drives the music tempo
+}
-MACHINE_CONFIG_START(igs011_state::lhb2)
+void igs011_state::lhb2(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(lhb2)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev5_timer_irq_cb, attotime::from_hz(240)) // lev5 frequency drives the music tempo
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::lhb2_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev5_timer_irq_cb), attotime::from_hz(240)); // lev5 frequency drives the music tempo
// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011_hi)
- MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0);
+}
-MACHINE_CONFIG_START(igs011_state::nkishusp)
+void igs011_state::nkishusp(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(nkishusp)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::nkishusp_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev3_timer_irq_cb), attotime::from_hz(240)); // lev3 frequency drives the music tempo
// VSync 60.0052Hz, HSync 15.620kHz
// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011_hi)
- MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0);
+}
WRITE_LINE_MEMBER(igs011_state::sound_irq)
@@ -4293,30 +4290,29 @@ WRITE_LINE_MEMBER(igs011_state::sound_irq)
// m_maincpu->set_input_line(3, state);
}
-MACHINE_CONFIG_START(igs011_state::vbowl)
+void igs011_state::vbowl(machine_config &config)
+{
igs011_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(vbowl)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igs011_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_irq", igs011_state, lev3_timer_irq_cb, attotime::from_hz(240)) // lev3 frequency drives the music tempo
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::vbowl_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold));
+ TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lev3_timer_irq_cb), attotime::from_hz(240)); // lev3 frequency drives the music tempo
// irq 5 points to a debug function (all routines are clearly patched out)
// irq 4 points to an apparently unneeded routine
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, igs011_state, screen_vblank_vbowl))
-// MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_igs011_hi)
+ m_screen->screen_vblank().set(FUNC(igs011_state::screen_vblank_vbowl));
+// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi);
- MCFG_DEVICE_REMOVE("oki")
- MCFG_ICS2115_ADD("ics", 0)
- MCFG_ICS2115_IRQ_CB(WRITELINE(*this, igs011_state, sound_irq))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 5.0)
-MACHINE_CONFIG_END
+ config.device_remove("oki");
+ ICS2115(config, m_ics, 0);
+ m_ics->irq().set(FUNC(igs011_state::sound_irq));
+ m_ics->add_route(ALL_OUTPUTS, "mono", 5.0);
+}
-MACHINE_CONFIG_START(igs011_state::vbowlhk)
+void igs011_state::vbowlhk(machine_config &config)
+{
vbowl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(vbowlhk)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::vbowlhk_mem);
+}
/***************************************************************************
diff --git a/src/mame/drivers/igs_fear.cpp b/src/mame/drivers/igs_fear.cpp
index e2dcf2ff23c..f8d8ab0ee2c 100644
--- a/src/mame/drivers/igs_fear.cpp
+++ b/src/mame/drivers/igs_fear.cpp
@@ -81,31 +81,31 @@ WRITE_LINE_MEMBER(igs_fear_state::sound_irq)
}
-MACHINE_CONFIG_START(igs_fear_state::igs_fear)
- MCFG_DEVICE_ADD("maincpu",ARM7, 50000000/2)
- MCFG_DEVICE_PROGRAM_MAP(igs_igs_fear_map)
+void igs_fear_state::igs_fear(machine_config &config)
+{
+ ARM7(config, m_maincpu, 50000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &igs_fear_state::igs_igs_fear_map);
- 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)
+ 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(igs_fear_state::screen_update_igs_fear));
+ screen.set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(igs_fear_state, igs_fear)
- MCFG_SCREEN_UPDATE_DRIVER(igs_fear_state, screen_update_igs_fear)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_PALETTE_ADD("palette", 0x200)
+ PALETTE(config, m_palette, 0x200);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_igs_fear)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_igs_fear);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_ICS2115_ADD("ics", 0)
- MCFG_ICS2115_IRQ_CB(WRITELINE(*this, igs_fear_state, sound_irq))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 5.0)
-
-MACHINE_CONFIG_END
+ ics2115_device &ics(ICS2115(config, "ics", 0));
+ ics.irq().set(FUNC(igs_fear_state::sound_irq));
+ ics.add_route(ALL_OUTPUTS, "mono", 5.0);
+}
ROM_START( fearless )
diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp
index 8bb6779b7f8..17cbd9be568 100644
--- a/src/mame/drivers/mainevt.cpp
+++ b/src/mame/drivers/mainevt.cpp
@@ -423,30 +423,30 @@ INTERRUPT_GEN_MEMBER(mainevt_state::devstors_sound_timer_irq)
device.execute().set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(mainevt_state::mainevt)
-
+void mainevt_state::mainevt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309E, 24_MHz_XTAL / 8) // E & Q generated by 052109
- MCFG_DEVICE_PROGRAM_MAP(mainevt_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mainevt_state, mainevt_interrupt)
+ HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); // E & Q generated by 052109
+ m_maincpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mainevt_state::mainevt_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, 3.579545_MHz_XTAL) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(mainevt_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mainevt_state, mainevt_sound_timer_irq, 8*60) /* ??? */
+ Z80(config, m_audiocpu, 3.579545_MHz_XTAL); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(mainevt_state::mainevt_sound_timer_irq), attotime::from_hz(8*60)); /* ??? */
/* 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(14*8, (64-14)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 14*8, (64-14)*8, 256, 16, 240) // same hardware as Devastators so assume 59.17
- MCFG_SCREEN_UPDATE_DRIVER(mainevt_state, screen_update_mainevt)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ 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(14*8, (64-14)*8-1, 2*8, 30*8-1);
+ screen.set_raw(XTAL(24'000'000)/3, 528, 14*8, (64-14)*8, 256, 16, 240); // same hardware as Devastators so assume 59.17
+ screen.set_screen_update(FUNC(mainevt_state::screen_update_mainevt));
+ screen.set_palette("palette");
+
+ palette_device &palette(PALETTE(config, "palette", 256));
+ palette.enable_shadows();
+ palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 24_MHz_XTAL);
m_k052109->set_palette("palette");
@@ -462,40 +462,40 @@ MACHINE_CONFIG_START(mainevt_state::mainevt)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232", K007232, 3.579545_MHz_XTAL)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, mainevt_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
-
- MCFG_DEVICE_ADD("upd", UPD7759)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232, 3.579545_MHz_XTAL);
+ m_k007232->port_write().set(FUNC(mainevt_state::volume_callback));
+ m_k007232->add_route(0, "mono", 0.20);
+ m_k007232->add_route(1, "mono", 0.20);
+ UPD7759(config, m_upd7759);
+ m_upd7759->add_route(ALL_OUTPUTS, "mono", 0.50);
+}
-MACHINE_CONFIG_START(mainevt_state::devstors)
+void mainevt_state::devstors(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309E, 24_MHz_XTAL / 8) // E & Q generated by 052109
- MCFG_DEVICE_PROGRAM_MAP(devstors_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mainevt_state, dv_interrupt)
+ HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); // E & Q generated by 052109
+ m_maincpu->set_addrmap(AS_PROGRAM, &mainevt_state::devstors_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mainevt_state::dv_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, 3.579545_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(devstors_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mainevt_state, devstors_sound_timer_irq, 4*60) /* ??? */
+ Z80(config, m_audiocpu, 3.579545_MHz_XTAL);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mainevt_state::devstors_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(mainevt_state::devstors_sound_timer_irq), attotime::from_hz(4*60)); /* ??? */
/* 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(13*8, (64-13)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 13*8, (64-13)*8, 256, 16, 240) // measured 59.17
- MCFG_SCREEN_UPDATE_DRIVER(mainevt_state, screen_update_dv)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 256)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ 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(13*8, (64-13)*8-1, 2*8, 30*8-1);
+ screen.set_raw(XTAL(24'000'000)/3, 528, 13*8, (64-13)*8, 256, 16, 240); // measured 59.17
+ screen.set_screen_update(FUNC(mainevt_state::screen_update_dv));
+ screen.set_palette("palette");
+
+ palette_device &palette(PALETTE(config, "palette", 256));
+ palette.enable_shadows();
+ palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 24_MHz_XTAL);
m_k052109->set_palette("palette");
@@ -515,11 +515,11 @@ MACHINE_CONFIG_START(mainevt_state::devstors)
YM2151(config, "ymsnd", 3.579545_MHz_XTAL).add_route(0, "mono", 0.30).add_route(1, "mono", 0.30);
- MCFG_DEVICE_ADD("k007232", K007232, 3.579545_MHz_XTAL)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, mainevt_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232, 3.579545_MHz_XTAL);
+ m_k007232->port_write().set(FUNC(mainevt_state::volume_callback));
+ m_k007232->add_route(0, "mono", 0.20);
+ m_k007232->add_route(1, "mono", 0.20);
+}
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 593a113e2c7..d8a464a6f8b 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2896,7 +2896,8 @@ MACHINE_RESET_MEMBER(naomi_state,naomi)
*/
// TODO: merge with Dreamcast base machine
-MACHINE_CONFIG_START(dc_state::naomi_aw_base)
+void dc_state::naomi_aw_base(machine_config &config)
+{
/* basic machine hardware */
SH4LE(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_md(0, 1);
@@ -2910,41 +2911,41 @@ MACHINE_CONFIG_START(dc_state::naomi_aw_base)
m_maincpu->set_md(8, 0);
m_maincpu->set_sh4_clock(CPU_CLOCK);
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dc_state, dc_scanline, "screen", 0, 1)
+ TIMER(config, "scantimer").configure_scanline(FUNC(dc_state::dc_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("soundcpu", ARM7, ((XTAL(33'868'800)*2)/3)/8) // AICA bus clock is 2/3rds * 33.8688. ARM7 gets 1 bus cycle out of each 8.
- MCFG_DEVICE_PROGRAM_MAP(dc_audio_map)
+ ARM7(config, m_soundcpu, ((XTAL(33'868'800)*2)/3)/8); // AICA bus clock is 2/3rds * 33.8688. ARM7 gets 1 bus cycle out of each 8.
+ m_soundcpu->set_addrmap(AS_PROGRAM, &dc_state::dc_audio_map);
MAPLE_DC(config, m_maple, 0, m_maincpu);
m_maple->irq_callback().set(FUNC(dc_state::maple_irq));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(13458568*2, 820, 0, 640, 532, 0, 480) /* TODO: where pclk actually comes? */
- MCFG_SCREEN_UPDATE_DEVICE("powervr2", powervr2_device, screen_update)
- MCFG_PALETTE_ADD("palette", 0x1000)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(13458568*2, 820, 0, 640, 532, 0, 480); /* TODO: where does pclk actually come from? */
+ screen.set_screen_update("powervr2", FUNC(powervr2_device::screen_update));
+ PALETTE(config, "palette", 0x1000);
POWERVR2(config, m_powervr2, 0);
m_powervr2->irq_callback().set(FUNC(dc_state::pvr_irq));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("aica", AICA, (XTAL(33'868'800)*2)/3) // 67.7376MHz(2*33.8688MHz), div 3 for audio block
- MCFG_AICA_MASTER
- MCFG_AICA_IRQ_CB(WRITELINE(*this, dc_state, aica_irq))
- MCFG_AICA_MAIN_IRQ_CB(WRITELINE(*this, dc_state, sh4_aica_irq))
- MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 2.0)
+ AICA(config, m_aica, (XTAL(33'868'800)*2)/3); // 67.7376MHz(2*33.8688MHz), div 3 for audio block
+ m_aica->set_master(true);
+ m_aica->irq().set(FUNC(dc_state::aica_irq));
+ m_aica->main_irq().set(FUNC(dc_state::sh4_aica_irq));
+ m_aica->add_route(0, "lspeaker", 2.0);
+ m_aica->add_route(1, "rspeaker", 2.0);
AICARTC(config, "aicartc", XTAL(32'768));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(naomi_state::naomi_base)
+void naomi_state::naomi_base(machine_config &config)
+{
naomi_aw_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(naomi_map)
- MCFG_DEVICE_IO_MAP(naomi_port)
+ m_maincpu->set_addrmap(AS_PROGRAM, &naomi_state::naomi_map);
+ m_maincpu->set_addrmap(AS_IO, &naomi_state::naomi_port);
EEPROM_93C46_16BIT(config, "main_eeprom").default_value(0);
@@ -2979,7 +2980,7 @@ MACHINE_CONFIG_START(naomi_state::naomi_base)
M3COMM(config, "comm_board", 0);
MCFG_MACHINE_RESET_OVERRIDE(naomi_state,naomi)
NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
/*
* Naomi 1, unprotected ROM sub-board
@@ -3125,13 +3126,13 @@ void naomi2_state::naomi2gd(machine_config &config)
* Naomi 2, M1 sub-board
*/
-MACHINE_CONFIG_START(naomi2_state::naomi2m1)
+void naomi2_state::naomi2m1(machine_config &config)
+{
naomim1(config);
naomi2_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(naomi2_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &naomi2_state::naomi2_map);
+}
/*
* Naomi 2, M2/3 sub-board
@@ -3149,19 +3150,19 @@ void naomi2_state::naomi2m2(machine_config &config)
* Atomiswave
*/
-MACHINE_CONFIG_START(atomiswave_state::aw_base)
+void atomiswave_state::aw_base(machine_config &config)
+{
naomi_aw_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(aw_map)
- MCFG_DEVICE_IO_MAP(aw_port)
+ m_maincpu->set_addrmap(AS_PROGRAM, &atomiswave_state::aw_map);
+ m_maincpu->set_addrmap(AS_IO, &atomiswave_state::aw_port);
MACRONIX_29L001MC(config, "awflash");
aw_rom_board &rom_board(AW_ROM_BOARD(config, "rom_board", 0, "rom_key"));
rom_board.irq_callback().set(FUNC(dc_state::g1_irq));
MCFG_MACHINE_RESET_OVERRIDE(dc_state,dc_console)
NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
void atomiswave_state::aw1c(machine_config &config)
{
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index f6013cad98b..efb35042f87 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -325,37 +325,37 @@ void overdriv_state::machine_reset()
}
-MACHINE_CONFIG_START(overdriv_state::overdriv)
-
+void overdriv_state::overdriv(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000)/2) /* 12 MHz */
- MCFG_DEVICE_PROGRAM_MAP(overdriv_master_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", overdriv_state, overdriv_cpuA_scanline, "screen", 0, 1)
+ M68000(config, m_maincpu, XTAL(24'000'000)/2); /* 12 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &overdriv_state::overdriv_master_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(overdriv_state::overdriv_cpuA_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("sub", M68000, XTAL(24'000'000)/2) /* 12 MHz */
- MCFG_DEVICE_PROGRAM_MAP(overdriv_slave_map)
- //MCFG_DEVICE_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt)
+ M68000(config, m_subcpu, XTAL(24'000'000)/2); /* 12 MHz */
+ m_subcpu->set_addrmap(AS_PROGRAM, &overdriv_state::overdriv_slave_map);
+ //m_subcpu->set_vblank_int("screen", FUNC(overdriv_state::cpuB_interrupt));
/* IRQ 5 and 6 are generated by the main CPU. */
/* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */
- MCFG_DEVICE_ADD("audiocpu", MC6809E, XTAL(3'579'545)) /* 1.789 MHz?? This might be the right speed, but ROM testing */
- MCFG_DEVICE_PROGRAM_MAP(overdriv_sound_map) /* takes a little too much (the counter wraps from 0000 to 9999). */
- /* This might just mean that the video refresh rate is less than */
- /* 60 fps, that's how I fixed it for now. */
+ MC6809E(config, m_audiocpu, XTAL(3'579'545)); /* 1.789 MHz?? This might be the right speed, but ROM testing */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &overdriv_state::overdriv_sound_map); /* takes a little too much (the counter wraps from 0000 to 9999). */
+ /* This might just mean that the video refresh rate is less than */
+ /* 60 fps, that's how I fixed it for now. */
- MCFG_QUANTUM_TIME(attotime::from_hz(12000))
+ config.m_minimum_quantum = attotime::from_hz(12000);
EEPROM_ER5911_16BIT(config, "eeprom").default_data(overdriv_default_eeprom, 128);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4,384,0,305,264,0,224)
- MCFG_SCREEN_UPDATE_DRIVER(overdriv_state, screen_update_overdriv)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(24'000'000)/4,384,0,305,264,0,224);
+ screen.set_screen_update(FUNC(overdriv_state::screen_update_overdriv));
+ screen.set_palette("palette");
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_ENABLE_SHADOWS()
+ palette_device &palette(PALETTE(config, "palette", 2048));
+ palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ palette.enable_shadows();
K053246(config, m_k053246, 0);
m_k053246->set_sprite_callback(FUNC(overdriv_state::sprite_callback), this);
@@ -387,16 +387,16 @@ MACHINE_CONFIG_START(overdriv_state::overdriv)
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 0.5).add_route(1, "rspeaker", 0.5);
- MCFG_K053260_ADD("k053260_1", XTAL(3'579'545))
- MCFG_DEVICE_ADDRESS_MAP(0, overdriv_k053260_map)
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
+ k053260_device &k053260_1(K053260(config, "k053260_1", XTAL(3'579'545)));
+ k053260_1.set_addrmap(0, &overdriv_state::overdriv_k053260_map);
+ k053260_1.add_route(0, "lspeaker", 0.35);
+ k053260_1.add_route(1, "rspeaker", 0.35);
- MCFG_K053260_ADD("k053260_2", XTAL(3'579'545))
- MCFG_DEVICE_ADDRESS_MAP(0, overdriv_k053260_map)
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.35)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.35)
-MACHINE_CONFIG_END
+ k053260_device &k053260_2(K053260(config, "k053260_2", XTAL(3'579'545)));
+ k053260_2.set_addrmap(0, &overdriv_state::overdriv_k053260_map);
+ k053260_2.add_route(0, "lspeaker", 0.35);
+ k053260_2.add_route(1, "rspeaker", 0.35);
+}
diff --git a/src/mame/drivers/pgm.cpp b/src/mame/drivers/pgm.cpp
index 23f902d4386..9bfd609a681 100644
--- a/src/mame/drivers/pgm.cpp
+++ b/src/mame/drivers/pgm.cpp
@@ -508,36 +508,38 @@ MACHINE_RESET_MEMBER(pgm_state,pgm)
m_soundcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
-MACHINE_CONFIG_START(pgm_state::pgmbase)
+void pgm_state::pgmbase(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 20000000) /* 20 mhz! verified on real board */
- MCFG_DEVICE_PROGRAM_MAP(pgm_basic_mem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pgm_state, irq6_line_hold)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pgm_state, pgm_interrupt, "screen", 0, 1)
+ M68000(config, m_maincpu, 20000000); /* 20 mhz! verified on real board */
+ m_maincpu->set_addrmap(AS_PROGRAM, &pgm_state::pgm_basic_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(pgm_state::irq6_line_hold));
+ TIMER(config, "scantimer").configure_scanline(FUNC(pgm_state::pgm_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("soundcpu", Z80, 33868800/4)
- MCFG_DEVICE_PROGRAM_MAP(pgm_z80_mem)
- MCFG_DEVICE_IO_MAP(pgm_z80_io)
+ Z80(config, m_soundcpu, 33868800/4);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &pgm_state::pgm_z80_mem);
+ m_soundcpu->set_addrmap(AS_IO, &pgm_state::pgm_z80_io);
MCFG_MACHINE_START_OVERRIDE(pgm_state, pgm )
MCFG_MACHINE_RESET_OVERRIDE(pgm_state, pgm )
+
NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0);
V3021(config, "rtc");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // killing blade won't boot (just displays 'error') if this is lower than 59.9 or higher than 60.1 .. are actual PGM boards different to the Cave one?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 56*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(pgm_state, screen_update_pgm)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pgm_state, screen_vblank_pgm))
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pgm)
- MCFG_PALETTE_ADD("palette", 0x1200/2)
- MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60); // killing blade won't boot (just displays 'error') if this is lower than 59.9 or higher than 60.1 .. are actual PGM boards different to the Cave one?
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(0*8, 56*8-1, 0*8, 28*8-1);
+ screen.set_screen_update(FUNC(pgm_state::screen_update_pgm));
+ screen.screen_vblank().set(FUNC(pgm_state::screen_vblank_pgm));
+ screen.set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_pgm);
+ PALETTE(config, m_palette, 0x1200/2);
+ m_palette->set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB);
MCFG_VIDEO_START_OVERRIDE(pgm_state,pgm)
@@ -548,14 +550,15 @@ MACHINE_CONFIG_START(pgm_state::pgmbase)
GENERIC_LATCH_8(config, "soundlatch2");
GENERIC_LATCH_8(config, m_soundlatch3);
- MCFG_ICS2115_ADD("ics", 0)
- MCFG_ICS2115_IRQ_CB(INPUTLINE("soundcpu", 0))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 5.0)
-MACHINE_CONFIG_END
+ ICS2115(config, m_ics, 0);
+ m_ics->irq().set_inputline("soundcpu", 0);
+ m_ics->add_route(ALL_OUTPUTS, "mono", 5.0);
+}
-MACHINE_CONFIG_START(pgm_state::pgm)
+void pgm_state::pgm(machine_config &config)
+{
pgmbase(config);
-MACHINE_CONFIG_END
+}
/*** Rom Loading *************************************************************/
@@ -5029,6 +5032,6 @@ GAME( 2008, kovshxas, kovshp, pgm_arm_type1, kovsh, pgm_arm_ty
//乱世拳皇/Luànshì quánhuáng
GAME( 200?, kovlsqh, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
GAME( 200?, kovlsqh2, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Quanhuang 2 (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
-//乱世街霸/Luànshì jiē bà
+//乱世街霸/Luànshì jiē b�
GAME( 200?, kovlsjb, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
GAME( 200?, kovlsjba, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_state, init_kovlsqh2, ROT0, "bootleg", "Luanshi Jie Ba (bootleg of Knights of Valour Super Heroes Plus, ver. 200CN, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp
index 5a48dcafde3..0eed917f943 100644
--- a/src/mame/drivers/segapico.cpp
+++ b/src/mame/drivers/segapico.cpp
@@ -392,47 +392,47 @@ MACHINE_START_MEMBER(pico_state,pico)
m_vdp->stop_timers();
}
-MACHINE_CONFIG_START(pico_state::pico)
+void pico_state::pico(machine_config &config)
+{
md_ntsc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pico_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &pico_state::pico_mem);
- MCFG_DEVICE_REMOVE("genesis_snd_z80")
- MCFG_DEVICE_REMOVE("ymsnd")
+ config.device_remove("genesis_snd_z80");
+ config.device_remove("ymsnd");
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, nullptr)
- MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
+ PICO_CART_SLOT(config, m_picocart, pico_cart, nullptr);
+ SOFTWARE_LIST(config, "cart_list").set_original("pico");
- MCFG_DEVICE_ADD("315_5641", SEGA_315_5641_PCM, upd7759_device::STANDARD_CLOCK*2)
- //MCFG_UPD7759_DRQ_CALLBACK(WRITELINE(*this, pico_state,sound_cause_irq)) FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.16)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.16)
-MACHINE_CONFIG_END
+ SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK*2);
+ //m_sega_315_5641_pcm->drq().set(FUNC(pico_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
+}
-MACHINE_CONFIG_START(pico_state::picopal)
+void pico_state::picopal(machine_config &config)
+{
md_pal(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pico_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &pico_state::pico_mem);
- MCFG_DEVICE_REMOVE("genesis_snd_z80")
- MCFG_DEVICE_REMOVE("ymsnd")
+ config.device_remove("genesis_snd_z80");
+ config.device_remove("ymsnd");
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, nullptr)
- MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
+ PICO_CART_SLOT(config, m_picocart, pico_cart, nullptr);
+ SOFTWARE_LIST(config, "cart_list").set_original("pico");
- MCFG_DEVICE_ADD("315_5641", SEGA_315_5641_PCM, upd7759_device::STANDARD_CLOCK*2)
- //MCFG_UPD7759_DRQ_CALLBACK(WRITELINE(*this, pico_state,sound_cause_irq)) FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.16)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.16)
-MACHINE_CONFIG_END
+ SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK*2);
+ //m_sega_315_5641_pcm->drq().set(FUNC(pico_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
+}
@@ -608,26 +608,26 @@ MACHINE_START_MEMBER(copera_state,copera)
}
-MACHINE_CONFIG_START(copera_state::copera)
+void copera_state::copera(machine_config &config)
+{
md_ntsc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(copera_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &copera_state::copera_mem);
- MCFG_DEVICE_REMOVE("genesis_snd_z80")
- MCFG_DEVICE_REMOVE("ymsnd")
+ config.device_remove("genesis_snd_z80");
+ config.device_remove("ymsnd");
MCFG_MACHINE_START_OVERRIDE( copera_state, copera )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_COPERA_CARTRIDGE_ADD("coperaslot", copera_cart, nullptr)
- MCFG_SOFTWARE_LIST_ADD("cart_list","copera")
+ COPERA_CART_SLOT(config, m_picocart, copera_cart, nullptr);
+ SOFTWARE_LIST(config, "cart_list").set_original("copera");
- MCFG_DEVICE_ADD("315_5641", SEGA_315_5641_PCM, upd7759_device::STANDARD_CLOCK)
- //MCFG_UPD7759_DRQ_CALLBACK(WRITELINE(*this, copera_state,sound_cause_irq)) FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.16)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.16)
-MACHINE_CONFIG_END
+ SEGA_315_5641_PCM(config, m_sega_315_5641_pcm, upd7759_device::STANDARD_CLOCK);
+ //m_sega_315_5641_pcm->drq().set(FUNC(pico_state::sound_cause_irq)); FIXME: this never worked - the MAME 315_5641 doesn't support slave mode
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "lspeaker", 0.16);
+ m_sega_315_5641_pcm->add_route(ALL_OUTPUTS, "rspeaker", 0.16);
+}
diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp
index 20fbe9272d5..34968819679 100644
--- a/src/mame/drivers/spy.cpp
+++ b/src/mame/drivers/spy.cpp
@@ -494,30 +494,30 @@ void spy_state::machine_reset()
m_old_3f90 = -1;
}
-MACHINE_CONFIG_START(spy_state::spy)
-
+void spy_state::spy(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, XTAL(24'000'000) / 8) // 3 MHz? (divided by 051961)
- MCFG_DEVICE_PROGRAM_MAP(spy_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", spy_state, spy_interrupt)
+ MC6809E(config, m_maincpu, XTAL(24'000'000) / 8); // 3 MHz? (divided by 051961)
+ m_maincpu->set_addrmap(AS_PROGRAM, &spy_state::spy_map);
+ m_maincpu->set_vblank_int("screen", FUNC(spy_state::spy_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(spy_sound_map) /* nmi by the sound chip */
+ Z80(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &spy_state::spy_sound_map); /* nmi by the sound chip */
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(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(spy_state, screen_update_spy)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ 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(13*8, (64-13)*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(spy_state::screen_update_spy));
+ screen.set_palette(m_palette);
+
+ PALETTE(config, m_palette, 1024);
+ m_palette->enable_shadows();
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
@@ -533,20 +533,20 @@ MACHINE_CONFIG_START(spy_state::spy)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("ymsnd", YM3812, 3579545)
- MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ ym3812_device &ymsnd(YM3812(config, "ymsnd", 3579545));
+ ymsnd.irq_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);
+ ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
- MCFG_DEVICE_ADD("k007232_1", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, spy_state, volume_callback0))
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
+ K007232(config, m_k007232_1, 3579545);
+ m_k007232_1->port_write().set(FUNC(spy_state::volume_callback0));
+ m_k007232_1->add_route(0, "mono", 0.20);
+ m_k007232_1->add_route(1, "mono", 0.20);
- MCFG_DEVICE_ADD("k007232_2", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, spy_state, volume_callback1))
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232_2, 3579545);
+ m_k007232_2->port_write().set(FUNC(spy_state::volume_callback1));
+ m_k007232_2->add_route(0, "mono", 0.20);
+ m_k007232_2->add_route(1, "mono", 0.20);
+}
/***************************************************************************
diff --git a/src/mame/drivers/system16.cpp b/src/mame/drivers/system16.cpp
index 4f1286f02ca..096e0951ed3 100644
--- a/src/mame/drivers/system16.cpp
+++ b/src/mame/drivers/system16.cpp
@@ -2079,11 +2079,11 @@ WRITE_LINE_MEMBER(segas1x_bootleg_state::sound_cause_nmi)
m_soundcpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-MACHINE_CONFIG_START(segas1x_bootleg_state::z80_ym2151_upd7759)
-
- MCFG_DEVICE_ADD("soundcpu", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(sound_7759_map)
- MCFG_DEVICE_IO_MAP(sound_7759_io_map)
+void segas1x_bootleg_state::z80_ym2151_upd7759(machine_config &config)
+{
+ Z80(config, m_soundcpu, 4000000);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::sound_7759_map);
+ m_soundcpu->set_addrmap(AS_IO, &segas1x_bootleg_state::sound_7759_io_map);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -2091,12 +2091,12 @@ MACHINE_CONFIG_START(segas1x_bootleg_state::z80_ym2151_upd7759)
YM2151(config, "ymsnd", 4000000).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32);
- MCFG_DEVICE_ADD("7759", UPD7759)
- MCFG_UPD7759_MD(0)
- MCFG_UPD7759_DRQ_CALLBACK(WRITELINE(*this, segas1x_bootleg_state,sound_cause_nmi))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.48)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.48)
-MACHINE_CONFIG_END
+ UPD7759(config, m_upd7759, 0);
+ m_upd7759->md_w(0);
+ m_upd7759->drq().set(FUNC(segas1x_bootleg_state::sound_cause_nmi));
+ m_upd7759->add_route(ALL_OUTPUTS, "lspeaker", 0.48);
+ m_upd7759->add_route(ALL_OUTPUTS, "rspeaker", 0.48);
+}
MACHINE_CONFIG_START(segas1x_bootleg_state::datsu_ym2151_msm5205)
/* TODO:
diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp
index bba948d0b43..e1b406c8241 100644
--- a/src/mame/drivers/twin16.cpp
+++ b/src/mame/drivers/twin16.cpp
@@ -649,36 +649,37 @@ void twin16_state::machine_start()
save_item(NAME(m_CPUB_register));
}
-MACHINE_CONFIG_START(twin16_state::twin16)
+void twin16_state::twin16(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(18'432'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, XTAL(18'432'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &twin16_state::main_map);
- MCFG_DEVICE_ADD("sub", M68000, XTAL(18'432'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
+ M68000(config, m_subcpu, XTAL(18'432'000)/2);
+ m_subcpu->set_addrmap(AS_PROGRAM, &twin16_state::sub_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &twin16_state::sound_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
WATCHDOG_TIMER(config, "watchdog");
// video hardware
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(18'432'000)/2, 576, 0, 40*8, 264, 2*8, 30*8)
- MCFG_SCREEN_UPDATE_DRIVER(twin16_state, screen_update_twin16)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, twin16_state, screen_vblank_twin16))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(18'432'000)/2, 576, 0, 40*8, 264, 2*8, 30*8);
+ m_screen->set_screen_update(FUNC(twin16_state::screen_update_twin16));
+ m_screen->screen_vblank().set(FUNC(twin16_state::screen_vblank_twin16));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_twin16)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_twin16);
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
- MCFG_PALETTE_ENABLE_SHADOWS()
+ PALETTE(config, m_palette, 1024);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
+ m_palette->enable_shadows();
// sound hardware
SPEAKER(config, "lspeaker").front_left();
@@ -688,50 +689,52 @@ MACHINE_CONFIG_START(twin16_state::twin16)
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("k007232", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, twin16_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.12) // estimated with gradius2 OST
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.12)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.12)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.12)
+ K007232(config, m_k007232, XTAL(3'579'545));
+ m_k007232->port_write().set(FUNC(twin16_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.12); // estimated with gradius2 OST
+ m_k007232->add_route(0, "rspeaker", 0.12);
+ m_k007232->add_route(1, "lspeaker", 0.12);
+ m_k007232->add_route(1, "rspeaker", 0.12);
- MCFG_DEVICE_ADD("upd", UPD7759)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ UPD7759(config, m_upd7759);
+ m_upd7759->add_route(ALL_OUTPUTS, "lspeaker", 0.20);
+ m_upd7759->add_route(ALL_OUTPUTS, "rspeaker", 0.20);
+}
-MACHINE_CONFIG_START(twin16_state::devilw)
+void twin16_state::devilw(machine_config &config)
+{
twin16(config);
- MCFG_QUANTUM_TIME(attotime::from_hz(60000)) // watchdog reset otherwise
-MACHINE_CONFIG_END
+ config.m_minimum_quantum = attotime::from_hz(60000); // watchdog reset otherwise
+}
-MACHINE_CONFIG_START(fround_state::fround)
+void fround_state::fround(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(18'432'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(fround_map)
+ M68000(config, m_maincpu, XTAL(18'432'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &fround_state::fround_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &fround_state::sound_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(18'432'000)/2, 576, 0, 40*8, 264, 2*8, 30*8)
- MCFG_SCREEN_UPDATE_DRIVER(twin16_state, screen_update_twin16)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, twin16_state, screen_vblank_twin16))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(18'432'000)/2, 576, 0, 40*8, 264, 2*8, 30*8);
+ m_screen->set_screen_update(FUNC(twin16_state::screen_update_twin16));
+ m_screen->screen_vblank().set(FUNC(twin16_state::screen_vblank_twin16));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fround)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_fround);
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
- MCFG_PALETTE_ENABLE_SHADOWS()
+ PALETTE(config, m_palette, 1024);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
+ m_palette->enable_shadows();
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -741,30 +744,30 @@ MACHINE_CONFIG_START(fround_state::fround)
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("k007232", K007232, XTAL(3'579'545))
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, twin16_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.12)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.12)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.12)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.12)
+ K007232(config, m_k007232, XTAL(3'579'545));
+ m_k007232->port_write().set(FUNC(twin16_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.12);
+ m_k007232->add_route(0, "rspeaker", 0.12);
+ m_k007232->add_route(1, "lspeaker", 0.12);
+ m_k007232->add_route(1, "rspeaker", 0.12);
- MCFG_DEVICE_ADD("upd", UPD7759)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ UPD7759(config, m_upd7759);
+ m_upd7759->add_route(ALL_OUTPUTS, "lspeaker", 0.20);
+ m_upd7759->add_route(ALL_OUTPUTS, "rspeaker", 0.20);
+}
-MACHINE_CONFIG_START(twin16_state::miaj)
+void twin16_state::miaj(machine_config &config)
+{
twin16(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(XTAL(18'432'000)/2, 576, 1*8, 39*8, 264, 2*8, 30*8)
-MACHINE_CONFIG_END
+ m_screen->set_raw(XTAL(18'432'000)/2, 576, 1*8, 39*8, 264, 2*8, 30*8);
+}
-MACHINE_CONFIG_START(cuebrickj_state::cuebrickj)
+void cuebrickj_state::cuebrickj(machine_config &config)
+{
twin16(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(XTAL(18'432'000)/2, 576, 1*8, 39*8, 264, 2*8, 30*8)
+ m_screen->set_raw(XTAL(18'432'000)/2, 576, 1*8, 39*8, 264, 2*8, 30*8);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/vgmplay.cpp b/src/mame/drivers/vgmplay.cpp
index d3d64d38d59..65632f1e41f 100644
--- a/src/mame/drivers/vgmplay.cpp
+++ b/src/mame/drivers/vgmplay.cpp
@@ -3657,13 +3657,13 @@ MACHINE_CONFIG_START(vgmplay_state::vgmplay)
m_multipcm[1]->add_route(1, "rspeaker", 1);
UPD7759(config, m_upd7759[0], 0);
- m_upd7759[0]->set_drq_callback(DEVCB_WRITELINE(*this, vgmplay_state, upd7759_drq_w<0>));
+ m_upd7759[0]->drq().set(FUNC(vgmplay_state::upd7759_drq_w<0>));
m_upd7759[0]->set_addrmap(0, &vgmplay_state::upd7759_map<0>);
m_upd7759[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_upd7759[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
UPD7759(config, m_upd7759[1], 0);
- m_upd7759[1]->set_drq_callback(DEVCB_WRITELINE(*this, vgmplay_state, upd7759_drq_w<1>));
+ m_upd7759[1]->drq().set(FUNC(vgmplay_state::upd7759_drq_w<1>));
m_upd7759[1]->set_addrmap(0, &vgmplay_state::upd7759_map<1>);
m_upd7759[1]->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_upd7759[1]->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp
index 6c89e8069aa..b6f0cf443fd 100644
--- a/src/mame/drivers/wecleman.cpp
+++ b/src/mame/drivers/wecleman.cpp
@@ -1048,36 +1048,36 @@ MACHINE_START_MEMBER(wecleman_state, wecleman)
m_led.resolve();
}
-MACHINE_CONFIG_START(wecleman_state::wecleman)
-
+void wecleman_state::wecleman(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 10000000) /* Schems show 10MHz */
- MCFG_DEVICE_PROGRAM_MAP(wecleman_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wecleman_state, wecleman_scanline, "screen", 0, 1)
+ M68000(config, m_maincpu, 10000000); /* Schems show 10MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(wecleman_state::wecleman_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("sub", M68000, 10000000) /* Schems show 10MHz */
- MCFG_DEVICE_PROGRAM_MAP(wecleman_sub_map)
+ M68000(config, m_subcpu, 10000000); /* Schems show 10MHz */
+ m_subcpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_sub_map);
/* Schems: can be reset, no nmi, soundlatch, 3.58MHz */
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545)
- MCFG_DEVICE_PROGRAM_MAP(wecleman_sound_map)
+ Z80(config, m_audiocpu, 3579545);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_sound_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
MCFG_MACHINE_START_OVERRIDE(wecleman_state, wecleman)
MCFG_MACHINE_RESET_OVERRIDE(wecleman_state, wecleman)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(320 +16, 256)
- MCFG_SCREEN_VISIBLE_AREA(0 +8, 320-1 +8, 0 +8, 224-1 +8)
- MCFG_SCREEN_UPDATE_DRIVER(wecleman_state, screen_update_wecleman)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(320 +16, 256);
+ m_screen->set_visarea(0 +8, 320-1 +8, 0 +8, 224-1 +8);
+ m_screen->set_screen_update(FUNC(wecleman_state::screen_update_wecleman));
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wecleman)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_wecleman);
- MCFG_PALETTE_ADD("palette", 2048)
+ PALETTE(config, m_palette, 2048);
MCFG_VIDEO_START_OVERRIDE(wecleman_state,wecleman)
@@ -1089,11 +1089,11 @@ MACHINE_CONFIG_START(wecleman_state::wecleman)
YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 0.85).add_route(1, "rspeaker", 0.85);
- MCFG_DEVICE_ADD("k007232_1", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, wecleman_state, wecleman_volume_callback))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232[0], 3579545);
+ m_k007232[0]->port_write().set(FUNC(wecleman_state::wecleman_volume_callback));
+ m_k007232[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.20);
+ m_k007232[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.20);
+}
/***************************************************************************
@@ -1124,36 +1124,36 @@ MACHINE_RESET_MEMBER(wecleman_state, hotchase)
}
-MACHINE_CONFIG_START(wecleman_state::hotchase)
-
+void wecleman_state::hotchase(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 10000000) /* 10 MHz - PCB is drawn in one set's readme */
- MCFG_DEVICE_PROGRAM_MAP(hotchase_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", wecleman_state, hotchase_scanline, "screen", 0, 1)
+ M68000(config, m_maincpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */
+ m_maincpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(wecleman_state::hotchase_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("sub", M68000, 10000000) /* 10 MHz - PCB is drawn in one set's readme */
- MCFG_DEVICE_PROGRAM_MAP(hotchase_sub_map)
+ M68000(config, m_subcpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */
+ m_subcpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_sub_map);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, 3579545 / 2) /* 3.579/2 MHz - PCB is drawn in one set's readme */
- MCFG_DEVICE_PROGRAM_MAP(hotchase_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(wecleman_state, hotchase_sound_timer, 496)
+ MC6809E(config, m_audiocpu, 3579545 / 2); /* 3.579/2 MHz - PCB is drawn in one set's readme */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &wecleman_state::hotchase_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(wecleman_state::hotchase_sound_timer), attotime::from_hz(496));
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
MCFG_MACHINE_RESET_OVERRIDE(wecleman_state, hotchase)
MCFG_MACHINE_START_OVERRIDE(wecleman_state, hotchase)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(320 +16, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
- MCFG_SCREEN_UPDATE_DRIVER(wecleman_state, screen_update_hotchase)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(320 +16, 256);
+ m_screen->set_visarea(0, 320-1, 0, 224-1);
+ m_screen->set_screen_update(FUNC(wecleman_state::screen_update_hotchase));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hotchase)
- MCFG_PALETTE_ADD("palette", 8192)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_hotchase);
+ PALETTE(config, m_palette, 8192);
MCFG_VIDEO_START_OVERRIDE(wecleman_state, hotchase)
@@ -1174,21 +1174,21 @@ MACHINE_CONFIG_START(wecleman_state::hotchase)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232_1", K007232, 3579545)
+ K007232(config, m_k007232[0], 3579545);
// SLEV not used, volume control is elsewhere
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
+ m_k007232[0]->add_route(0, "lspeaker", 0.20);
+ m_k007232[0]->add_route(1, "rspeaker", 0.20);
- MCFG_DEVICE_ADD("k007232_2", K007232, 3579545)
+ K007232(config, m_k007232[1], 3579545);
// SLEV not used, volume control is elsewhere
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
+ m_k007232[1]->add_route(0, "lspeaker", 0.20);
+ m_k007232[1]->add_route(1, "rspeaker", 0.20);
- MCFG_DEVICE_ADD("k007232_3", K007232, 3579545)
+ K007232(config, m_k007232[2], 3579545);
// SLEV not used, volume control is elsewhere
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.20)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.20)
-MACHINE_CONFIG_END
+ m_k007232[2]->add_route(0, "lspeaker", 0.20);
+ m_k007232[2]->add_route(1, "rspeaker", 0.20);
+}
/***************************************************************************
diff --git a/src/mame/machine/megadriv.cpp b/src/mame/machine/megadriv.cpp
index 07beee6f97e..e322e6c2225 100644
--- a/src/mame/machine/megadriv.cpp
+++ b/src/mame/machine/megadriv.cpp
@@ -883,15 +883,15 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(md_base_state::md_ntsc)
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK_NTSC / 7) /* 7.67 MHz */
- MCFG_DEVICE_PROGRAM_MAP(megadriv_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(md_base_state,genesis_int_callback)
+ M68000(config, m_maincpu, MASTER_CLOCK_NTSC / 7); /* 7.67 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &md_base_state::megadriv_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(md_base_state::genesis_int_callback));
/* IRQs are handled via the timers */
- MCFG_DEVICE_ADD("genesis_snd_z80", Z80, MASTER_CLOCK_NTSC / 15) /* 3.58 MHz */
- MCFG_DEVICE_PROGRAM_MAP(megadriv_z80_map)
- MCFG_DEVICE_IO_MAP(megadriv_z80_io_map)
+ Z80(config, m_z80snd, MASTER_CLOCK_NTSC / 15); /* 3.58 MHz */
+ m_z80snd->set_addrmap(AS_PROGRAM, &md_base_state::megadriv_z80_map);
+ m_z80snd->set_addrmap(AS_IO, &md_base_state::megadriv_z80_io_map);
/* IRQ handled via the timers */
MCFG_MACHINE_START_OVERRIDE(md_base_state,megadriv)
@@ -938,14 +938,14 @@ MACHINE_CONFIG_END
/************ PAL hardware has a different master clock *************/
MACHINE_CONFIG_START(md_base_state::md_pal)
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK_PAL / 7) /* 7.67 MHz */
- MCFG_DEVICE_PROGRAM_MAP(megadriv_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(md_base_state,genesis_int_callback)
+ M68000(config, m_maincpu, MASTER_CLOCK_PAL / 7); /* 7.67 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &md_base_state::megadriv_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(md_base_state::genesis_int_callback));
/* IRQs are handled via the timers */
- MCFG_DEVICE_ADD("genesis_snd_z80", Z80, MASTER_CLOCK_PAL / 15) /* 3.58 MHz */
- MCFG_DEVICE_PROGRAM_MAP(megadriv_z80_map)
- MCFG_DEVICE_IO_MAP(megadriv_z80_io_map)
+ Z80(config, m_z80snd, MASTER_CLOCK_PAL / 15); /* 3.58 MHz */
+ m_z80snd->set_addrmap(AS_PROGRAM, &md_base_state::megadriv_z80_map);
+ m_z80snd->set_addrmap(AS_IO, &md_base_state::megadriv_z80_io_map);
/* IRQ handled via the timers */
MCFG_MACHINE_START_OVERRIDE(md_base_state,megadriv)