summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-18 20:18:53 +0100
committerGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-18 20:19:18 +0100
commit6b6c476f83fd7544b8863d8e43b4ee7d0d5681c7 (patch)
treec1e003716281cb4afd18637f52c8597783e86764
parent45f5d76b332956961c0431a2ba31d44151f62a69 (diff)
downloadmame-6b6c476f83fd7544b8863d8e43b4ee7d0d5681c7.tar.xz
mame-6b6c476f83fd7544b8863d8e43b4ee7d0d5681c7.zip
-bus/ep64/exp: Removed MCFG macros. [Ryan Holtz]
-sound/awacs, dave, es5503, i5000, k005289, mas3507d, segapcm, ta7630: Removed MCFG macros. [Ryan Holtz] -drivers/40love, buggychl, ep64, flstory, mquake, msisaac, nemesis, rabbit, segahang, segaorun, segaxbd, segaybd, tmmjprd: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-rw-r--r--src/devices/bus/ep64/exp.h23
-rw-r--r--src/devices/machine/msm6253.h9
-rw-r--r--src/devices/sound/awacs.h17
-rw-r--r--src/devices/sound/dave.h6
-rw-r--r--src/devices/sound/es5503.h15
-rw-r--r--src/devices/sound/i5000.h11
-rw-r--r--src/devices/sound/k005289.h10
-rw-r--r--src/devices/sound/mas3507d.h12
-rw-r--r--src/devices/sound/segapcm.h11
-rw-r--r--src/devices/sound/ta7630.h12
-rw-r--r--src/mame/drivers/40love.cpp147
-rw-r--r--src/mame/drivers/buggychl.cpp72
-rw-r--r--src/mame/drivers/ep64.cpp69
-rw-r--r--src/mame/drivers/flstory.cpp306
-rw-r--r--src/mame/drivers/mquake.cpp36
-rw-r--r--src/mame/drivers/msisaac.cpp69
-rw-r--r--src/mame/drivers/nemesis.cpp655
-rw-r--r--src/mame/drivers/rabbit.cpp44
-rw-r--r--src/mame/drivers/segahang.cpp282
-rw-r--r--src/mame/drivers/segaorun.cpp91
-rw-r--r--src/mame/drivers/segaxbd.cpp235
-rw-r--r--src/mame/drivers/segaybd.cpp86
-rw-r--r--src/mame/drivers/tmmjprd.cpp70
-rw-r--r--src/mame/includes/40love.h4
-rw-r--r--src/mame/includes/flstory.h1
-rw-r--r--src/mame/machine/k573dio.cpp7
26 files changed, 1000 insertions, 1300 deletions
diff --git a/src/devices/bus/ep64/exp.h b/src/devices/bus/ep64/exp.h
index 5a89296f3a5..cb29bab5049 100644
--- a/src/devices/bus/ep64/exp.h
+++ b/src/devices/bus/ep64/exp.h
@@ -50,6 +50,7 @@
#include "sound/dave.h"
+void ep64_expansion_bus_cards(device_slot_interface &device);
//**************************************************************************
// MACROS / CONSTANTS
@@ -57,8 +58,6 @@
#define EP64_EXPANSION_BUS_TAG "exp"
-
-
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
@@ -96,12 +95,20 @@ class ep64_expansion_bus_slot_device : public device_t,
public:
// construction/destruction
+ ep64_expansion_bus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, char const *dflt)
+ : ep64_expansion_bus_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ ep64_expansion_bus_cards(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
ep64_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- void set_dave_tag(const char* tag) { m_dave.set_tag(tag); }
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_nmi_wr_callback(Object &&cb) { return m_write_nmi.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_wait_wr_callback(Object &&cb) { return m_write_wait.set_callback(std::forward<Object>(cb)); }
+ template <typename T> void set_dave_tag(T &&dave_tag) { m_dave.set_tag(std::forward<T>(dave_tag)); }
+ auto irq_wr() { return m_write_irq.bind(); }
+ auto nmi_wr() { return m_write_nmi.bind(); }
+ auto wait_wr() { return m_write_wait.bind(); }
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_write_nmi(state); }
@@ -142,8 +149,4 @@ protected:
// device type definition
DECLARE_DEVICE_TYPE(EP64_EXPANSION_BUS_SLOT, ep64_expansion_bus_slot_device)
-
-void ep64_expansion_bus_cards(device_slot_interface &device);
-
-
#endif // MAME_BUS_EP64_EXP_H
diff --git a/src/devices/machine/msm6253.h b/src/devices/machine/msm6253.h
index 4f617b29a4e..25a17585221 100644
--- a/src/devices/machine/msm6253.h
+++ b/src/devices/machine/msm6253.h
@@ -72,6 +72,15 @@ public:
// configuration
template <unsigned P> void set_input_tag(const char *tag) { m_analog_ports[P].set_tag(tag); }
template <unsigned P, typename... T> void set_input_cb(T &&... args) { m_analog_input_cb[P] = port_read_delegate(std::forward<T>(args)...); }
+ template <unsigned P> void set_input_cb(port_read_delegate callback) { m_analog_input_cb[P] = callback; }
+ template <unsigned P, class FunctionClass> void set_input_cb(const char *devname, ioport_value (FunctionClass::*callback)(), const char *name)
+ {
+ set_input_cb<P>(port_read_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <unsigned P, class FunctionClass> void set_input_cb(ioport_value (FunctionClass::*callback)(), const char *name)
+ {
+ set_input_cb<P>(port_read_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
// write handlers
WRITE8_MEMBER(address_w);
diff --git a/src/devices/sound/awacs.h b/src/devices/sound/awacs.h
index d0dd5cb2441..68f6f428550 100644
--- a/src/devices/sound/awacs.h
+++ b/src/devices/sound/awacs.h
@@ -13,23 +13,6 @@
#pragma once
-
-
-
-//**************************************************************************
-// CONSTANTS
-//**************************************************************************
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_AWACS_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, AWACS, _clock)
-
-#define MCFG_AWACS_REPLACE(_tag, _clock) \
- MCFG_DEVICE_REPLACE(_tag, AWACS, _clock)
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/sound/dave.h b/src/devices/sound/dave.h
index a9fe6dca6a6..c18df5f4eca 100644
--- a/src/devices/sound/dave.h
+++ b/src/devices/sound/dave.h
@@ -56,9 +56,9 @@ class dave_device : public device_t,
public:
dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_lh_wr_callback(Object &&cb) { return m_write_lh.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_rh_wr_callback(Object &&cb) { return m_write_rh.set_callback(std::forward<Object>(cb)); }
+ auto irq_wr() { return m_write_irq.bind(); }
+ auto lh_wr() { return m_write_lh.bind(); }
+ auto rh_wr() { return m_write_rh.bind(); }
virtual void z80_program_map(address_map &map);
virtual void z80_io_map(address_map &map);
diff --git a/src/devices/sound/es5503.h b/src/devices/sound/es5503.h
index 1625f864851..967ec70a2d2 100644
--- a/src/devices/sound/es5503.h
+++ b/src/devices/sound/es5503.h
@@ -5,20 +5,6 @@
#pragma once
-// channels must be a power of two
-
-#define MCFG_ES5503_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, ES5503, _clock)
-
-#define MCFG_ES5503_OUTPUT_CHANNELS(_channels) \
- downcast<es5503_device &>(*device).set_channels(_channels);
-
-#define MCFG_ES5503_IRQ_FUNC(_write) \
- downcast<es5503_device &>(*device).set_irqf(DEVCB_##_write);
-
-#define MCFG_ES5503_ADC_FUNC(_read) \
- downcast<es5503_device &>(*device).set_adcf(DEVCB_##_read);
-
// ======================> es5503_device
class es5503_device : public device_t,
@@ -29,6 +15,7 @@ public:
// construction/destruction
es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ // channels must be a power of two
void set_channels(int channels) { output_channels = channels; }
template <class Object> devcb_base &set_irqf(Object &&cb) { return m_irq_func.set_callback(std::forward<Object>(cb)); }
diff --git a/src/devices/sound/i5000.h b/src/devices/sound/i5000.h
index a9fdfd39a1b..f3891f2730f 100644
--- a/src/devices/sound/i5000.h
+++ b/src/devices/sound/i5000.h
@@ -15,17 +15,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_I5000_SND_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, I5000_SND, _clock)
-
-#define MCFG_I5000_SND_REPLACE(_tag, _clock) \
- MCFG_DEVICE_REPLACE(_tag, I5000_SND, _clock)
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/sound/k005289.h b/src/devices/sound/k005289.h
index 96647ddce04..04e4c29672d 100644
--- a/src/devices/sound/k005289.h
+++ b/src/devices/sound/k005289.h
@@ -6,16 +6,6 @@
#pragma once
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_K005289_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, K005289, _clock)
-#define MCFG_K005289_REPLACE(_tag, _clock) \
- MCFG_DEVICE_REPLACE(_tag, K005289, _clock)
-
-
// ======================> k005289_device
class k005289_device : public device_t,
diff --git a/src/devices/sound/mas3507d.h b/src/devices/sound/mas3507d.h
index 2f5935b6402..f36a4fb2004 100644
--- a/src/devices/sound/mas3507d.h
+++ b/src/devices/sound/mas3507d.h
@@ -7,16 +7,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_MAS3507D_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MAS3507D, 0)
-
-#define MCFG_MAS3507D_REPLACE(_tag) \
- MCFG_DEVICE_REPLACE(_tag, MAS3507D, 0)
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -24,7 +14,7 @@ class mas3507d_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
int i2c_scl_r();
int i2c_sda_r();
diff --git a/src/devices/sound/segapcm.h b/src/devices/sound/segapcm.h
index 3d4004d7814..2ca83cb73ee 100644
--- a/src/devices/sound/segapcm.h
+++ b/src/devices/sound/segapcm.h
@@ -11,17 +11,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_SEGAPCM_BANK(bank) \
- downcast<segapcm_device &>(*device).set_bank((segapcm_device::bank));
-
-#define MCFG_SEGAPCM_BANK_MASK(bank, mask) \
- downcast<segapcm_device &>(*device).set_bank((segapcm_device::bank) | (segapcm_device::mask));
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/devices/sound/ta7630.h b/src/devices/sound/ta7630.h
index f3b2ca19ae0..e32b4bab407 100644
--- a/src/devices/sound/ta7630.h
+++ b/src/devices/sound/ta7630.h
@@ -11,16 +11,6 @@
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_TA7630_ADD(tag) \
- MCFG_DEVICE_ADD((tag), TA7630, (0))
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -32,7 +22,7 @@ class ta7630_device : public device_t
{
public:
// construction/destruction
- ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// filter setters
void set_device_volume(device_sound_interface *device,uint8_t value);
diff --git a/src/mame/drivers/40love.cpp b/src/mame/drivers/40love.cpp
index 5d566abf5ad..e1fc7b48704 100644
--- a/src/mame/drivers/40love.cpp
+++ b/src/mame/drivers/40love.cpp
@@ -672,131 +672,82 @@ void fortyl_state::machine_reset()
m_snd_ctrl3 = 0;
}
-MACHINE_CONFIG_START(fortyl_state::_40love)
-
+void fortyl_state::common(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80,8000000/2) /* OK */
- MCFG_DEVICE_PROGRAM_MAP(_40love_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", fortyl_state, irq0_line_hold)
+ Z80(config, m_maincpu, 8000000/2);
+ m_maincpu->set_vblank_int("screen", FUNC(fortyl_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu",Z80,8000000/2) /* OK */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(fortyl_state, irq0_line_hold, 2*60) /* source/number of IRQs is unknown */
+ Z80(config, m_audiocpu, 8000000/2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &fortyl_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(fortyl_state::irq0_line_hold), attotime::from_hz(2*60)); /* source/number of IRQs is unknown */
GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
+ INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, 18432000/6) /* OK */
+ TAITO68705_MCU(config, m_bmcu, 18432000/6); /* OK */
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* high interleave to ensure proper synchronization of CPUs */
+ config.m_minimum_quantum = attotime::from_hz(6000); /* high interleave to ensure proper synchronization of CPUs */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(fortyl_state, screen_update_fortyl)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_40love)
- MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", "proms", 1024)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(128,128+255, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(fortyl_state::screen_update_fortyl));
+ screen.set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_40love);
+ PALETTE(config, m_palette, 1024);
+ m_palette->set_prom_region("proms");
+ m_palette->set_init("palette", FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_TA7630_ADD("ta7630")
+ TA7630(config, m_ta7630);
YM2149(config, m_ay, 2000000);
m_ay->port_a_write_callback().set(FUNC(fortyl_state::sound_control_2_w));
m_ay->port_b_write_callback().set(FUNC(fortyl_state::sound_control_3_w));
m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1);
- MCFG_DEVICE_ADD("msm", MSM5232, 8000000/4)
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
+ MSM5232(config, m_msm, 8000000/4);
+ m_msm->set_capacitors(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6); /* 1.0 uF capacitors (verified on real PCB) */
+ m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1
+ m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1
+ m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1
+ m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1
+ m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2
+ m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2
+ m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2
+ m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(fortyl_state::undoukai)
-
- /* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80,8000000/2)
- MCFG_DEVICE_PROGRAM_MAP(undoukai_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", fortyl_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu",Z80,8000000/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(fortyl_state, irq0_line_hold, 2*60) /* source/number of IRQs is unknown */
-
- GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
-
- GENERIC_LATCH_8(config, m_soundlatch2);
-
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, 18432000/6)
-
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(fortyl_state, screen_update_fortyl)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_40love)
- MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", "proms", 1024)
-
- /* sound hardware */
- SPEAKER(config, "speaker").front_center();
-
- MCFG_TA7630_ADD("ta7630")
-
- YM2149(config, m_ay, 2000000);
- m_ay->port_a_write_callback().set(FUNC(fortyl_state::sound_control_2_w));
- m_ay->port_b_write_callback().set(FUNC(fortyl_state::sound_control_3_w));
- m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1);
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
- MCFG_DEVICE_ADD("msm", MSM5232, 8000000/4)
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
- // pin 1 SOLO 8' not mapped
- // pin 2 SOLO 16' not mapped
- // pin 22 Noise Output not mapped
+void fortyl_state::_40love(machine_config &config)
+{
+ common(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &fortyl_state::_40love_map);
+}
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+void fortyl_state::undoukai(machine_config &config)
+{
+ common(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &fortyl_state::undoukai_map);
+}
/*******************************************************************************/
diff --git a/src/mame/drivers/buggychl.cpp b/src/mame/drivers/buggychl.cpp
index 7c88b34c4b8..538b98fe447 100644
--- a/src/mame/drivers/buggychl.cpp
+++ b/src/mame/drivers/buggychl.cpp
@@ -510,16 +510,16 @@ void buggychl_state::machine_reset()
m_bg_scrollx = 0;
}
-MACHINE_CONFIG_START(buggychl_state::buggychl)
-
+void buggychl_state::buggychl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 48_MHz_XTAL/8) /* 6 MHz according to schematics, though it can be jumpered for 4MHz as well */
- MCFG_DEVICE_PROGRAM_MAP(buggychl_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", buggychl_state, irq0_line_hold)
+ Z80(config, m_maincpu, 48_MHz_XTAL/8); /* 6 MHz according to schematics, though it can be jumpered for 4MHz as well */
+ m_maincpu->set_addrmap(AS_PROGRAM, &buggychl_state::buggychl_map);
+ m_maincpu->set_vblank_int("screen", FUNC(buggychl_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, 8_MHz_XTAL/2) /* 4 MHz according to schematics */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(buggychl_state, irq0_line_hold, 8_MHz_XTAL/2/2/256/64) // timer irq
+ Z80(config, m_audiocpu, 8_MHz_XTAL/2); /* 4 MHz according to schematics */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &buggychl_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(buggychl_state::irq0_line_hold), attotime::from_hz(8_MHz_XTAL/2/2/256/64)); // timer irq
//MCFG_TIMER_DEVICE_ADD_PERIODIC("soundirq", "audiocpu", irq0_line_hold, 8_MHz_XTAL/2/2/256/64)
// The schematics (which are at least partly for the wrong sound board) show a configurable timer with rates of
// 61.035Hz (8_MHz_XTAL/2/2/256/128)
@@ -530,27 +530,26 @@ MACHINE_CONFIG_START(buggychl_state::buggychl)
// TODO: actually hook this up?
/* audiocpu nmi is caused by (main->sound semaphore)&&(sound_nmi_enabled), identical to bubble bobble. */
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, 48_MHz_XTAL/8/2) /* CPUspeed/2 MHz according to schematics, so 3MHz if cpu is jumpered for 6MHz */
-
+ TAITO68705_MCU(config, m_bmcu, 48_MHz_XTAL/8/2); /* CPUspeed/2 MHz according to schematics, so 3MHz if cpu is jumpered for 6MHz */
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // typical Taito 74ls392
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
// derived from ladyfrog.cpp, causes glitches?
-// MCFG_SCREEN_RAW_PARAMS( 8_MHz_XTAL, 510, 0, 256, 262, 2*8, 30*8 ) // pixel clock appears to run at 8 MHz
- MCFG_SCREEN_UPDATE_DRIVER(buggychl_state, screen_update_buggychl)
- MCFG_SCREEN_PALETTE("palette")
+// m_screen->set_raw(8_MHz_XTAL, 510, 0, 256, 262, 2*8, 30*8); // pixel clock appears to run at 8 MHz
+ m_screen->set_screen_update(FUNC(buggychl_state::screen_update_buggychl));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_buggychl)
- MCFG_PALETTE_ADD("palette", 128+128)
- MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
- MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
- MCFG_PALETTE_INIT_OWNER(buggychl_state, buggychl)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_buggychl);
+ PALETTE(config, m_palette, 128+128);
+ m_palette->set_format(PALETTE_FORMAT_xxxxRRRRGGGGBBBB);
+ m_palette->set_endianness(ENDIANNESS_BIG);
+ m_palette->set_init(FUNC(buggychl_state::palette_init_buggychl));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -558,12 +557,11 @@ MACHINE_CONFIG_START(buggychl_state::buggychl)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
+ INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_TA7630_ADD("ta7630")
+ TA7630(config, m_ta7630);
YM2149(config, m_ay1, 8_MHz_XTAL/4);
m_ay1->port_a_write_callback().set(FUNC(buggychl_state::ta7630_volbal_ay1_w));
@@ -575,20 +573,20 @@ MACHINE_CONFIG_START(buggychl_state::buggychl)
m_ay2->port_b_write_callback().set(FUNC(buggychl_state::port_b_1_w));
m_ay2->add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_DEVICE_ADD("msm", MSM5232, 8_MHz_XTAL/4)
- MCFG_MSM5232_SET_CAPACITORS(0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6) /* default 0.39 uF capacitors (not verified) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MSM5232(config, m_msm, 8_MHz_XTAL/4);
+ m_msm->set_capacitors(0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6); /* default 0.39 uF capacitors (not verified) */
+ m_msm->add_route(0, "mono", 1.0); // pin 28 2'-1
+ m_msm->add_route(1, "mono", 1.0); // pin 29 4'-1
+ m_msm->add_route(2, "mono", 1.0); // pin 30 8'-1
+ m_msm->add_route(3, "mono", 1.0); // pin 31 16'-1
+ m_msm->add_route(4, "mono", 1.0); // pin 36 2'-2
+ m_msm->add_route(5, "mono", 1.0); // pin 35 4'-2
+ m_msm->add_route(6, "mono", 1.0); // pin 34 8'-2
+ m_msm->add_route(7, "mono", 1.0); // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp
index f008fe97d2a..00df7844f3d 100644
--- a/src/mame/drivers/ep64.cpp
+++ b/src/mame/drivers/ep64.cpp
@@ -188,6 +188,7 @@ public:
m_cassette1(*this, CASSETTE1_TAG),
m_cassette2(*this, CASSETTE2_TAG),
m_cart(*this, "cartslot"),
+ m_exp(*this, EP64_EXPANSION_BUS_TAG),
m_ram(*this, RAM_TAG),
m_rom(*this, Z80_TAG),
m_y(*this, "Y%u", 0)
@@ -205,6 +206,7 @@ private:
required_device<cassette_image_device> m_cassette1;
required_device<cassette_image_device> m_cassette2;
required_device<generic_slot_device> m_cart;
+ required_device<ep64_expansion_bus_slot_device> m_exp;
required_device<ram_device> m_ram;
required_memory_region m_rom;
required_ioport_array<10> m_y;
@@ -570,11 +572,12 @@ void ep64_state::machine_reset()
// MACHINE_CONFIG( ep64 )
//-------------------------------------------------
-MACHINE_CONFIG_START(ep64_state::ep64)
+void ep64_state::ep64(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(8'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(ep64_mem)
- MCFG_DEVICE_IO_MAP(ep64_io)
+ Z80(config, m_maincpu, XTAL(8'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ep64_state::ep64_mem);
+ m_maincpu->set_addrmap(AS_IO, &ep64_state::ep64_io);
// video hardware
screen_device& screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
@@ -588,57 +591,63 @@ MACHINE_CONFIG_START(ep64_state::ep64)
m_nick->virq_wr_callback().set(m_dave, FUNC(dave_device::int1_w));
// sound hardware
- MCFG_DAVE_ADD(m_dave, XTAL(8'000'000), dave_64k_mem, dave_io)
- MCFG_DAVE_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+ DAVE(config, m_dave, XTAL(8'000'000));
+ m_dave->set_addrmap(AS_PROGRAM, &ep64_state::dave_64k_mem);
+ m_dave->set_addrmap(AS_IO, &ep64_state::dave_io);
+ m_dave->irq_wr().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
+ m_dave->add_route(0, "lspeaker", 0.25);
+ m_dave->add_route(1, "rspeaker", 0.25);
// devices
- MCFG_EP64_EXPANSION_BUS_SLOT_ADD(EP64_EXPANSION_BUS_TAG, nullptr)
- MCFG_EP64_EXPANSION_BUS_SLOT_DAVE(DAVE_TAG)
- MCFG_EP64_EXPANSION_BUS_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_EP64_EXPANSION_BUS_SLOT_NMI_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_NMI))
- MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT))
+ EP64_EXPANSION_BUS_SLOT(config, m_exp, nullptr);
+ m_exp->set_dave_tag(m_dave);
+ m_exp->irq_wr().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_exp->nmi_wr().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_exp->wait_wr().set_inputline(m_maincpu, Z80_INPUT_LINE_BOGUSWAIT);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, ep64_state, write_centronics_busy))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(ep64_state::write_centronics_busy));
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
m_rs232->rxd_handler().set(m_dave, FUNC(dave_device::int2_w));
- MCFG_CASSETTE_ADD(CASSETTE1_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("ep64_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED));
+ m_cassette1->set_interface("ep64_cass");
- MCFG_CASSETTE_ADD(CASSETTE2_TAG)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_CASSETTE_INTERFACE("ep64_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED));
+ m_cassette2->set_interface("ep64_cass");
// internal RAM
RAM(config, m_ram).set_default_size("64K");
// cartridge
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "ep64_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "ep64_cart", "bin,rom");
// software lists
- MCFG_SOFTWARE_LIST_ADD("cart_list", "ep64_cart")
- MCFG_SOFTWARE_LIST_ADD("cass_list", "ep64_cass")
- MCFG_SOFTWARE_LIST_ADD("flop_list", "ep64_flop")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "cart_list").set_original("ep64_cart");
+ SOFTWARE_LIST(config, "cass_list").set_original("ep64_cass");
+ SOFTWARE_LIST(config, "flop_list").set_original("ep64_flop");
+}
//-------------------------------------------------
// MACHINE_CONFIG( ep128 )
//-------------------------------------------------
-MACHINE_CONFIG_START(ep64_state::ep128)
+void ep64_state::ep128(machine_config &config)
+{
ep64(config);
- MCFG_DEVICE_MODIFY(DAVE_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_PROGRAM, dave_128k_mem)
+ m_dave->set_addrmap(AS_PROGRAM, &ep64_state::dave_128k_mem);
// internal RAM
m_ram->set_default_size("128K");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp
index b79e7460cf3..787bd0e63b6 100644
--- a/src/mame/drivers/flstory.cpp
+++ b/src/mame/drivers/flstory.cpp
@@ -733,40 +733,29 @@ MACHINE_RESET_MEMBER(flstory_state,flstory)
m_from_mcu = 0;
}
-MACHINE_CONFIG_START(flstory_state::flstory)
-
- /* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'733'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(flstory_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
- /* NMI generated by the main CPU */
+void flstory_state::common(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(10'733'000)/2); /* verified on pcb */
+ m_maincpu->set_vblank_int("screen", FUNC(flstory_state::irq0_line_hold));
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, XTAL(18'432'000)/6) /* verified on pcb */
+ Z80(config, m_audiocpu, XTAL(8'000'000)/2); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &flstory_state::sound_map);
+ /* IRQ generated by ???, NMI generated by the main CPU */
+ m_audiocpu->set_periodic_int(FUNC(flstory_state::irq0_line_hold), attotime::from_hz(2*60));
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
- /* synchronization of the CPUs */
- MCFG_MACHINE_RESET_OVERRIDE(flstory_state,flstory)
+ /* 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs */
+ config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
// derived from ladyfrog.cpp, guess
- MCFG_SCREEN_RAW_PARAMS( XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8 ) // pixel clock appears to run at 8 MHz
- MCFG_SCREEN_UPDATE_DRIVER(flstory_state, screen_update_flstory)
- MCFG_SCREEN_PALETTE("palette")
+ screen.set_raw(XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8); // pixel clock appears to run at 8 MHz
+ screen.set_screen_update(FUNC(flstory_state::screen_update_flstory));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flstory)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
-
- MCFG_VIDEO_START_OVERRIDE(flstory_state,flstory)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_flstory);
+ PALETTE(config, m_palette, 512);
+ m_palette->set_format(PALETTE_FORMAT_xxxxBBBBGGGGRRRR);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -774,257 +763,94 @@ MACHINE_CONFIG_START(flstory_state::flstory)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
+ INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline("audiocpu", INPUT_LINE_NMI);
GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_TA7630_ADD("ta7630")
+ TA7630(config, m_ta7630);
YM2149(config, m_ay, XTAL(8'000'000)/4); /* verified on pcb */
m_ay->port_a_write_callback().set(FUNC(flstory_state::sound_control_2_w));
m_ay->port_b_write_callback().set(FUNC(flstory_state::sound_control_3_w));
m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1);
- MCFG_DEVICE_ADD("msm", MSM5232, XTAL(8'000'000)/4) /* verified on pcb */
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
+ MSM5232(config, m_msm, XTAL(8'000'000)/4); /* verified on pcb */
+ m_msm->set_capacitors(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6); /* 1.0 uF capacitors (verified on real PCB) */
+ m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1
+ m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1
+ m_msm->add_route(2, "speaker", 1.0); // pin 30 8'-1
+ m_msm->add_route(3, "speaker", 1.0); // pin 31 16'-1
+ m_msm->add_route(4, "speaker", 1.0); // pin 36 2'-2
+ m_msm->add_route(5, "speaker", 1.0); // pin 35 4'-2
+ m_msm->add_route(6, "speaker", 1.0); // pin 34 8'-2
+ m_msm->add_route(7, "speaker", 1.0); // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
-MACHINE_CONFIG_START(flstory_state::onna34ro)
+void flstory_state::flstory(machine_config &config)
+{
+ common(config);
- /* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'733'000)/2) /* ??? */
- MCFG_DEVICE_PROGRAM_MAP(onna34ro_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold)
+ m_maincpu->set_addrmap(AS_PROGRAM, &flstory_state::flstory_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000)/2) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
- /* NMI generated by the main CPU */
+ TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); /* verified on pcb */
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
- /* synchronization of the CPUs */
MCFG_MACHINE_RESET_OVERRIDE(flstory_state,flstory)
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- // derived from ladyfrog.cpp, guess
- MCFG_SCREEN_RAW_PARAMS( XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8 ) // pixel clock appears to run at 8 MHz
- MCFG_SCREEN_UPDATE_DRIVER(flstory_state, screen_update_flstory)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flstory)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
-
MCFG_VIDEO_START_OVERRIDE(flstory_state,flstory)
+}
- /* sound hardware */
- SPEAKER(config, "speaker").front_center();
-
- GENERIC_LATCH_8(config, m_soundlatch);
- m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
-
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_TA7630_ADD("ta7630")
-
- YM2149(config, m_ay, XTAL(8'000'000)/4);
- m_ay->port_a_write_callback().set(FUNC(flstory_state::sound_control_2_w));
- m_ay->port_b_write_callback().set(FUNC(flstory_state::sound_control_3_w));
- m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1);
+void flstory_state::onna34ro(machine_config &config)
+{
+ common(config);
- MCFG_DEVICE_ADD("msm", MSM5232, XTAL(8'000'000)/4)
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
- // pin 1 SOLO 8' not mapped
- // pin 2 SOLO 16' not mapped
- // pin 22 Noise Output not mapped
+ m_maincpu->set_addrmap(AS_PROGRAM, &flstory_state::onna34ro_map);
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ MCFG_MACHINE_RESET_OVERRIDE(flstory_state,flstory)
+ MCFG_VIDEO_START_OVERRIDE(flstory_state,flstory)
+}
-MACHINE_CONFIG_START(flstory_state::onna34ro_mcu)
+void flstory_state::onna34ro_mcu(machine_config &config)
+{
onna34ro(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(onna34ro_mcu_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &flstory_state::onna34ro_mcu_map);
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, XTAL(18'432'000)/6) /* ? */
-MACHINE_CONFIG_END
+ TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); /* ? */
+}
-MACHINE_CONFIG_START(flstory_state::victnine)
+void flstory_state::victnine(machine_config &config)
+{
+ common(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000)/2) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(victnine_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000)/2) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
- /* NMI generated by the main CPU */
+ m_maincpu->set_clock(XTAL(8'000'000)/2); /* 4 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &flstory_state::victnine_map);
-// MCFG_DEVICE_ADD("mcu", M68705, XTAL(18'432'000)/6) /* ??? */
-// MCFG_DEVICE_PROGRAM_MAP(m68705_map)
-
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
- /* synchronization of the CPUs */
MCFG_MACHINE_RESET_OVERRIDE(flstory_state,flstory)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- // derived from ladyfrog.cpp, guess
- MCFG_SCREEN_RAW_PARAMS( XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8 ) // pixel clock appears to run at 8 MHzs
- MCFG_SCREEN_UPDATE_DRIVER(flstory_state, screen_update_victnine)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flstory)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
-
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(flstory_state::screen_update_victnine));
MCFG_VIDEO_START_OVERRIDE(flstory_state,victnine)
+}
- /* sound hardware */
- SPEAKER(config, "speaker").front_center();
-
- GENERIC_LATCH_8(config, m_soundlatch);
- m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
-
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_TA7630_ADD("ta7630")
-
- YM2149(config, m_ay, XTAL(8'000'000)/4);
- m_ay->port_a_write_callback().set(FUNC(flstory_state::sound_control_2_w));
- m_ay->port_b_write_callback().set(FUNC(flstory_state::sound_control_3_w));
- m_ay->add_route(ALL_OUTPUTS, "speaker", 0.5);
-
- MCFG_DEVICE_ADD("msm", MSM5232, XTAL(8'000'000)/4)
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
- // pin 1 SOLO 8' not mapped
- // pin 2 SOLO 16' not mapped
- // pin 22 Noise Output not mapped
-
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(flstory_state::rumba)
+void flstory_state::rumba(machine_config &config)
+{
+ common(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(rumba_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", flstory_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(flstory_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
- /* NMI generated by the main CPU */
-
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, XTAL(18'432'000)/6) /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &flstory_state::rumba_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
- /* synchronization of the CPUs */
+ TAITO68705_MCU(config, m_bmcu, XTAL(18'432'000)/6); /* ? */
MCFG_MACHINE_RESET_OVERRIDE(flstory_state,flstory)
-
- /* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- // derived from ladyfrog.cpp, guess
- MCFG_SCREEN_RAW_PARAMS( XTAL(8'000'000), 510, 0, 256, 262, 2*8, 30*8 ) // pixel clock appears to run at 8 MHz
- MCFG_SCREEN_UPDATE_DRIVER(flstory_state, screen_update_rumba)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_flstory)
- MCFG_PALETTE_ADD("palette", 512)
- MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR)
-
MCFG_VIDEO_START_OVERRIDE(flstory_state,rumba)
-
- /* sound hardware */
- SPEAKER(config, "speaker").front_center();
-
- GENERIC_LATCH_8(config, m_soundlatch);
- m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>));
-
- MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_TA7630_ADD("ta7630")
-
- YM2149(config, m_ay, XTAL(8'000'000)/4); /* verified on pcb */
- m_ay->port_a_write_callback().set(FUNC(flstory_state::sound_control_2_w));
- m_ay->port_b_write_callback().set(FUNC(flstory_state::sound_control_3_w));
- m_ay->add_route(ALL_OUTPUTS, "speaker", 0.5);
-
- MCFG_DEVICE_ADD("msm", MSM5232, XTAL(8'000'000)/4) /* verified on pcb */
- MCFG_MSM5232_SET_CAPACITORS(1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6, 1.0e-6) /* 1.0 uF capacitors (verified on real PCB) */
- MCFG_SOUND_ROUTE(0, "speaker", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "speaker", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "speaker", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "speaker", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "speaker", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "speaker", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "speaker", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "speaker", 1.0) // pin 33 16'-2
- // pin 1 SOLO 8' not mapped
- // pin 2 SOLO 16' not mapped
- // pin 22 Noise Output not mapped
-
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.1) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mquake.cpp b/src/mame/drivers/mquake.cpp
index 317c7d799aa..d37ff7c5813 100644
--- a/src/mame/drivers/mquake.cpp
+++ b/src/mame/drivers/mquake.cpp
@@ -313,11 +313,11 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(mquake_state::mquake)
-
+void mquake_state::mquake(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, amiga_state::CLK_7M_NTSC)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, amiga_state::CLK_7M_NTSC);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mquake_state::main_map);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_512kb_map).set_options(ENDIANNESS_BIG, 16, 22, 0x200000);
@@ -326,8 +326,8 @@ MACHINE_CONFIG_START(mquake_state::mquake)
/* video hardware */
ntsc_video(config);
- MCFG_PALETTE_ADD("palette", 4096)
- MCFG_PALETTE_INIT_OWNER(mquake_state,amiga)
+ PALETTE(config, m_palette, 4096);
+ m_palette->set_init(FUNC(mquake_state::palette_init_amiga));
MCFG_VIDEO_START_OVERRIDE(mquake_state,amiga)
@@ -343,19 +343,19 @@ MACHINE_CONFIG_START(mquake_state::mquake)
paula.mem_read_cb().set(FUNC(amiga_state::chip_ram_r));
paula.int_cb().set(FUNC(amiga_state::paula_int_w));
- MCFG_ES5503_ADD("es5503", amiga_state::CLK_7M_NTSC) /* ES5503 is likely mono due to channel strobe used as bank select */
- MCFG_ES5503_OUTPUT_CHANNELS(1)
- MCFG_DEVICE_ADDRESS_MAP(0, mquake_es5503_map)
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.50)
+ ES5503(config, m_es5503, amiga_state::CLK_7M_NTSC); /* ES5503 is likely mono due to channel strobe used as bank select */
+ m_es5503->set_channels(1);
+ m_es5503->set_addrmap(0, &mquake_state::mquake_es5503_map);
+ m_es5503->add_route(0, "lspeaker", 0.50);
+ m_es5503->add_route(0, "rspeaker", 0.50);
/* cia */
- MCFG_DEVICE_ADD("cia_0", MOS8520, amiga_state::CLK_E_NTSC)
- MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(*this, amiga_state, cia_0_irq))
- MCFG_MOS6526_PA_INPUT_CALLBACK(IOPORT("CIA0PORTA"))
- MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(*this, amiga_state, cia_0_port_a_write))
- MCFG_DEVICE_ADD("cia_1", MOS8520, amiga_state::CLK_E_NTSC)
- MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(*this, amiga_state, cia_1_irq))
+ MOS8520(config, m_cia_0, amiga_state::CLK_E_NTSC);
+ m_cia_0->irq_wr_callback().set(FUNC(amiga_state::cia_0_irq));
+ m_cia_0->pa_rd_callback().set_ioport("CIA0PORTA");
+ m_cia_0->pa_wr_callback().set(FUNC(amiga_state::cia_0_port_a_write));
+ MOS8520(config, m_cia_1, amiga_state::CLK_E_NTSC);
+ m_cia_1->irq_wr_callback().set(FUNC(amiga_state::cia_1_irq));
/* fdc */
AMIGA_FDC(config, m_fdc, amiga_state::CLK_7M_NTSC);
@@ -364,7 +364,7 @@ MACHINE_CONFIG_START(mquake_state::mquake)
m_fdc->write_dma_callback().set(FUNC(amiga_state::chip_ram_w));
m_fdc->dskblk_callback().set(FUNC(amiga_state::fdc_dskblk_w));
m_fdc->dsksyn_callback().set(FUNC(amiga_state::fdc_dsksyn_w));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/msisaac.cpp b/src/mame/drivers/msisaac.cpp
index 5f87c45b5b8..0fa86c5eff6 100644
--- a/src/mame/drivers/msisaac.cpp
+++ b/src/mame/drivers/msisaac.cpp
@@ -446,43 +446,40 @@ void msisaac_state::machine_reset()
#endif
}
-MACHINE_CONFIG_START(msisaac_state::msisaac)
-
+void msisaac_state::msisaac(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(msisaac_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", msisaac_state, irq0_line_hold)
+ Z80(config, m_maincpu, 4000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &msisaac_state::msisaac_map);
+ m_maincpu->set_vblank_int("screen", FUNC(msisaac_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(msisaac_sound_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", msisaac_state, irq0_line_hold) /* source of IRQs is unknown */
+ Z80(config, m_audiocpu, 4000000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &msisaac_state::msisaac_sound_map);
+ m_audiocpu->set_vblank_int("screen", FUNC(msisaac_state::irq0_line_hold)); /* source of IRQs is unknown */
#ifdef USE_MCU
- MCFG_DEVICE_ADD("mcu", M68705,8000000/2) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(buggychl_mcu_map)
- MCFG_DEVICE_ADD("bmcu", BUGGYCHL_MCU, 0)
+ M68705(config, "mcu", 8000000/2).set_addrmap(AS_PROGRAM, &msisaac_state::buggychl_mcu_map); /* 4 MHz */
+ BUGGYCHL_MCU(config, m_bmcu, 0);
#endif
-
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(msisaac_state, screen_update_msisaac)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_msisaac)
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB)
-
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(msisaac_state::screen_update_msisaac));
+ screen.set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_msisaac);
+ PALETTE(config, m_palette, 1024);
+ m_palette->set_format(PALETTE_FORMAT_xxxxRRRRGGGGBBBB);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_TA7630_ADD("ta7630")
+ TA7630(config, m_ta7630);
AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.15);
// port A/B likely to be TA7630 filters
@@ -490,20 +487,20 @@ MACHINE_CONFIG_START(msisaac_state::msisaac)
AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.15);
// port A/B likely to be TA7630 filters
- MCFG_DEVICE_ADD("msm", MSM5232, 2000000)
- MCFG_MSM5232_SET_CAPACITORS(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6) /* 0.65 (???) uF capacitors (match the sample, not verified) */
- MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
- MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
- MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
- MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
- MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
- MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
- MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
- MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
+ MSM5232(config, m_msm, 2000000);
+ m_msm->set_capacitors(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6); /* 0.65 (???) uF capacitors (match the sample, not verified) */
+ m_msm->add_route(0, "mono", 1.0); // pin 28 2'-1
+ m_msm->add_route(1, "mono", 1.0); // pin 29 4'-1
+ m_msm->add_route(2, "mono", 1.0); // pin 30 8'-1
+ m_msm->add_route(3, "mono", 1.0); // pin 31 16'-1
+ m_msm->add_route(4, "mono", 1.0); // pin 36 2'-2
+ m_msm->add_route(5, "mono", 1.0); // pin 35 4'-2
+ m_msm->add_route(6, "mono", 1.0); // pin 34 8'-2
+ m_msm->add_route(7, "mono", 1.0); // pin 33 16'-2
// pin 1 SOLO 8' not mapped
// pin 2 SOLO 16' not mapped
// pin 22 Noise Output not mapped
-MACHINE_CONFIG_END
+}
/*******************************************************************************/
diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp
index f8db2b6d1f3..ee23fbba0d8 100644
--- a/src/mame/drivers/nemesis.cpp
+++ b/src/mame/drivers/nemesis.cpp
@@ -1458,15 +1458,15 @@ void nemesis_state::machine_reset()
m_irq_port_last = 0;
}
-MACHINE_CONFIG_START(nemesis_state::nemesis)
-
+void nemesis_state::nemesis(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
-// 14318180/2, /* From schematics, should be accurate */
- MCFG_DEVICE_PROGRAM_MAP(nemesis_map)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */
+// 14318180/2, /* From schematics, should be accurate */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::nemesis_map);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* From schematics, should be accurate */
- MCFG_DEVICE_PROGRAM_MAP(sound_map) /* fixed */
+ Z80(config, m_audiocpu, 14318180/4); /* From schematics, should be accurate */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sound_map); /* fixed */
ls259_device &outlatch(LS259(config, "outlatch")); // 13J
outlatch.q_out_cb<0>().set(FUNC(nemesis_state::coin1_lockout_w));
@@ -1481,18 +1481,17 @@ MACHINE_CONFIG_START(nemesis_state::nemesis)
WATCHDOG_TIMER(config, "watchdog", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* ??? */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nemesis_state, nemesis_vblank_irq))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
-
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* ??? */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(nemesis_state::nemesis_vblank_irq));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1511,29 +1510,28 @@ MACHINE_CONFIG_START(nemesis_state::nemesis)
ay2.add_route(1, "filter3", 1.00);
ay2.add_route(2, "filter4", 1.00);
- MCFG_DEVICE_ADD("filter1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter3", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter4", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_K005289_ADD("k005289", 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::gx400)
+ FILTER_RC(config, m_filter1);
+ m_filter1->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter2);
+ m_filter2->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter3);
+ m_filter3->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter4);
+ m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ K005289(config, m_k005289, 3579545);
+ m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35);
+}
+void nemesis_state::gx400(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
- MCFG_DEVICE_PROGRAM_MAP(gx400_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::gx400_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(gx400_sound_map)
+ Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map);
ls259_device &outlatch(LS259(config, "outlatch"));
outlatch.q_out_cb<0>().set(FUNC(nemesis_state::coin1_lockout_w));;
@@ -1550,18 +1548,17 @@ MACHINE_CONFIG_START(nemesis_state::gx400)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
-
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set_inputline("audiocpu", INPUT_LINE_NMI);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1580,33 +1577,32 @@ MACHINE_CONFIG_START(nemesis_state::gx400)
ay2.add_route(1, "filter3", 1.00);
ay2.add_route(2, "filter4", 1.00);
- MCFG_DEVICE_ADD("filter1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter3", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter4", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_K005289_ADD("k005289", 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
-
- MCFG_DEVICE_ADD("vlm", VLM5030, 3579545)
- MCFG_DEVICE_ADDRESS_MAP(0, gx400_vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::konamigt)
+ FILTER_RC(config, m_filter1);
+ m_filter1->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter2);
+ m_filter2->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter3);
+ m_filter3->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter4);
+ m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ K005289(config, m_k005289, 3579545);
+ m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35);
+
+ VLM5030(config, m_vlm, 3579545);
+ m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map);
+ m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70);
+}
+void nemesis_state::konamigt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(konamigt_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::konamigt_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::konamigt_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sound_map);
ls259_device &outlatch(LS259(config, "outlatch"));
outlatch.q_out_cb<0>().set(FUNC(nemesis_state::coin2_lockout_w));
@@ -1622,17 +1618,16 @@ MACHINE_CONFIG_START(nemesis_state::konamigt)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1651,29 +1646,28 @@ MACHINE_CONFIG_START(nemesis_state::konamigt)
ay2.add_route(1, "filter3", 1.00);
ay2.add_route(2, "filter4", 1.00);
- MCFG_DEVICE_ADD("filter1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter3", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter4", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_K005289_ADD("k005289", 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::rf2_gx400)
+ FILTER_RC(config, m_filter1);
+ m_filter1->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter2);
+ m_filter2->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter3);
+ m_filter3->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter4);
+ m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ K005289(config, m_k005289, 3579545);
+ m_k005289->add_route(ALL_OUTPUTS, "mono", 0.60);
+}
+void nemesis_state::rf2_gx400(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
- MCFG_DEVICE_PROGRAM_MAP(rf2_gx400_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::rf2_gx400_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::gx400_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(gx400_sound_map)
+ Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map);
ls259_device &outlatch(LS259(config, "outlatch"));
outlatch.q_out_cb<0>().set(FUNC(nemesis_state::coin1_lockout_w));;
@@ -1690,18 +1684,17 @@ MACHINE_CONFIG_START(nemesis_state::rf2_gx400)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
-
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set_inputline("audiocpu", INPUT_LINE_NMI);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -1720,50 +1713,49 @@ MACHINE_CONFIG_START(nemesis_state::rf2_gx400)
ay2.add_route(1, "filter3", 1.00);
ay2.add_route(2, "filter4", 1.00);
- MCFG_DEVICE_ADD("filter1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter3", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter4", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_K005289_ADD("k005289", 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-
- MCFG_DEVICE_ADD("vlm", VLM5030, 3579545)
- MCFG_DEVICE_ADDRESS_MAP(0, gx400_vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::salamand)
+ FILTER_RC(config, m_filter1);
+ m_filter1->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter2);
+ m_filter2->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter3);
+ m_filter3->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter4);
+ m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ K005289(config, m_k005289, 3579545);
+ m_k005289->add_route(ALL_OUTPUTS, "mono", 0.60);
+
+ VLM5030(config, m_vlm, 3579545);
+ m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map);
+ m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70);
+}
+void nemesis_state::salamand(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
- MCFG_DEVICE_PROGRAM_MAP(salamand_map)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::salamand_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sal_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sal_sound_map);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((264-256)*125/2))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nemesis_state, nemesis_vblank_irq))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((264-256)*125/2));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(nemesis_state::nemesis_vblank_irq));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -1771,51 +1763,50 @@ MACHINE_CONFIG_START(nemesis_state::salamand)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("vlm", VLM5030, 3579545)
- MCFG_DEVICE_ADDRESS_MAP(0, salamand_vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 2.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 2.50)
+ VLM5030(config, m_vlm, 3579545);
+ m_vlm->set_addrmap(0, &nemesis_state::salamand_vlm_map);
+ m_vlm->add_route(ALL_OUTPUTS, "lspeaker", 2.50);
+ m_vlm->add_route(ALL_OUTPUTS, "rspeaker", 2.50);
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, nemesis_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.08)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.08)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.08)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.08)
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(nemesis_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.08);
+ m_k007232->add_route(0, "rspeaker", 0.08);
+ m_k007232->add_route(1, "lspeaker", 0.08);
+ m_k007232->add_route(1, "rspeaker", 0.08);
ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545));
// ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go
ymsnd.add_route(0, "rspeaker", 1.2); // reversed according to MT #4565
ymsnd.add_route(1, "lspeaker", 1.2);
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::blkpnthr)
+}
+void nemesis_state::blkpnthr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(blkpnthr_map)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::blkpnthr_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(blkpnthr_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::blkpnthr_sound_map);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nemesis_state, blkpnthr_vblank_irq))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(nemesis_state::blkpnthr_vblank_irq));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -1823,46 +1814,45 @@ MACHINE_CONFIG_START(nemesis_state::blkpnthr)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, nemesis_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.10)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.10)
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(nemesis_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.10);
+ m_k007232->add_route(0, "rspeaker", 0.10);
+ m_k007232->add_route(1, "lspeaker", 0.10);
+ m_k007232->add_route(1, "rspeaker", 0.10);
ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545));
// ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go
ymsnd.add_route(0, "lspeaker", 1.0);
ymsnd.add_route(1, "rspeaker", 1.0);
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::citybomb)
+}
+void nemesis_state::citybomb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(citybomb_map)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::citybomb_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(city_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::city_sound_map);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nemesis_state, nemesis_vblank_irq))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(nemesis_state::nemesis_vblank_irq));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -1870,50 +1860,49 @@ MACHINE_CONFIG_START(nemesis_state::citybomb)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, nemesis_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.30)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.30)
-
- MCFG_DEVICE_ADD("ymsnd", YM3812, 3579545)
-// MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) ... Interrupts _are_ generated, I wonder where they go
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_K051649_ADD("k051649", 3579545/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.38)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.38)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::nyanpani)
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(nemesis_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.30);
+ m_k007232->add_route(0, "rspeaker", 0.30);
+ m_k007232->add_route(1, "lspeaker", 0.30);
+ m_k007232->add_route(1, "rspeaker", 0.30);
+
+ ym3812_device &ym3812(YM3812(config, "ymsnd", 3579545));
+// ym3812.irq_handler().set_inputline("audiocpu", 0); ... Interrupts _are_ generated, I wonder where they go
+ ym3812.add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ ym3812.add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ k051649_device &k051649(K051649(config, "k051649", 3579545/2));
+ k051649.add_route(ALL_OUTPUTS, "lspeaker", 0.38);
+ k051649.add_route(ALL_OUTPUTS, "rspeaker", 0.38);
+}
+void nemesis_state::nyanpani(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(nyanpani_map)
+ M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::nyanpani_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(city_sound_map)
+ Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::city_sound_map);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nemesis_state, nemesis_vblank_irq))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(nemesis_state::nemesis_vblank_irq));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -1921,33 +1910,32 @@ MACHINE_CONFIG_START(nemesis_state::nyanpani)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, nemesis_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.30)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.30)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.30)
-
- MCFG_DEVICE_ADD("ymsnd", YM3812, 3579545)
-// MCFG_YM3812_IRQ_HANDLER(INPUTLINE("audiocpu", 0)) ... Interrupts _are_ generated, I wonder where they go
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
- MCFG_K051649_ADD("k051649", 3579545/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.38)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.38)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(nemesis_state::hcrash)
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(nemesis_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.30);
+ m_k007232->add_route(0, "rspeaker", 0.30);
+ m_k007232->add_route(1, "lspeaker", 0.30);
+ m_k007232->add_route(1, "rspeaker", 0.30);
+
+ ym3812_device &ym3812(YM3812(config, "ymsnd", 3579545));
+// ym3812.irq_handler().set_inputline("audiocpu", 0); ... Interrupts _are_ generated, I wonder where they go
+ ym3812.add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ ym3812.add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+
+ k051649_device &k051649(K051649(config, "k051649", 3579545/2));
+ k051649.add_route(ALL_OUTPUTS, "lspeaker", 0.38);
+ k051649.add_route(ALL_OUTPUTS, "rspeaker", 0.38);
+}
+void nemesis_state::hcrash(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/3) /* 6.144MHz */
- MCFG_DEVICE_PROGRAM_MAP(hcrash_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, konamigt_interrupt, "screen", 0, 1)
+ M68000(config, m_maincpu, 18432000/3); /* 6.144MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::hcrash_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::konamigt_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sal_sound_map)
+ Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sal_sound_map);
ls259_device &intlatch(LS259(config, "intlatch"));
intlatch.q_out_cb<0>().set_nop(); // ?
@@ -1957,18 +1945,18 @@ MACHINE_CONFIG_START(nemesis_state::hcrash)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- MCFG_PALETTE_MEMBITS(8)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
+ m_palette->set_membits(8);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -1976,23 +1964,23 @@ MACHINE_CONFIG_START(nemesis_state::hcrash)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("vlm", VLM5030, 3579545)
- MCFG_DEVICE_ADDRESS_MAP(0, salamand_vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
+ VLM5030(config, m_vlm, 3579545);
+ m_vlm->set_addrmap(0, &nemesis_state::salamand_vlm_map);
+ m_vlm->add_route(ALL_OUTPUTS, "lspeaker", 1.00);
+ m_vlm->add_route(ALL_OUTPUTS, "rspeaker", 1.00);
- MCFG_DEVICE_ADD("k007232", K007232, 3579545)
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, nemesis_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.10)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.10)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.10)
+ K007232(config, m_k007232, 3579545);
+ m_k007232->port_write().set(FUNC(nemesis_state::volume_callback));
+ m_k007232->add_route(0, "lspeaker", 0.10);
+ m_k007232->add_route(0, "rspeaker", 0.10);
+ m_k007232->add_route(1, "lspeaker", 0.10);
+ m_k007232->add_route(1, "rspeaker", 0.10);
ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545));
// ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go
ymsnd.add_route(0, "lspeaker", 1.0);
ymsnd.add_route(1, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
/***************************************************************************
@@ -2693,16 +2681,16 @@ Manual says SW4, 5, 6, 7 & 8 not used, leave off
*/
-MACHINE_CONFIG_START(nemesis_state::bubsys)
-
+void nemesis_state::bubsys(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,18432000/2) /* 9.216MHz */
- MCFG_DEVICE_PROGRAM_MAP(gx400_map)
- //MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", nemesis_state, gx400_interrupt, "screen", 0, 1)
- MCFG_DEVICE_DISABLE()
+ M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_map);
+ //TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::gx400_interrupt), "screen", 0, 1);
+ m_maincpu->set_disable();
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4) /* 3.579545 MHz */
- MCFG_DEVICE_PROGRAM_MAP(gx400_sound_map)
+ Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map);
ls259_device &outlatch(LS259(config, "outlatch"));
outlatch.q_out_cb<0>().set(FUNC(nemesis_state::coin1_lockout_w));;
@@ -2719,18 +2707,17 @@ MACHINE_CONFIG_START(nemesis_state::bubsys)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264)) /* 60.606060 Hz */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nemesis_state, screen_update_nemesis)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("audiocpu", INPUT_LINE_NMI))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_nemesis)
- MCFG_PALETTE_ADD("palette", 2048)
-
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz((18432000.0/4)/(288*264)); /* 60.606060 Hz */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(nemesis_state::screen_update_nemesis));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set_inputline("audiocpu", INPUT_LINE_NMI);
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_nemesis);
+ PALETTE(config, m_palette, 2048);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2749,22 +2736,22 @@ MACHINE_CONFIG_START(nemesis_state::bubsys)
ay2.add_route(1, "filter3", 1.00);
ay2.add_route(2, "filter4", 1.00);
- MCFG_DEVICE_ADD("filter1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter3", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD("filter4", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
- MCFG_K005289_ADD("k005289", 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)
-
- MCFG_DEVICE_ADD("vlm", VLM5030, 3579545)
- MCFG_DEVICE_ADDRESS_MAP(0, gx400_vlm_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
+ FILTER_RC(config, m_filter1);
+ m_filter1->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter2);
+ m_filter2->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter3);
+ m_filter3->add_route(ALL_OUTPUTS, "mono", 1.0);
+ FILTER_RC(config, m_filter4);
+ m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0);
+
+ K005289(config, m_k005289, 3579545);
+ m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35);
+
+ VLM5030(config, m_vlm, 3579545);
+ m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map);
+ m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70);
+}
diff --git a/src/mame/drivers/rabbit.cpp b/src/mame/drivers/rabbit.cpp
index 2b14095c96b..853fa6a9239 100644
--- a/src/mame/drivers/rabbit.cpp
+++ b/src/mame/drivers/rabbit.cpp
@@ -901,36 +901,38 @@ INTERRUPT_GEN_MEMBER(rabbit_state::vblank_interrupt)
m_maincpu->set_input_line(m_vblirqlevel, HOLD_LINE);
}
-MACHINE_CONFIG_START(rabbit_state::rabbit)
- MCFG_DEVICE_ADD("maincpu", M68EC020, XTAL(24'000'000))
- MCFG_DEVICE_PROGRAM_MAP(rabbit_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", rabbit_state, vblank_interrupt)
+void rabbit_state::rabbit(machine_config &config)
+{
+ M68EC020(config, m_maincpu, XTAL(24'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &rabbit_state::rabbit_map);
+ m_maincpu->set_vblank_int("screen", FUNC(rabbit_state::vblank_interrupt));
- EEPROM_93C46_16BIT(config, "eeprom");
+ EEPROM_93C46_16BIT(config, m_eeprom);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rabbit)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_rabbit);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*16, 64*16)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*16, 64*16-1)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 20*16-1, 32*16, 48*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(rabbit_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*16, 64*16);
+ screen.set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+// screen.set_visarea(0*8, 64*16-1, 0*16, 64*16-1);
+// screen.set_visarea(0*8, 20*16-1, 32*16, 48*16-1);
+ screen.set_screen_update(FUNC(rabbit_state::screen_update));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD_INIT_BLACK("palette", 0x4000)
- MCFG_PALETTE_FORMAT(XGRB)
+ PALETTE(config, m_palette, 0x4000);
+ m_palette->set_init("palette", FUNC(palette_device::palette_init_all_black));
+ m_palette->set_format(PALETTE_FORMAT_XGRB);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_I5000_SND_ADD("i5000snd", XTAL(40'000'000))
- MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
-MACHINE_CONFIG_END
+ i5000snd_device &i5000snd(I5000_SND(config, "i5000snd", XTAL(40'000'000)));
+ i5000snd.add_route(0, "rspeaker", 1.0);
+ i5000snd.add_route(1, "lspeaker", 1.0);
+}
diff --git a/src/mame/drivers/segahang.cpp b/src/mame/drivers/segahang.cpp
index 1f8a1af3ec9..f8ea9f93938 100644
--- a/src/mame/drivers/segahang.cpp
+++ b/src/mame/drivers/segahang.cpp
@@ -757,17 +757,17 @@ GFXDECODE_END
// GENERIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segahang_state::shared_base)
-
+void segahang_state::shared_base(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK_25MHz/4)
- MCFG_DEVICE_PROGRAM_MAP(hangon_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segahang_state, irq4_line_hold)
+ M68000(config, m_maincpu, MASTER_CLOCK_25MHz/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segahang_state::hangon_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segahang_state::irq4_line_hold));
- MCFG_DEVICE_ADD("subcpu", M68000, MASTER_CLOCK_25MHz/4)
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
+ M68000(config, m_subcpu, MASTER_CLOCK_25MHz/4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &segahang_state::sub_map);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
I8255(config, m_i8255_1);
m_i8255_1->out_pa_callback().set("soundlatch", FUNC(generic_latch_8_device::write));
@@ -779,20 +779,19 @@ MACHINE_CONFIG_START(segahang_state::shared_base)
m_i8255_2->in_pc_callback().set(FUNC(segahang_state::adc_status_r));
SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode");
- MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0)
+ SEGAIC16_ROAD(config, m_segaic16road, 0);
// video hardware
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segahang)
- MCFG_PALETTE_ADD("palette", 2048*3)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_segahang);
+ PALETTE(config, m_palette, 2048*3);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224)
- MCFG_SCREEN_UPDATE_DRIVER(segahang_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224);
+ m_screen->set_screen_update(FUNC(segahang_state::screen_update));
+ m_screen->set_palette(m_palette);
GENERIC_LATCH_8(config, m_soundlatch);
-MACHINE_CONFIG_END
-
+}
void segahang_state::hangon_base(machine_config &config)
{
@@ -801,115 +800,112 @@ void segahang_state::hangon_base(machine_config &config)
SEGA_HANGON_SPRITES(config, m_sprites, 0);
}
-
-MACHINE_CONFIG_START(segahang_state::sharrier_base)
+void segahang_state::sharrier_base(machine_config &config)
+{
shared_base(config);
// basic machine hardware
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(MASTER_CLOCK_10MHz)
- MCFG_DEVICE_PROGRAM_MAP(sharrier_map)
+ m_maincpu->set_clock(MASTER_CLOCK_10MHz);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segahang_state::sharrier_map);
- MCFG_DEVICE_MODIFY("subcpu")
- MCFG_DEVICE_CLOCK(MASTER_CLOCK_10MHz)
+ m_subcpu->set_clock(MASTER_CLOCK_10MHz);
// video hardware
SEGA_SHARRIER_SPRITES(config, m_sprites, 0);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(segahang_state::enduror_base)
+void segahang_state::enduror_base(machine_config &config)
+{
sharrier_base(config);
// basic machine hardware
- MCFG_DEVICE_REPLACE("maincpu", FD1089B, MASTER_CLOCK_10MHz)
- MCFG_DEVICE_PROGRAM_MAP(sharrier_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segahang_state, irq4_line_hold)
-MACHINE_CONFIG_END
+ FD1089B(config.replace(), m_maincpu, MASTER_CLOCK_10MHz);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segahang_state::sharrier_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segahang_state::irq4_line_hold));
+}
-MACHINE_CONFIG_START(segahang_state::endurord_base)
+void segahang_state::endurord_base(machine_config &config)
+{
sharrier_base(config);
// basic machine hardware
- MCFG_DEVICE_REPLACE("maincpu", M68000, MASTER_CLOCK_10MHz)
- MCFG_DEVICE_PROGRAM_MAP(sharrier_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segahang_state, irq4_line_hold)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(segahang_state::sound_board_2203)
+ M68000(config.replace(), m_maincpu, MASTER_CLOCK_10MHz);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segahang_state::sharrier_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segahang_state::irq4_line_hold));
+}
+void segahang_state::sound_board_2203(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("soundcpu", Z80, MASTER_CLOCK_8MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_map_2203)
- MCFG_DEVICE_IO_MAP(sound_portmap_2203)
+ Z80(config, m_soundcpu, MASTER_CLOCK_8MHz/2);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segahang_state::sound_map_2203);
+ m_soundcpu->set_addrmap(AS_IO, &segahang_state::sound_portmap_2203);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymsnd", YM2203, MASTER_CLOCK_8MHz/2)
- MCFG_YM2203_IRQ_HANDLER(INPUTLINE("soundcpu", 0))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(3, "lspeaker", 0.37)
- MCFG_SOUND_ROUTE(3, "rspeaker", 0.37)
-
- MCFG_DEVICE_ADD("pcm", SEGAPCM, MASTER_CLOCK_8MHz)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(segahang_state::sound_board_2203x2)
+ ym2203_device &ymsnd(YM2203(config, "ymsnd", MASTER_CLOCK_8MHz/2));
+ ymsnd.irq_handler().set_inputline("soundcpu", 0);
+ ymsnd.add_route(0, "lspeaker", 0.13);
+ ymsnd.add_route(0, "rspeaker", 0.13);
+ ymsnd.add_route(1, "lspeaker", 0.13);
+ ymsnd.add_route(1, "rspeaker", 0.13);
+ ymsnd.add_route(2, "lspeaker", 0.13);
+ ymsnd.add_route(2, "rspeaker", 0.13);
+ ymsnd.add_route(3, "lspeaker", 0.37);
+ ymsnd.add_route(3, "rspeaker", 0.37);
+
+ segapcm_device &pcm(SEGAPCM(config, "pcm", MASTER_CLOCK_8MHz));
+ pcm.set_bank(segapcm_device::BANK_512);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
+void segahang_state::sound_board_2203x2(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("soundcpu", Z80, MASTER_CLOCK_8MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_map_2151)
- MCFG_DEVICE_IO_MAP(sound_portmap_2203x2)
+ Z80(config, m_soundcpu, MASTER_CLOCK_8MHz/2);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segahang_state::sound_map_2151);
+ m_soundcpu->set_addrmap(AS_IO, &segahang_state::sound_portmap_2203x2);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ym1", YM2203, MASTER_CLOCK_8MHz/2)
- MCFG_YM2203_IRQ_HANDLER(INPUTLINE("soundcpu", 0))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(3, "lspeaker", 0.37)
- MCFG_SOUND_ROUTE(3, "rspeaker", 0.37)
-
- MCFG_DEVICE_ADD("ym2", YM2203, MASTER_CLOCK_8MHz/2)
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "lspeaker", 0.13)
- MCFG_SOUND_ROUTE(2, "rspeaker", 0.13)
- MCFG_SOUND_ROUTE(3, "lspeaker", 0.37)
- MCFG_SOUND_ROUTE(3, "rspeaker", 0.37)
-
- MCFG_DEVICE_ADD("pcm", SEGAPCM, MASTER_CLOCK_8MHz/2)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(segahang_state::sound_board_2151)
+ ym2203_device &ym1(YM2203(config, "ym1", MASTER_CLOCK_8MHz/2));
+ ym1.irq_handler().set_inputline("soundcpu", 0);
+ ym1.add_route(0, "lspeaker", 0.13);
+ ym1.add_route(0, "rspeaker", 0.13);
+ ym1.add_route(1, "lspeaker", 0.13);
+ ym1.add_route(1, "rspeaker", 0.13);
+ ym1.add_route(2, "lspeaker", 0.13);
+ ym1.add_route(2, "rspeaker", 0.13);
+ ym1.add_route(3, "lspeaker", 0.37);
+ ym1.add_route(3, "rspeaker", 0.37);
+
+ ym2203_device &ym2(YM2203(config, "ym2", MASTER_CLOCK_8MHz/2));
+ ym2.add_route(0, "lspeaker", 0.13);
+ ym2.add_route(0, "rspeaker", 0.13);
+ ym2.add_route(1, "lspeaker", 0.13);
+ ym2.add_route(1, "rspeaker", 0.13);
+ ym2.add_route(2, "lspeaker", 0.13);
+ ym2.add_route(2, "rspeaker", 0.13);
+ ym2.add_route(3, "lspeaker", 0.37);
+ ym2.add_route(3, "rspeaker", 0.37);
+
+ segapcm_device &pcm(SEGAPCM(config, "pcm", MASTER_CLOCK_8MHz/2));
+ pcm.set_bank(segapcm_device::BANK_512);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
+void segahang_state::sound_board_2151(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("soundcpu", Z80, MASTER_CLOCK_8MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_map_2151)
- MCFG_DEVICE_IO_MAP(sound_portmap_2151)
+ Z80(config, m_soundcpu, MASTER_CLOCK_8MHz/2);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segahang_state::sound_map_2151);
+ m_soundcpu->set_addrmap(AS_IO, &segahang_state::sound_portmap_2151);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
@@ -920,97 +916,93 @@ MACHINE_CONFIG_START(segahang_state::sound_board_2151)
ymsnd.add_route(0, "lspeaker", 0.43);
ymsnd.add_route(1, "rspeaker", 0.43);
- MCFG_DEVICE_ADD("pcm", SEGAPCM, MASTER_CLOCK_8MHz/2)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
+ segapcm_device &pcm(SEGAPCM(config, "pcm", MASTER_CLOCK_8MHz/2));
+ pcm.set_bank(segapcm_device::BANK_512);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
//**************************************************************************
// SPECIFIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segahang_state::hangon)
+void segahang_state::hangon(machine_config &config)
+{
hangon_base(config);
sound_board_2203(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(segahang_state::shangupb)
+void segahang_state::shangupb(machine_config &config)
+{
hangon_base(config);
sound_board_2151(config);
// not sure about these speeds, but at 6MHz, the road is not updated fast enough
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(10000000)
- MCFG_DEVICE_MODIFY("subcpu")
- MCFG_DEVICE_CLOCK(10000000)
-MACHINE_CONFIG_END
-
+ m_maincpu->set_clock(10000000);
+ m_subcpu->set_clock(10000000);
+}
-MACHINE_CONFIG_START(segahang_state::shangonro)
+void segahang_state::shangonro(machine_config &config)
+{
shangupb(config);
- MCFG_DEVICE_REPLACE("subcpu", FD1094, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
- MCFG_DEVICE_OPCODES_MAP(fd1094_decrypted_opcodes_map)
-MACHINE_CONFIG_END
-
+ FD1094(config.replace(), m_subcpu, 10000000);
+ m_subcpu->set_addrmap(AS_PROGRAM, &segahang_state::sub_map);
+ m_subcpu->set_addrmap(AS_OPCODES, &segahang_state::fd1094_decrypted_opcodes_map);
+}
-MACHINE_CONFIG_START(segahang_state::sharrier)
+void segahang_state::sharrier(machine_config &config)
+{
sharrier_base(config);
sound_board_2203(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segahang_state, i8751_main_cpu_vblank)
-
- MCFG_DEVICE_ADD("mcu", I8751, 8000000)
- MCFG_DEVICE_IO_MAP(mcu_io_map)
+ m_maincpu->set_vblank_int("screen", FUNC(segahang_state::i8751_main_cpu_vblank));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("mcu", INPUT_LINE_IRQ0))
-MACHINE_CONFIG_END
+ I8751(config, m_mcu, 8000000);
+ m_mcu->set_addrmap(AS_IO, mcu_io_map);
+ m_screen->screen_vblank().set_inputline("mcu", INPUT_LINE_IRQ0);
+}
-MACHINE_CONFIG_START(segahang_state::enduror)
+void segahang_state::enduror(machine_config &config)
+{
enduror_base(config);
sound_board_2151(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(segahang_state::enduror1)
+void segahang_state::enduror1(machine_config &config)
+{
enduror_base(config);
sound_board_2203(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segahang_state::endurord)
+void segahang_state::endurord(machine_config &config)
+{
endurord_base(config);
sound_board_2151(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(segahang_state::enduror1d)
+void segahang_state::enduror1d(machine_config &config)
+{
endurord_base(config);
sound_board_2203(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segahang_state::endurobl)
+void segahang_state::endurobl(machine_config &config)
+{
sharrier_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ m_maincpu->set_addrmap(AS_OPCODES, &segahang_state::decrypted_opcodes_map);
sound_board_2203(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(segahang_state::endurob2)
+void segahang_state::endurob2(machine_config &config)
+{
sharrier_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ m_maincpu->set_addrmap(AS_OPCODES, &segahang_state::decrypted_opcodes_map);
sound_board_2203x2(config);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp
index d6cc081746e..031eadbb32f 100644
--- a/src/mame/drivers/segaorun.cpp
+++ b/src/mame/drivers/segaorun.cpp
@@ -1144,20 +1144,20 @@ GFXDECODE_END
// GENERIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segaorun_state::outrun_base)
-
+void segaorun_state::outrun_base(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(outrun_map)
+ M68000(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaorun_state::outrun_map);
- MCFG_DEVICE_ADD("subcpu", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
+ M68000(config, m_subcpu, MASTER_CLOCK/4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &segaorun_state::sub_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, SOUND_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
+ Z80(config, m_soundcpu, SOUND_CLOCK/4);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segaorun_state::sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &segaorun_state::sound_portmap);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
WATCHDOG_TIMER(config, m_watchdog);
@@ -1174,16 +1174,16 @@ MACHINE_CONFIG_START(segaorun_state::outrun_base)
m_mapper->pbf().set_inputline(m_soundcpu, INPUT_LINE_NMI);
// video hardware
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segaorun)
- MCFG_PALETTE_ADD("palette", 4096*3)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_segaorun);
+ PALETTE(config, m_palette, 4096*3);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224)
- MCFG_SCREEN_UPDATE_DRIVER(segaorun_state, screen_update_outrun)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224);
+ m_screen->set_screen_update(FUNC(segaorun_state::screen_update_outrun));
+ m_screen->set_palette(m_palette);
SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode");
- MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0)
+ SEGAIC16_ROAD(config, m_segaic16road, 0);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
@@ -1191,11 +1191,11 @@ MACHINE_CONFIG_START(segaorun_state::outrun_base)
YM2151(config, "ymsnd", SOUND_CLOCK/4).add_route(0, "lspeaker", 0.43).add_route(1, "rspeaker", 0.43);
- MCFG_DEVICE_ADD("pcm", SEGAPCM, SOUND_CLOCK/4)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ segapcm_device &pcm(SEGAPCM(config, "pcm", SOUND_CLOCK/4));
+ pcm.set_bank(segapcm_device::BANK_512);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
@@ -1203,15 +1203,16 @@ MACHINE_CONFIG_END
// GAME-SPECIFIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segaorun_state::outrundx)
+void segaorun_state::outrundx(machine_config &config)
+{
outrun_base(config);
// basic machine hardware
- MCFG_TIMER_DRIVER_ADD_PERIODIC("bankmotor", segaorun_state, bankmotor_update, attotime::from_msec(10))
+ TIMER(config, "bankmotor").configure_periodic(FUNC(segaorun_state::bankmotor_update), attotime::from_msec(10));
// video hardware
SEGA_OUTRUN_SPRITES(config, m_sprites, 0);
-MACHINE_CONFIG_END
+}
void segaorun_state::outrun(machine_config &config)
{
@@ -1220,25 +1221,27 @@ void segaorun_state::outrun(machine_config &config)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
-MACHINE_CONFIG_START(segaorun_state::outrun_fd1094)
+void segaorun_state::outrun_fd1094(machine_config &config)
+{
outrun(config);
// basic machine hardware
- MCFG_DEVICE_REPLACE("maincpu", FD1094, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(outrun_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+ FD1094(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaorun_state::outrun_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &segaorun_state::decrypted_opcodes_map);
+}
-MACHINE_CONFIG_START(segaorun_state::outrun_fd1089a)
+void segaorun_state::outrun_fd1089a(machine_config &config)
+{
outrun(config);
// basic machine hardware
- MCFG_DEVICE_REPLACE("maincpu", FD1089A, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(outrun_map)
-MACHINE_CONFIG_END
-
+ FD1089A(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaorun_state::outrun_map);
+}
-MACHINE_CONFIG_START(segaorun_state::shangon)
+void segaorun_state::shangon(machine_config &config)
+{
outrun_base(config);
// basic machine hardware
@@ -1252,20 +1255,20 @@ MACHINE_CONFIG_START(segaorun_state::shangon)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224)
- MCFG_SCREEN_UPDATE_DRIVER(segaorun_state, screen_update_shangon)
+ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224);
+ m_screen->set_screen_update(FUNC(segaorun_state::screen_update_shangon));
SEGA_SYS16B_SPRITES(config, m_sprites, 0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segaorun_state::shangon_fd1089b)
+void segaorun_state::shangon_fd1089b(machine_config &config)
+{
shangon(config);
// basic machine hardware
- MCFG_DEVICE_REPLACE("maincpu", FD1089B, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(outrun_map)
-MACHINE_CONFIG_END
+ FD1089B(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaorun_state::outrun_map);
+}
diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp
index 02bf1f9eb00..10ddc01a405 100644
--- a/src/mame/drivers/segaxbd.cpp
+++ b/src/mame/drivers/segaxbd.cpp
@@ -1672,8 +1672,8 @@ GFXDECODE_END
// GENERIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig )
-
+void segaxbd_state::xboard_base_mconfig(machine_config &config)
+{
// basic machine hardware
M68000(config, m_maincpu, MASTER_CLOCK/4);
m_maincpu->set_addrmap(AS_PROGRAM, &segaxbd_state::main_map);
@@ -1681,13 +1681,13 @@ MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig )
M68000(config, m_subcpu, MASTER_CLOCK/4);
m_subcpu->set_addrmap(AS_PROGRAM, &segaxbd_state::sub_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, SOUND_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
+ Z80(config, m_soundcpu, SOUND_CLOCK/4);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segaxbd_state::sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &segaxbd_state::sound_portmap);
NVRAM(config, "backup1", nvram_device::DEFAULT_ALL_0);
NVRAM(config, "backup2", nvram_device::DEFAULT_ALL_0);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
MB3773(config, "watchdog");
@@ -1715,19 +1715,19 @@ MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig )
m_iochip[1]->in_portd_cb().set_ioport("IO1PORTD");
// video hardware
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_segaxbd)
- MCFG_PALETTE_ADD("palette", 8192*3)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_segaxbd);
+ PALETTE(config, m_palette, 8192*3);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/8, 400, 0, 320, 262, 0, 224)
- MCFG_SCREEN_UPDATE_DRIVER(segaxbd_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/8, 400, 0, 320, 262, 0, 224);
+ m_screen->set_screen_update(FUNC(segaxbd_state::screen_update));
+ m_screen->set_palette(m_palette);
SEGA_XBOARD_SPRITES(config, m_sprites, 0);
SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode");
m_segaic16vid->set_screen(m_screen);
- MCFG_DEVICE_ADD("segaic16road", SEGAIC16_ROAD, 0)
+ SEGAIC16_ROAD(config, m_segaic16road, 0);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
@@ -1738,11 +1738,11 @@ MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig )
ymsnd.add_route(0, "lspeaker", 0.43);
ymsnd.add_route(1, "rspeaker", 0.43);
- MCFG_DEVICE_ADD("pcm", SEGAPCM, SOUND_CLOCK/4)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ segapcm_device &pcm(SEGAPCM(config, "pcm", SOUND_CLOCK/4));
+ pcm.set_bank(segapcm_device::BANK_512);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_REGULAR, segaxbd_regular_state, "segaxbd_pcb_reg", "Sega X-Board PCB (regular)")
@@ -1752,14 +1752,15 @@ segaxbd_regular_state::segaxbd_regular_state(const machine_config &mconfig, cons
{
}
-MACHINE_CONFIG_START(segaxbd_regular_state::device_add_mconfig)
-
+void segaxbd_regular_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_xboard)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_REGULAR, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_xboard(machine_config &config)
+{
+ SEGA_XBD_REGULAR(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_FD1094, segaxbd_fd1094_state, "segaxbd_pcb_fd1094", "Sega X-Board PCB (FD1094)")
@@ -1769,26 +1770,27 @@ segaxbd_fd1094_state::segaxbd_fd1094_state(const machine_config &mconfig, const
{
}
-MACHINE_CONFIG_START(segaxbd_fd1094_state::device_add_mconfig)
-
+void segaxbd_fd1094_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1094, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
-
+ FD1094(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaxbd_fd1094_state::main_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &segaxbd_fd1094_state::decrypted_opcodes_map);
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_xboard_fd1094)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_FD1094, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_xboard_fd1094(machine_config &config)
+{
+ SEGA_XBD_FD1094(config, "mainpcb", 0);
+}
-MACHINE_CONFIG_START(segaxbd_new_state_double::sega_xboard_fd1094_double)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_FD1094, 0)
- MCFG_DEVICE_ADD("subpcb", SEGA_XBD_FD1094, 0)
+void segaxbd_new_state_double::sega_xboard_fd1094_double(machine_config &config)
+{
+ SEGA_XBD_FD1094(config, "mainpcb", 0);
+ SEGA_XBD_FD1094(config, "subpcb", 0);
//MCFG_QUANTUM_PERFECT_CPU("mainpcb:maincpu") // doesn't help..
-MACHINE_CONFIG_END
+}
//**************************************************************************
@@ -1810,9 +1812,10 @@ void segaxbd_aburner2_state::device_add_mconfig(machine_config &config)
m_iochip[0]->out_portb_cb().set(FUNC(segaxbd_state::aburner2_motor_w));
}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_aburner2)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_ABURNER2_DEVICE, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_aburner2(machine_config &config)
+{
+ SEGA_XBD_ABURNER2_DEVICE(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_LASTSURV_FD1094, segaxbd_lastsurv_fd1094_state, "segaxbd_pcb_lastsurv_fd1094", "Sega X-Board PCB (Last Survivor, FD1094)")
@@ -1822,13 +1825,13 @@ segaxbd_lastsurv_fd1094_state::segaxbd_lastsurv_fd1094_state(const machine_confi
{
}
-MACHINE_CONFIG_START(segaxbd_lastsurv_fd1094_state::device_add_mconfig)
-
+void segaxbd_lastsurv_fd1094_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1094, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ FD1094(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaxbd_lastsurv_fd1094_state::main_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &segaxbd_lastsurv_fd1094_state::decrypted_opcodes_map);
// basic machine hardware
// TODO: network board
@@ -1837,15 +1840,15 @@ MACHINE_CONFIG_START(segaxbd_lastsurv_fd1094_state::device_add_mconfig)
m_iochip[1]->in_portb_cb().set(FUNC(segaxbd_state::lastsurv_port_r));
// sound hardware - ym2151 stereo is reversed
- MCFG_DEVICE_MODIFY("ymsnd")
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.43)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.43)
-MACHINE_CONFIG_END
+ subdevice<ym2151_device>("ymsnd")->reset_routes();
+ subdevice<ym2151_device>("ymsnd")->add_route(0, "rspeaker", 0.43);
+ subdevice<ym2151_device>("ymsnd")->add_route(1, "lspeaker", 0.43);
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_lastsurv_fd1094)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_LASTSURV_FD1094, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_lastsurv_fd1094(machine_config &config)
+{
+ SEGA_XBD_LASTSURV_FD1094(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_LASTSURV, segaxbd_lastsurv_state, "segaxbd_pcb_lastsurv", "Sega X-Board PCB (Last Survivor)")
@@ -1855,8 +1858,8 @@ segaxbd_lastsurv_state::segaxbd_lastsurv_state(const machine_config &mconfig, co
{
}
-MACHINE_CONFIG_START(segaxbd_lastsurv_state::device_add_mconfig)
-
+void segaxbd_lastsurv_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
// basic machine hardware
@@ -1866,15 +1869,15 @@ MACHINE_CONFIG_START(segaxbd_lastsurv_state::device_add_mconfig)
m_iochip[1]->in_portb_cb().set(FUNC(segaxbd_state::lastsurv_port_r));
// sound hardware - ym2151 stereo is reversed
- MCFG_DEVICE_MODIFY("ymsnd")
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.43)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.43)
-MACHINE_CONFIG_END
+ subdevice<ym2151_device>("ymsnd")->reset_routes();
+ subdevice<ym2151_device>("ymsnd")->add_route(0, "rspeaker", 0.43);
+ subdevice<ym2151_device>("ymsnd")->add_route(1, "lspeaker", 0.43);
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_lastsurv)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_LASTSURV, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_lastsurv(machine_config &config)
+{
+ SEGA_XBD_LASTSURV(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_SMGP_FD1094, segaxbd_smgp_fd1094_state, "segaxbd_pcb_smgp_fd1094", "Sega X-Board PCB (SMGP, FD1094)")
@@ -1884,25 +1887,26 @@ segaxbd_smgp_fd1094_state::segaxbd_smgp_fd1094_state(const machine_config &mconf
{
}
-MACHINE_CONFIG_START(segaxbd_smgp_fd1094_state::device_add_mconfig)
+void segaxbd_smgp_fd1094_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
- MCFG_DEVICE_REPLACE("maincpu", FD1094, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ FD1094(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaxbd_smgp_fd1094_state::main_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &segaxbd_smgp_fd1094_state::decrypted_opcodes_map);
// basic machine hardware
- MCFG_DEVICE_ADD("soundcpu2", Z80, SOUND_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(smgp_sound2_map)
- MCFG_DEVICE_IO_MAP(smgp_sound2_portmap)
+ Z80(config, m_soundcpu2, SOUND_CLOCK/4);
+ m_soundcpu2->set_addrmap(AS_PROGRAM, &segaxbd_smgp_fd1094_state::smgp_sound2_map);
+ m_soundcpu2->set_addrmap(AS_IO, &segaxbd_smgp_fd1094_state::smgp_sound2_portmap);
- MCFG_DEVICE_ADD("commcpu", Z80, XTAL(16'000'000)/2) // Z80E
- MCFG_DEVICE_PROGRAM_MAP(smgp_comm_map)
- MCFG_DEVICE_IO_MAP(smgp_comm_portmap)
+ z80_device &commcpu(Z80(config, "commcpu", XTAL(16'000'000)/2)); // Z80E
+ commcpu.set_addrmap(AS_PROGRAM, &segaxbd_smgp_fd1094_state::smgp_comm_map);
+ commcpu.set_addrmap(AS_IO, &segaxbd_smgp_fd1094_state::smgp_comm_portmap);
- MCFG_DEVICE_ADD("motorcpu", Z80, XTAL(16'000'000)/2) // not verified
- MCFG_DEVICE_PROGRAM_MAP(smgp_airdrive_map)
- MCFG_DEVICE_IO_MAP(smgp_airdrive_portmap)
+ z80_device &motorcpu(Z80(config, "motorcpu", XTAL(16'000'000)/2)); // not verified
+ motorcpu.set_addrmap(AS_PROGRAM, &segaxbd_smgp_fd1094_state::smgp_airdrive_map);
+ motorcpu.set_addrmap(AS_IO, &segaxbd_smgp_fd1094_state::smgp_airdrive_portmap);
m_cmptimer_1->zint_callback().append_inputline(m_soundcpu2, INPUT_LINE_NMI);
@@ -1913,15 +1917,16 @@ MACHINE_CONFIG_START(segaxbd_smgp_fd1094_state::device_add_mconfig)
SPEAKER(config, "rearleft").front_left();
SPEAKER(config, "rearright").front_right();
- MCFG_DEVICE_ADD("pcm2", SEGAPCM, SOUND_CLOCK/4)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "rearleft", 1.0)
- MCFG_SOUND_ROUTE(1, "rearright", 1.0)
-MACHINE_CONFIG_END
+ segapcm_device &pcm2(SEGAPCM(config, "pcm2", SOUND_CLOCK/4));
+ pcm2.set_bank(segapcm_device::BANK_512);
+ pcm2.add_route(0, "rearleft", 1.0);
+ pcm2.add_route(1, "rearright", 1.0);
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_smgp_fd1094)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_SMGP_FD1094, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_smgp_fd1094(machine_config &config)
+{
+ SEGA_XBD_SMGP_FD1094(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_SMGP, segaxbd_smgp_state, "segaxbd_pcb_smgp", "Sega X-Board PCB (SMGP)")
@@ -1931,21 +1936,22 @@ segaxbd_smgp_state::segaxbd_smgp_state(const machine_config &mconfig, const char
{
}
-MACHINE_CONFIG_START(segaxbd_smgp_state::device_add_mconfig)
+void segaxbd_smgp_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
// basic machine hardware
- MCFG_DEVICE_ADD("soundcpu2", Z80, SOUND_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(smgp_sound2_map)
- MCFG_DEVICE_IO_MAP(smgp_sound2_portmap)
+ Z80(config, m_soundcpu2, SOUND_CLOCK/4);
+ m_soundcpu2->set_addrmap(AS_PROGRAM, &segaxbd_smgp_state::smgp_sound2_map);
+ m_soundcpu2->set_addrmap(AS_IO, &segaxbd_smgp_state::smgp_sound2_portmap);
- MCFG_DEVICE_ADD("commcpu", Z80, XTAL(16'000'000)/2) // Z80E
- MCFG_DEVICE_PROGRAM_MAP(smgp_comm_map)
- MCFG_DEVICE_IO_MAP(smgp_comm_portmap)
+ z80_device &commcpu(Z80(config, "commcpu", XTAL(16'000'000)/2)); // Z80E
+ commcpu.set_addrmap(AS_PROGRAM, &segaxbd_smgp_state::smgp_comm_map);
+ commcpu.set_addrmap(AS_IO, &segaxbd_smgp_state::smgp_comm_portmap);
- MCFG_DEVICE_ADD("motorcpu", Z80, XTAL(16'000'000)/2) // not verified
- MCFG_DEVICE_PROGRAM_MAP(smgp_airdrive_map)
- MCFG_DEVICE_IO_MAP(smgp_airdrive_portmap)
+ z80_device &motorcpu(Z80(config, "motorcpu", XTAL(16'000'000)/2)); // not verified
+ motorcpu.set_addrmap(AS_PROGRAM, &segaxbd_smgp_state::smgp_airdrive_map);
+ motorcpu.set_addrmap(AS_IO, &segaxbd_smgp_state::smgp_airdrive_portmap);
m_cmptimer_1->zint_callback().append_inputline(m_soundcpu2, INPUT_LINE_NMI);
@@ -1956,15 +1962,16 @@ MACHINE_CONFIG_START(segaxbd_smgp_state::device_add_mconfig)
SPEAKER(config, "rearleft").front_left();
SPEAKER(config, "rearright").front_right();
- MCFG_DEVICE_ADD("pcm2", SEGAPCM, SOUND_CLOCK/4)
- MCFG_SEGAPCM_BANK(BANK_512)
- MCFG_SOUND_ROUTE(0, "rearleft", 1.0)
- MCFG_SOUND_ROUTE(1, "rearright", 1.0)
-MACHINE_CONFIG_END
+ segapcm_device &pcm2(SEGAPCM(config, "pcm2", SOUND_CLOCK/4));
+ pcm2.set_bank(segapcm_device::BANK_512);
+ pcm2.add_route(0, "rearleft", 1.0);
+ pcm2.add_route(1, "rearright", 1.0);
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_smgp)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_SMGP, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_smgp(machine_config &config)
+{
+ SEGA_XBD_SMGP(config, "mainpcb", 0);
+}
DEFINE_DEVICE_TYPE(SEGA_XBD_RASCOT, segaxbd_rascot_state, "segaxbd_pcb_rascot", "Sega X-Board PCB (Royal Ascot)")
@@ -1976,17 +1983,18 @@ segaxbd_rascot_state::segaxbd_rascot_state(const machine_config &mconfig, const
{
}
-MACHINE_CONFIG_START(segaxbd_rascot_state::device_add_mconfig)
+void segaxbd_rascot_state::device_add_mconfig(machine_config &config)
+{
segaxbd_state::xboard_base_mconfig(config);
m_subcpu->set_addrmap(AS_PROGRAM, &segaxbd_rascot_state::sub_map);
// basic machine hardware
- MCFG_DEVICE_REMOVE("soundcpu")
- MCFG_DEVICE_REMOVE("ymsnd")
- MCFG_DEVICE_REMOVE("pcm")
- MCFG_DEVICE_REMOVE("lspeaker")
- MCFG_DEVICE_REMOVE("rspeaker")
+ config.device_remove("soundcpu");
+ config.device_remove("ymsnd");
+ config.device_remove("pcm");
+ config.device_remove("lspeaker");
+ config.device_remove("rspeaker");
m_cmptimer_1->zint_callback().set_nop();
cpu_device &commcpu(Z80(config, "commcpu", 8'000'000)); // clock unknown
@@ -1995,11 +2003,12 @@ MACHINE_CONFIG_START(segaxbd_rascot_state::device_add_mconfig)
MB8421(config, m_commram).intl_callback().set_inputline("commcpu", INPUT_LINE_IRQ0);
I8251(config, m_usart, 2'000'000); // clock unknown
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segaxbd_new_state::sega_rascot)
- MCFG_DEVICE_ADD("mainpcb", SEGA_XBD_RASCOT, 0)
-MACHINE_CONFIG_END
+void segaxbd_new_state::sega_rascot(machine_config &config)
+{
+ SEGA_XBD_RASCOT(config, "mainpcb", 0);
+}
//**************************************************************************
diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp
index f888407684c..fcd9eadfca3 100644
--- a/src/mame/drivers/segaybd.cpp
+++ b/src/mame/drivers/segaybd.cpp
@@ -1271,24 +1271,24 @@ INPUT_PORTS_END
// GENERIC MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(segaybd_state::yboard)
-
+void segaybd_state::yboard(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaybd_state::main_map);
- MCFG_DEVICE_ADD("subx", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(subx_map)
+ M68000(config, m_subx, MASTER_CLOCK/4);
+ m_subx->set_addrmap(AS_PROGRAM, &segaybd_state::subx_map);
- MCFG_DEVICE_ADD("suby", M68000, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(suby_map)
+ M68000(config, m_suby, MASTER_CLOCK/4);
+ m_suby->set_addrmap(AS_PROGRAM, &segaybd_state::suby_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, SOUND_CLOCK/8)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
+ Z80(config, m_soundcpu, SOUND_CLOCK/8);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segaybd_state::sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &segaybd_state::sound_portmap);
NVRAM(config, "backupram", nvram_device::DEFAULT_ALL_0);
- MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+ config.m_minimum_quantum = attotime::from_hz(6000);
MB3773(config, "watchdog"); // IC95
@@ -1303,11 +1303,11 @@ MACHINE_CONFIG_START(segaybd_state::yboard)
io.out_ph_callback().set(FUNC(segaybd_state::output2_w));
// FMCS and CKOT connect to CS and OSC IN on MSM6253 below
- MCFG_DEVICE_ADD("adc", MSM6253, 0)
- MCFG_MSM6253_IN0_ANALOG_PORT("ADC.0")
- MCFG_MSM6253_IN1_ANALOG_PORT("ADC.1")
- MCFG_MSM6253_IN2_ANALOG_PORT("ADC.2")
- MCFG_MSM6253_IN3_ANALOG_READ(segaybd_state, analog_mux)
+ msm6253_device &adc(MSM6253(config, "adc", 0));
+ adc.set_input_tag<0>("ADC.0");
+ adc.set_input_tag<1>("ADC.1");
+ adc.set_input_tag<2>("ADC.2");
+ adc.set_input_cb<3>(FUNC(segaybd_state::analog_mux));
SEGA_315_5248_MULTIPLIER(config, "multiplier_main", 0);
SEGA_315_5248_MULTIPLIER(config, "multiplier_subx", 0);
@@ -1317,20 +1317,20 @@ MACHINE_CONFIG_START(segaybd_state::yboard)
SEGA_315_5249_DIVIDER(config, "divider_suby", 0);
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(342,262) // to be verified
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(segaybd_state,screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(342,262); // to be verified
+ m_screen->set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(segaybd_state::screen_update));
+ m_screen->set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfxdecode_device::empty)
+ GFXDECODE(config, "gfxdecode", m_palette, gfxdecode_device::empty);
SEGA_SYS16B_SPRITES(config, m_bsprites, 0);
SEGA_YBOARD_SPRITES(config, m_ysprites, 0);
SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode");
- MCFG_PALETTE_ADD("palette", 8192*3)
+ PALETTE(config, m_palette, 8192*3);
// sound hardware
SPEAKER(config, "lspeaker").front_left();
@@ -1343,39 +1343,39 @@ MACHINE_CONFIG_START(segaybd_state::yboard)
ymsnd.add_route(0, "lspeaker", 0.43);
ymsnd.add_route(1, "rspeaker", 0.43);
- MCFG_DEVICE_ADD("pcm", SEGAPCM, SOUND_CLOCK/8)
- MCFG_SEGAPCM_BANK_MASK(BANK_12M, BANK_MASKF8)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ segapcm_device &pcm(SEGAPCM(config, "pcm", SOUND_CLOCK/8));
+ pcm.set_bank(segapcm_device::BANK_12M | segapcm_device::BANK_MASKF8);
+ pcm.add_route(0, "lspeaker", 1.0);
+ pcm.add_route(1, "rspeaker", 1.0);
+}
// irq at 0x28 is from MB8421, and irq at 0x38 probably from MB89372?
-MACHINE_CONFIG_START(segaybd_state::yboard_link)
+void segaybd_state::yboard_link(machine_config &config)
+{
yboard(config);
// basic machine hardware
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(main_map_link)
+ m_maincpu->set_addrmap(AS_PROGRAM, &segaybd_state::main_map_link);
- MCFG_DEVICE_ADD("linkcpu", Z80, XTAL(16'000'000)/2 ) // 8 Mhz
- MCFG_DEVICE_PROGRAM_MAP(link_map)
- MCFG_DEVICE_IO_MAP(link_portmap)
+ Z80(config, m_linkcpu, XTAL(16'000'000)/2); // 8 Mhz
+ m_linkcpu->set_addrmap(AS_PROGRAM, &segaybd_state::link_map);
+ m_linkcpu->set_addrmap(AS_IO, &segaybd_state::link_portmap);
mb8421_device &mb8421(MB8421(config, "mb8421"));
mb8421.intl_callback().set(FUNC(segaybd_state::mb8421_intl));
mb8421.intr_callback().set(FUNC(segaybd_state::mb8421_intr));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segaybd_state::yboard_deluxe)
+void segaybd_state::yboard_deluxe(machine_config &config)
+{
yboard(config);
// basic machine hardware
- MCFG_DEVICE_ADD("motorcpu", Z80, XTAL(16'000'000)/2 ) // 8 Mhz(guessed)
- MCFG_DEVICE_PROGRAM_MAP(motor_map)
-// MCFG_DEVICE_IO_MAP(motor_portmap)
-
-MACHINE_CONFIG_END
+ z80_device &motorcpu(Z80(config, "motorcpu", XTAL(16'000'000)/2)); // 8 Mhz(guessed)
+ motorcpu.set_addrmap(AS_PROGRAM, &segaybd_state::motor_map);
+// motorcpu.set_addrmap(AS_IO, &segaybd_state::motor_portmap);
+}
//**************************************************************************
// ROM DEFINITIONS
diff --git a/src/mame/drivers/tmmjprd.cpp b/src/mame/drivers/tmmjprd.cpp
index d46e4fbe90f..3e07201db57 100644
--- a/src/mame/drivers/tmmjprd.cpp
+++ b/src/mame/drivers/tmmjprd.cpp
@@ -739,60 +739,52 @@ TIMER_DEVICE_CALLBACK_MEMBER(tmmjprd_state::scanline)
}
-MACHINE_CONFIG_START(tmmjprd_state::tmpdoki)
- MCFG_DEVICE_ADD(m_maincpu,M68EC020,24000000) /* 24 MHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", tmmjprd_state, scanline, "lscreen", 0, 1)
+void tmmjprd_state::tmpdoki(machine_config &config)
+{
+ M68EC020(config, m_maincpu, 24000000); /* 24 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tmmjprd_state::main_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(tmmjprd_state::scanline), "lscreen", 0, 1);
EEPROM_93C46_16BIT(config, m_eeprom, eeprom_serial_streaming::ENABLE);
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_tmmjprd)
-
-// MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
-// MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update)
-// MCFG_SCREEN_SIZE(64*16, 64*16)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- MCFG_PALETTE_ADD(m_palette, 0x1000)
- MCFG_PALETTE_FORMAT(XGRB)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_tmmjprd);
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*16, 64*16)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- //MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*8, 64*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_left)
- MCFG_SCREEN_PALETTE(m_palette)
+ PALETTE(config, m_palette, 0x1000);
+ m_palette->set_format(PALETTE_FORMAT_XGRB);
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_refresh_hz(60);
+ lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ lscreen.set_size(64*16, 64*16);
+ lscreen.set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+ //lscreen.set_visarea(0*8, 64*16-1, 0*8, 64*16-1);
+ lscreen.set_screen_update(FUNC(tmmjprd_state::screen_update_left));
+ lscreen.set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_I5000_SND_ADD("i5000snd", XTAL(40'000'000))
- MCFG_SOUND_ROUTE(0, "rspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "lspeaker", 1.00)
-MACHINE_CONFIG_END
+ i5000snd_device &i5000snd(I5000_SND(config, "i5000snd", XTAL(40'000'000)));
+ i5000snd.add_route(0, "rspeaker", 1.0);
+ i5000snd.add_route(1, "lspeaker", 1.0);
+}
-MACHINE_CONFIG_START(tmmjprd_state::tmmjprd)
+void tmmjprd_state::tmmjprd(machine_config &config)
+{
tmpdoki(config);
config.set_default_layout(layout_dualhsxs);
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*16, 64*16)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- //MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*8, 64*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_right)
- MCFG_SCREEN_PALETTE(m_palette)
-MACHINE_CONFIG_END
-
-
-
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_refresh_hz(60);
+ rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ rscreen.set_size(64*16, 64*16);
+ rscreen.set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+ //rscreen.set_visarea(0*8, 64*16-1, 0*8, 64*16-1);
+ rscreen.set_screen_update(FUNC(tmmjprd_state::screen_update_right));
+ rscreen.set_palette(m_palette);
+}
ROM_START( tmmjprd )
ROM_REGION( 0x200000, "maincpu", 0 )
diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h
index b1a7fbd82c1..574e3e3c0d1 100644
--- a/src/mame/includes/40love.h
+++ b/src/mame/includes/40love.h
@@ -43,8 +43,10 @@ public:
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_pixram( bitmap_ind16 &bitmap, const rectangle &cliprect );
- void undoukai(machine_config &config);
+ void common(machine_config &config);
void _40love(machine_config &config);
+ void undoukai(machine_config &config);
+
void _40love_map(address_map &map);
void sound_map(address_map &map);
void undoukai_map(address_map &map);
diff --git a/src/mame/includes/flstory.h b/src/mame/includes/flstory.h
index 7aed1a12e7b..daca51946ef 100644
--- a/src/mame/includes/flstory.h
+++ b/src/mame/includes/flstory.h
@@ -35,6 +35,7 @@ public:
m_soundnmi(*this, "soundnmi")
{ }
+ void common(machine_config &config);
void flstory(machine_config &config);
void rumba(machine_config &config);
void onna34ro(machine_config &config);
diff --git a/src/mame/machine/k573dio.cpp b/src/mame/machine/k573dio.cpp
index a83edb91e3e..5c274a14602 100644
--- a/src/mame/machine/k573dio.cpp
+++ b/src/mame/machine/k573dio.cpp
@@ -132,10 +132,11 @@ const tiny_rom_entry *k573dio_device::device_rom_region() const
return ROM_NAME(k573dio);
}
-MACHINE_CONFIG_START(k573dio_device::device_add_mconfig)
- MCFG_MAS3507D_ADD( "mpeg" );
+void k573dio_device::device_add_mconfig(machine_config &config)
+{
+ MAS3507D(config, "mpeg");
DS2401( config, "digital_id" );
-MACHINE_CONFIG_END
+}
void k573dio_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{