summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-15 23:19:52 +0100
committerGravatarGravatar mooglyguy <therealmogminer@gmail.com>2018-12-15 23:20:18 +0100
commit8b8aa117c1d2aee574aadc2f073928c6d1294e31 (patch)
tree836733365e1c75212010703995ef54a2a49aaff5
parentad30218bb2f3d71a888024363c9c82e0d2c427ab (diff)
downloadmame-8b8aa117c1d2aee574aadc2f073928c6d1294e31.tar.xz
mame-8b8aa117c1d2aee574aadc2f073928c6d1294e31.zip
Fixed regressions in konamim2 and mexico86, nw
-bus/cbus/pc9801_cbus, compis/graphics, isa/dectalk: Removed MCFG and MACHINE_CONFIG macros. [Ryan Holtz] -cpu/i8085, i186, i286: Removed MCFG macros. [Ryan Holtz] -video/crt9212, i82730: Removed MCFG macros. [Ryan Holtz] -audio/leland, redalert: Removed MACHINE_CONFIG macros. [Ryan Holtz] -drivers/bob85, compis, dwarfd, exp85, fastinvaders, fp200, h8, kyocera, lola8a, mikromik, mmd1, ms6102, n8080, ngen, olyboss, pc9801, pcd, phoenix, ptcsol, rc759, sitcom, supstarf, tandy2k, vector06, vt240: Removed MACHINE_CONFIG macros. [Ryan Holtz] There will almost certainly be some breakage with this; testing and bug reports welcome (nw)
-rw-r--r--src/devices/bus/cbus/pc9801_cbus.h18
-rw-r--r--src/devices/bus/compis/graphics.h28
-rw-r--r--src/devices/bus/isa/dectalk.cpp21
-rw-r--r--src/devices/cpu/i8085/i8085.h47
-rw-r--r--src/devices/cpu/i86/i186.h16
-rw-r--r--src/devices/cpu/i86/i286.h16
-rw-r--r--src/devices/machine/mm58167.h1
-rw-r--r--src/devices/machine/pckeybrd.h1
-rw-r--r--src/devices/video/crt9212.h28
-rw-r--r--src/devices/video/dl1416.h1
-rw-r--r--src/devices/video/i82730.cpp33
-rw-r--r--src/devices/video/i82730.h38
-rw-r--r--src/devices/video/i8275.h13
-rw-r--r--src/devices/video/upd3301.h11
-rw-r--r--src/mame/audio/leland.cpp247
-rw-r--r--src/mame/audio/leland.h2
-rw-r--r--src/mame/audio/redalert.cpp17
-rw-r--r--src/mame/drivers/at.cpp87
-rw-r--r--src/mame/drivers/bob85.cpp20
-rw-r--r--src/mame/drivers/compis.cpp56
-rw-r--r--src/mame/drivers/dwarfd.cpp86
-rw-r--r--src/mame/drivers/equites.cpp20
-rw-r--r--src/mame/drivers/exp85.cpp23
-rw-r--r--src/mame/drivers/fastinvaders.cpp277
-rw-r--r--src/mame/drivers/fp200.cpp39
-rw-r--r--src/mame/drivers/h8.cpp33
-rw-r--r--src/mame/drivers/konamim2.cpp2
-rw-r--r--src/mame/drivers/kyocera.cpp139
-rw-r--r--src/mame/drivers/lola8a.cpp35
-rw-r--r--src/mame/drivers/mexico86.cpp2
-rw-r--r--src/mame/drivers/mikromik.cpp24
-rw-r--r--src/mame/drivers/mmd1.cpp29
-rw-r--r--src/mame/drivers/ms6102.cpp46
-rw-r--r--src/mame/drivers/n8080.cpp135
-rw-r--r--src/mame/drivers/ngen.cpp73
-rw-r--r--src/mame/drivers/olyboss.cpp105
-rw-r--r--src/mame/drivers/pc9801.cpp281
-rw-r--r--src/mame/drivers/pcd.cpp54
-rw-r--r--src/mame/drivers/phoenix.cpp105
-rw-r--r--src/mame/drivers/ps2.cpp68
-rw-r--r--src/mame/drivers/ptcsol.cpp47
-rw-r--r--src/mame/drivers/rc759.cpp46
-rw-r--r--src/mame/drivers/sitcom.cpp39
-rw-r--r--src/mame/drivers/supstarf.cpp17
-rw-r--r--src/mame/drivers/tandy2k.cpp85
-rw-r--r--src/mame/drivers/vector06.cpp55
-rw-r--r--src/mame/drivers/vt240.cpp50
-rw-r--r--src/mame/includes/equites.h12
-rw-r--r--src/mame/includes/exp85.h3
-rw-r--r--src/mame/includes/kyocera.h5
-rw-r--r--src/mame/includes/mikromik.h2
-rw-r--r--src/mame/includes/n8080.h3
-rw-r--r--src/mame/includes/phoenix.h2
-rw-r--r--src/mame/includes/redalert.h2
-rw-r--r--src/mame/includes/vector06.h6
-rw-r--r--src/mame/machine/at.cpp2
56 files changed, 1318 insertions, 1335 deletions
diff --git a/src/devices/bus/cbus/pc9801_cbus.h b/src/devices/bus/cbus/pc9801_cbus.h
index 4fb77ebe7fb..400cfa67d27 100644
--- a/src/devices/bus/cbus/pc9801_cbus.h
+++ b/src/devices/bus/cbus/pc9801_cbus.h
@@ -22,11 +22,6 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
-
-#define MCFG_PC9801CBUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, PC9801CBUS_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
#define MCFG_PC9801CBUS_CPU(_cputag) \
downcast<pc9801_slot_device &>(*device).set_cpu_tag(_cputag);
@@ -79,11 +74,20 @@ class pc9801_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
+ template <typename T, typename U>
+ pc9801_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&cpu_tag, U &&opts, char const *dflt)
+ : pc9801_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ m_cpu.set_tag(std::forward<T>(cpu_tag));
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration access
- template<class T> void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); }
- template<int I, class Object> devcb_base &set_int_callback(Object &&cb) { return m_int_callback[I].set_callback(std::forward<Object>(cb)); }
+ template<std::size_t Line> auto int_cb() { return m_int_callback[Line].bind(); }
address_space &program_space() const { return m_cpu->space(AS_PROGRAM); }
address_space &io_space() const { return m_cpu->space(AS_IO); }
diff --git a/src/devices/bus/compis/graphics.h b/src/devices/bus/compis/graphics.h
index 063a7d886b0..c5b414d1fab 100644
--- a/src/devices/bus/compis/graphics.h
+++ b/src/devices/bus/compis/graphics.h
@@ -13,23 +13,6 @@
#pragma once
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_COMPIS_GRAPHICS_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
- MCFG_DEVICE_ADD(_tag, COMPIS_GRAPHICS_SLOT, _clock) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-
-#define MCFG_COMPIS_GRAPHICS_SLOT_DMA_REQUEST_CALLBACK(_dma_request) \
- downcast<compis_graphics_slot_device *>(device)->set_dma_request_callback(DEVCB_##_dma_request);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -67,9 +50,18 @@ class compis_graphics_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ compis_graphics_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
+ : compis_graphics_slot_device(mconfig, tag, owner, clock)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
compis_graphics_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template<class _dma_request> void set_dma_request_callback(_dma_request dma_request) { m_write_dma_request.set_callback(dma_request); }
+ auto drq() { return m_write_dma_request.bind(); }
// computer interface
DECLARE_READ8_MEMBER( mcs0_r ) { return m_card ? m_card->mcs0_r(space, offset) : 0xff; }
diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp
index 86cde3cffda..d8ad57d57d3 100644
--- a/src/devices/bus/isa/dectalk.cpp
+++ b/src/devices/bus/isa/dectalk.cpp
@@ -157,11 +157,12 @@ const tiny_rom_entry* dectalk_isa_device::device_rom_region() const
return ROM_NAME( dectalk_isa );
}
-MACHINE_CONFIG_START(dectalk_isa_device::device_add_mconfig)
- MCFG_DEVICE_ADD("dectalk_cpu", I80186, XTAL(20'000'000))
- MCFG_DEVICE_IO_MAP(dectalk_cpu_io)
- MCFG_DEVICE_PROGRAM_MAP(dectalk_cpu_map)
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, dectalk_isa_device, clock_w));
+void dectalk_isa_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_cpu, XTAL(20'000'000));
+ m_cpu->set_addrmap(AS_PROGRAM, &dectalk_isa_device::dectalk_cpu_map);
+ m_cpu->set_addrmap(AS_IO, &dectalk_isa_device::dectalk_cpu_io);
+ m_cpu->tmrout0_handler().set(FUNC(dectalk_isa_device::clock_w));
TMS32015(config, m_dsp, XTAL(20'000'000));
m_dsp->set_addrmap(AS_PROGRAM, &dectalk_isa_device::dectalk_dsp_map);
@@ -169,10 +170,12 @@ MACHINE_CONFIG_START(dectalk_isa_device::device_add_mconfig)
m_dsp->bio().set(FUNC(dectalk_isa_device::bio_line_r));
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(0, "speaker", 1.0) // 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_12BIT_R2R(config, m_dac, 0).add_route(0, "speaker", 1.0); // 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);
+}
WRITE8_MEMBER(dectalk_isa_device::write)
{
diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h
index 899dd0b85b8..fd8628961d7 100644
--- a/src/devices/cpu/i8085/i8085.h
+++ b/src/devices/cpu/i8085/i8085.h
@@ -16,29 +16,6 @@
#define I8085_TRAP_LINE INPUT_LINE_NMI
-// STATUS changed callback
-#define MCFG_I8085A_STATUS(_devcb) \
- downcast<i8085a_cpu_device &>(*device).set_out_status_func(DEVCB_##_devcb);
-
-// INTE changed callback
-#define MCFG_I8085A_INTE(_devcb) \
- downcast<i8085a_cpu_device &>(*device).set_out_inte_func(DEVCB_##_devcb);
-
-// SID changed callback (8085A only)
-#define MCFG_I8085A_SID(_devcb) \
- downcast<i8085a_cpu_device &>(*device).set_in_sid_func(DEVCB_##_devcb);
-
-// SOD changed callback (8085A only)
-#define MCFG_I8085A_SOD(_devcb) \
- downcast<i8085a_cpu_device &>(*device).set_out_sod_func(DEVCB_##_devcb);
-
-// CLK rate callback (8085A only)
-#define MCFG_I8085A_CLK_OUT_DEVICE(_tag) \
- downcast<i8085a_cpu_device &>(*device).set_clk_out(clock_update_delegate(FUNC(device_t::set_unscaled_clock), _tag, (device_t *)nullptr));
-#define MCFG_I8085A_CLK_OUT_CUSTOM(_class, _func) \
- downcast<i8085a_cpu_device &>(*device).set_clk_out(clock_update_delegate(&_class::_func, #_class "::" _func, owner));
-
-
class i8085a_cpu_device : public cpu_device
{
public:
@@ -65,15 +42,27 @@ public:
// construction/destruction
i8085a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- // configuration helpers
- template <class Object> devcb_base &set_out_status_func(Object &&cb) { return m_out_status_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_inte_func(Object &&cb) { return m_out_inte_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_sid_func(Object &&cb) { return m_in_sid_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_sod_func(Object &&cb) { return m_out_sod_func.set_callback(std::forward<Object>(cb)); }
- template <typename Object> void set_clk_out(Object &&cb) { m_clk_out_func = std::forward<Object>(cb); }
+ // CLK rate callback (8085A only)
+ void set_clk_out(clock_update_delegate callback) { m_clk_out_func = callback; }
+ template <class FunctionClass> void set_clk_out(const char *devname, void (FunctionClass::*callback)(uint32_t), const char *name)
+ {
+ set_clk_out(clock_update_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_clk_out(void (FunctionClass::*callback)(uint32_t), const char *name)
+ {
+ set_clk_out(clock_update_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
+
+ // STATUS changed callback
auto out_status_func() { return m_out_status_func.bind(); }
+
+ // INTE changed callback
auto out_inte_func() { return m_out_inte_func.bind(); }
+
+ // SID changed callback (8085A only)
auto in_sid_func() { return m_in_sid_func.bind(); }
+
+ // SOD changed callback (8085A only)
auto out_sod_func() { return m_out_sod_func.bind(); }
protected:
diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h
index 297a185ba66..01960a619f5 100644
--- a/src/devices/cpu/i86/i186.h
+++ b/src/devices/cpu/i86/i186.h
@@ -16,10 +16,6 @@ public:
// construction/destruction
i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_read_slave_ack_callback(Object &&cb) { return m_read_slave_ack_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_chip_select_callback(Object &&cb) { return m_out_chip_select_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_tmrout0_handler(Object &&cb) { return m_out_tmrout0_func.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_tmrout1_handler(Object &&cb) { return m_out_tmrout1_func.set_callback(std::forward<Object>(cb)); }
auto read_slave_ack_callback() { return m_read_slave_ack_func.bind(); }
auto chip_select_callback() { return m_out_chip_select_func.bind(); }
auto tmrout0_handler() { return m_out_tmrout0_func.bind(); }
@@ -160,16 +156,4 @@ public:
i80188_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
-#define MCFG_80186_IRQ_SLAVE_ACK(_devcb) \
- downcast<i80186_cpu_device &>(*device).set_read_slave_ack_callback(DEVCB_##_devcb);
-
-#define MCFG_80186_CHIP_SELECT_CB(_devcb) \
- downcast<i80186_cpu_device &>(*device).set_chip_select_callback(DEVCB_##_devcb);
-
-#define MCFG_80186_TMROUT0_HANDLER(_devcb) \
- downcast<i80186_cpu_device &>(*device).set_tmrout0_handler(DEVCB_##_devcb);
-
-#define MCFG_80186_TMROUT1_HANDLER(_devcb) \
- downcast<i80186_cpu_device &>(*device).set_tmrout1_handler(DEVCB_##_devcb);
-
#endif // MAME_CPU_I86_I186_H
diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h
index 97752a5d102..2812d756e19 100644
--- a/src/devices/cpu/i86/i286.h
+++ b/src/devices/cpu/i86/i286.h
@@ -71,9 +71,13 @@ public:
// device_memory_interface overrides
virtual space_config_vector memory_space_config() const override;
- typedef delegate<uint32_t (bool)> a20_cb;
- template <typename Object> void set_a20_callback(Object &&cb) { m_a20_callback = std::forward<Object>(cb); }
- template <class Object> devcb_base &set_shutdown_callback(Object &&cb) { return m_out_shutdown_func.set_callback(std::forward<Object>(cb)); }
+ typedef device_delegate<uint32_t (bool)> a20_cb;
+ void set_a20_callback(a20_cb callback) { m_a20_callback = callback; }
+ template <class FunctionClass> void set_a20_callback(uint32_t (FunctionClass::*callback)(bool), const char *name)
+ {
+ set_a20_callback(a20_cb(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
+
auto shutdown_callback() { return m_out_shutdown_func.bind(); }
protected:
@@ -162,10 +166,4 @@ private:
devcb_write_line m_out_shutdown_func;
};
-#define MCFG_80286_A20(_class, _a20_cb) \
- downcast<i80286_cpu_device &>(*device).set_a20_callback(i80286_cpu_device::a20_cb(&_class::_a20_cb, this));
-
-#define MCFG_80286_SHUTDOWN(_devcb) \
- downcast<i80286_cpu_device &>(*device).set_shutdown_callback(DEVCB_##_devcb);
-
#endif // MAME_CPU_I86_I286_H
diff --git a/src/devices/machine/mm58167.h b/src/devices/machine/mm58167.h
index 4c5e0326a1d..2c6bb5add34 100644
--- a/src/devices/machine/mm58167.h
+++ b/src/devices/machine/mm58167.h
@@ -39,6 +39,7 @@ public:
DECLARE_WRITE8_MEMBER(write);
template <class Object> devcb_base &set_irq_cb(Object &&wr) { return m_irq_w.set_callback(std::forward<Object>(wr)); }
+ auto irq() { return m_irq_w.bind(); }
devcb_write_line m_irq_w;
diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h
index 622af173bf8..7ee6c5c2c14 100644
--- a/src/devices/machine/pckeybrd.h
+++ b/src/devices/machine/pckeybrd.h
@@ -26,6 +26,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(enable);
template <class Object> devcb_base &set_keypress_callback(Object &&cb) { return m_out_keypress_func.set_callback(std::forward<Object>(cb)); }
+ auto keypress() { return m_out_keypress_func.bind(); }
enum class KEYBOARD_TYPE
{
diff --git a/src/devices/video/crt9212.h b/src/devices/video/crt9212.h
index b3547f698c1..0abbe714004 100644
--- a/src/devices/video/crt9212.h
+++ b/src/devices/video/crt9212.h
@@ -28,27 +28,6 @@
#pragma once
-
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_CRT9212_WEN2_VCC() \
- downcast<crt9212_device &>(*device).set_wen2(1);
-
-#define MCFG_CRT9212_DOUT_CALLBACK(_write) \
- downcast<crt9212_device &>(*device).set_dout_wr_callback(DEVCB_##_write);
-
-#define MCFG_CRT9212_ROF_CALLBACK(_write) \
- downcast<crt9212_device &>(*device).set_rof_wr_callback(DEVCB_##_write);
-
-#define MCFG_CRT9212_WOF_CALLBACK(_write) \
- downcast<crt9212_device &>(*device).set_wof_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -62,10 +41,9 @@ public:
crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_wen2(int state) { m_wen2 = state; }
-
- template <class Object> devcb_base &set_dout_wr_callback(Object &&cb) { return m_write_dout.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_rof_wr_callback(Object &&cb) { return m_write_rof.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_wof_wr_callback(Object &&cb) { return m_write_wof.set_callback(std::forward<Object>(cb)); }
+ auto dout() { return m_write_dout.bind(); }
+ auto rof() { return m_write_rof.bind(); }
+ auto wof() { return m_write_wof.bind(); }
DECLARE_WRITE8_MEMBER( write ) { m_data = data; }
DECLARE_WRITE_LINE_MEMBER( clrcnt_w );
diff --git a/src/devices/video/dl1416.h b/src/devices/video/dl1416.h
index 1927905ac4d..2f98355b95d 100644
--- a/src/devices/video/dl1416.h
+++ b/src/devices/video/dl1416.h
@@ -45,6 +45,7 @@ class dl1414_device : public device_t
{
public:
template <typename Object> devcb_base &set_update_handler(Object &&cb) { return m_update_cb.set_callback(std::forward<Object>(cb)); }
+ auto update() { return m_update_cb.bind(); }
// signal-level interface
DECLARE_WRITE_LINE_MEMBER(wr_w); // write strobe (rising edge)
diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp
index 48f95b29220..5db1bf4e6a9 100644
--- a/src/devices/video/i82730.cpp
+++ b/src/devices/video/i82730.cpp
@@ -58,15 +58,31 @@ i82730_device::i82730_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, I82730, tag, owner, clock),
device_video_interface(mconfig, *this),
m_sint_handler(*this),
- m_cpu_tag(nullptr), m_program(nullptr),
+ m_cpu(*this, finder_base::DUMMY_TAG),
+ m_program(nullptr),
m_row_timer(nullptr),
- m_initialized(false), m_mode_set(false),
+ m_initialized(false),
+ m_mode_set(false),
m_ca(0),
- m_sysbus(0x00), m_ibp(0x0000), m_cbp(0x0000), m_intmask(0xffff), m_status(0x0000),
- m_list_switch(0), m_auto_line_feed(0), m_max_dma_count(0),
- m_lptr(0), m_sptr(0),
- m_dma_burst_space(0), m_dma_burst_length(0),
- m_hfldstrt(0), m_margin(0), m_lpr(0), m_field_attribute_mask(0), m_vsyncstp(0), m_vfldstrt(0), m_vfldstp(0),
+ m_sysbus(0x00),
+ m_ibp(0x0000),
+ m_cbp(0x0000),
+ m_intmask(0xffff),
+ m_status(0x0000),
+ m_list_switch(0),
+ m_auto_line_feed(0),
+ m_max_dma_count(0),
+ m_lptr(0),
+ m_sptr(0),
+ m_dma_burst_space(0),
+ m_dma_burst_length(0),
+ m_hfldstrt(0),
+ m_margin(0),
+ m_lpr(0),
+ m_field_attribute_mask(0),
+ m_vsyncstp(0),
+ m_vfldstrt(0),
+ m_vfldstp(0),
m_frame_int_count(0),
m_row_index(0)
{
@@ -97,8 +113,7 @@ void i82730_device::device_start()
void i82730_device::device_reset()
{
- cpu_device *cpu = owner()->subdevice<cpu_device>(m_cpu_tag);
- m_program = &cpu->space(AS_PROGRAM);
+ m_program = &m_cpu->space(AS_PROGRAM);
m_initialized = false;
m_mode_set = false;
diff --git a/src/devices/video/i82730.h b/src/devices/video/i82730.h
index d52e6b1ddbf..e0b1c4729d6 100644
--- a/src/devices/video/i82730.h
+++ b/src/devices/video/i82730.h
@@ -13,30 +13,12 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_I82730_ADD(_tag, _cpu_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, I82730, _clock) \
- downcast<i82730_device &>(*device).set_cpu_tag(_cpu_tag);
-
-#define MCFG_I82730_SINT_HANDLER(_devcb) \
- downcast<i82730_device &>(*device).set_sint_handler(DEVCB_##_devcb);
-
-#define MCFG_I82730_UPDATE_ROW_CB(_class, _method) \
- downcast<i82730_device &>(*device).set_update_row_callback(i82730_device::update_row_delegate(&_class::_method, #_class "::" #_method, this));
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
#define I82730_UPDATE_ROW(name) \
- void name(bitmap_rgb32 &bitmap, uint16_t *data, uint8_t lc, uint16_t y, int x_count)
-
+ void name(bitmap_rgb32 &bitmap, uint16_t *data, uint8_t lc, uint16_t y, int x_count)
// ======================> i82730_device
@@ -46,14 +28,24 @@ public:
typedef device_delegate<void (bitmap_rgb32 &bitmap, uint16_t *data, uint8_t lc, uint16_t y, int x_count)> update_row_delegate;
// construction/destruction
+ template <typename T>
+ i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag)
+ : i82730_device(mconfig, tag, owner, clock)
+ {
+ m_cpu.set_tag(std::forward<T>(cpu_tag));
+ }
i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
- template <class Object> devcb_base &set_sint_handler(Object &&cb) { return m_sint_handler.set_callback(std::forward<Object>(cb)); }
+ auto sint() { return m_sint_handler.bind(); }
// inline configuration
- void set_cpu_tag(const char *tag) { m_cpu_tag = tag; }
- template <typename Object> void set_update_row_callback(Object &&cb) { m_update_row_cb = std::forward<Object>(cb); }
+ void set_update_row_callback(update_row_delegate callback) { m_update_row_cb = callback; }
+ template <class FunctionClass> void set_update_row_callback(void (FunctionClass::*callback)(bitmap_rgb32 &, uint16_t *, uint8_t, uint16_t, int)
+ , const char *name)
+ {
+ set_update_row_callback(update_row_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -98,7 +90,7 @@ private:
devcb_write_line m_sint_handler;
update_row_delegate m_update_row_cb;
- const char *m_cpu_tag;
+ required_device<cpu_device> m_cpu;
address_space *m_program;
emu_timer *m_row_timer;
diff --git a/src/devices/video/i8275.h b/src/devices/video/i8275.h
index 94848607ce8..44bede3ace4 100644
--- a/src/devices/video/i8275.h
+++ b/src/devices/video/i8275.h
@@ -82,6 +82,19 @@ public:
void set_character_width(int value) { m_hpixels_per_column = value; }
template <typename... T> void set_display_callback(T &&... args) { m_display_cb = draw_character_delegate(std::forward<T>(args)...); }
+ void set_display_callback(draw_character_delegate callback) { m_display_cb = callback; }
+ template <class FunctionClass> void set_display_callback(const char *devname,
+ void (FunctionClass::*callback)(bitmap_rgb32 &, int, int, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t),
+ const char *name)
+ {
+ set_display_callback(draw_character_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_display_callback(
+ void (FunctionClass::*callback)(bitmap_rgb32 &, int, int, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t),
+ const char *name)
+ {
+ set_display_callback(draw_character_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
template <class Object> devcb_base &set_drq_wr_callback(Object &&cb) { return m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_write_irq.set_callback(std::forward<Object>(cb)); }
diff --git a/src/devices/video/upd3301.h b/src/devices/video/upd3301.h
index 554df8189b5..80e9346eb6c 100644
--- a/src/devices/video/upd3301.h
+++ b/src/devices/video/upd3301.h
@@ -81,6 +81,17 @@ public:
void set_character_width(int value) { m_width = value; }
template <typename... T> void set_display_callback(T &&... args) { m_display_cb = draw_character_delegate(std::forward<T>(args)...); }
+ void set_display_callback(draw_character_delegate callback) { m_display_cb = callback; }
+ template <class FunctionClass> void set_display_callback(const char *devname,
+ void (FunctionClass::*callback)(bitmap_rgb32 &, int, int, uint8_t, uint8_t, int, int, int, int, int, int, int), const char *name)
+ {
+ set_display_callback(draw_character_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
+ }
+ template <class FunctionClass> void set_display_callback(
+ void (FunctionClass::*callback)(bitmap_rgb32 &, int, int, uint8_t, uint8_t, int, int, int, int, int, int, int), const char *name)
+ {
+ set_display_callback(draw_character_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
+ }
template <class Object> devcb_base &set_drq_wr_callback(Object &&cb) { return m_write_drq.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return m_write_int.set_callback(std::forward<Object>(cb)); }
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index 218b72d8ce6..fd46dfb7714 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -133,35 +133,45 @@ WRITE_LINE_MEMBER(leland_80186_sound_device::i80186_tmr1_w)
set_clock_line(7, state);
}
-MACHINE_CONFIG_START(leland_80186_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(leland_80186_map_program)
- MCFG_DEVICE_IO_MAP(leland_80186_map_io)
- MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, leland_80186_sound_device, peripheral_ctrl))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, leland_80186_sound_device, i80186_tmr0_w))
+void leland_80186_sound_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_audiocpu, 16_MHz_XTAL);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &leland_80186_sound_device::leland_80186_map_program);
+ m_audiocpu->set_addrmap(AS_IO, &leland_80186_sound_device::leland_80186_map_io);
+ m_audiocpu->chip_select_callback().set(FUNC(leland_80186_sound_device::peripheral_ctrl));
+ m_audiocpu->tmrout0_handler().set(FUNC(leland_80186_sound_device::i80186_tmr0_w));
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u31 + ad7524.u46
- MCFG_DEVICE_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u32 + ad7524.u47
- MCFG_DEVICE_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u33 + ad7524.u48
- MCFG_DEVICE_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u34 + ad7524.u49
- MCFG_DEVICE_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u35 + ad7524.u50
- MCFG_DEVICE_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // 74hc374.u36 + ad7524.u51
- MCFG_DEVICE_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // ad7533.u64
- MCFG_DEVICE_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u17 + r2-r9 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u18 + r12-r19 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u19 + r22-r29 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u20 + r32-r39 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u21 + r42-r49 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // 74hc374.u22 + r52-r59 (24k,12k,6.2k,3k,1.5k,750,360,160)
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
+ for (int i = 0; i < 6; i++)
+ {
+ AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // 74hc374.u31..6 + ad7524.u46..51
+ DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0); // 74hc374.u17..22 + rX2-rX9 (24k,12k,6.2k,3k,1.5k,750,360,160) where X is 0..5
+ }
+ AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // ad7533.u64
+
+ m_dacvol[0]->add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[0]->add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[4]->add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[4]->add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[5]->add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[5]->add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
+
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", -1.0, DAC_VREF_NEG_INPUT);
PIT8254(config, m_pit[0], 0);
m_pit[0]->set_clk<0>(4000000);
@@ -180,40 +190,49 @@ MACHINE_CONFIG_START(leland_80186_sound_device::device_add_mconfig)
m_pit[1]->out_handler<2>().set(FUNC(leland_80186_sound_device::pit1_2_w));
GENERIC_LATCH_16(config, m_soundlatch);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(redline_80186_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(leland_80186_map_program)
- MCFG_DEVICE_IO_MAP(redline_80186_map_io)
- MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, leland_80186_sound_device, peripheral_ctrl))
+void redline_80186_sound_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_audiocpu, 16_MHz_XTAL);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &redline_80186_sound_device::leland_80186_map_program);
+ m_audiocpu->set_addrmap(AS_IO, &redline_80186_sound_device::redline_80186_map_io);
+ m_audiocpu->chip_select_callback().set(FUNC(leland_80186_sound_device::peripheral_ctrl));
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac5", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac6", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac7", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac8", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac5vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac5", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac6vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac6", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac7vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac7", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac7", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac8vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac8", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac8", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac7vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac8vol", 1.0, DAC_VREF_POS_INPUT)
+ for (int i = 0; i < 8; i++)
+ {
+ AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC
+ DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0);
+ }
+
+ m_dacvol[0]->add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[0]->add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[1]->add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[2]->add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[3]->add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[4]->add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[4]->add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[5]->add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[5]->add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[6]->add_route(0, "dac7", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[6]->add_route(0, "dac7", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[7]->add_route(0, "dac8", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[7]->add_route(0, "dac8", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac5vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac6vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac7vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac8vol", 1.0, DAC_VREF_POS_INPUT);
PIT8254(config, m_pit[0], 0);
m_pit[0]->set_clk<0>(7000000);
@@ -237,31 +256,41 @@ MACHINE_CONFIG_START(redline_80186_sound_device::device_add_mconfig)
m_pit[2]->set_clk<2>(7000000);
GENERIC_LATCH_16(config, m_soundlatch);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ataxx_80186_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(leland_80186_map_program)
- MCFG_DEVICE_IO_MAP(ataxx_80186_map_io)
- MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, leland_80186_sound_device, peripheral_ctrl))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, leland_80186_sound_device, i80186_tmr0_w))
+void ataxx_80186_sound_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_audiocpu, 16_MHz_XTAL);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &ataxx_80186_sound_device::leland_80186_map_program);
+ m_audiocpu->set_addrmap(AS_IO, &ataxx_80186_sound_device::ataxx_80186_map_io);
+ m_audiocpu->chip_select_callback().set(FUNC(leland_80186_sound_device::peripheral_ctrl));
+ m_audiocpu->tmrout0_handler().set(FUNC(leland_80186_sound_device::i80186_tmr0_w));
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
- MCFG_DEVICE_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
+ for (int i = 0; i < 4; i++)
+ {
+ AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC
+ DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0); // unknown DAC
+ }
+ AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC
+
+ m_dacvol[0]->add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[0]->add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
+
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", -1.0, DAC_VREF_NEG_INPUT);
PIT8254(config, m_pit[0], 0);
m_pit[0]->set_clk<0>(4000000);
@@ -272,32 +301,42 @@ MACHINE_CONFIG_START(ataxx_80186_sound_device::device_add_mconfig)
m_pit[0]->out_handler<2>().set(FUNC(leland_80186_sound_device::pit0_2_w));
GENERIC_LATCH_16(config, m_soundlatch);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(wsf_80186_sound_device::device_add_mconfig)
- MCFG_DEVICE_ADD("audiocpu", I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(leland_80186_map_program)
- MCFG_DEVICE_IO_MAP(ataxx_80186_map_io)
- MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, leland_80186_sound_device, peripheral_ctrl))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, leland_80186_sound_device, i80186_tmr0_w))
- MCFG_80186_TMROUT1_HANDLER(WRITELINE(*this, leland_80186_sound_device, i80186_tmr1_w))
+void wsf_80186_sound_device::device_add_mconfig(machine_config &config)
+{
+ I80186(config, m_audiocpu, 16_MHz_XTAL);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &wsf_80186_sound_device::leland_80186_map_program);
+ m_audiocpu->set_addrmap(AS_IO, &wsf_80186_sound_device::ataxx_80186_map_io);
+ m_audiocpu->chip_select_callback().set(FUNC(leland_80186_sound_device::peripheral_ctrl));
+ m_audiocpu->tmrout0_handler().set(FUNC(leland_80186_sound_device::i80186_tmr0_w));
+ m_audiocpu->tmrout1_handler().set(FUNC(leland_80186_sound_device::i80186_tmr1_w));
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("dac1", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac2", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac3", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac4", AD7524, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.2) // unknown DAC
- MCFG_DEVICE_ADD("dac9", AD7533, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC
- MCFG_DEVICE_ADD("dac1vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac2vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac3vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("dac4vol", DAC_8BIT_BINARY_WEIGHTED, 0) MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT)
- MCFG_SOUND_ROUTE(0, "dac9", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac9", -1.0, DAC_VREF_NEG_INPUT)
+ for (int i = 0; i < 4; i++)
+ {
+ AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC
+ DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0); // unknown DAC
+ }
+ AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC
+
+ m_dacvol[0]->add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[0]->add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[1]->add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[1]->add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[2]->add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[2]->add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+ m_dacvol[3]->add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol[3]->add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT); // unknown DAC
+
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
+ vref.set_output(5.0);
+ vref.add_route(0, "dac1vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac2vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac3vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac4vol", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac9", -1.0, DAC_VREF_NEG_INPUT);
/* sound hardware */
YM2151(config, m_ymsnd, 4000000);
@@ -313,7 +352,7 @@ MACHINE_CONFIG_START(wsf_80186_sound_device::device_add_mconfig)
m_pit[0]->out_handler<2>().set(FUNC(leland_80186_sound_device::pit0_2_w));
GENERIC_LATCH_16(config, m_soundlatch);
-MACHINE_CONFIG_END
+}
void leland_80186_sound_device::leland_80186_map_program(address_map &map)
diff --git a/src/mame/audio/leland.h b/src/mame/audio/leland.h
index 322b8cae4a1..1aa15ec4be1 100644
--- a/src/mame/audio/leland.h
+++ b/src/mame/audio/leland.h
@@ -59,7 +59,7 @@ protected:
required_device<generic_latch_16_device> m_soundlatch;
optional_device_array<dac_byte_interface, 8> m_dac;
optional_device<dac_word_interface> m_dac9;
- optional_device_array<dac_byte_interface, 8> m_dacvol;
+ optional_device_array<dac_binary_weighted_8bit_device, 8> m_dacvol;
optional_device_array<pit8254_device, 3> m_pit;
optional_device<i80186_cpu_device> m_audiocpu;
optional_device<ym2151_device> m_ymsnd;
diff --git a/src/mame/audio/redalert.cpp b/src/mame/audio/redalert.cpp
index 2acfd945c68..1fa0b1c33b0 100644
--- a/src/mame/audio/redalert.cpp
+++ b/src/mame/audio/redalert.cpp
@@ -197,18 +197,17 @@ void redalert_state::redalert_audio_m37b(machine_config &config)
*
*************************************/
-MACHINE_CONFIG_START(redalert_state::redalert_audio_voice)
-
- MCFG_DEVICE_ADD("voice", I8085A, REDALERT_VOICE_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(redalert_voice_map)
- MCFG_I8085A_SID(READLINE(*this, redalert_state,sid_callback))
- MCFG_I8085A_SOD(WRITELINE(*this, redalert_state,sod_callback))
+void redalert_state::redalert_audio_voice(machine_config &config)
+{
+ I8085A(config, m_voicecpu, REDALERT_VOICE_CPU_CLOCK);
+ m_voicecpu->set_addrmap(AS_PROGRAM, &redalert_state::redalert_voice_map);
+ m_voicecpu->in_sid_func().set(FUNC(redalert_state::sid_callback));
+ m_voicecpu->out_sod_func().set(FUNC(redalert_state::sod_callback));
GENERIC_LATCH_8(config, m_soundlatch2);
- MCFG_DEVICE_ADD("cvsd", HC55516, REDALERT_HC55516_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ HC55516(config, m_cvsd, REDALERT_HC55516_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
/*************************************
*
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index f70559189e5..4ebcc11d7b3 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -443,37 +443,37 @@ static void pci_devices(device_slot_interface &device)
MACHINE_CONFIG_START(at_state::ibm5170)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I80286, 12_MHz_XTAL / 2 /*6000000*/)
- MCFG_DEVICE_PROGRAM_MAP(at16_map)
- MCFG_DEVICE_IO_MAP(at16_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259_master", pic8259_device, inta_cb)
- MCFG_80286_SHUTDOWN(WRITELINE("mb", at_mb_device, shutdown))
+ i80286_cpu_device &maincpu(I80286(config, m_maincpu, 12_MHz_XTAL / 2 /*6000000*/));
+ maincpu.set_addrmap(AS_PROGRAM, &at_state::at16_map);
+ maincpu.set_addrmap(AS_IO, &at_state::at16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+ maincpu.shutdown_callback().set("mb", FUNC(at_mb_device::shutdown));
+
+ AT_MB(config, m_mb, 0);
+ config.m_minimum_quantum = attotime::from_hz(60);
- MCFG_DEVICE_ADD("mb", AT_MB, 0)
- MCFG_QUANTUM_TIME(attotime::from_hz(60))
downcast<at_mb_device *>(device)->at_softlists(config);
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "ega", false)
- MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "fdc", false)
- MCFG_DEVICE_ADD("isa3", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "comat", false)
- MCFG_DEVICE_ADD("isa4", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "ide", false)
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "ega", false);
+ ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "fdc", false);
+ ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, "comat", false);
+ ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, "ide", false);
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)
/* internal ram */
RAM(config, m_ram).set_default_size("1664K").set_extra_options("2M,4M,8M,15M");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(at_state::ibm5170a)
+void at_state::ibm5170a(machine_config &config)
+{
ibm5170(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(16_MHz_XTAL / 2)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(16_MHz_XTAL / 2);
+}
MACHINE_CONFIG_START(at_state::ews286)
ibm5170(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(16_MHz_XTAL / 2) // Exact crystal needs to be verified, 8 MHz according to specification
+ m_maincpu->set_clock(16_MHz_XTAL / 2); // Exact crystal needs to be verified, 8 MHz according to specification
MCFG_DEVICE_MODIFY("isa2")
MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc", cfg_single_1200K) // From pictures but also with a 3.5" as second floppy
@@ -483,11 +483,11 @@ MACHINE_CONFIG_START(at_state::ews286)
m_ram->set_default_size("640K");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(at_state::ec1842)
+void at_state::ec1842(machine_config &config)
+{
ibm5170(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(12000000)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(12000000);
+}
MACHINE_CONFIG_START(at_state::ibm5162)
ibm5170(config);
@@ -520,23 +520,23 @@ MACHINE_CONFIG_START(at_state::atvga)
MCFG_DEVICE_ADD("isa5", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false) // FIXME: determine ISA bus clock
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(at_state::neat)
+void at_state::neat(machine_config &config)
+{
atvga(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(neat_io)
+ m_maincpu->set_addrmap(AS_IO, &at_state::neat_io);
ds12885_device &rtc(DS12885(config.replace(), "mb:rtc")); // TODO: move this into the cs8221
rtc.irq().set("mb:pic8259_slave", FUNC(pic8259_device::ir0_w)); // this is in :mb
rtc.set_century_index(0x32);
CS8221(config, "cs8221", 0, "maincpu", "mb:isa", "bios");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(at_state::xb42639)
+void at_state::xb42639(machine_config &config)
+{
atvga(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(12500000)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(12500000);
+}
MACHINE_CONFIG_START(at_state::k286i)
ibm5162(config);
@@ -793,24 +793,23 @@ MACHINE_CONFIG_END
// Compaq Portable III
MACHINE_CONFIG_START(at_state::comportiii)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I80286, 48_MHz_XTAL / 4 /*12000000*/)
- MCFG_DEVICE_PROGRAM_MAP(at16_map)
- MCFG_DEVICE_IO_MAP(at16_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259_master", pic8259_device, inta_cb)
- MCFG_80286_SHUTDOWN(WRITELINE("mb", at_mb_device, shutdown))
-
- MCFG_DEVICE_ADD("mb", AT_MB, 0)
- MCFG_QUANTUM_TIME(attotime::from_hz(60))
+ i80286_cpu_device &maincpu(I80286(config, m_maincpu, 48_MHz_XTAL / 4 /*12000000*/));
+ maincpu.set_addrmap(AS_PROGRAM, &at_state::at16_map);
+ maincpu.set_addrmap(AS_IO, &at_state::at16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+ maincpu.shutdown_callback().set("mb", FUNC(at_mb_device::shutdown));
+
+ AT_MB(config, m_mb, 0);
+ config.m_minimum_quantum = attotime::from_hz(60);
downcast<at_mb_device *>(device)->at_softlists(config);
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("board1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "fdc", true)
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc", cfg_single_1200K)
- MCFG_DEVICE_ADD("board2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "comat", true)
- MCFG_DEVICE_ADD("board3", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "hdc", true)
- MCFG_DEVICE_ADD("board4", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "cga_cportiii", true)
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
+ ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_single_1200K);
+ ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true);
+ ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "hdc", true);
+ ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "cga_cportiii", true);
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)
diff --git a/src/mame/drivers/bob85.cpp b/src/mame/drivers/bob85.cpp
index c75242aaffe..37724899427 100644
--- a/src/mame/drivers/bob85.cpp
+++ b/src/mame/drivers/bob85.cpp
@@ -53,7 +53,7 @@ private:
uint8_t m_count_key;
virtual void machine_reset() override;
virtual void machine_start() override { m_digits.resolve(); }
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<cassette_image_device> m_cass;
required_ioport m_line0;
required_ioport m_line1;
@@ -207,21 +207,21 @@ READ_LINE_MEMBER( bob85_state::sid_r )
return m_cass->input() > 0.0;
}
-MACHINE_CONFIG_START(bob85_state::bob85)
+void bob85_state::bob85(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, XTAL(5'000'000))
- MCFG_DEVICE_PROGRAM_MAP(bob85_mem)
- MCFG_DEVICE_IO_MAP(bob85_io)
- MCFG_I8085A_SID(READLINE(*this, bob85_state, sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, bob85_state, sod_w))
+ I8085A(config, m_maincpu, XTAL(5'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &bob85_state::bob85_mem);
+ m_maincpu->set_addrmap(AS_IO, &bob85_state::bob85_io);
+ m_maincpu->in_sid_func().set(FUNC(bob85_state::sid_r));
+ m_maincpu->out_sod_func().set(FUNC(bob85_state::sod_w));
/* video hardware */
config.set_default_layout(layout_bob85);
// devices
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cass).set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED));
+}
/* ROM definition */
ROM_START( bob85 )
diff --git a/src/mame/drivers/compis.cpp b/src/mame/drivers/compis.cpp
index a45df5d037e..54ac9883c88 100644
--- a/src/mame/drivers/compis.cpp
+++ b/src/mame/drivers/compis.cpp
@@ -409,10 +409,10 @@ void compis_state::compis_io(address_map &map)
map.unmap_value_high();
map(0x0000, 0x0007) /* PCS0 */ .mirror(0x78).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0xff00);
map(0x0080, 0x0087) /* PCS1 */ .mirror(0x78).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)).umask16(0x00ff);
- map(0x0100, 0x011f) /* PCS2 */ .mirror(0x60).rw(MM58174A_TAG, FUNC(mm58274c_device::read), FUNC(mm58274c_device::write)).umask16(0x00ff);
- map(0x0180, 0x01ff) /* PCS3 */ .rw(GRAPHICS_TAG, FUNC(compis_graphics_slot_device::pcs3_r), FUNC(compis_graphics_slot_device::pcs3_w));
+ map(0x0100, 0x011f) /* PCS2 */ .mirror(0x60).rw(m_rtc, FUNC(mm58274c_device::read), FUNC(mm58274c_device::write)).umask16(0x00ff);
+ map(0x0180, 0x01ff) /* PCS3 */ .rw(m_graphics, FUNC(compis_graphics_slot_device::pcs3_r), FUNC(compis_graphics_slot_device::pcs3_w));
//map(0x0200, 0x0201) /* PCS4 */ .mirror(0x7e);
- map(0x0280, 0x028f) /* PCS5 */ .mirror(0x70).m(I80130_TAG, FUNC(i80130_device::io_map));
+ map(0x0280, 0x028f) /* PCS5 */ .mirror(0x70).m(m_osp, FUNC(i80130_device::io_map));
map(0x0300, 0x030f).rw(FUNC(compis_state::pcs6_0_1_r), FUNC(compis_state::pcs6_0_1_w));
map(0x0310, 0x031f).rw(FUNC(compis_state::pcs6_2_3_r), FUNC(compis_state::pcs6_2_3_w));
map(0x0320, 0x032f).rw(FUNC(compis_state::pcs6_4_5_r), FUNC(compis_state::pcs6_4_5_w));
@@ -737,20 +737,21 @@ void compis_state::machine_reset()
// MACHINE_CONFIG( compis )
//-------------------------------------------------
-MACHINE_CONFIG_START(compis_state::compis)
+void compis_state::compis(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(I80186_TAG, I80186, 15.36_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(compis_mem)
- MCFG_DEVICE_IO_MAP(compis_io)
- MCFG_80186_IRQ_SLAVE_ACK(READ8(DEVICE_SELF, compis_state, compis_irq_callback))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(DEVICE_SELF, compis_state, tmr0_w))
- MCFG_80186_TMROUT1_HANDLER(WRITELINE(DEVICE_SELF, compis_state, tmr1_w))
+ I80186(config, m_maincpu, 15.36_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &compis_state::compis_mem);
+ m_maincpu->set_addrmap(AS_IO, &compis_state::compis_io);
+ m_maincpu->read_slave_ack_callback().set(FUNC(compis_state::compis_irq_callback));
+ m_maincpu->tmrout0_handler().set(FUNC(compis_state::tmr0_w));
+ m_maincpu->tmrout1_handler().set(FUNC(compis_state::tmr1_w));
// devices
I80130(config, m_osp, 15.36_MHz_XTAL/2);
- m_osp->irq().set(I80186_TAG, FUNC(i80186_cpu_device::int0_w));
- m_osp->systick().set(I80130_TAG, FUNC(i80130_device::ir3_w));
- m_osp->delay().set(I80130_TAG, FUNC(i80130_device::ir7_w));
+ m_osp->irq().set(m_maincpu, FUNC(i80186_cpu_device::int0_w));
+ m_osp->systick().set(m_osp, FUNC(i80130_device::ir3_w));
+ m_osp->delay().set(m_osp, FUNC(i80130_device::ir7_w));
m_osp->baud().set(FUNC(compis_state::tmr2_w));
PIT8253(config, m_pit, 0);
@@ -767,8 +768,8 @@ MACHINE_CONFIG_START(compis_state::compis)
I8251(config, m_uart, 0);
m_uart->txd_handler().set(COMPIS_KEYBOARD_TAG, FUNC(compis_keyboard_device::si_w));
- m_uart->rxrdy_handler().set(I80130_TAG, FUNC(i80130_device::ir2_w));
- m_uart->txrdy_handler().set(I80186_TAG, FUNC(i80186_cpu_device::int1_w));
+ m_uart->rxrdy_handler().set(m_osp, FUNC(i80130_device::ir2_w));
+ m_uart->txrdy_handler().set(m_maincpu, FUNC(i80186_cpu_device::int1_w));
compis_keyboard_device &kb(COMPIS_KEYBOARD(config, COMPIS_KEYBOARD_TAG, 0));
kb.out_tx_handler().set(m_uart, FUNC(i8251_device::write_rxd));
@@ -808,39 +809,38 @@ MACHINE_CONFIG_START(compis_state::compis)
output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
m_centronics->set_output_latch(cent_data_out);
- MCFG_COMPIS_GRAPHICS_SLOT_ADD(GRAPHICS_TAG, 15.36_MHz_XTAL/2, compis_graphics_cards, "hrg")
+ COMPIS_GRAPHICS_SLOT(config, m_graphics, 15.36_MHz_XTAL/2, compis_graphics_cards, "hrg");
ISBX_SLOT(config, m_isbx0, 0, isbx_cards, "fdc");
- m_isbx0->mintr0().set(I80130_TAG, FUNC(i80130_device::ir1_w));
- m_isbx0->mintr1().set(I80130_TAG, FUNC(i80130_device::ir0_w));
- m_isbx0->mdrqt().set(I80186_TAG, FUNC(i80186_cpu_device::drq0_w));
+ m_isbx0->mintr0().set(m_osp, FUNC(i80130_device::ir1_w));
+ m_isbx0->mintr1().set(m_osp, FUNC(i80130_device::ir0_w));
+ m_isbx0->mdrqt().set(m_maincpu, FUNC(i80186_cpu_device::drq0_w));
ISBX_SLOT(config, m_isbx1, 0, isbx_cards, nullptr);
- m_isbx1->mintr0().set(I80130_TAG, FUNC(i80130_device::ir6_w));
- m_isbx1->mintr1().set(I80130_TAG, FUNC(i80130_device::ir5_w));
- m_isbx1->mdrqt().set(I80186_TAG, FUNC(i80186_cpu_device::drq1_w));
+ m_isbx1->mintr0().set(m_osp, FUNC(i80130_device::ir6_w));
+ m_isbx1->mintr1().set(m_osp, FUNC(i80130_device::ir5_w));
+ m_isbx1->mdrqt().set(m_maincpu, FUNC(i80186_cpu_device::drq1_w));
// software lists
SOFTWARE_LIST(config, "flop_list").set_original("compis");
// internal ram
RAM(config, m_ram).set_default_size("128K").set_extra_options("256K");
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
// MACHINE_CONFIG( compis2 )
//-------------------------------------------------
-MACHINE_CONFIG_START(compis_state::compis2)
+void compis_state::compis2(machine_config &config)
+{
compis(config);
- // basic machine hardware
- MCFG_DEVICE_MODIFY(I80186_TAG)
- MCFG_DEVICE_PROGRAM_MAP(compis2_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &compis_state::compis2_mem);
// TODO 8087
// internal ram
m_ram->set_default_size("256K").set_extra_options("512K,768K");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/dwarfd.cpp b/src/mame/drivers/dwarfd.cpp
index fba7b069a75..248bc5d2f6e 100644
--- a/src/mame/drivers/dwarfd.cpp
+++ b/src/mame/drivers/dwarfd.cpp
@@ -332,7 +332,7 @@ private:
/* memory */
uint8_t m_dw_ram[0x1000];
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<palette_device> m_palette;
required_device<i8275_device> m_crtc;
required_region_ptr<uint16_t> m_charmap;
@@ -604,7 +604,6 @@ INPUT_PORTS_END
I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::pesp_display_pixels)
{
- int i;
int bank = ((gpa & 2) ? 0 : 2) + (gpa & 1);
const rgb_t *palette = m_palette->palette()->entry_list_raw();
uint16_t pixels = m_charmap[(linecount & 7) + ((charcode + (bank * 128)) << 3)];
@@ -614,7 +613,7 @@ I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::pesp_display_pixels)
//if(!linecount)
// logerror("%d %d %02x %02x %02x %02x %02x %02x %02x\n", x/8, y/8, charcode, lineattr, lten, rvv, vsp, gpa, hlgt);
- for(i=0;i<8;i+=2)
+ for (int i = 0; i < 8; i += 2)
{
uint8_t pixel = (pixels >> (i * 2)) & 0xf;
uint8_t value = (pixel >> 1) | (rvv << 4) | (vsp << 3);
@@ -628,7 +627,6 @@ I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::pesp_display_pixels)
I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::display_pixels)
{
- int i;
int bank = ((gpa & 2) ? 0 : 4) + (gpa & 1) + (m_dsw2->read() & 2);
const rgb_t *palette = m_palette->palette()->entry_list_raw();
uint16_t pixels = m_charmap[(linecount & 7) + ((charcode + (bank * 128)) << 3)];
@@ -638,7 +636,7 @@ I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::display_pixels)
//if(!linecount)
// logerror("%d %d %02x %02x %02x %02x %02x %02x %02x\n", x/8, y/8, charcode, lineattr, lten, rvv, vsp, gpa, hlgt);
- for(i=0;i<8;i+=2)
+ for (int i = 0; i < 8; i += 2)
{
uint8_t pixel = (pixels >> (i * 2)) & 0xf;
uint8_t value = (pixel >> 1) | (rvv << 4) | (vsp << 3);
@@ -652,7 +650,6 @@ I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::display_pixels)
I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::qc_display_pixels)
{
- int i;
int bank = gpa;
const rgb_t *palette = m_palette->palette()->entry_list_raw();
uint16_t pixels = m_charmap[(linecount & 7) + ((charcode + (bank * 128)) << 3)];
@@ -662,7 +659,7 @@ I8275_DRAW_CHARACTER_MEMBER(dwarfd_state::qc_display_pixels)
//if(!linecount)
// logerror("%d %d %02x %02x %02x %02x %02x %02x %02x\n", x/8, y/8, charcode, lineattr, lten, rvv, vsp, gpa, hlgt);
- for(i=0;i<8;i+=2)
+ for (int i = 0; i < 8; i += 2)
{
uint8_t pixel = (pixels >> (i * 2)) & 0xf;
uint8_t value = (pixel >> 1) | (rvv << 4) | (vsp << 3);
@@ -706,16 +703,15 @@ GFXDECODE_END
PALETTE_INIT_MEMBER(dwarfd_state, dwarfd)
{
uint8_t rgb[3];
- int i,j;
uint8_t *prom = memregion("proms")->base();
- for (i = 0; i < 32; i++)
+ for (int i = 0; i < 32; i++)
{
// what are the top 2 bits?
rgb[0] = ((prom[i] & 0x08) >> 2) | (prom[i] & 1);
rgb[1] = ((prom[i] & 0x10) >> 3) | ((prom[i] & 2) >> 1);
rgb[2] = ((prom[i] & 0x20) >> 4) | ((prom[i] & 4) >> 2);
- for(j = 0; j < 3; j++)
+ for (int j = 0; j < 3; j++)
rgb[j] |= (rgb[j] << 6) | (rgb[j] << 4) | (rgb[j] << 2);
palette.set_pen_color(i,rgb_t(rgb[0], rgb[1], rgb[2]));
@@ -733,59 +729,55 @@ void dwarfd_state::machine_reset()
m_back_color = false;
}
-MACHINE_CONFIG_START(dwarfd_state::dwarfd)
-
+void dwarfd_state::dwarfd(machine_config &config)
+{
/* basic machine hardware */
/* FIXME: The 8085A had a max clock of 6MHz, internally divided by 2! */
- MCFG_DEVICE_ADD("maincpu", I8085A, 10595000/3*2) /* ? MHz */
- MCFG_I8085A_SOD(WRITELINE(*this, dwarfd_state,dwarfd_sod_callback))
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ I8085A(config, m_maincpu, 10595000/3*2); /* ? MHz */
+ m_maincpu->out_sod_func().set(FUNC(dwarfd_state::dwarfd_sod_callback));
+ m_maincpu->set_addrmap(AS_PROGRAM, &dwarfd_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &dwarfd_state::io_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(272*2, 200+4*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 272*2-1, 0, 200-1)
- MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
-
- MCFG_DEVICE_ADD("i8275", I8275, 10595000/3)
- MCFG_I8275_CHARACTER_WIDTH(8)
- MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(dwarfd_state, display_pixels)
- MCFG_I8275_IRQ_CALLBACK(INPUTLINE("maincpu", I8085_RST55_LINE))
- MCFG_I8275_DRQ_CALLBACK(WRITELINE(*this, dwarfd_state, drq_w))
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dwarfd)
- MCFG_PALETTE_ADD("palette", 32)
- MCFG_PALETTE_INIT_OWNER(dwarfd_state, dwarfd)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(272*2, 200+4*8);
+ screen.set_visarea(0, 272*2-1, 0, 200-1);
+ screen.set_screen_update("i8275", FUNC(i8275_device::screen_update));
+
+ I8275(config, m_crtc, 10595000/3);
+ m_crtc->set_character_width(8);
+ m_crtc->set_display_callback(FUNC(dwarfd_state::display_pixels));
+ m_crtc->irq_wr_callback().set_inputline("maincpu", I8085_RST55_LINE);
+ m_crtc->drq_wr_callback().set(FUNC(dwarfd_state::drq_w));
+
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_dwarfd);
+ PALETTE(config, m_palette, 32).set_init(FUNC(dwarfd_state::palette_init_dwarfd));
SPEAKER(config, "mono").front_center();
ay8910_device &aysnd(AY8910(config, "aysnd", 1500000));
aysnd.port_a_read_callback().set_ioport("IN2");
aysnd.port_b_read_callback().set_ioport("IN1");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(dwarfd_state::pokeresp)
+void dwarfd_state::pokeresp(machine_config &config)
+{
dwarfd(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pokeresp_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &dwarfd_state::pokeresp_map);
+ m_maincpu->set_addrmap(AS_IO, &dwarfd_state::io_map);
- MCFG_DEVICE_MODIFY("i8275")
- MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(dwarfd_state, pesp_display_pixels)
-MACHINE_CONFIG_END
+ m_crtc->set_display_callback(FUNC(dwarfd_state::pesp_display_pixels));
+}
-MACHINE_CONFIG_START(dwarfd_state::qc)
+void dwarfd_state::qc(machine_config &config)
+{
dwarfd(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &dwarfd_state::qc_map);
+ m_maincpu->set_addrmap(AS_IO, &dwarfd_state::qc_io_map);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(qc_map)
- MCFG_DEVICE_IO_MAP(qc_io_map)
-
- MCFG_DEVICE_MODIFY("i8275")
- MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(dwarfd_state, qc_display_pixels)
-MACHINE_CONFIG_END
+ m_crtc->set_display_callback(FUNC(dwarfd_state::qc_display_pixels));
+}
/* Dwarfs den PROM explanation:
The proms used in Dwarfs den are 74S188 (82s23 equivalent, 32x8 open collector)
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 8a7268333c2..58db8700c7f 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -362,9 +362,7 @@ D
#include "includes/equites.h"
#include "cpu/alph8201/alph8201.h"
-#include "cpu/i8085/i8085.h"
#include "cpu/m68000/m68000.h"
-#include "machine/i8155.h"
#include "machine/nvram.h"
#include "machine/watchdog.h"
#include "sound/ay8910.h"
@@ -1042,16 +1040,16 @@ static const char *const alphamc07_sample_names[] =
// the sound board is the same in all games
MACHINE_CONFIG_START(equites_state::common_sound)
- MCFG_DEVICE_ADD("audiocpu", I8085A, 6.144_MHz_XTAL) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
- MCFG_I8085A_CLK_OUT_DEVICE("audio8155")
+ I8085A(config, m_audiocpu, 6.144_MHz_XTAL); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &equites_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &equites_state::sound_portmap);
+ m_audiocpu->set_clk_out("audio8155", FUNC(i8155_device::set_unscaled_clock));
- i8155_device &i8155(I8155(config, "audio8155", 0));
- i8155.out_pa_callback().set(FUNC(equites_state::equites_8155_porta_w));
- i8155.out_pb_callback().set(FUNC(equites_state::equites_8155_portb_w));
- i8155.out_pc_callback().set(FUNC(equites_state::equites_8155_portc_w));
- i8155.out_to_callback().set(FUNC(equites_state::equites_8155_timer_pulse));
+ I8155(config, m_audio8155, 0);
+ m_audio8155->out_pa_callback().set(FUNC(equites_state::equites_8155_porta_w));
+ m_audio8155->out_pb_callback().set(FUNC(equites_state::equites_8155_portb_w));
+ m_audio8155->out_pc_callback().set(FUNC(equites_state::equites_8155_portc_w));
+ m_audio8155->out_to_callback().set(FUNC(equites_state::equites_8155_timer_pulse));
/* sound hardware */
SPEAKER(config, "speaker").front_center();
diff --git a/src/mame/drivers/exp85.cpp b/src/mame/drivers/exp85.cpp
index 6e88f5e0e50..000f5bc76f9 100644
--- a/src/mame/drivers/exp85.cpp
+++ b/src/mame/drivers/exp85.cpp
@@ -32,7 +32,6 @@
#include "emu.h"
#include "includes/exp85.h"
-#include "cpu/i8085/i8085.h"
#include "machine/i8155.h"
#include "machine/i8355.h"
#include "machine/ram.h"
@@ -180,18 +179,18 @@ void exp85_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(exp85_state::exp85)
+void exp85_state::exp85(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(I8085A_TAG, I8085A, 6.144_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(exp85_mem)
- MCFG_DEVICE_IO_MAP(exp85_io)
- MCFG_I8085A_SID(READLINE(*this, exp85_state, sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, exp85_state, sod_w))
+ I8085A(config, m_maincpu, 6.144_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &exp85_state::exp85_mem);
+ m_maincpu->set_addrmap(AS_IO, &exp85_state::exp85_io);
+ m_maincpu->in_sid_func().set(FUNC(exp85_state::sid_r));
+ m_maincpu->out_sod_func().set(FUNC(exp85_state::sod_w));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
I8155(config, I8155_TAG, 6.144_MHz_XTAL/2);
@@ -200,14 +199,14 @@ MACHINE_CONFIG_START(exp85_state::exp85)
i8355.in_pa().set(FUNC(exp85_state::i8355_a_r));
i8355.out_pa().set(FUNC(exp85_state::i8355_a_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED));
RS232_PORT(config, "rs232", default_rs232_devices, "terminal").set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256").set_extra_options("4K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/fastinvaders.cpp b/src/mame/drivers/fastinvaders.cpp
index 166719cf697..29a0cf5cae0 100644
--- a/src/mame/drivers/fastinvaders.cpp
+++ b/src/mame/drivers/fastinvaders.cpp
@@ -86,7 +86,7 @@ private:
void fastinvaders_6845_io(address_map &map);
void fastinvaders_8275_io(address_map &map);
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<uint8_t> m_videoram;
@@ -125,44 +125,48 @@ TIMER_DEVICE_CALLBACK_MEMBER(fastinvaders_state::scanline_timer)
{
/* int scanline = param;
-
-
-
- if(scanline == 16){
+ if (scanline == 16)
+ {
//logerror("scanline\n");
m_dma8257->dreq1_w(0x01);
- m_dma8257->hlda_w(1);
- }
+ m_dma8257->hlda_w(1);
+ }
*/
}
TIMER_DEVICE_CALLBACK_MEMBER(fastinvaders_state::count_ar)
{
- if (m_ar<255){
- m_riga_sup= ((m_prom[m_ar]&0x08)>>3)&0x01;
- m_scudi= ((m_prom[m_ar]&0x04)>>2)&0x01;
- m_cannone= ((m_prom[m_ar]&0x02)>>1)&0x01;
- m_riga_inf= ((m_prom[m_ar]&0x01))&0x01;
+ if (m_ar < 255)
+ {
+ m_riga_sup = BIT(m_prom[m_ar], 3);
+ m_scudi = BIT(m_prom[m_ar], 2);
+ m_cannone = BIT(m_prom[m_ar], 1);
+ m_riga_inf = BIT(m_prom[m_ar], 0);
//logerror("m_ar = %02X m_riga_sup %02X, m_scudi %02X, m_cannone %02X, m_riga_inf %02X\n",m_ar,m_riga_sup,m_scudi,m_cannone,m_riga_inf);
- if(m_riga_sup==0x01){
- if(((m_prom[m_ar-1]&0x08)>>3)==0x01){
+ if (m_riga_sup)
+ {
+ if (BIT(m_prom[m_ar - 1], 3))
+ {
//logerror(" DMA1 \n");
//logerror("m_prom[m_ar]=%d m_prom[m_ar-1]= %d ar = %d r_s %d, sc %d, ca %d, ri %d\n",m_prom[m_ar],m_prom[m_ar-1],m_ar,m_riga_sup,m_scudi,m_cannone,m_riga_inf);
m_dma8257->dreq1_w(0x01);
m_dma8257->hlda_w(1);
//m_pic8259->ir1_w(HOLD_LINE);
- m_dma1=1;
+ m_dma1 = 1;
}
}
m_ar++;
}
- if (m_av<255){
+ if (m_av < 255)
+ {
m_av++;
//logerror("m_av=%02X\n",m_av);
- if (m_av == m_io_40){
- if (m_hsync==1){
+ if (m_av == m_io_40)
+ {
+ if (m_hsync == 1)
+ {
logerror(" DMA2 \n");
m_dma8257->dreq2_w(0x01);
m_dma8257->hlda_w(1);
@@ -176,14 +180,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(fastinvaders_state::count_ar)
WRITE8_MEMBER(fastinvaders_state::dark_1_clr)
{
//address_space& prog_space = m_maincpu->space(AS_PROGRAM);
- if(data){
+ if (data)
+ {
m_dma8257->dreq1_w(0x00);
}
- if(!data){
- m_dma1=0;
+ if (!data)
+ {
+ m_dma1 = 0;
}
-//logerror("dma 1 clr\n");
+ //logerror("dma 1 clr\n");
//m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE);
//m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
//return prog_space.read_byte(offset);
@@ -193,11 +199,13 @@ WRITE8_MEMBER(fastinvaders_state::dark_1_clr)
WRITE8_MEMBER(fastinvaders_state::dark_2_clr)
{
//address_space& prog_space = m_maincpu->space(AS_PROGRAM);
- if(data){
+ if (data)
+ {
m_dma8257->dreq2_w(0x00);
}
-/* if(!data){
- m_dma1=0;
+/* if (!data)
+ {
+ m_dma1 = 0;
}
*/
}
@@ -219,27 +227,14 @@ uint32_t fastinvaders_state::screen_update(screen_device &screen, bitmap_ind16 &
bitmap.fill(0, cliprect);
int count = 0;
-
- for (int y = 0;y < 19;y++)
+ for (int y = 0; y < 19; y++)
{
- for (int x = 0;x < 40;x++)
+ for (int x = 0; x < 40; x++)
{
uint8_t tile = m_videoram[count];
-
-
- gfx->transpen(
- bitmap,
- cliprect,
- tile,
- 0,
- 0, 0,
- x*16, y*14, 0
- );
-
+ gfx->transpen(bitmap, cliprect, tile, 0, 0, 0, x*16, y*14, 0);
count++;
-
}
-
}
return 0;
@@ -247,7 +242,7 @@ uint32_t fastinvaders_state::screen_update(screen_device &screen, bitmap_ind16 &
WRITE8_MEMBER(fastinvaders_state::io_40_w)
{
- m_io_40=data;
+ m_io_40 = data;
logerror("av target= %02X\n",m_io_40);
}
@@ -260,13 +255,12 @@ logerror("Audio write &02X\n",data);
READ8_MEMBER(fastinvaders_state::io_60_r)
{
- uint8_t tmp=0;
//0x60 ds6 input bit 0 DX or SX
// bit 1 DX or SX
-// bit 2-7 dip switch
+ // bit 2-7 dip switch
- tmp=ioport("IN1")->read()&0x03;
- tmp=tmp | (ioport("DSW1")->read()&0xfc);
+ uint8_t tmp = ioport("IN1")->read() & 0x03;
+ tmp = tmp | (ioport("DSW1")->read() & 0xfc);
//logerror("return %02X from 0x60\n",tmp);
return tmp;
@@ -275,97 +269,101 @@ READ8_MEMBER(fastinvaders_state::io_60_r)
WRITE8_MEMBER(fastinvaders_state::io_70_w)
{
-//bit 0 rest55 clear
-//bit 1 rest65 clear
-//bit 2 trap clear
-//bit 3 coin counter
+ //bit 0 rest55 clear
+ //bit 1 rest65 clear
+ //bit 2 trap clear
+ //bit 3 coin counter
-//bit 4 irq0 clear
-//bit 5 8085 reset
-//bit 6 TODO
-//bit 7 both used TODO
+ //bit 4 irq0 clear
+ //bit 5 8085 reset
+ //bit 6 TODO
+ //bit 7 both used TODO
-//IRQ clear
- if (data&0x01){
- m_rest55=0;
+ //IRQ clear
+ if (BIT(data, 0))
+ {
+ m_rest55 = 0;
m_maincpu->set_input_line(I8085_RST55_LINE, CLEAR_LINE);
}
- if (data&0x02){
- if (m_rest65){
+ if (BIT(data, 1))
+ {
+ if (m_rest65)
+ {
//logerror("clear");
- m_rest65=0;
+ m_rest65 = 0;
m_maincpu->set_input_line(I8085_RST65_LINE, CLEAR_LINE);
}
}
- if (data&0x04){
+ if (BIT(data, 2))
+ {
m_trap=0;
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
- if (data&0x10){
+ if (BIT(data, 4))
+ {
m_irq0=0;
m_pic8259->ir0_w(CLEAR_LINE);
}
//self reset
- if (data&0x20){
- logerror("RESET!!!!!\n");
+ if (BIT(data, 5))
+ {
+ logerror("reset\n");
}
-
//coin counter
// if (data&0x08){
// coin_counter_w(machine(), offset,0x01);
// }
-
}
WRITE8_MEMBER(fastinvaders_state::io_a0_w)
{
- m_irq1=0;
+ m_irq1 = 0;
m_pic8259->ir1_w(CLEAR_LINE);
}
WRITE8_MEMBER(fastinvaders_state::io_b0_w)
{
- m_irq2=0;
+ m_irq2 = 0;
m_pic8259->ir2_w(CLEAR_LINE);
}
WRITE8_MEMBER(fastinvaders_state::io_c0_w)
{
- m_irq3=0;
+ m_irq3 = 0;
m_pic8259->ir3_w(CLEAR_LINE);
}
WRITE8_MEMBER(fastinvaders_state::io_d0_w)
{
- m_irq5=0;
+ m_irq5 = 0;
m_pic8259->ir5_w(CLEAR_LINE);
}
WRITE8_MEMBER(fastinvaders_state::io_e0_w)
{
- m_irq4=0;
+ m_irq4 = 0;
m_pic8259->ir4_w(CLEAR_LINE);
}
WRITE8_MEMBER(fastinvaders_state::io_f0_w)
{
- m_irq6=0;
+ m_irq6 = 0;
m_pic8259->ir6_w(CLEAR_LINE);
}
READ_LINE_MEMBER(fastinvaders_state::sid_read)
{
- uint8_t tmp= m_start2_value ? ASSERT_LINE : CLEAR_LINE;
- m_start2_value=0;
+ uint8_t tmp = m_start2_value ? ASSERT_LINE : CLEAR_LINE;
+ m_start2_value = 0;
return tmp;
}
INPUT_CHANGED_MEMBER(fastinvaders_state::tilt)
{
- m_trap=1;
+ m_trap = 1;
if (newval)
m_maincpu->set_input_line(INPUT_LINE_NMI, HOLD_LINE);
}
@@ -373,116 +371,109 @@ INPUT_CHANGED_MEMBER(fastinvaders_state::tilt)
INPUT_CHANGED_MEMBER(fastinvaders_state::coin_inserted)
{
- m_rest65=1;
+ m_rest65 = 1;
if (newval)
m_maincpu->set_input_line(I8085_RST65_LINE, HOLD_LINE);
}
-
INPUT_CHANGED_MEMBER(fastinvaders_state::start)
{
- m_rest55=1;
+ m_rest55 = 1;
if (newval)
m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::start2)
{
- m_rest55=1;
- m_start2_value=1;
+ m_rest55 = 1;
+ m_start2_value = 1;
if (newval)
m_maincpu->set_input_line(I8085_RST55_LINE, HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in0)
{
- m_irq0=1;
+ m_irq0 = 1;
if (newval)
m_pic8259->ir0_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in1)
{
- m_irq1=1;
+ m_irq1 = 1;
if (newval)
m_pic8259->ir1_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in2)
{
- m_irq2=1;
+ m_irq2 = 1;
if (newval)
m_pic8259->ir2_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in3)
{
- m_irq3=1;
+ m_irq3 = 1;
if (newval)
m_pic8259->ir3_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in4)
{
- m_irq4=1;
+ m_irq4 = 1;
if (newval)
m_pic8259->ir4_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in5)
{
- m_irq5=1;
+ m_irq5 = 1;
if (newval)
m_pic8259->ir5_w(HOLD_LINE);
}
INPUT_CHANGED_MEMBER(fastinvaders_state::in6)
{
- m_irq6=1;
+ m_irq6 = 1;
if (newval)
m_pic8259->ir6_w(HOLD_LINE);
}
-
-
-
DECLARE_WRITE_LINE_MEMBER( fastinvaders_state::vsync)
{
//logerror("p8257_drq_w\n");
- if (!state){
+ if (!state)
+ {
m_dma8257->dreq0_w(0x01);
m_dma8257->hlda_w(1);
m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE);
m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
- //machine().scheduler().abort_timeslice(); // transfer occurs immediately
- //machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); // smooth things out a bit
+ //machine().scheduler().abort_timeslice(); // transfer occurs immediately
+ //machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); // smooth things out a bit
m_av=0;
}
-
- if (state){
- }
}
DECLARE_WRITE_LINE_MEMBER( fastinvaders_state::hsync)
{
//m_hsync=1;
- if (!state){
+ if (!state)
+ {
m_hsync=0;
m_ar=0;
}
-
- if (state){
+ else
+ {
m_hsync=1;
}
}
-
-
READ8_MEMBER(fastinvaders_state::memory_read_byte)
{
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
-logerror("dma read\n");
+ logerror("dma read\n");
//m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE);
//m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
return prog_space.read_byte(offset);
@@ -492,7 +483,7 @@ logerror("dma read\n");
WRITE8_MEMBER(fastinvaders_state::memory_write_byte)
{
//address_space& prog_space = m_maincpu->space(AS_PROGRAM);
-logerror("dma write\n");
+ logerror("dma write\n");
//m_maincpu->set_input_line(I8085_RST75_LINE, ASSERT_LINE);
//m_maincpu->set_input_line(I8085_RST75_LINE, CLEAR_LINE);
//return prog_space.read_byte(offset);
@@ -540,14 +531,12 @@ void fastinvaders_state::fastinvaders_6845_io(address_map &map)
map(0xf0, 0xf0).w(FUNC(fastinvaders_state::io_f0_w)); //ds15 irq6 clear
}
-
void fastinvaders_state::fastinvaders_8275_io(address_map &map)
{
fastinvaders_io_base(map);
map(0x20, 0x21).rw(m_crtc8275, FUNC(i8275_device::read), FUNC(i8275_device::write));
-
-map(0x10, 0x1f).rw(m_dma8257, FUNC(i8257_device::read), FUNC(i8257_device::write));
+ map(0x10, 0x1f).rw(m_dma8257, FUNC(i8257_device::read), FUNC(i8257_device::write));
map(0x30, 0x33).rw(m_pic8259, FUNC(pic8259_device::read), FUNC(pic8259_device::write));
map(0x40, 0x4f).w(FUNC(fastinvaders_state::io_40_w)); //ds4 //latch
//AM_RANGE(0x50, 0x50) AM_READ(io_50_r) //ds5 //latch
@@ -581,9 +570,7 @@ PORT_START("COIN") /* FAKE async input */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in0, 0) // int0, sparo
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,tilt, 0) //INPUT_LINE_NMI tilt
-
PORT_START("IN0")
-
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("1") PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in1, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("2") PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in2, 0)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("3") PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in3, 0)
@@ -591,12 +578,10 @@ PORT_START("COIN") /* FAKE async input */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("5") PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in5, 0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("6") PORT_CHANGED_MEMBER(DEVICE_SELF, fastinvaders_state,in6, 0)
-
PORT_START("IN1") //0x60 io port
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
-
PORT_START("DSW1") //0x60 io port
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
@@ -641,16 +626,17 @@ static GFXDECODE_START( gfx_fastinvaders )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 )
GFXDECODE_END
-MACHINE_CONFIG_START(fastinvaders_state::fastinvaders)
-
+void fastinvaders_state::fastinvaders(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, 6144100/2 ) // 6144100 Xtal /2 internaly
- MCFG_DEVICE_PROGRAM_MAP(fastinvaders_map)
-// MCFG_DEVICE_IO_MAP(fastinvaders_io_map)
-// MCFG_DEVICE_VBLANK_INT_DRIVER("screen", fastinvaders_state, irq0_line_hold)
- MCFG_I8085A_SID(READLINE(*this, fastinvaders_state, sid_read))
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastinvaders_state, scanline_timer, "screen", 0, 1)
+ I8085A(config, m_maincpu, 6144100/2); // 6144100 Xtal /2 internaly
+ m_maincpu->set_addrmap(AS_PROGRAM, &fastinvaders_state::fastinvaders_map);
+// m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_io_map);
+// m_maincpu->set_vblank_int("screen", FUNC(fastinvaders_state::irq0_line_hold));
+ m_maincpu->in_sid_func().set(FUNC(fastinvaders_state::sid_read));
+ m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
+
+ TIMER(config, "scantimer").configure_scanline(FUNC(fastinvaders_state::scanline_timer), "screen", 0, 1);
PIC8259(config, m_pic8259, 0);
m_pic8259->out_int_callback().set_inputline(m_maincpu, 0);
@@ -661,40 +647,39 @@ MACHINE_CONFIG_START(fastinvaders_state::fastinvaders)
m_dma8257->out_dack_cb<1>().set(FUNC(fastinvaders_state::dark_1_clr));
m_dma8257->out_dack_cb<2>().set(FUNC(fastinvaders_state::dark_2_clr));
-
- MCFG_TIMER_DRIVER_ADD_PERIODIC("count_ar", fastinvaders_state, count_ar, attotime::from_hz(11500000/2))
+ TIMER(config, "count_ar").configure_periodic(FUNC(fastinvaders_state::count_ar), attotime::from_hz(11500000/2));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0*16, 40*16-1, 0*14, 19*14-1)
- MCFG_SCREEN_UPDATE_DRIVER(fastinvaders_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(2500));
+ screen.set_size(64*16, 32*16);
+ screen.set_visarea(0*16, 40*16-1, 0*14, 19*14-1);
+ screen.set_screen_update(FUNC(fastinvaders_state::screen_update));
+ screen.set_palette("palette");
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fastinvaders)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_fastinvaders);
+ PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
/* sound hardware */
// TODO
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(fastinvaders_state::fastinvaders_8275)
+void fastinvaders_state::fastinvaders_8275(machine_config &config)
+{
fastinvaders(config);
- MCFG_DEVICE_MODIFY("maincpu" ) // guess
- MCFG_DEVICE_IO_MAP(fastinvaders_8275_io)
+ m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_8275_io);
- MCFG_DEVICE_ADD("8275", I8275, 10000000 ) /* guess */ // does not configure a very useful resolution(!)
- MCFG_I8275_CHARACTER_WIDTH(16)
-// MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(apogee_state, display_pixels)
-// MCFG_I8275_DRQ_CALLBACK(WRITELINE("dma8257",i8257_device, dreq2_w))
-MACHINE_CONFIG_END
+ I8275(config, m_crtc8275, 10000000); /* guess */ // does not configure a very useful resolution(!)
+ m_crtc8275->set_character_width(16);
+// m_crtc8275->set_display_callback(FUNC(apogee_state::display_pixels));
+// m_crtc8275->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
+}
-MACHINE_CONFIG_START(fastinvaders_state::fastinvaders_6845)
+void fastinvaders_state::fastinvaders_6845(machine_config &config)
+{
fastinvaders(config);
- MCFG_DEVICE_MODIFY("maincpu" ) // guess
- MCFG_DEVICE_IO_MAP(fastinvaders_6845_io)
+ m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_6845_io);
MC6845(config, m_crtc6845, 11500000/16); /* confirmed */
m_crtc6845->set_screen("screen");
@@ -702,15 +687,13 @@ MACHINE_CONFIG_START(fastinvaders_state::fastinvaders_6845)
m_crtc6845->set_char_width(16);
m_crtc6845->out_vsync_callback().set(FUNC(fastinvaders_state::vsync));
m_crtc6845->out_hsync_callback().set(FUNC(fastinvaders_state::hsync));
-MACHINE_CONFIG_END
-
-
-
+}
void fastinvaders_state::init_fi6845()
{
const uint8_t *prom = memregion("prom")->base();
- for (int i = 0; i < 256; i++){
+ for (int i = 0; i < 256; i++)
+ {
m_prom[i] = prom[i];
}
m_dma1 = 0;
diff --git a/src/mame/drivers/fp200.cpp b/src/mame/drivers/fp200.cpp
index f82d5d01791..71a4dafe478 100644
--- a/src/mame/drivers/fp200.cpp
+++ b/src/mame/drivers/fp200.cpp
@@ -42,7 +42,7 @@ public:
private:
// devices
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
uint8_t m_io_type;
uint8_t *m_chargen;
uint8_t m_keyb_mux;
@@ -588,37 +588,36 @@ READ_LINE_MEMBER( fp200_state::sid_r )
return (ioport("KEYMOD")->read() >> m_keyb_mux) & 1;
}
-MACHINE_CONFIG_START(fp200_state::fp200)
-
+void fp200_state::fp200(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8085A,MAIN_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(fp200_map)
- MCFG_DEVICE_IO_MAP(fp200_io)
- MCFG_I8085A_SID(READLINE(*this, fp200_state, sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, fp200_state, sod_w))
+ I8085A(config, m_maincpu, MAIN_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &fp200_state::fp200_map);
+ m_maincpu->set_addrmap(AS_IO, &fp200_state::fp200_io);
+ m_maincpu->in_sid_func().set(FUNC(fp200_state::sid_r));
+ m_maincpu->out_sod_func().set(FUNC(fp200_state::sod_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(fp200_state, screen_update)
- MCFG_SCREEN_SIZE(20*8, 8*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 8*8-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_screen_update(FUNC(fp200_state::screen_update));
+ screen.set_size(20*8, 8*8);
+ screen.set_visarea(0*8, 20*8-1, 0*8, 8*8-1);
+ screen.set_palette("palette");
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fp200)
+ GFXDECODE(config, "gfxdecode", "palette", gfx_fp200);
- MCFG_PALETTE_ADD("palette", 2)
- MCFG_PALETTE_INIT_OWNER(fp200_state, fp200)
+ PALETTE(config, "palette", 2).set_init(FUNC(fp200_state::palette_init_fp200));
/* sound hardware */
SPEAKER(config, "mono").front_center();
-MACHINE_CONFIG_END
+}
/***************************************************************************
- Game driver(s)
+ ROM definition(s)
***************************************************************************/
diff --git a/src/mame/drivers/h8.cpp b/src/mame/drivers/h8.cpp
index 188e2a7ebaa..928d9f5a76a 100644
--- a/src/mame/drivers/h8.cpp
+++ b/src/mame/drivers/h8.cpp
@@ -97,7 +97,7 @@ private:
bool m_cassold;
virtual void machine_reset() override;
virtual void machine_start() override { m_digits.resolve(); }
- required_device<cpu_device> m_maincpu;
+ required_device<i8080_cpu_device> m_maincpu;
required_device<i8251_device> m_uart;
required_device<cassette_image_device> m_cass;
required_device<beep_device> m_beep;
@@ -310,21 +310,22 @@ TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_p)
}
}
-MACHINE_CONFIG_START(h8_state::h8)
+void h8_state::h8(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, H8_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(h8_mem)
- MCFG_DEVICE_IO_MAP(h8_io)
- MCFG_I8085A_STATUS(WRITE8(*this, h8_state, h8_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, h8_state, h8_inte_callback))
+ I8080(config, m_maincpu, H8_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &h8_state::h8_mem);
+ m_maincpu->set_addrmap(AS_IO, &h8_state::h8_io);
+ m_maincpu->out_status_func().set(FUNC(h8_state::h8_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(h8_state::h8_inte_callback));
/* video hardware */
config.set_default_layout(layout_h8);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- BEEP(config, "beeper", H8_BEEP_FRQ).add_route(ALL_OUTPUTS, "mono", 1.00);
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ BEEP(config, m_beep, H8_BEEP_FRQ).add_route(ALL_OUTPUTS, "mono", 1.00);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
/* Devices */
I8251(config, m_uart, 0);
@@ -334,14 +335,14 @@ MACHINE_CONFIG_START(h8_state::h8)
cassette_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc));
cassette_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("h8_cass")
+ CASSETTE(config, m_cass);
+ m_cass->set_default_state((cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED));
+ m_cass->set_interface("h8_cass");
- MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_c", h8_state, h8_c, attotime::from_hz(4800))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_p", h8_state, h8_p, attotime::from_hz(40000))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_timer", h8_state, h8_irq_pulse, attotime::from_hz(H8_IRQ_PULSE))
-MACHINE_CONFIG_END
+ TIMER(config, "h8_c").configure_periodic(FUNC(h8_state::h8_c), attotime::from_hz(4800));
+ TIMER(config, "h8_p").configure_periodic(FUNC(h8_state::h8_p), attotime::from_hz(40000));
+ TIMER(config, "h8_timer").configure_periodic(FUNC(h8_state::h8_irq_pulse), attotime::from_hz(H8_IRQ_PULSE));
+}
/* ROM definition */
ROM_START( h8 )
diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp
index 08be0f73741..25167ee3156 100644
--- a/src/mame/drivers/konamim2.cpp
+++ b/src/mame/drivers/konamim2.cpp
@@ -1327,7 +1327,7 @@ void konamim2_state::m2(machine_config &config)
screen.set_screen_update(FUNC(konamim2_state::screen_update_m2));
screen.set_palette("palette");
- PALETTE(config, "palette", 32768).set_init(FUNC(palette_device::palette_init_RRRRRGGGGGBBBBB));
+ PALETTE(config, "palette", 32768).set_init("palette", FUNC(palette_device::palette_init_RRRRRGGGGGBBBBB));
/*cd-rom*/
CDROM(config, "cdrom", 0).set_interface("3do_m2_cdrom");
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index d017de70f9c..701fffaa459 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -1345,21 +1345,21 @@ TIMER_DEVICE_CALLBACK_MEMBER(tandy200_state::tandy200_tp_tick)
m_tp = !m_tp;
}
-MACHINE_CONFIG_START(kc85_state::kc85)
+void kc85_state::kc85(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8085A, XTAL(4'915'200))
- MCFG_DEVICE_PROGRAM_MAP(kc85_mem)
- MCFG_DEVICE_IO_MAP(kc85_io)
- MCFG_I8085A_SID(READLINE(*this, kc85_state,kc85_sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, kc85_state,kc85_sod_w))
+ I8085A(config, m_maincpu, XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &kc85_state::kc85_mem);
+ m_maincpu->set_addrmap(AS_IO, &kc85_state::kc85_io);
+ m_maincpu->in_sid_func().set(FUNC(kc85_state::kc85_sid_r));
+ m_maincpu->out_sod_func().set(FUNC(kc85_state::kc85_sod_w));
/* video hardware */
kc85_video(config);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
@@ -1377,39 +1377,38 @@ MACHINE_CONFIG_START(kc85_state::kc85)
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_uart, FUNC(im6402_device::write_rri));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, kc85_state, write_centronics_busy))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, kc85_state, write_centronics_select))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(kc85_state::write_centronics_busy));
+ m_centronics->select_handler().set(FUNC(kc85_state::write_centronics_select));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED));
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("opt_cartslot", generic_linear_slot, "trsm100_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_opt_cart, generic_linear_slot, "trsm100_cart", "bin,rom");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list", "trsm100")
+ SOFTWARE_LIST(config, "cart_list").set_original("trsm100");
/* internal ram */
RAM(config, m_ram).set_default_size("16K").set_extra_options("32K");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pc8201_state::pc8201)
+void pc8201_state::pc8201(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8085A, XTAL(4'915'200))
- MCFG_DEVICE_PROGRAM_MAP(pc8201_mem)
- MCFG_DEVICE_IO_MAP(pc8201_io)
- MCFG_I8085A_SID(READLINE(*this, kc85_state,kc85_sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, kc85_state,kc85_sod_w))
+ I8085A(config, m_maincpu, XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc8201_state::pc8201_mem);
+ m_maincpu->set_addrmap(AS_IO, &pc8201_state::pc8201_io);
+ m_maincpu->in_sid_func().set(FUNC(kc85_state::kc85_sid_r));
+ m_maincpu->out_sod_func().set(FUNC(kc85_state::kc85_sod_w));
/* video hardware */
kc85_video(config);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
@@ -1427,27 +1426,25 @@ MACHINE_CONFIG_START(pc8201_state::pc8201)
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_uart, FUNC(im6402_device::write_rri));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, kc85_state, write_centronics_busy))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, kc85_state, write_centronics_select))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(kc85_state::write_centronics_busy));
+ m_centronics->select_handler().set(FUNC(kc85_state::write_centronics_select));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED));
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("opt_cartslot", generic_linear_slot, "pc8201_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_opt_cart, generic_linear_slot, "pc8201_cart", "bin,rom");
/* 128KB ROM cassette */
- MCFG_GENERIC_CARTSLOT_ADD("cas_cartslot", generic_linear_slot, "pc8201_cart2")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, "cas_cartslot", generic_linear_slot, "pc8201_cart2", "bin,rom");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list", "pc8201")
+ SOFTWARE_LIST(config, "cart_list").set_original("pc8201");
/* internal ram */
RAM(config, m_ram).set_default_size("16K").set_extra_options("32K,64K,96K");
-MACHINE_CONFIG_END
+}
void pc8201_state::pc8300(machine_config &config)
{
@@ -1455,21 +1452,21 @@ void pc8201_state::pc8300(machine_config &config)
m_ram->set_default_size("32K").set_extra_options("64K,96K");
}
-MACHINE_CONFIG_START(trsm100_state::trsm100)
+void trsm100_state::trsm100(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8085A, XTAL(4'915'200))
- MCFG_DEVICE_PROGRAM_MAP(kc85_mem)
- MCFG_DEVICE_IO_MAP(trsm100_io)
- MCFG_I8085A_SID(READLINE(*this, kc85_state,kc85_sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, kc85_state,kc85_sod_w))
+ I8085A(config, m_maincpu, XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &trsm100_state::kc85_mem);
+ m_maincpu->set_addrmap(AS_IO, &trsm100_state::trsm100_io);
+ m_maincpu->in_sid_func().set(FUNC(kc85_state::kc85_sid_r));
+ m_maincpu->out_sod_func().set(FUNC(kc85_state::kc85_sod_w));
/* video hardware */
kc85_video(config);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
i8155_device &i8155(I8155(config, I8155_TAG, XTAL(4'915'200)/2));
@@ -1487,22 +1484,22 @@ MACHINE_CONFIG_START(trsm100_state::trsm100)
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_uart, FUNC(im6402_device::write_rri));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED));
// MCFG_MC14412_ADD(MC14412_TAG, XTAL(1'000'000))
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("opt_cartslot", generic_linear_slot, "trsm100_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_opt_cart, generic_linear_slot, "trsm100_cart", "bin,rom");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list", "trsm100")
+ SOFTWARE_LIST(config, "cart_list").set_original("trsm100");
/* internal ram */
RAM(config, m_ram).set_default_size("8K").set_extra_options("16K,24K,32K");
-MACHINE_CONFIG_END
+}
void trsm100_state::tandy102(machine_config &config)
{
@@ -1510,24 +1507,26 @@ void trsm100_state::tandy102(machine_config &config)
m_ram->set_default_size("24K").set_extra_options("32K");
}
-MACHINE_CONFIG_START(tandy200_state::tandy200)
+void tandy200_state::tandy200(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8085A, XTAL(4'915'200))
- MCFG_DEVICE_PROGRAM_MAP(tandy200_mem)
- MCFG_DEVICE_IO_MAP(tandy200_io)
- MCFG_I8085A_SID(READLINE(*this, tandy200_state,kc85_sid_r))
- MCFG_I8085A_SOD(WRITELINE(*this, tandy200_state,kc85_sod_w))
+ I8085A(config, m_maincpu, XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tandy200_state::tandy200_mem);
+ m_maincpu->set_addrmap(AS_IO, &tandy200_state::tandy200_io);
+ m_maincpu->in_sid_func().set(FUNC(tandy200_state::kc85_sid_r));
+ m_maincpu->out_sod_func().set(FUNC(tandy200_state::kc85_sod_w));
/* video hardware */
tandy200_video(config);
/* TP timer */
- MCFG_TIMER_DRIVER_ADD_PERIODIC("tp", tandy200_state, tandy200_tp_tick, attotime::from_hz(XTAL(4'915'200)/2/8192))
+ TIMER(config, "tp").configure_periodic(FUNC(tandy200_state::tandy200_tp_tick), attotime::from_hz(XTAL(4'915'200)/2/8192));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker);
+ m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
+
// MCFG_TCM5089_ADD(TCM5089_TAG, XTAL(3'579'545))
/* devices */
@@ -1549,25 +1548,25 @@ MACHINE_CONFIG_START(tandy200_state::tandy200)
rs232.dsr_handler().set(I8251_TAG, FUNC(i8251_device::write_dsr));
// MCFG_MC14412_ADD(MC14412_TAG, XTAL(1'000'000))
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, tandy200_state, write_centronics_busy))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, tandy200_state, write_centronics_select))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(tandy200_state::write_centronics_busy));
+ m_centronics->select_handler().set(FUNC(tandy200_state::write_centronics_select));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED));
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("opt_cartslot", generic_linear_slot, "tandy200_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_opt_cart, generic_linear_slot, "tandy200_cart", "bin,rom");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list", "tandy200")
+ SOFTWARE_LIST(config, "cart_list").set_original("tandy200");
/* internal ram */
RAM(config, m_ram).set_default_size("24K").set_extra_options("48K,72K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/lola8a.cpp b/src/mame/drivers/lola8a.cpp
index 670672bc54d..10c97171fad 100644
--- a/src/mame/drivers/lola8a.cpp
+++ b/src/mame/drivers/lola8a.cpp
@@ -65,7 +65,7 @@ private:
uint8_t m_portb;
virtual void machine_reset() override { m_maincpu->set_pc(0x8000); }
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<cassette_image_device> m_cass;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_p_videoram;
@@ -265,13 +265,14 @@ WRITE_LINE_MEMBER(lola8a_state::crtc_vsync)
m_maincpu->set_input_line(I8085_RST75_LINE, state? ASSERT_LINE : CLEAR_LINE);
}
-MACHINE_CONFIG_START(lola8a_state::lola8a)
+void lola8a_state::lola8a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, XTAL(4'915'200))
- MCFG_DEVICE_PROGRAM_MAP(lola8a_mem)
- MCFG_DEVICE_IO_MAP(lola8a_io)
- MCFG_I8085A_SID(READLINE(*this, lola8a_state, cass_r))
- MCFG_I8085A_SOD(WRITELINE(*this, lola8a_state, cass_w))
+ I8085A(config, m_maincpu, XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &lola8a_state::lola8a_mem);
+ m_maincpu->set_addrmap(AS_IO, &lola8a_state::lola8a_io);
+ m_maincpu->in_sid_func().set(FUNC(lola8a_state::cass_r));
+ m_maincpu->out_sod_func().set(FUNC(lola8a_state::cass_w));
SPEAKER(config, "mono").front_center();
ay8910_device &aysnd(AY8910(config, AY8910_TAG, XTAL(4'915'200) / 4));
@@ -280,12 +281,12 @@ MACHINE_CONFIG_START(lola8a_state::lola8a)
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DEVICE(HD46505SP_TAG, hd6845_device, screen_update)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(HD46505SP_TAG, FUNC(hd6845_device::screen_update));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
hd6845_device &crtc(HD6845(config, HD46505SP_TAG, XTAL(8'000'000) / 8)); // HD6845 == HD46505S
crtc.set_screen("screen");
@@ -294,12 +295,12 @@ MACHINE_CONFIG_START(lola8a_state::lola8a)
crtc.set_update_row_callback(FUNC(lola8a_state::crtc_update_row), this);
crtc.out_vsync_callback().set(FUNC(lola8a_state::crtc_vsync));
- MCFG_PALETTE_ADD_3BIT_BRG("palette")
+ PALETTE(config, m_palette, 8).set_init("palette", FUNC(palette_device::palette_init_3bit_brg));
/* Cassette */
- MCFG_CASSETTE_ADD( "cassette" )
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+ CASSETTE(config, m_cass);
+ WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
/* ROM definition */
ROM_START( lola8a )
diff --git a/src/mame/drivers/mexico86.cpp b/src/mame/drivers/mexico86.cpp
index 6cff9af1f9b..968e2c2313b 100644
--- a/src/mame/drivers/mexico86.cpp
+++ b/src/mame/drivers/mexico86.cpp
@@ -459,7 +459,7 @@ void mexico86_state::mexico86(machine_config &config)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mexico86);
PALETTE(config, m_palette, 256);
m_palette->set_prom_region("proms");
- m_palette->set_init(FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms));
+ m_palette->set_init("palette", FUNC(palette_device::palette_init_RRRRGGGGBBBB_proms));
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index 11be36e599c..2aed1708195 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -457,13 +457,15 @@ void mm1_state::machine_reset()
// MACHINE_CONFIG( mm1 )
//-------------------------------------------------
-MACHINE_CONFIG_START(mm1_state::mm1)
+void mm1_state::mm1(machine_config &config)
+{
// basic system hardware
- MCFG_DEVICE_ADD(I8085A_TAG, I8085A, 6.144_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(mm1_map)
- MCFG_I8085A_SID(READLINE(*this, mm1_state, dsra_r))
- MCFG_I8085A_SOD(WRITELINE(KB_TAG, mm1_keyboard_device, bell_w))
- MCFG_QUANTUM_PERFECT_CPU(I8085A_TAG)
+ I8085A(config, m_maincpu, 6.144_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mm1_state::mm1_map);
+ m_maincpu->in_sid_func().set(FUNC(mm1_state::dsra_r));
+ m_maincpu->out_sod_func().set(KB_TAG, FUNC(mm1_keyboard_device::bell_w));
+
+ config.m_perfect_cpu_quantum = subtag(I8085A_TAG);
// peripheral hardware
I8212(config, m_iop, 0);
@@ -493,10 +495,8 @@ MACHINE_CONFIG_START(mm1_state::mm1)
UPD765A(config, m_fdc, 16_MHz_XTAL/2, true, true);
m_fdc->intrq_wr_callback().set_inputline(m_maincpu, I8085_RST55_LINE);
m_fdc->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq3_w));
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", mm1_floppies, "525qd", mm1_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", mm1_floppies, "525qd", mm1_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
+ FLOPPY_CONNECTOR(config, UPD765_TAG ":0", mm1_floppies, "525qd", mm1_state::floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config, UPD765_TAG ":1", mm1_floppies, "525qd", mm1_state::floppy_formats).enable_sound(true);
UPD7201(config, m_mpsc, 6.144_MHz_XTAL/2);
m_mpsc->out_txda_callback().set(m_rs232a, FUNC(rs232_port_device::write_txd));
@@ -518,8 +518,8 @@ MACHINE_CONFIG_START(mm1_state::mm1)
RAM(config, RAM_TAG).set_default_size("64K");
// software lists
- MCFG_SOFTWARE_LIST_ADD("flop_list", "mm1_flop")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "flop_list").set_original("mm1_flop");
+}
//-------------------------------------------------
diff --git a/src/mame/drivers/mmd1.cpp b/src/mame/drivers/mmd1.cpp
index 730647cd164..a64ef968cf2 100644
--- a/src/mame/drivers/mmd1.cpp
+++ b/src/mame/drivers/mmd1.cpp
@@ -187,7 +187,7 @@ private:
uint8_t m_return_code;
uint8_t m_digit;
virtual void machine_start() override { m_digits.resolve(); }
- required_device<cpu_device> m_maincpu;
+ required_device<i8080_cpu_device> m_maincpu;
output_finder<9> m_digits;
};
@@ -493,25 +493,27 @@ We preset all banks here, so that bankswitching will incur no speed penalty.
membank("bank8")->configure_entry(2, &p_ram[0xd800]);
}
-MACHINE_CONFIG_START(mmd1_state::mmd1)
+void mmd1_state::mmd1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8080, 6750000 / 9)
- MCFG_DEVICE_PROGRAM_MAP(mmd1_mem)
- MCFG_DEVICE_IO_MAP(mmd1_io)
+ I8080(config, m_maincpu, 6750000 / 9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mmd1_state::mmd1_mem);
+ m_maincpu->set_addrmap(AS_IO, &mmd1_state::mmd1_io);
MCFG_MACHINE_RESET_OVERRIDE(mmd1_state,mmd1)
/* video hardware */
config.set_default_layout(layout_mmd1);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mmd1_state::mmd2)
+void mmd1_state::mmd2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8080, 6750000 / 9)
- MCFG_DEVICE_PROGRAM_MAP(mmd2_mem)
- MCFG_DEVICE_IO_MAP(mmd2_io)
- MCFG_I8085A_STATUS(WRITE8(*this, mmd1_state, mmd2_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, mmd1_state, mmd2_inte_callback))
+ I8080(config, m_maincpu, 6750000 / 9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mmd1_state::mmd2_mem);
+ m_maincpu->set_addrmap(AS_IO, &mmd1_state::mmd2_io);
+ m_maincpu->out_status_func().set(FUNC(mmd1_state::mmd2_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(mmd1_state::mmd2_inte_callback));
MCFG_MACHINE_RESET_OVERRIDE(mmd1_state,mmd2)
@@ -525,8 +527,7 @@ MACHINE_CONFIG_START(mmd1_state::mmd2)
kbdc.in_rl_callback().set(FUNC(mmd1_state::mmd2_kbd_r)); // kbd RL lines
kbdc.in_shift_callback().set_constant(1); // Shift key
kbdc.in_ctrl_callback().set_constant(1);
-
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mmd1 )
diff --git a/src/mame/drivers/ms6102.cpp b/src/mame/drivers/ms6102.cpp
index 173205a0dc0..0753718cfea 100644
--- a/src/mame/drivers/ms6102.cpp
+++ b/src/mame/drivers/ms6102.cpp
@@ -304,12 +304,13 @@ void ms6102_state::machine_start()
}
-MACHINE_CONFIG_START(ms6102_state::ms6102)
- MCFG_DEVICE_ADD("maincpu", I8080, XTAL(18'432'000) / 9)
- MCFG_DEVICE_PROGRAM_MAP(ms6102_mem)
- MCFG_DEVICE_IO_MAP(ms6102_io)
- MCFG_I8085A_INTE(WRITELINE("i8214", i8214_device, inte_w))
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(ms6102_state, ms6102_int_ack)
+void ms6102_state::ms6102(machine_config &config)
+{
+ I8080(config, m_maincpu, XTAL(18'432'000) / 9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ms6102_state::ms6102_mem);
+ m_maincpu->set_addrmap(AS_IO, &ms6102_state::ms6102_io);
+ m_maincpu->out_inte_func().set("i8214", FUNC(i8214_device::inte_w));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(ms6102_state::ms6102_int_ack));
I8214(config, m_pic, XTAL(18'432'000) / 9);
m_pic->int_wr_callback().set(FUNC(ms6102_state::irq_w));
@@ -317,28 +318,29 @@ MACHINE_CONFIG_START(ms6102_state::ms6102)
KR1601RR1(config, m_earom, 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DEVICE("i8275_1", i8275_device, screen_update)
- MCFG_SCREEN_RAW_PARAMS(XTAL(16'400'000), 784, 0, 80*8, 375, 0, 25*12)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ms6102)
- MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_screen_update("i8275_1", FUNC(i8275_device::screen_update));
+ m_screen->set_raw(XTAL(16'400'000), 784, 0, 80*8, 375, 0, 25*12);
+
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_ms6102);
+ PALETTE(config, m_palette, 3).set_init("palette", FUNC(palette_device::palette_init_monochrome_highlight));
I8257(config, m_dma8257, XTAL(18'432'000) / 9);
m_dma8257->out_hrq_cb().set(FUNC(ms6102_state::hrq_w));
m_dma8257->in_memr_cb().set(FUNC(ms6102_state::memory_read_byte));
m_dma8257->out_iow_cb<2>().set(FUNC(ms6102_state::vdack_w));
- MCFG_DEVICE_ADD("i8275_1", I8275, XTAL(16'400'000) / 8) // XXX
- MCFG_I8275_CHARACTER_WIDTH(8)
- MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(ms6102_state, display_pixels)
- MCFG_I8275_DRQ_CALLBACK(WRITELINE("dma8257", i8257_device, dreq2_w))
- MCFG_VIDEO_SET_SCREEN("screen")
+ I8275(config, m_crtc1, XTAL(16'400'000) / 8); // XXX
+ m_crtc1->set_character_width(8);
+ m_crtc1->set_display_callback(FUNC(ms6102_state::display_pixels));
+ m_crtc1->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
+ m_crtc1->set_screen(m_screen);
- MCFG_DEVICE_ADD("i8275_2", I8275, XTAL(16'400'000) / 8) // XXX
- MCFG_I8275_CHARACTER_WIDTH(8)
- MCFG_I8275_DRAW_CHARACTER_CALLBACK_OWNER(ms6102_state, display_attr)
- MCFG_I8275_IRQ_CALLBACK(WRITELINE(*this, ms6102_state, irq<5>))
- MCFG_VIDEO_SET_SCREEN("screen")
+ I8275(config, m_crtc2, XTAL(16'400'000) / 8); // XXX
+ m_crtc2->set_character_width(8);
+ m_crtc2->set_display_callback(FUNC(ms6102_state::display_attr));
+ m_crtc2->irq_wr_callback().set(FUNC(ms6102_state::irq<5>));
+ m_crtc2->set_screen(m_screen);
// keyboard
AY31015(config, m_kbd_uart);
@@ -364,7 +366,7 @@ MACHINE_CONFIG_START(ms6102_state::ms6102)
pit8253.out_handler<0>().set(m_i8251, FUNC(i8251_device::write_txc));
pit8253.set_clk<1>(XTAL(16'400'000) / 9);
pit8253.out_handler<1>().set(m_i8251, FUNC(i8251_device::write_rxc));
-MACHINE_CONFIG_END
+}
ROM_START( ms6102 )
ROM_REGION(0x3000, "maincpu", 0)
diff --git a/src/mame/drivers/n8080.cpp b/src/mame/drivers/n8080.cpp
index 6c4cabcbddf..87d2246d0dd 100644
--- a/src/mame/drivers/n8080.cpp
+++ b/src/mame/drivers/n8080.cpp
@@ -13,7 +13,6 @@
***************************************************************************/
#include "emu.h"
-#include "cpu/i8085/i8085.h"
#include "includes/n8080.h"
#define MASTER_CLOCK XTAL(20'160'000)
@@ -503,111 +502,109 @@ MACHINE_RESET_MEMBER(n8080_state,helifire)
}
-MACHINE_CONFIG_START(n8080_state::spacefev)
-
+void n8080_state::spacefev(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, MASTER_CLOCK / 10)
- MCFG_I8085A_STATUS(WRITE8(*this, n8080_state,n8080_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, n8080_state,n8080_inte_callback))
- MCFG_DEVICE_PROGRAM_MAP(main_cpu_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
+ I8080(config, m_maincpu, MASTER_CLOCK / 10);
+ m_maincpu->out_status_func().set(FUNC(n8080_state::n8080_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(n8080_state::n8080_inte_callback));
+ m_maincpu->set_addrmap(AS_PROGRAM, &n8080_state::main_cpu_map);
+ m_maincpu->set_addrmap(AS_IO, &n8080_state::main_io_map);
MCFG_MACHINE_RESET_OVERRIDE(n8080_state,spacefev)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 239)
- MCFG_SCREEN_UPDATE_DRIVER(n8080_state, screen_update_spacefev)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 8)
- MCFG_PALETTE_INIT_OWNER(n8080_state,n8080)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 255, 16, 239);
+ m_screen->set_screen_update(FUNC(n8080_state::screen_update_spacefev));
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette, 8).set_init(FUNC(n8080_state::palette_init_n8080));
+
MCFG_VIDEO_START_OVERRIDE(n8080_state,spacefev)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
+ TIMER(config, "rst1").configure_scanline(FUNC(n8080_state::rst1_tick), "screen", 128, 256);
+ TIMER(config, "rst2").configure_scanline(FUNC(n8080_state::rst2_tick), "screen", 240, 256);
/* sound hardware */
spacefev_sound(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(n8080_state::sheriff)
+void n8080_state::sheriff(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, MASTER_CLOCK / 10)
- MCFG_I8085A_STATUS(WRITE8(*this, n8080_state,n8080_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, n8080_state,n8080_inte_callback))
- MCFG_DEVICE_PROGRAM_MAP(main_cpu_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
+ I8080(config, m_maincpu, MASTER_CLOCK / 10);
+ m_maincpu->out_status_func().set(FUNC(n8080_state::n8080_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(n8080_state::n8080_inte_callback));
+ m_maincpu->set_addrmap(AS_PROGRAM, &n8080_state::main_cpu_map);
+ m_maincpu->set_addrmap(AS_IO, &n8080_state::main_io_map);
MCFG_MACHINE_RESET_OVERRIDE(n8080_state,sheriff)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 239)
- MCFG_SCREEN_UPDATE_DRIVER(n8080_state, screen_update_sheriff)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 8)
- MCFG_PALETTE_INIT_OWNER(n8080_state,n8080)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 255, 16, 239);
+ m_screen->set_screen_update(FUNC(n8080_state::screen_update_sheriff));
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette, 8).set_init(FUNC(n8080_state::palette_init_n8080));
+
MCFG_VIDEO_START_OVERRIDE(n8080_state,sheriff)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
+ TIMER(config, "rst1").configure_scanline(FUNC(n8080_state::rst1_tick), "screen", 128, 256);
+ TIMER(config, "rst2").configure_scanline(FUNC(n8080_state::rst2_tick), "screen", 240, 256);
/* sound hardware */
sheriff_sound(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(n8080_state::westgun2)
+void n8080_state::westgun2(machine_config &config)
+{
sheriff(config);
/* basic machine hardware */
- MCFG_DEVICE_REPLACE("maincpu", I8080, XTAL(19'968'000) / 10)
- MCFG_I8085A_STATUS(WRITE8(*this, n8080_state,n8080_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, n8080_state,n8080_inte_callback))
- MCFG_DEVICE_PROGRAM_MAP(main_cpu_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
-
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(n8080_state::helifire)
+ I8080(config.replace(), m_maincpu, XTAL(19'968'000) / 10);
+ m_maincpu->out_status_func().set(FUNC(n8080_state::n8080_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(n8080_state::n8080_inte_callback));
+ m_maincpu->set_addrmap(AS_PROGRAM, &n8080_state::main_cpu_map);
+ m_maincpu->set_addrmap(AS_IO, &n8080_state::main_io_map);
+}
+void n8080_state::helifire(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, MASTER_CLOCK / 10)
- MCFG_I8085A_STATUS(WRITE8(*this, n8080_state,n8080_status_callback))
- MCFG_I8085A_INTE(WRITELINE(*this, n8080_state,n8080_inte_callback))
- MCFG_DEVICE_PROGRAM_MAP(helifire_main_cpu_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
+ I8080(config, m_maincpu, MASTER_CLOCK / 10);
+ m_maincpu->out_status_func().set(FUNC(n8080_state::n8080_status_callback));
+ m_maincpu->out_inte_func().set(FUNC(n8080_state::n8080_inte_callback));
+ m_maincpu->set_addrmap(AS_PROGRAM, &n8080_state::helifire_main_cpu_map);
+ m_maincpu->set_addrmap(AS_IO, &n8080_state::main_io_map);
MCFG_MACHINE_RESET_OVERRIDE(n8080_state,helifire)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 239)
- MCFG_SCREEN_UPDATE_DRIVER(n8080_state, screen_update_helifire)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, n8080_state, screen_vblank_helifire))
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 8 + 0x400)
- MCFG_PALETTE_INIT_OWNER(n8080_state,helifire)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 255, 16, 239);
+ m_screen->set_screen_update(FUNC(n8080_state::screen_update_helifire));
+ m_screen->screen_vblank().set(FUNC(n8080_state::screen_vblank_helifire));
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette, 8 + 0x400).set_init(FUNC(n8080_state::palette_init_helifire));
+
MCFG_VIDEO_START_OVERRIDE(n8080_state,helifire)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst1", n8080_state, rst1_tick, "screen", 128, 256)
- MCFG_TIMER_DRIVER_ADD_SCANLINE("rst2", n8080_state, rst2_tick, "screen", 240, 256)
+ TIMER(config, "rst1").configure_scanline(FUNC(n8080_state::rst1_tick), "screen", 128, 256);
+ TIMER(config, "rst2").configure_scanline(FUNC(n8080_state::rst2_tick), "screen", 240, 256);
/* sound hardware */
helifire_sound(config);
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp
index 26eb9838464..eb8c8ad9804 100644
--- a/src/mame/drivers/ngen.cpp
+++ b/src/mame/drivers/ngen.cpp
@@ -927,14 +927,15 @@ static void ngen_floppies(device_slot_interface &device)
device.option_add("525qd", FLOPPY_525_QD);
}
-MACHINE_CONFIG_START(ngen_state::ngen)
+void ngen_state::ngen(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", I80186, 16_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(ngen_mem)
- MCFG_DEVICE_IO_MAP(ngen_io)
- MCFG_80186_CHIP_SELECT_CB(WRITE16(*this, ngen_state, cpu_peripheral_cb))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, ngen_state, cpu_timer_w))
- MCFG_80186_IRQ_SLAVE_ACK(READ8(*this, ngen_state, irq_cb))
+ I80186(config, m_maincpu, 16_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ngen_state::ngen_mem);
+ m_maincpu->set_addrmap(AS_IO, &ngen_state::ngen_io);
+ m_maincpu->chip_select_callback().set(FUNC(ngen_state::cpu_peripheral_cb));
+ m_maincpu->tmrout0_handler().set(FUNC(ngen_state::cpu_timer_w));
+ m_maincpu->read_slave_ack_callback().set(FUNC(ngen_state::irq_cb));
PIC8259(config, m_pic, 0);
m_pic->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w));
@@ -989,11 +990,11 @@ MACHINE_CONFIG_START(ngen_state::ngen)
// TODO: SCN2652 MPCC (not implemented), used for RS-422 cluster communications?
// video board
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE(720,348)
- MCFG_SCREEN_VISIBLE_AREA(0,719,0,347)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DEVICE("crtc",mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_size(720, 348);
+ screen.set_visarea(0, 719, 0, 347);
+ screen.set_refresh_hz(60);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
MC6845(config, m_crtc, 19980000 / 9); // divisor unknown -- /9 gives 60Hz output, so likely correct
m_crtc->set_screen("screen");
@@ -1008,8 +1009,7 @@ MACHINE_CONFIG_START(ngen_state::ngen)
rs232_port_device &kbd(RS232_PORT(config, "keyboard", keyboard, "ngen"));
kbd.rxd_handler().set(m_viduart, FUNC(i8251_device::write_rxd));
- MCFG_DEVICE_ADD("refresh_clock", CLOCK, 19200*16) // should be 19530Hz
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, ngen_state,timer_clk_out))
+ CLOCK(config, "refresh_clock", 19200*16).signal_handler().set(FUNC(ngen_state::timer_clk_out)); // should be 19530Hz
// floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
WD2797(config, m_fdc, 20_MHz_XTAL / 20);
@@ -1039,16 +1039,16 @@ MACHINE_CONFIG_START(ngen_state::ngen)
PIT8253(config, m_hdc_timer, 0);
m_hdc_timer->set_clk<2>(20_MHz_XTAL / 10); // 2MHz
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_HARDDISK_ADD("hard0")
-
-MACHINE_CONFIG_END
+ FLOPPY_CONNECTOR(config, "fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats);
+ HARDDISK(config, "hard0", 0);
+}
-MACHINE_CONFIG_START(ngen386_state::ngen386)
- MCFG_DEVICE_ADD("i386cpu", I386, 50_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(ngen386_mem)
- MCFG_DEVICE_IO_MAP(ngen386_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic", pic8259_device, inta_cb)
+void ngen386_state::ngen386(machine_config &config)
+{
+ I386(config, m_i386cpu, 50_MHz_XTAL / 2);
+ m_i386cpu->set_addrmap(AS_PROGRAM, &ngen386_state::ngen386_mem);
+ m_i386cpu->set_addrmap(AS_IO, &ngen386_state::ngen386_io);
+ m_i386cpu->set_irq_acknowledge_callback("pic", FUNC(pic8259_device::inta_cb));
PIC8259(config, m_pic, 0);
m_pic->out_int_callback().set_inputline(m_i386cpu, 0);
@@ -1103,11 +1103,11 @@ MACHINE_CONFIG_START(ngen386_state::ngen386)
// TODO: SCN2652 MPCC (not implemented), used for RS-422 cluster communications?
// video board
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE(720,348)
- MCFG_SCREEN_VISIBLE_AREA(0,719,0,347)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DEVICE("crtc",mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_size(720, 348);
+ screen.set_visarea(0, 719, 0, 347);
+ screen.set_refresh_hz(60);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
MC6845(config, m_crtc, 19980000 / 9); // divisor unknown -- /9 gives 60Hz output, so likely correct
m_crtc->set_screen("screen");
@@ -1122,8 +1122,7 @@ MACHINE_CONFIG_START(ngen386_state::ngen386)
rs232_port_device &kbd(RS232_PORT(config, "keyboard", keyboard, "ngen"));
kbd.rxd_handler().set(m_viduart, FUNC(i8251_device::write_rxd));
- MCFG_DEVICE_ADD("refresh_clock", CLOCK, 19200*16) // should be 19530Hz
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, ngen386_state,timer_clk_out))
+ CLOCK(config, "refresh_clock", 19200*16).signal_handler().set(FUNC(ngen386_state::timer_clk_out)); // should be 19530Hz
// floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
WD2797(config, m_fdc, 20_MHz_XTAL / 20);
@@ -1153,15 +1152,15 @@ MACHINE_CONFIG_START(ngen386_state::ngen386)
PIT8253(config, m_hdc_timer, 0);
m_hdc_timer->set_clk<2>(20_MHz_XTAL / 10); // 2MHz
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_HARDDISK_ADD("hard0")
-MACHINE_CONFIG_END
+ FLOPPY_CONNECTOR(config, "fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats);
+ HARDDISK(config, "hard0", 0);
+}
-MACHINE_CONFIG_START(ngen386_state::_386i)
+void ngen386_state::_386i(machine_config &config)
+{
ngen386(config);
- MCFG_DEVICE_MODIFY("i386cpu")
- MCFG_DEVICE_PROGRAM_MAP(ngen386i_mem)
-MACHINE_CONFIG_END
+ m_i386cpu->set_addrmap(AS_PROGRAM, &ngen386_state::ngen386i_mem);
+}
ROM_START( ngen )
ROM_REGION( 0x2000, "bios", 0)
diff --git a/src/mame/drivers/olyboss.cpp b/src/mame/drivers/olyboss.cpp
index 65229b9fcb4..fa4083ba1bb 100644
--- a/src/mame/drivers/olyboss.cpp
+++ b/src/mame/drivers/olyboss.cpp
@@ -430,19 +430,21 @@ static void bosscd_floppies(device_slot_interface &device)
// MACHINE CONFIGURATION
//**************************************************************************
-MACHINE_CONFIG_START( olyboss_state::olybossd )
- MCFG_DEVICE_ADD("maincpu", Z80, 4_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(olyboss_mem)
- MCFG_DEVICE_IO_MAP(olyboss_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("uic", am9519_device, iack_cb)
+void olyboss_state::olybossd(machine_config &config)
+{
+ Z80(config, m_maincpu, 4_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &olyboss_state::olyboss_mem);
+ m_maincpu->set_addrmap(AS_IO, &olyboss_state::olyboss_io);
+ m_maincpu->set_irq_acknowledge_callback("uic", FUNC(am9519_device::iack_cb));
/* video hardware */
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DEVICE(UPD3301_TAG, upd3301_device, screen_update)
- MCFG_SCREEN_SIZE(80*8, 28*11)
- MCFG_SCREEN_VISIBLE_AREA(0, (80*8)-1, 0, (28*11)-1)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(60);
+ screen.set_screen_update(UPD3301_TAG, FUNC(upd3301_device::screen_update));
+ screen.set_size(80*8, 28*11);
+ screen.set_visarea(0, (80*8)-1, 0, (28*11)-1);
/* devices */
@@ -478,37 +480,37 @@ MACHINE_CONFIG_START( olyboss_state::olybossd )
/* keyboard */
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(olyboss_state::keyboard_put));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START( olyboss_state::olybossb )
+void olyboss_state::olybossb(machine_config &config)
+{
olybossd(config);
- MCFG_DEVICE_REMOVE("fdc:0")
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START( olyboss_state::olybossc )
+ config.device_remove("fdc:0");
+ FLOPPY_CONNECTOR(config, "fdc:0", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config, "fdc:1", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+}
+
+void olyboss_state::olybossc(machine_config &config)
+{
olybossd(config);
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", bosscd_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
-MACHINE_CONFIG_END
+ FLOPPY_CONNECTOR(config, "fdc:1", bosscd_floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
+}
-MACHINE_CONFIG_START( olyboss_state::bossb85 )
- MCFG_DEVICE_ADD("maincpu", I8085A, 4_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(olyboss_mem)
- MCFG_DEVICE_IO_MAP(olyboss85_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(olyboss_state, irq_cb)
- MCFG_I8085A_SOD(WRITELINE(*this, olyboss_state, romdis_w))
+void olyboss_state::bossb85(machine_config &config)
+{
+ i8085a_cpu_device &maincpu(I8085A(config, m_maincpu, 4_MHz_XTAL));
+ maincpu.set_addrmap(AS_PROGRAM, &olyboss_state::olyboss_mem);
+ maincpu.set_addrmap(AS_IO, &olyboss_state::olyboss85_io);
+ maincpu.set_irq_acknowledge_callback(FUNC(olyboss_state::irq_cb));
+ maincpu.out_sod_func().set(FUNC(olyboss_state::romdis_w));
/* video hardware */
-
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_UPDATE_DEVICE(UPD3301_TAG, upd3301_device, screen_update)
- MCFG_SCREEN_SIZE(80*8, 28*11)
- MCFG_SCREEN_VISIBLE_AREA(0, (80*8)-1, 0, (28*11)-1)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(60);
+ screen.set_screen_update(UPD3301_TAG, FUNC(upd3301_device::screen_update));
+ screen.set_size(80*8, 28*11);
+ screen.set_visarea(0, (80*8)-1, 0, (28*11)-1);
/* devices */
@@ -518,10 +520,8 @@ MACHINE_CONFIG_START( olyboss_state::bossb85 )
UPD765A(config, m_fdc, 8'000'000, true, true);
m_fdc->intrq_wr_callback().set_inputline(m_maincpu, I8085_RST65_LINE);
m_fdc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq0_w));
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
+ FLOPPY_CONNECTOR(config, "fdc:0", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config, "fdc:1", bossb_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
I8257(config, m_dma, XTAL(4'000'000));
m_dma->out_hrq_cb().set(FUNC(olyboss_state::hrq_w));
@@ -532,27 +532,24 @@ MACHINE_CONFIG_START( olyboss_state::bossb85 )
m_dma->out_iow_cb<2>().set(FUNC(olyboss_state::crtcdma_w));
m_dma->out_tc_cb().set(FUNC(olyboss_state::tc_w));
- MCFG_DEVICE_ADD(UPD3301_TAG, UPD3301, XTAL(14'318'181))
- MCFG_UPD3301_CHARACTER_WIDTH(8)
- MCFG_UPD3301_DRAW_CHARACTER_CALLBACK_OWNER(olyboss_state, olyboss_display_pixels)
- MCFG_UPD3301_DRQ_CALLBACK(WRITELINE(m_dma, i8257_device, dreq2_w))
- MCFG_UPD3301_INT_CALLBACK(INPUTLINE("maincpu", I8085_RST75_LINE))
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
+ UPD3301(config, m_crtc, XTAL(14'318'181));
+ m_crtc->set_character_width(8);
+ m_crtc->set_display_callback(FUNC(olyboss_state::olyboss_display_pixels));
+ m_crtc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w));
+ m_crtc->int_wr_callback().set_inputline("maincpu", I8085_RST75_LINE);
+ m_crtc->set_screen(SCREEN_TAG);
/* keyboard */
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(olyboss_state::keyboard85_put));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START( olyboss_state::bossa85 )
+void olyboss_state::bossa85(machine_config &config)
+{
bossb85(config);
- MCFG_DEVICE_REMOVE("fdc:0")
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", bossa_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_DEVICE_REMOVE("fdc:1")
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", bossa_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
-MACHINE_CONFIG_END
+ FLOPPY_CONNECTOR(config.replace(), "fdc:0", bossa_floppies, "525ssdd", floppy_image_device::default_floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config.replace(), "fdc:1", bossa_floppies, "525ssdd", floppy_image_device::default_floppy_formats).enable_sound(true);
+}
//**************************************************************************
// ROM DEFINITIONS
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index a2fa19bd268..5f6c1b72cd1 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -2214,7 +2214,8 @@ void pc9801_state::pc9801_keyboard(machine_config &config)
m_keyb->irq_wr_callback().set(m_pic1, FUNC(pic8259_device::ir1_w));
}
-MACHINE_CONFIG_START(pc9801_state::pc9801_mouse)
+void pc9801_state::pc9801_mouse(machine_config &config)
+{
i8255_device &ppi_mouse(I8255(config, "ppi8255_mouse"));
ppi_mouse.in_pa_callback().set(FUNC(pc9801_state::ppi_mouse_porta_r));
ppi_mouse.out_pa_callback().set(FUNC(pc9801_state::ppi_mouse_porta_w));
@@ -2223,64 +2224,58 @@ MACHINE_CONFIG_START(pc9801_state::pc9801_mouse)
ppi_mouse.in_pc_callback().set_ioport("DSW4");
ppi_mouse.out_pc_callback().set(FUNC(pc9801_state::ppi_mouse_portc_w));
- MCFG_TIMER_DRIVER_ADD_PERIODIC("mouse_timer", pc9801_state, mouse_irq_cb, attotime::from_hz(120))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(pc9801_state::pc9801_cbus)
- MCFG_PC9801CBUS_SLOT_ADD("cbus0", pc9801_cbus_devices, "pc9801_26")
- MCFG_PC9801CBUS_CPU("maincpu")
- MCFG_PC9801CBUS_INT0_CALLBACK(WRITELINE("ir3", input_merger_device, in_w<0>))
- MCFG_PC9801CBUS_INT1_CALLBACK(WRITELINE("ir5", input_merger_device, in_w<0>))
- MCFG_PC9801CBUS_INT2_CALLBACK(WRITELINE("ir6", input_merger_device, in_w<0>))
- MCFG_PC9801CBUS_INT3_CALLBACK(WRITELINE("ir9", input_merger_device, in_w<0>))
- MCFG_PC9801CBUS_INT4_CALLBACK(WRITELINE("pic8259_slave", pic8259_device, ir2_w))
- MCFG_PC9801CBUS_INT5_CALLBACK(WRITELINE("ir12", input_merger_device, in_w<0>))
- MCFG_PC9801CBUS_INT6_CALLBACK(WRITELINE("ir13", input_merger_device, in_w<0>))
-
- MCFG_PC9801CBUS_SLOT_ADD("cbus1", pc9801_cbus_devices, nullptr)
- MCFG_PC9801CBUS_CPU("maincpu")
- MCFG_PC9801CBUS_INT0_CALLBACK(WRITELINE("ir3", input_merger_device, in_w<1>))
- MCFG_PC9801CBUS_INT1_CALLBACK(WRITELINE("ir5", input_merger_device, in_w<1>))
- MCFG_PC9801CBUS_INT2_CALLBACK(WRITELINE("ir6", input_merger_device, in_w<1>))
- MCFG_PC9801CBUS_INT3_CALLBACK(WRITELINE("ir9", input_merger_device, in_w<1>))
- MCFG_PC9801CBUS_INT4_CALLBACK(WRITELINE("pic8259_slave", pic8259_device, ir3_w))
- MCFG_PC9801CBUS_INT5_CALLBACK(WRITELINE("ir12", input_merger_device, in_w<1>))
- MCFG_PC9801CBUS_INT6_CALLBACK(WRITELINE("ir13", input_merger_device, in_w<1>))
+ TIMER(config, "mouse_timer").configure_periodic(FUNC(pc9801_state::mouse_irq_cb), attotime::from_hz(120));
+}
+
+void pc9801_state::pc9801_cbus(machine_config &config)
+{
+ pc9801_slot_device &cbus0(PC9801CBUS_SLOT(config, "cbus0", m_maincpu, pc9801_cbus_devices, "pc9801_26"));
+ cbus0.int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<0>));
+ cbus0.int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<0>));
+ cbus0.int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<0>));
+ cbus0.int_cb<3>().set("ir9", FUNC(input_merger_device::in_w<0>));
+ cbus0.int_cb<4>().set("pic8259_slave", FUNC(pic8259_device::ir2_w));
+ cbus0.int_cb<5>().set("ir12", FUNC(input_merger_device::in_w<0>));
+ cbus0.int_cb<6>().set("ir13", FUNC(input_merger_device::in_w<0>));
+
+ pc9801_slot_device &cbus1(PC9801CBUS_SLOT(config, "cbus1", m_maincpu, pc9801_cbus_devices, nullptr));
+ cbus1.int_cb<0>().set("ir3", FUNC(input_merger_device::in_w<1>));
+ cbus1.int_cb<1>().set("ir5", FUNC(input_merger_device::in_w<1>));
+ cbus1.int_cb<2>().set("ir6", FUNC(input_merger_device::in_w<1>));
+ cbus1.int_cb<3>().set("ir9", FUNC(input_merger_device::in_w<1>));
+ cbus1.int_cb<4>().set("pic8259_slave", FUNC(pic8259_device::ir3_w));
+ cbus1.int_cb<5>().set("ir12", FUNC(input_merger_device::in_w<1>));
+ cbus1.int_cb<6>().set("ir13", FUNC(input_merger_device::in_w<1>));
// TODO: six max slots
- MCFG_INPUT_MERGER_ANY_HIGH("ir3")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_master", pic8259_device, ir3_w))
- MCFG_INPUT_MERGER_ANY_HIGH("ir5")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_master", pic8259_device, ir5_w))
- MCFG_INPUT_MERGER_ANY_HIGH("ir6")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_master", pic8259_device, ir6_w))
- MCFG_INPUT_MERGER_ANY_HIGH("ir9")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_slave", pic8259_device, ir1_w))
- MCFG_INPUT_MERGER_ANY_HIGH("ir12")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_slave", pic8259_device, ir4_w))
- MCFG_INPUT_MERGER_ANY_HIGH("ir13")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_slave", pic8259_device, ir5_w))
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(pc9801_state::pc9801_sasi)
- MCFG_DEVICE_ADD(SASIBUS_TAG, SCSI_PORT, 0)
- MCFG_SCSI_DATA_INPUT_BUFFER("sasi_data_in")
- MCFG_SCSI_IO_HANDLER(WRITELINE(*this, pc9801_state, write_sasi_io)) // bit2
- MCFG_SCSI_CD_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit3))
- MCFG_SCSI_MSG_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit4))
- MCFG_SCSI_BSY_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit5))
- MCFG_SCSI_ACK_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit6))
- MCFG_SCSI_REQ_HANDLER(WRITELINE(*this, pc9801_state, write_sasi_req))
-
- MCFG_SCSIDEV_ADD(SASIBUS_TAG ":" SCSI_PORT_DEVICE1, "harddisk", PC9801_SASI, SCSI_ID_0)
-
- MCFG_SCSI_OUTPUT_LATCH_ADD("sasi_data_out", SASIBUS_TAG)
- MCFG_DEVICE_ADD("sasi_data_in", INPUT_BUFFER, 0)
- MCFG_DEVICE_ADD("sasi_ctrl_in", INPUT_BUFFER, 0)
+ INPUT_MERGER_ANY_HIGH(config, "ir3").output_handler().set("pic8259_master", FUNC(pic8259_device::ir3_w));
+ INPUT_MERGER_ANY_HIGH(config, "ir5").output_handler().set("pic8259_master", FUNC(pic8259_device::ir5_w));
+ INPUT_MERGER_ANY_HIGH(config, "ir6").output_handler().set("pic8259_master", FUNC(pic8259_device::ir6_w));
+ INPUT_MERGER_ANY_HIGH(config, "ir9").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir1_w));
+ INPUT_MERGER_ANY_HIGH(config, "ir12").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir4_w));
+ INPUT_MERGER_ANY_HIGH(config, "ir13").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir5_w));
+}
+
+void pc9801_state::pc9801_sasi(machine_config &config)
+{
+ SCSI_PORT(config, m_sasibus, 0);
+ m_sasibus->set_data_input_buffer("sasi_data_in");
+ m_sasibus->io_handler().set(FUNC(pc9801_state::write_sasi_io)); // bit2
+ m_sasibus->cd_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit3));
+ m_sasibus->msg_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit4));
+ m_sasibus->bsy_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit5));
+ m_sasibus->ack_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit6));
+ m_sasibus->req_handler().set(FUNC(pc9801_state::write_sasi_req));
+ m_sasibus->set_slot_device(1, "harddisk", PC9801_SASI, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0));
+
+ output_latch_device &sasi_out(OUTPUT_LATCH(config, "sasi_data_out"));
+ m_sasibus->set_output_latch(sasi_out);
+ INPUT_BUFFER(config, "sasi_data_in");
+ INPUT_BUFFER(config, "sasi_ctrl_in");
m_dmac->in_ior_callback<0>().set(FUNC(pc9801_state::sasi_data_r));
m_dmac->out_iow_callback<0>().set(FUNC(pc9801_state::sasi_data_w));
-MACHINE_CONFIG_END
+}
void pc9801_state::cdrom_headphones(device_t *device)
{
@@ -2289,23 +2284,23 @@ void pc9801_state::cdrom_headphones(device_t *device)
MCFG_SOUND_ROUTE(1, "^^rheadphone", 1.0)
}
-MACHINE_CONFIG_START(pc9801_state::pc9801_ide)
+void pc9801_state::pc9801_ide(machine_config &config)
+{
SPEAKER(config, "lheadphone").front_left();
SPEAKER(config, "rheadphone").front_right();
ATA_INTERFACE(config, m_ide[0]).options(ata_devices, "hdd", nullptr, false);
m_ide[0]->irq_handler().set("ideirq", FUNC(input_merger_device::in_w<0>));
ATA_INTERFACE(config, m_ide[1]).options(pc9801_atapi_devices, "pc9801_cd", nullptr, false);
m_ide[1]->irq_handler().set("ideirq", FUNC(input_merger_device::in_w<1>));
- MCFG_DEVICE_MODIFY("ide2:0")
- MCFG_SLOT_OPTION_MACHINE_CONFIG("pc9801_cd", cdrom_headphones)
+ m_ide[1]->slot(0).set_option_machine_config("pc9801_cd", cdrom_headphones);
- MCFG_INPUT_MERGER_ANY_HIGH("ideirq")
- MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("pic8259_slave", pic8259_device, ir1_w))
+ INPUT_MERGER_ANY_HIGH(config, "ideirq").output_handler().set("pic8259_slave", FUNC(pic8259_device::ir1_w));
- MCFG_SOFTWARE_LIST_ADD("cd_list","pc98_cd")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "cd_list").set_original("pc98_cd");
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801_common)
+void pc9801_state::pc9801_common(machine_config &config)
+{
PIT8253(config, m_pit8253, 0);
m_pit8253->set_clk<0>(MAIN_CLOCK_X1); // heartbeat IRQ
m_pit8253->out_handler<0>().set(m_pic1, FUNC(pic8259_device::ir0_w));
@@ -2363,13 +2358,13 @@ MACHINE_CONFIG_START(pc9801_state::pc9801_common)
ppi_fdd.in_pc_callback().set_constant(0xff);
//ppi_fdd.out_pc_callback().set(FUNC(pc9801_state::ppi_fdd_portc_w));
- MCFG_SOFTWARE_LIST_ADD("disk_list","pc98")
+ SOFTWARE_LIST(config, "disk_list").set_original("pc98");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(21.0526_MHz_XTAL, 848, 0, 640, 440, 0, 400)
- MCFG_SCREEN_UPDATE_DRIVER(pc9801_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pc9801_state, vrtc_irq))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(21.0526_MHz_XTAL, 848, 0, 640, 440, 0, 400);
+ m_screen->set_screen_update(FUNC(pc9801_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(pc9801_state::vrtc_irq));
UPD7220(config, m_hgdc1, 21.0526_MHz_XTAL / 8);
m_hgdc1->set_addrmap(0, &pc9801_state::upd7220_1_map);
@@ -2382,21 +2377,21 @@ MACHINE_CONFIG_START(pc9801_state::pc9801_common)
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 2400)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.15)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pc9801)
-MACHINE_CONFIG_END
+ BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.15);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_pc9801);
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801)
- MCFG_DEVICE_ADD("maincpu", I8086, 5000000) //unknown clock
- MCFG_DEVICE_PROGRAM_MAP(pc9801_map)
- MCFG_DEVICE_IO_MAP(pc9801_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+void pc9801_state::pc9801(machine_config &config)
+{
+ I8086(config, m_maincpu, 5000000); //unknown clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9801_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9801_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
pc9801_common(config);
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801f)
- MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801f)
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9801f)
+ MCFG_MACHINE_RESET_OVERRIDE(pc9801_state, pc9801f)
// TODO: maybe force dips to avoid beep error
RAM(config, m_ram).set_default_size("640K").set_extra_options("128K,256K,384K,512K");
@@ -2413,111 +2408,111 @@ MACHINE_CONFIG_START(pc9801_state::pc9801)
m_dmac->in_ior_callback<3>().set(m_fdc_2dd, FUNC(upd765a_device::mdma_r));
m_dmac->out_iow_callback<3>().set(m_fdc_2dd, FUNC(upd765a_device::mdma_w));
- MCFG_PALETTE_ADD("palette", 16)
- MCFG_PALETTE_INIT_OWNER(pc9801_state,pc9801)
-MACHINE_CONFIG_END
+ PALETTE(config, m_palette, 16).set_init(FUNC(pc9801_state::palette_init_pc9801));
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801rs)
- MCFG_DEVICE_ADD("maincpu", I386SX, MAIN_CLOCK_X1*8) // unknown clock.
- MCFG_DEVICE_PROGRAM_MAP(pc9801rs_map)
- MCFG_DEVICE_IO_MAP(pc9801rs_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+void pc9801_state::pc9801rs(machine_config &config)
+{
+ I386SX(config, m_maincpu, MAIN_CLOCK_X1*8); // unknown clock.
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9801rs_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9801rs_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
pc9801_common(config);
ADDRESS_MAP_BANK(config, "ipl_bank").set_map(&pc9801_state::ipl_bank).set_options(ENDIANNESS_LITTLE, 16, 18, 0x18000);
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801rs)
- MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801rs)
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9801rs)
+ MCFG_MACHINE_RESET_OVERRIDE(pc9801_state, pc9801rs)
- MCFG_DEVICE_MODIFY("i8237")
- MCFG_DEVICE_CLOCK(MAIN_CLOCK_X1*8); // unknown clock
+ m_dmac->set_clock(MAIN_CLOCK_X1*8); // unknown clock
pc9801_ide(config);
UPD4990A(config, m_rtc);
RAM(config, m_ram).set_default_size("1664K").set_extra_options("640K,3712K,7808K,14M");
- MCFG_DEVICE_MODIFY("upd7220_btm")
- MCFG_DEVICE_ADDRESS_MAP(0, upd7220_grcg_2_map)
+ m_hgdc2->set_addrmap(0, &pc9801_state::upd7220_grcg_2_map);
- MCFG_PALETTE_ADD("palette", 16+16)
- MCFG_PALETTE_INIT_OWNER(pc9801_state,pc9801)
-MACHINE_CONFIG_END
+ PALETTE(config, m_palette, 16+16).set_init(FUNC(pc9801_state::palette_init_pc9801));
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801vm)
+void pc9801_state::pc9801vm(machine_config &config)
+{
pc9801rs(config);
- MCFG_DEVICE_REPLACE("maincpu",V30,10000000)
- MCFG_DEVICE_PROGRAM_MAP(pc9801ux_map)
- MCFG_DEVICE_IO_MAP(pc9801ux_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ V30(config.replace(), m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9801ux_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9801ux_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_ram->set_default_size("640K").set_extra_options("640K"); // ???
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801rs)
- MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9801_common)
-MACHINE_CONFIG_END
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9801rs)
+ MCFG_MACHINE_RESET_OVERRIDE(pc9801_state, pc9801_common)
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801ux)
+void pc9801_state::pc9801ux(machine_config &config)
+{
pc9801rs(config);
- MCFG_DEVICE_REPLACE("maincpu",I80286,10000000)
- MCFG_DEVICE_PROGRAM_MAP(pc9801ux_map)
- MCFG_DEVICE_IO_MAP(pc9801ux_io)
- MCFG_80286_A20(pc9801_state, a20_286)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ i80286_cpu_device &maincpu(I80286(config.replace(), m_maincpu, 10000000));
+ maincpu.set_addrmap(AS_PROGRAM, &pc9801_state::pc9801ux_map);
+ maincpu.set_addrmap(AS_IO, &pc9801_state::pc9801ux_io);
+ maincpu.set_a20_callback(FUNC(pc9801_state::a20_286));
+ maincpu.set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
// MCFG_DEVICE_MODIFY("i8237", AM9157A, 10000000) // unknown clock
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pc9801_state::pc9801bx2)
+void pc9801_state::pc9801bx2(machine_config &config)
+{
pc9801rs(config);
- MCFG_DEVICE_REPLACE("maincpu",I486,25000000)
- MCFG_DEVICE_PROGRAM_MAP(pc9821_map)
- MCFG_DEVICE_IO_MAP(pc9821_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I486(config.replace(), m_maincpu, 25000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9801bx2)
-MACHINE_CONFIG_END
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9801bx2)
+}
-MACHINE_CONFIG_START(pc9801_state::pc9821)
+void pc9801_state::pc9821(machine_config &config)
+{
pc9801rs(config);
- MCFG_DEVICE_REPLACE("maincpu", I486, 16000000) // unknown clock
- MCFG_DEVICE_PROGRAM_MAP(pc9821_map)
- MCFG_DEVICE_IO_MAP(pc9821_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I486(config.replace(), m_maincpu, 16000000); // unknown clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
m_pit8253->set_clk<0>(MAIN_CLOCK_X2);
m_pit8253->set_clk<1>(MAIN_CLOCK_X2);
m_pit8253->set_clk<2>(MAIN_CLOCK_X2);
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9821)
- MCFG_MACHINE_RESET_OVERRIDE(pc9801_state,pc9821)
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9821)
+ MCFG_MACHINE_RESET_OVERRIDE(pc9801_state, pc9821)
- MCFG_DEVICE_MODIFY("i8237")
- MCFG_DEVICE_CLOCK(16000000); // unknown clock
+ m_dmac->set_clock(16000000); // unknown clock
- MCFG_DEVICE_REMOVE("palette")
- MCFG_PALETTE_ADD("palette", 16+16+256)
- MCFG_PALETTE_INIT_OWNER(pc9801_state,pc9801)
-MACHINE_CONFIG_END
+ PALETTE(config.replace(), m_palette, 16+16+256).set_init(FUNC(pc9801_state::palette_init_pc9801));
+}
-MACHINE_CONFIG_START(pc9801_state::pc9821ap2)
+void pc9801_state::pc9821ap2(machine_config &config)
+{
pc9821(config);
- MCFG_DEVICE_REPLACE("maincpu", I486, 66666667) // unknown clock
- MCFG_DEVICE_PROGRAM_MAP(pc9821_map)
- MCFG_DEVICE_IO_MAP(pc9821_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
+ I486(config.replace(), m_maincpu, 66666667); // unknown clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
- MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9821ap2)
-MACHINE_CONFIG_END
+ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9821ap2)
+}
-MACHINE_CONFIG_START(pc9801_state::pc9821v20)
+void pc9801_state::pc9821v20(machine_config &config)
+{
pc9821(config);
- MCFG_DEVICE_REPLACE("maincpu",PENTIUM,32000000) /* TODO: clock */
- MCFG_DEVICE_PROGRAM_MAP(pc9821_map)
- MCFG_DEVICE_IO_MAP(pc9821_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
-MACHINE_CONFIG_END
+ PENTIUM(config.replace(), m_maincpu, 32000000); /* TODO: clock */
+ m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map);
+ m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
+}
/* took from "raw" memory dump, uncomment ROM_FILL if you want to play with it */
#define LOAD_IDE_ROM \
diff --git a/src/mame/drivers/pcd.cpp b/src/mame/drivers/pcd.cpp
index c95dc57f70a..65c8328b54a 100644
--- a/src/mame/drivers/pcd.cpp
+++ b/src/mame/drivers/pcd.cpp
@@ -500,14 +500,15 @@ static INPUT_PORTS_START(pcx)
PORT_CONFSETTING(0x02, "SINIX 1.2")
INPUT_PORTS_END
-MACHINE_CONFIG_START(pcd_state::pcd)
- MCFG_DEVICE_ADD("maincpu", I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(pcd_map)
- MCFG_DEVICE_IO_MAP(pcd_io)
- MCFG_80186_TMROUT1_HANDLER(WRITELINE(*this, pcd_state, i186_timer1_w))
- MCFG_80186_IRQ_SLAVE_ACK(READ8(*this, pcd_state, irq_callback))
+void pcd_state::pcd(machine_config &config)
+{
+ I80186(config, m_maincpu, 16_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &pcd_state::pcd_map);
+ m_maincpu->set_addrmap(AS_IO, &pcd_state::pcd_io);
+ m_maincpu->tmrout1_handler().set(FUNC(pcd_state::i186_timer1_w));
+ m_maincpu->read_slave_ack_callback().set(FUNC(pcd_state::irq_callback));
- MCFG_TIMER_DRIVER_ADD_PERIODIC("timer0_tick", pcd_state, timer0_tick, attotime::from_hz(16_MHz_XTAL / 24)) // adjusted to pass post
+ TIMER(config, "timer0_tick").configure_periodic(FUNC(pcd_state::timer0_tick), attotime::from_hz(16_MHz_XTAL / 24)); // adjusted to pass post
PIC8259(config, m_pic1, 0);
m_pic1->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w));
@@ -529,8 +530,8 @@ MACHINE_CONFIG_START(pcd_state::pcd)
m_fdc->enmf_rd_callback().set_constant(0);
// floppy drives
- MCFG_FLOPPY_DRIVE_ADD("fdc:0", pcd_floppies, "55f", pcd_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", pcd_floppies, "55f", pcd_state::floppy_formats)
+ FLOPPY_CONNECTOR(config, "fdc:0", pcd_floppies, "55f", pcd_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, "fdc:1", pcd_floppies, "55f", pcd_state::floppy_formats);
// usart
MC2661(config, m_usart[0], 4.9152_MHz_XTAL);
@@ -555,8 +556,7 @@ MACHINE_CONFIG_START(pcd_state::pcd)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
// rtc
MC146818(config, m_rtc, 32.768_kHz_XTAL);
@@ -569,23 +569,25 @@ MACHINE_CONFIG_START(pcd_state::pcd)
pcd_keyboard_device &keyboard(PCD_KEYBOARD(config, "keyboard", 0));
keyboard.out_tx_handler().set(m_usart[1], FUNC(mc2661_device::rx_w));
- MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
- MCFG_SCSI_DATA_INPUT_BUFFER("scsi_data_in")
- MCFG_SCSI_MSG_HANDLER(WRITELINE(*this, pcd_state, write_scsi_msg))
- MCFG_SCSI_BSY_HANDLER(WRITELINE(*this, pcd_state, write_scsi_bsy))
- MCFG_SCSI_IO_HANDLER(WRITELINE(*this, pcd_state, write_scsi_io))
- MCFG_SCSI_CD_HANDLER(WRITELINE(*this, pcd_state, write_scsi_cd))
- MCFG_SCSI_REQ_HANDLER(WRITELINE(*this, pcd_state, write_scsi_req))
+ SCSI_PORT(config, m_scsi, 0);
+ m_scsi->set_data_input_buffer("scsi_data_in");
+ m_scsi->msg_handler().set(FUNC(pcd_state::write_scsi_msg));
+ m_scsi->bsy_handler().set(FUNC(pcd_state::write_scsi_bsy));
+ m_scsi->io_handler().set(FUNC(pcd_state::write_scsi_io));
+ m_scsi->cd_handler().set(FUNC(pcd_state::write_scsi_cd));
+ m_scsi->req_handler().set(FUNC(pcd_state::write_scsi_req));
+
+ output_latch_device &scsi_out(OUTPUT_LATCH(config, "scsi_data_out", 0));
+ m_scsi->set_output_latch(scsi_out);
- MCFG_SCSI_OUTPUT_LATCH_ADD("scsi_data_out", "scsi")
- MCFG_DEVICE_ADD("scsi_data_in", INPUT_BUFFER, 0)
- MCFG_SCSIDEV_ADD("scsi:1", "harddisk", OMTI5100, SCSI_ID_0)
-MACHINE_CONFIG_END
+ INPUT_BUFFER(config, "scsi_data_in", 0);
+ m_scsi->set_slot_device(1, "harddisk", OMTI5100, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0));
+}
-MACHINE_CONFIG_START(pcd_state::pcx)
+void pcd_state::pcx(machine_config &config)
+{
pcd(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(pcx_io)
+ m_maincpu->set_addrmap(AS_IO, &pcd_state::pcx_io);
pcx_video_device &video(PCX_VIDEO(config.replace(), "video", 0));
video.txd_handler().set("keyboard", FUNC(pcd_keyboard_device::t0_w));
@@ -593,7 +595,7 @@ MACHINE_CONFIG_START(pcd_state::pcx)
subdevice<pcd_keyboard_device>("keyboard")->out_tx_handler().set("video", FUNC(pcx_video_device::rx_w));
m_usart[1]->txd_handler().set_nop();
-MACHINE_CONFIG_END
+}
//**************************************************************************
// ROM DEFINITIONS
diff --git a/src/mame/drivers/phoenix.cpp b/src/mame/drivers/phoenix.cpp
index 5618a461161..cc114cc5eb9 100644
--- a/src/mame/drivers/phoenix.cpp
+++ b/src/mame/drivers/phoenix.cpp
@@ -440,81 +440,76 @@ MACHINE_RESET_MEMBER(phoenix_state,phoenix)
}
-MACHINE_CONFIG_START(phoenix_state::phoenix)
-
+void phoenix_state::phoenix(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, CPU_CLOCK) /* 2.75 MHz */
- MCFG_DEVICE_PROGRAM_MAP(phoenix_memory_map)
+ I8085A(config, m_maincpu, CPU_CLOCK); /* 2.75 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &phoenix_state::phoenix_memory_map);
MCFG_MACHINE_RESET_OVERRIDE(phoenix_state,phoenix)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(phoenix_state, screen_update_phoenix)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ screen.set_screen_update(FUNC(phoenix_state::screen_update_phoenix));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_phoenix)
- MCFG_PALETTE_ADD("palette", 256)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_phoenix);
+
+ PALETTE(config, m_palette, 256).set_init(FUNC(phoenix_state::palette_init_phoenix));
- MCFG_PALETTE_INIT_OWNER(phoenix_state,phoenix)
MCFG_VIDEO_START_OVERRIDE(phoenix_state,phoenix)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_TMS36XX_ADD("tms", 372)
- MCFG_TMS36XX_TYPE(MM6221AA)
- MCFG_TMS36XX_DECAY_TIMES(0.50, 0, 0, 1.05, 0, 0)
- MCFG_TMS36XX_TUNE_SPEED(0.21)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
-
- MCFG_DEVICE_ADD("cust", PHOENIX_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.4)
+ tms36xx_device &tms(TMS36XX(config, "tms", 372));
+ tms.set_subtype(tms36xx_device::subtype::MM6221AA);
+ tms.set_decays(0.50, 0, 0, 1.05, 0, 0);
+ tms.set_tune_speed(0.21);
+ tms.add_route(ALL_OUTPUTS, "mono", 0.5);
- MCFG_DEVICE_ADD("discrete", DISCRETE, 120000, phoenix_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.6)
-MACHINE_CONFIG_END
+ PHOENIX_SOUND(config, "cust").add_route(ALL_OUTPUTS, "mono", 0.4);
+ DISCRETE(config, "discrete", 120000, phoenix_discrete).add_route(ALL_OUTPUTS, "mono", 0.6);
+}
-MACHINE_CONFIG_START(phoenix_state::pleiads)
+void phoenix_state::pleiads(machine_config &config)
+{
phoenix(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pleiads_memory_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &phoenix_state::pleiads_memory_map);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pleiads)
+ m_gfxdecode->set_info(gfx_pleiads);
- MCFG_PALETTE_MODIFY("palette")
- MCFG_PALETTE_INIT_OWNER(phoenix_state,pleiads)
+ m_palette->set_init(FUNC(phoenix_state::palette_init_pleiads));
/* sound hardware */
- MCFG_TMS36XX_REPLACE("tms", 247)
- MCFG_TMS36XX_TYPE(TMS3615)
- MCFG_TMS36XX_DECAY_TIMES(0.33, 0.33, 0, 0.33, 0, 0.33)
+ tms36xx_device &tms(TMS36XX(config.replace(), "tms", 247));
+ tms.set_subtype(tms36xx_device::subtype::TMS3615);
+ tms.set_decays(0.33, 0.33, 0, 0.33, 0, 0.33);
// NOTE: it's unknown if the TMS3615 mixes more than one voice internally.
// A wav taken from Pop Flamer sounds like there are at least no 'odd'
// harmonics (5 1/3' and 2 2/3')
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ tms.add_route(ALL_OUTPUTS, "mono", 0.75);
- MCFG_DEVICE_REMOVE("cust")
- MCFG_DEVICE_ADD("pleiads_custom", PLEIADS_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ config.device_remove("cust");
+ PLEIADS_SOUND(config, "pleiads_custom").add_route(ALL_OUTPUTS, "mono", 0.40);
- MCFG_DEVICE_REMOVE("discrete")
-MACHINE_CONFIG_END
+ config.device_remove("discrete");
+}
/* Same as Phoenix, but uses an AY8910 and an extra visible line (column) */
-MACHINE_CONFIG_START(phoenix_state::survival)
-
+void phoenix_state::survival(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, CPU_CLOCK) /* 5.50 MHz */
- MCFG_I8085A_SID(READLINE(*this, phoenix_state, survival_sid_callback))
- MCFG_DEVICE_PROGRAM_MAP(survival_memory_map)
+ i8085a_cpu_device &maincpu(I8085A(config, m_maincpu, CPU_CLOCK)); /* 5.50 MHz */
+ maincpu.in_sid_func().set(FUNC(phoenix_state::survival_sid_callback));
+ maincpu.set_addrmap(AS_PROGRAM, &phoenix_state::survival_memory_map);
MCFG_MACHINE_RESET_OVERRIDE(phoenix_state,phoenix)
@@ -523,15 +518,15 @@ MACHINE_CONFIG_START(phoenix_state::survival)
/* schematics fairly identical to phoenix, however the interesting
* page is missing
*/
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(phoenix_state, screen_update_phoenix)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ screen.set_screen_update(FUNC(phoenix_state::screen_update_phoenix));
+ screen.set_palette(m_palette);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_phoenix)
- MCFG_PALETTE_ADD("palette", 256)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_phoenix);
+
+ PALETTE(config, m_palette, 256).set_init(FUNC(phoenix_state::palette_init_survival));
- MCFG_PALETTE_INIT_OWNER(phoenix_state,survival)
MCFG_VIDEO_START_OVERRIDE(phoenix_state,phoenix)
/* sound hardware */
@@ -541,19 +536,19 @@ MACHINE_CONFIG_START(phoenix_state::survival)
ay8910_device &aysnd(AY8910(config, "aysnd", 11000000/4));
aysnd.port_b_read_callback().set(FUNC(phoenix_state::survival_protection_r));
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-
-MACHINE_CONFIG_END
+}
/* Uses a Z80 */
-MACHINE_CONFIG_START(phoenix_state::condor)
+void phoenix_state::condor(machine_config &config)
+{
phoenix(config);
/* basic machine hardware */
/* FIXME: Verify clock. This is most likely 11MHz/2 */
- MCFG_DEVICE_REPLACE("maincpu", Z80, 11000000/4) /* 2.75 MHz??? */
- MCFG_DEVICE_PROGRAM_MAP(phoenix_memory_map)
-MACHINE_CONFIG_END
+ Z80(config.replace(), m_maincpu, 11000000/4); /* 2.75 MHz??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &phoenix_state::phoenix_memory_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/ps2.cpp b/src/mame/drivers/ps2.cpp
index 55bc4677b51..b3bf2ac63d1 100644
--- a/src/mame/drivers/ps2.cpp
+++ b/src/mame/drivers/ps2.cpp
@@ -34,12 +34,13 @@ protected:
void machine_start() override;
};
-MACHINE_CONFIG_START(ps2_state::at_softlists)
+void ps2_state::at_softlists(machine_config &config)
+{
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("pc_disk_list","ibm5150")
- MCFG_SOFTWARE_LIST_ADD("at_disk_list","ibm5170")
- MCFG_SOFTWARE_LIST_ADD("at_cdrom_list","ibm5170_cdrom")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "pc_disk_list").set_original("ibm5150");
+ SOFTWARE_LIST(config, "at_disk_list").set_original("ibm5170");
+ SOFTWARE_LIST(config, "at_cdrom_list").set_original("ibm5170_cdrom");
+}
void ps2_state::ps2_16_map(address_map &map)
{
@@ -87,21 +88,23 @@ void ps2_state::machine_start()
MACHINE_CONFIG_START(ps2_state::ps2m30286)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I80286, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(ps2_16_map)
- MCFG_DEVICE_IO_MAP(ps2_16_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259_master", pic8259_device, inta_cb)
- MCFG_80286_SHUTDOWN(WRITELINE("mb", at_mb_device, shutdown))
-
- MCFG_DEVICE_ADD("mb", AT_MB, 0)
- MCFG_QUANTUM_TIME(attotime::from_hz(60))
+ i80286_cpu_device &maincpu(I80286(config, m_maincpu, 10000000));
+ maincpu.set_addrmap(AS_PROGRAM, &ps2_state::ps2_16_map);
+ maincpu.set_addrmap(AS_IO, &ps2_state::ps2_16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+ maincpu.shutdown_callback().set("mb", FUNC(at_mb_device::shutdown));
+
+ AT_MB(config, m_mb, 0);
+
+ config.m_minimum_quantum = attotime::from_hz(60);
+
at_softlists(config);
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "vga", true)
- MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "fdc", false)
- MCFG_DEVICE_ADD("isa3", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "ide", false)
- MCFG_DEVICE_ADD("isa4", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "comat", false)
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "vga", true);
+ ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "fdc", false);
+ ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, "ide", false);
+ ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, "comat", false);
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)
/* internal ram */
@@ -109,26 +112,27 @@ MACHINE_CONFIG_START(ps2_state::ps2m30286)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(ps2_state::ps2386)
- MCFG_DEVICE_ADD("maincpu", I386, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(ps2_32_map)
- MCFG_DEVICE_IO_MAP(ps2_32_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259_master", pic8259_device, inta_cb)
+ I386(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ps2_state::ps2_32_map);
+ m_maincpu->set_addrmap(AS_IO, &ps2_state::ps2_32_io);
+ m_maincpu->set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb));
+
+ AT_MB(config, m_mb, 0);
- MCFG_DEVICE_ADD("mb", AT_MB, 0)
- MCFG_QUANTUM_TIME(attotime::from_hz(60))
+ config.m_minimum_quantum = attotime::from_hz(60);
at_softlists(config);
// on board devices
- MCFG_DEVICE_ADD("board1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("board2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "comat", true)
- MCFG_DEVICE_ADD("board3", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "ide", true)
- MCFG_DEVICE_ADD("board4", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "lpt", true)
+ ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock
+ ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true);
+ ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "ide", true);
+ ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "lpt", true);
// ISA cards
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false)
- MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa3", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa4", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa5", ISA16_SLOT, 0, "mb:isabus", pc_isa16_cards, nullptr, false)
+ ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false);
+ ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false);
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
/* internal ram */
diff --git a/src/mame/drivers/ptcsol.cpp b/src/mame/drivers/ptcsol.cpp
index c6cd8ac2f5d..e8429632831 100644
--- a/src/mame/drivers/ptcsol.cpp
+++ b/src/mame/drivers/ptcsol.cpp
@@ -205,7 +205,7 @@ private:
cass_data_t m_cass_data;
emu_timer *m_cassette_timer;
cassette_image_device *cassette_device_image();
- required_device<cpu_device> m_maincpu;
+ required_device<i8080a_cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<cassette_image_device> m_cass1;
required_device<cassette_image_device> m_cass2;
@@ -736,38 +736,37 @@ void sol20_state::kbd_put(u8 data)
}
}
-MACHINE_CONFIG_START(sol20_state::sol20)
+void sol20_state::sol20(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080A, 14.318181_MHz_XTAL / 7) // divider selectable as 5, 6 or 7 through jumpers
- MCFG_DEVICE_PROGRAM_MAP(sol20_mem)
- MCFG_DEVICE_IO_MAP(sol20_io)
- MCFG_I8085A_INTE(WRITELINE("speaker", speaker_sound_device, level_w))
+ I8080A(config, m_maincpu, 14.318181_MHz_XTAL / 7); // divider selectable as 5, 6 or 7 through jumpers
+ m_maincpu->set_addrmap(AS_PROGRAM, &sol20_state::sol20_mem);
+ m_maincpu->set_addrmap(AS_IO, &sol20_state::sol20_io);
+ m_maincpu->out_inte_func().set("speaker", FUNC(speaker_sound_device::level_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(14.318181_MHz_XTAL, 918, 0, 576, 260, 0, 208)
- MCFG_SCREEN_UPDATE_DRIVER(sol20_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(14.318181_MHz_XTAL, 918, 0, 576, 260, 0, 208);
+ m_screen->set_screen_update(FUNC(sol20_state::screen_update));
+ m_screen->set_palette("palette");
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sol20)
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ GFXDECODE(config, "gfxdecode", "palette", gfx_sol20);
+ PALETTE(config, "palette", 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
/* sound hardware */
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 2.00); // music board
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
- WAVE(config, "wave2", "cassette2").add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
+ WAVE(config, "wave", m_cass1).add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
+ WAVE(config, "wave2", m_cass2).add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
// devices
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_FORMATS(sol20_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sol20_cass")
+ CASSETTE(config, m_cass1).set_formats(sol20_cassette_formats);
+ m_cass1->set_default_state((cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED));
+ m_cass1->set_interface("sol20_cass");
- MCFG_CASSETTE_ADD("cassette2")
- MCFG_CASSETTE_FORMATS(sol20_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sol20_cass")
+ CASSETTE(config, m_cass2).set_formats(sol20_cassette_formats);
+ m_cass2->set_default_state((cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED));
+ m_cass2->set_interface("sol20_cass");
AY51013(config, m_uart); // TMS6011NC
m_uart->set_tx_clock(4800.0);
@@ -786,8 +785,8 @@ MACHINE_CONFIG_START(sol20_state::sol20)
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(sol20_state::kbd_put));
- MCFG_SOFTWARE_LIST_ADD("cass_list", "sol20_cass")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "cass_list").set_original("sol20_cass");
+}
/* ROM definition */
ROM_START( sol20 )
diff --git a/src/mame/drivers/rc759.cpp b/src/mame/drivers/rc759.cpp
index 0aedff0da89..85161519be8 100644
--- a/src/mame/drivers/rc759.cpp
+++ b/src/mame/drivers/rc759.cpp
@@ -532,13 +532,14 @@ static void rc759_floppies(device_slot_interface &device)
device.option_add("hd", FLOPPY_525_HD);
}
-MACHINE_CONFIG_START(rc759_state::rc759)
- MCFG_DEVICE_ADD("maincpu", I80186, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(rc759_map)
- MCFG_DEVICE_IO_MAP(rc759_io)
- MCFG_80186_IRQ_SLAVE_ACK(READ8(*this, rc759_state, irq_callback))
- MCFG_80186_TMROUT0_HANDLER(WRITELINE(*this, rc759_state, i186_timer0_w))
- MCFG_80186_TMROUT1_HANDLER(WRITELINE(*this, rc759_state, i186_timer1_w))
+void rc759_state::rc759(machine_config &config)
+{
+ I80186(config, m_maincpu, 6000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &rc759_state::rc759_map);
+ m_maincpu->set_addrmap(AS_IO, &rc759_state::rc759_io);
+ m_maincpu->read_slave_ack_callback().set(FUNC(rc759_state::irq_callback));
+ m_maincpu->tmrout0_handler().set(FUNC(rc759_state::i186_timer0_w));
+ m_maincpu->tmrout1_handler().set(FUNC(rc759_state::i186_timer1_w));
// interrupt controller
PIC8259(config, m_pic, 0);
@@ -554,18 +555,17 @@ MACHINE_CONFIG_START(rc759_state::rc759)
m_ppi->out_pc_callback().set(FUNC(rc759_state::ppi_portc_w));
// rtc
- MCFG_DEVICE_ADD("rtc", MM58167, 32.768_kHz_XTAL)
- MCFG_MM58167_IRQ_CALLBACK(WRITELINE(m_pic, pic8259_device, ir3_w))
+ MM58167(config, "rtc", 32.768_kHz_XTAL).irq().set(m_pic, FUNC(pic8259_device::ir3_w));
// video
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(1250000 * 16, 896, 96, 816, 377, 4, 364) // 22 kHz setting
- MCFG_SCREEN_UPDATE_DEVICE("txt", i82730_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(1250000 * 16, 896, 96, 816, 377, 4, 364); // 22 kHz setting
+ screen.set_screen_update("txt", FUNC(i82730_device::screen_update));
- MCFG_I82730_ADD("txt", "maincpu", 1250000)
- MCFG_VIDEO_SET_SCREEN("screen")
- MCFG_I82730_UPDATE_ROW_CB(rc759_state, txt_update_row)
- MCFG_I82730_SINT_HANDLER(WRITELINE(m_pic, pic8259_device, ir4_w))
+ I82730(config, m_txt, 1250000, m_maincpu);
+ m_txt->set_screen("screen");
+ m_txt->set_update_row_callback(FUNC(rc759_state::txt_update_row));
+ m_txt->sint().set(m_pic, FUNC(pic8259_device::ir4_w));
// keyboard
generic_keyboard_device &keyb(GENERIC_KEYBOARD(config, "keyb", 0));
@@ -581,12 +581,12 @@ MACHINE_CONFIG_START(rc759_state::rc759)
SN76489A(config, m_snd, 20_MHz_XTAL / 10).add_route(ALL_OUTPUTS, "mono", 1.0);
// internal centronics
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, rc759_state, centronics_busy_w))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, rc759_state, centronics_ack_w))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, rc759_state, centronics_fault_w))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, rc759_state, centronics_perror_w))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, rc759_state, centronics_select_w))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(rc759_state::centronics_busy_w));
+ m_centronics->ack_handler().set(FUNC(rc759_state::centronics_ack_w));
+ m_centronics->fault_handler().set(FUNC(rc759_state::centronics_fault_w));
+ m_centronics->perror_handler().set(FUNC(rc759_state::centronics_perror_w));
+ m_centronics->select_handler().set(FUNC(rc759_state::centronics_select_w));
// isbx slot
ISBX_SLOT(config, m_isbx, 0, isbx_cards, nullptr);
@@ -602,7 +602,7 @@ MACHINE_CONFIG_START(rc759_state::rc759)
// floppy drives
FLOPPY_CONNECTOR(config, "fdc:0", rc759_floppies, "hd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:1", rc759_floppies, "hd", floppy_image_device::default_floppy_formats);
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/drivers/sitcom.cpp b/src/mame/drivers/sitcom.cpp
index e2c062a321d..49f1407cb6e 100644
--- a/src/mame/drivers/sitcom.cpp
+++ b/src/mame/drivers/sitcom.cpp
@@ -87,7 +87,7 @@ protected:
virtual void machine_reset() override;
required_ioport m_buttons;
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<address_map_bank_device> m_bank;
output_finder<15> m_digits;
output_finder<2, 8> m_leds;
@@ -347,18 +347,18 @@ void sitcom_timer_state::update_dac(uint8_t value)
}
-MACHINE_CONFIG_START(sitcom_state::sitcom)
+void sitcom_state::sitcom(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", I8085A, 6.144_MHz_XTAL) // 3.072MHz can be used for an old slow 8085
- MCFG_DEVICE_PROGRAM_MAP(sitcom_mem)
- MCFG_DEVICE_IO_MAP(sitcom_io)
- MCFG_I8085A_SID(READLINE(*this, sitcom_state, sid_line))
- MCFG_I8085A_SOD(WRITELINE(*this, sitcom_state, sod_led))
+ I8085A(config, m_maincpu, 6.144_MHz_XTAL); // 3.072MHz can be used for an old slow 8085
+ m_maincpu->set_addrmap(AS_PROGRAM, &sitcom_state::sitcom_mem);
+ m_maincpu->set_addrmap(AS_IO, &sitcom_state::sitcom_io);
+ m_maincpu->in_sid_func().set(FUNC(sitcom_state::sid_line));
+ m_maincpu->out_sod_func().set(FUNC(sitcom_state::sod_led));
ADDRESS_MAP_BANK(config, "bank").set_map(&sitcom_state::sitcom_bank).set_options(ENDIANNESS_LITTLE, 8, 16, 0x8000);
- MCFG_CLOCK_ADD("100hz", 100)
- MCFG_CLOCK_SIGNAL_HANDLER(INPUTLINE("maincpu", I8085_RST75_LINE))
+ CLOCK(config, "100hz", 100).signal_handler().set_inputline("maincpu", I8085_RST75_LINE);
i8255_device &ppi(I8255(config, "ppi"));
ppi.out_pa_callback().set(FUNC(sitcom_state::update_ppi_pa));
@@ -366,28 +366,23 @@ MACHINE_CONFIG_START(sitcom_state::sitcom)
ppi.in_pc_callback().set_ioport("PORTC");
// video hardware
- MCFG_DEVICE_ADD("ds0", DL1414T, u32(0)) // left display
- MCFG_DL1414_UPDATE_HANDLER(WRITE16(*this, sitcom_state, update_ds<0>))
- MCFG_DEVICE_ADD("ds1", DL1414T, u32(0)) // right display
- MCFG_DL1414_UPDATE_HANDLER(WRITE16(*this, sitcom_state, update_ds<1>))
+ DL1414T(config, "ds0", u32(0)).update().set(FUNC(sitcom_state::update_ds<0>)); // left display
+ DL1414T(config, "ds1", u32(0)).update().set(FUNC(sitcom_state::update_ds<1>)); // right display
// host interface
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "null_modem"));
rs232.rxd_handler().set(FUNC(sitcom_state::update_rxd));
- MCFG_SOFTWARE_LIST_ADD("bitb_list", "sitcom")
+ SOFTWARE_LIST(config, "bitb_list").set_original("sitcom");
config.set_default_layout(layout_sitcom);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(sitcom_timer_state::sitcomtmr)
+void sitcom_timer_state::sitcomtmr(machine_config &config)
+{
sitcom(config);
-
- MCFG_DEVICE_ADD("ds2", DL1414T, u32(0)) // remote display
- MCFG_DL1414_UPDATE_HANDLER(WRITE16(*this, sitcom_timer_state, update_ds<2>))
-
+ DL1414T(config, m_ds2, u32(0)).update().set(FUNC(sitcom_timer_state::update_ds<2>)); // remote display
config.set_default_layout(layout_sitcomtmr);
-MACHINE_CONFIG_END
+}
ROM_START( sitcom )
diff --git a/src/mame/drivers/supstarf.cpp b/src/mame/drivers/supstarf.cpp
index 6c6f0cbd1b4..e9debe5ab14 100644
--- a/src/mame/drivers/supstarf.cpp
+++ b/src/mame/drivers/supstarf.cpp
@@ -48,7 +48,7 @@ private:
virtual void machine_start() override;
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<i8035_device> m_soundcpu;
required_device_array<ay8910_device, 2> m_psg;
required_device_array<i8212_device, 2> m_soundlatch;
@@ -173,12 +173,13 @@ void supstarf_state::machine_start()
save_item(NAME(m_port1_data));
}
-MACHINE_CONFIG_START(supstarf_state::supstarf)
- MCFG_DEVICE_ADD("maincpu", I8085A, XTAL(5'068'800))
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_I8085A_SID(READLINE(*this, supstarf_state, contacts_r))
- MCFG_I8085A_SOD(WRITELINE(*this, supstarf_state, displays_w))
+void supstarf_state::supstarf(machine_config &config)
+{
+ I8085A(config, m_maincpu, XTAL(5'068'800));
+ m_maincpu->set_addrmap(AS_PROGRAM, &supstarf_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &supstarf_state::main_io_map);
+ m_maincpu->in_sid_func().set(FUNC(supstarf_state::contacts_r));
+ m_maincpu->out_sod_func().set(FUNC(supstarf_state::displays_w));
I8035(config, m_soundcpu, XTAL(5'068'800) / 2); // from 8085 pin 37 (CLK OUT)
m_soundcpu->set_addrmap(AS_PROGRAM, &supstarf_state::sound_map);
@@ -207,7 +208,7 @@ MACHINE_CONFIG_START(supstarf_state::supstarf)
m_psg[1]->port_a_read_callback().set_ioport("JO");
m_psg[1]->port_b_read_callback().set_ioport("I1");
m_psg[1]->add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
static INPUT_PORTS_START(supstarf)
PORT_START("I1")
diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp
index 79019164e21..797dbcf7ba5 100644
--- a/src/mame/drivers/tandy2k.cpp
+++ b/src/mame/drivers/tandy2k.cpp
@@ -768,23 +768,25 @@ void tandy2k_state::device_reset_after_children()
// Machine Driver
-MACHINE_CONFIG_START(tandy2k_state::tandy2k)
+void tandy2k_state::tandy2k(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(I80186_TAG, I80186, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(tandy2k_mem)
- MCFG_DEVICE_IO_MAP(tandy2k_io)
- MCFG_80186_IRQ_SLAVE_ACK(READ8(DEVICE_SELF, tandy2k_state, irq_callback))
+ I80186(config, m_maincpu, 16_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tandy2k_state::tandy2k_mem);
+ m_maincpu->set_addrmap(AS_IO, &tandy2k_state::tandy2k_io);
+ m_maincpu->read_slave_ack_callback().set(FUNC(tandy2k_state::irq_callback));
// video hardware
- MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_SIZE(640, 400)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- //MCFG_SCREEN_UPDATE_DEVICE(CRT9021B_TAG, crt9021_device, screen_update)
- MCFG_SCREEN_UPDATE_DRIVER(tandy2k_state, screen_update)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_color(rgb_t::green());
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
+ screen.set_size(640, 400);
+ screen.set_visarea(0, 640-1, 0, 400-1);
+ //screen.set_screen_update(CRT9021B_TAG, FUNC(crt9021_device::screen_update));
+ screen.set_screen_update(FUNC(tandy2k_state::screen_update));
- MCFG_PALETTE_ADD_MONOCHROME("palette")
+ PALETTE(config, m_palette, 2).set_init("palette", FUNC(palette_device::palette_init_monochrome));
crt9007_device &vpac(CRT9007(config, CRT9007_TAG, 16_MHz_XTAL * 28 / 20 / 8));
vpac.set_addrmap(0, &tandy2k_state::vpac_mem);
@@ -800,23 +802,22 @@ MACHINE_CONFIG_START(tandy2k_state::tandy2k)
vpac.sld_callback().set(FUNC(tandy2k_state::vpac_sld_w));
vpac.set_screen(SCREEN_TAG);
- MCFG_DEVICE_ADD(CRT9212_0_TAG, CRT9212, 0)
- MCFG_CRT9212_WEN2_VCC()
- MCFG_CRT9212_DOUT_CALLBACK(WRITE8(*this, tandy2k_state, vidla_w))
+ CRT9212(config, m_drb0, 0);
+ m_drb0->set_wen2(1);
+ m_drb0->dout().set(FUNC(tandy2k_state::vidla_w));
- MCFG_DEVICE_ADD(CRT9212_1_TAG, CRT9212, 0)
- MCFG_CRT9212_WEN2_VCC()
- MCFG_CRT9212_DOUT_CALLBACK(WRITE8(*this, tandy2k_state, drb_attr_w))
+ CRT9212(config, m_drb1, 0);
+ m_drb1->set_wen2(1);
+ m_drb1->dout().set(FUNC(tandy2k_state::drb_attr_w));
- MCFG_DEVICE_ADD(CRT9021B_TAG, CRT9021, 16_MHz_XTAL * 28 / 20)
- MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
+ CRT9021(config, m_vac, 16_MHz_XTAL * 28 / 20);
+ m_vac->set_screen(SCREEN_TAG);
- MCFG_TIMER_DRIVER_ADD("vidldsh", tandy2k_state, vidldsh_tick)
+ TIMER(config, "vidldsh").configure_generic(FUNC(tandy2k_state::vidldsh_tick));
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
// devices
I8255A(config, m_i8255a);
@@ -856,44 +857,44 @@ MACHINE_CONFIG_START(tandy2k_state::tandy2k)
m_fdc->intrq_wr_callback().set(m_pic0, FUNC(pic8259_device::ir4_w));
m_fdc->drq_wr_callback().set(FUNC(tandy2k_state::fdc_drq_w));
m_fdc->hdl_wr_callback().set(FUNC(tandy2k_state::fdc_hdl_w));
- MCFG_FLOPPY_DRIVE_ADD(I8272A_TAG ":0", tandy2k_floppies, "525qd", tandy2k_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(I8272A_TAG ":1", tandy2k_floppies, "525qd", tandy2k_state::floppy_formats)
+ FLOPPY_CONNECTOR(config, I8272A_TAG ":0", tandy2k_floppies, "525qd", tandy2k_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, I8272A_TAG ":1", tandy2k_floppies, "525qd", tandy2k_state::floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, tandy2k_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, tandy2k_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, tandy2k_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, tandy2k_state, write_centronics_select))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, tandy2k_state, write_centronics_fault))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(tandy2k_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(tandy2k_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(tandy2k_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(tandy2k_state::write_centronics_select));
+ m_centronics->fault_handler().set(FUNC(tandy2k_state::write_centronics_fault));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
TANDY2K_KEYBOARD(config, m_kb, 0);
m_kb->clock_wr_callback().set(FUNC(tandy2k_state::kbdclk_w));
m_kb->data_wr_callback().set(FUNC(tandy2k_state::kbddat_w));
// temporary until the tandy keyboard has a rom dump
- MCFG_PC_KEYB_ADD(m_pc_keyboard, WRITELINE(I8259A_1_TAG, pic8259_device, ir0_w))
-
+ PC_KEYB(config, m_pc_keyboard, 0).keypress().set(I8259A_1_TAG, FUNC(pic8259_device::ir0_w));
// software lists
- MCFG_SOFTWARE_LIST_ADD("flop_list", "tandy2k")
+ SOFTWARE_LIST(config, "flop_list").set_original("tandy2k");
// internal ram
RAM(config, RAM_TAG).set_default_size("128K").set_extra_options("256K,384K,512K,640K,768K,896K");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tandy2k_state::tandy2k_hd)
+void tandy2k_state::tandy2k_hd(machine_config &config)
+{
tandy2k(config);
// basic machine hardware
- MCFG_DEVICE_MODIFY(I80186_TAG)
- MCFG_DEVICE_IO_MAP(tandy2k_hd_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tandy2k_state::tandy2k_hd_io);
// Tandon TM502 hard disk
- MCFG_HARDDISK_ADD("harddisk0")
+ HARDDISK(config, "harddisk0", 0);
//MCFG_WD1010_ADD(WD1010_TAG, wd1010_intf)
//MCFG_WD1100_11_ADD(WD1100_11_TAG, wd1100_11_intf)
-MACHINE_CONFIG_END
+}
// ROMs
diff --git a/src/mame/drivers/vector06.cpp b/src/mame/drivers/vector06.cpp
index 4a8718e04c7..8e82a61b033 100644
--- a/src/mame/drivers/vector06.cpp
+++ b/src/mame/drivers/vector06.cpp
@@ -159,29 +159,29 @@ static void vector06_floppies(device_slot_interface &device)
/* Machine driver */
-MACHINE_CONFIG_START(vector06_state::vector06)
+void vector06_state::vector06(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, 3000000) // actual speed is wrong due to unemulated latency
- MCFG_DEVICE_PROGRAM_MAP(vector06_mem)
- MCFG_DEVICE_IO_MAP(vector06_io)
- MCFG_I8085A_STATUS(WRITE8(*this, vector06_state, vector06_status_callback))
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", vector06_state, vector06_interrupt)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(vector06_state,vector06_irq_callback)
+ I8080(config, m_maincpu, 3000000); // actual speed is wrong due to unemulated latency
+ m_maincpu->set_addrmap(AS_PROGRAM, &vector06_state::vector06_mem);
+ m_maincpu->set_addrmap(AS_IO, &vector06_state::vector06_io);
+ m_maincpu->out_status_func().set(FUNC(vector06_state::vector06_status_callback));
+ m_maincpu->set_vblank_int("screen", FUNC(vector06_state::vector06_interrupt));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(vector06_state::vector06_irq_callback));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(256+64, 256+64)
- MCFG_SCREEN_VISIBLE_AREA(0, 256+64-1, 0, 256+64-1)
- MCFG_SCREEN_UPDATE_DRIVER(vector06_state, screen_update_vector06)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(256+64, 256+64);
+ m_screen->set_visarea(0, 256+64-1, 0, 256+64-1);
+ m_screen->set_screen_update(FUNC(vector06_state::screen_update_vector06));
+ m_screen->set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 16)
- MCFG_PALETTE_INIT_OWNER(vector06_state, vector06)
+ PALETTE(config, m_palette, 16).set_init(FUNC(vector06_state::palette_init_vector06));
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
+ WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
/* devices */
I8255(config, m_ppi8255);
@@ -196,26 +196,23 @@ MACHINE_CONFIG_START(vector06_state::vector06)
m_ppi8255_2->out_pb_callback().set(FUNC(vector06_state::vector06_romdisk_portb_w));
m_ppi8255_2->out_pc_callback().set(FUNC(vector06_state::vector06_romdisk_portc_w));
- MCFG_CASSETTE_ADD("cassette")
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
+ CASSETTE(config, m_cassette);
+ m_cassette->set_default_state((cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED));
KR1818VG93(config, m_fdc, 1_MHz_XTAL);
- MCFG_FLOPPY_DRIVE_ADD("wd1793:0", vector06_floppies, "qd", vector06_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("wd1793:1", vector06_floppies, "qd", vector06_state::floppy_formats)
- MCFG_SOFTWARE_LIST_ADD("flop_list","vector06_flop")
+ FLOPPY_CONNECTOR(config, "wd1793:0", vector06_floppies, "qd", vector06_state::floppy_formats);
+ FLOPPY_CONNECTOR(config, "wd1793:1", vector06_floppies, "qd", vector06_state::floppy_formats);
+ SOFTWARE_LIST(config, "flop_list").set_original("vector06_flop");
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "vector06_cart")
- MCFG_GENERIC_EXTENSIONS("bin,emr")
-
- MCFG_SOFTWARE_LIST_ADD("cart_list", "vector06_cart")
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "vector06_cart", "bin,emr");
+ SOFTWARE_LIST(config, "cart_list").set_original("vector06_cart");
/* internal ram */
RAM(config, RAM_TAG).set_default_size("320K").set_default_value(0);
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
PIT8253(config, m_pit8253, 0);
m_pit8253->set_clk<0>(1500000);
@@ -227,7 +224,7 @@ MACHINE_CONFIG_START(vector06_state::vector06)
// optional
AY8910(config, m_ay, 1773400).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp
index 5f6cf9f0ca3..587cfaf23a1 100644
--- a/src/mame/drivers/vt240.cpp
+++ b/src/mame/drivers/vt240.cpp
@@ -60,7 +60,7 @@ public:
private:
required_device<t11_device> m_maincpu;
- required_device<cpu_device> m_i8085;
+ required_device<i8085a_cpu_device> m_i8085;
required_device<i8251_device> m_i8251;
required_device<scn2681_device> m_duart;
required_device<rs232_port_device> m_host;
@@ -654,25 +654,27 @@ static INPUT_PORTS_START( vt240 )
PORT_CONFSETTING(0x01, "Color")
INPUT_PORTS_END
-MACHINE_CONFIG_START(vt240_state::vt240)
+void vt240_state::vt240(machine_config &config)
+{
T11(config, m_maincpu, XTAL(7'372'800)); // confirm
m_maincpu->set_addrmap(AS_PROGRAM, &vt240_state::vt240_mem);
m_maincpu->set_initial_mode(5 << 13);
m_maincpu->out_reset().set(FUNC(vt240_state::t11_reset_w));
- MCFG_DEVICE_ADD("charcpu", I8085A, XTAL(16'097'280) / 2)
- MCFG_DEVICE_PROGRAM_MAP(vt240_char_mem)
- MCFG_DEVICE_IO_MAP(vt240_char_io)
- MCFG_I8085A_SOD(WRITELINE(*this, vt240_state, i8085_rdy_w))
- MCFG_I8085A_SID(READLINE(*this, vt240_state, i8085_sid_r))
+ I8085A(config, m_i8085, XTAL(16'097'280) / 2);
+ m_i8085->set_addrmap(AS_PROGRAM, &vt240_state::vt240_char_mem);
+ m_i8085->set_addrmap(AS_IO, &vt240_state::vt240_char_io);
+ m_i8085->out_sod_func().set(FUNC(vt240_state::i8085_rdy_w));
+ m_i8085->in_sid_func().set(FUNC(vt240_state::i8085_sid_r));
ADDRESS_MAP_BANK(config, "bank").set_map(&vt240_state::bank_map).set_options(ENDIANNESS_LITTLE, 16, 20, 0x1000);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(16'097'280), 1024, 0, 800, 629, 0, 480)
- MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
- MCFG_PALETTE_ADD("palette", 32)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_vt240)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(16'097'280), 1024, 0, 800, 629, 0, 480);
+ screen.set_screen_update("upd7220", FUNC(upd7220_device::screen_update));
+
+ PALETTE(config, m_palette, 32);
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_vt240);
UPD7220(config, m_hgdc, XTAL(16'097'280) / 16); // actually /8?
m_hgdc->set_addrmap(0, &vt240_state::upd7220_map);
@@ -681,11 +683,11 @@ MACHINE_CONFIG_START(vt240_state::vt240)
m_hgdc->blank_wr_callback().set_inputline(m_i8085, I8085_RST55_LINE);
m_hgdc->set_screen("screen");
- MCFG_DEVICE_ADD(m_duart, SCN2681, XTAL(7'372'800) / 2)
- MCFG_MC68681_IRQ_CALLBACK(WRITELINE(*this, vt240_state, irq13_w))
- MCFG_MC68681_A_TX_CALLBACK(WRITELINE(m_host, rs232_port_device, write_txd))
- MCFG_MC68681_B_TX_CALLBACK(WRITELINE("printer", rs232_port_device, write_txd))
- MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, vt240_state, duartout_w))
+ SCN2681(config, m_duart, XTAL(7'372'800) / 2);
+ m_duart->irq_cb().set(FUNC(vt240_state::irq13_w));
+ m_duart->a_tx_cb().set(m_host, FUNC(rs232_port_device::write_txd));
+ m_duart->b_tx_cb().set("printer", FUNC(rs232_port_device::write_txd));
+ m_duart->outport_cb().set(FUNC(vt240_state::duartout_w));
I8251(config, m_i8251, 0);
m_i8251->txd_handler().set(FUNC(vt240_state::tx_w));
@@ -696,8 +698,7 @@ MACHINE_CONFIG_START(vt240_state::vt240)
LK201(config, m_lk201, 0);
m_lk201->tx_handler().set(m_i8251, FUNC(i8251_device::write_rxd));
- MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4800 * 64) // 8251 is set to /64 on the clock input
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, vt240_state, write_keyboard_clock))
+ CLOCK(config, "keyboard_clock", 4800 * 64).signal_handler().set(FUNC(vt240_state::write_keyboard_clock)); // 8251 is set to /64 on the clock input
RS232_PORT(config, m_host, default_rs232_devices, "null_modem");
m_host->rxd_handler().set(m_duart, FUNC(scn2681_device::rx_a_w));
@@ -709,9 +710,10 @@ MACHINE_CONFIG_START(vt240_state::vt240)
printer.dsr_handler().set(m_duart, FUNC(scn2681_device::ip1_w));
X2212(config, "x2212");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(vt240_state::mc7105)
+void vt240_state::mc7105(machine_config &config)
+{
vt240(config);
config.device_remove("lk201");
@@ -723,10 +725,8 @@ MACHINE_CONFIG_START(vt240_state::mc7105)
//m_i8251->txd_handler().set("ms7004", FUNC(ms7004_device::rx_w));
// baud rate is supposed to be 4800 but keyboard is slightly faster
- MCFG_DEVICE_REMOVE("keyboard_clock")
- MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*64)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, vt240_state, write_keyboard_clock))
-MACHINE_CONFIG_END
+ CLOCK(config.replace(), "keyboard_clock", 4960*64).signal_handler().set(FUNC(vt240_state::write_keyboard_clock));
+}
/* ROM definition */
ROM_START( mc7105 )
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index bc430661112..bc0c8c8b08b 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -10,13 +10,15 @@
#pragma once
+#include "cpu/i8085/i8085.h"
+#include "machine/74259.h"
#include "machine/alpha8201.h"
#include "machine/gen_latch.h"
+#include "machine/i8155.h"
#include "machine/timer.h"
-#include "machine/74259.h"
-#include "sound/samples.h"
-#include "sound/msm5232.h"
#include "sound/dac.h"
+#include "sound/msm5232.h"
+#include "sound/samples.h"
#include "emupal.h"
#include "screen.h"
@@ -32,6 +34,7 @@ public:
m_mcuram(*this, "mcuram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
+ m_audio8155(*this, "audio8155"),
m_samples(*this, "samples"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
@@ -73,7 +76,8 @@ public:
/* devices */
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
+ required_device<i8085a_cpu_device> m_audiocpu;
+ required_device<i8155_device> m_audio8155;
required_device<samples_device> m_samples;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
diff --git a/src/mame/includes/exp85.h b/src/mame/includes/exp85.h
index 52ad9920ad7..20efc5efbbd 100644
--- a/src/mame/includes/exp85.h
+++ b/src/mame/includes/exp85.h
@@ -4,6 +4,7 @@
#define MAME_INCLUDES_EXP85_H
#include "bus/rs232/rs232.h"
+#include "cpu/i8085/i8085.h"
#include "imagedev/cassette.h"
#include "sound/spkrdev.h"
@@ -31,7 +32,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER( trigger_rst75 );
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<rs232_port_device> m_rs232;
required_device<cassette_image_device> m_cassette;
required_device<speaker_sound_device> m_speaker;
diff --git a/src/mame/includes/kyocera.h b/src/mame/includes/kyocera.h
index 85a154e2f5b..9643c7f23ba 100644
--- a/src/mame/includes/kyocera.h
+++ b/src/mame/includes/kyocera.h
@@ -5,7 +5,6 @@
#pragma once
-
#include "cpu/i8085/i8085.h"
#include "imagedev/cassette.h"
#include "machine/buffer.h"
@@ -100,7 +99,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( write_centronics_select );
protected:
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<upd1990a_device> m_rtc;
optional_device<im6402_device> m_uart;
required_device<hd44102_device> m_lcdc0;
@@ -220,7 +219,7 @@ public:
m_y(*this, "Y%u", 0)
{ }
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<rp5c01_device> m_rtc;
required_device<hd61830_device> m_lcdc;
required_device<centronics_device> m_centronics;
diff --git a/src/mame/includes/mikromik.h b/src/mame/includes/mikromik.h
index 85446d4d1a5..3a0e914e4d7 100644
--- a/src/mame/includes/mikromik.h
+++ b/src/mame/includes/mikromik.h
@@ -71,7 +71,7 @@ public:
void mm1m7(machine_config &config);
private:
- required_device<cpu_device> m_maincpu;
+ required_device<i8085a_cpu_device> m_maincpu;
required_device<i8212_device> m_iop;
required_device<am9517a_device> m_dmac;
required_device<pit8253_device> m_pit;
diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h
index 891907c4d24..b9fb46d9065 100644
--- a/src/mame/includes/n8080.h
+++ b/src/mame/includes/n8080.h
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Pierpaolo Prazzoli
+#include "cpu/i8085/i8085.h"
#include "cpu/mcs48/mcs48.h"
#include "machine/timer.h"
#include "sound/dac.h"
@@ -64,7 +65,7 @@ private:
int m_inte;
/* devices */
- required_device<cpu_device> m_maincpu;
+ required_device<i8080_cpu_device> m_maincpu;
required_device<i8035_device> m_audiocpu;
optional_device<dac_bit_interface> m_n8080_dac;
optional_device<dac_8bit_r2r_device> m_helifire_dac;
diff --git a/src/mame/includes/phoenix.h b/src/mame/includes/phoenix.h
index e98d8e3f654..b3bad7f1e4f 100644
--- a/src/mame/includes/phoenix.h
+++ b/src/mame/includes/phoenix.h
@@ -16,6 +16,7 @@ public:
, m_maincpu(*this, "maincpu")
, m_pleiads_custom(*this, "pleiads_custom")
, m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
, m_fg_tilemap(nullptr)
, m_bg_tilemap(nullptr)
{
@@ -53,6 +54,7 @@ protected:
required_device<cpu_device> m_maincpu;
optional_device<pleiads_sound_device> m_pleiads_custom;
required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
diff --git a/src/mame/includes/redalert.h b/src/mame/includes/redalert.h
index 48dec9d2606..08c36389be2 100644
--- a/src/mame/includes/redalert.h
+++ b/src/mame/includes/redalert.h
@@ -68,7 +68,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
- optional_device<cpu_device> m_voicecpu;
+ optional_device<i8085a_cpu_device> m_voicecpu;
optional_device<ay8910_device> m_ay8910;
optional_device_array<ay8910_device, 2> m_ay;
optional_device<hc55516_device> m_cvsd;
diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h
index 6dd05323630..ca1c8f2fcf2 100644
--- a/src/mame/includes/vector06.h
+++ b/src/mame/includes/vector06.h
@@ -18,10 +18,10 @@
#include "imagedev/cassette.h"
#include "imagedev/floppy.h"
-#include "machine/ram.h"
-#include "machine/wd_fdc.h"
#include "machine/i8255.h"
#include "machine/pit8253.h"
+#include "machine/ram.h"
+#include "machine/wd_fdc.h"
#include "sound/ay8910.h"
#include "sound/spkrdev.h"
@@ -87,7 +87,7 @@ private:
void vector06_io(address_map &map);
void vector06_mem(address_map &map);
- required_device<cpu_device> m_maincpu;
+ required_device<i8080_cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_device<cassette_image_device> m_cassette;
required_device<generic_slot_device> m_cart;
diff --git a/src/mame/machine/at.cpp b/src/mame/machine/at.cpp
index 85286de7a30..cd431484b17 100644
--- a/src/mame/machine/at.cpp
+++ b/src/mame/machine/at.cpp
@@ -43,7 +43,7 @@ void at_mb_device::device_reset()
void at_mb_device::device_start()
{
if(!strncmp(m_maincpu->shortname(), "i80286", 6))
- downcast<i80286_cpu_device *>(m_maincpu.target())->set_a20_callback(i80286_cpu_device::a20_cb(&at_mb_device::a20_286, this));
+ downcast<i80286_cpu_device *>(m_maincpu.target())->set_a20_callback(FUNC(at_mb_device::a20_286));
}
MACHINE_CONFIG_START(at_mb_device::at_softlists)